I have a rule in RM that will speak a message to my "music device" "Living Room Sonos" at volume set to 75. The message takes about 5 seconds to speak.
The problem I am having is that the speaker is not using the volume setting I've configured in the rule. It sounds like it uses it for the first milliseconds of the message but then reverts to the volume that the speaker was set to before the message started playing.
I have set this rule to repeat the message every 7 seconds and maybe every 10th time it plays the message at the requested volume.
Has anyone come across anything like this issue before?
You may want to put a slight delay in the "Speak on Sonos" actions. I've noticed that the joins sometimes take a few seconds to complete and that interferes with the volume. When I get home I'll post up a rule or two showing how I dealt with the delay.
If you have the app on your phone/tablet, you can watch the join and sort out the timing that way.
I always put a 1 second delay before I use any of my Sonos devices for TTS as it seems that a recent Sonos update has slowed down the volume commands. Typically, I set the volume, then delay 1 second, then send the TTS message. It sucks, but so far, I've not had any of the varying volume issues.
What really sucks though is that when doing TTS though apps (HSM, Notifier, 3rd party apps), there's virtually no way to accomplish this that I know of. I've only gotten it to work for custom drivers and RM rules.
Here is one of my Sonos alert rules. This rule is called by a few rules where I want an announcement in my kitchen. The first line captures the existing volume into a variable. The second speaks the contents of a variable filled by the calling rule at the assigned volume. (e.g. if a door is left open, that rule will populate the %alerts_text% with the message that the door is open). The third line just puts an entry in my logs. The forth one sets the volume back to the pre alert level. I put the delay as 5 seconds because that's the longest of any alerts that would use this rule. The 5 line uses the API to have the speaker rejoin an existing group.