This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Phlips Hue - RGB Color Feedback - Zigbee
#4
(21.03.2024, 09:13)admin Wrote: Try using xy_to_rgb from user.hue v2.lua: https://forum.logicmachine.net/showthrea...50#pid6250

I'm trying to use xy_to_rgb from user.hue v2.lua. But I can't be doing it right. I have copied the function into common functions. Then I have in the event script:

Code:
xy = zb.cmdsync('getxy', addr)
rgb = xy_to_rgb(xy['x'],xy['y'])
log(rgb)

But I get the excact same rgb value wether I have red or blue light. (255,0,0) or (0,0,255) gives the same rgb value. But the lamp is red or blue correctly. For colours without blue the result makes sense I think, but it seems like blue and red is mixed up somehow.

Value of variable rgb is 16711680 for both (255,0,0) and (0,0,255)...

I can see that the x and y values differ (45913,19614) for red and (8880,2613) for blue - so the result shouldn't be equal...

Any hints? Smile
Reply


Messages In This Thread
RE: Phlips Hue - RGB Color Feedback - Zigbee - by stianj - 23.09.2024, 13:51

Forum Jump: