Echo Speaks - setVolumeSpeakAndRestore help


#1

Hi folks,

I’m a bit clueless with webCoRE. I dabble but struggle with even the simplest of things.

I’m trying to set my Echo devices to announce when the Ring Doorbell is pushed.

I want to use the setVolumeSpeakAndRestore command.

I have figured that I need to use Parameters, the first one is an Integer (I think this sets the volume level), the second a string containing the message.

When I tried it like that it did increase the volume and it did speak the message. However, the volume did not restore to level 4 (40%). I then figured that I might need to add another parameter, I did that and it did reduce the volume to 4 (40%).

But, is there a way to restore it to the previous level. Say I have music on at 60%, the message comes out at 80% - how do I get the volume back to 60% or 40% or whatever it was before? Not a fixed all the time by a third parameter.

Cheers,

Rich


#2

I don’t think I’ve ever gotten that command to work. I messed with it for awhile a long time ago and gave up.

Probably better to just put these actions into the piston

WITH DEVICE
SET VOLUME=X
SAY “WHATEVER”
SET VOLUME=Y


#3

Yeah, that is what I’ve done.


#4

If you’re going between pistons, you could set up some global variables. I have a “Speaking” piston that I send almost all of my announcements to. Now, I haven’t done this myself, but I could set up a global that would carry over an integer for the volume to be played with the speaking piston (and have a designated volume level if the global doesn’t change.)

Right now, I set the alarmVolume of the echos I want to speak to 99. The Speaking piston looks for those and sends the message to those echos, and then sets the alarm back to 70.


#5

I believe the issue is with how the volume levels are set. The setVolumeSpeakAndRestore is using percentages while the Echo uses single digit representations. For example, ask Alexa what the current volume level is and she will respond with a value of 1 - 10. However, if you use 1-10 in setVolumeSpeakAndRestore, treats it as a % and sets the Echo volume to 1.

So what’s happening? Let’s say your Echo volume is set to 4 (40%). When you run something like

setVolumeSpeakAndRestore(100, 'This is a test');

it queries the current volume level and gets 4. It then sets the volume to 100%, speaks “This is a test” and then restores the volume to 4% (not level 4). It appears to be broken so for now, I just force it to level 4 with

setVolumeSpeakAndRestore(100, 'This is a test', 40);


#6

I have not used Echo Speaks yet, but I am curious…

Is “Set volume to 45%” louder than Alexa volume 4 and quieter that Alexa volume 5??

In other words, does “Set volume to 45%” actually equal Alexa volume “4 and a half”??


#7

How do you use your speaking piston, would you share it?


#8

Here is my random “Alexa Speaks” piston. Lots of random stuff but hopefully give you some ideas.

I am doing it all via my Amazon Echo device using the smartapp echo speaks.


#9

Sorry, haven’t been here in awhile.

This piston checks offline status, and then sends the volume command to particular echos.

And then here’s the speaking piston. If the volume is at 99, it will send the message to that echo. Otherwise, it sends it to the echo that was last spoken to.