Skip to content

Shortest way to get all "Playing" Groups #141

Answered by hklages
jnbht asked this question in Q&A
Discussion options

You must be logged in to vote

No - there is no special solution for that. Your for-loop or split/join is a good approach. You have to check all players with index 0 in group - they are the coordinators.

Another option would be to use the sister package node-red-contrib-sonos-events and subscribe to all coordinators with AVTransport, playbackstate, store for each one the playback state in a global variable. Then you only have to check this variable. Thats maybe the fastest method. Group changes you may monitor with Zongroup event.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jnbht
Comment options

Answer selected by jnbht
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants