Christian-Me/node-red-contrib-chroma

Input output questions

Opened this issue · 3 comments

I’m clearly doing something wrong here…

I’ve tried to check out the examples and tweaked the input accordingly, however everything I’ve tried fails or doesn’t seem to line up/be correct.

I’m trying to insert a temperature, as of my current test 3400, which should be warm/orange ish however it’s returning hex 000d48. The hex changes if I input the same as a string or an integer. Last try was sending the value as msg.payload.

What’s the correct way to get the right value?

Hi, sorry for my late reply. I took a break from all coding stuff ...

can you please test version 0.0.4 (from github) npm install Christian-Me/node-red-contrib-chroma from within .node-red

Please send input of as color temperature = msg.payload.temperature

this version uses a patched chroma.js version to handle color temperatures from 1000 to 2000k. Not finally tested.

No dice. msg.payload.temperature produces Input not supported. msg.payload with a value of 3850 produces rgb(0,15,10) or #000f0a which should be more like rgb 255,202,158.

Hmmm ... have you installed version 0.0.4 (from github)?
image
gives me this:
image

[{"id":"ea57dd9f432a5f26","type":"inject","z":"af15792c200fa61a","name":"","props":[{"p":"payload.temperature","v":"3850","vt":"num"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":110,"y":380,"wires":[["f969f062085ca90d"]]},{"id":"f969f062085ca90d","type":"chroma","z":"af15792c200fa61a","name":"","outFormat":"rgbString","array2object":false,"floatOutput":false,"inputRelativeValues":"percent","outputRelativeValues":"percent","x":240,"y":380,"wires":[["43e2ef063e1f7fe8"]]},{"id":"43e2ef063e1f7fe8","type":"debug","z":"af15792c200fa61a","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":420,"y":380,"wires":[]}]