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
Sonos Component fails to restore if join group is the same as was already playing... #20861
Comments
Oh man, literally hours spent trying to work this out, finally, I solved an issue of this not being fully reproducible! It's very odd indeed. SO. If i use the above configuration, this works (restores 100%) This does not (100%) I have no idea, but something breaks when the speakers are in a specific order! |
GOT IT, finally after nearly 2 days! Basically, if the Master you set in join, is already master (i.e. top of the group in the Sonos app), it will not restore correctly. Now, how to fix this? |
For now, I've solved it via Node Red. Basically I check player attributes (sonos_group), I make sure my intended master isn't already master, if it is, I pick another before sending to my script. |
FYI, sometimes it still fails and I see this in the logs:
|
Urgh, still fails on me too often, too much time wasted on this - will seek an alternative output. |
Okay, I have a working fix with Node Red. Using the attributes of all the Sonos players, find the current master and ONLY save / restore the snapshot of it (no other speakers!). Seems to work perfectly. Note: If a speaker isn't part of the group but has the attribute of 'playing', I also include that entity in the TTS output (as we can assume it's not near other speakers or it would be grouped!). Hope this helps others. |
I think there is no easy way to fix this. Everybody wants to do different things and restore tries to be too smart. |
After a whole day of testing, I can confirm that Sonos component fails to restore the correct state (tested via scripts and Node Red!) if the original group is the same as the one specified in the script.
Examples:
If speaker 1, 2 and 3 are already playing, this fails:
If any other combination is playing before the script fires, it restores correctly, i.e.
speaker 1 and 2 are playing: works.
speaker 1 and 3 are playing: works.
speaker 1, 2 and 3 are playing: fails! (restores with random track, or fails to restore).
The text was updated successfully, but these errors were encountered: