jishi / node-sonos-http-api

An HTTP API bridge for Sonos easing automation. Hostable on any node.js capable device, like a raspberry pi or similar.
http://jishi.github.io/node-sonos-http-api/
MIT License
1.84k stars 463 forks source link

sudden discovery issue #701

Closed snakescb closed 5 years ago

snakescb commented 5 years ago

Hi all,

worked flawless for months, and suddenly stop working this night. Tried to reinstall and troubleshoot with the logs, but I just cannot discover players anymore wihtout any obvious reason. Also I went through all the common resolution tips in issue 77 without success. iPhone App in the same WIFI works fine. Any idea what just happend? My ubuntu server made some updates this night, not sure if this changed something. Any Idea how to troubleshoot?

Regards, Christian

jishi commented 5 years ago

Can you give me the output of "ifconfig" to start with? Maybe that will explain something.

On Tue, 11 Jun 2019, 19:52 snakescb, notifications@github.com wrote:

Hi all,

worked flawless for months, and suddenly stop working this night. Tried to reinstall and troubleshoot with the logs, but I just cannot discover players anymore wihtout any obvious reason. Also I went through all the common resolution tips in issue 77 without success. iPhone App in the same WIFI works fine. Any idea what just happend? My ubuntu server made some updates this night, not sure if this changed something. Any Idea how to troubleshoot?

Regards, Christian

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jishi/node-sonos-http-api/issues/701?email_source=notifications&email_token=AAYE2I5RUGGHQOQWXF2Y3MLPZ7Q4ZA5CNFSM4HXBXB5KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GY4CHXQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYE2IYBZCF4Y3E27T7R523PZ7Q4ZANCNFSM4HXBXB5A .

snakescb commented 5 years ago

sure, thanks for answer. NW settings have not changed. The API is running on a Ubuntu 18.04 VM on VMWare with fixed IP address. Sonos players ares in a different VLAN, but everything works properly through igmp proxy and opened ports in firewall. The firewall log does not show any blocked traffic. Also, if I connect my iPhone to the same subnet as the ubuntu server, it can connect to the players without issue. Ah, and I also made sure the ubuntu firewall is not blocking anything here.

BTW, thanks for your great API! It is driving my full smarthome... so it became pretty important over the years ;-)

ens160: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.64.50.4 netmask 255.255.255.0 broadcast 10.64.50.255 inet6 fe80::20c:29ff:fe67:e801 prefixlen 64 scopeid 0x20 ether 00:0c:29:67:e8:01 txqueuelen 1000 (Ethernet) RX packets 54888 bytes 39637806 (39.6 MB) RX errors 0 dropped 9 overruns 0 frame 0 TX packets 48370 bytes 5623745 (5.6 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

jishi commented 5 years ago

Aha, so you have quite the unusual network setup. Is there any log for igmpproxy? I have never used it, but I'm assuming it forwards multicast traffic between the nets. It would be interesting to see the difference in logs between the iPhone connecting and when the api tries it.

Have you checked to see if your sonos system updated? Or the version of igmpproxy?

On Tue, 11 Jun 2019, 20:18 snakescb, notifications@github.com wrote:

sure, thanks for answer. NW settings have not changed. The API is running on a Ubuntu 18.04 VM on VMWare with fixed IP address. Sonos players ares in a different VLAN, but everything works properly through igmp proxy and opened ports in firewall. The firewall log does not show any blocked traffic. Also, if I connect my iPhone to the same subnet as the ubuntu server, it can connect to the players without issue. Ah, and I also made sure the ubuntu firewall is not blocking anything here.

BTW, thanks for your great API! It is driving my full smarthome... so it became pretty important over the years ;-)

ens160: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.64.50.4 netmask 255.255.255.0 broadcast 10.64.50.255 inet6 fe80::20c:29ff:fe67:e801 prefixlen 64 scopeid 0x20 ether 00:0c:29:67:e8:01 txqueuelen 1000 (Ethernet) RX packets 54888 bytes 39637806 (39.6 MB) RX errors 0 dropped 9 overruns 0 frame 0 TX packets 48370 bytes 5623745 (5.6 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jishi/node-sonos-http-api/issues/701?email_source=notifications&email_token=AAYE2I7PEVKNQ2ZNHEFVE3DPZ7T7DA5CNFSM4HXBXB5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXOBOQI#issuecomment-500963137, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYE2IZN4DMJEUNX4PGVVE3PZ7T7DANCNFSM4HXBXB5A .

snakescb commented 5 years ago

I will try to find if I can find logs on the router and paste them here if I can. For sure the router (and therefore the igmp proxy) did not upgrade recently. My Sonos Player is on 10.2 Build 50165071, not sure how to check if this has updated.

Also, I will put my players to the same subnet as the server, and let you know if it helps, just to make sure it is not related to a router issue.

Is there any way to check if the API is actually searching for players?

Cheers

jishi commented 5 years ago

If you can tcpdump udp traffic for Port 1900 you should see the discovery packets that the api is sending. They should contain the string "M-SEARCH" if I recall correctly, it's standard ssdp.

On Tue, 11 Jun 2019, 20:36 snakescb, notifications@github.com wrote:

I will try to find if I can find logs on the router and paste them here if I can. For sure the router (and therefore the igmp proxy) did not upgrade recently. My Sonos Player is on 10.2 Build 50165071, not sure how to check if this has updated.

Also, I will put my players to the same subnet as the server, and let you know if it helps, just to make sure it is not related to a router issue.

Is there any way to check if the API is actually searching for players?

Cheers

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jishi/node-sonos-http-api/issues/701?email_source=notifications&email_token=AAYE2I357Z5HXCUWWSNMUKLPZ7WBRA5CNFSM4HXBXB5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXODBFI#issuecomment-500969621, or mute the thread https://github.com/notifications/unsubscribe-auth/AAYE2I2325FS2A2VH4VMPCTPZ7WBRANCNFSM4HXBXB5A .

snakescb commented 5 years ago

ok... definitely turns out to be a router issue tough igmpproxy or the firewall are not reporting anything, and the iphone in the same wifi works... Sorry for bothering you... will investigate what is going on. But ingeneral: Controller and player in different subnets: it works... but is no fun...

CaseyRo commented 5 years ago

I got this working by manually updating the 'sonos-discovery' package in node_modules -- apparantly the --production install of the API installs v1.0.0 of the node-sonos-discovery package.

There must've been reasons for this, but it 'fixed' my setup, and instantly got me going again.