Resume Sonos After Speech

Morning,

I'm trying to have sonos resume whatever it was playing after speech has happened. Currently once Hubitat has spoken on the sonos it just stops completely this is the rule I'm using

Speak on Bedroom Sonos: 'Motion Back Door'
IF (Sensor - Back Door active(F) [FALSE]) THEN
Speak on Bedroom Sonos, Kitchen Sonos: 'Motion Back Door'
ELSE-IF (Sensor - Drive Way active(F) [FALSE]) THEN
Notify Rob's iPhone and Speak on Bedroom Sonos, Kitchen Sonos: 'Motion Driveway'
END-IF

Any ideas?

anyone?

I'm not sure and don't think there is an easy way to do that, but I might have a solution:

Easy solution

If you always play 1 radio station or 1 service (spotify) you can add a rule to start that station/service after the speech.

Creative Solution

If you have multiple services/stations I guess you have to do something like this:
Make a rule for every station/service but with conditions:
Capability > Custom Attribute > Select Device: Sonos > TrackData > Comparison: = (equal) > Insert Text value.

I haven't tried that last option, but my idea is: based on the current Conditon of Sonos is EQUAL to the value (you put in) THEN speech and play station Xmusic.

Example

IF motion THEN speech + radiostation X
CONDITION "If station/service X is playing" > THEN speech > Then start station X

Add such a rule for every station/service you use:
"If station/service Z is playing" > THEN speech > Then start station Z

Hope this helps (because I might want to do this too in the future :stuck_out_tongue_closed_eyes:),
Goodluck!

Have you tried the "Play Text and Restore" command instead of just the "Speak" command? This isn't a pre-built action in Rule Machine, so you'll need to use the "Run Custom Action" feature to find this command. You can supply it a single string parameter, the text to speak (a second numeric parameter for volume is optional).

That being said, I'd try it from the device page first--you can run the command there, towards teh top. I'm hesitant because I've seen lots of people say they've tried this and it didn't work--basically the same as "Speak." I just deal with the fact that sometimes it stops what I'm doing. :slight_smile: It may depend on what you're playing, and the above may be a workaround if you have some sort of "normal" you can manually resume it to instead.

2 Likes

@ShadoW thanks for the ideas sadly it wont work as its random what i listen to.

@bertabcd1234 tried the play track and restore however it still stops it

I think its going to be easier to buy some echo dots and place these round the house as dedicated speech devices. Shame really as it would of been nice to use the sonos system i have in place currently

Iā€™ve tried the ā€œ ā€¦and Resumeā€ controls, both in Rule Machine and from the Device page. Both seem to work fine the first time itā€™s fired, but subsequent tries only speaks the text and then stops; it wonā€™t revert to the previous track/URI.

To get it to work again you have to manually play a track/station and then invoke the command from the Device page or trigger the rule, but it will only work once.

I have a number of different models of Sonos speakers in my home and have run into the same issue. The only speaker that seems to work as expected is my Arc SL on the family room TV. It dims the volume what is actively playing, does the speech then goes back to what it was doing. It's the only speaker that behaves that way, but I need all of them to do that.

My workaround has been the Aeotec Siren 6. Instead of doing speech, this device does 30 different musical sounds along with being a siren as well. I just have different chimes for when different events happen and use the siren functionality with Hubitat Home Monitor (Away Mode, Water Leaks, Fire, etc).

Siren 6 ā€“ Aeotec

Hi,

Did you have any luck with this?

I got it working for me here:

Sonos resume after TTS or Track play. ā€œWorkingā€