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

How to set Default Delegate? #24721

Closed
avpmax opened this issue Jan 30, 2023 · 1 comment · Fixed by #24730
Closed

How to set Default Delegate? #24721

avpmax opened this issue Jan 30, 2023 · 1 comment · Fixed by #24730

Comments

@avpmax
Copy link

avpmax commented Jan 30, 2023

I'm working with a WindowCoveringDevice cluster on esp32.
Since the GoToLiftPercentage command is not created by default,
I created it as a custom command and it worked fine.
However, since commands such as UporOpen, DownorClose, and Stop are created by default and cannot be deleted,
custom commands cannot be substituted.
So I want to implement the callback of the corresponding commands using SetDefaultDelegate.
However, delegate cannot be set because emberAfFindClusterServerEndpointIndex always returns 0xFFFF.

What is the procedure for registering SetDefaultDelegate?

@bzbarsky-apple
Copy link
Contributor

Since the GoToLiftPercentage command is not created by default, I created it as a custom command and it worked fine.

How did you "create it as a custom command"? The command is optional, but can just be enabled in the ZAP configuration. Is that what you did? If not, what exact thing did you do, @avpmax ?

However, since commands such as UporOpen, DownorClose, and Stop are created by default and cannot be deleted,
custom commands cannot be substituted.

"substituted" in what sense? UpOrOpen is a mandatory command, so it has to be implemented, yes...

However, delegate cannot be set because emberAfFindClusterServerEndpointIndex always returns 0xFFFF.

That's because it's looking for Channel clusters for some reason, not Window Covering clusters. #24730 should fix that; nice catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants