Successfully Setting RGB Colors on Ikea TRÅDFRI GU10 LED

Hey everyone, I wanted to share my experience with setting up the RGB colors on my new Ikea TRÅDFRI GU10 LED bulbs. After a bit of trial and error, I finally got everything working smoothly with openHAB and MQTT. Let me walk you through how I did it!

First, I connected my bulbs to the Zigbee2MQTT bridge using my Sonoff Zigbee stick. Initially, I was a bit puzzled because while the brightness and color temperature worked perfectly, the RGB feature wasn’t responding as expected. I tried adjusting the color settings through the openHAB interface, but nothing changed. Frustrated but determined, I decided to dig deeper into the configuration.

I spent countless hours tweaking my MQTT bindings and checking the state topics. It turns out the issue was with how the color values were being formatted in the commandTopic. After some research, I found that specifying the RGB values as a JSON object instead of a simple string fixed the problem. Here’s the configuration that worked for me:

zigbee.things:
Thing mqtt:topic:zigbee2mqtt:Flur_Leu “[Flur] Leuchte” (mqtt:broker:MQTTBroker) {
Channels:
Type color : color “Farbe” [stateTopic=“zigbee2mqtt/[Flur] Leuchte/color_xy”, commandTopic=“zigbee2mqtt/[Flur] Leuchte/set/color_xy”, formatBeforePublish=“{"color":{"rgb": "%s, %s, %s"}}”]
}

Once I updated this, the RGB functionality sprang to life! Now, I can easily change the colors of my bulbs through openHAB, creating vibrant lighting scenes for different occasions. It’s amazing how a little tweak can make such a big difference.

I’d like to give a big shoutout to the openHAB and Zigbee2MQTT communities for their incredible support and documentation. Without their help, I wouldn’t have been able to figure this out so quickly. If anyone else is struggling with similar issues, don’t hesitate to reach out—I’m happy to help!

Cheers to all the smart home enthusiasts out there! :star2: