UnifySDK
UnifySDK copied to clipboard
GH-23: Feature door lock get all pin codes
Number of possible PIN codes can be up to 255 and probing all of them can last for up to 5 minutes.
Change
- Defer probing all possible PIN codes from join/interview phase for CC user code v1, and create dedicated GetAllPINCodes command for DoorLock Cluster, similar how configuration parameters V1 can be discovered at a later time on demand.
- Add missing UAM rules for Door Lock generated Notification events.
Checklist
- [x] A Contribution License Agreement has been established between @SiliconLabs and author's company (matching email domain)
@rzr I had not implemented unit test for this new command. Another issue is that this also affects ZigPC.
Implementing Z-Wave specific commands, not available in Zigbee Cluster Library can be done by extending existing ZCL xml definitions or creating new ones. In DoorLock case I opted for the former, which was easier path.
@rzr I had not implemented unit test for this new command. Another issue is that this also affects ZigPC.
Thanks for sharing this info, maybe I should enable zigbee support in CI , if you think it's not read to be merged you can set this PR as draft, as suggested at:
https://github.com/SiliconLabs/UnifySDK/pull/18
your feedback is valuable
Please rebase branch to enable tests :
https://github.com/SiliconLabs/UnifySDK/commit/a3fa1c86e60f669a72c7005c07c760da540e5239
Hi Nenad, Regarding your issue with the inclusion of 255 UserIDs device. Unfortunately, the interview process for command class User Code is specified by the AWG specification (CL:0063.01.21.01.2). For nodes supporting the v1 of UserCode command class, the controller must ask for the PIN code with an User Code Get for each User Identifier. Bypassing this process will cause certification to fail. On my setup interviewing a node with ~150 UserID takes less than 30 seconds. Maybe there is another problem with your setup ?
@Thomasdjb you are right, as per Z-Wave Command Class Control Specification CL:0063.01.21.02.1 We must ask for all pin codes during Interview stage.
However, per CL:0000.00.13.04.1 and CL:0000.00.21.02.1 we can do it later (before sending first command), and not automatically right after joining stage? CL:0000.00.13.04.1
If a Command Class is partially controlled, the controlling node MAY skip steps or perform them in a different order for the mandatory node interview detailed in this document.
CL:0000.00.21.02.1
This interview MUST be performed prior to issuing any control command to the supporting node. Preferably, it should be done during the commissioning phase of the supporting node or shortly after the inclusion of the controlling node
My emphasis is on "shortly after the inclusion" My proposal is to delay, not skip, get all pin codes step. Perhaps device should step into "Online non-functional" after joining?
Legacy Z-Wave S0 Door Locks are slow, S2 do not have that issue. Problem is elevated when we want to add several locks at once, and all of them start sending all possible pin codes at the same time.
Please rebase on
https://github.com/SiliconLabs/UnifySDK/releases/tag/ver_1.5.0
feedback welcome
@Thomasdjb you are right, as per Z-Wave Command Class Control Specification CL:0063.01.21.02.1 We must ask for all pin codes during Interview stage.
However, per CL:0000.00.13.04.1 and CL:0000.00.21.02.1 we can do it later (before sending first command), and not automatically right after joining stage? CL:0000.00.13.04.1
If a Command Class is partially controlled, the controlling node MAY skip steps or perform them in a different order for the mandatory node interview detailed in this document.
CL:0000.00.21.02.1
This interview MUST be performed prior to issuing any control command to the supporting node. Preferably, it should be done during the commissioning phase of the supporting node or shortly after the inclusion of the controlling node
My emphasis is on "shortly after the inclusion" My proposal is to delay, not skip, get all pin codes step. Perhaps device should step into "Online non-functional" after joining?
Legacy Z-Wave S0 Door Locks are slow, S2 do not have that issue. Problem is elevated when we want to add several locks at once, and all of them start sending all possible pin codes at the same time.
I can provide a patch to delay the probing of user code with timer but it is too device specific to be added into the UnifySDK. My advice would be to propose a change in the specification to clear up the inclusion delay. Then we can work on integrating a solution into the Unify SDK.
Please rebase this PR if you want to move this change forward or close