-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Implement users and credentials in the Door Lock Cluster #13789
Merged
bzbarsky-apple
merged 48 commits into
project-chip:master
from
Morozov-5F:feature/implement-users-and-credentials
Jan 27, 2022
Merged
Implement users and credentials in the Door Lock Cluster #13789
bzbarsky-apple
merged 48 commits into
project-chip:master
from
Morozov-5F:feature/implement-users-and-credentials
Jan 27, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Morozov-5F
force-pushed
the
feature/implement-users-and-credentials
branch
from
January 20, 2022 20:52
ab3ef4d
to
930efda
Compare
pullapprove
bot
requested review from
andy31415,
anush-apple,
balducci-apple,
Byungjoo-Lee,
bzbarsky-apple,
carol-apple,
chrisdecenzo,
chshu,
chulspro,
Damian-Nordic,
dhrishi,
electrocucaracha,
erjiaqing,
franck-apple,
gjc13,
harimau-qirex,
hawk248,
holbrookt,
jelderton,
jepenven-silabs,
jmartinez-silabs,
kghost,
LuDuda and
lzgrablic02
January 20, 2022 20:53
…le to avoid generator errors
- This is done to avoid fixing github actions for now. - I would like to address the github stuff as a separate fix.
…t changes improved the ZAP generator
Morozov-5F
force-pushed
the
feature/implement-users-and-credentials
branch
from
January 27, 2022 12:26
8e6ae2b
to
2735775
Compare
PR #13789: Size comparison from 40cc421 to 2735775 Increases above 0.2%:
Increases (5 builds for esp32, linux, mbed, p6)
Decreases (4 builds for esp32, mbed, p6)
Full report (33 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
selissia
pushed a commit
to selissia/connectedhomeip
that referenced
this pull request
Jan 28, 2022
…p#13789) * Make nextUserIndex nullable in Door Lock as it is required by spec. * Initial implementation of Get/Set/Clear User command. * Refactor User-related commands in Door Lock Cluster * Minor tweaks in commands logging, add todos for events. * Properly handle nullable command arguments in chip-tool * Make more door lock command arguments nullable * Add placeholder implementation for the set credential command * Add missing argument to SetCredential command in Door Lock CLuster * Add basic SetCredential handler for Door Lock cluster. * Add YAML tests for Door Lock cluster (users/credentials) * Adjust underlying data structures for sample Door Lock credentials manager. * Move command handler to the door lock server class * A touch of clean-up in the Door Lock Server. * Add features bitmap to the Door Lock Cluster. * Implement GetCredentialStatus command in Door Lock Cluster. * Fix the door lock cluster feature checks. * Small refactoring of GetCredentialStatus. * Enable RFID attributes in the all-clusters app for now. * Refactor SetCredential command. * Replace unnecessary parameters in the user management of the door lock. * Reorder door lock server functions. Fix compiler errors * Check credential data range * Add documentation for application callbacks related to user management in Door Lock cluster. * Use Span for username and credentials. * Implement ability to modify credentials. * Change ZAP files for door lock app to include all necessary features * Don't use 'using namespace' in header files * Move users/credential database implementation to the door-lock-app. * Remove debug prints in the door lock cluster. * Add more verbose logging to the door lock app. * Make door-lock XML compliant to spec * Add clear credential command * Update door lock test suite to excercise ClearCredential command * Add Lock User Change event to Door Lock Cluster * Use credentials instead of hard-coded PIN when operating the lock * Support programming PIN * Refactor SetCredential command handler * Temporary make credential parameter in clearCredential command nullable to avoid generator errors * Bring back definition to make ESP32 builds work again * Fix format strings and leave out clearCredential logic that is not longer supported * Use appropriate format strings for logging in door lock cluster. * Add implicit casts when adding uint16_t variables to make compiler happy * Temporally ignore Door Lock tests when starting all test. - This is done to avoid fixing github actions for now. - I would like to address the github stuff as a separate fix. * Fix logging types in the door lock app * Fix styling issues * Clear the associated credentials when clearing the user * Make argument in ClearCredential command nullable again because recent changes improved the ZAP generator * Update auto-generated files
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Door Lock cluster needs implementation of users and credentials to function properly.
Change overview
This PR implement almost complete support of core Users & Credentials stuff from the door lock cluster -- it is now possible to create, modify and delete users and credentials using Matter IM. Also this PR includes reference (but not exactly the best) implementation of the app that utilizes the door lock server.
However, there are a couple of caveats:
0xFFFE
in theCredentialIndex
field ofCredential
argument.chip-tool
testing suite they are not run in the GitHub CI -- I would like to do that as a separate PR once this one is merge. I believe that it will be too much if I include that feature too.Testing
DL_UsersAndCredentials
) verifies users and credentials creation, modification and deletion with various parameters.DL_LockUnlock
) makes sure that lock operations such as Lock and Unlock work as expected (fail with incorrect PIN, pass with correct one).chip-tool
-- mostly used to read events because YAML tests does not support them yet.