Here is the full flow. Far from perfect, hope you can figure it out
BTW they are releasing WT5 LED controller which will work over tuya platform.
[{"id":"60448fcd.9cf37","type":"tab","label":"Skydance Wifi Relay","disabled":false,"info":""},{"id":"d4b8a2c5.55a25","type":"server-state-changed","z":"60448fcd.9cf37","name":"Zone 3 ON/OFF","server":"bc7d368a.7f5138","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.skydance_zone3_power","entityidfiltertype":"exact","outputinitially":false,"state_type":"habool","haltifstate":"true","halt_if_type":"bool","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":160,"y":60,"wires":[["a0635d34.adf23"],["3615c486.65ec9c"]]},{"id":"a0635d34.adf23","type":"function","z":"60448fcd.9cf37","name":"Turn ON Zone 3 packet","func":"nr=Math.floor(Math.random() * 99 + 0);\nmsg.payload=\"55AA5AA57E\"+nr+\"80218012340000\"+\"01\"+\"000A01000\"+\"1\"+\"007E\";\n\nfunction toAscii(str1)\n {\n\tvar hex = str1.toString();\n\tvar str = '';\n\tfor (var n = 0; n < hex.length; n += 2) {\n\t\tstr += String.fromCharCode(parseInt(hex.substr(n, 2), 16));\n\t}\n\treturn str;\n }\n\nmsg.payload = toAscii(msg.payload);\nmsg.payload = new Buffer(msg.payload, \"ascii\");\n\nreturn msg;\n\n\n\n\n\n","outputs":1,"noerr":0,"x":610,"y":60,"wires":[["45f3dc51.e5ea84"]]},{"id":"3615c486.65ec9c","type":"function","z":"60448fcd.9cf37","name":"Turn OFF Zone 3 packet","func":"nr=Math.floor(Math.random() * 99 + 0);\nmsg.payload=\"55AA5AA57E\"+nr+\"80218012340000\"+\"01\"+\"000A01000\"+\"0\"+\"007E\";\n\nfunction toAscii(str1)\n {\n\tvar hex = str1.toString();\n\tvar str = '';\n\tfor (var n = 0; n < hex.length; n += 2) {\n\t\tstr += String.fromCharCode(parseInt(hex.substr(n, 2), 16));\n\t}\n\treturn str;\n }\n\nmsg.payload = toAscii(msg.payload);\nmsg.payload = new Buffer(msg.payload, \"ascii\");\n\nreturn msg;\n\n\n\n\n\n","outputs":1,"noerr":0,"x":610,"y":100,"wires":[["45f3dc51.e5ea84"]]},{"id":"863e6021.0b26e","type":"server-state-changed","z":"60448fcd.9cf37","name":"Zone 4 ON/OFF","server":"bc7d368a.7f5138","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.skydance_zone4_power","entityidfiltertype":"exact","outputinitially":false,"state_type":"habool","haltifstate":"true","halt_if_type":"bool","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":160,"y":120,"wires":[["1e5ce75d.cfdaa9"],["ac4dec68.b2005"]]},{"id":"1e5ce75d.cfdaa9","type":"function","z":"60448fcd.9cf37","name":"Turn ON Zone 4 packet","func":"nr=Math.floor(Math.random() * 99 + 0);\nmsg.payload=\"55AA5AA57E\"+nr+\"80318012340000\"+\"02\"+\"000A01000\"+\"1\"+\"007E\";\n\nfunction toAscii(str1)\n {\n\tvar hex = str1.toString();\n\tvar str = '';\n\tfor (var n = 0; n < hex.length; n += 2) {\n\t\tstr += String.fromCharCode(parseInt(hex.substr(n, 2), 16));\n\t}\n\treturn str;\n }\n\nmsg.payload = toAscii(msg.payload);\nmsg.payload = new Buffer(msg.payload, \"ascii\");\n\nreturn msg;\n\n\n\n\n\n","outputs":1,"noerr":0,"x":590,"y":160,"wires":[["45f3dc51.e5ea84"]]},{"id":"ac4dec68.b2005","type":"function","z":"60448fcd.9cf37","name":"Turn OFF Zone 4 packet","func":"nr=Math.floor(Math.random() * 99 + 0);\nmsg.payload=\"55AA5AA57E\"+nr+\"80318012340000\"+\"02\"+\"000A01000\"+\"0\"+\"007E\";\n\nfunction toAscii(str1)\n {\n\tvar hex = str1.toString();\n\tvar str = '';\n\tfor (var n = 0; n < hex.length; n += 2) {\n\t\tstr += String.fromCharCode(parseInt(hex.substr(n, 2), 16));\n\t}\n\treturn str;\n }\n\nmsg.payload = toAscii(msg.payload);\nmsg.payload = new Buffer(msg.payload, \"ascii\");\n\nreturn msg;\n\n\n\n\n\n","outputs":1,"noerr":0,"x":590,"y":200,"wires":[["45f3dc51.e5ea84"]]},{"id":"e9f016b7.d89928","type":"server-state-changed","z":"60448fcd.9cf37","name":"Master ON/OFF","server":"bc7d368a.7f5138","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.skydance_power","entityidfiltertype":"exact","outputinitially":false,"state_type":"habool","haltifstate":"true","halt_if_type":"bool","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":160,"y":180,"wires":[["93d1f7ad.448d28"],["6cf5822e.3bc67c"]]},{"id":"93d1f7ad.448d28","type":"function","z":"60448fcd.9cf37","name":"Master ON packet","func":"nr=Math.floor(Math.random() * 99 + 0);\nmsg.payload=\"55AA5AA57E\"+nr+\"80118012340000\"+\"0FFF0B030000000\"+\"1\"+\"007E\";\n\nfunction toAscii(str1)\n {\n\tvar hex = str1.toString();\n\tvar str = '';\n\tfor (var n = 0; n < hex.length; n += 2) {\n\t\tstr += String.fromCharCode(parseInt(hex.substr(n, 2), 16));\n\t}\n\treturn str;\n }\n\nmsg.payload = toAscii(msg.payload);\nmsg.payload = new Buffer(msg.payload, \"ascii\");\n\nreturn msg;\n\n\n\n\n\n","outputs":1,"noerr":0,"x":410,"y":260,"wires":[["45f3dc51.e5ea84"]]},{"id":"6cf5822e.3bc67c","type":"function","z":"60448fcd.9cf37","name":"Master OFF packet","func":"nr=Math.floor(Math.random() * 99 + 0);\nmsg.payload=\"55AA5AA57E\"+nr+\"80118012340000\"+\"0FFF0B030000000\"+\"0\"+\"007E\";\n\nfunction toAscii(str1)\n {\n\tvar hex = str1.toString();\n\tvar str = '';\n\tfor (var n = 0; n < hex.length; n += 2) {\n\t\tstr += String.fromCharCode(parseInt(hex.substr(n, 2), 16));\n\t}\n\treturn str;\n }\n\nmsg.payload = toAscii(msg.payload);\nmsg.payload = new Buffer(msg.payload, \"ascii\");\n\nreturn msg;\n\n\n\n\n\n","outputs":1,"noerr":0,"x":410,"y":300,"wires":[["45f3dc51.e5ea84"]]},{"id":"1a7449cb.861336","type":"server-state-changed","z":"60448fcd.9cf37","name":"Scene 1","server":"bc7d368a.7f5138","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.skydance_scene_1","entityidfiltertype":"exact","outputinitially":false,"state_type":"habool","haltifstate":"true","halt_if_type":"bool","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":140,"y":400,"wires":[["77124c03.b066f4","2b73b324.26bd4c"],[]]},{"id":"77124c03.b066f4","type":"function","z":"60448fcd.9cf37","name":"Scene 1 packet","func":"nr=Math.floor(Math.random() * 99 + 0);\nmsg.payload=\"55AA5AA57E\"+nr+\"80118012340000\"+\"01\"+\"FF04020001\"+\"01\"+\"007E\";\n\nfunction toAscii(str1)\n {\n\tvar hex = str1.toString();\n\tvar str = '';\n\tfor (var n = 0; n < hex.length; n += 2) {\n\t\tstr += String.fromCharCode(parseInt(hex.substr(n, 2), 16));\n\t}\n\treturn str;\n }\n\nmsg.payload = toAscii(msg.payload);\nmsg.payload = new Buffer(msg.payload, \"ascii\");\n\nreturn msg;\n\n\n\n\n\n","outputs":1,"noerr":0,"x":400,"y":420,"wires":[["45f3dc51.e5ea84"]]},{"id":"45f3dc51.e5ea84","type":"tcp request","z":"60448fcd.9cf37","server":"192.168.1.49","port":"8899","out":"immed","splitc":" ","name":"To Wifi Relay","x":1030,"y":360,"wires":[[]]},{"id":"d2adedc0.c61bf","type":"function","z":"60448fcd.9cf37","name":"Scene 2 packet","func":"nr=Math.floor(Math.random() * 99 + 0);\nmsg.payload=\"55AA5AA57E\"+nr+\"80118012340000\"+\"01\"+\"FF04020001\"+\"02\"+\"007E\";\n\nfunction toAscii(str1)\n {\n\tvar hex = str1.toString();\n\tvar str = '';\n\tfor (var n = 0; n < hex.length; n += 2) {\n\t\tstr += String.fromCharCode(parseInt(hex.substr(n, 2), 16));\n\t}\n\treturn str;\n }\n\nmsg.payload = toAscii(msg.payload);\nmsg.payload = new Buffer(msg.payload, \"ascii\");\n\nreturn msg;\n\n\n\n\n\n","outputs":1,"noerr":0,"x":400,"y":516,"wires":[["45f3dc51.e5ea84"]]},{"id":"e846cefe.49231","type":"server-state-changed","z":"60448fcd.9cf37","name":"Scene 2","server":"bc7d368a.7f5138","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.skydance_scene_2","entityidfiltertype":"exact","outputinitially":false,"state_type":"habool","haltifstate":"true","halt_if_type":"bool","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":140,"y":520,"wires":[["d2adedc0.c61bf","5ab9f590.f825ac"],[]]},{"id":"2a7705e8.ca7e6a","type":"function","z":"60448fcd.9cf37","name":"Brightness Zone 3 packet","func":"nr=Math.floor(Math.random() * 99 + 0);\nvar dim = msg.payload;\nvar dimhex = dim.toString(16);\nmsg.payload=\"55AA5AA57E\"+nr+\"80218030710000\"+\"01\"+\"0007020000\"+dimhex+\"007E\";\n\nfunction toAscii(str1)\n {\n\tvar hex = str1.toString();\n\tvar str = '';\n\tfor (var n = 0; n < hex.length; n += 2) {\n\t\tstr += String.fromCharCode(parseInt(hex.substr(n, 2), 16));\n\t}\n\treturn str;\n }\n\nmsg.payload = toAscii(msg.payload);\nmsg.payload = new Buffer(msg.payload, \"ascii\");\n\nreturn msg;\n\n\n\n\n\n","outputs":1,"noerr":0,"x":590,"y":600,"wires":[["45f3dc51.e5ea84"]]},{"id":"7720e55c.7973bc","type":"server-state-changed","z":"60448fcd.9cf37","name":"Zone 3 Slider","server":"bc7d368a.7f5138","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.slider1","entityidfiltertype":"exact","outputinitially":false,"state_type":"num","haltifstate":"","halt_if_type":"num","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":150,"y":600,"wires":[["c29b9b56.6fc3b8"]]},{"id":"3eade0c8.b5afb","type":"function","z":"60448fcd.9cf37","name":"Brightness Zone 4 packet","func":"nr=Math.floor(Math.random() * 99 + 0);\nvar dim = msg.payload;\nvar dimhex = dim.toString(16);\nmsg.payload=\"55AA5AA57E\"+nr+\"80318030710000\"+\"02\"+\"0007020000\"+dimhex+\"007E\";\n\nfunction toAscii(str1)\n {\n\tvar hex = str1.toString();\n\tvar str = '';\n\tfor (var n = 0; n < hex.length; n += 2) {\n\t\tstr += String.fromCharCode(parseInt(hex.substr(n, 2), 16));\n\t}\n\treturn str;\n }\n\nmsg.payload = toAscii(msg.payload);\nmsg.payload = new Buffer(msg.payload, \"ascii\");\n\nreturn msg;\n\n\n\n\n\n","outputs":1,"noerr":0,"x":570,"y":660,"wires":[["45f3dc51.e5ea84"]]},{"id":"4a7ec9b.50f3a38","type":"server-state-changed","z":"60448fcd.9cf37","name":"Zone 4 Slider","server":"bc7d368a.7f5138","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.slider2","entityidfiltertype":"exact","outputinitially":false,"state_type":"num","haltifstate":"","halt_if_type":"num","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":150,"y":660,"wires":[["ee27d9a8.6d6a08"]]},{"id":"ee27d9a8.6d6a08","type":"range","z":"60448fcd.9cf37","minin":"1","maxin":"255","minout":"16","maxout":"255","action":"scale","round":true,"property":"payload","name":"Range Converter","x":350,"y":660,"wires":[["3eade0c8.b5afb"]]},{"id":"ff75ec2b.ebe2d","type":"server-state-changed","z":"60448fcd.9cf37","name":"Tunable white slider","server":"bc7d368a.7f5138","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.slider3","entityidfiltertype":"exact","outputinitially":false,"state_type":"num","haltifstate":"","halt_if_type":"num","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":170,"y":720,"wires":[["bef9e15f.98beb"]]},{"id":"bef9e15f.98beb","type":"range","z":"60448fcd.9cf37","minin":"500","maxin":"153","minout":"16","maxout":"255","action":"scale","round":true,"property":"payload","name":"Range Converter","x":390,"y":720,"wires":[["2c4d86dc.5708fa"]]},{"id":"2c4d86dc.5708fa","type":"function","z":"60448fcd.9cf37","name":"Tunable White packet","func":"nr=Math.floor(Math.random() * 99 + 0);\nvar dim = msg.payload;\nvar wifi= 3071;\nvar dimhex = dim.toString(16);\n//msg.payload=\"55AA5AA57E\"+nr+\"80008012340000\"+\"01\"+\"000d020000\"+dimhex+\"007E\";\nmsg.payload=\"55AA5AA57E\"+nr+\"802180\"+wifi+\"0000\"+\"01\"+\"000d020000\"+dimhex+\"007E\";\n \n\nfunction toAscii(str1)\n {\n\tvar hex = str1.toString();\n\tvar str = '';\n\tfor (var n = 0; n < hex.length; n += 2) {\n\t\tstr += String.fromCharCode(parseInt(hex.substr(n, 2), 16));\n\t}\n\treturn str;\n }\n\nmsg.payload = toAscii(msg.payload);\nmsg.payload = new Buffer(msg.payload, \"ascii\");\n\nreturn msg;\n\n\n\n\n\n","outputs":1,"noerr":0,"x":620,"y":720,"wires":[["45f3dc51.e5ea84"]]},{"id":"a9a11c76.80c42","type":"server-state-changed","z":"60448fcd.9cf37","name":"RED slider","server":"bc7d368a.7f5138","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.slider4","entityidfiltertype":"exact","outputinitially":false,"state_type":"num","haltifstate":"","halt_if_type":"num","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":140,"y":800,"wires":[["9f079185.a6325"]]},{"id":"bd47be71.99844","type":"server-state-changed","z":"60448fcd.9cf37","name":"GREEN slider","server":"bc7d368a.7f5138","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.slider5","entityidfiltertype":"exact","outputinitially":false,"state_type":"num","haltifstate":"","halt_if_type":"num","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":150,"y":860,"wires":[["1bfcc6c9.17ee19"]]},{"id":"e0e29de8.2788c","type":"server-state-changed","z":"60448fcd.9cf37","name":"BLUE slider","server":"bc7d368a.7f5138","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.slider6","entityidfiltertype":"exact","outputinitially":false,"state_type":"num","haltifstate":"","halt_if_type":"num","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":150,"y":920,"wires":[["705729e9.e82288"]]},{"id":"9f079185.a6325","type":"range","z":"60448fcd.9cf37","minin":"1","maxin":"255","minout":"16","maxout":"255","action":"scale","round":true,"property":"payload","name":"Range Converter","x":330,"y":800,"wires":[["5c6a72d1.c72f9c"]]},{"id":"1bfcc6c9.17ee19","type":"range","z":"60448fcd.9cf37","minin":"1","maxin":"255","minout":"16","maxout":"255","action":"scale","round":true,"property":"payload","name":"Range Converter","x":330,"y":860,"wires":[["ffa759ce.c3af08"]]},{"id":"705729e9.e82288","type":"range","z":"60448fcd.9cf37","minin":"1","maxin":"255","minout":"16","maxout":"255","action":"scale","round":true,"property":"payload","name":"Range Converter","x":330,"y":920,"wires":[["9572466d.e90708"]]},{"id":"44ac8c5e.ca00d4","type":"function","z":"60448fcd.9cf37","name":"RGB packet","func":"nr=Math.floor(Math.random() * 99 + 0);\nvar red = 0;\nvar green = 0;\nvar blue = 0;\nvar wifi= 3071;\nred = flow.get(\"red\");\ngreen = flow.get(\"green\");\nblue = flow.get(\"blue\");\n//msg.payload=\"55AA5AA57E\"+nr+\"80318012340000\"+\"02\"+\"00010700\"+red+green+blue+\"000000\"+\"007E\";\nmsg.payload=\"55AA5AA57E\"+nr+\"803180\"+wifi+\"0000\"+\"02\"+\"00010700\"+red+green+blue+\"00000000\"+\"007E\";\n\nfunction toAscii(str1)\n {\n\tvar hex = str1.toString();\n\tvar str = '';\n\tfor (var n = 0; n < hex.length; n += 2) {\n\t\tstr += String.fromCharCode(parseInt(hex.substr(n, 2), 16));\n\t}\n\treturn str;\n }\n\nmsg.payload = toAscii(msg.payload);\nmsg.payload = new Buffer(msg.payload, \"ascii\");\nreturn msg;\n\n\n\n\n\n","outputs":1,"noerr":0,"x":730,"y":860,"wires":[[]]},{"id":"5c6a72d1.c72f9c","type":"function","z":"60448fcd.9cf37","name":"RED var","func":"var red = msg.payload;\nvar redhex = red.toString(16);\nmsg.payload = redhex;\nflow.set(\"red\", redhex);\nreturn msg;","outputs":1,"noerr":0,"x":520,"y":800,"wires":[["44ac8c5e.ca00d4"]]},{"id":"ffa759ce.c3af08","type":"function","z":"60448fcd.9cf37","name":"GREEN var","func":"var green = msg.payload;\nvar greenhex = green.toString(16);\nmsg.payload = greenhex;\nflow.set(\"green\", greenhex);\nreturn msg;","outputs":1,"noerr":0,"x":530,"y":860,"wires":[["44ac8c5e.ca00d4"]]},{"id":"9572466d.e90708","type":"function","z":"60448fcd.9cf37","name":"BLUE var","func":"var blue = msg.payload;\nvar bluehex = blue.toString(16);\nmsg.payload = bluehex;\nflow.set(\"blue\", bluehex);\nreturn msg;","outputs":1,"noerr":0,"x":520,"y":920,"wires":[["44ac8c5e.ca00d4"]]},{"id":"2b73b324.26bd4c","type":"delay","z":"60448fcd.9cf37","name":"","pauseType":"delay","timeout":"500","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":170,"y":340,"wires":[["b9e36001.32b1"]]},{"id":"b9e36001.32b1","type":"api-call-service","z":"60448fcd.9cf37","name":"","server":"bc7d368a.7f5138","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.skydance_scene_1","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":390,"y":360,"wires":[[]]},{"id":"5ab9f590.f825ac","type":"delay","z":"60448fcd.9cf37","name":"","pauseType":"delay","timeout":"500","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":170,"y":460,"wires":[["333b75a1.8fe79a"]]},{"id":"333b75a1.8fe79a","type":"api-call-service","z":"60448fcd.9cf37","name":"","server":"bc7d368a.7f5138","version":1,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.skydance_scene_2","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":390,"y":460,"wires":[[]]},{"id":"c29b9b56.6fc3b8","type":"range","z":"60448fcd.9cf37","minin":"1","maxin":"255","minout":"16","maxout":"255","action":"scale","round":true,"property":"payload","name":"Range Converter","x":350,"y":600,"wires":[["2a7705e8.ca7e6a"]]},{"id":"9c14dedb.cc7cb","type":"api-current-state","z":"60448fcd.9cf37","name":"RGB Light State","server":"bc7d368a.7f5138","version":1,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"light.rgb_lights","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":320,"y":1000,"wires":[["f6110f43.7c1d9"],[]]},{"id":"f6110f43.7c1d9","type":"function","z":"60448fcd.9cf37","name":"To variables","func":"var rgb = msg.data.attributes.rgb_color;\nvar red = rgb[0];\nvar green = rgb[1];\nvar blue = rgb[2];\nvar redhex = red.toString(16);\nvar greenhex = green.toString(16);\nvar bluehex = blue.toString(16);\nflow.set(\"red\", redhex);\nflow.set(\"green\", greenhex);\nflow.set(\"blue\", bluehex);\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":1000,"wires":[["8cc0ad63.4de31"]]},{"id":"8cc0ad63.4de31","type":"function","z":"60448fcd.9cf37","name":"RGB packet","func":"nr=Math.floor(Math.random() * 99 + 0);\nvar red = 0;\nvar green = 0;\nvar blue = 0;\nvar wifi= 3071;\n\nred = flow.get(\"red\");\ngreen = flow.get(\"green\");\nblue = flow.get(\"blue\");\n//msg.payload=\"55AA5AA57E\"+nr+\"80318012340000\"+\"02\"+\"00010700\"+red+green+blue+\"000000\"+\"007E\";\nmsg.payload=\"55AA5AA57E\"+nr+\"803180\"+wifi+\"0000\"+\"02\"+\"00010700\"+red+green+blue+\"00000000\"+\"007E\";\n\nfunction toAscii(str1)\n {\n\tvar hex = str1.toString();\n\tvar str = '';\n\tfor (var n = 0; n < hex.length; n += 2) {\n\t\tstr += String.fromCharCode(parseInt(hex.substr(n, 2), 16));\n\t}\n\treturn str;\n }\n\nmsg.payload = toAscii(msg.payload);\nmsg.payload = new Buffer(msg.payload, \"ascii\");\nreturn msg;\n\n\n\n\n\n","outputs":1,"noerr":0,"x":670,"y":1000,"wires":[["92056e8.da72b9","f07e516a.6cab3"]]},{"id":"92056e8.da72b9","type":"tcp request","z":"60448fcd.9cf37","server":"192.168.1.49","port":"8899","out":"immed","splitc":" ","name":"To Wifi Relay","x":850,"y":1000,"wires":[[]]},{"id":"833b360e.33e3b8","type":"trigger-state","z":"60448fcd.9cf37","name":"RGB Light","server":"bc7d368a.7f5138","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"light.rgb_lights","entityidfiltertype":"exact","debugenabled":false,"constraints":[],"constraintsmustmatch":"all","outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":110,"y":1000,"wires":[["9c14dedb.cc7cb"],[]]},{"id":"f07e516a.6cab3","type":"debug","z":"60448fcd.9cf37","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":870,"y":920,"wires":[]},{"id":"bc7d368a.7f5138","type":"server","z":"","name":"Home Assistant","addon":true}]