You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 MultiPressMax 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...)
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 MultiPressMax 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:
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
The text was updated successfully, but these errors were encountered: