[UPDATE] IKEA Trådfri Bulb Device Type

dth_lighting

(Edvald Eysteinsson) #1

Here is a device type that I’ve written/copy pasted from other device types, I’m not sure if everything is the way it’s supposed to be but it works as I want it to.

I’ve written it so that it changes the color temperature when dimming the light, it makes it behave a bit more like a traditional bulb.

There is a preference section were users can edit the following

  • Enable/disable level and color temperature linking
  • Set a delay between level and color temperature change
  • Choose whether to show a generic color name such as “Relax” or a kelvin temperature such as “2300 K”
  • Color temperature at the lowest brightness level
  • Color temperature at the highest brightness level

Works:
TRADFRI bulb E27 WS opal 980lm
TRADFRI bulb E14 WS opal 400lm
TRADFRI bulb GU10 WS 400lm

Untested but should work:
TRADFRI bulb E27 WS clear 950lm
TRADFRI bulb E26 WS opal 980lm
TRADFRI bulb E26 WS clear 950lm
TRADFRI bulb E12 WS opal 400lm

Not supported:
TRADFRI bulb E27 opal 1000lm - It’s not a color temperature bulb, just dimmable


https://github.com/edvaldeysteinsson/IKEA-Tradfri/blob/master/devicetypes/edvaldeysteinsson/ikea-tradfri.src/ikea-tradfri.groovy


For those that assign this device handler to an already added device and who experience problems with the UI not updating values, try pressing the reload button once. That should then fix the issue and the values should update as expected.


Here are some more screenshots of the device type UI.


IKEA Trådfri
IKEA Home Automation
Anyone got Ikea TRÅDFRI smart lighting working with ST?
IKEA Trådfri fingerprints?
IKEA Trådfri
Xiaomi Zigbee Door/Window Sensor, Motion Sensor, & Smart Button Device Type [beta]
[RELEASE] HousePanel Dashboard Beta 1.0 Under Open-Dash Brand
TKB Home TZ57 Light Switches (UK)
Problems with Lightify+SmartThings Lately
(Luke) #2

Thanks for this! I’ve tried it out and a couple of things:

  1. The mobile UI doesn’t seem to remember the bulbs state (on/off and dim level) when you go back to it. (same as the stock zigbee DH)
  2. The dimming slider doesn’t seem to consistently work, ie. if I dim up to 100% it doesn’t always fully brighten.
  3. I’d prefer if it didn’t change temperature while dimming, or perhaps you could make that an option.

(I just edited the setlevel function in my local copy to remove colour temp change, and the dimming now works ok. I think it won’t change level and temp at the same time consistently).


(Edvald Eysteinsson) #3

Regarding the UI not updating, i have seen this with some other devices and the ikea ones and also with other device handlers, i think it has something to do with the configuration that is sent when adding it so smartthings, in the device handler there is a config thats send some data to the device. I dont know when this is called but i have noticed that these kinds of issues gets solved by pressing the “reload” button in the UI


(Luke) #4

Ah yes, that fixed that, thanks.


(Edvald Eysteinsson) #5

Also, regarding the dimming, it seems as though the ikea bulb wants to “animate” the dimming meaning it gradually goes to the requested level and if you for some reason where to set the color temperature it will actually stop dimming at what ever % it was on right then


(Luke) #6

Yes, I’ve found a similar problem with my Innr Colour bulbs. In my core Piston, I add a 5 second delay between setting level and setting colour, and that seems to fix it.


(Edvald Eysteinsson) #7

Im not at home right now so i cant test this but if you have the light close by then you could modify the setLevel method so that it add a delay between the level and temperature calls like this

def setLevel(value) {
// this will set the color temperature based on the level, 2200(0%) to 2700(100%)
// it’s a bit more like how a traditional filament bulb behaves
zigbee.setLevel(value) + “delay 500” + zigbee.setColorTemperature(2200 + (5*value))
}


(Edvald Eysteinsson) #8

I just updated the device handler so that users can set a delay between level and colour temperature change, give it a try if your devices don’t dim properly.


(Luke) #9

Thanks, I’ll give it a try.


(sapstar) #10

Great work. I like this device type better than the Zigbee colour temperature bulb.


#11

@Edvald any chance to update to the new ST color theme?

New Color Theme in ST App?


(Edvald Eysteinsson) #12

updated the colour


(Jon Hewitt) #13

Thanks so much for this!


(Jason) #14

@Edvald

Nice work on this. Works really well for me too. Did you get any further on making the remotes work?

thanks for your effort.


(Edvald Eysteinsson) #15

Unfortunately not, my knowledge about zigbee and ST isn’t enough to write that device handler


(Luke) #16

I noticed this weekend that the Ikea bulbs don’t offer the colour temperature controls inside ActionTiles. I’m not sure if it’s the DTH that would implement this, or something on the ActionTiles side?


(sapstar) #17

@Edvald would you be able to add a tile in the app to show the colour temperature like the stock zigbee dth?


(Edvald Eysteinsson) #18

Do you mean https://www.actiontiles.com/?


(Edvald Eysteinsson) #19

Do you mean the one called “ZigBee White Color Temperature Bulb” or " ZLL White Color Temperature Bulb"?
The trådfri dth behaves like “ZigBee White Color Temperature Bulb” in that it shows a “name” instead of a kelvin temp. I don’t think that kelvin temp is all that interesting to know since, at least for me, it means nothing compared to a descriptive name of the color temp. “Soft white” is more understandable than “3239 K”


(Luke) #20

Yes, thats the one. Previously called SmartTiles.