Official Alexa Smart Home Skill for openHAB 2

I decided I had corrupted my install of openhab 2 enough so I re imaged my SD card and started over. I went through the whole setup again a couple of times just to cement it into my brain.
I have openhab 2 up and running and I have 3 Zwave lights and My Onkyo AVR under openhab control.
I have decided to try HUE emulation with Alexa and forget about the openhab cloud services for right now.
I am in the same spot where all the instructions I find direct me to add [switchable] tags to my home.items content but my Items file is empty.
Question:
I read that in the OH2 Paper UI there are no entries made in the config files that it is all done in an internal database. If I understand this correctly Items in the HOME.ITEMS and other configuration files are read into the database on Startup. Is that correct?
Question:
If I already have created items in the paper UI do I need to delete all the things/items I want to control with HUE Emulation and Alexa and create a
Home.Items file that will get read into the internal database upon startup? I am not quite sure how these correlate or interact with each other.
Thank You in advance for any advice you can offer.

Are you adding [switchable] or [“Switchable”] ?

Is there any chance that support for Canada will be added soon? We just got the Echo devices here officially but skills have to manually add support for Canadian English (It’s all the added 'Eh’s and 'Aboot’s)

1 Like

I̶ ̶k̶e̶e̶p̶ ̶g̶e̶t̶t̶i̶n̶g̶ ̶a̶ ̶5̶0̶4̶ ̶r̶e̶s̶p̶o̶n̶s̶e̶ ̶c̶o̶d̶e̶ ̶w̶h̶e̶n̶ ̶t̶r̶y̶i̶n̶g̶ ̶t̶h̶i̶s̶ ̶m̶e̶t̶h̶o̶d̶ ̶u̶s̶i̶n̶g̶ ̶m̶y̶o̶p̶e̶n̶H̶A̶B̶ ̶f̶r̶o̶m̶ ̶a̶ ̶s̶e̶p̶a̶r̶a̶t̶e̶ ̶l̶o̶c̶a̶t̶i̶o̶n̶ ̶(̶i̶.̶e̶.̶ ̶f̶r̶o̶m̶ ̶w̶o̶r̶k̶)̶.̶ ̶S̶h̶o̶u̶l̶d̶ ̶I̶ ̶t̶r̶y̶ ̶i̶t̶ ̶a̶g̶a̶i̶n̶ ̶o̶n̶c̶e̶ ̶I̶’̶m̶ ̶b̶a̶c̶k̶ ̶o̶n̶ ̶m̶y̶ ̶h̶o̶m̶e̶ ̶n̶e̶t̶w̶o̶r̶k̶?̶

NVM, I was trying to change settings in REST API remotely using myopenHAB, you most port into the device on the local network.

Actually I have not created an Items file yet so my syntax has not entered into the picture. So it is a typical Linux case sensitive syntax I should be aware of when creating this file…
I am trying to figure out if I need to delete everything I created in PaperUI and add them through configuration files and let OH2 add them to the database OR if I can make this work using the PaperUI and I am missing some other step like editing the Database files directly (no idea how).
Sorry if I am being stupid and missing the obvious but I am actually trying to understand the systems

As far as I know you still can’t “tag” items via Paper UI which means any Alexa items need to be created via text files.

Whether you need to delete everything and start again depends on a few things like do you want to publish all your items to Alexa or just a handful? You can have text based items and PaperUI side by side.

As far as moving to text files goes give these threads a read:

Second one goes a little off track maybe but still has many useful suggestions and tips in it.

1 Like

RayMYP You are my HERO!!! I have been struggling with this question for over a week trying to figure out why I could not get this to work. Reading until my eyes bleed has just introduced all sorts of misnomers and doubts as its very hard to discern between posts for different versions of Openhab as well as using the cloud based stuff vs HEU emulation. I have been a Wide Area Systems Administrator for 25 years and doing some forms of home automation for about that long also. The Pi3 and Openhab are my retirement project and I am determined to get a handle on it.
I thought the Home.items file was the key but I tried creating one and Alexa could find the items but Openhab 2 could not control them. I am sure it was a syntax error on my behalf but I wanted assurance that I was on the right track.
I only have 3 Zwave switches/dimmers and I am waiting for a new Zwave/ZigBee controller that is supposed to be here tomorrow and My Oknyo 717 under Openhab control so far.
I will go back and delete all my items and things and recreate them in Configuration files.
Again THANK YOU for the support…

1 Like

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?