Tradfri LED RGB bulb

Great attempt mate but way too many errors unfortunately. Hopefully one day they release this with some colours albeit even if the green isn't perfect.

1 Like

New revision is up. Everything seems to be working now.

2 Likes

Nice one I will try it out tonight and let you know how I get on.

There's 2 issues with the Ikea bulbs, there is no green so marketing these as rgb is a cruel joke, secondly they only report color in xy, they do not support hue and saturation.
Rgb -> xy and rgb <-> hsv work well, however I've not seen any xy -> rgb formulas that can survive rgb -> xy -> rgb with any level of accuracy, so I've given up any attempt to support these at this time.

1 Like

But the Hue bridge supports them. Is there a chance to get support through the Hue Integration driver? I’m with you 100% on the crappy color, and where I wanted a splash of color, I’ve replaced it with a Hue bulb. But now I’m using the TRÅDFRI in my hallway for a white light during the day, and dimmed burnt orange late at night so it doesn’t shock us out of sleep when we get up to use the bathroom.

I’m having to use a trick with Google Assistant Relay to have HE change the lights from white to orange, and back again. Since that’s cloud dependent, it doesn’t always work. For this simple use case, direct control over the bulb via the Hue Bridge from HE would be a very welcome improvement.

Can't, for the same reason, they only report xy to hue, so that puts the xy conversion back on our end.
xy -> hsl is possible of course, it's just beyond my tiny brain, and what I've tried off the internet was too inaccurate in my opinion.

1 Like

Still plenty of errors in the logs though so I had to revert back. I am seeing a ton of the following:

dev:7132019-10-22 06:32:39.963 pm warnDID NOT PARSE MESSAGE for description : catchall: 0000 8021 00 00 0040 00 91A5 00 00 0000 00 00 8E00

dev:7132019-10-22 06:32:37.974 pm errorgroovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.math.BigDecimal#multiply. Cannot resolve which method to invoke for [null] due to overlapping prototypes between:

Encouraging :popcorn::face_with_hand_over_mouth:

Someone with more zigbee experience will have to step in here and decipher this message, but I think this is not important. Device is sending something but for me everything works without it.

As for the error, it seems that state.colorX is null and multiplication fails. Can you confirm that from device details page? If you can give me exact repro steps I can look into it. Have you tried hitting configure and/or refresh.
I saw an issue where X gets updated and calculation to RGB takes place, and Y is not defined so it errors out. However next event updates Y, but state.X is null for some reason, although it should have gotten set by a previous event.

In any case, if you can get me your whole state, and repro steps, I can try and help.

1 Like

Fair enough. It seems anytime anything is selected it drops in this message so if anyone can get rid of this that would be great!

When selecting things like off blue, on blue, off red, on red etc are all a little messed up and are the ones that lead to those errors. It might be worth just removing those options completely then? I find that using set color by name and next color works well anyways albeit with that zigbee error.

for devices such as this you should drop any frames that start with catchall in parse...
These are ZDO messages and aren't normally used in drivers.

An example of this can be found on line 64 of the rgbw example driver in our public repo

2 Likes

Just wanted to give a HUUUGEEEEEE thank you for this!

Using SharpTools things work absolutely perfect.

2 Likes

Thanks mate that additional code (shown below) resolved the errors. I still couldn't get it to go to 100% when dimming only 99% but hey that's alright I can live with that.

if (description.startsWith("catchall")) return
2 Likes

I tested your driver with a "E26 CWS opal 600lm" but I can't even turn it on/off (I can at least do that with generic "hueBridgeBulb" driver).
Any clue why?

Try sending configure or refresh commands first. Is there anything in the log ouptut?

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.