Can you send a text from OH to Alexa?

I am using OH4.1.1 on a windows 11 machine. I connected Alexa to OH and it is possible to turn on/off light sources.

Now I am wondering if it is possible that you can ask Alexa about a state of an item. For example: “Is the door open?”

Is it also possible to receive from OH a text (string) which you send to Alexa? For example when Alexa turn on a light (switch) it say something like “temperature is …” (can be any string you send from OH).

Thanks

Not out of the box but there is/was a skill that could sort of do this

https://www.amazon.de/Emil-Thies-Text-Nachricht/dp/B07FDHWT6K

However…

  • The reviews don’t look good. It seems that the service has some bigger downtimes
  • You don’t really know who is running this service so be careful with any sensitive information
  • Alexa will not only say your message but also tell you where the message is from which is a bit annoying for this use case: You: “Alexa what is the current temperature?” Alexa: “A new message from Text Message: 22 degrees Celsius.”

In addition to that you cannot use this via the Alexa binding but you need to use the http binding to post your text to the website where the service runs.

There is also this binding which appears to support text-to-speech

yes, that is possible.

Yes, e.g. use the amazonechocontrol binding for TTS ( text to speach ).
A rule could be setup to be triggered by a change of a light ( switch ). Then in rule that is triggered read out the temperature and use TTS to let Alexa say what you would like to.

Ok cool, I did not find this feature a couple of years ago or it simply wasn’t there yet :man_shrugging:

Amazing! Thanks for the replies!

everything is working except one thing:

You said “Then in rule that is triggered read out the temperature and use TTS to let Alexa say what you would like to.”

Could you explain in detail how to do that? I do have an item string (temperature) and also I can send via TTS a message (string) to Alexa. But how can I combine those two stings (temperature & any text) now?

Do you use DSL or which language do you use to create the script?

I am using DSL script

I just noticed that TTS does not work (anymore). Is there another way?

I just created a rule to test both.


rule "GetAndSayTemperature"
when Time cron "0/20 * * * * ?" //run every 20 seconds
then
        logInfo("TemperatureInTheOffice", "The office has " + PutYourTemperatureItemHere.state.toString )
        Echo_Plus_TTS.sendCommand( "The offcie has " + PutYourTemperatureItemHere.state.toString )
end

And this works. Every 20 seconds I get alexa telling me the temperature in the office.
Replace PutYourTemperatureItemHere with the related item name.
Replace Echo_Plus_TTS with your TTS item.

Thanks a lot - it works!

1 Like