Speakers of Sonos group displayed seperatly
lucalewin opened this issue · 4 comments
I have multiple Sonos speakers. Two of them are in a group but both speakers are displayed on the UI. This makes sense because they are two physically separate devices. The problem is that when I select e.g. 'Speaker 1' the audio plays only on 'Speaker 1'. When I also select 'Speaker 2' the audio plays on both speakers. Now I stop streaming to both Speakers and then select 'Speaker 2'. Now the audio plays on both speakers except I only selected 'Speaker 2'.
I thought of a solution for this issue but there are some questions left:
The speakers could be grouped together in the UI. This could be done by comparing the names of all speakers. (Because they are in a group they both have the same name).
But:
- There could be another speaker which is not in the group but has the same name
- How does the program know which speaker is the 'parent' speaker?
- This could maybe be solved by playing the audio on all speakers in that group
Since I have no Sonos gear, and swyh-rs tries to avoid device-specific code as much as possible, I don't feel the need to add this kind of functionality. But this shouldn't stop you from making your own version of swyh-rs, one that is better suited to your needs (and perhaps to the needs of other Sonos users).
Okay, that makes sense.
I actually worked on a version of swyh specifically for Sonos (I called it Sonar). Your work here was the base and then I removed the UI, ssdp discovery, everything other than the wav format and completely remade the HTTP server. I did that trying to remove the ~500ms delay I mentioned here #91. Sadly it did not work.
Maybe I'll add a UI where I could then add the grouping functionality. Seems like a good idea
That is interesting. Thank you for the information. I think that I have to use some sort of Sonos library or check if the description.xml contains some information.