jishi / node-sonos-discovery

Simplified framework for Sonos built on node.js
MIT License
146 stars 75 forks source link

sonos-ssdp: Fix discovery in my office #97

Closed magcius closed 7 years ago

magcius commented 7 years ago

For some reason, these changes are required to be able to connect to the office Sonos. Don't ask me why -- it was the effort of fiddling around until it worked.

jishi commented 7 years ago

That's an interesting find. I wasn't aware that the players would respond to broadcasts unless during a controller registration, but they have also changed that routine slightly in the last years.

I'll need to play around with it to see what difference this make. I'll probably need to do both in order to support all scenarios, but it could be part of the discovery cycle. I already cycle through some different approaches, this could be another one.

magcius commented 7 years ago

I could get you the model number of our Sonos devices if you want them...

jishi commented 7 years ago

I would actually be more interested in the network setup you are running, like firewall/router and wireless AP models, and if your computer or whatever you are running the software on is on the same IP range as your sonos players.

If possible, either way this sounds like a useful addition to the discovery flow.

magcius commented 7 years ago

I would have to ask our network administrator -- we have a bit of a fancy Cisco setup here internally.

jishi commented 7 years ago

I implemented a different approach with your changes incorporated. Since I don't want to stop use multicast (since some networks might rely on it) I instead alternate between the two which should give the same end result. Commited with 94504305526f70b88a38e0e57b5be897a2b376dd and part of v1.1.9. Gonna uppgrade the http api to that version as well.

Please test and see if it fixes stuff for you!

magcius commented 7 years ago

Works for me, thank you!