Official Alexa Smart Home Skill for openHAB 2

The onoff.map looks like this:

1=ON
0=OFF
ON=1
OFF=0

It works like a charm, however Alexa does not discover devices. As soon as I remove it, Alexa finds all my devices.
Removing [ “Switchable” ] does not change anything.

clarification: as soon as you remove the entire Switch item line or only the inbound configuration of the mqtt part?

1 Like

As soon as I remove the “<” in

Switch sHallway_en "Hallway" <dimmablelight> (gHallway, gLights) [ "Switchable" ] { mqtt=">[mosquitto:/sonoff_hallway/gpio/12:command:ON:0], >[mosquitto:/sonoff_hallway/gpio/12:command:OFF:1], <[mosquitto:/sonoff_hallway/button/state:state:MAP(onoff.map)]" }

So, when it looks like this

Switch sHallway_en "Hallway" <dimmablelight> (gHallway, gLights) [ "Switchable" ] { mqtt=">[mosquitto:/sonoff_hallway/gpio/12:command:ON:0], >[mosquitto:/sonoff_hallway/gpio/12:command:OFF:1], [mosquitto:/sonoff_hallway/button/state:state:MAP(onoff.map)]" }

Alexa is able to discover devices but the switch of course does not work properly anymore.

In theory:
this is an invalid configuration (without a direction for the 3rd config part)
this means that OH2 will disregard the entire line and throw an error in your log file (does it do that?)
Note: Maybe OH2 is parsing the file (top to bottom), getting stuck on this wrong config and doesn’t continue to load further the items file… so… maybe something else below this line is the real problem (maybe… :slight_smile:)

I don´t think it is something below that. As soon as I remove the inbound sign (<) or the entire line, Alexa discovers everything.

I can confirm this link is the answer to alexa discovering items! thanks again @Celaeno1

@Likonaus

By the way, is your mqtt command correct? Shouldn’t it be:

Switch sHallway_en "Hallway" <dimmablelight> (gHallway, gLights) [ "Switchable" ] { mqtt=">[mosquitto:/sonoff_hallway/gpio/12:command:ON:1], >[mosquitto:/sonoff_hallway/gpio/12:command:OFF:0], <[mosquitto:/sonoff_hallway/button/state:state:MAP(onoff.map)]" }

…and your icon = “dimmablelight”, but your command is ON/OFF. Maybe you need icon “light”?

Question: I use Alexa in german.

How do I tell Alexa in german: OFF, HEAT, COOL, AUTO, heat-cool.

I tried:

AUS = OFF, nothing happend
HEIZEN, HITZE, WARM, WAERME, WAERMER = HEAT, nothing happend
KUEHLEN, KUEHLER, KALT, KAELTE, = COOL, nothing happend
AUTO, AUTOMATISCH, AUTOMATIK = AUTO, → Alexa set Temperature to 1 (OK?? AUTO = 1 ??)

I also tried: BOOST, KOMFORT, MANUELL, MANU, ECO, ECONOMIE, MODE 0,1,2,3, MODUS 0,1,2,3: nothing happend

What do I have to tell Alexa in german? Are the english commands executed at all??

Or do I have to tell: 0,1,2,3 ??

Where do I get a complete list of ALL supported german commands of “Official Alexa Smart Home Skill for OH2”?

Is there also a complete list for english commands at all?

Thank you for pointing that out. I did that on purpose. Since I am a beginner, it was the easiest way to have the light in the switch itself illuminated when the lights are off. Thus, the switch can be seen in dark.

@Likonaus

Have you tried this? (without the spaces?)

Switch sHallway_en "Hallway" <dimmablelight> (gHallway, gLights) [ "Switchable" ] { mqtt=">[mosquitto:/sonoff_hallway/gpio/12:command:ON:0],>[mosquitto:/sonoff_hallway/gpio/12:command:OFF:1],<[mosquitto:/sonoff_hallway/button/state:state:MAP(onoff.map)]" }

I have tried this as well. Since I am mostly using the command line on my Raspberry to write code, I found out that if I write the MQTT code in the way I posted above, the code immediately following the MQTT line turns green which means it is kind of commented out. If I alter the order of the MQTT, then everything works fine. Here is the “new” code:

Switch sHallway_br "Hallway br" <dimmablelight> (gHallway, gLights) [ "Switchable" ] { mqtt="<[mosquitto:/sonoff_hallway/button/state:state:MAP(onoff.map)], >[mosquitto:/sonoff_hallway/gpio/12:command:ON:0], >[mosquitto:/sonoff_hallway/gpio/12:command:OFF:1]" }

