Official Alexa Smart Home Skill for openHAB 2

Here lately I’ve been getting a lot of “Hrrmm, [device] is not responding” from Alexa.

Whenever I try and access https://home.myopenhab.org/start/index, I get…

504 Gateway Time-out
nginx/1.10.0 (Ubuntu)

From reading the recent messages on this thread, it seems like this is a server / load issue with the myopenhab cloud.

Looks like some people have temporarily solved it by switching to Hue emulation and having Alexa talk directly to OH2 (bypassing the Alexa openHAB skill + myopenhab cloud). Unfortunately, it appears thermostats aren’t supported (a requirement for me).

Has anyone setup / deployed the openhab-alexa skill on a personal AWS instance connecting directly to OH2? I believe this would bypass the myopenhab cloud which would make it more reliable correct?

I think I’ll give it a try and document my findings.

I use the Rest-API for Tagging items, there is no need to create text files.

1 Like

Hi Matthew,
I have set up a private openHAB cloud instance and a custom Alexa skill last week. I’m runs perfectly :blush::+1:t5:

@Toddah @RayMYP There are two ways of tagging: I desrcibed it earlier here:

@Benji
Could you give some mor details what was necessary to change? I assume you have to change the openhab cloud url and deploy the skill to aws (or similar) ?

Could you please elaborate? What do you mean by “private openHAB cloud instance”?

He is speaking of this: Setup your own openhab-cloud (myopenhab) server/instance

Off course, I have installed a personal version of the myopenhab.org service running on a cheap VPS hosted in the cloud. This is where i connect my OH2 server to, and also the point of contact for the AWS Lambda Function I use for the Alexa Skill.
Link: setup-your-own-openhab-cloud-myopenhab-server-instance

Github Project

Hi Benji… Can you give a bit more info on how you’ve setup the Alexa skill… I have my own instance of openhab-cloud on a virtual server and a Node.js & WSGI server that I already host a couple of Alexa skills on but I’m struggling to see how I could host the OpenHAB Alexa skill myself.

Hi Mark, did you have a look at this Project? It gives you all the details, only thing is that you can only create API Version 2 skills with a little trick as described here.

Hi Michael,
I have the exact same question.Alexa skill for openhab 2 is great but from the point of user utility having timmer based commands integrated with regular on/off commands makes a lot more sence.I want to achieve the same. Do you have any idea how can this be done?

Hi… Yeah, I’ve seen that… Only problem for me is that’s still talking about hosting the skill on AWS as a Lambda and needing an OAUTH2 provider such as Amazon Login. Ideally, I’d like to host the skill on my own server.

It should not be that hard to build, rasa.ai can provide the NLP, I would still use hosted TTS and Speech to Text because the open source alternatives are just not there yet. The advantage of using rasa is that you could do a whole lot more then what Alexa allows you to do.

I configured Alexa on my OH v2.1 and its been running without issue for a few months. Since upgrading to v2.2 I’ve been having intermittent issues with Alexa saying device is not responding. If I check myopenhab it say my device is online. I can also for example switch the fan on from basic UI. If I check again later when it starts working again.

First any one else having Alexa issues since upgrading?
How do I go about troubleshooting this?

Mostly still the cloud which is overloaded. The Status page on the “online” indicator are not reliable. You should check you can reach paperui/habpanel through the dashboard of myopenhab to see if it is really online. Furthermore, even if there would be a problem with 2.2 the outages of the cloud would much more recognizable for you (based on my own experience how often it is offline or delayed).

Error: Could not inform the listener … about the ‘REMOVED’

Hi,
normally everything works fine: alexa skill + homekit…
But if I change the items file I’ll get the error:

Could not inform the listener 'org.openhab.io.homekit.internal.HomekitChangeListener@ada722' about the 'REMOVED' ....

I’ve double checked the items file.
It’s a very simple one:

Group gVoiceCommands "SprachKommandos"

Switch VoiceCommand_AlexaLoudspeaker "Lautsprecher" (gVoiceCommands) [ "Switchable" ]
...

So - does anyone have an idea?

By the way - I confused about using homekit or hue-emulation?

Can’t we make our own skill, which uses local connection? Just like Hue or Belkin did it? That would probably reduce the cloud load, as probably many people are going to use the local function instead. As far as i heard there’s almost no latency. Edit: Nevermind, not possible as those are builtin skills which can not be changed or extended.

Also splitting is possible, so you can use thermostats using myopenhab and hue for all the lights. That’s something someone should write down on how that’s done.

Are you saying it is possible to expose certain devices to only Hue emulation or the Alexa skill? As far as I was aware it wasn’t possible since they use the same HomKit tagging format. Until a new syntax is agreed upon to expose items to different services independently I didn’t think this was possible.

It would be great if it was. I would much rather use local control where possible.

No, but you can expose them at the same time. First do all the myopenhab stuff, that shouldn’t have an impact on the hue stuff, then disconnect from myopenhab and do the hue stuff, alexa won’t find any more myopenhab devices. Then just don’t ask her again to scan as that could cause problems. If I’m not mistaken that should work.

A little Offtopic: Do you know where the discussion is about how to handle the exposing stuff? I remember there was one about a year ago, can’t believe its still not clear what to do.

That sounds like too much work. Especially given how often I tend to break things. :sweat_smile:
With Alexa’s tendency to rediscover deleted items, I would be afraid that the work would be in vain anyway once you re enabled both Hue and Alexa.

I believe this was the original issue discussion. I could have sworn I saw an updated issue just the other day, but can’t for the life of me find it now.

I am trying to add a Switch to my items that is discoverable by Alexa

item
Switch Fan_Control “House Fan” (gHVAC) [“Lighting”]

rest

{“link”:“http://192.168.0.0/rest/items/Fan_Control",“state”:“OFF”,“type”:“Switch”,“name”:“Fan_Control”,“label”:"House Fan”,“category”:“light”,“tags”:[“Lighting”],“groupNames”:[“gHVAC”]}

I also tried having a “Switchable” tag to no avail

The only items with Tags have labels

Any ideas what I am doing wrong?

and on a second question, I have my bindings updated via apt-get
Maybe I need to pull newer bindings from git?

Tom