Sonos Play Test and Restore - expected result

I'm using my Sonos devices to deliver TTS messages to some rooms. I thought "Play Text and Restore" would play a TTS message and then restore the song playing. However, I get mixed results.

First, it seems that a refresh is needed before "Play Text and Restore" is called. Otherwise, nothing resumes. It seems the refresh picks up the currently playing song/queue and resumes play (but see the next note).

Secondly, if I have a queue of 3 songs and the 2nd song is playing. Then a refresh is needed and then "Play Text and Restore" plays the TTS and then resumes the queue not the currently playing song. I would expect the currently playing song to resume and when the song is finished the rest of the queue would play as normal.

Seems like there's some bugs in the Sonos Integration. Or am I doing something wrong? Also is there a better Sonos Integration that others are using besides the built in Sonos Integration?

Thanks,
John

1 Like

Holy cow, your answer of issuing a "refresh" before 'play text and restore" is the answer I've been looking for for 1.5 years. Thanks shadowjig!!!

Really this needs a fix in the Hubitat code. To do the refresh before any "play/restore" functions are used.

Ok, this is just strange/frustrating, etc.

I tried the "Refresh" before "play text and restore" and nothing happened. The track was stuck on the TTS and sonos would not resume playing.

I put the "Refresh" after "play text and restore" and it worked (resumed playing and changed volume back to previous level that was playing before TTS)

Still, this seems to be hit or miss. It works 6 or 7 times out of 10 trys. Its more consistent when playing a playlist/queue than it is when playing a station, but honestly still not reliable enough, especially when your TTS resets volume to 80 for alarm message.

Thanks again for the clue on using "refresh" and I have no idea why it worked different for me (just glad something worked - sort-of)

I will continue to play with it and have actually put the refresh both before and after. Since its intermittent, I'm wondering if its a timing issue and need to add some sore of delay/pause???

If you have a moment it would be nice to see how you have your rule set up to see if there are other differences.

I also confirmed @shadowjig findings that If playing a "Playlist" prior to TTS message it jumps back to the beginning of the playlist instead of the song that was playing when the TTS played.
I also found that If playing a "Station" prior to TTS message, it will jump to the next song for that station when resuming. (although resuming after TTS when playing a station was the most unreliable)

Wow - didn't know about the "Refresh" requirement...updated my WebCore rules...we will see if this works.

There is not a "play text and restore" option on Rule Machine...unless I am missing it someplace.

Select Action Type "Control Music Player, Volume, Sounds", then Control Music Player, Select Your Sonos Device and "Play Text and Restore" is one of the commands, along with "Refresh"

Good Luck

I am in the new Rule Machine, and I do not get any "play text", "play text and restore", or refresh:

Download the Hubitat app