Please observe the order of the “<” brackets. In previous post it was “>><”, now it is “<>>”.
Maybe the “<” bracket also serves as a kind of comment character like “//” or “//” ?

@andrey_kozhushkov

see here: [SOLVED] Complete list of ALL supported english/german voice commands of "Official Alexa Smart Home Skill for OH2"? - #6 by Celaeno1

1 Like

Yesterday I got an email from “Amazon Alexa Team” with this content:

“Introducing Entertainment Capabilities in Alexa Smart Home - New Device Controls for TVs, AV Receivers, and IR Hubs”

Will it soon be available for OH2 Alexa Skill, too? @digitaldan

Hi, I cannot get the temperatur of my livingroom out of alexa.
the items definition looks good for me
Number IstwertWohnzimmer "Wohnzimmertemperatur [%.1f °C]" <temperature> [ "CurrentTemperature" ] { knx="0/3/0" }
but i don’t get an answer for my question
"Alexa, wie ist die Wohnzimmertemperatur" (“Alexa, what is the livingroom temperature”).

Any other devices, except temperature devices work well.
Hope anybody can help me?

Looks like it is not yet supported in our country:

@sihui @staehler67 It is supported in german !!! You need a group item.[ “Thermostat” ] and ALL three childtags. [ " TargetTemperature" ] [ “CurrentTemperature” ] and [ “homekit:HeatingCoolingMode” ]

see this example:

Group gDownstairsThermostat "Downstairs Thermostat" (gFF) [ "Thermostat","Fahrenheit" ]
Number DownstairsThermostatCurrentTemp "Downstairs Thermostat Current Temperature" (gDownstairsThermostat) [ "CurrentTemperature" ]
Number DownstairsThermostatTargetTemperature "Downstairs Thermostat Target Temperature" (gDownstairsThermostat) [ "TargetTemperature" ]
String DownstairsThermostatHeatingCoolingMode "Downstairs Thermostat Heating/Cooling Mode" (gDownstairsThermostat) [ "homekit:HeatingCoolingMode" ]

Then you have to tell in german: “Alexa, wie ist die Temperatur von “Your Groupname”? e.g. from above example “Alexa, wie ist die Temperatur von “Downstairs Thermostat”?

See here: complete list of all supported english german voice commands of official alexa smart home skill for oh2

and here: alexa smart home skill - no devices found - solution

and here: official alexa smart home skill for openhab 2

or here: homekit/readme.html

P.S: [ “Thermostat”,“Fahrenheit” ] only is needed when you don’t want to use Celsius. In Germany [ “Thermostat” ] only is needed!

4 Likes

Thanks for your hint, I’m going to try.

Than, I’m not able to ask for the temperature of my weatherstation,
right? Regarding to @dan explanation, it should be possible to ask for
temperatures without grouping a thermostat, but this might not work for
german language?

@staehler67

Maybe you can create a group with 2 “dummy” items:

Group gWetterstation "Wetterstation" (gFF) [ "Thermostat" ]
Number WetterstationCurrentTemp "Wetterstation IstTemperatur [%.1f °C]" (gWetterstation) [ "CurrentTemperature" ] { knx="0/3/0" }
Number WetterstationTargetTemperature "Wetterstation Dummy SollTemperatur" (gWetterstation) [ "TargetTemperature" ]
String WetterstationHeatingCoolingMode "Wetterstation Dummy Heating/Cooling Mode" (gWetterstation) [ "homekit:HeatingCoolingMode" ] 

Then ask Alexa: “Alexa wie ist die Temperatur von “Wetterstation”?”

EDIT: You will see this “OH2 item group” as only one device in Alexa-APP: --> named “Wetterstation” ! You can link it also to an Alexa-APP group, e.g. “Wohnzimmer”. Then just ask: "Alexa wie ist die Temperatur von “Wohnzimmer”?

I’ve also looked the new payload version 3 of Alexa skills. Would be a great feature to control my entertainment devices (like switching channels).

Yet, the capabilities are only available in US and in my opinion the documentation could be better.

I opened a ticket a few days ago for it, Entertainment Control Messages · Issue #40 · openhab/openhab-alexa · GitHub , we just need to figure out how we want to tag for it ( or something) . That is a bit stalled right now as our current tagging system is not adequate for this use case. I would very much like to add it as well.

1 Like