Alexa Skill V3 - How to take full advantage? - Friendly Names

Hi there,

I have upgraded to the latest openhab version to make use of the Alexa Skill V3. I find the description quite complicated and now I am struggling to convince Alexa that to do what I would like… :slight_smile:

I have a slat/lamella roof with adjustable slats that I would like to control via Alexa.

Here is my item definition:

Rollershutter Blind “Deck roof” {alexa=“RangeController.rangeValue” [category=“INTERIOR_BLIND”, friendlyNames="@Setting.Opening,Pergola,Roof,Deck Roof", supportedRange=“0:100:10”, unitOfMeasure=“Percent”, actionMappings=“Close completely=0,Open completely=100,Close=(-10),Open=(+10)”, stateMappings=“Closed completely=0,Open completely=1:100”]}

Now my question:

Friendly Names:
I would like that Alexa reacts on different names for the item. My understanding is that the fiendly name parameter can be used for that. Unfortunately this does not work so far.

Can someone please have look into my item definition to see what I am doing wrong?

Thanks!

I think my response in the post below should clarify the usage of friendlyNames parameter.

What exactly not working? What utterances are you using?

Thanks for the hint. I guess my initial goal is not supported by the friendlynames. I wanted to use several names for the device.

What is the benefit of friendlynames… ? What is the difference I would experience when picking a right or a wrong friendly name for a device.

Thanks!

What happens with your current setup? Also, make sure to follow the syntax provided in the documentation. I noticed that your Semantic Extensions parameters aren’t using the supported actions & states.

As I mentioned in the post I linked above, friendly names are mostly beneficial in group endpoint setup to differentiate each Building Block APIs capabilities (e.g. washer cycle and temperature).

Sorry for digging out this old thread…

Does this mean, that friendlyNames are not beneficial as synomyms of an item?

Unfortunately, when setting synonym metadata via openHAB3 UI, Alexa does not recognize them as alternative to the item label. Is there another option to add synonyms/aliases for some items without having multiple items linked to the same channels?

I’d like to get some tolerance how to call some of my items, e.g.:

“Alexa, dimme Deckenfluter auf 20 Prozent”
“Alexa, dimme Stehlampe auf 20 Prozent”*

I would point to the previous post I referred above explaining what the friendlyNames parameter is used for. In short, it is not meant for the purpose you are asking.

The issue here is that the Alexa Smart Home API doesn’t provide a way to add alias names to a given device. It only works for functionalities of a device using the Building Blocks APIs interfaces.

If that support would be added to the skill, the only way I can see currently, is to create multiple devices on the Alexa side pointing to the same item.

Using the idea I mentioned above, you will need to create a proxy item and use rules to pass commands to the main item.

1 Like

I’ve got Alexa and Loxone Bindings working nicely together; I can say “Alexa, Living Room Lights 0”, “Alexa Living Room Lights 1” to select Scene (or Mood) 0 or 1.
I would like to give these friendly names - scene 0 = “Off”, scene1 = “Normal”. I’ve tried loads of combinations of friendlyNames, supportedModes, actionMappings but none that work.
Then I came across this thread which suggests that its not possible or possibly only possible via Building Blocks API’s - is that correct?

My current Item definition is
Number LivingRoomLights “Living Room Lights” (Lighting) {channel=“loxone:miniserver:34882932:16A59E52-01B6-C28B-FFFFA8FF444AA57C”, alexa=“ModeController.mode” [supportedRange=“0:9”]}

So using the Building Block API’s, I guess I should have something like…
Group LivingRoomLights “Living Room Lights” (Lighting) {channel=“loxone:miniserver:34882932:16A59E52-01B6-C28B-FFFFA8FF444AA57C”, alexa=“Endpoint.Other”}
Number LRLScene0 “Off” (LivingRoomLights) {alexa=“ModeController.mode” [supportedModes=“0=Off”,friendlyNames=“Off”]}
Number LRLScene1 “Normal” (LivingRoomLights) {alexa=“ModeController.mode” [supportedModes=“1=Normal”,friendlyNames=“Normal”]}
//etc

