Official Alexa Smart Home Skill for openHAB 2

This is normal. Only the state of specific capabilities can be requested by voice. This is a limitation on the Alexa side. The response you are getting implies that restriction. However, even though you can’t get the current state by voice, you should still be able to get that information using the Alexa app.

Is there a list of these that can be requested by voice available somewhere?

thanks

To my knowledge, there is unfortunately no official list of supported commands provided by Amazon. You can google to find some of the most used examples that have been compiled by well known tech websites. You could also browse through the Alexa Smart Home Skill API documentation and look for utterance examples. Last, there is a voice examples section in the usage documentation that could use some user contributions :+1: Other than that, it’s mostly trial and error.

you should update to openhab 2.5. than you have to modify your configuration. I’m posting an example of my roller tag (tested just now). My shutter is open when is set to 0% and is closed when is set to 100%, so I had to invert the documentation’s example:
Documentation example:

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

My configuration:

{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=1,Open=0:100"]}
2 Likes

Certainly a good recommendation but not required based on what I mentioned above :smile:

Your action mappings look good but not your state ones. You are defining closed state as 1% and open state as a range from 0% to 100%. Obviously there is a conflit here although since it’s not really used on the Alexa side as of yet, it doesn’t affect your interaction. Anyway, here is how I would update your item definition:

{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"]}
1 Like

You made my day, actually I didn’t understand that part of configuration. What about "supportedRange=“0:100:10"” what’s the meaning 0:100:10?

supportedRange="<minValue:maxValue:precision>"

In other words, the minimum and maximum values that your item support mostly derived from the item type and the precision to use as default increment value when requesting increase/decrease commands. This isn’t used much in this case since you defined that value via the action mappings for lower/raise commands but the example just keep the consistency.

1 Like

Hi,

I have open, close, raise, and lower working with my blinds but how do I do a ‘Stop’ command?

1 Like

Unfortunately, Amazon didn’t include the “Stop” action semantic extension as of yet. I assume you are trying to stop your blinds once they are going from closed to open state or vice-versa.

So, my recommendation here would be to use a proxy switch modeled as an PowerController that would trigger the proper command on the OH side, via rules, to stop your blinds at the current level. Since, “Stop” isn’t supported by that controller as well, you would need to use the routine workaround. And all this depends on the binding you are using providing that capability.

Thanks Jeremy, You assume correctly. My binding does have the STOP capability and I was already using the routine workaround. I guess I have just have to be patient :grinning:

Hello!

I can see level of brightness in the Alexa app. So, is there any workaround, or it’s impossible to get the level of brightness/power state by voice? I don’t actually need it in Alexa app - I have OH for that :slight_smile: Thank you for the information.

Best regards,
Davor

Actually now that I think of it, I don’t see how having the “Stop” semantic extension would have been useful in your case using a RangeController since each action need to be a value. Maybe a zero adjustment (0) could have done the trick, assuming your binding provides realtime state updates to OH while moving, or switching to a ModeController could be another solution but unless your blind item is a Number, it won’t be possible.

Not possible. I updated the troubleshooting guide related to your initial question.

1 Like

@jeshab , How do I implement your 0 adjustment idea ?
The binding supports DOWN, UP, and STOP commands as well as numerical positions with position feedback. eg I can command blinds to 20 (%) position.

I tried this but it didn’t work

actionMappings="Close=100,Open=0,Stop=(0),Lower=(+10),Raise=(-10)"
1 Like

Thank you for your help.

Best regards,
Davor

1 Like

My previous point was a supposition if Amazon had included the “Stop” action semantic extension. I was just thinking ahead :smile: There is no way around the recommendation I provided earlier right now.

So based on this use case, I am considering expanding the item type support for ModeController to Rollershutter (UP/DOWN & STOP/MOVE) and Dimmer (INCREASE/DECREASE). This will not resolve the issue for the missing action but would give a better control of these item type abilities.

The only issue here is that you cannot combine range & mode controllers under one single item, the same way than PowerController and BrightnessController. I just tested it and it silently fails on the Alexa side to recognize the item. So if you want to have numerical control along with using the item type commands, you would still need to use a proxy item as well. If you only care about specific positions, you can add them as modes and even give them a name.

I just want to be clear the example below will not work with the current live skill. I just wanted to know if this is something that you might consider using with your binding? I am trying to determine if I should make the change or not. With this definition, you would only have to setup a routine to send “STOP” directly to your item without the need of a proxy item.

Rollershutter Blind "Blind" {alexa="ModeController.mode" [category="INTERIOR_BLIND", friendlyNames="@Setting.Opening", supportedModes="0=@Value.Close,50=Half:Fifty Percent,100=@Value.Open,UP=Up,DOWN=Down,STOP=Stop,MOVE=Move", actionMappings="Close=0,Open=100,Lower=DOWN,Raise=UP", stateMappings="Closed=0,Open=100"]}

It is possible to get the state with a hack. (Whether you call this possible or not probably depends on how much of a hack you think this is.) Set up a proxy item that as a temperature, and copy the real item’s value into that proxy item (must translate into a reasonable temperature range). Alexa can query temperature. So, for example, I have my garage door set up where “garage temperature” 0 means closed, and 100 means open. This works fine, but Alexa will say “the garage door temperature is 0”. As long as you are okay with that, you can get the state of almost anything you want.

I guess I am just trying to limit the level of complexity :smile: There is certainly other ways to implement this as you mentioned.

If you get me going, you can actually set any numerical items as a RangeController or switch items as ToggleController and you would get the state back on voice request. I am just concerned that it might add to the complexity of configuring a simple light item. But maybe I should have mentioned it in the end. Thanks for keeping me honest! :smile:

Switch Light "Light" {alexa="ToggleController.toggleState" [category="LIGHT", friendlyNames="Switch"]}

Dimmer Dimmer "Dimmer" {alexa="RangeController.range" [category="LIGHT", friendlyNames="Level", unitOfMeasure="Percent"]}

As a side note, you could use the new metadata label Door with your garage door item and you wouldn’t need any hacks to request its current status :+1:

1 Like

With Sdomotica and my integration for BTicino stop works fine.


Bye
Sandro

Hi Jeremy, Yes I would consider using your suggestion…If I understand correctly when using mode controller I would not be able able to command to any position but only to predefined positions(presets). Is it not possible to use both range controller and mode controller in a group definition?

With the mode controller I would then define preset positions and STOP would work but using Alexa routine. How would MOVE work? Which direction would it move, UP/DOWN? I quickly tried mode controller but the item was not discovered. After your reply I now know why… Rollershutter type is not supported.

The binding I am using is BTicino/OpenWebNet for BUS controlled blinds, lights, thermostats, switches and much more. It is currently and actively being developed further. As I am not an expert I asked the developer @massi et al to take a look over here. Maybe you guys could work together and be more effective than getting ideas from lesser mortals like me :grin: I hope that is OK with you.