I'm trying to create a system that will shuffle a favorited playlist at command.
So far the flow looks somthing like this:
- /households/{household_id}/groups/createGroup
{'playerIds': [player_id]}
- /groups/{group_id}/favorites
{'playOnCompletion': True,
'favoriteId': album_id,
"playModes": {
"shuffle": True,
},
'queueAction': 'REPLACE'}
This however seems to only add the songs to the queue THEN shuffle, meaning that its hit or miss whether or not the next song is even from the correct album.
I have figured out that if I clear the queue manually first it works fine. I generally want the behavior of pressing shuffle in the sonos app, where it clears the queue and just plays what you just clicked.
Any ideas?
Solved! As it turns out, the sonos documentation is just plain wrong, instead of specifying a
queueAction, you need to specify anaction.For example instead of:
You would need:
It's pretty subtle but took me ages to solve.
Hope this helps somebody.