Official Alexa Smart Home Skill for openHAB 2

They show as offline in the Alexa app. When asking to “turn off the television”. She replies “hmm sorry the television is not responding”

I rebooted my Pi and they show as offline still but when commanding again it worked and then offline is not showing for that device on the Alexa app

@Andrew_Pawelski See this overview:
image

details see here: https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/overviews/understanding-the-smart-home-skill-api

Maybe your ‘internet connection’ is a bit slow or flapping!

Please also check: https://myopenhab.org/events

Did you also try (like in your example above: Turn on Kitchen Lights!), cause the device is NOT shown as “offline”? If so, is it running? And did you change any of your other item names or labels in OH2, and after this you also started the search in Alexa-APP again? What about clicking “Forget” all your OH2 devices and then “Search” them again?

did you get this working? im having the same issues.

@matt_shepherd @patrikpatrik2 I don’t use the LG-Binding, but I just read the documentation.

Please try the following:

Item:

Switch LgTvPower "TV" (GF_Living) [ "Switchable" ] {lgtv="ON:LGTV1:POWER, OFF:LGTV1:POWER"}

Sitemap:

Switch item=LgTvPower mappings=[ON="Power On",OFF="Power Off"]

Then your rule should be:

rule "LGTv Power received OFF "
  when
      Item LgTvPower changed from ON to OFF
  then
     {
     LED_Kitchen.sendCommand(OFF)
     Yamaha_Power.sendCommand(OFF)
     }
end

or better:

create a dummy item

items:

Switch LgTvPower "TV" (GF_Living) {lgtv="ON:LGTV1:POWER, OFF:LGTV1:POWER"} 
Switch TV_Alexa "Television" (GF_Living) [ "Switchable" ]

rule:

rule "TV Alexa"
when
	Item TV_Alexa received command
then
    switch (receivedCommand) 
	{ 
		case ON:	{
		sendCommand(LgTvPower, ON)
        sendCommand(LED_Kitchen, ON)
        sendCommand(Yamaha_Power, ON)
	    }
		case OFF:	{
		sendCommand(LgTvPower, OFF)
        sendCommand(LED_Kitchen, OFF)
        sendCommand(Yamaha_Power, OFF)
		}
	}
end

It sounds like there was some pretty big improvements to Alexa’s smart home capabilities announced along with the new devices.

Routines - Should allow for more natural speech. You should be able to say things like “Alexa, goodnight” instead of “turn on goodnight.”

Improvements to Groups - You will now be able to place Echo devices into groups with your smart devices so you can just say “turn on the lights” instead of having to specify a room.

New Smart Home API - Support for more functions, send messages directly from device cloud to Alexa without the need for the skill to be running in AWS, and Proactive State Updates. This makes it sound like you will be able to ask Alexa the state of more devices. At least, I hope that’s what it means.

Hi,

has anyone implemented the alexa smart home skill with his own hosted myopenhab-instance?
I tried it… But the install steps for creating a smart home skill and the lambda app are very short.
Is anyone in the position to give a more detailed manual?

Kind regards
Thomas

1 Like

Hi,

thanks for the answer.
I already have my own openhab-cloud. That’s all working fine…
But now I want to connect alexa with the openhab-skill (not the hue-emulation) to this instance and so I have to create the skill on my own.
(It is mentioned as “Next task” at the end of the tutorial)
Is there anyone, who already did this?

Kind regards
Thomas

Nice one. Thanks

@nasi_be No I didn’t, but you might see this link and this link and this link. Hope this helps.

1 Like

Hi,

when will the alexa skill support the new alexa api? on the link below?

now we can finally do multiple things for example alexa goodnight will turn of all lights and set the alarm and lock the door.

You don’t have to wait for a new api support, just create all the items you need in openHAB and group them together in the Alexa app (or browser version).

i want to for example make one scene “alexa goodnight” this should set the temperature to 18degrees, dim all lights to 40% lock the door
this can indeed be done with rules. But i prefer not to use rules and to make the grouping in alexa.

In case you fully rely on Alexa „scenes“ (multiple actions) wouldn‘t you then become fully dependent on Alexa and your Internet connection?
If you go with (local) rules then you can trigger them even without Internet connection being available e.g. via Smart Phone or physical Switch, etc.
At least this should be considered in terms of „unavailability“ of Internet connection.

Edit:
However, the nore natural commands are great to trigger rules. I also wonder if the echo plus as Smart Home Hub can be somehow inregrated with openhab, eg replacing Hue Bridge. But I doubt.

I alreay have a rule that does all the night time stuff and at the voice command is “Alexa turn off the house” the last part of the rule turns on the house dummy switch - feels more natural to ask for it to " turn off" as thats really whats haapening (tv, lights, A/C etc turn off), but like @wuytensp said, it would be great to have the skill allow more natural command such as “Alexa goodnight”

I think this is the main advantage. You can handle the “scenes” either way. By grouping devices in Alexa, or in OH to allow greater flexibility. The key is that if you have a “goodnight” switch in OH, you will be able to use more natural language. Just a matter of whether your Alexa group will contain individual devices, or a single one that kicks off the routine in OH.
In the latter case, I don’t think anything will need to be done from the skill perspective.

I haven’t found much as to when the new features are to be available. The Alexa app hasn’t been updated recently.

Hi Matt, i have the same problem. Did you get this fixed?

@Kanusel

unfortunately not. :frowning: i could not figure out what cause this strange behavior.

Hi, hoping someone can help me. I have openhab running on a raspberry pi and would like to enable Alexa. I have installed the binding and tagged my items, but alexa will not recognise them. I have changed my router due to issues with Sonoff not working correctly and hoped that it would also solve this issue but it didn’t. My items are:

//This is Items

Switch bedroom_lamp “Bedroom Lamp” <light_icon> [ “lighting” ] { channel=“zwave:device:08acef6d:node5” }

Switch garage-door “Garage Door” <blind_icon> [ “Switchable” ] { channel="zwave:device:08acef6d:node6}

Does this look okay. They both work via the android app and are both visable in myopenhab.

Thanks

Bryan

Looks OK - Did you go through this Official Alexa Smart Home Skill for openHAB 2