Official Alexa Smart Home Skill for openHAB 2

And only the Label of the item is recognized as triggerword for alexa.
Is it possible to add different variations for a single item?
(In our house one person calls it “Library”, the other “Music Room” and the third says “Piano Room” for the same light.)

Yes, I’ve done this. Create an item for each name variant.

Switch  lamp1 "Music room lamp"  [ "Lighting" ]
Switch  lamp2 "Library lamp"  [ "Lighting" ]
Switch  lamp3 "Piano room lamp"  [ "Lighting" ]

Alexa will discover the three above.

and another item for the actual lamp:

Switch lamp "lamp" { .........}

Create a rule for each of the above so that when they change state, they turn the lamp item on and another rule to turn it off. Six rules in all. Here are the first two:

rule "lamp ON"

when
	Item  lamp1 changed from OFF to ON
then 
  	 	sendCommand(lamp, ON)
		
  	 
end

and

    rule "lamp OFF"

    when
    	Item  lamp1 changed from ON to OFF
    then 
      	 	sendCommand(lamp, OFF)
    		
 end

There’s probably a better way to do it though!

1 Like