Official Alexa Smart Home Skill for openHAB 2

Same here …

Creating Alexa routines…I checked again today and now all the previously unsupported devices are supported; except my IP cameras. I didn’t change anything.

1 Like

I am trying to get the same working as you. Also in german.

This is my current item:

Rollershutter Wohnzimmerrollo "Wohnzimmerrollo" (gWZR) {alexa="RangeController.rangeValue" [category="INTERIOR_BLIND", friendlyNames="@Setting.Opening", supportedRange="0:100:10", unitOfMeasure="Percent", actionMappings="Close=100,Open=0,Lower=(+10),Raise=(-10)", stateMappings="Closed=100,Open=0:100"]}

Auf/zu/schließen/öffnen is working.
But the “hoch” and “runter” commands are not supported (that’s what alexa says). How do I get them to work ?

Bonus question: When I try to set a percentage then I get also the message that the command is not supported. What am I doing wrong?

doesn’t look right. Anything other than 100 should be ‘open’. So, like this,

stateMappings="Closed=100,Open=0:99"
1 Like

Thank you I made that change.
Any hints/tips how I could get the other functions working via Alexa ?

Apart from stopp it should work. I used category as exterior blind. Not sure if that could be the problem.

Stopp needs the group and modecontroller work around

I just tested it with setting as exterior blind but I get the same message from Alexa.
Any suggestions what I could try ?

Raise and Lower work for me. The only other difference from my item definition is that I don’t use the friendly names setting

Hello guys,

this is my current items file and everything is working perfectly execpt “Höher” (Raise) and “Tiefer” (Lower). It is inverted. (“Höher” and “Tiefer” are german words)

Group gWZR                   "Wohnzimmer Rollo"                {alexa="Endpoint.INTERIOR_BLIND"}

String Wohnzimmerrollo_stop   "Stopp"       (gWZR)  {alexa="ModeController.mode" [supportedModes="STOP=stopp,UP=0,DOWN=100", autoupdate="false"]}

Rollershutter Wohnzimmerrollo  "DummyName Rollo" (gWZR)  {alexa="RangeController.rangeValue" [category="INTERIOR_BLIND", friendlyNames="@Setting.Opening",supportedRange="0:100:10", unitOfMeasure="Percent", actionMappings="Close=100,Open=0,Lower=(+10),Raise=(-10)", stateMappings="Closed=100,Open=0:99", itemSensor="WohnzimmerrolloLinks_Position"]}

I tried both of these settings Lower=(+10),Raise=(-10) and Lower=(-10),Raise=(+10) already. It still does it inverted.
When I say tiefer (lower) it goes up and if I say höher (raise) it goes down.

Any suggestions on what to try ?

Hey, did you manage to find a solution for this?
I’m also looking for a solution to send TOGGLE command to OH item.

Hi @jeshab,

I am trying to get my garage door to open and close and report its state. I will add STOP later :wink:

I have a switch item that toggles the garage door opener in a sequence as follows : open, stop, close, stop, open, stop, close etc etc. ie what it actually does depends on the current state and previous direction. The switch is only ever on for 1 second.

I also have a seperate door sensor item that is ON=door closed, OFF=door open

I am trying to use the itemSensor to track the door status.
I have defined these two items. The garage door virtual switch does not toggle the door directly but triggers a rule which then checks my house alarm state before toggling the actual switch item.

Switch GarageDoorClosed_Sensor "Garage door sensor [MAP(GarageDoorPosition.map):%s]" <GarageDoor> {channel="openwebnet:bus_dry_contact_ir:gateway:xx:sensor"}

Switch GarageDoor_VirtualSwitch "Garage door [%s]" <garagedoor> {alexa="ToggleController.toggleState" [category="GARAGE_DOOR", itemSensor="GarageDoorClosed_Sensor", actionMappings="Close=ON,Open=ON", stateMappings="Closed=ON,Open=OFF", autoupdate="true"]}

In the documentation there is this sentance

It is important to note that sensor items need to be the same type than their parent item, except for LockController capable items. Additionally, since deferred reporting is not supported by the skill as of yet, their state will need to be available right away for the skill to report the device latest status.

The bit in bold doesn’t make sense. What should it say?

So far some progress:
If I ask Alexa to close or open the door she does although its only toggling the switch so the door direction depends on its initial state. If ask ‘Is the garage door open’ she responds as follows:

