Deconz-rest-plugin: tradfri 600lm e26 color bulb no color temp

Created on 15 Aug 2020  路  16Comments  路  Source: dresden-elektronik/deconz-rest-plugin

Hello, I have two tradfri color bulbs. In the latest release it appears the color temp does not appear in the phoscon application. Not sure what happened to it. Attached is a video it shows my color light that when the temperature is clicked it only has the brightness channel. I have factory reset the bulb and re-added. I am running 2.05.80 beta.

https://youtu.be/tnvubJAR5bA

rest api data for bulb:

{ "colorcapabilities": 8, "etag": "a9ab1df7a71e690190192bde448a2e3e", "hascolor": true, "lastannounced": "2020-08-15T15:59:23Z", "lastseen": "2020-08-15T16:34Z", "manufacturername": "IKEA of Sweden", "modelid": "TRADFRI bulb E26 CWS opal 600lm", "name": "Color2", "state": { "alert": "none", "bri": 254, "colormode": "xy", "effect": "none", "hue": 43483, "on": true, "reachable": true, "sat": 203, "xy": [ 0.524, 0.4139 ] }, "swversion": "1.3.002", "type": "Color light", "uniqueid": "d0:cf:5e:ff:fe:22:e8:52-01" }

Please advise I am happy to try any suggestions. I also tried to manually install an older version of deconz, but the issue still appeared. Not sure that I uninstalled and re-installed properly. I am happy to test again if needed.

Bug report

All 16 comments

I don't know this particular light, but the Tr氓dfri E27 CWS doesn't support colour temperature. This light advertises that it also doesn't, only xy (colorcapabilities of 8). The API rightly doesn't expose ct, and wrongly exposes hue, sat, and effect, which the light doesn't support either.

@ebaauw according to the box you are correct.. funny thing i am fairly confident it worked in the past. Unfortunately I don鈥檛 have my time machine.
I suppose the real question is how do I make it go back to just white? That is my issue, when I change to a color it stays on color. I can鈥檛 figure out how to get back to white.

65D095F4-C15C-45C6-B529-260670658085

Funny thing picture says white spectrum. I am going to pair with my tradfri hub and see what I can do. This is one of those weird issues... I know I tested this when I installed them. Again, no time machine.
I will get back with you

I suppose the real question is how do I make it go back to just white?

Set the xy values to white, probably something like [0.35, 0.35]. Alternatively, power cycle the light and see what xy values it reports. In Phoscon, you want to set the _Saturation_ to 0.

i am fairly confident it worked in the past

You might want to double-check in the GUI, if the light responds to _Move to Color Temperature_, and if it supports the _Color Temperature_ attribute. This wouldn鈥檛 be the first light that advertises the wrong capabilities, but IKEA are usually correct here.

You might also want to double-check using the API, if you can still do a PUT to the light state, setting ct. There is some obscure (at least, to me) code in the API plugin to translate ct values to xy, and the API still accepts setting ct, even if the light resource doesn鈥檛 include it. There could have been a change in Phoscon, showing the colour temperature slider only when state.ct is exposed.

@ebaauw I am Closing issue for now. More research will be done and I will open the issue again if necessary.
Thanks for help!

@ebaauw question for you on this topic. Is there a way for me to make the rest api think this bulb is an extended color light for testing? I can't seem to figure out where in the source code the model is linked to type?

I am looking to test if this works. It looks like according to the product id on my box and the product id on the website the bulb supports white spectrum. Which i believe would make it a type extended color light vs just a color light.

I am happy to compile the code and make my own changes I was looking for direction on where they type gets pulled from.

----Update: I paired to the tradfri app. It is definitely appearing as an extended color light. I have not had a chance to see how phillips hue gateway sees it. I am really beginning to believe the box is incorrect, but the website is correct.

I can't seem to figure out where in the source code the model is linked to type?

Because it isn't. The type is reported by the light (it's the _Device Type_ in the _Simple Descriptor_, which the GUI shows at the endpoint).

It looks like according to the product id on my box and the product id on the website the bulb supports white spectrum.

