Official Alexa Smart Home Skill for openHAB 2

Hi,
I spoke with Amazon and they Said that is Supported.
And when You spell the command Alexa say: My Device is Not Supported for this Command.

@Rickecho Thank You!

I followed your instructions and tagged my device via the REST api/addon. Next, I went to alexa.amazon.com from my computer, went to Smart Home menu and discovered the device. Next, I created a group, “Kitchen” in my case, and added the device to the that group. Last, I say aloud “Alexa, set the kitchen lights to 50%”. It works! I’ll continue to play with it.

strange problem here,

everything was working some time back with my thermostats but when i tried to tell Alexa to change the temperature i got as a reply : "sorry something went wrong"
however the temperature got changed as ask.
im running on openHAB build 1032

Group S_LR_AC "Livingroom Thermostat"   ["Thermostat"] 

Number	S_LR_AC_T	"Livingroom Thermostat current" (S_LR_AC)   [ "CurrentTemperature" ]    {channel="zwave:device:15b94866380:node13:sensor_temperature"}
Number	S_LR_AC_SC	"Livingroom Thermostat target"  (S_LR_AC)   [ "TargetTemperature" ] {channel="zwave:device:15b94866380:node13:thermostat_setpoint_cooling"}
String  S_LR_AC_MO  "Livingroom Thermostat mode"    (S_LR_AC)   [ "homekit:HeatingCoolingMode" ]

Hi matt, that can happen if the command takes too long to return . Now ,
this could be myopenhab or it could be oh not returning from that command
in time . Does this happen consistently?

Hi Dan,
at the moment its happening every time, but only for the Thermostat tagging.
other things tagged as “Lightning” or “Switchable” are working without any issue.

also if i ask Alexa to change the temperature, thge same gets immediately changed in openHAB but still getting the “sorry something went wrong”

Given personal data security is somewhat important these days, is there any onformation on how the links between Amazon, myopenHAB.org and my local openhab server are secured? This skill is of great interest to me, but only if I can be sure the whole system is secure. Thanks

It’s not totally clear to me… What device name will alexa control and where is that name defined?

For example, I want to be able to tell alexa to pause what’s playing on the tv. I want to adjust the name of the"device" so it’s more natural of a command instead of “Alexa, turn tv mute on” or something of the nature. It’s awkward. It would be nice to just say “Alexa, mute the tv” or “Alexa, Pause the tv”.

Another example, Alexa, Turn “the kitchen lights” [OFF/ON]
Where is “the kitchen lights” defined?

tldr

  1. Where do you define the audible name of the device that Alexa will control? Is it the item label?
  2. Can the name be a string?

The Audible name of the device is defines in the item definition and there it is the label. Using your kitchen lights example it might be something like that:

Switch GF_KitchenLight_State "kitchen Lights" <light_icon> ["Switchable"]

Just typed it, there might be errors

Thomas

1 Like

Thanks for clarifying.

It seems like “TV” is reserved work/phrase with Alexa because that wasn’t very responsive. It also seems like articles can be used without including them in the label. In one case I chose to use “Television”. For example:

Switch Alexa_TV_Power "Television" ["Switchable"]

Verbal Command:

"Alexa, TURN(or SWITCH) (the(optional)) Televsion [ON/OFF]"

That’s ok. But for example, if I want to mute the TV, it becomes an awkward expression because “mute” is not a valid command for openhab/alexa. Or maybe it’s reserved for Alexa’s speaker?

Non-Intuitive Example:

 "Alexa, switch television mute ON"

Alternatively, I could say:

"Alexa, SET television volume mute to zero percent"

but, then I don’t know the last volume level amount to return to.

Maybe this is a limitation of Alexa and/or the binding, but I’m trying to find the most natural/intuitive expressions for Alexa.

how do we know when an upgrade of functionality is available?

i would love to have scenes in it. I now we can work with rules for example turn on watch tv and then a rule that dims the lights, puts on the tv, closes the curtains.

but in most domotica systems you could just send 1 Byte value and te scene is set.

