Passing HSV or RGB values to a whites-only bulb

I have an interface on my app that allows users to set HSV of their color bulbs, but when passing those parameters to a whites-only bulb the bulb only responds to the V as brightness, and seems to discard the rest. I am hoping to avoid writing a HSV -> Kelvin value converter. Is there a method to pass RGB, HSV or Hex strings to a white bulb and have it adjust kelvin accordingly?

Yes, that is correct the white bulbs still allow you to set the full HSBK but ignore Hue and Saturation. This is for backwards compatibility.

There are a few places where we have had to do the same thing. While I can’t reveal the code we used there are a few good articles online about how to approach such a problem. You need the opposite of that article though.

In general we try to avoid adding many endpoints into the firmware that do the same thing (like set color), and instead rely on applications (which have more powerful CPUs) to perform conversions. This also makes it easier to update the conversions algorithms in the future.

1 Like