Connect Hue with RGBW

Hi Guys

I have a little Problem with Hue

I have KNX and want to control Hue

From KNX i just have seperate Objects for R,G,B,W and want to connect this to the Hue ligth.
But how can i do this. theoretical i ned 4 Sliders for R,G,B,W
I can choose HSL oder HSB


There is a node available 'node-red-contrib-color-convert' which can convert RGB to HSL/HSV. For the W you may need to do it seperately in Kelvin.

Can you give us an example of the objects?

You might have to store the values using context variables. There’s a page in the docs called “working with context”

Can you give me an example of the color convert ?

As the documentation describes:

For the first 3 input modes the node will attempt to determine the input format of msg.payload from the 3 following:

  • a 3 segment array with values between 0-255 for RGB.
  • a 3 segment array for HSL and HSV with Hue is between 0-360 and Saturation, Level, values 0-100.
  • a object with keys red,green,blue with values between 0-255.
  • a object with keys hue,saturation,lightness or value,brightness with values between 0-360 for hue and 0-100 for the others.

Do you have RGBW payload available ? If yes, what does it look like ?

One option could be to use a function-node. In my plugin homebridge-mqtt you'll find 2 convert-functions (

Utils.rgb2hsv = function(r, g, b) {


Utils.hsv2rgb = function (h, s, v) {

Maybe is now Clearer what i mean.
Maybe someone has an Expample.
Im verry new with node Red

3 separate payloads can be combined with the join node.

What does the ouput of the knx node produce? (Connect a debug node to it)

Thats why i said im newbie how must i do that ?

What does the ouput of the knx node produce? (Connect a debug node to it)

Assuming you are using the heumagic node:

  1. You need to send an object like this (see doc):
  1. First build an array with the join node and then an object with the template node.

Import and try this flow:


Hallo, danke für den Hinweis auf die Funktionen. Mir ist nicht klar wie die Eingangsparameter sein sollen. Ich habe h = 60, s = 75 und v = 185 (gesendet von Zigbee2MQTT) - wenn ich die Funktion damit aufruf kommen unsinnige Werte dabei heraus.

Danke für ein Lichtblick :wink: