RGBW can't set color temperature

I'm using Advanced Zigbee RGBW Bulb driver, but when I set temperature to 3200 and press "Set Color Temperature" button, nothing happens and this is in log: java.lang.ArithmeticException: Division by zero (setColorTemperature)

When I switch to Generic Zigbee RGBW Light and do the same, error in og is this: java.lang.NumberFormatException: For input string: "0A00" (setColorTemperature)

For clarity, are you talking about using the Device's edit page interface or a dashboard button interface? Additionally, what is the specific device you are using?

I tried on my Sylvania RGBW lights and the Advanced Zigbee RGVW Bulb Driver using several scenarios and could not duplicate the error. I also tried using the Color Bulb button Dashboard without an error. This is not to say you are incorrect; however, definitely more data would be needed for anyone to troubleshoot.

Dave

Hi Dave, thanks for looking into this.

It is device's edit page, and device is control module for LED strip - Gledopto GL-C-008. When plugged in, the device reports tcolor temperature 6535 if that helps.
Is there a repo with sources for build-in drivers, so I could check myself what s it doing and why it fails?

The code for built-in drivers is not public (except a few examples they've published, of which this is not one).

Have you tried hitting "Configure," particularly if Hubitat didn't pick this driver on pairing, to see if that helps?

1 Like

Did You click configure after changing drivers?
In regards to the advanced drivers, they run tests that can take several seconds to complete.

1 Like

Yes I did hit "configure" after each driver change

you can have a look at the code for the generic zigbee rgbw driver here:

Awesome, thank you. I'll post here if I find anything.

Cool, I found it. First of all, this driver is a bit different from the one built into Hubitat. In device edit page, under "Set Color Temperature" button, there are 3 text fields: Color temperature, Level, Transition time. But if you fill them all, it fails because the driver's method has only 1 parameter. Just something to watch out for, if this is work in progress for future driver update. The driver built in Hubitat has just 1 text field - Color temperature, which is fine.

So now the fix:
First I updated line 157 to:
value = rawValue == 0 ? 6535 : (1000000 / rawValue).toInteger()

because on first init, the device reports value 0 and this results in division by zero.

Second, setting the temperature itself - it failed on row 478. By default, transition time is not set. Even when there is check for this in code with nullables, the "no selection" value actually is not null, but "0A00", which fails to convert to integer. Please add check for this value (and do the same as if it's null).

Also, please make the same fixes to Advanced Zigbee RGBW Bulb driver, as it fails on the same.

3 Likes

this driver is due for an update in 2.2.8, primarily for the extended setColorTemperature command support, will look into the NPE's as well.

3 Likes

I have had this issue for a little over a week and I thought it was something I had done (because it was working previously). When I came looking for help, I found this thread matching my exact description and I'm glad to see a fix is on the way. I too had pressed the configure button and nothing happened.

1 Like

To make it work before fixed driver arrives, go to device edit page and change "Transition time" in Preferences to anythnig else than "No selection".

Thanks for replying; I got really excited when I saw this. I tried this on both of my RGBW Gledoptos (2 different models) two different ways each. I changed the settings like you said, tried it, and got no new results on both devices. Then, I reconfigured them differently again with the same results, still :frowning:.

To confirm, I made sure none of the transition time fields were set to "no selection"

I have several Gledopto Pro and they work fine with the Advanced Zigbee RGBW Bulb driver. Mine are the GL-B-008P model.

1 Like

Did you try it with "Generic zigbee RGBW light" driver? That and transition time != no selection works for me with Glepopto GL-C-008

1 Like

That worked perfectly! Thank you so much.

Hi, I'm a glutton for punishment so I purchased a gledopto dual white and color zigbee bulb model GL-G-001P.

It default adds as an advanced zigbee CT. CT control, level, on/off/flash all work great but there's no control for color. I tried all the advanced zigbee and generic zigbee drivers and none of them would allow the RGB to work. I have the most recent platform version from a day or two ago.

I have the flood light version of this light that I assumed would use the same driver and I double checked they're configured the same and they are. Still no RGB on the GL-G-001P.

@1449smarthomeautomat When you changed to the Advanced Zigbee RGBW driver, did you hit “configure “ on the driver page?

1 Like

Ok, this worked magnificently, thank you; however, I feel like I'm missing some nuanced piece of information that I should've known. I've never noticed anything usable from this feature and normally have just seen a bunch of gobbledygook in the logs. What what the significance of pressing the configure button (besides making it work) and should I have pressed this on any other zigbee lights that I have?

I believe it sends configuration information to the bulb needed to work with the driver. It happens automatically when you join a new device, but needs to be done manually any time you change the driver.

2 Likes