Sonos TTS for Alarm Alert- Kinda Lacking

What I'm trying to do is have my Sonos speak something if a contact sensor is triggered when my Hubitat is armed at night. I have this working but I'm unhappy with the lack of control of the volume.

In Rule machine I under "Audio Notifications" you can set the Sonos to do TTS.

Under "On this Speech Device" you can do TTS, but it makes the Sonos talk at whatever the volume level it was previously set on. Most of my rooms I would want to play this message has the volume set very low - so you wouldn't hear anything - or it wouldn't wake you up.

Under "on this music device" you can do TTS and actually set the volume level.

This is better but not great. If you have music playing at 15% volume and then do a TTS @ 60% volume, the music you were playing comes right back to 60% volume when the TTS is finished.
Also annoyingly the TTS Alert also becomes the last thing on the Sonos play list, so if you walk up to the Sonos and hit the play button it's not turning on your last radio station, it's playing that alert.

I didn't purchase the Sonos for this purpose, I already had it. I had looked at working with Amazon Echos, but the auth key is too much maintenance for me.. The Amazon device is awesome but I really dont like the thought of people listening in on me.

Maybe I should scrap the Sonos idea and use something else?

Have you looked into an App like Follow Me ?


It might do what you’re Looking for.

You can use the custom action to set the volume before the speak step of your rule.

Since I use a music device there's a field for volume. Are you choosing Speech Device by chance? you can use either if Sonos is a DLNA player.

Try selecting music device, you can do TTS on either. If that doesn't work then add the custom action to set the volume.

In a lot of our announcement rules where I have it at a loud volume. I also have it to lower the volume back down to 25%, about ten seconds after the announcement. A normal low volume to start with next time the speaker gets used. I also have it announce that it's resetting the volume to 25%.

I also have another rule at 5:30pm every day to reset all of the Sonos speaker to 25%, again just to have a low volume to start out next time one of them gets used.

Here's my approach.

I created three rules specific to alerts based on destination. One is for my mobile, one is for the whole house and one is just for the kitchen (see below):

The first line takes the current level of the Sonos and stores that into variable.
The second line speaks the text from variable (that variable is populated from whichever rule has fired).
The third line delay's the rule to make sure the message has finished.
The forth line resets the volume back to a pre-alert setting.
The fifth makes sure the Kitchen Sonos joins back into the group (only if you are running the API).

Here is an example rule using the above:

The third line loads the variable with the alerting text.
The sixth line runs the destination-based announcement rule (in this case, it is the kitchen).

47%20AM

1 Like