Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

COLOR Error #1

Open
xenio opened this issue Dec 4, 2017 · 4 comments
Open

COLOR Error #1

xenio opened this issue Dec 4, 2017 · 4 comments

Comments

@xenio
Copy link

xenio commented Dec 4, 2017

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?

@firsttris
Copy link
Owner

firsttris commented Dec 5, 2017

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

@xenio
Copy link
Author

xenio commented Dec 5, 2017

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

@firsttris
Copy link
Owner

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

@xenio
Copy link
Author

xenio commented Dec 5, 2017

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants