# \[OBSOLETE\] IKEA Trådfri Bulb Device Type

**URL:** <https://community.smartthings.com/t/obsolete-ikea-tradfri-bulb-device-type/83394>\
**Category:** Community Created Drivers\
**Tags:** dth\_lighting\
**Created:** [April 1, 2017, 2:28pm UTC](https://community.smartthings.com/t/obsolete-ikea-tradfri-bulb-device-type/83394 "2017-04-01T14:28:23Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Edvald](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/edvald/32/52687_2.png) [@Edvald](https://community.smartthings.com/u/Edvald)\
**Post date:** [April 1, 2017, 2:28pm UTC](https://community.smartthings.com/t/obsolete-ikea-tradfri-bulb-device-type/83394/1 "2017-04-01T14:28:23Z")

</div>

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](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.

 ![](https://global.discourse-cdn.com/smartthings/original/3X/6/e/6ec750c9bb69067d0a6d862cf15adcacb5754c9e.png)

* * *

**Here are some more screenshots of the device type UI.**

 ![](https://global.discourse-cdn.com/smartthings/original/3X/7/7/772ec6bd77720e18f630266e15d1222e2e3a6a00.png)

 ![](https://global.discourse-cdn.com/smartthings/original/3X/b/f/bff673905a13015c2563a1ef9a5045637f649e63.png)

 ![](https://global.discourse-cdn.com/smartthings/original/3X/5/3/53dd09b5134625febd369c97739d1c20f322641c.png)

---

<div class="post-metadata">

**Author:** ![ldjagger](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@ldjagger](https://community.smartthings.com/u/ldjagger)\
**Post date:** [April 3, 2017, 9:38am UTC](https://community.smartthings.com/t/obsolete-ikea-tradfri-bulb-device-type/83394/2 "2017-04-03T09:38:54Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![Edvald](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/edvald/32/52687_2.png) [@Edvald](https://community.smartthings.com/u/Edvald)\
**Post date:** [April 3, 2017, 11:54am UTC](https://community.smartthings.com/t/obsolete-ikea-tradfri-bulb-device-type/83394/3 "2017-04-03T11:54:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ldjagger](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@ldjagger](https://community.smartthings.com/u/ldjagger)\
**Post date:** [April 3, 2017, 11:58am UTC](https://community.smartthings.com/t/obsolete-ikea-tradfri-bulb-device-type/83394/4 "2017-04-03T11:58:19Z")

</div>

> [@Edvald](#):
>
> 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

Ah yes, that fixed that, thanks.

---

<div class="post-metadata">

**Author:** ![Edvald](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/edvald/32/52687_2.png) [@Edvald](https://community.smartthings.com/u/Edvald)\
**Post date:** [April 3, 2017, 11:58am UTC](https://community.smartthings.com/t/obsolete-ikea-tradfri-bulb-device-type/83394/5 "2017-04-03T11:58:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ldjagger](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@ldjagger](https://community.smartthings.com/u/ldjagger)\
**Post date:** [April 3, 2017, 12:02pm UTC](https://community.smartthings.com/t/obsolete-ikea-tradfri-bulb-device-type/83394/6 "2017-04-03T12:02:56Z")

</div>

> [@Edvald](#):
>
> 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

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.

---

<div class="post-metadata">

**Author:** ![Edvald](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/edvald/32/52687_2.png) [@Edvald](https://community.smartthings.com/u/Edvald)\
**Post date:** [April 3, 2017, 12:27pm UTC](https://community.smartthings.com/t/obsolete-ikea-tradfri-bulb-device-type/83394/7 "2017-04-03T12:27:50Z")

</div>

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))  
}

---

<div class="post-metadata">

**Author:** ![Edvald](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/edvald/32/52687_2.png) [@Edvald](https://community.smartthings.com/u/Edvald)\
**Post date:** [April 5, 2017, 4:25pm UTC](https://community.smartthings.com/t/obsolete-ikea-tradfri-bulb-device-type/83394/8 "2017-04-05T16:25:04Z")

</div>

> [@ldjagger](#):
>
> > [@Edvald](#):
> >
> > 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
> 
> 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.

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.

---

<div class="post-metadata">

**Author:** ![ldjagger](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@ldjagger](https://community.smartthings.com/u/ldjagger)\
**Post date:** [April 5, 2017, 9:45pm UTC](https://community.smartthings.com/t/obsolete-ikea-tradfri-bulb-device-type/83394/9 "2017-04-05T21:45:53Z")

</div>

Thanks, I’ll give it a try.

---

<div class="post-metadata">

**Author:** ![sapstar](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@sapstar](https://community.smartthings.com/u/sapstar)\
**Post date:** [April 7, 2017, 2:43am UTC](https://community.smartthings.com/t/obsolete-ikea-tradfri-bulb-device-type/83394/10 "2017-04-07T02:43:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cscheiene](https://avatars.discourse-cdn.com/v4/letter/c/7bcc69/32.png) [@cscheiene](https://community.smartthings.com/u/cscheiene)\
**Post date:** [April 8, 2017, 8:43am UTC](https://community.smartthings.com/t/obsolete-ikea-tradfri-bulb-device-type/83394/11 "2017-04-08T08:43:14Z")

</div>

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

[New Color Theme in ST App?](https://community.smartthings.com/t/new-color-theme-in-st-app/80582/24?u=cscheiene)

---

<div class="post-metadata">

**Author:** ![Edvald](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/edvald/32/52687_2.png) [@Edvald](https://community.smartthings.com/u/Edvald)\
**Post date:** [April 8, 2017, 9:06am UTC](https://community.smartthings.com/t/obsolete-ikea-tradfri-bulb-device-type/83394/12 "2017-04-08T09:06:13Z")

</div>

updated the colour

---

<div class="post-metadata">

**Author:** ![Jon\_Hewitt](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/jon_hewitt/32/130853_2.png) [@Jon\_Hewitt](https://community.smartthings.com/u/Jon_Hewitt)\
**Post date:** [April 9, 2017, 6:31am UTC](https://community.smartthings.com/t/obsolete-ikea-tradfri-bulb-device-type/83394/13 "2017-04-09T06:31:22Z")

</div>

Thanks so much for this!

---

<div class="post-metadata">

**Author:** ![BioGuyver](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/bioguyver/32/53412_2.png) [@BioGuyver](https://community.smartthings.com/u/BioGuyver)\
**Post date:** [April 12, 2017, 8:07am UTC](https://community.smartthings.com/t/obsolete-ikea-tradfri-bulb-device-type/83394/14 "2017-04-12T08:07:28Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![Edvald](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/edvald/32/52687_2.png) [@Edvald](https://community.smartthings.com/u/Edvald)\
**Post date:** [April 12, 2017, 11:34am UTC](https://community.smartthings.com/t/obsolete-ikea-tradfri-bulb-device-type/83394/15 "2017-04-12T11:34:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ldjagger](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@ldjagger](https://community.smartthings.com/u/ldjagger)\
**Post date:** [April 17, 2017, 4:41pm UTC](https://community.smartthings.com/t/obsolete-ikea-tradfri-bulb-device-type/83394/16 "2017-04-17T16:41:16Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![sapstar](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@sapstar](https://community.smartthings.com/u/sapstar)\
**Post date:** [April 17, 2017, 7:37pm UTC](https://community.smartthings.com/t/obsolete-ikea-tradfri-bulb-device-type/83394/17 "2017-04-17T19:37:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Edvald](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/edvald/32/52687_2.png) [@Edvald](https://community.smartthings.com/u/Edvald)\
**Post date:** [April 17, 2017, 8:34pm UTC](https://community.smartthings.com/t/obsolete-ikea-tradfri-bulb-device-type/83394/18 "2017-04-17T20:34:30Z")

</div>

Do you mean [https://www.actiontiles.com/](https://www.actiontiles.com/)?

> [@ldjagger](#):
>
> 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?

---

<div class="post-metadata">

**Author:** ![Edvald](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/edvald/32/52687_2.png) [@Edvald](https://community.smartthings.com/u/Edvald)\
**Post date:** [April 17, 2017, 8:41pm UTC](https://community.smartthings.com/t/obsolete-ikea-tradfri-bulb-device-type/83394/19 "2017-04-17T20:41:09Z")

</div>

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”

> [@sapstar](#):
>
> @Edvald would you be able to add a tile in the app to show the colour temperature like the stock zigbee dth?

---

<div class="post-metadata">

**Author:** ![ldjagger](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@ldjagger](https://community.smartthings.com/u/ldjagger)\
**Post date:** [April 17, 2017, 10:04pm UTC](https://community.smartthings.com/t/obsolete-ikea-tradfri-bulb-device-type/83394/20 "2017-04-17T22:04:55Z")

</div>

> [@Edvald](#):
>
> Do you mean [https://www.actiontiles.com/](https://www.actiontiles.com/)?
> 
> > [@ldjagger](#):
> >
> > 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?

Yes, thats the one. Previously called SmartTiles.

[Next page](https://community.smartthings.com/t/obsolete-ikea-tradfri-bulb-device-type/83394.md?page=2)
