Christian-Me / node-red-contrib-homie-convention

Node-RED node for MQTT communication according the Homie Convention
Apache License 2.0
13 stars 2 forks source link

rgb node cases TypeError if the colour picker set to send a string #10

Open SvenDowideit opened 3 years ago

SvenDowideit commented 3 years ago

I get

10/03/2021, 11:38:06 amnode: 63f3c1e5.241038
msg : error
"TypeError: colors[i].includes is not a function"
SvenDowideit commented 3 years ago

aha, but as an object, it works!

so a bug we can work around :)

SvenDowideit commented 3 years ago

note that when you do this, you need a function to convert the string that is output by the homie node into an object or "rgb(...)" string.

Christian-Me commented 3 years ago

Thanks for the issue & workaround. Currently working on a complete rewritten version. I will separate the dashboard part from the "pure" homie part. Hope I can post the update in a few weeks. Will address the different colour formatting. But there are so many ... Object is the most convenient (for me)

SvenDowideit commented 3 years ago

oooer. I guess I'll wait for that before i start looking at hacking some of my ideas :)

Christian-Me commented 3 years ago

I try to post a development version soon. Happy to hear your ideas and comments.

Christian-Me commented 3 years ago

Here a sneek prieview ... Think you get the idea: image

Christian-Me commented 3 years ago

I pushed a development branch. If interested you can give it a try.

Had it lying around quite a while doing other stuff like my own ESP based homie framework so it took a wile to understand all my own legacy code. All still alpha/beta, but I start rolling it out into my live system ... so should be "usable" with some bugs and sharp edges.

current status:

Any Inputs and ideas welcome :)