MQTT color of Ikea TRÅDFRI GU10 LED 345lm 4,6W RGBW

After countless nights of trying and testing, I have the above bulb so far that everything works, except for the color switching (RGB).

It would be very nice if someone could help to figure out so i can also switch the color via openHAB.

If this has not yet become clear, the communication path is as follows:
openHAB > MQTT binding > Zigbee2MQTT > Zigbee-Stick > Ikea LED1923R5

Here my configuration:

zigbee.things:

Bridge mqtt:broker:MQTTBroker [
    host="192.168.1.115",
    secure=false
]{
    Thing mqtt:topic:zigbee2mqtt "Zigbee2MQTT" (mqtt:broker:MQTTBroker) [
        availabilityTopic="zigbee2mqtt/bridge/state",
        payloadAvailable="online",
        payloadNotAvailable="offline"
    ] {
    }

    Thing mqtt:topic:zigbee2mqtt:Flur_Leu "[Flur] Leuchte" (mqtt:broker:MQTTBroker) [
        availabilityTopic="zigbee2mqtt/[Flur] Leuchte/availability",
        payloadAvailable="online",
        payloadNotAvailable="offline"
    ] { Channels:
        Type switch : state		"Ein/Aus"		    [
                commandTopic="zigbee2mqtt/[Flur] Leuchte/set/state",
                stateTopic="zigbee2mqtt/[Flur] Leuchte/state",
                on="ON", off="OFF" ]   
        Type dimmer : dimmer "Dimmer" [
				stateTopic="zigbee2mqtt/[Flur] Leuchte/brightness",
				commandTopic="zigbee2mqtt/[Flur] Leuchte/set/brightness", 
				min=1, 
				max=255, 
				step=1  ]
        Type dimmer : color_temp "Farbtemperatur" [   
                stateTopic="zigbee2mqtt/[Flur] Leuchte/color_temp",   
                commandTopic="zigbee2mqtt/[Flur] Leuchte/set/color_temp", 
                min=250, 
                max=454 ]
        Type color : color "Farbe" [**
                stateTopic="zigbee2mqtt/[Flur] Leuchte/color_xy",**
                commandTopic="zigbee2mqtt/[Flur] Leuchte/set/color_xy",**
                formatBeforePublish="{\"color\":{\"rgb\": \"%s, %s, %s\"}}" ]**
    }
}

zigbee.items:

Switch Flur_E_A "[Flur] E_A"  <switch>  (gDG,gAll) { channel="mqtt:topic:zigbee2mqtt:Flur_Leu:state" }
Dimmer Flur_Dim "[Flur] Dim"  <dimmer>   { channel="mqtt:topic:zigbee2mqtt:Flur_Leu:dimmer", autoupdate="false" }
Dimmer  Flur_Farbtemp "[Flur] Farbtemperatur"   <colorpicker>                { channel="mqtt:topic:zigbee2mqtt:Flur_Leu:color_temp" }
Color  Flur_Farb "[Flur] Farbe"   <colorpicker>                { channel="mqtt:topic:zigbee2mqtt:Flur_Leu:color" }**

  • Platform information:
    • Hardware: 3 Nodes
    • OS: microk8s
    • openHAB version: 3.4.4

I remeber that I got it working like descriped here:

In my setup I have 2 channels

  • id: color
    channelTypeUID: mqtt:string
    label: Color
    description: null
    configuration:
    commandTopic: zigbee2mqtt/Hue_Essen_3/set
    postCommand: false
    retained: false
    formatBeforePublish: ‘{“color”:{“hsb”: “%s”}}’
    stateTopic: zigbee2mqtt/Hue_Essen_3/color-hsb
  • id: color_control
    channelTypeUID: mqtt:color
    label: Color Master
    description: null
    configuration:
    commandTopic: zigbee2mqtt/Hue_Essen_3/set
    colorMode: HSB
    transformationPatternOut: JS:colorcsv2json.js
    stateTopic: zigbee2mqtt/Hue_Essen_3
    transformationPattern: JS:colorjson2csv.js

I use color if I just send HSB Values within a rule.
And color_control for the color picker web ui

I have the following thing configuration for color with zigbee2mqtt

configuration:
      formatBeforePublish: '{"color":{"rgb":"%s,%s,%s"}}'
      commandTopic: zigbee2mqtt/<devicename>/set
      colorMode: RGB

Thank you for your answers.

Had to try a few more hours now though.

This did the trick so now I can change the color:

Type color : color "Farbe" [
                stateTopic="zigbee2mqtt/[Flur] Leuchte/get",
                commandTopic="zigbee2mqtt/[Flur] Leuchte/set",
                colorMode="RGB",
                formatBeforePublish="{\"color\":{\"r\":%1$d,\"g\":%2$d,\"b\":%3$d}}" ]

However, the item still shows 3 sliders in HSB, is it possible to change that to RGB as well?

That’s only depended on your UI

If you use mainUI have a look into colorpicker