Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input output questions #2

Open
ncc0624 opened this issue Mar 6, 2022 · 3 comments
Open

Input output questions #2

ncc0624 opened this issue Mar 6, 2022 · 3 comments

Comments

@ncc0624
Copy link

ncc0624 commented Mar 6, 2022

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?

@Christian-Me
Copy link
Owner

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.

@ncc0624
Copy link
Author

ncc0624 commented Mar 20, 2022

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.

@Christian-Me
Copy link
Owner

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":[]}]

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

No branches or pull requests

2 participants