jdomeij / node-red-contrib-node-hue

Node RED nodes for controlling Philips Hue lights
Apache License 2.0
17 stars 8 forks source link

Unable to change color #19

Closed N00BMmika closed 6 years ago

N00BMmika commented 6 years ago

Changing "on", "duration" and "bri" values works fine, but I'm not able to change light color.

I tried to send

{"xy":[0.3329,0.3345],"on":true, "duration":100, "bri":100}
{"xy":[0.3273,0.3163],"on":true, "duration":100, "bri":100}

and

{"x": 0.3273,"y":0.3163, "on":true, "duration":100, "bri":100}
{"x":0.3329 ,"y":0.3345, "on":true, "duration":100, "bri":100}

but the color does not change. Light goes on with full brightness with previously defined color. I tried also change "rgb" instread of "xy" value but no success. Is color changing supported?

xy values got to my test was output of debug node when changing color with phone app.

object
on: true
reachable: true
bri: 100
xy: array[2]
0: 0.3329
1:  
hsv: array[3]
0: 30
1: 10
2: 100
rgb: array[3]
0: 254
1: 241
2: 229
hex: "FEF1E5"
color: "oldlace"
mired: 454
kelvin: 2203
N00BMmika commented 6 years ago

Tried also

{"hue": 300,"sat":10, "on":true, "duration":100, "bri":100}

and

{"hue": 30,"sat":10, "on":true, "duration":100, "bri":100}

as instructed in https://github.com/jdomeij/node-red-contrib-node-hue/issues/11#issuecomment-347339754

It works for "Hue go" light but not for "Hue ambience candle". The debug values on previous message was from "Hue ambience candle" e.g. color values should be valid for the light.

jdomeij commented 6 years ago

Some fast googling indicates that "Hue ambience candle" doesn't have any color, only color temperature Try to set the "mired" or "kelvin" parameter

N00BMmika commented 6 years ago

Both "mired" and "kelvin" worked for both "hue ambience candle" and "hue go". Thanks for quick help! 👍