Change light scene using Alexa

openhab2
alexa
tradfri
Tags: #<Tag:0x00007f1e5bbcfd88> #<Tag:0x00007f1e5bbcfc48> #<Tag:0x00007f1e5bbcfb08>
(Volker W) #1

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

0 Likes

(Matthew L Adams) #2

Did you read through the Alexa skill documentation yet?

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

0 Likes

(Volker W) #3

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.

0 Likes

(SiHui) #4

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

0 Likes

(Volker W) #5

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.

0 Likes

(SiHui) #6

What about this workaround?

1 Like

(Kim Skatun) #7

Use virtual items:

0 Likes