You can test in the GUI if the light supports the _Move to Color Temperature_ command and the _Color Temperature_ attribute. In theory, the light could expose the wrong device type and _Color Capabilities_, but I would expect better from IKEA (maybe I'm too optimistic). If the light does support these, we could whitelist it and treat it as an _Extended Color Light_ in the REST API plugin.

Thanks for your info.

Yes, the light supports color temp in the ikea app using their gateway. As a second test, I use the ikea binding in openhab2 it is discovered as extended color and works perfectly. Note, I am not sure how openhab handles the model identification.

I will reconnect to deconz and look at the attributes later today and see what they say. It would be nice to whitelist the bulb if in fact it is reporting incorrectly.

I did find something interesting today. When I joined it to the deconz network, the bulb joined and said extended color light. I had to reset it again because I forgot to delete it out when I reset it. Some of the info like firmware of the bulb didnt match what was in it. When I rejoined deconz it joined as a color bulb.

I am not sure what ikea is doing with the bulb description, but it is definitely an extended color light. Is it possible to whitelist it?

I think the bulb鈥檚 firmware might have been updated while it was connected to the Tr氓dfri hub. If it now exposes itself as _Extended Color Light_, no further action would be needed after re-pairing. Can you double-check (preferably in the GUI, after manually reading the attributes) what color capabilities and version the light now reports?

I have tried repeating the earlier process of pairing to tradfri then deconz but the bulb always shows as just a color light. I believe deconz is seeing the bulb correct based on ID, but the ID is actually wrong for this bulb. I say this because the tradfri app support the white spectrum as discussed on the ikea website.

Can we try a whitelist, I can compile the code and test, but don't know how/where to make the changes.

Overwriting the device type is done here: https://github.com/dresden-elektronik/deconz-rest-plugin/blob/f245b37194add12c23e1be3f7b96190351da1452/de_web_plugin.cpp#L2270

You might want to double-check under what conditions this routine is called, might be only for OSRAM/LEDVANCE lights. EDIT seems to be OK.

Screenshot from 2020-08-24 08-01-50
Screenshot from 2020-08-24 07-29-42

Good Morning/Evening @ebaauw,

I have been trying some different configurations and learning how the code is written. I have posted the cluster response from the bulb. One thing I was uncertain about, I am wondering if you know. Does the type reported "color temperature" vs the "current x and y" mean that it should support adjusting the kelvin temperature of the white? This is the same bulb type from ikea but with two different firmwares, they seem to have changed the color mode.

I am a little confused on the types reported color / color temperature/ extended color etc.

As of now, you stand correct that this appears to not support the color temperature directly. In some research, I found there is another 600lm bulb with a dfferent product code. My product code internal is 1642xxx vs a 17xx or 18xx according to the supported devices on the zigbee2mqtt page this bulb supports the color xy as you stated prior. But the bulbs of the different product code support color temperature. I am thinking Ikea may have upgraded their bulbs or sell different bulbs to different countries, but sell them under the same UPC code. This is why my box reports 2700kelvin but the newer boxes show white spectrum.

So for now I will stop spending time making this one work, I will make a trip to the ikea store and review the latest boxes and possibly purchase one. Maybe I will get one of the new product codes. These bulbs are very usable still and I am unable to explain what software update made them stop functioning the way they did for the last year.

Thanks for all your assistance!!! I learned many things about zigbee and deconz in the last few weeks!

_Color Mode_ indicates how the colour was last set: using _Current X_ and _Current Y_, using _Color Temperature_, or using _Current Hue_ and _Current Saturation_. The current state is reflected by the corresponding attributes. I don't think the standard defines what the other attributes should be. Hue lights update all attributes; some other lights only update the attributes corresponding to the _Color Mode_.

Did you get the second screenshot after issuing a _Move to Color Temperature_ from the GUI, or after putting ct through the API? Are you sure you force-read the attributes before making the screenshot (so it's actually the values reported by the light, and not the values set by the REST API plugin)? It might be prudent to disable the REST API plugin while sending commands from the GUI, to make sure you interact with the light only.
If so, this light supports _Move to Color Temperature_ (given that _Color Mode_ reports _Color Temperature_), but it doesn't support the _Color Temperature_ attribute. It would seem that the light did update _Current X_ and _Current Y_; I hope with the values corresponding to the set _Color Temperature_. I haven't seen that behaviour in any other light.

If the bulb has three channels (RGB), this whole discussion is academic, because setting ct results in the same RGB mix as setting the corresponding xy values. If the bulb has five channels (RGB+CCT) however, setting ct drives the WW/CW channels whereas setting the corresponding xy values drives the RGB values, resulting in a noticeable different colour.

DO you happen to know if there is a way to obtain the number of channels other than opening the bulb?

Not that I know of.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

philko123 picture philko123  路  3Comments

horchi picture horchi  路  5Comments

salopette picture salopette  路  4Comments

wizkidorg picture wizkidorg  路  3Comments

lynix picture lynix  路  4Comments