-
Notifications
You must be signed in to change notification settings - Fork 26
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
Getting currently playing on a group/room #61
Comments
Look at groups.py in SoCo. This allows you to find the marster of any group - documentation in the code.
Have fun, Cheers Daivd |
Hi @DPH, I guess the question was can you do this with the current |
Hi @marcaddeo, Sorry I don't know for sure |
@marcaddeo socos currently uses SoCo version 0.8 and from what I can see in the release notes: http://docs.python-soco.com/en/latest/releases/0.8.html the group functionality was luckily introduced in just that version, so I think all the pieces should be in place for it. So if you want to give it a shot, go crazy ;) |
The 'requires_coordinator' https://github.com/SoCo/socos/blob/master/socos/utils.py#L42 already takes care of this for some specific functions. |
@petteraas ah yeah. I had forgotten about that one. Re-reading the code (that I think I wrote some of) I see that the add_command decorator uses that function and that the methods that gets the current track info is marked as requiring coordinator. This should mean that the command is automatically called on the coordinator/master. I did a quick test, and indeed it does seem to do just that. So @marcaddeo I guess the answer is that 'yes' socos master should already implement that. Please give it a try and see if it works for you. |
When I have multiple Sonos grouped together, there's no way for me to tell which one to poll to get the currently playing. You have to poll the master.
Is it possible to tell which device is the master of the room/group? That way I can then get the currently playing track from that device.
Or am I missing something super obvious?
The text was updated successfully, but these errors were encountered: