I have a welcome home message I have my Sonos say when certain individuals come home (presence).
What I’m trying to do. Let’s say the volume is set to 3 but when i send notices out, want to set it up to 5, and then back to it’s previous value of in the example 3.
var Number savedVolume = VolumeItem.state as Number
VolumeItem.sendCommand(5)
say("Say hello to my little friend!!")
createTimer.now.plusSeconds((5), [ |
VolumeItem.sendCommand(savedVolume)
])
Accordning to my experience with Sonos and the say command, the utilization of that command uses the “NotificationVolume” of the box you are sending the the command to. Each stream which is actually playing is stopped, the NotifciationVoume is set, the text is “said” and after the max time of (I guess) 20 seconds the original stream is resumed with its original (unchanged!) volume.
In other words, do nothing, it is working like you want it! Or better, send a big Thanks! to the developer (@Lolodomo)
Vincent, with what Jürgen said and not knowing if it’s setting the volume where I want it to, I think it says the phrase at the current volume, how would you put my item into your example?