Alexa with duplicates

Hi all, I have a very common issue where my Alexa have all items duplicated after having created the same items in openhab. I have read several topics and all the documentation related to this issue but I cannot get rid of this issue,

I explain my environment:

I have B-Ticino Living Now system working with Gateway K4500 (no OH binding available … yet).
This system is linked to alexa by means of the Legrand skill.
The only way I found to import my devices in openhab is via Amazon echo control binding.

My items are defined in openhab like:

Switch Kitchen_Light “Luce Cucina" (Kitchen, gLight) [“Lighting”, “Switchable”] {channel=“amazonechocontrol:smartHomeDevice:xxxxxxx:yyyyyyyy:powerState”}

I paid a lot of attention tu use the same names for all items as they are in Alexa .
The result is that I have all items duplicated with the same name (one from openhab and one from legrand ) . So for the above device I have 2 Alexa Lights called “Luce Cucina".
In some case (not for all items and I do not understand why) Alxea finds more than one device responding at the same name and ask what to do.

Is there any way to tell openHab skill not to import that item into Alexa ?

I would like to keep openHab skill because I like the possibility to add things and items to Alexa from Openhab.

Thanks for your help.

OH will only export items you tell it to by means of either tagging or attaching an alexa= channel to the item so you can fully control what Alexa gets to see.
FWIW, item names are not of importance for this but item descriptions (the part in “”) are so as you say you have two items with the same description that’s probably a direct consequence. Just untag one of them.

1 Like

You can remove your tagging

Switch Kitchen_Light "Luce Cucina" (Kitchen, gLight)  {channel=“amazonechocontrol:smartHomeDevice:xxxxxxx:yyyyyyyy:powerState”}

This will stop openHAB putting thing in Alexa

You can use metadata on all of the items you want in Alexa

Switch Kitchen_Light "Luce Cucina" (Kitchen, gLight){ alexa="Lighting", channel=“amazonechocontrol:smartHomeDevice:xxxxxxx:yyyyyyyy:powerState”}

1 Like

Thanky you for the feedback but I am afraid that the problem here is in uderstanding the meaning of tagging.
so you are saying that in this way the item is imported to Alexa:
Switch Kitchen_Light “Luce Cucina" (Kitchen, gLight) [“Lighting”, “Switchable”] {channel=“amazonechocontrol:smartHomeDevice:xxxxxxx:yyyyyyyy:powerState”}

In this way it is not imported to Alexa:
Switch Kitchen_Light “Luce Cucina” (Kitchen, gLight) {channel=“amazonechocontrol:smartHomeDevice:xxxxxxx:yyyyyyyy:powerState”}

And in this way it is imported to Alexa as a Lightning ?
Switch Kitchen_Light “Luce Cucina” (Kitchen, gLight){ alexa=“Lighting”, channel=“amazonechocontrol:smartHomeDevice:xxxxxxx:yyyyyyyy:powerState”}

Sorry for the very beginner questions…

Anyhow this works and now I have more or less understood the meaning :slight_smile: Thanks

1 Like

Thanks for asking the beginner question we need people like you to contribute to the doc’s because the people that have already learned the little things forget that we already knew the answer so didn’t put them in the docs.

If you look at the item definition syntax it goes as follow

itemtype itemname "labeltext [stateformat]" <iconname> (group1, group2, ...) ["tag1", "tag2", ...] {bindingconfig}

So openHAB assumes you want your tagged items in Alexa so it exposes/imports it in for you

Then they came up with a better way of using the meta data.

Also please use code fences as it activates a different part of the brain to read code correctly.


1 Like

Here you go. This workaround will prevent tagged items from being discovered by the Alexa skill.

Thnaks again. It seems that all beginner questions have already been anwered in the past ;). I have searched alot and I coudn’t manage.
In any case it seems that untagging or tagging “wrong” is reaching the same result.
Just by test I tried to:

  • untag only one device
  • deleted all OH devices from Alexa
  • search for new Alexa devices
    And the untagged device has not been found :slight_smile:
1 Like

That works too. The workaround I mentioned is in case you wanted to keep the tags for other voice assistant integrations.

1 Like