Official Alexa Smart Home Skill for openHAB 2

Your understanding is correct on all these points. You can’t use both range and mode controller on the same item. You can at the group level but you would have to use two different items which means using a proxy item.

The MOVE command is not related to the binding but to the item type Rollershutter. So it’s up to the binding you are using to handle the command. If it doesn’t, it shouldn’t be added as supported mode. That command is more suited for a curtain where you would use MOVE & STOP to control it. I will most likely have different examples & metadata labels based on the windows covering type.

Anyway, I am planning to make the change I proposed. Amazon provided additional display categories and added a new garage door ability that allows user to use a pin code to open by voice, the same way than a lock. For this implementation, they are requiring a ModeController interface. So the item type support for that controller will also need to be extended to ON/OFF commands (Switch & Dimmer).

I have an idea to enable more natural language commands without the use of the popular workaround using Alexa routines and a proxy item. The problem with routines is that the devices used in the routine get lost after every ‘Forget’ and ‘Discover’ devices operation. That is annoying.

Idea:

  • Use mode controller and string item type with action mappings
  • Update string item with Alexa command to string item
  • Use openHAB rule to run real command depending on string item

I have not tested if it works yet!! Would the voice command for the mode controller be executed as follows ‘Alexa, set Office blind to stop’ ?

If it works then it opens up the possibilty to voice commands for varied device types using rules.
eg My outside lights can be in one of three states:

  • ON with PIR
  • OFF
  • 4hrs constant ON and then PIR. This is activated by a rapid On/Off/On/Off/On to set this mode.

I could action map the above to a String type item with values: ON, OFF, CONSTANT and use a rule to execute the necessary commands to achieve that.

:upside_down_face:

You can be as creative as you want :smile: That was the main reason why we made all the customization part of the Alexa Skill API available to the users. But ultimately, our goal is also to make it simple for the standard users so they can just model their existing device to use with Alexa.

Correct. The “Stop” routine would basically mimic that command.

1 Like

I thought I was a standard user :grin:

Hi,
I am trying to test my idea but I have a problem I don’t understand
Only the Command ‘set Test to Delicate’ works and the item is updated with the string ‘Delicate’. The other commands don’t work for me, but its copied from the examples! It seems I need the @Value.xyz part for it to work. Knits doesn’t work but Delicate does.

String TestString "Test" {alexa="ModeController.mode" [supportedModes="Normal=Normal:Cottons,Delicate=@Value.Delicate:Knits"]}

Did you configure your regional settings? The issue here is that the text-based names need to be localized compared to asset ids that are already on the Alexa side. If it doesn’t match the one from your Amazon account, none of these names will be recognized.

Hello!

I have one more question regarding Alexa OpenHAB skill. I have a number item that is connected to sitemap’s selection widget. It’s used as scene selector (night mode, movie mode…). Is it possible to trigger specific mode via Alexa using just this item (and if it is, how), or it’s necessary to use proxy switch items, one for each mode?

Best regards,
Davor

You should use the ModeController interface and set the supportedModes parameters based on your sitemap mapping for that item.

1 Like

Thank you. That’s exactly what I was looking for.

Best regards,
Davor

Yes regional settings are set via paperUI. Language = English.
However, I use German .de Amazon and country is set to Austria. Amazon language option is also set to English. English Alexa commands work fine.

Could using .de Amazon be the reason?

And which region/country?

I don’t believe that the location of your Amazon account is a factor here. However, what language/country are your echo devices set to? You should have access to that information under the device settings in the Alexa app.

I suspect a mismatch between the two.

I don’t know if is alexa binding related but I have a problem with two rollershutter with semantic configuration.
my conf is
items:

Rollershutter	 Sala_Shutter1   	"finestra uno"   	<rollershutter>	(FamilyRoom, gShutter)  {channel="knx:device:2c7bfaf5:A", 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"]}
Rollershutter    Sala_Shutter2      "finestra due"      <rollershutter>	(FamilyRoom, gShutter)  {channel="knx:device:2c7bfaf5:b", 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"]}

when I say “alexa rise/down finestra 2”, it rise/down “finestra uno”. I tested a lot of time and controlled last command every time and alexa everytime correctly understand it.
Most strange is that if I say “alexa close/open finestra 2” it correctly close or open “finestra 2”.

I just tested on my end with two blinds called “Bind 1” and “Blind 2” without any issues. Maybe you should rename your item label to use a number instead of a word. Alexa language processing should be able to match numbers in your language. And make sure to trigger the Alexa discovery process once you make these changes.

1 Like

Hi,
Hope we can find the problem…

For all my Echos, Show:
Language = English
Device location = AT
Time zone = CEST

Alexa App on phone
Device location = AT
Time zone = CEST
No language specified for the App but phone is Austrian with Austrian SIM and language is English

Where did you get that information from? The Alexa app gives the ability to specify the language/country on a per Echo device basis. The only possible countries for the English language on the Alexa side are Australia, Canada, India, United Kingdom and United States. It may have been set automatically when you initially registered your devices, probably based on your phone language settings.

The data came from the app

When I first got an Echo I had to call Amazon support for help with the language settings. At that time they had me add a EchoSim to fix the issues. Its still one of my devices but it doesn’t do anything. I was afraid to deactivate in case I ran into Language country issues again.

You can access the Echo simulation tool here for testing Alexa. Probably you know it already:
https://echosim.io/

I still notice that my Alexa skills are usually German despite everything else being set to English.!

Even if I change the skill to English it doesn’t keep the setting but it never affected anything before.

I am not sure what I can do next. Any ideas?

Support for RangeController in more regions is great news. Of course, I immediately tried on my own installation in German, but I have problems.

Say, I have dfined this single item:

Rollershutter RS1 "Avocado" <rollershutter> { channel="zwave:...", alexa="RangeController.rangeValue" [supportedRange="0:100:1", presets="0=@Value.Close,100=@Value.Open,20=Aufstrich", unitOfMeasure="Percent", actionMappings="verschenke=0,zerdrücke=100,senke=(-10),hebe=(+10)", stateMappings="Closed=0,Open=1:100"]}

then of course I removed the item/device from alexa.amazon.de, and searched for it again.

Now, I have trouble activating some of these commands:

Fully working commands are:

  • Alexa, setzte Avocado auf 90 Prozent!
  • Alexa, setze Avocado auf offen!

But the following, are not working at all:

  • Alexa, zerdücke Avocado
  • Alexa, Avocado zerdücke
  • Alexa, hebe/senke Avocado
  • Alexa, setze Avocado auf Aufstrich

The last one even has Alexa respond: “Ich habe Avocado auf deine Einkaufsliste gsetzt” (I have put Avocado on your shopping list).

It seems, I don’t know the correct German phrase to activate the Item. Does anyone have a working example for a Rollershutter (with working activation phrases) in German?

If you go into the language setting, you will see which English locale is selected. Anyway, I now realize that the default locale determination is too restricted in the skill. I am planning to make a change that would only depend on the language and no longer on the region/country.

The semantic ids should be named based on this list. The localization of the action names is done on the Alexa side. You shouldn’t translate them on your end.

1 Like

Thanks. If the bug is fixed would that fix my issue?