-
Notifications
You must be signed in to change notification settings - Fork 25
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
GH-23: Feature door lock get all pin codes #23
GH-23: Feature door lock get all pin codes #23
Conversation
@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. |
68005b4
to
e7f155e
Compare
sl_log_debug(LOG_TAG, "Skip creating User ID nodes for CC UserCode V1."); | ||
return; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason behind this change ? I think CC UserCode V1 support multiple user ids.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As described above, we do not want to create all 255 User IDs during Interview phase and wait 5 minutes for it to complete.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means we never create user ids for User Code v1 unless using GetAllPin command. This is not good for certification as this should be done automatically. To workaround we could update the user ids (triggering a User Number Get) when using User Code Set on a user id which is not registered. Either way, it has to be done somewhere.
``` | ||
|
||
To see supported generated commands for DoorLock cluster under the by-unid topic space: | ||
|
||
```console | ||
mosquitto_sub -t 'ucl/by-unid/<UNID>/<EP>/DoorLock/SupportedGeneratedCommands' | ||
# Example output | ||
ucl/by-unid/<UNID>/<EP>/DoorLock/SupportedGeneratedCommands { "value": ["LockDoorResponse","UnlockDoorResponse","ToggleResponse","UnlockWithTimeoutResponse","GetLogRecordResponse","SetPINCodeResponse","GetPINCodeResponse","ClearPINCodeResponse","ClearAllPINCodesResponse","SetUserStatusResponse","GetUserStatusResponse","SetWeekdayScheduleResponse","GetWeekdayScheduleResponse","ClearWeekdayScheduleResponse","SetYearDayScheduleResponse","GetYearDayScheduleResponse","ClearYearDayScheduleResponse","SetHolidayScheduleResponse","GetHolidayScheduleResponse","ClearHolidayScheduleResponse","SetUserTypeResponse","GetUserTypeResponse","SetRFIDCodeResponse","GetRFIDCodeResponse","ClearRFIDCodeResponse","ClearAllRFIDCodesResponse","OperatingEventNotification","ProgrammingEventNotification"] } | ||
ucl/by-unid/<UNID>/<EP>/DoorLock/SupportedGeneratedCommands { "value": ["LockDoorResponse","UnlockDoorResponse","ToggleResponse","UnlockWithTimeoutResponse","GetLogRecordResponse","SetPINCodeResponse","GetPINCodeResponse","ClearPINCodeResponse","ClearAllPINCodesResponse","SetUserStatusResponse","GetUserStatusResponse","SetWeekdayScheduleResponse","GetWeekdayScheduleResponse","ClearWeekdayScheduleResponse","SetYearDayScheduleResponse","GetYearDayScheduleResponse","ClearYearDayScheduleResponse","SetHolidayScheduleResponse","GetHolidayScheduleResponse","ClearHolidayScheduleResponse","SetUserTypeResponse","GetUserTypeResponse","SetRFIDCodeResponse","GetRFIDCodeResponse","ClearRFIDCodeResponse","ClearAllRFIDCodesResponse","OperatingEventNotification","ProgrammingEventNotification",] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comma at the end typo ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was generated by zap.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ucl/by-unid/<UNID>{{#unless (clusterWithoutEndpoints label)}}/<EP>{{/unless}}/{{asPublicationName label}}/SupportedGeneratedCommands { "value": [{{#zcl_commands}}{{#if (isEqual source "client")}}"{{label}}"{{listComma this}}{{/if}}{{/zcl_commands}}] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's acceptable to me, I would keep the generated file this has to be fixed in zap :)
not a big deal anyway
…tAllPINCodes to DoorLock.xml This a patch integration into the Unify codebase. This may be squashed into the original commit. Origin: SiliconLabs#23 Bug-SiliconLabs: UIC-3201 Signed-off-by: Nenad Kljajic <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop Last-Update: 2024-01-18 (cherry picked from commit f9425c8c48fc290c07d6ff9e290d68675cba30c8)
…p-generated files for command GetAllPINCodes This is a patch integration into the Unify codebase. This may be squashed into the original commit. Origin: SiliconLabs#23 Bug-SiliconLabs: UIC-3201 Signed-off-by: Nenad Kljajic <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop Last-Update: 2024-01-18 (cherry picked from commit 674e23edc5d29903b052b197047ebee2f898a578)
…s in ZPC This is a patch integration into the Unify codebase. This may be squashed into the original commit. Origin: SiliconLabs#23 Bug-SiliconLabs: UIC-3201 Signed-off-by: Nenad Kljajic <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop Last-Update: 2024-01-18 (cherry picked from commit db74b5f2abe795d3ee1f54c8387dec9d4ded81be)
Bug-SiliconLabs: UIC-3201 Signed-off-by: Thomas du Boisrouvray <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop Last-Update: 2024-01-18 (cherry picked from commit 954cdcf4b91776e21760921e9c4f0f086328cc6c)
… Code Set. This allows to get confirmation of the User Code Set through Get Pin Code Response Bug-SiliconLabs: UIC-3072 Signed-off-by: Thomas du Boisrouvray <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop (cherry picked from commit e7debde26fce76a30db3626a8c553348dfb877de)
…mmand GetAllPINCodes to DoorLock.xml This a patch integration into the Unify codebase. This may be squashed into the original commit. Origin: SiliconLabs#23 Bug-SiliconLabs: UIC-3201 Signed-off-by: Nenad Kljajic <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop Last-Update: 2024-01-18 (cherry picked from commit f9425c8c48fc290c07d6ff9e290d68675cba30c8)
…p-generated files for command GetAllPINCodes This is a patch integration into the Unify codebase. This may be squashed into the original commit. Origin: SiliconLabs#23 Bug-SiliconLabs: UIC-3201 Signed-off-by: Nenad Kljajic <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop Last-Update: 2024-01-18 (cherry picked from commit 674e23edc5d29903b052b197047ebee2f898a578)
…s in ZPC This is a patch integration into the Unify codebase. This may be squashed into the original commit. Origin: SiliconLabs#23 Bug-SiliconLabs: UIC-3201 Signed-off-by: Nenad Kljajic <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop Last-Update: 2024-01-18 (cherry picked from commit db74b5f2abe795d3ee1f54c8387dec9d4ded81be)
Bug-SiliconLabs: UIC-3201 Signed-off-by: Thomas du Boisrouvray <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop Last-Update: 2024-01-18 (cherry picked from commit 954cdcf4b91776e21760921e9c4f0f086328cc6c)
… Code Set. This allows to get confirmation of the User Code Set through Get Pin Code Response Bug-SiliconLabs: UIC-3072 Signed-off-by: Thomas du Boisrouvray <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop (cherry picked from commit e7debde26fce76a30db3626a8c553348dfb877de)
Bug-SiliconLabs: UIC-3201 Signed-off-by: Thomas du Boisrouvray <[email protected]> Forwared-SiliconLabs: thdubois/UIC-3072/c4/develop (cherry picked from commit 5a445787e735313f67e7755a25950d08fe090096)
Please rebase branch to enable tests : |
Bug-SiliconLabs: UIC-3201 Signed-off-by: Thomas du Boisrouvray <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop Last-Update: 2024-01-19 (cherry picked from commit 954cdcf4b91776e21760921e9c4f0f086328cc6c)
… Code Set. This allows to get confirmation of the User Code Set through Get Pin Code Response Bug-SiliconLabs: UIC-3072 Signed-off-by: Thomas du Boisrouvray <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop (cherry picked from commit e7debde26fce76a30db3626a8c553348dfb877de)
Bug-SiliconLabs: UIC-3201 Signed-off-by: Thomas du Boisrouvray <[email protected]> Forwared-SiliconLabs: thdubois/UIC-3072/c4/develop (cherry picked from commit 5a445787e735313f67e7755a25950d08fe090096)
Bug-SiliconLabs: UIC-3201 Signed-off-by: Thomas du Boisrouvray <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop Last-Update: 2024-01-19 (cherry picked from commit 954cdcf4b91776e21760921e9c4f0f086328cc6c)
… Code Set. This allows to get confirmation of the User Code Set through Get Pin Code Response Bug-SiliconLabs: UIC-3072 Signed-off-by: Thomas du Boisrouvray <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop (cherry picked from commit e7debde26fce76a30db3626a8c553348dfb877de)
Bug-SiliconLabs: UIC-3201 Signed-off-by: Thomas du Boisrouvray <[email protected]> Forwared-SiliconLabs: thdubois/UIC-3072/c4/develop (cherry picked from commit 5a445787e735313f67e7755a25950d08fe090096)
Bug-SiliconLabs: UIC-3072 Signed-off-by: Thomas du Boisrouvray <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop (cherry picked from commit 66c6bb11ab1bbeeed1307ff9316efcc70b89a476)
… creation. Previously we were using ADD_IF_MISSING which creates a GET/REPORT sequence for each UserID. This was slowing down the interview process. User Code and User Id Status are now set to default value, which can be updated using GetAllPinCodes command. Bug-SiliconLabs: UIC-3062 Signed-off-by: Thomas du Boisrouvray <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop (cherry picked from commit ad72e34eb291502c60940a59e5db7d52cd744e41)
… creation. Previously we were using ADD_IF_MISSING which creates a GET/REPORT sequence for each UserID. This was slowing down the interview process. User Code and User Id Status are now set to default value, which can be updated using GetAllPinCodes command. Bug-SiliconLabs: UIC-3062 Signed-off-by: Thomas du Boisrouvray <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop (cherry picked from commit ad72e34eb291502c60940a59e5db7d52cd744e41)
Bug-SiliconLabs: UIC-3072 Signed-off-by: Thomas du Boisrouvray <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop (cherry picked from commit 66c6bb11ab1bbeeed1307ff9316efcc70b89a476)
… creation. Previously we were using ADD_IF_MISSING which creates a GET/REPORT sequence for each UserID. This was slowing down the interview process. User Code and User Id Status are now set to default value, which can be updated using GetAllPinCodes command. Bug-SiliconLabs: UIC-3062 Signed-off-by: Thomas du Boisrouvray <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop (cherry picked from commit ad72e34eb291502c60940a59e5db7d52cd744e41)
This is a contribution per the CLA Signed-off-by: Nenad Kljajic <[email protected]>
…NCodes This is a contribution per the CLA Signed-off-by: Nenad Kljajic <[email protected]>
This is a contribution per the CLA Signed-off-by: Nenad Kljajic <[email protected]>
This is a contribution per the CLA Signed-off-by: Nenad Kljajic <[email protected]>
…mmand GetAllPINCodes to DoorLock.xml This a patch integration into the Unify codebase. This may be squashed into the original commit. Origin: SiliconLabs#23 Bug-SiliconLabs: UIC-3201 Signed-off-by: Nenad Kljajic <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop Last-Update: 2024-01-18 (cherry picked from commit f9425c8c48fc290c07d6ff9e290d68675cba30c8)
…p-generated files for command GetAllPINCodes This is a patch integration into the Unify codebase. This may be squashed into the original commit. Origin: SiliconLabs#23 Bug-SiliconLabs: UIC-3201 Signed-off-by: Nenad Kljajic <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop Last-Update: 2024-01-18 (cherry picked from commit 674e23edc5d29903b052b197047ebee2f898a578)
…s in ZPC This is a patch integration into the Unify codebase. This may be squashed into the original commit. Origin: SiliconLabs#23 Bug-SiliconLabs: UIC-3201 Signed-off-by: Nenad Kljajic <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop Last-Update: 2024-01-18 (cherry picked from commit db74b5f2abe795d3ee1f54c8387dec9d4ded81be)
Bug-SiliconLabs: UIC-3201 Signed-off-by: Thomas du Boisrouvray <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop Last-Update: 2024-01-19 (cherry picked from commit 954cdcf4b91776e21760921e9c4f0f086328cc6c)
… Code Set. This allows to get confirmation of the User Code Set through Get Pin Code Response Bug-SiliconLabs: UIC-3072 Signed-off-by: Thomas du Boisrouvray <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop (cherry picked from commit e7debde26fce76a30db3626a8c553348dfb877de)
Bug-SiliconLabs: UIC-3201 Signed-off-by: Thomas du Boisrouvray <[email protected]> Forwared-SiliconLabs: thdubois/UIC-3072/c4/develop (cherry picked from commit 5a445787e735313f67e7755a25950d08fe090096)
Bug-SiliconLabs: UIC-3072 Signed-off-by: Thomas du Boisrouvray <[email protected]> Forwarded-SiliconLabs: thdubois/UIC-3072/c4/develop (cherry picked from commit 66c6bb11ab1bbeeed1307ff9316efcc70b89a476)
6985a1d
to
3931a0d
Compare
Hi Nenad, |
@Thomasdjb you are right, as per 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.21.02.1
My emphasis is on "shortly after the inclusion" Legacy Z-Wave S0 Door Locks are slow, S2 do not have that issue. |
Please rebase on https://github.com/SiliconLabs/UnifySDK/releases/tag/ver_1.5.0 feedback welcome |
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. |
Please rebase this PR if you want to move this change forward or close |
Number of possible PIN codes can be up to 255 and probing all of them can last for up to 5 minutes.
Change
Checklist