-
Notifications
You must be signed in to change notification settings - Fork 34
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
NotASonosDevice #135
Comments
Did you run the container with |
Am I doing something wrong with my commands? toddmo@machinename:~$ sudo docker network ls toddmo@machinename:~$ sudo docker run --net=host sonosweb/sonos-web
Server listening on port 5050 Error: Not A Sonos Device |
Same on my system (Linux):
|
Hmm, all looks ok in terms of starting the container. Are you both using S1 hardware? I've only got S2 compatible gear here. |
Same error here, started with --net=host, using a Beam soundbar and a Roam SL and some Ikea hardware. |
I would like to add 2 pieces of information:
These two pieces of information indicate to me the issue lies with your code somewhere, not gen 1 devices. Thanks. If you want to call a bunch of Sonos API from a web page, you need to first go through the OAuth process so I can auth your app to my Sonos household. But I was never prompted. Could that be the issue? At a min, I recommend beefing up this error message. It seems like you're trying to get about this another way. You're trying to connect to my Sonos device over the LAN instead of just controlling it via the API, which we know works fine. |
There seem to be two ways to communicate with Sonos devices, either through their API or directly by IP address. As the sonos-web application needs host networking, it will most likely detect the Sonos devices through network broadcasting and not use the API. That's why you did not have to authorize anything in an oauth flow. |
Same issue on my system (Linux):
|
Very strange, I have installed Docker on my Debian laptop and tried running the image.. On there, it works. The laptop is in only one network (same as the Sonos devices), while my server is in three different VLANs. |
Interesting, i wonder if we need a way to specify the interface the api is binding to. Does everyone else have multiple network interfaces? Internally sonos-web uses https://github.com/bencevans/node-sonos to connect locally to the sonos system (cloud is not used). Related info: |
I got the same error here. It turned out to be firewall running on the same host. After disabling the firewall (systemctl stop firewalld) it started to work. |
@nvansluis,
As an experiment, can you try re-enabling your firewall but opening these two ports which are used by this application?
If this works, maybe we should work on a PR to make the error message tell exactly what's going on. |
@toddmo & @nvansluis & @stufisher - thanks for your research an posts. I think I have an firewall issue. Have SONOS Web up and running with docker-compose on Ubuntu, as long as my firewall is disabled.
My Docker Compose file is:
Enabling the firewall results in this error:
My Ubuntu machine has firewall ports 5050 and 5051 opened:
|
I made progress in getting my sonos-web server to start, by installing with docker.
I successfully pulled the docker image and ran it, but I got the error:
toddmo@machine:~$ sudo docker run sonosweb/sonos-web
Server listening on port 5050
/sonos-web/server/src/sonos/MusicLibrary.js:14
if (!this.sonos) { throw new Error(NotASonosDevice); }
^
Error: Not A Sonos Device
at new MusicLibrary (/sonos-web/server/src/sonos/MusicLibrary.js:14:30)
at /sonos-web/server/src/sonos/SonosNetwork.js:51:29
at processTicksAndRejections (node:internal/process/task_queues:96:5)
My Sonos is a version 1 and I am currently using the Sonos S1 android app to control it. I'm also controlling it via the Sonos API, so I can't see any reason why this or any other library would not be compatible with Sonos S1 devices. Hopefully it's an issue not related to the hardware version, and which can be fixed.
The text was updated successfully, but these errors were encountered: