RGB Light with NodeRed

Hi there,

I’m using this device in my Wifi: WiFi RGB Controller

I don’t want to use it for RGB-Stripes. Just for different LED-Lights.
Therefore I connected LEDs to the “Blue” output of the controller.

Dimming with “Magic Home”-App works perfect. I chose “blue” and then I can control the brightness very nice.
In Home Assistant (with Magic Home Integration) it also works that well, if I control the Entity (color blue, set brightness 0-100%)

But in NodeRed it doesn’t work that well. Seems that I can’t control the brightness properly.

What should it do?
If “KNX Szenennummer” has the value “2”, the “blue” should be switched on with 20% brightness.

I even tried other properties like “rgb_color”, “hs_color”, “rgbw_color”. But it always has one (the same) brightness. Doesn’t matter, which brightness I set.

I think there is something fundamental wrong?

Cheers and thank you in advance!

“hs_color” stands for hue and saturation. Outside HA you will see other instances of “hsb”, which includes brightness. Similarly, “rgb_color” does not include brightness. Instead you should set a separate property - either “brightness_pct” or “brightness”.

I find it easiest to first try things out in Dev Tools, and then manually convert the YAML to JSON for Node Red. To do this you must first select the specific light entity so you can see what properties it supports.

You mean this one?

So for example, if I would like to switch on blue with 50% - what should I have to write in the data-field of the “call-service” in node red?

These attributes are also described in the Magic Home -Integration

Cheers!

Under “Dev Tools > Services” you can test a call of the service. But extending what you’ve currently got for Node Red, this would be:

{
    "hs_color": [240, 20],
    "brightness_pct": 50
}
2 Likes

PERFECT! That’s it! Works! Thank you!