Phlips Hue - RGB Color Feedback - Zigbee - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Phlips Hue - RGB Color Feedback - Zigbee (/showthread.php?tid=5316) |
Phlips Hue - RGB Color Feedback - Zigbee - Jose - 21.03.2024 Hello everyone, I am trying to read the color status of a Philips RGB lamp with the Zigbee gateway. Looking at the link: https://kb.logicmachine.net/libraries/zigbee/ I have been able to get the On/Off status, color temperature, but I am not able to read the RGB status.I don't understand that about xy and then being able to convert it to 3 bytes to use it on KNX screens. Can anybody help me? Thank you so much in advance, RE: Phlips Hue - RGB Color Feedback - Zigbee - admin - 21.03.2024 Try using xy_to_rgb from user.hue v2.lua: https://forum.logicmachine.net/showthread.php?tid=890&pid=6250#pid6250 RE: Phlips Hue - RGB Color Feedback - Zigbee - Joep - 25.03.2024 Code: RGB = event.getvalue() RE: Phlips Hue - RGB Color Feedback - Zigbee - stianj - 23.09.2024 (21.03.2024, 09:13)admin Wrote: Try using xy_to_rgb from user.hue v2.lua: https://forum.logicmachine.net/showthread.php?tid=890&pid=6250#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) 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? RE: Phlips Hue - RGB Color Feedback - Zigbee - stianj - 23.09.2024 Well, looking more into this I now understand that the xy coordinates should be less than 1 - and that's the main problem. Don't know where these numbers come from, or what I can do with them... Help! RE: Phlips Hue - RGB Color Feedback - Zigbee - admin - 24.09.2024 Use this conversion function: Code: function xytorgb(x, y, level) You also need to pass the light level (0..254) for the conversion to work. RE: Phlips Hue - RGB Color Feedback - Zigbee - stianj - 25.09.2024 Thank you so much! This works nicely! Can I ask why getxy() returns not xy? But I think I have uncovered a bug in the Mosaic RGBW dimmer (6 byte DALI) widget. It seems it expects 0-255 values, but according to this: https://support.knx.org/hc/en-us/article_attachments/15392631105682 (and my Gira devices...) the 6 byte DPT 251.600 should have 0-100 as value for the different colours. Unlike 232.600 which is 0-255... Yay for consistency from KNX... Unless I'm mistaken (which I very much could be...) it would be awesome if this could be fixed in the next FW release RE: Phlips Hue - RGB Color Feedback - Zigbee - admin - 25.09.2024 The actual range is 0..255 which is treated as 0..100%. Notice the resolution is ~0.4% (100/255). RE: Phlips Hue - RGB Color Feedback - Zigbee - stianj - 25.09.2024 Might be... But Gira sends (and expects) 0-100. But that might be their bug, I don't have anything else to compare with. (But why is the DPT 232.600 showing expected value to be 0-255, while DPT 251.600 shows 0-100 in the specifications?) Seems atleast a MDT Dali controller does the same: https://community.openhab.org/t/rgbw-color-out-of-range-dpt-251-600/150055 RE: Phlips Hue - RGB Color Feedback - Zigbee - stianj - 17.10.2024 I still think I'm right about the 6 bit DALI RGBW DPT... But anyways, your xytorgb() works very good. I have not been comparing input and output, because that doesn't really matter, but I just noticed that for different green colours, I usually get the same feedback anyways... rgb(0 149 48) gives me x=11049, y=44152 rgb(0 255 0) gives me x=11299, y=48940 But running both these coordinates through xytorgb() gives me 0,255,0 as feedback... As I wrote, I understand that it's impossible to match input and feedback 100%, but I feel this should have been better..? What do you think? RE: Phlips Hue - RGB Color Feedback - Zigbee - Daniel - 17.10.2024 MDT is brand labeling this from IPAS and they have new firmware which is fixing this bug. Check if MDT already released latest version. Same works correct on SE (also IPAS branded) version. RE: Phlips Hue - RGB Color Feedback - Zigbee - admin - 17.10.2024 Try this updated conversion function: Code: function xytorgb(x, y, level) RE: Phlips Hue - RGB Color Feedback - Zigbee - stianj - 22.10.2024 This one is perfect, thank you so much! I didn't notice that I had getlevel before setrgb, so things didn't really make sense. But eventually I saw my mistake and now it's 100%! Thank you! |