UnifySDK
UnifySDK copied to clipboard
GH-43: z-wave: Support of user credential cc
Change
Ongoing parallel implementation of CC
Supported features
- [X] Add, Edit, Remove an User (ZPC and MQTT)
- [X] Add, Edit, Remove an Credential (ZPC and MQTT)
- [X] End device interview of capabilities (ZPC and MQTT)
- [X] Support Set User/Credential Report Error
Incoming
- [ ] Handle multiple deletion of Users/Credentials
- [ ] Log errors in MQTT (and DevUI)
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 :
# We need mosquitto in the system
uic> sudo apt install mosquitto
# Build docker container
uic> docker/build_docker.sh amd64 uic_amd64;
# Start docker container
uic> docker run -it -v $PWD:$PWD -w $PWD uic_amd64;
# Now we are in the docker container, create build folder
docker> mkdir build && cd build
# Create Makefile with only ZPC and DevUI
docker> cmake .. -GNinja -DBUILD_AOXPC=OFF -DBUILD_CPCD=OFF -DBUILD_EMD=OFF -DBUILD_EPC=OFF -DBUILD_GMS=OFF -DBUILD_IMAGE_PROVIDER=OFF -DBUILD_MATTER_BRIDGE=OFF -DBUILD_NAL=OFF -DBUILD_OTBR=OFF -DBUILD_POSITIONING=OFF -DBUILD_TESTING=OFF -DBUILD_UIC_DEMO=OFF -DBUILD_UPTI_CAP=OFF -DBUILD_UPTI_WRITER=OFF -DBUILD_UPVL=OFF -DBUILD_ZIGBEED=OFF -DBUILD_ZIGPC=OFF
# Compile
docker> ninja
# Create .deb packages if you want to install them on your machine
docker> ninja package
Once compiled, you can either install the dev packages or start the manually :
# ZPC start
#⚠️--zpc.serial might change based on your socat implementation)
uic> sudo build_amd64/applications/zpc/zpc --zpc.serial=/tmp/socat-localhost+4901 --zpc.datastore_file /tmp/simulated.db --mapdir ./applications/zpc/components/dotdot_mapper/rules/ --log.tag_level zwave_command_class_user_credential:d,dotdot_mqtt:d,user_credential_cluster_server:d,zwave_command_class_notification:d;
# Dev UI API
#⚠️ You'll need node 18+ (use nvm https://github.com/nvm-sh/nvm)
uic> cd applications/dev_ui/dev_gui
uic> npm run start-api
# Dev UI (https://localhost:3000)
#⚠️ You'll need node 18+ (use nvm https://github.com/nvm-sh/nvm)
#⚠️ Security issues may happen with firefox, you'll have to test it on Chronium or use the .deb package
uic> cd applications/dev_ui/dev_gui
uic> npm run start
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;
⚠️ Make sure that this file https://github.com/SiliconLabs/UnifySDK/pull/43/commits/924445b41011b2abfdfcb8a7bb71aa87028f5931#diff-69a45f32ef895eeb999e643981807b60127f9a119499c6c83729312d66824544 is in your --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
⚠️Default credential data should not display properly, this is a known issue in the end device and will be fixed soon.
Screenshots
Related-to: https://github.com/Z-Wave-Alliance/OSWG/issues/21#issuecomment-2074462819
Checklist
- [X] A Contribution License Agreement has been established between @SiliconLabs and author's company (matching email domain)