Tradfri LED RGB bulb

I guess you mean line 90 as of August 2020 version.

Using Pedro Garcia’s driver I am able to control the IKEA Tradfri “RGB” bulbs.

Through “Device” I am able to dim and change colors (within its capabilities) as well as though Dashboards. Dashboards only allow to close the color window with the bulb “off”, but otherwise is fully functional.

Through Apps (I.e. Rule Machine) I can toggle them as a switch, but not as a bulb. Neither can I adjust the sim level, or the color.

Is there a way in Rule Machine to send a ColorName command to the bulb, as I can through “Device”?

It would appear that yes, you can [Edit: Sorry wrong screenshot. Reposted]

YESSSS! That works!

Thanks a lot!

1 Like

All the drivers I tested, the pedro garcia's driver is actualy working, including colors. But only if you use the attribute "set color by name": red, orange, yellow, green, cyan, indigo, blue, fuchsia, bright pink, white. It still does give some errors when using the other preset color commands (like set blue). So basically if you use the by name colors in your RM your are fine.

Hi All,
I wasn't super satisfied with any of the drivers that I could find for the Tradfri RGBW bulbs so i did a bit of modding on pedro garcia's ST driver.

hopefully you might find it helps a bit, you can find the code here: GitHub - eliotstocker/hubitat-ikea-rgbw: A fully functional Hubitat RGBW driver for Ikea Bulbs

you can also get it on Hubitat Package Manager

To be completely clear almost all of the credit should go to the original Author: GitHub - puzzle-star/SmartThings-IKEA-Tradfri-RGB: SmartThings Device Handler for IKEA Tradfri RGB Bulbs

1 Like

Having some of these bulbs, I am wondering if you have a comparison of what this driver does that the others you were unsatisfied with did not.

The idea was to just make it work as closely to the stock Zigbee RGBW driver as possible, this means that the Ikea and Hue bulbs i have connected directly work more or less the same.

Changes from Puzzle Star Version:

  • Add capabilities: ColorMode and Color Temperature
  • Add Color Temperature methods (emulated by setting various shades of orange, should more or less match Ikea white spectrum bulbs)
  • fix getting values back from bulbs (so that state in hubitat is set directly from bulb)
  • different color name matching

Thanks, yours was the only one that worked for me.

your version is working like a charm! thanks @eliotstocker

I built a bit further on @eliotstocker version of the bulb because I saw some issues with scenes. E.g. the bulb did not turn on when setting a scene, and in CT mode the dimmer level was missed due to the way scenes operate the bulb in CT mode.

Fixes from @eliotstocker version:

  • Use asynchronous zigbee messaging so that dimmer level is not missed when operating in CT mode in a scene setting
  • Added the possibility to turn on and off debug and trace info
  • Also added support for the rate field in setLevel, i.e. it can be controlled how fast the bulb dim to the new setting.

Raw link: https://raw.githubusercontent.com/ivarho/hubitat-ikea-rgbw/main/ikea-tradfri-rgbw-device.groovy

Nice one @holand.ivar

these sound like great tweaks!

entirely up to you if you'd like to or not, but if you stick in a PR to my repo ill merge these changes in so they end up in HPM :slight_smile:

Cheers
Eliot

1 Like

seeing this error
java.lang.NullPointerException: Cannot execute null+[he cmd 0x70B3 0x01 0x0008 0x04 {D1 FFFF}, delay 2000, he cmd 0x70B3 0x01 0x0300 0x07 {EE5092930a00}, delay 2000] on line 319 (setColor)

That was strange, have you done any modifications to the code? Line 319 is an append to a list and no execution of any commands:

319: state.cmds += cmds

Can you post exactly the code you are using? Or the code you see on line 319?

Yep 319
state.cmds += cmds

Not changed anything mabey the state is missing?

Edit, just skimmed the code, should state.cmds =[] be added to initialize.
When I get back ill try hitting refresh to create the state

1 Like

Yes, that could be the issue. Thanks for pointing that out. Before doing that try hitting refresh() as it defines the state.cmds = [], let me know if that fixes this issue, if it does I will update the driver

 def refresh() {
    state.colorChanged = false
    state.colorXReported = false
    state.colorYReported = false
    state.cmds = []
    zigbee.onOffRefresh() + zigbee.levelRefresh() + colorControlRefresh() + zigbee.onOffConfig(0, 300) + zigbee.levelConfig() + colorControlConfig(0, 300, 1)
}
2 Likes

I did some testing and found that @mark.cockcroft suggestion works. Implemented in the latest version on github. Thanks mark for discovering this.

1 Like

Thanks @eliotstocker @holand.ivar, what a perfect timing. The thread is alive for 2 years, but you came out with the ported drivers just few days after I got the Tradfri bulbs.

Can you make the new versions available through the hubitat package manager as @eliotstocker recommended?

Absolutely, I haven't done that before, but I will investigate what's needed. If not @eliotstocker do it before I have time to educate myself.

Thanks a lot @eliotstocker and @holand.ivar, this driver helped to get my Tradfri bulbs working properly where the generic drivers wouldn't. Is it possible to add the "startLevelChange" and "stopLevelChange" command? Otherwise it looks like these won't be dimmable with a switch without those commands. I think that's all that's missing compared to the generic RGBW drivers.

Thanks again!

Download the Hubitat app