node-red-contrib-nora
node-red-contrib-nora copied to clipboard
[feature] Add support for colored lights
Hello, what about color support for light?
It's already present on the service, the node-red node needs to be updated to support it. PRs are welcomed! :)
I'm also looking at trying to get the colours working on neopixels connected to a Pi through this excellent service. What needs changing in node-red?
Hi, thank you for this amazing service! :) I am actually also looking for the color support. (yes I do have the latest version installed) What needs to change to make it work? Thanks again
The light node needs a new checkbox and the rules (when it's visible or not based on the other checkboxes): https://github.com/andrei-tatar/node-red-contrib-nora/blob/master/src/nodes/nora-light.html
I already started working on this at some point (see the light-color
id div). I might get some time to look over this in the following days.
I'm waiting too for this function! :) i mounted the rgb led but i can't control the color with google
Hello, I am using this node and I would like to be able to use the RGB of the lights. I have updated Node network and nora to its latest versions.
How is this topic going?
Not too great. I usually implement only the things I also need because there's a lot of time needed to keep up (I would also like to add support for local execution). Contributions are greatly appreciated! :)
I'm also waiting impatiently :) is there an estimate of when the function could be finished?
Hello,
I'm trying to implement colors for NORA on node-red, but I realized that on the service you only implemented HSV (https://developers.google.com/assistant/smarthome/traits/colorsetting#rgb,-hsv,-and-color -temperature).
Any reason not to enable RGB and temperature?
HSV can be converted to RGB in the plugin (or by some other node-red plugin). Just a bit of maths. Also I was thinking of updating the V (from HSV) via brightness in case of colored lights. Temperature... not sure who of the DIY-ers need this... Probably most of us will play will colored RGBs. But feel free to add support to backend as well for RGB/temperature if you find it useful. I will have a look at the PR.
So I found another method to perform the core conversion, works very well. Actually, I'm using https://www.npmjs.com/package/color-convert with https://www.npmjs.com/package/node-red-contrib-function-npm. Working very well.
About HSV I didn't know this pattern before. Using here I found out more about it and realized that I can make some improvements later to optimize its use.
About PR, check the TODO that I put.
And I'm sorry for my google english translator :D
![2019-11-22 às 10 47 09](https://user-images.githubusercontent.com/7410060/69431048-ad3aaf00-0d15-11ea-85db-0b203c806353.png)
I will fix the service HSV vs Hsv. Didn't notice they used different caps. Kinda weird. Thanks for noticing that! :)
PR merged
next, we should integrate the color temperature.
noticed 0.0.30 with color support and tried to get it to work(before i noticed things are not finished)
Hue works but S and V need to be selectable between 0-100%
also on the readme you state this
Payload must be an object like { [on]: true/false, [brightness]: 0-100, [color]: { [spectrumHsv] : { [hue]: 0-360, [saturation]:0-1, [value]:0-1 } } }')
i think those [] need to be replaced by ""
so correct syntax is
Payload must be an object like { "on": true/false, "brightness": 0-100, "color": { "spectrumHsv" : { "hue": 0-360, "saturation":0-1, "value":0-1 } } }')
took me a while before i noticed what was wrong
regarding the saturation and value: these do not seem to work. values should go from 0-100 and not 0-1
i am feeding the light this msg.payload but only hue and brightness gets accepted
Square brackets usually mean a field is optional. Of course JSON needs double quotes. However, javascript doesn't (if you write in the function node).
return {
payload: {
on: false,
brightness: 32,
spectrumHsv: {
hue: 31,
},
},
};
yes i write in the function node but send it out as json (just like it is received as json.
UPDATE i discoverd the problem. Sat needs to be divided between 100
discovered that everything is pushed from domoticz to node-red-nora ok going back from nora to domoticz it seems domoticz has no way of pushing back sat, only hue???
strange
@Sw0rdf1sh1
should this not be closed.