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

[Documentation] Switch cluster specification MomentarySwitch clarification #33328

Open
Apollon77 opened this issue May 7, 2024 · 0 comments
Open
Labels
documentation Improvements or additions to documentation needs triage

Comments

@Apollon77
Copy link
Contributor

Documentation issues

I implemented the Switch cluster as defined by specification for both Latching and also Momentary switches. For the latter one there is one open question which is not clearly defined by the specification. It is about feature MSM (multi press).

The attribute Multi­PressMax defines how many multi presses a button can detect. So far so good.
The specification is not clear what happens in the normal event flow when this limit is reached.

Should the MultiPressComplete event be sent out directly after the last "supported multi press"being released? (That would be my proposal)
Because: If the MultiPressComplete is delayed like in all normal cases where another press might be expected, it might overlap with the next regular (multi) press - given the case the a button can detect up to 3 multi presses and the user presses 4 times, then the 4th would be "the next new press" and could come before the MultiPressComplete delay time.
I hope I was able to make the case clear.

The other question where the specification is not clear is about the definition of a "Multi Press", especially when the switch can have more then 2 states. There are theoretically two options to define it:

  • A: a Multipress is always "StateA" -> "StateB" ... and a repeating this. So "multiple times entering the same state B" (from teh same source State A?) ... that option would have some weird edge cases with multi state buttons, so more likely ...
  • B: a Multipress is each State change in a flow (A->B->C->A->C...)

I used definition B in the matter.js implementation (https://github.com/project-chip/matter.js/blob/main/packages/matter.js/src/behavior/definitions/switch/SwitchServer.ts ... if someone wants to give feedback I would be happy because Momentary is not yet implemented on project-chip side).
It would be great to get answers to these questions and also clarifications in the specifications.

Platform

other

Anything else?

No response

@Apollon77 Apollon77 added documentation Improvements or additions to documentation needs triage labels May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation needs triage
Projects
None yet
Development

No branches or pull requests

1 participant