Feed openhab information into an Alexa Flash Briefing

I was trying to find some information on making a Flash Briefing for Alexa/Echo but controlling what she says from Openhab. For example:

My flash briefing would say what the weather is like, the current temperature, who is home etc. All of this is stored in my Openhab, and was wondering if anyone had done something like this and or had any examples of how to get started?

I already have my Echo talking to Openhab for via the offical skill for turning on the lights etc.

I think the Echo can be used as a sound sink. If that is the case, you should be able to send a command to OH that triggers a rule that uses say() to dictate your briefing.

I don’t do audio with OH nor do I use Alexa so can’t really help with the specifics, but that is how I would go about it given what I understand right now.

Its possible by writing your own Alexa skill.
There is a way to host your skill on your own server (see https://github.com/mikeflynn/go-alexa/tree/master/skillserver as an entry point).
Imagine the skill as a running process receiving the data through mqtt (the skill is a mqtt-client, which subscribed to the openhab mqtt-server for the data you are interested for).

1 Like

Nice find! Will give this a try, I was wondering if an API could be made for openhab that could simply be added to the feed configuration section in the flash briefing section.

If i build up a string in a rule, can I then simply access that value directly from the Openhab API?

If you postUpdate or sendCommand that String to a String Item then an HTTP GET to

https://home.myopenhab.org/rest/items/<Item name>/state

will return that String in the body of the response.

Perfect, thanks. I think that may do it! Will have a play tomorrow and let people know.

Note, that the URL above is going through an already logged in myopenhab.org account. You will probably want to replace the first part of your url with <address of OH server>:8080.