Issues with color items

ok, that is a clear error, which will help narrow the issue down.
What model of light are you having? (the model you see in OH, not the commercial name)

Can you set a few colors (e.g. red, yellow, green,blue) and share what is the value you see. Maybe also see if the brighness infuences the value. That helps understanding the how the light is encoding the color

I will do some testing when the kids are sleeping :wink:

The model is a yeelink.light.color5. I played around with the colour flow feature a couple of months ago and it seemed that the colour settings worked as described in the specification:

This command for example works:

sendCommand("set_scene [\"cf\",7,1,\"2000,1,16711680,1,180000,1,16711680,20,180000,1,16731392,40,180000,1,16738048,60,180000,1,16744704,80,180000,1,16754432,100,180000,2,3400,100\"]")

First observation: brightness has no effect on the colour value.

Here are a couple of colour samples:

RGB(255,0,0): 16711680 (= 255 * 65536)
RGB(0,255,0): 65280 (= 255 * 256)
RGB(0,0,255): 255

RGB(255,255,0): 16776960
RGB(0,255,255): 65535
RGB(255,0,255): 16711935

So it seems to work as specified on page 11 in the specification document.

I will try here, but I think the problem is that the device is sending a string (text) instead of a number. (no ")… I quickly looked at the code and it expects the color as number
I have a rgb light here somewhere, will connect that one

Could this be related?

No.

3 Likes