-
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Description
I’m having trouble achieving a basic Sonos workflow. My goal is to:
- Activate Sonos.
- Group players into a defined group using
groupPlayers(). - Play a favorite using
loadFavorite(). - Set the volume to a default level.
The players always group correctly, but the loadFavorite() call works inconsistently. Sometimes the favorite does not play at all, even when I ensure the coordinator is used.
What I've Tried
1. groupPlayers() First, Then loadFavorite():
- I ensured the coordinator player was used for
loadFavorite(). - This approach never worked, even after:
- Adding delays after
groupPlayers(). - Triggering on the group player attribute when the switch is set to
on.
- Adding delays after
2. loadFavorite() First, Then groupPlayers():
- This method was slightly more reliable, but the success rate is still inconsistent.
3. Retry Mechanism:
- I added logic to:
- Wait 5 seconds.
- Check if the coordinator is playing.
- Retry
loadFavorite()if it isn’t.
- Even with this, the results are hit or miss, and I lack confidence in its reliability.
Expected Behavior
- Sonos activates.
- Players group into the defined configuration.
- The favorite reliably plays on the grouped players.
- Volume on my players sets to a default level.
Attached
I’ve included my latest Webcore code for reference. Any insights or recommendations to ensure a consistent and reliable workflow would be greatly appreciated.
Metadata
Metadata
Assignees
Labels
No labels