But of course, that doesn’t work, or I wouldn’t be posting here…

As ever, any help appreciated - thanks

SORRY! Struggling with code fences for some reason…!

I’ve got Alexa and Loxone Bindings working nicely together; I can say “Alexa, Living Room Lights 0”, “Alexa Living Room Lights 1” to select Scene (or Mood) 0 or 1.
I would like to give these friendly names - scene 0 = “Off”, scene1 = “Normal”. I’ve tried loads of combinations of friendlyNames, supportedModes, actionMappings but none that work.
Then I came across this thread which suggests that its not possible or possibly only possible via Building Blocks API’s - is that correct?

My current Item definition is
Number LivingRoomLights “Living Room Lights” (Lighting) {channel=“loxone:miniserver:34882932:16A59E52-01B6-C28B-FFFFA8FF444AA57C”, alexa=“ModeController.mode” [supportedRange=“0:9”]}

So using the Building Block API’s, I guess I should have something like…

Group LivingRoomLights “Living Room Lights” (Lighting) {channel=“loxone:miniserver:34882932:16A59E52-01B6-C28B-FFFFA8FF444AA57C”, alexa=“Endpoint.Other”}
Number LRLScene0 “Off” (LivingRoomLights) {alexa=“ModeController.mode” [supportedModes=“0=Off”,friendlyNames=“Off”]}
Number LRLScene1 “Normal” (LivingRoomLights) {alexa=“ModeController.mode” [supportedModes=“1=Normal”,friendlyNames=“Normal”]}
//etc

But of course, that doesn’t work, or I wouldn’t be posting here…

As ever, any help appreciated - thanks

Do I get it right that instead of using spoken numbers to control your item you want to say “normal” or “off”?

If yes then you could try this:
Number LivingRoomLights “Living Room Lights” (Lighting) {channel=“loxone:miniserver:34882932:16A59E52-01B6-C28B-FFFFA8FF444AA57C”, alexa=“ModeController.mode” [supportedRange=“0:9”, actionMappings="Off=0,Normal=1"]}

or

{channel=“loxone:miniserver:34882932:16A59E52-01B6-C28B-FFFFA8FF444AA57C”, alexa=“ModeController.mode” [supportedRange=“0:9”, stateMappings="Off=0,Normal=1"]}

Semantic extensions configuration (actionMappings and stateMappings parameters) are currently only supporting Open, Close, Raise and Lower commands.

You seem to be on the right track with your current device definition but you used the incorrect parameter for the ModeController interface. As far as using Building Block APIs, your current setup already is using it so I am unsure why you tried to split your device definition in multiple items.

Anyway, the friendly names for each modes should be added to the supportedModes parameter and the friendlyNames parameter should define what functionalities your item refers to (in your case scene or mood).

item

Number LivingRoomLights "Living Room Lights" (Lighting) {channel="loxone:miniserver:34882932:16A59E52-01B6-C28B-FFFFA8FF444AA57C", alexa="ModeController.mode" [category="LIGHT", friendlyNames="Scene,Mood", supportedModes="0=Off,1=Normal,2=...,9=..."]}

utterances

Alexa, set living room lights to off
Alexa, set living room lights to normal
Alexa, set living room lights scene to normal
Alexa, set living room lights mood to normal

Thanks for the replies, guys.

@jeshab - you’ve nailed it, thanks, that worked straight away. That was the last enhancement on my list, so I’m really pleased to have a fully working system. I’m sure I’ll think up some other things I want by tomorrow, though!

I’ve noticed that editing the Rules or Items files in VSC (Windows 10) and an error occurs (the speech marks around modeController.mode above weren’t what was expected, for instance) VSC correctly throws an error, but once that error is corrected and the file saved, the errors often don’t clear without closing and restarting VSC. Has anyone else found this and is there a known solution?

Thanks again, Community, from another happy OpenHAB user!

Probably because when I copy/paste your original item definition, I missed updating the proper double quotes around the ModeController.mode. That’s the reason why you need to use code fencing otherwise, the double quotes get updated when posting a message. Anyway, I have updated the item definition in my last response.