Missing volume control in "send or speak a message" action, Rule Machine and Button Controllers

I started moving my button rules from Rule Machine Legacy to Button Controllers, and noticed that I no longer can select the volume to speak on my Bose speakers. In Rule Machine Legacy:

In Rule Machine and Button Controllers:

I wonder if it might be an issue with the Bose speakers? I have tried it on my Google Home and Alexa and both give me a volume option…

Hmmm, I'll take a look. But it did work before so wondering why it wouldn't work now? Thanks for the info!

The device must support capability "Audio Volume" for RM to present the volume option. That may be missing from the driver.

Actually, looking into this a bit more, I think there is a bug in RM. It should not care about that capability.

Yes, the audio volume does seem to be the problem, I have another device that supports text to speech and the speaking failed because of not finding setVolume. The musicPlayer capability supports setLevel(volume) and playText(), and the speechSynthesis capability supports speak(text, volume, voice). I think I'll change to using the Bose speakers with the speechSynthesis capability, makes more sense. Thank you for looking into this, @bravenel! :grin:

There was a platform change made that added Volume as an optional parameter of the "speak" command to a speechSynthesis device. Also, RM uses the playTextAndRestore command for musicPlayer, and that command also has a volume parameter. RM is checking for the AudioVolume capability, but really shouldn't be. For speechSynthesis, it should just use that optional parameter to speak. I'm not sure about musicPlayer, because not all such devices support playTextAndRestore -- but RM is using playTextAndRestore with a volume parameter.

Meanwhile, you can always use customAction to get to the setLevel command of a musicPlayer separately if you need to.

My Bose driver is really simple, I just wanted to be able to send commands to my 3 speakers so I put in the AudioNotification, MusicPlayer and SpeechSynthesis capabilities, which includes the playTextAndRestore command from the AudioNotification capability. Every command in those 3 capabilities is supported and eventually sends the Bose command to play the text. That is probably why the driver has worked in the past. But playTextAndRestore isn't listed as a command in the MusicPlayer capability in the Driver Capability documentation. For now I'm just defaulting the volume to 50 in the driver if the volume comes in null.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.