RGB to separate objects - 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: RGB to separate objects (/showthread.php?tid=4499) |
RGB to separate objects - tomnord - 14.01.2023 Hi. I know I've seen it on the forum before, but could not find it. To get RGB to work in Google Home, I need to convert RGB (232.600) to separate 1byte values. And also convert the status back from 1byte to 232.600. RE: RGB to separate objects - tigi - 14.01.2023 Hi, I asked your question to the chatgpt AI and got a working result, hope this works for you too. Function to convert KNX RGB datatype to separate 1-byte values: Code: function knxRGBToBytes(knxRGB) The other function convert separate 1-byte values to KNX RGB datatype: Code: function bytesToKNXRGB(red, green, blue) |