‘Garage door garage door is ON’ I am not sure why she does not say closed as per the stateMappings nor why she repeats the item name.

Maybe what I want is better achieved another way??? eg rules and more virtual items. I also have another sensor thats reports if the door is moving or not. So, I have all the information I need to perform a voice command for Open, Close and Stop command without needing to know the initial state myself.

If the Alexa-enabled item is a Switch, the associated item sensor must be a Switch as well. If your sensor was a Contact item instead, it would just be ignored by the skill.

For my understanding, the stateMappings configuration doesn’t seem to be used as of yet on the Alexa side. This is the same argument when you check the state in the Alexa app.

Unless I am missing something, it seems to me you got it covered. Is there a specific issue you are trying to resolve?

One comment I will make which I have seen you used before in your item definition examples is the use of autoupdate=true in the Alexa metadata parameter. The skill doesn’t support that parameter so there is no need to specify it. This is actually a separate metadata config and it defaults to true. If your intend to prevent the state of an Alexa-enabled from being reported, you can use the itemStateRetrievable=false metadata parameter or just set metadata autoupdate=false.

Thanks

OK I fixed the English grammer … bold bit above

re autoupdate… I tried both ways. Usually I ahve it as false for these kind of things.

Right but it cannot be an Alexa metadata parameter. Otherwise, it will be ignored.

Incorrect

Switch GarageDoor_VirtualSwitch "Garage door [%s]" <garagedoor> {alexa="ToggleController.toggleState" [category="GARAGE_DOOR", itemSensor="GarageDoorClosed_Sensor", actionMappings="Close=ON,Open=ON", stateMappings="Closed=ON,Open=OFF", autoupdate="true"]}

Correct

Switch GarageDoor_VirtualSwitch "Garage door [%s]" <garagedoor> {alexa="ToggleController.toggleState" [category="GARAGE_DOOR", itemSensor="GarageDoorClosed_Sensor", actionMappings="Close=ON,Open=ON", stateMappings="Closed=ON,Open=OFF"], autoupdate="true"}
1 Like

Yesterday I had a thermostat showing signs of life. I could ask for the thermostat temperature and get the correct value back. I made a few other changes. Unfortunately one of them had a syntax error. Since then I cannot get the thermostat to respond at all. I fixed the syntax errors in the .items file (back to the original working), deleted the device in the Alexa app, and discovered devices. Alexa found the thermostat, but says it is non-responsive. I see nothing in my log file. It’s almost as if Alexa got stuck with the bad syntax version and cached it somehow. What I can do to resolve this? Current Items:

Group  Thermostat    "Thermostat"                             {alexa="Endpoint.Thermostat"}
Number Temperature   "Temperature [%.0f °F]"   (Thermostat)   {alexa="TemperatureSensor.temperature" [scale="Fahrenheit"], http="<[tstat:600000:JSONPATH($.temp)]" }
Number CoolSetpoint  "Cool Setpoint [%.0f °F]" (Thermostat)   {alexa="ThermostatController.upperSetpoint" [scale="Fahrenheit"]}
Number HeatSetpoint  "Heat Setpoint [%.0f °F]" (Thermostat)   {alexa="ThermostatController.lowerSetpoint" [scale="Fahrenheit"]}
Number Mode          "Mode [%s]"               (Thermostat)   {alexa="ThermostatController.thermostatMode" [OFF=0,HEAT=1,COOL=2,AUTO=3]}

Did you go over the troubleshooting guide? My guess is that one of the thermostat items you updated doesn’t have a valid state.

If it’s not the case, please elaborate on what you mean by the thermostat is not responding? Are you requesting voice command? Are you looking at the Alexa app?

I was looking at the app and also requesting temperature by voice. Both said it was not responding/non-responsive. However, this was all solved once I did a command by voice. Then it could query temperature successfully. The temperature Item did have a value, but the set points were null. I don’t know if it didn’t like that, or it just needed a first command to get going. Anyway, problem solved. Thank you.

You just answered on the reason of your issue. null is not considered a valid state by the skill. All items part of a group endpoint need to have a valid state.

:+1:

1 Like

One further question on this. When does the Alexa learn about attributes such as the setpointRange? If I add that or change it, do I need to delete the thermostat in the Alexa app and rediscover it? Or is it read at run time?

You need to trigger a rediscovery after every configuration change you make on the OH side. No need to delete the device prior to that. In some cases when you drastically change the structure of a given endpoint, you may want to do so but generally it is not needed.