Change light scene using Alexa

Hi all,

i automated some Tradfris with openHAB and now i want to use Alexa to make light.

i defined an item:

String   tradLicht   "Licht"   (gLichter)

i defined a sitemap:

Switch item=tradLicht mappings=[AUS=AUS, ALLTAG=ALLTAG, KINO=KINO, GEMUETLICH=GEMUETLICH]

i defined some rules like this one:

rule "Licht Alltag"
when 
	Item tradLicht changed to ALLTAG
then
	tradLicht1Col.sendCommand (HSBType::fromRGB(255, 255, 255))
	tradLicht1ColTmp.sendCommand(49)
	tradLicht2Col.sendCommand (HSBType::fromRGB(255, 255, 255))
	tradLicht2ColTmp.sendCommand(49)
	tradLicht3Col.sendCommand (HSBType::fromRGB(255, 255, 255))
	tradLicht3ColTmp.sendCommand(49)
end

Works fine via the BasicUI. But there seems to be no way to change for example from KINO to ALLTAG using Alexa. So, what do i have to do to be able to use Alexa for a change of light mode?

Volker

Did you read through the Alexa skill documentation yet?

http://docs.openhab.org/addons/ios/alexa-skill/readme.html

Yes, i already use Alexa for some things regarding OpenHAB. I just hoped someone found another way for this topic, another way to configure this in openhab to make it „visible“ for Alexa.

So if you do is there a reason why you did not insert any tags (Switching, Lighting) in your item definition?

There are tags for Alexa. I only posted the item i have a problem with.

I can turn a light on / off, for example. My problem is the string item i use as a switch in my Sitemap. How am i able to tell Alexa that it should switch my lights to kino, alltag, gemütlich mode? Is this possible at all? Switchable tag does not seem to work with this string. Alexa does not find the item.

What about this workaround?

1 Like

Use virtual items: