Foddy / node-red-contrib-huemagic

Philips Hue node to control bridges, lights, groups, motion sensors, temperature sensors and Lux sensors using Node-RED.
https://flows.nodered.org/node/node-red-contrib-huemagic
Apache License 2.0
200 stars 67 forks source link

Setting Light hex color not working (400 bad request) #360

Open GRX opened 2 years ago

GRX commented 2 years ago

Describe the bug I've updated huemagic to 4.2.2 and now my flow is failing. There are 2 lights that change color every hour using the following msg.payload:

msg.payload = {
    hex: "b387ff"
}

return msg;

Since the last update, this (or any other color/rgb: [255, 255, 255]/etc) results in a 400 - Bad request. Even the alert does not working anymore.

Flow to Reproduce

  1. Update to 4.2.2
  2. Create a payload using a function block
  3. Send payload including hex/rgb to the destined light
  4. Observe debug window/logs

Expected behavior The light to change to specified color

Screenshots image

Please complete the following information:

ptweety commented 2 years ago

Hi @GRX, are the affected bulbs original Signify / Hue ones?

GRX commented 2 years ago

Hi, Yes, this affects all bulbs. I have Ikea bulbs as original Signify/Hue bulbs and spots and none of them seem to work.

However; I've converted the Hex colors to XY, because colorXY seems to be working :)

uli-rpi commented 2 years ago

How to convert hex to colorXY?

GRX commented 2 years ago

How to convert hex to colorXY?

You can use This tool, set the Input system to Hex. Once you've pasted the Hex color, you can use the first 2 coordinates at XYZ (so XY) to use in your payload.

andesse commented 2 years ago

XY colors are the actual way to send them to the lamps, since HUE changed the API. The RBG / hex values in HueMagic just got actually translated into XY.

To run it reliable, I recommend to use only XY colors.