-
Notifications
You must be signed in to change notification settings - Fork 16
WIP: User credentials Command Class #144
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
Draft
rzr
wants to merge
59
commits into
SiliconLabsSoftware:main
Choose a base branch
from
rzr:phcoval/cc/cred/review/main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+220,855
−4
Conversation
This file contains hidden or 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
Signed-off-by: Philippe Coval <[email protected]>
- User Capabilities - Credential Capabilities - All User Checksum - User Get/Report - Credential Get/Report Merged : UIC-3222: Fix Supported Credential Types UIC-3222: Ignore User ID 0 & don't create duplicates UIC-3222: Delayed interview UIC-3222: User Credential User Name Encoding under UUID (No real advantage to put this under USER_NAME) UIC-3222: Fix user discovery UIC-3222: Credential get log UIC-3222: Discovery fix (credential and user get) UIC-3222: Discovery interview remove all users before user interview UIC-3222: Fix credential report if credential data is missing UIC-3222: Remove user if User modifier type is DNE UIC-3222: Correctly remove all user credential before discovery UIC-3222: set_reported_attribute return correct status and undefined desired UIC-3222: Add get_desired user id node function UIC-3222: get_credential_type can now be searched as desired value UIC-3222: Credential Learn Properties [Philippe Coval] Adjusted crc16 in applications/zpc/components/zwave_command_classes/test/CMakeLists.txt
UIC-3222: Credential Set on Credential Operation Type UIC-3222: Set Credential (delete) improvement UIC-3222: Credential SET also look in desired values UIC-3222: Fix delete operation on Credential SET UIC-3222: Allow extra bytes when testing set/get commands
UIC-3222: User set on User Operation Type UIC-3222: More user types UIC-3222: User SET fix UIC-3222: Set User (delete) improvement UIC-3222: Fix expiring minutes to Desired Or Reported to allow add UIC-3222: User SET can look into desired attributes
UIC-3222: Expose New credential capabilities UIC-3222: Expose Admin Code [Philippe Coval] Adjusted applications/zpc/components/zwave_command_classes/test/CMakeLists.txt
…al capabilities update
This patch will : - Not delete all user database en Unify startup - Allow the user to re-initiate an interview with the device and discover again all users
Also remove credential if modifier type is DNE
UIC-3222: Documentation of delete all credentials
In the previous implementation of U3C, User Notification Report size was incorrect : Z-Wave-Alliance/z-wave-stack#409 This commit use the correct implementation.
This commit will ensure that no more than Credential Type/Credential Slot exists no matter the user that got it. If we have (1,1) credential for User 1, user 2 cannot have a credential with type 1 and slot 1. User 2 should have type 1 and slot 2. For more context see Z-Wave-Alliance/AWG#172
Verify that the slot we are trying to add is in range of supported slots
Refactoring report function to use new C++ helpers
May be squashed later with the full refactor of User Report according to the new Z-Wave specification
This length is deducted from the attribute itself no need to complicate things.
Fix delete all user in report user Remove notification handler for user
[Philippe Coval] Adjusted Conflicts in: applications/zpc/components/zwave_command_classes/test/CMakeLists.txt
Those functions are not needed anymore with the new C++ helpers. get_uint16_value will be removed when credential refactoring is here
Also rename get_credential_identifier_nodes
Remove all Notification callbacks
We don't use desired state for credential type anymore since it's add complexity without any needs for it.
This will make the User Credential Implementation clearer
Add a new helper class for clarity
Much simpler and more efficient thanks to change parent feature
Top level API is now available directly with an header to avoid base file to be too big
Use new C++ api to be more consistent
0 nodes are better handled Credential node are properly deleted when no credential is available
Only check reported value instead of desired and reported Updated test to better coverage USER_SET
…rules Works both when adding a credential and modifying it
Use a new callback mechanism that allows the server to listen to certain event
Add a notification to the UI Set the received checksum last
Allow to add an credential that is already in the node tree Check desired or reported value of CREDENTIAL_LEARN_OPERATION_TYPE to avoid issues with supervision Send status to mqtt
Now the attribute ALL_USERS_CHECKSUM is defined at the end of the User interview if device support it Add command to force the refresh of the checksum
Now correctly interview ALL users on the first discovery (previously was only checking the first one due to a resolution error) All user checksum happens after all users & all credentials are reported
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.
This feature was not delivered on zpc-1.7.0
Relate-to: SiliconLabs/UnifySDK#43
Change
Ongoing parallel implementation of CC
Supported features
Incoming (not in PR yet, but implemented)
WIP
How to test it
End device
You can use the simulated environment to have an end device that support User Credential : https://github.com/Z-Wave-Alliance/z-wave-stack/wiki/ZPC
Controller
Compile (tested on Ubuntu 22.04 WSL)
In the git repository :
Once compiled, you can either install the dev packages or start the manually :
Run
We recommend to start zpc in command line : https://siliconlabs.github.io/UnifySDK/applications/zpc/readme_user.html#running-zpc-from-the-command-line
With the following arguments to help us debug an issue :
--log.tag_level zwave_command_class_user_credential:d,user_credential_cluster_server:d,zwave_command_class_notification:d;
--mapdir
directory (default path :/usr/share/uic/rules
)Once the end device is included you can see the User Credential class in :
https://localhost:3080/usercredential
Screenshots
Related-to: https://github.com/Z-Wave-Alliance/OSWG/issues/21#issuecomment-2074462819
Checklist
Checklist