[SOLVED] WiFI LED Binding - LD741

Hey Guys so I got my Magic Home LED Controllers up and running thanks to these great posts!

I have one question that I was hoping I could get some help with, however.

I’m following along this post detailing a Wake rule where the brightness increments by 1% every minute the first ten minutes, then 10% every minute after that. Link here:https://community.openhab.org/t/yet-another-wakeup-light-rule/41941

So I’ve modified it to simply go 10% every minute with our LED Controllers, the problem is - they don’t seem to have a direct “Brightness” item. Of course you could raise the brightness by changing the third value in the HSV syntax (i.e. (320,100,10) to (320,100,20) to (320,100,30), etc..) but I’m not sure how to change just one part of this 3 number value. Simply plopping a variable into that position like you’d expect in most programming does not seem to work.

— removed original not working code ----

Also don’t worry that my color value (324,100,x) does not seem to be blue. My controllers both somehow got their colors all pushed off by about 30% or like 1/3 ways around the color wheel, so my greens = red, etc. experimentally I’ve found 324,100,x is just the right blue for me :slight_smile:

Thanks!

EDIT: Solved

If anyone is interested, heres my final working code:

var Timer wakeUpTimer = null
var Number dimmer = 0
var Number dimmer_step = 5
var String color = ""

rule "Wakeup LED 1 Morning Blue"
    when
        Time cron "0 55 20 * * ?" 
    then
        logInfo("WakeUp", "WakeUp started")
        dimmer = 0
        wakeUpTimer = createTimer(now.plusSeconds(1), [|
                if(dimmer >= 100) {
                        logInfo("WakeUp", "WakeUp ended")
                        dimmer = 0
                        dimmer_step = 3
                        LED1Power.sendCommand(OFF)
                        wakeUpTimer = null
                } else {
                        dimmer += dimmer_step
                        logInfo("WakeUp", "WakeUp step: " + color)
                        color = "324,100," + dimmer.toString
                        LED1Color.sendCommand(color)
                        LED2Color.sendCommand(color)
                        wakeUpTimer.reschedule(now.plusSeconds(20))
                }
        ])
end

My problem is a much more general one with these LED Controllers. The color it display is about 30% off of the values I input, whether through the color wheel in the basic UI, color slider in Paper UI, REST API HSV Values, etc, no matter how I input it, the wrong color comes out. It is manageable if you calculate that you have to enter ~30% higher color value, but its super annoying.

I thought I read you can reset these through some power cycling pattern. Does anyone know exactly how to reset these controllers?

Thanks!