Official Alexa Smart Home Skill for openHAB 2

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

Right, thats a better place to go. I have updated the original post. Thanks :slight_smile:

1 Like

This works great for me. Thank you.

As many others I’m waiting for support for rollershutter-items.
If I tag them as “Lighting” it works a little bit with quirky sentenses… What is your best practice for the moment?

And only the Label of the item is recognized as triggerword for alexa.
Is it possible to add different variations for a single item?
(In our house one person calls it “Library”, the other “Music Room” and the third says “Piano Room” for the same light.)

And last but not least: Is it possible to redirect Strings via Alexa to openHAB?
I would like to say “start scene decoration” and get ‘decoration’ as new state to an item.

Roller shutter support has been added, its just not deployed yet. I hope to push that out in the next few days after we get some usage on the code. This would work like a dimmer, so on/off, increase decrease, or set it to a percent like “Alexa set window to 80%”

No this is not possible with the Alexa Smart Home api, only off/on, +/-, % and temperature control.

2 Likes

As a workaround use a dimmer item and a rule:

items:

Rollershutter your_shutter_item ...
Dimmer your_shutter_item_Alexa "shutter" ["Lighting"]

rule:

rule "Shutter Alexa" 

when   
	Item your_shutter_item_Alexa received update
then
	your_shutter_item.sendCommand(your_shutter_item_Alexa.state.toString)
end
3 Likes

Please vote for rollershutter/blinds support in Alexa Smart Home Skills:

2 Likes

Finally!!! Giving it a shot soon, since it is a missing link up until now. Even my wife asked me a couple days why this isn’t possible… here we go!

At the moment the smart home commands are only remote-control-commands.
"Switch on light x"
I would like so see another kind of voice-commands like
"Switch off light x at midnight"
or
"Close roof-window in 20 minutes"
I think, it would be ok to use the alexa internal timer functions.
Is this combination of Alexa-functions possible or are the apis separated from each other?

Any hint why the command lasts so long from saying to doing? I say “Light Living Room Off” and about 1 minute later the light is off. But not always as it doesn’t seem to understand me all the time. With the hue emulation it worked better and about immediately.

And only the Label of the item is recognized as triggerword for alexa.
Is it possible to add different variations for a single item?
(In our house one person calls it “Library”, the other “Music Room” and the third says “Piano Room” for the same light.)

Yes, I’ve done this. Create an item for each name variant.

Switch  lamp1 "Music room lamp"  [ "Lighting" ]
Switch  lamp2 "Library lamp"  [ "Lighting" ]
Switch  lamp3 "Piano room lamp"  [ "Lighting" ]

Alexa will discover the three above.

and another item for the actual lamp:

Switch lamp "lamp" { .........}

Create a rule for each of the above so that when they change state, they turn the lamp item on and another rule to turn it off. Six rules in all. Here are the first two:

rule "lamp ON"

when
	Item  lamp1 changed from OFF to ON
then 
  	 	sendCommand(lamp, ON)
		
  	 
end

and

    rule "lamp OFF"

    when
    	Item  lamp1 changed from ON to OFF
    then 
      	 	sendCommand(lamp, OFF)
    		
 end

There’s probably a better way to do it though!

1 Like

Thanks, this works!

I’m not sure I understand the way Alexa recognizes devices. I’ve created item groups in the Alexa app for different rooms and added the corresponding light switches to each group. My Alexa is set to German, so something like “Wohnzimmer Licht an” works, while “Living room lights on” doesn’t. Also, I added a group “Aquarium” which contains a switched outlet controlling the light. All my items are tagged as “Lighting”. Unfortunately, it doesn’t recognize any commands regarding the aquarium…

Do I need groups, or can it go by the item labels displayed in the Alexa app? It doesn’t seem to recognize any of the (English) labels on my items.

Does Alexa only work with one language at a time?

Does Alexa only work with one language at a time?

Yes, that would appear to be the case. You need to chose on or the other.

Alexa isn’t finding my devices, which I’m sure is something I’m doing wrong.

I’ve installed the OpenHAB Cloud Service via PaperUI, signed up for and can see my items in myOpenHAB.org and have tagged an item as such:

Switch          onkyoPower      "Power"         { channel="onkyo:onkyoUnsupported:1bb0a221-68a2-21b9-e2ab-210968b961d8:zone1#power" } ["Lighting"]

Where have I gone wrong? Do I need the Homekit binding too?

EDIT: I moved my tag to before the thing {GUID} and that seemed to work. I confirmed that I could see the tags in the myOpenHAB rest test and they were discovered.

My girlfriend gave me a funny look when I started getting giddy as it worked

Try putting the tag before the binding information, that worked for me.

1 Like

That was exactly the issue :slight_smile:

1 Like