RGB Hex Code

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
local colors = string.format(‘#’, ‘%X’, color)
luup.call_action(“urn:upnp-org:serviceId:RGBController1”, “SetColorTarget”, {newColorTargetValue = color}, device)
luup.call_delay( ‘add’, 100)

Any help would be greatly appreciated!

Hi SBham,
Just wondered if you’ve had any luck getting your Fibaro RGBW to fade between colours and then repeating. I want to create an “ocean colour scene” for an aquarium which slowly fades between blues and greens. I’m using a Vera Edge Plus and a Fibaro FGRGBWM-441 RGBW Controller.
I’ve created a scene that kinda works, but it doesn’t crossfade between the colours. I’m sure it’s got something to do with setrampup times or similar parameters, but I can’t find any info on how to configure the options.
I tried your hex code settings but to no avail. I found that the colour only worked with decimal numbers. eg newColorRGBTarget: 0,0,255 for Blue.
I used a schedule trigger of 1 minute which did loop the scene, so I’m nearly there.
I’ve attached a screen capture from my advanced editor option.
I hope you may be able to help me on this one.
Cheers, Paul

Take a look at the Fibaro manual for how to configure the parameters:


Hey Paul,
Why don’t you save yourself the trouble and just use the built-in “Aurora” animation? I’ve built an aquarium hood using RGB strips and I find the animation works quite well. The only thing that will not match your specifications is that it uses some purple-ish colors as well. If you install the RGBW plugin, you can run the animation using a script in a scene as well. I think that you may run into trouble with your Zwave network if you use the method you are currently pursuing because each instruction would need to be send over the network, whereas the animation with the plugin is built in to the controller so it won’t cause any extra traffic.

Hi - I am really new to this coding thing, all I want to do is make a scene that can change a few colors - lets say Christmas for example, I would like to have it green for 30 seconds then fade to Red for 30 and then repeat. I was thinking. Need something like the below for the blue, but don’t know how to set the time and the repeat. I have read a number of threads and looked at the fibaro programing directions, this is just over my head. Any help would be much appreciated.

luup.call_action(“urn:upnp-org:serviceId:RGBController1”, “SetColorTarget”, {newColorTargetValue = 0,0,255}, device)