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

Problem parsing color #88

Open
palsbo opened this issue Nov 11, 2022 · 2 comments
Open

Problem parsing color #88

palsbo opened this issue Nov 11, 2022 · 2 comments

Comments

@palsbo
Copy link

palsbo commented Nov 11, 2022

I try to chage color on a RGB light bulb (color node).
When reading from the node, it says "deviceType: 'color', value: array[3].
I try to inject
msg.payload={"value":[200,0,0]}
msg.topic = color
but get an error "Error updating device"
I can change the switch, the level and the temperature with no problem, but the color fails. Wat am I doing wrong?

@dangruhn
Copy link

I have the same problem. Bumping this to see if we can get a response

@johnwalicki
Copy link
Contributor

I looked into why the node-red-contrib-smartthings Color Light node smartthings-color.js does not work correctly. I see that @otaviojr implemented a rgbToHsl() function that is incorrect. I updated the code to another implementation. That function returns the correct Hue, Saturation, Lightness values.

Unfortunately my LIFX color light bulb still doesn't work as expected through the SmartThings API calls.

I've been using the smartthings CLI to test and also implement it in the Node-RED node.js code.

I changed the smartthings-color.js from sending multiple SmartThings API commands with distinct calls. Here's the CLI commands:

smartthings devices:commands xxxx-xxxx-xxxx-xxxx 'main:colorControl:setHue(68)'
smartthings devices:commands xxxx-xxxx-xxxx-xxxx 'main:colorControl:setSaturation(81)'
smartthings devices:commands xxxx-xxxx-xxxx-xxxx 'main:switchLevel:setLevel(50)'

to single call to setColor()

smartthings devices:commands xxxx-xxxx-xxxx-xxxx 'main:colorControl:setColor({"saturation":81,"hue":68})'

which has no discernible affect.

I just don't think Third Party API connector calls are working as expect through the SmartThings integration. Some conversation here

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

3 participants