I am new to the Lau language and I am having some problems getting my RGBW light to work the way I want it. Originally, I used the following lines using the RGB controll plug in:
local device = 38
local color = "##F000000000
luup.call_action(“urn:upnp-org:serviceId:RGBController1”, “SetColorTarget”, {newColorTargetValue = colors}, device)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”, “SetTarget”, {newTargetValue = 1}, device)
luup.call_action(“urn:upnp-org:serviceId:RGBController1”, “SetColorTarget”, {newColorTargetValue = “#FFFF000000”, transitionDuration = 100, transitionNbSteps = 30}, device)
And this code works, except it goes around counter clockwise around the color wheel as it goes thru the transition step. But what I want is for the transition steps it to go clockwise.
I tried a negative number in the transitionNbSteps part of the last line, but it doesn’t seem that it likes that. Am I missing something simple here?
I have also tried to create the Hex code in the program without much luck. I post here as well in case someone sees something I am doing wrong.
local device = 38
local color = 0xF000000000
local colors = string.format(‘#’, ‘%X’, color)
luup.call_action(“urn:upnp-org:serviceId:RGBController1”, “SetColorTarget”, {newColorTargetValue = colors}, device)
luup.call_action(“urn:upnp-org:serviceId:SwitchPower1”, “SetTarget”, {newTargetValue = 1}, device)
luup.call_delay( ‘add’, 100)
while color < FFFF000000 do
color=color+0x400
local colors = string.format(‘#’, ‘%X’, color)
luup.call_action(“urn:upnp-org:serviceId:RGBController1”, “SetColorTarget”, {newColorTargetValue = color}, device)
luup.call_delay( ‘add’, 100)
end
Any help would be greatly appreciated!