-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Currently playing track stops when grouped #94
Comments
Not sure what you mean. Could you post a screenshot of the scene? Afaik, the order of characteristics in a scene is not defined, so it might be challenging to set the coordinator and join another zone player that coordinator it in a single scene. |
The Office Speakers are included twice? You haven't included setting the Power State of the Kitchen Sonos on? So if I understand correctly, the Kitchen Sonos was playing before you activate this scene, but stops when you activate it The Kitchen Sonos wasn't setup as Sonos Coordinator. What I think happens is that the speakers (incl. Kitchen) actually join the previous Sonos Coordinator which isn't playing anything. Or the other players don't join anything, because Kitchen is still, or has just become, a member of another group and because of that, cannot be joined. Or the Kitchen was a member of another zone, and stopped playing when it left that zone. Could you list a screenshot from the Rooms view in the Sonos app from before, and from after activating this scene? What version of homebridge-zp are you on? Do you see any http status 500 messages in the log when activating the scene? Can you run |
Office Speakers are there twice because there are two Sonos zones in there (two play 1s and a connect) - I did include Power State of Kitchen Sonos, but it made no difference, playback would stop. Correct - Kitchen Sonos was playing, when I run the above scene it stops, it seems that another Sonos may have been the coordinator and there is a race when the scene activates? Here is the before: And after: If I select the playing zone within the Sonos app and tell it to group "Everywhere" it continues to play. It is almost certainly a race condition that the grouping is done before the coordinator is set? I am on the latest - 1.0.7. Logs for Grouping scene: [7/31/2019, 12:52:26 PM] [ZP] Office Speakers: On changed from false to true
[7/31/2019, 12:52:26 PM] [ZP] Office Speakers: set On from false to true
[7/31/2019, 12:52:26 PM] [ZP] Kitchen Sonos Sonos: set Sonos Coordinator from true to false
[7/31/2019, 12:52:26 PM] [ZP] Office Sonos: set Sonos Coordinator from false to true
[7/31/2019, 12:52:26 PM] [ZP] Office Speakers: On changed from false to true
[7/31/2019, 12:52:26 PM] [ZP] Office Speakers: set On from false to true
[7/31/2019, 12:52:26 PM] [ZP] Living Room Speakers: On changed from false to true
[7/31/2019, 12:52:26 PM] [ZP] Living Room Speakers: set On from false to true
[7/31/2019, 12:52:26 PM] [ZP] Kitchen Sonos Speakers: On changed from false to true
[7/31/2019, 12:52:26 PM] [ZP] Kitchen Sonos Speakers: set On from false to true
[7/31/2019, 12:52:26 PM] [ZP] Kitchen Sonos Sonos: Sonos Coordinator changed from false to true
[7/31/2019, 12:52:26 PM] [ZP] Kitchen Sonos Sonos: set Sonos Coordinator from false to true
[7/31/2019, 12:52:26 PM] [ZP] Office Sonos: set Sonos Coordinator from true to false
[7/31/2019, 12:52:26 PM] [ZP] Living Room Sonos: set On from false to true
[7/31/2019, 12:52:26 PM] [ZP] Kitchen Sonos Sonos: set On from false to true
[7/31/2019, 12:52:26 PM] [ZP] Office Speakers: set On from true to false
[7/31/2019, 12:52:26 PM] [ZP] Office Speakers: set On from true to false
[7/31/2019, 12:52:26 PM] [ZP] Kitchen Sonos Sonos: set Sonos Coordinator from true to false
[7/31/2019, 12:52:26 PM] [ZP] Office Sonos: set Sonos Coordinator from false to true
[7/31/2019, 12:52:26 PM] [ZP] Office Speakers: set On from false to true
[7/31/2019, 12:52:26 PM] [ZP] Living Room Sonos: set Sonos Group from Living Room to Office
[7/31/2019, 12:52:26 PM] [ZP] Living Room Sonos: set On from true to false
[7/31/2019, 12:52:26 PM] [ZP] Living Room Sonos: set Volume from 28% to 100%
[7/31/2019, 12:52:26 PM] [ZP] Kitchen Sonos Sonos: set Sonos Group from Kitchen Sonos to Office
[7/31/2019, 12:52:26 PM] [ZP] Kitchen Sonos Sonos: set On from true to false
[7/31/2019, 12:52:26 PM] [ZP] Kitchen Sonos Sonos: set Volume from 36% to 100%
[7/31/2019, 12:52:26 PM] [ZP] Kitchen Sonos Sonos: set Track from Hybrid - Black Treacle (Summer Mixtape) to
[7/31/2019, 12:52:26 PM] [ZP] Office Sonos: set On from false to true
[7/31/2019, 12:52:27 PM] [ZP] Office Sonos: set Volume from 100% to 31%
[7/31/2019, 12:52:27 PM] [ZP] Kitchen Sonos Sonos: set Volume from 100% to 31%
[7/31/2019, 12:52:27 PM] [ZP] Living Room Sonos: set Volume from 100% to 31%
[7/31/2019, 12:52:27 PM] [ZP] Office Sonos: set On from true to false
[7/31/2019, 12:52:27 PM] [ZP] Office Sonos: set Volume from 29% to 31% Logs for ungrouping scene: [7/31/2019, 12:51:39 PM] [ZP] Office Speakers: On changed from true to false
[7/31/2019, 12:51:39 PM] [ZP] Office Speakers: set On from true to false
[7/31/2019, 12:51:39 PM] [ZP] Office Speakers: On changed from true to false
[7/31/2019, 12:51:39 PM] [ZP] Office Speakers: set On from true to false
[7/31/2019, 12:51:39 PM] [ZP] Kitchen Sonos Speakers: On changed from true to false
[7/31/2019, 12:51:39 PM] [ZP] Kitchen Sonos Speakers: set On from true to false
[7/31/2019, 12:51:39 PM] [ZP] Living Room Speakers: On changed from true to false
[7/31/2019, 12:51:39 PM] [ZP] Living Room Speakers: set On from true to false
[7/31/2019, 12:51:40 PM] [ZP] Office Speakers: warning: set On: timed out
[7/31/2019, 12:51:40 PM] [ZP] Office Speakers: warning: set On: timed out
[7/31/2019, 12:51:40 PM] [ZP] Kitchen Sonos Speakers: warning: set On: timed out
[7/31/2019, 12:51:40 PM] [ZP] Living Room Speakers: warning: set On: timed out
[7/31/2019, 12:51:47 PM] [ZP] Living Room Sonos: set On from true to false
[7/31/2019, 12:51:47 PM] [ZP] Living Room Sonos: set Track from Hybrid - Black Treacle (Summer Mixtape) to
[7/31/2019, 12:51:47 PM] [ZP] Office Sonos: set On from true to false
[7/31/2019, 12:51:47 PM] [ZP] Office Sonos: set Track from Hybrid - Black Treacle (Summer Mixtape) to
[7/31/2019, 12:51:47 PM] [ZP] Office Sonos: set On from true to false
[7/31/2019, 12:51:47 PM] [ZP] Office Sonos: set Track from Hybrid - Black Treacle (Summer Mixtape) to
[7/31/2019, 12:51:48 PM] [ZP] Office Sonos: set Sonos Group from Kitchen Sonos to Office
[7/31/2019, 12:51:48 PM] [ZP] Living Room Sonos: set Sonos Group from Kitchen Sonos to Living Room
[7/31/2019, 12:51:48 PM] [ZP] Office Sonos: set Sonos Group from Kitchen Sonos to Office
[7/31/2019, 12:51:50 PM] [ZP] Kitchen Sonos Sonos: set Volume from 31% to 36%
[7/31/2019, 12:51:50 PM] [ZP] Office Sonos: set Volume from 31% to 29%
[7/31/2019, 12:51:51 PM] [ZP] Living Room Sonos: set Volume from 31% to 28%
[7/31/2019, 12:51:51 PM] [ZP] Office Sonos: set Volume from 31% to 100% |
I didn't realise it was possible to have multiple zones with the same name. This will confuse the hell out of homebridge-zp, which registers zones under the zone name. It will take me some considerable effort to change that to registering zones under the id of the master zone player. Even then, the Homebridge log using zone names would continue to be confusing. For now, could you please change the name of the of the zones? Your screenshots looks very different from the Sosos app on my devices. Maybe because of SoundCloud? I expected to be able to see what zone was the coordinator after the scene, instead of just "Everywhere".
Yes. Looking at the log, the first Office Sonos steals the role of Sonos Coordinator from the Kitchen Sonos, when the Office Speakers is turned on.
Not sure why they don't simply join the Kitchen Sonos group, maybe the Kitchen Speakers are off? This shouldn't happen, the Speakers should be forced on when the zone player is Sonos Coordinator. Next, the Speakers for the other players, including Kitchen are turned on, and they join the Office group:
Next, the Kitchen Sonos Coordinator is switched on, and Kitchen takes over from Office:
I'm not sure what's happening next, I really need the
It would seem the Office Sonos has no current input selected, but is still On. Not sure how that's possible. However the Sonos Coordinator role is once again stolen from Kitchen. Not sure if this is by the first or second Office Sonos.
|
I've been doing some additional testing, but it would seem that the logic around joining and leaving zone groups has become too complex over the years, even for me. We started out with just using the I think it's time for a redesign:
With this design, it will no longer be possible for a coordinator to abandon the group to a new coordinator by clearing Normally, setting Doing some testing with Eve and with Matthias' Home app, it would seem that the characteristics are applied in the order in which the were added to the scene (even thought neither app shows the order). You might want to re-create you scene, making sure the |
Okay I did two things and one of them seems to have fixed it - recreated the scene adding the Coordinator service first, and secondly, not adding the Speaker Power on service for the Sonos I wanted to be the coordinator (in this case Kitchen). The music continued to play when executing the scene - so either it’s the order of adding the coordinator or not adding the speaker service for the target coordinator that made it work. |
Cool. I think it's the order, but as I mentioned above, there's something odd about how setting the speaker service on currently influences the target coordinator. |
Bug fix: - Logic around `SonosCoordinator`, see #94.
v1.0.8 should work according to the re-design in my post above. |
Installed 1.0.8 - so now if I create a scene, regardless of order we should be good to go? |
No, the order still matters, but setting the Speakers on will no longer change the sonos coordinator. |
When grouping zones with a scene by turning the speaker attribute to on the currently playing track is stopped.
This is the case when the scene specified that sonos as coordinator and when it wasn’t coordinator.
I seem to be unable to reliably get it to group and continue playing, like I can in the Sonos app - am I missing something?
The text was updated successfully, but these errors were encountered: