Door Lock#
The Z-Wave certified Door Lock application shows a lock implementation. It supports user codes to open a door and thereby eliminate the need for traditional keys. It is possible to both lock and unlock the door remotely through the Z-Wave protocol.
The Door Lock application is based on:
Role Type | Listening Sleeping End device (LSS / FLiRS) |
Supporting Device Type | Actuator |
Device Type | Lock |
Generic Type | Entry Control |
Specific Type | Door Lock |
Requested security keys | S0 and S2_ACCESS |
The application will only work when securely added to a network by a controller supporting security. The controller MUST support security S2_Access_Control or S0 in order to be able to control the door lock.
Not implemented Door lock functionality:
Timed Operation mode
Door Lock condition
Inside Door Handle State
Functionality handling Lock timeout
Target mode
Auto-Relock, Hold And Release, Block to Block, and Twist Assist
A variant of this application supporting the User Credential Command Class called "Door Lock Key Pad with U3C Beta" is also available in this directory.\ This variant is not yet certifiable and not suitable for production.
Supported Command Classes#
The Door Lock application implements mandatory and some optional command classes. The table below lists the supported Command Classes, their version, and their required Security class, if any.
Command Class | Version | Required Security Class |
---|---|---|
Association | 2 | S0 or Access Control |
Association Group Info | 3 | S0 or Access Control |
Basic | 2 | S0 or Access Control |
Battery | 1 | S0 or Access Control |
Device Reset Locally | 1 | S0 or Access Control |
Door Lock | 4 | S0 or Access Control |
Firmware Update Meta Data | 5 | S0 or Access Control |
Indicator | 3 | S0 or Access Control |
Manufacturer Specific | 2 | S0 or Access Control |
Multi-Channel Association | 3 | S0 or Access Control |
Powerlevel | 1 | S0 or Access Control |
Security 0 | 1 | None |
Security 2 | 1 | None |
Supervision | 1 | None |
Transport Service | 2 | None |
User Code | 1 | S0 or Access Control |
User Credential* | 1 | S0 or Access Control |
Version | 3 | S0 or Access Control |
Z-Wave Plus Info | 2 | None |
*: The User Credential Command Class is currently only available in the "U3C Beta" variant of the application.
Basic Command Class mapping#
The Basic Command Class is mapped according to the table below.
Basic Command | Mapped Command |
---|---|
Basic Set (Value) | Door Lock Operation Set (Door Lock Mode) |
Basic Report (Current Value = 0x00) | Door Lock Operation Report (Door Lock Mode = 0x00) |
Basic Report (Current Value = 0xFF) | Door Lock Operation Set (Door Lock Mode) |
Association Groups#
The table below shows the available association groups, including supported command classes for Z-Wave and Z-Wave Long Range respectively.
ID | Name | Node Count | Description |
---|---|---|---|
1 | Lifeline | X | Supports the following command classes:
|
X: For Z-Wave node count is equal to 5 and for Z-Wave Long Range it is 1.\ *: The User Credential Command Class is currently only available in the "U3C Beta" variant of the application.
Usage of Buttons and LED Status
To use the sample app, the BRD8029A Button and LEDs Expansion Board must be used. BTN0-BTN3 and LED0-LED3 refer to the buttons and LEDs on the Expansion Board.
The following LEDs and buttons shown in the next table below are used.
Button | Action | Description |
---|---|---|
RST | Press | Resets the firmware of an application (like losing power). All volatile memory will be cleared. |
BTN0 | Button up/down | If the outside door handle state is active: |
BTN1 | Press | Enter "learn mode" (sending node info frame) to add/remove the device. |
Hold for at least 5 seconds and release | Perform a reset to factory default operation of the device, and a Device Reset Locally Notification Command is sent via Lifeline. | |
BTN2 | Button press | Sends Battery Report. |
Hold for at least 5 seconds and release* | Initiates the Credential Learn process locally with Target UUID: 1, Type: PIN Code, Slot: 2 | |
BTN3 | Button press | Simulates entering a user code on a keypad via the User Code API. |
Hold for at least 5 seconds and release* | Simulates entering a PIN Code on a keypad via the User Credential API. |
*: This functionality is currently only available in the "U3C Beta" variant of the application.
LED | Description | ||
---|---|---|---|
LED0 | Latch: | Led on -> latch open [bit 0] | Led off -> latch closed [bit 1] |
LED1 | Blinks with 1 Hz when learn mode is active. | ||
LED3 | Bolt: | Led on -> bolt locked [bit 0] | Led off -> bolt unlocked [bit 1] |
Firmware Update#
This section will describe backward compatibility when upgrading the Door Lock application from one SDK to a newer version.
CLI Support#
In case CLI support is needed pelase install zw_cli_common component to the project. Please note the zw_cli_common component will modify the power consumption in case of sleeping applications. Like door lock keypad, sensor pir or multilevel sensor. CLI cannot work with sleep mode, after a reset the application stays awake until the user issues the enable_sleeping command. From that point CLI won't work and sleep mode will be reached until the next reset.
Command | Arguments | Description |
---|---|---|
set_learn_mode | Toggling the learn mode functionality. In case the learn mode started, but inclusion does not happen, learn mode will automatically stop after about 30 seconds | |
factory_reset | - | Executing factory reset |
get_dsk | - | Printing out the generated DSK of the device |
get_region | - | Printing out the set region of the application |
battery_report | - | Sending a battery report |
enter_user_code | Your current user code. It must be between 4 and 10 digits. | Entering a minimum 4 digit long user code |
set_new_user_code | Your new user code. It must be between 4 and 10 digits. | Setting a new user code wich's lenght must be between 4 and 10 digits |
set_doorhandle_state | State of the door handle as string. Possible values are deactivate and activate | Updating the doorhandle state to locked or unlocked |
enable_sleeping | - | Lets the application go into sleep mode. After this command the CLI won't work until the next reset |
User Credential Related CLI commands
The following commands exist only in the User Credential variant of the door lock application.
Command | Arguments | Description |
---|---|---|
u3c_add_user |
| This command will create a new user in U3C database. The user's UUID will be autogenerated. |
u3c_add_credential |
| This command will create a new credential and assign it to an existing user. |
u3c_modify_user |
| This command modifies an attribute of an existing user |
u3c_modify_credential |
| This command modifies an existing credential. |
u3c_delete_user |
| This command deletes an existing user and all of the assigned credentials. |
u3c_delete_credential |
| This command deletes an existing credential from the database. |
u3c_enter_credential |
| This command enters an existing credential and validates it. |
u3c_set_learn_mode |
| Initiates the Credential Learn process locally (see BTN2 in the Usage of Buttons section) |