I’m using Echo Binding to Control my different Amazon Echos in the house. Works fine but I’m not able to change the Volume with openhab. As, from my understanding, I did everything exactly like in the addon descrption
but it isn’t working.
I add items and rule with which Im currently testing the function. Maybe someone can tell me whats wrong.
rule "Echo Sprachausgabe"
when
Item Test_Schalter changed to ON
then
Echo_Buero_Volume.sendCommand(100)
Echo_Buero_TTS.sendCommand("Dies ist ein Test der Lautstärke")
sendCommand(Test_Schalter, OFF)
end
I thought I had found my mistake, but unfortunately I was wrong.
The Volume Item was string and not number. I changed it to number but its still not working.
sorry to get back to this but I was still not able to get it working and I dont have any ideas left.
I tried it as dimmer and as number item. I saw the format of the violume and changed my rule to that format. So instead of working with 10 / 50 / 100 is used 0.5 or 1.0 in my rules but it still doesnt change.
I really dont know what the problem. I guess a lot of people are using this feature so maybe someone can help.
I add the item with the popup showing its current value and my testrules.
rule "Testerei"
when
Item Test_Schalter changed to ON
then
Echo_Buero_Volume.sendCommand(1.0)
Echo_Buero_TTS.sendCommand('Test volle Lautstärke')
Test_Schalter.sendCommand(OFF)
end
rule "Testerei 2"
when
Item Test_Schalter2 changed to ON
then
Echo_Buero_Volume.sendCommand(0.5)
Echo_Buero_TTS.sendCommand('Test halbe Lautstärke')
Test_Schalter2.sendCommand(OFF)
end
var Number vol = Echo_Living_Room_Volume.state as Number
vol = vol + 7
logInfo(filename , "var Vol: " + vol.toString)
Echo_Living_Room_Volume.sendCommand(vol)
In OH3 it looks like this:
Item is still a “Dimmer”
Rule like this (javascript) to turn the vloume up:
Thanks a lot.
I had to change a bit but on this way it worked.
In the end the online difference is that I know transport the number into the item using a var instead of giving it directly… strange. But anyway it works and thats the important part