Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
Sep 5, 2024

Conversation

ebaauw
Copy link
Collaborator

@ebaauw ebaauw commented Aug 21, 2024

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.

Add non-public `state/x` and `state/y` to prevent the legacy code from kicking in.  See dresden-elektronik#7653
@ebaauw ebaauw linked an issue Aug 21, 2024 that may be closed by this pull request
1 task
@ebaauw ebaauw changed the title Add DDF for Aqara Ceiling Light T1M Add DDF for Aqara Ceiling Light T1M (CL-L02D) Aug 21, 2024
Copy link
Contributor

github-actions bot commented Aug 21, 2024

Hey @ebaauw, thanks for your pull request!

Tip

Modified bundles can be downloaded here.
Relative expire date

DDB changes

Modified

  • xiaomi/lumi_light_acn032.json : Ceiling Light T1M (CL-L02D) ✔️

Validation

Tip

Everything is fine !

🕝 Updated for commit 44e30a4

@ebaauw
Copy link
Collaborator Author

ebaauw commented Aug 21, 2024

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.

- Adjust colour gamut to prevent ring from not dimming.
- Add `parse` logic to `state` attributes to prevent REST API from mixing endpoints and resources.
Add bindings for _Color Control_ on 2nd endpoint.
@manup manup added this to the v2.29.0-beta milestone Aug 26, 2024
@manup
Copy link
Member

manup commented Sep 5, 2024

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

@ebaauw ebaauw removed a link to an issue Sep 5, 2024
1 task
@ebaauw
Copy link
Collaborator Author

ebaauw commented Sep 5, 2024

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
Copy link
Member

manup commented Sep 5, 2024

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.

@manup manup merged commit 4b6435e into dresden-elektronik:master Sep 5, 2024
1 check passed
Copy link
Contributor

github-actions bot commented Sep 5, 2024

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

DDB Files

Modified

  • xiaomi/lumi_light_acn032.json : Ceiling Light T1M (CL-L02D) : with hash (59b0ce1b07)

🕜 Updated for commit 4b6435e

@ebaauw ebaauw deleted the t1m branch September 5, 2024 15:51
@manup manup changed the title Add DDF for Aqara Ceiling Light T1M (CL-L02D) DDF for Aqara Ceiling Light T1M (CL-L02D) Sep 23, 2024
@ebaauw ebaauw mentioned this pull request Oct 1, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants