-
-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Device not found on deployed site using node-sonos #520
Comments
Just following up here, any idea on how I could better discover devices on a hosted application that uses It seems to be searching for devices but it never seems to discover it properly and I don't see any kind of error message. |
If the device you run the app on isn't in the same network as the players
it won't work.
Device discovery works by making an UPNP announce Multicast telling the
devices where to log notify UPNP calls to.
…On Fri, 31 Dec 2021, 10:09 Felix, ***@***.***> wrote:
Just following up here, any idea on how I could better discover devices on
a hosted application that uses node-sonos?
It seems to be searching for devices but it never seems to discover it
properly and I don't see any kind of error message.
Would greatly appreciate some advice on this.
—
Reply to this email directly, view it on GitHub
<#520 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACCK7BU523CV44IS6K722TUTTUS7ANCNFSM5KVSN3SQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
It is running on the same wifi network yes, but still having issues discovering the device. It keeps searching but never finds it. Any idea on how to force a discover on the same network using a groupId for a specific device potentially? |
Thanks in advance! @pascalopitz |
On unofficial sonos controller for linux for example, you can use the IP address and add manually via menu dialog
…On Sat, 1 Jan 2022, 05:07 Felix, ***@***.***> wrote:
Thanks in advance! @pascalopitz <https://github.com/pascalopitz>
—
Reply to this email directly, view it on GitHub
<#520 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACCK7A24ENRXHBQLKCAD53UTXZ7PANCNFSM5KVSN3SQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Does that mean passing an IP Address and a port on Would greatly appreciate a code snippet or a link... this is an express + next.js project, but not quite clear on how to leverage the IP Address to find the device manually. |
No, it would basically be the same as adding a known device:
From there on you can query the topology etc On the alpha release, see: Line 376 in bea996e
|
@pascalopitz Appreciate the help so far! But having some issues getting this to work... This is what my code looks like:
And this is the error I am getting when it's run:
Unfortunately it seems like the connection is being refused... not sure how to get around this. Have you ever encountered anything like this? |
That is very much depending on your individual network topology, so can't comment |
Something like:
|
@svrooij Unfortunately I am using a backend server/app to try and connect to the Sonos Network using node.js/express. Will try and debug, appreciate the help guys! |
DeviceDiscovery doesn't work for a deployed web application. No Sonos Device is found on the network.
Expected Behavior
A Device should be discovered when searching for the Device in this instance using
DeviceDiscovery
.Current Behavior
Currently works in my local environment, but I've deployed my application. When I run this on a chrome browser the device is never discovered.
My application uses a Next.JS + React stack with express.
Possible Solution
Not 100% clear on how this works and I am definitely new to this. Do I need to set an environment variable here? How would I configure the production version to properly discover devices connected to an account etc.
This is more of a question, not a proposed solution, but I would appreciate all the help I can get here. Not clear on how DeviceDiscovery is actually working without being tied to any account or auth.
Sample code or executed example
This piece of code never works in the production instance.
Versions (and Environment)
Node version: "14.x"
node-sonos version: "^1.14.1"
OS: MacOS
The text was updated successfully, but these errors were encountered: