Official Alexa Smart Home Skill for openHAB 2

Thanks for looking. I am using the alexa skill. Before I changed routers , I was having issues with the alexa ewelink skill as well. Alexa recognised the sonoff devices in the app but would not operate them. Also the ewelink app would turn devices on and off but not via a schedule. Having changed the router, these were resolved. Could it be I have a amazon issue rather than openhab.

Thanks

1st, you don‘t have to expose anything to myopenhab.
2nd there is a typo, Lighting is missing a capital L.

Not sure on this because I now use proxy-layering exclusively, BUT the tags like [“Switchable”] etc may have to come AFTER the channel descriptor when you have a unified .items file. Memory neuron-twitching that this was one of those “item-file parsing surprises”.

Thanks for your help. I’ll sort out the typo and try the tags at the end. Not home tonight so will try tomorrow. This I really frustrating me.
B

No, tags have to be written before channel config.

Correct. I was just remembering that there was some required order and got my memory inverted.

@digitaldan AFAIK the “Official Alexa Smart Home Skill for openHAB 2” still is using functions against “Amazon Smart Home Skill API” V2.

See here: oh2.js

In Sept. 2017 Amazon released a new version of their “Amazon Smart Home Skill API” V3 !

There are many changes, see this overview:

|--------------------------------------------------------------------------------------------------------------------------------------------|
| OH2 Skill (currently implemented)             | Amazon Smart Home Skill API V2                |    new Amazon Smart Home Skill API V3      |
|_______________________________________________|_______________________________________________|____________________________________________|
| 'TurnOnRequest'                               | turnOn                                        |       PowerController                      |
| 'TurnOffRequest'                              | turnOff                                       |       PowerController                      |
------------------------------------------------+-----------------------------------------------+--------------------------------------------|
| 'GetTemperatureReadingRequest'                | getTemperatureReading                         |       Alexa.TemperatureSensor              |
| 'GetTargetTemperatureRequest'                 | getTargetTemperature                          |       Alexa.TemperatureSensor              |
------------------------------------------------+-----------------------------------------------+--------------------------------------------|
| 'SetTargetTemperatureRequest'                 | setTargetTemperature                          |       Alexa.ThermostatController           |
| 'IncrementTargetTemperatureRequest'           | incrementTargetTemperature                    |       Alexa.ThermostatController           |
| 'DecrementTargetTemperatureRequest'           | decrementTargetTemperature                    |       Alexa.ThermostatController           |
------------------------------------------------+-----------------------------------------------+--------------------------------------------|
|                                               | setPercentage       (light, dimmer, generic)  |       Alexa.BrightnessController  (light)  |
|                                               | incrementPercentage (light, dimmer, generic)  |       Alexa.BrightnessController  (light)  |
|                                               | decrementPercentage (light, dimmer, generic)  |       Alexa.BrightnessController  (light)  |
| 'SetPercentageRequest'                        | setPercentage       (light, dimmer, generic)  |       Alexa.PowerLevelController  (dimmer) |
| 'IncrementPercentageRequest'                  | incrementPercentage (light, dimmer, generic)  |       Alexa.PowerLevelController  (dimmer) |
| 'DecrementPercentageRequest'                  | decrementPercentage (light, dimmer, generic)  |       Alexa.PowerLevelController  (dimmer) |
|                                               | setPercentage       (light, dimmer, generic)  |       Alexa.PercentageController  (generic)|
|                                               | incrementPercentage (light, dimmer, generic)  |       Alexa.PercentageController  (generic)|
|                                               | decrementPercentage (light, dimmer, generic)	|       Alexa.PercentageController  (generic)|
------------------------------------------------+-----------------------------------------------+--------------------------------------------|
| 'SetColorRequest'                             | setColor                                      |       Alexa.ColorController                |
------------------------------------------------+-----------------------------------------------+--------------------------------------------|
| 'GetLockStateRequest'                         | getLockState                                  |       Alexa.LockController                 |
| 'SetLockStateRequest'                         | setLockState                                  |       Alexa.LockController                 |
------------------------------------------------+-----------------------------------------------+--------------------------------------------|
| not available                                 | decrementColorTemperature                     |       Alexa.ColorTemperatureController     |
| not available                                 | incrementColorTemperature                     |       Alexa.ColorTemperatureController     |
| not available                                 | setColorTemperature                           |       Alexa.ColorTemperatureController     |
------------------------------------------------+-----------------------------------------------+--------------------------------------------|
| not available                                 | turnOn (scene)                                |       Alexa.SceneController                |
| not available                                 | turnOff (scene)                               |       Alexa.SceneController                |
------------------------------------------------+-----------------------------------------------+--------------------------------------------|
| not available                                 | retrieveCameraStreamUri                       |       Alexa.CameraStreamController         |
|-----------------------------------------------+-----------------------------------------------+--------------------------------------------|

How long will V2 be supported? Are you planing to migrate to V3?

See also here: link

EDIT (here is the answer!): FYI

1 Like

This feature/enhancement seems to be the most exciting to me.

How would this be implemented in a Rule? Would the “command location” need to be passed in? Or created specific dummy items for each location? Seems like it would need to enhance the rule engine.

There’s a few different ways to do it. You shouldn’t need a rule. The way I understand it, you put an Echo into a group (in the Alexa app) with the devices in the same location, the kitchen for example. Then instead of saying “turn on the kitchen lights” you can just say “turn on the lights” and it will know based on the group membership that you are talking about the kitchen lights.

So you can either put all of the particular devices in the Alexa group, or if you have your items grouped in OH you could create a proxy item that acts on the group and put that one item in the Alexa group.

I tried that, but I have not found any setting that lets you put a specific echo device into a group in the Alexa settings.

Has anyone figured this out?

The feature hasn’t been released yet. It’s supposed to drop this month, but we will see.

1 Like

Can’t get Alexa skill to find a simple zwave switch created in .items. Homekit is able to find it so the tags are working fine. Any suggestions?

@ChaseRox maybe this could help: Alexa Smart Home Skill - No devices found - Solution

I think, as someone else has suggested earlier, the ability to identify which binding is permitted to use (eg: is discoverable) the tags , would be a great addition, since many of us seem to run both hue emulation and echo binding. Eg: [“switchable:hue”] or [“switchable:echo”] or perhaps for multiple discovery [“switchable:hue,echo”] or a similar format.

For the most part, I want to use hue emulation and have Alexa discover the hue emulated devices too, but with some items I’d prefer Alexa binding native support only, like the temperature control tags.

The skill is not available in the app store for india. When checking online, it says “
You are not eligible to enable this skill due to geographical restrictions.”

Is there any other way for me to get it?

Thanks!

even im facing the same issue,fix it soon

Should be available soon, I guess:

OK using the new Routines option I can finally say “Alexa Goodnight” and then based on that command I can then set a switch (or group or multiple switches) on or off. I think this gives ultimate flexibility as I can still use OH interfaces to “turn off the house” as the proxy I use is called “the house”, or even voice command this the same as before.

Only thing I think is missing is the voice response from Alexa - I say " Alexa - Goodnight" and she replies “OK” - a bit of a cold response from her I think - would be great if the Routine supported a voice response - then you could have some fun with that:

I say - "Alexa - Goodnight"
She Replies - “Goodnight you sexy beast”

Its a pity that English(India) language is not supported due to which it is not possible to access the openHab skill in India yet. Hope we get to use the skill with our projects soon!

@Matt77 @Kanusel I’m have the same problem. I’ve just added my Thermostat as described. Alexa found the device after I asked her to find smart home devices. When I ask “Alexa, set the Lounge Thermostat to 21 degrees” she says “I’m not sure what went wrong”.

Interestingly this does not happen if I ask Alexa to increase or decrease the temperature rather than setting a specific temperature.

This is my configuration:

Group gLoungeThermostat "Lounge Thermostat" [ "Thermostat", "Centigrade" ]
Number thermostat_lounge_temperature "Lounge temperature [%.1f °C]" <temperature> (gPersistChange, gLoungeThermostat) [ "CurrentTemperature" ] {channel="zwave:device:15a8680e20e:node7:sensor_temperature"}
Number thermostat_lounge_setpoint "Lounge setpoint [%.1f °C]" <temperature> (gPersistChange, gLoungeThermostat) [ "TargetTemperature" ] {channel="zwave:device:15a8680e20e:node7:thermostat_setpoint_heating"}
Number thermostat_lounge_battery "Lounge battery [%f]" <temperature> (gPersistChange) {channel="zwave:device:15a8680e20e:node7:battery-level"}
String thermostat_lounge_cooling_mode "Lounge Thermostat Heating/Cooling Mode" (gLoungeThermostat) [ "homekit:HeatingCoolingMode" ]

The heating / cooling mode is a bit of a fudge, I don’t have any such thing. Could that be the issue?

Is it worth starting a thread for just this issue?