Smooth Color Fading - Success?

I have an LED strip connected to a Fibaro RGBW Controller. It has some built in effects, but I wanted the ability to customize the fading of different colors. I've been at this for a little while and it doesn't seem like many people have had success in this department. While this might not work for everyone with the colored bulbs, it may give those a bit of an insight into how to make it work for them. (I dont have color changing bulbs, just the LED strips for now).

Here is my rule utilizing two variables (a string for Up or Down, and a number for the hue value) that will either increase or decrease the hue. Basically it fades between a purple and red until the switch is turned off.
By increasing the hue by 1 each iteration, it seems to create a nice fade effect. The Fibaro allows you to get out to the hundreths (88.01 for example), so if the bulbs do the same, you may be able to increase by .25 over time for a smoother transition. But for me, +/- 1 seems to be fine.

IF (vSwitch-ValentinesDay(off) is on(F) [FALSE]) THEN
Set KitchenHueColor to 80
On: Kitchen Cabinet-Color
setHue(KitchenHueColor(93)) on Kitchen Cabinet-Color
Repeat every 0:00:02 (stopable)
IF (Variable KitchenHueColor(93) >= 99(F) [FALSE]) THEN
Set KitchenHueChange to 'Down'
ELSE-IF (Variable KitchenHueColor(93) <= 80(F) [FALSE]) THEN
Set KitchenHueChange to 'Up'
END-IF
IF (Variable KitchenHueChange(Up) = Up(T) [TRUE]) THEN
Set KitchenHueColor to (KitchenHueColor + 1.0)
setHue(KitchenHueColor(93)) on Kitchen Cabinet-Color
ELSE-IF (Variable KitchenHueChange(Up) = Down(F) [FALSE]) THEN
Set KitchenHueColor to (KitchenHueColor - 1.0)
setHue(KitchenHueColor(93)) on Kitchen Cabinet-Color
END-IF
END-REP
ELSE-IF (vSwitch-ValentinesDay(off) is off(T) [TRUE]) THEN
Stop Repeating Actions
Off: Kitchen Cabinet-Color
Exit Rule
END-IF

I'm curious to what others thoughts are in this instance and if this will possibly kill my hub from repeating an action so much. cheers!

p.s.- this is the start to working out some automated holiday lighting. Valentines Day just happens to be the next one. :slight_smile:

Interesting. Especially as it could give you a lot of control of how fast and between which values you go.

You could also use the "Scene Transitions" for this :slight_smile:
Scene Transitions would be a lot easier to use when you start using more than one lamp to transition.

Scene transitions are broken at the moment (fo Hue lamps), but will be fixed with the next upgrade :smiley:

Too many transitions happening at once will kill your hub! Okay, not kill, but it will definitely knock it unconcious, until you reboot :slight_smile:

I did go through the Scenes and Scene Transitions, but it didn't seem to function the way I was looking for. But, admittedly, I didn't spend much time on it, so I probably just missed something.

1 Like