Open xenio opened 6 years ago
Hey xenio, i think you did nothing wrong, there was and issue in my node which i found thx to your issue, please update node-red-contrib-wifi370 to version 2.0.2 and try agaun. regards tristan
Updated, the error is gone but the color doesn't change I have this controller, I don't know, maybe it is not compatible. https://www.banggood.com/ARILUX-AL-LC01-Super-Mini-LED-WIFI-Smart-RGB-Controller-For-RGB-LED-Strip-Light-DC-9-12V-p-1058603.html?cur_warehouse=CN
when ON/OFF are working im pretty sure there is an issue in my plugin (for LW686), this part of my plugin was contributed so im not 100% if the implementation is correct as i have LW12 controller.
you should be able to figure it out using a "function node": see here: https://github.com/firsttris/node-red-contrib-wifi370#the-vanilla-way
you have to send a buffer via tcp to your device
Create a function node using the following content:
[starting-bit, red, green, blue, ending-bit]
function node example for LW12: const buffer = new Buffer([86, 255, 0, 0, 170]); msg.payload = buffer; return msg;
but fow LW686 there is a different implementation and im not 100% sure if this is correct: https://github.com/firsttris/node-red-contrib-wifi370/blob/master/wifi370.js#L62
ON [129,51,36,97,1,12,0,25,255,0,4,0,0,98] OFF [129,51,35,97,1,12,0,25,255,0,4,0,0,97] RED [129,51,35,97,1,12,255,0,0,0,4,0,0,72] GREEN [129,51,35,97,1,12,0,255,0,0,4,0,0,72] BLUE [129,51,35,97,1,12,0,0,255,0,4,0,0,72]
This is what I get from the INFO command, but I don't think it is useful.
Maybe this could help, both of this script are working. A python script: https://github.com/beville/flux_led and a component for Home Assistant https://github.com/home-assistant/home-assistant/blob/master/homeassistant/components/light/flux_led.py
If I pass RGB with the COLOR Option I get this error in the node-red debug window. msg : error "ReferenceError: controllerName is not defined"
ON and OFF are working well, I am using controlled LD686. Am I doing something wrong?