dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.9k stars 499 forks source link

Illuminize 511.012 w/ colormode attribute though its just a dimmable light #5651

Closed embeddeddev closed 2 years ago

embeddeddev commented 2 years ago

Describe the bug

Illumize 511.012 is just a dimmable light controller w/o color support.

Since several months I see plenty of bugs in my Home Assistant relating to HS errors originating from the deconz-Plugin. At first I assumed that's a plugin bug for a long time. After even HomeKit was completley refusing to work with the light I digged deeper.

Now I realized by examining the device in deCONZ GUI and zll.db that the device is errorneously recognized as a dimmable light w/ color support.

Here the related JSON attributes from node's attributes in zll.db::nodes table:

{"attr/id":"25","attr/lastannounced":"2021-11-22T21:53:23Z","attr/lastseen":"2022-01-09T00:34Z","attr/manufacturername":"iluminize","attr/modelid":"511.012","attr/name":"some_light","attr/swversion":"2.5.3_r49","attr/type":"Dimmable light","attr/uniqueid":"cc:cc:cc:ff:fe:xx:xx:xx-01","state/alert":null,"state/bri":54,"state/colormode":"hs","state/on":true,"state/reachable":true}

The light is working well w/ home assistant and connected HomeKit as long the device is "off". When it turns on it propagates the colormode attribute and deconz Hass Plugin tries to read HS values which will fail and the light isn't controllable any more in Hass or HomeKit.

I could image that this problem is related to possible DDF changes several months ago, when the problems started. Unfortunately I don't know the correct time of first occurrence any more.

Please let me know if there are some specific more informations required.

Expected behavior

Device recognized correctly as dimmable light w/o any color support

Environment

deCONZ Logs

close-issue-app[bot] commented 2 years ago

Hi there.

Thank you for filing this issue. Unfortunately, we cannot help you, as you haven't sticked to the provided template and/or have not provided all information requested. Consequently, this issue has been closed.
We're more than happy to help out where we can once you raise a new issue containing all requested information in the requested format.

In this regard, please take note that:
- read the template thoroughly
- all given header lines (starting with ###) must not be deleted
- everything enclosed by <!-- --> is intended to give you guidance and should be replaced by your input specific to the issue
- Listings regarding your environment must be filled out completely where applicable (bug reports and user questions).
- Not following the template or providing insufficient information can still implicate manual closure.
- Anything that is not clearly a bug can still implicate manual closure. For support we recommend the forum: https://forum.phoscon.de

So please, first help us a bit to help you!

Mimiix commented 2 years ago

You can fix this with the ddf

clic on the node in deconz then "edit ddf" look at the type, can replace the "Color Dimmable light" by "Color Temperature light" (use the "delete" key to remove the old one) Save the DDF select "hot reload" For more detail https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/DDF-cheat-sheet (need to enable DDF, change the satus to bronze, ect ...)

embeddeddev commented 2 years ago

Hi @Mimiix, dank je wel.

I tried up w/ the DDF editor now up for a long time, following the cheat sheet, setting nodes DDF to gold status, many retries, manual removals of "state/colormode":"hs" from nodes attributes in zll.db, but deCONZ still announces hascolor + colormode for the node in the REST API.

DDF JSON: preview.json.txt

Screenshot_20220109_205303

Do you still have an idea whats going wrong? In node's (sub-)devices view the device shows even up w/ 0300 Color Control cluster, that shouldn't be there. Reading all its attributes results in no supported attributes at all (everything is greyed out).

Attached to this post is the DDF JSON, screenshot of its gold setting, the REST API response and the node's subdevices/cluster view in GUI.

Thanks a lot so far.

Screenshot_20220109_205526 Screenshot_20220109_205630

Mimiix commented 2 years ago

Asked Manuel to reply :)

manup commented 2 years ago

The DDF looks alright :+1: One thing to mention here is that currently the DDF works side by side with the old code, which somehow wrongfully adds the state/colormode. The DDF code is a bit shy so that it only adds or updates state and config attributes but it won't remove any attributes to not cause damage :) For this we need to add a mechanism to allow this, like a strict mode for specific DDFs.

embeddeddev commented 2 years ago

Hey Manuel and Dennis,

thanks for your quick reply though close-issue-bot directly closed my issue because I removed the "superfluous" template comments before I submitted the issue.

After a bit digging into the code I found the place to add an exception for the iluminize device, compiled and tested it successfully. DDF was turned off again so it's working w/ legacy code as expected.

I'll create a pull request afterwards.