[DEPRECATED] Inovelli Bulbs Drivers LZW41/LZW42

Color is a circle. There are no sides. :wink:

1 Like

Fix pushed …

These bulbs trip me up sometimes.. it's like they change identities when switching from CT to RGB

True.. that's why it's 0 to 360.. But on red is split

200px-HSV_color_solid_cylinder

svg

This scale doesn't quite follow what the bulb does. For instance a 0=3.6 does show red. A 3=10.8 is actually Orange. A 9=32.4 is actually Yellow. Just a few examples. To get an exact color in an event you would have to use custom color and a number each time. Some of the other colors do fall within your ranges but the exact color is a single number.

0=0
0 * 3.6 is still 0

As to the accuracy of the names... I stole the color name code from the example code on hubitat public github

pSUUV

OK 1=3.6. My bad. I am going to create an event and pick the colors in HE and see how they compare.

Results.
Red OK
Green OK
Blue OK
Yellow looks like yellow green
Orange looks like yellow
Purple looks more like pinkish purple
Pink goes to some white level
Custom level 84 is actually pink

Here are the custom levels that actually fit the colors best.
3 Orange
9 Yellow
33 Green
50 Cyan
67 Blue
70 Purple
84 Pink
99 Red

1 Like

I’m hesitant to change the hue to color names as this seems to be established standards.. I’ll do some research though

I guess if anything a drop down could be put on the device page with those selections and also No Selection but then an event could change it to whatever they want. Just a thought.

Thanks, this fixes my issue.

One other suggestion. The HSV->RGB->HSV conversion causes the HSV numbers recorded in states to be slightly off from integer, which makes a scene sometimes not recognize that it's on even after it correctly activates the correct values. Maybe you can round them before recording them?

1 Like

@kdb I was actually considering this already.. It's an artifact of the 0-100 scale vs 0-360 .. But I don't like the decimals since it doesn't match the input value... So yes.. I will do that

1 Like

@razorwing of interesting note I found this scale somewhere else that adds more colors:

||if (hueValue >= 0 && hueValue <= 7) colorName = "Red"|
| --- | --- |
||else if (hueValue >= 8 && hueValue <= 20) colorName = "Red-Orange"|
||else if (hueValue >= 21 && hueValue <= 26) colorName = "Orange"|
||else if (hueValue >= 27 && hueValue <= 40) colorName = "Orange-Yellow"|
||else if (hueValue >= 41 && hueValue <= 54) colorName = "Yellow"|
||else if (hueValue >= 55 && hueValue <= 94) colorName = "Yellow-Green"|
||else if (hueValue >= 95 && hueValue <= 124) colorName = "Green"|
||else if (hueValue >= 125 && hueValue <= 136) colorName = "Green-Cyan"|
||else if (hueValue >= 137 && hueValue <= 164) colorName = "Cyan"|
||else if (hueValue >= 165 && hueValue <= 205) colorName = "Cyan-Blue"|
||else if (hueValue >= 206 && hueValue <= 243) colorName = "Blue"|
||else if (hueValue >= 244 && hueValue <= 272) colorName = "Blue-Magenta"|
||else if (hueValue >= 273 && hueValue <= 320) colorName = "Magenta"|
||else if (hueValue >= 321 && hueValue <= 349) colorName = "Magenta-Pink"|
||else if (hueValue == 350) colorName = "Pink"|
||else if (hueValue >= 351 && hueValue <= 356) colorName = "Pink-Red"|
||else if (hueValue >= 357 && hueValue <= 360) colorName = "Red"|

@kdb rounding done

new version pushed to github

Those are darn close. I just ran these through the bulb and they appear to be spot on. Please test and see if you agree.

0 - Red
2 - Red Orange
3 - Orange
6 - Yellow Orange
9 - Yellow
21 - Yellow Green
33 - Green
41 - Greenish Cyan
50 - Cyan
58 - Cyan Blue
67 - Blue
69 - Bluish Purple
70 - Purple
76 - Pinkish Purple
84 - Pink
91 - Pinkish Red
99 - Red

No more bugs reported here or in the inovelli forum :crossed_fingers:

2 Likes

What did you think of the hue values I gave you? Are you going to implement them or will it stay as is? So far bulbs are working.

I am considering expanding the names list, for a bit more accuracy... But I am going to match hue value to color name based on official standards not perceived color, which can be subjective..

I do believe you will get a lot of complaints that the color of the bulb doesn't match the color name if you stick to a standard. Bulbs are different and that should be considered. IMO. It is always your choice just wanted to mention.

Pushed an update to fix an error when security enabled