IKEA Trådlös Bulbs

I've seen that other have asked for integration with IKEA trådfri bulbs already but I've seen no
solutions yet. Only switching and dimming works at this point but no changing of colors or color temperature.
As IKEAs Trådfri series is gaining adoption rate at a faster pace than any other smart light (at least in Europe) I think it´s time to fully integrate them into Hubitat, Athom Homey, Hue and Smartthings has done it already
so there should be plenty of examples to look at by now. From what I understood
the color space has to be converted from RGB to something else.

Any plans for this in near time?

1 Like

the standard RGBW driver has Enable Hue in degrees so maybe that's what's needed? As they are zigbee I wouldn't be surprised if they already work.

The CT bulbs work for changing color temperature. You have to select the "Generic Zigbee CT Bulb (dev)" device type. The same goes for the Floalt LED panels.

As far as I know, there is still no support for the CIE color space of the RGB bulb, though.

Thanks for sharing. Now only one feature left to solve.
I found a RGB to CIE color converter in the Samsung ST driver for Ikea RGB bulbs.
I'm not familiar with the groovy language nor with programming zigbee devices but
if another developer wants to pick it up from here, this might be a clue to
converting the color space and returning the correct value.
If someone has a link to the Generic Zigbee bulb CT driver I would be glad
to have a look at it anyway.

Code below:

def colorRgb2Xy(r, g, b) {

logTrace "> Color RGB: ($r, $g, $b)"

r = colorGammaAdjust(r)
g = colorGammaAdjust(g)
b = colorGammaAdjust(b)

// sRGB, Reference White D65
// D65 0.31271 0.32902
// R 0.64000 0.33000
// G 0.30000 0.60000
// B 0.15000 0.06000
def M = [
[ 0.4123866, 0.3575915, 0.1804505 ],
[ 0.2126368, 0.7151830, 0.0721802 ],
[ 0.0193306, 0.1191972, 0.9503726 ]
]

def X = r * M[0][0] + g * M[0][1] + b * M[0][2]
def Y = r * M[1][0] + g * M[1][1] + b * M[1][2]
def Z = r * M[2][0] + g * M[2][1] + b * M[2][2]

logTrace "> Color XYZ: ($X, $Y, $Z)"

def x = X / (X + Y + Z)
def y = Y / (X + Y + Z)

logTrace "> Color xy: ($x, $y)"

[x: x, y: y]
}

def colorGammaAdjust(component) {
return (component > 0.04045) ? Math.pow((component + 0.055) / (1.0 + 0.055), 2.4) : (component / 12.92)
}