Official Alexa Smart Home Skill for openHAB 2

Works right out of the box!!! Thx a lot for this amazing new skill :heart_eyes:

2 Likes

Sure, just tag those On/Off switches with “Lighting” and you are good to go …

Any way to use this without myopenhab?

Can I add those tags to items created in PaperUI?

1 Like

Yes, the code is setup for self deployment, but this is very complicated due to the Alexa + oAuth + lambda environment. The Readme explains how to do this and references two Amazon docs which explain how to setup a Home Skill.

Unfortunately I don’t think the PaperUI has tag editing yet, but you can add tags via the rest api, goto the rest interface at http://yourhost:8080/doc/index.html and click on “items”, under that click on “PUT /items/{itemname}/tags/{tag}”, Enter the item name (case sensitive!) and tag name (also case sensitive!) and then click “try it out”.

5 Likes

I must be doing something wrong.

I enabled the Skill in the Alexa app and linked my myopenhab account. I also added [“Lighting”] to each of my lights in my items file and have those lights accessible in myopenhab as well but can’t seem to discover any devices.

sample of my items files

Color  FF_Light_FamilyLeft 			"Family Left"			(FF_Family, Lights, gdashboard)		["Lighting", "iss:room:FamilyRoom", "iss:type:DevRGBLight"]			{ channel="hue:0210:00178824e7e9:10:color" }
Color  FF_Light_FamilyRight 		"Family Right"			(FF_Family, Lights, gdashboard)		["Lighting", "iss:room:FamilyRoom", "iss:type:DevRGBLight"]			{ channel="hue:0210:00178824e7e9:11:color" }

I also tried with just [“Lighting”] removing the iss imperihome info but was also unable to discover them.

Any thoughts?

Also… on a side note. With already having Hue connected to Alexa, I assume you may end up with duplication and may need to decide what you want to include via the OpenHab skill vs the Hue Skill?

what is returned when you hit https://home.myopenhab.org/rest/items/FF_Light_FamilyLeft in your browser?

Yes, you will have multiple values, while you can delete those from the Alexa interface, I seem to remember they may get magically added back in due to automatic discovery.

Also I have noticed that if you have a large amount of items Alexa will say it does not find any, but if you go back to the Alexa app and look, it actually has found all of them.

This is what I get and I think its all looks correct?

{
  "link": "https://home.myopenhab.org/rest/items/FF_Light_FamilyLeft",
  "state": "82,55,100",
  "type": "Color",
  "name": "FF_Light_FamilyLeft",
  "label": "Family Left",
  "tags": [
    "Lighting",
    "iss:room:FamilyRoom",
    "iss:type:DevRGBLight"
  ],
  "groupNames": [
    "FF_Family",
    "Lights",
    "gdashboard"
  ]
}

Its a bug, I checked the code and we are adding Switch and Dimmer as accepted types but not Color. I just added https://github.com/openhab/openhab-alexa/issues/13

Ok.

I’m still struggling though. I’ve added [“Lighting”] to my remaining zwave switch light items and added them into myopenhab as well, but can’t find any devices in the app.

This is my Kitchen Light. Unsure if matters either, but I’m trying via an Android device. So unsure if anyone with IOS may see different results?

{
  "link": "https://home.myopenhab.org/rest/items/FF_Light_KitchenEating",
  "state": "ON",
  "type": "Switch",
  "name": "FF_Light_KitchenEating",
  "label": "Kitchen Eating",
  "tags": [
    "iss:type:DevSwitch",
    "Lighting",
    "iss:room:Kitchen"
  ],
  "groupNames": [
    "Lights"
  ]
}

I am still struggling with this “[ “Lighting” ]” notation.

I want to use the hue emulation side by side with the new alexa skill and would like to indicate which item should be handled by the hue emulation and which by the alexa smart home skill.

Is this possible?

Something like “[ “Lighting@hue” ]”.

1 Like

Thanks to the information in this thread setup was a breeze. This is awesome and your work is very much appreciated. This is much better than using IFTTT.

I’ll admit I didn’t fully read your first post and thought CurrentTemperature was a supported tag. Spent a bit of time confused, then ended up looking through the code and it appears that during discovery that tag is ignored. Was hoping I could ask Alexa the current temperature/humidity in different parts of my house. Is this something that is planned? I’m not familiar enough with Alexa and the API provided to understand the feasibility/scope of that work.

It’s not currently, but is something we should consider.

Unfortunately this is not supported using the current Home Skill API. If it does become possible I would love to add it.

I take that back, I guess Amazon added that into the API while we were in review ( 3 months!!!), this should be trivial to introduce, i’ll open a bug.

1 Like

This will make me very happy if it’s introduced. Being able to ask the house what temp various rooms are will make my wife happy when she’s worrying about the kids room temps.

The rest of this skill is fantastic to see and will certainly come in useful. Thanks for all the hard work.

FYI this looks to be US only, so we can put it in, but German and possibly UK users may have to wait until Amazon adds this update to their regions.

Or at the openHAB Documentation site:

http://docs.openhab.org/addons/io/homekit/readme.html