lukasroegner / homebridge-sonos-multiroom

Plugin for real Sonos multiroom experience in homebridge.
MIT License
35 stars 3 forks source link

Feature Request: add optional config parameter to only group zones with TV if toslinkConnected is true #24

Open rfiorentino1 opened 7 months ago

rfiorentino1 commented 7 months ago

Hi Lukas,

I know this may seem like an odd request, and not anything urgent but wanted to just document this/start the conversation here. I'd also be happy to play with it/modify the js and make a PR if I figure it out, if you can point me to where this logic would happen. I guess this is slightly related to #20, although not exactly the same.

Currently if a zone is playing TV, such as Living Room etc, Multiroom groups any other zone with it as expected. However, if that zone is still set to the TV input but the TV is actually off, Multiroom still sees that zone as a qualified priority, causing other zones to stop music and become silent when grouped together, because there is no actual TV playing. Could you make an optional checkbox in the UI so that multiroom can check if the tousling-connected parameter is true of the zone, and if so, group as normal. If it's false, and that zone's input is currently still set to TV, skip that zone in the priority list and go to the next one. Let me know if any of this needs further clarification, it's a little hard to put into words lol.

Best,

Rocco

lukasroegner commented 7 months ago

Hi Rocco, I would start with observing the on/off state of the Living Room switch (in the Home app) when you switch off the TV. Does the switch stay on? If that's the case, then the plugin does not recognize that there is no toslink signal. The next step would be to check whether the Sonos app still shows an active output.

You could also take a look at the documentation of the NPM package that this plugin uses for communication with the Sonos system: https://github.com/bencevans/node-sonos Maybe someone has had a similar issue and documented a solution in the issues.

rfiorentino1 commented 7 months ago

Well, crap...😂 I don't think the node Sonos plug-in has access to the TL connected state. Need to dig into it more though