is there a way to send values (bytes) to a knx installation?

I think Alexa has it’s own scenes, but I personally haven’t messed with them too much.

I’m not sure that’s how OH works. A “Scene” in OH, IMO, is just a set of devices and controlled by a a rule with some logic. Couldn’t you just create a dummy for item for Alexa such as “Theater Mode” and then tell alexa to switch Theater Mode On/Off. Then your OH rule will do what you want with the ON/OFF command.

Scenes are rules in OH. Since scenes are basically a set of presets for devices and rules are conditional if/then operations it puzzles me how they can be banded together.

Personally I think they should be different things. Maybe that’ll happen eventually.

Until scenes are officially supported no 3rd party app will recognise them.

Just prepare an item without channel binding, tag it as Switchable. Create a rule which triggers on that item and sets the “presets” as you like with the On command and sets default again with the Off command.

Other than the item and one if-condition you would need to do exactly the same if scenes were supported as objects. The benefit of Scene-objects tends against nothing.

That is my entire point, scenes should not be supported as objects, items, things or any other type of virtual device. Having a workaround does not constitute functionality in this case. Scenes, as defined everywhere else, are a set of presets for selected devices, triggered by activating the scene, not by turning any such scenes on or off.

If you don’t mind having to say ‘Trigger’ before the scene name with alexa, you can use IFTTT (it’s free) and simply make several applets to control each device using the same trigger word (controlling multiple devices with one trigger is not yet supported either, although a rule with a virtual device might be a workaround to this also).

hi!
What about implementing Alexa Notifications to the Openhab Skill?
https://developer.amazon.com/public/solutions/alexa/alexa-voice-service/reference/notifications-overview

It seems that there is a Method for it. As im not a dev, in my purple unicorn realm i would say:
what about setting this Method to that position, where openhab is sending a notification to myopenhab.org?
This way you dont need to rework the NotificationProcess.

Kind regards

You seem to be assigning overly specific meaning to certain words. An “object” is not necessarily a “virtual device”. Even in an OH context, even an “item” or “thing” doesn’t necessarily represent a virtual, proxy or real device. An OH Thing might represent a service, for example.

To me, “activating” or “deactivating” scene presets doesn’t seem much different than turning on and off the scene. Also, the presets don’t need to be for devices, at least not directly. The presets could configure services, for example.

The general pattern is that some event occurs (the scene is triggered by something), scene/presets are selected and sent to the specified targets (devices, services, etc.). There are various ways to implement this behavior. An OH rule can be used with a item (as an event conduit) to send the presets hard-coded in the body of the rule. Another approach would be to assign the scene name as an item state and, in the the rule body, look up the scene presets from some type of registry and then send the presets to the specified targets. There are other options, but these are implementation details.

From your perspective it must seem this way, being a maintainer affords you the luxury of seeing things from the OH standpoint, new users not afforded your experience might question why there are no scenes, and as such wonder how scenes will ever be available to 3rd party applications relying on the OH framework.

To my understanding, OH has 2 ways to control how things happen, set something On or Off, or set its Level.

On/Off operations I liken to switches.
Level operations I liken to sliders.
Scenes, on the other hand, I would liken to buttons.

Indeed, scenes are represented as buttons in most applications.

Take Siri, for example, if you add the ‘Goodnight’ scene, inside the Home app, and set the all your lights off, etc, Siri will run the scene if you say ‘Goodnight’ to it, as well as saying ‘Nighty Night’ (its standard response). I am sure many users would like to see this kind of thing with Alexa.

I do, however, agree that scenes could use the same body/code structure of rules, except using a different triggering process, this would be useful if you wanted a scene to behave different in certain scenarios.

Hi Dan,
i was wondering if you may have any other suggestions/ideas what could cause this “problem”.
till now i could not really find the root cause of it since in OH2 the thermostat gets changed but still getting the strange reply from Alexa.

Anyone else finding that the openHAB Alexa items seem to go offline often?

Hey @Andrew_Pawelski, could you rephrase that? I’m not seeing issues and technically Items can not “go offline”…