Echo Binding - Speak Values and turn off

Hi all,

I’m working with the Echo Binding a lot in the past days but two things I’m not able to get working.

I would like Alexa to tell me values inside a specific message I prepared. A event starts a rule in which alexa speaks a pre defined text and some of the words should be values of itmes.

Here is the rule:

    rule "Event auf Basis Rollläden Schlafzimmer"
    when
    	Item OG_Schlafzimmer_Rollladen_Position changed to 0
    then
    	if (ZSpeicher_Aufgestanden.state == OFF){
    	Echo_Schlafzimmer_TTS.sendCommand('Guten morgen. Draußen sind es -Aussentemperatur- Grad und heute ist -Tagesart-.')
    	sendCommand(ZSpeicher_Aufgestanden, ON)
    	}
    end

‘Aussentemperatur’ is a number item and ‘Tagesart’ is a string item.
Any chance to get openhab to integrate the current values and let alexa speak them.

I guess this is pretty easy but I dont find a solution for it.
I have a rule which starts tunein with a specific radio station in the kitchen when its a working day. Works perfectly fine. But I would like to switch alexa off as soon as I switch off the kitchen light. Of course I know how to do that basically but I don’t know which command I have to use to get alexa turned off.

Here are the rules and the current items I currently have for the echo in the kitchen.

Rule

    rule "Automatisches Küchenlicht Wochentags"
    when
    	Item EG_Flur_Licht_Treppenlicht changed to ON
    then
    	if (Daemmerung.state <= 250 && (Tagesart.state == "Wochentag" || Tagesart.state == "Homeoffice") && now.getHourOfDay >= 5 && now.getHourOfDay <= 8 && ZSpeicher_Kueche_Morgens.state == OFF){
    	sendCommand(EG_Kueche_Licht, ON)
        sendCommand(EG_Kueche_ArbeitsLicht, ON)
        sendCommand(EG_Esszimmer_Dose_Sideboard, ON)
    	Echo_Kueche_Musikanbieter.sendCommand('TUNEIN')
        Echo_Kueche_Musikbefehl.sendCommand('1LIVE')
    	sendCommand(ZSpeicher_Kueche_Morgens, ON)
        }
    end

Item

String          Echo_Kueche_TTS   "Text to Speech Küche"  (Alexa) {channel="amazonechocontrol:echo:account1:echo1:textToSpeech"}
String          Echo_Kueche_Befehl   "Text to Speech Küche"  (Alexa) {channel="amazonechocontrol:echo:account1:echo1:startCommand"}
String          Echo_Kueche_Player   "Text to Speech Küche"  (Alexa) {channel="amazonechocontrol:echo:account1:echo1:player"}
String          Echo_Kueche_Musikbefehl   "Text to Speech Küche"  (Alexa) {channel="amazonechocontrol:echo:account1:echo1:playMusicVoiceCommand"}
String          Echo_Kueche_Musikanbieter   "Text to Speech Küche"  (Alexa) {channel="amazonechocontrol:echo:account1:echo1:musicProviderId"}

Any Idea?

On 1
Create a big string out of the seperate strings before sending it to theTTS service.
On 2
I m using something like:

BadEcho_RadioStationID.sendCommand("")
BadEcho_Player.sendCommand(PAUSE)

Thanks for your answer. Will try 2.

But for 1 … to be honest… i don’t know what you mean. Thats exactly what i want to do. But I’m sturggeling to get the string value instead of the string name spoken out :frowning:

"Guten morgen. Draußen sind es" + Aussentemperatur.state.toString + "Grad und heute ist " Tagesart.state.toString

1 Like

Awesome! Works!
Thanks a lot