Flashing a Hue light in red with Node Red

Hi all,

Quick question about NodeRed and flashing a Philips Hue color light. I can’t seem to get it working…! Very frustrating :wink:

JSON in my “Call service” entity:

{
    "flash": "long",
    "color_name": "red",
    "brightness_pct": "100"
}

Following error occurs:

Call-service API error.  Error Message: 201: parameter, xy, is not modifiable. Device is set to off.

Not working:
image

If set them all apart, its working perfectly, but how to combine these three JSON parameters in one “call service”?

Working:
image

Can anybody jump in? :slight_smile:

Just tried it out myself. Put the flash command as the last order. And it works fine :slight_smile:

{
   "color_name": "red",
   "brightness_pct": "100",
   "flash": "long"
}
1 Like

Thanks for your reply!

I changed the JSON but as soon as i call the service it comes with a new error:

Any idea?

Just to make sure, you are actually calling the turn_on service right?
It has to look like this:

image

Hi Marcus,

Yes, i got some proof :wink:

Got it working!

It seems that it is not possible (and necessary) to combine brightness and flash.

{
    "color_name": "red",
    "flash": "long"
}

Thanks for your help Marcus!

1 Like

Problem seems to be, that the flash is taking precedence over all the commands.
On top, it will always return the lamp to the state it was before in brightness or off.

It will flash with the color the lamp has saved in its config to 100% and off again.
New color information will only be sent after the flash. That is also where the error comes from. You cannot set color without turning it on if its off.

So, seems like the only possible way to actually flash it with a new color seems to be to first set the color (turning the lamp on at the same time) while then turning it off again after a short delay. Then send the flash command.

That way the lamp will flash and then turn off again in the desired color.

1 Like

Hi Marcus,

I now got it working with only one “Call service”:

Working:

{
    "color_name": "red",
    "flash": "long"
}

Not working:

{
    "color_name": "red",
   "brightness_pct": "100"
    "flash": "long"
}

The problem seems to be a combination with brightness_pct and flash?

came here because of the flash issue, not Node Red, sorry. Seems to not work at all? even setting it ro red, and then flash:

lights_flash_on:
  mode: restart
  sequence:
    - service: light.turn_on
      data:
        entity_id: light.world_map
        color_name: red
    - service: script.lights_flash
    - delay:
        seconds: 15
    - service: script.lights_flash_followup

anyways, no Node Red, so will leave here…

I know this is old now but it was probably because your sending the brightness value as a string and not an integer…

i.e send as 100 not “100” ← no quotes