I’ve been working on optimizing the grouping of my Sonos players for announcements triggered by an Amazon Dash Button. The setup works, but the performance is quite slow, requiring a 30-second sleep delay. I tried using SaveAll and RestoreAll to save and restore the state of each player before and after grouping, but this approach didn’t work as expected. The Save command takes too long, and Restore often confuses the players, causing them to toggle on and off randomly. All other Sonos commands execute almost instantly, so this delay is particularly frustrating.
Here’s the rule I’m using:
plaintext
rule “Testruf - Amazon Dash Button Gilette”
when
Channel “amazondashbutton:dashbutton:ac-63-be-xx-yy-zz:press” triggered
then
gHome_sonos_Notificationsoundvolume.sendCommand(“60”)
gHome_sonos_Control.sendCommand(PAUSE)
gHome_sonos_Mute.sendCommand(“OFF”)
og_bue_sonos_StandAlone.sendCommand(ON)
og_bue_sonos_Add.sendCommand(“RINCON_YYYYYYYYYYYYYY1400”)
og_bue_sonos_Add.sendCommand(“RINCON_ZZZZZZZZZZZZZZ1400”)
og_bue_sonos_Add.sendCommand(“RINCON_AAAAAAAAAAAAAA1400”)
og_bue_sonos_Add.sendCommand(“RINCON_BBBBBBBBBBBBBB1400”)
og_bue_sonos_Add.sendCommand(“RINCON_CCCCCCCCCCCCCC1400”)
Thread::sleep(30000) // Time for proper grouping
say(“Das ist ein Test”,“voicerss:deDE”,“sonos:PLAY3:RINCON_XXXXXXXXXXXXXX1400”)
ug_jes_sonos_StandAlone.sendCommand(ON)
eg_kue_sonos_StandAlone.sendCommand(ON)
eg_wzi_sonos_StandAlone.sendCommand(ON)
og_bue_sonos_StandAlone.sendCommand(ON)
og_bad_sonos_StandAlone.sendCommand(ON)
dg_syd_sonos_StandAlone.sendCommand(ON)
end
I’d love to play a “gong” signal before the announcement to alert everyone. Additionally, I’d like to ensure that after ungrouping, each player resumes playing from where it left off. Any suggestions on how to improve the performance of grouping six players would be greatly appreciated!