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

Events being sent on all the endpoints #14624

Closed
chiragatal opened this issue Feb 1, 2022 · 6 comments · Fixed by #18742
Closed

Events being sent on all the endpoints #14624

chiragatal opened this issue Feb 1, 2022 · 6 comments · Fixed by #18742
Assignees
Labels
app-clusters Application cluster work spec Mismatch between spec and implementation V1.0

Comments

@chiragatal
Copy link
Contributor

Problem

  • expected behavior: Events triggered on the device should be sent only to a particular endpoint_id.
  • actual behavior: Events triggered are sent to all the endpoints that have the cluster included.
  • steps to reproduce: Create a device with 2 endpoints and both having the switch cluster. Trigger the SwitchLatched event on the device. The event gets reported on both the endpoints instead of just one.
  • reference: Check OnSwitchLatched in switch-server.cpp.

Proposed Solution

  • The events should accept the endpoint_id also as an argument, and send the event just on that endpoint.
@dhrishi
Copy link
Contributor

dhrishi commented Feb 1, 2022

@yufengwangca Can you please check?

@yufengwangca
Copy link
Contributor

@chiragatal The event is triggered on the device, it does not have the endpoint_id as an argument, so it gets logged to all endpoints on which the relevant cluster is enabled

@bzbarsky-apple
Copy link
Contributor

The point is, the switch cluster API here is broken, no? It should either know which endpoint is being addressed to start with (have per-endpoint delegates) or allow passing in the endpoint id from the caller.

Looks like the implementation in PR #13036 just does not make sense for a device with more than one switch on it....

@bzbarsky-apple bzbarsky-apple added the app-clusters Application cluster work label Feb 3, 2022
@dhrishi
Copy link
Contributor

dhrishi commented Feb 3, 2022

The same is to be checked/implemented for all other utility/app clusters too that support events?

@bzbarsky-apple
Copy link
Contributor

Probably worth it, yes...

@woody-apple woody-apple added the spec Mismatch between spec and implementation label Feb 9, 2022
@mrjerryjohns
Copy link
Contributor

Taking off the IM label since this isn't an IM limitation but rather an issue with the app clusters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app-clusters Application cluster work spec Mismatch between spec and implementation V1.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants