dresden-elektronik / deconz-rest-plugin

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

DDF for Aqara Ceiling Light T1M (CL-L02D) #7895

Closed ebaauw closed 3 weeks ago

ebaauw commented 1 month ago

See #7653.

Initial DDF, exposing both light endpoints: main light as Color Temperature Light and ring light as Extended Color Light. No support yet for dynamic effects, nor for gradients of the ring light.

Somehow, the ring won't dim at xy [0, 1] (red) or [0, 0] (blue). When mixing some other colour, like [0, 0.01] it will. Not sure what's happening here. Maybe we need to adjust the gamut slightly, to prevent [0, 0], and [0, 1]. At [1, 0] (green), it will dim.

github-actions[bot] commented 1 month ago

Hey @ebaauw, thanks for your pull request!

[!TIP] Modified bundles can be downloaded here. Relative expire date

DDB changes

Modified

Validation

[!TIP] Everything is fine !

:clock230: Updated for commit 44e30a4d4d674f2129984a7f30a0511c248d2bcb

ebaauw commented 1 month ago

Oh, this is fun.

  • The device is missing some items because a device with "state/x" or "state/y" need the corresponding cap/color/xy/{red,green,blue}/{x,y} items

state/x and state/y are non-public, so the corresponding cap/color/xy capabilities should not be present. Maybe I can add them as non-public as well.

  • The device should have the item "state/alert" because it is mandatory for devices of type "$TYPE_COLOR_TEMPERATURE_LIGHT"

Oops, I intended for state/alert to be on the first endpoint only. While the second endpoint has Identify, it actually blinks the main light, instead of the ring light. I'll add it to both endpoints, just to be compliant.

manup commented 3 weeks ago

Thanks, interesting corner cases for the device. I guess it's ready for merging now?

ebaauw commented 3 weeks ago

Yes we can do that for initial support. We shouldn’t close the corresponding issue, however, since we still need to add support for the effects and gradients (after reverse-engineering these).

I’m rather worried about the legacy code interfering with the DDF. I think with all non-public items, I’ve now bypassed most legacy logic, but I’m sure I caught all of it. Would be good to get feedback from others.

manup commented 3 weeks ago

There is the bool DEV_TestStrict(void) function placed in some parts of the legacy code which skips more legacy code than usual.

It can be enabled for a session via: GUI → Panels → Control → DDF mode → Strict

But I think this needs a fresh look where DEV_TestStrict() is called and if it makes sense nowadays.

github-actions[bot] commented 3 weeks ago

This pull request is now merged. The new DDB files have been uploaded to the store.

DDB Files

Modified

:clock130: Updated for commit 4b6435e0ff6629de86c8ba01e7af3dbf02c13796