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 Door Lock features depend on the security level

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:

  • Device Reset Locally: triggered upon reset.

  • Battery: Triggered upon low battery.

  • Door Lock: Triggered upon a change in door lock configuration.

  • Door Lock: Triggered upon a change in door lock operation.

  • Indicator Report: Triggered when LED1 changes state.

  • User Code: Triggered when a user code record is modified.

  • User Credential*: Triggered when a Duress User enters a Credential.

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#

The following buttons and LEDs 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: Button down sets the outside door handle mode active. Button up sets the outside door handle mode inactive.

BTN1

Press

Enter "learn mode" (sending node info frame) to add/remove the device. Removing the device from a network will reset it.

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 If this target is valid (the User exists and the Slot is not occupied), the application will report having read PIN Code 1167 after a simulated delay of 7 seconds. If this PIN Code does not already exist in the database, the new Credential will be saved.

BTN3

Button press

Simulates entering a user code on a keypad via the User Code API. The entered user code is hard-coded with the value of the default user code of the application. The default user code is 1234. A valid user code entry (i.e., button press) toggles the Door Lock Mode between Secured and Unsecured, with a delay of 2 seconds, to simulate timed hardware operation. If the user code for user ID 1 is changed to something else than the default user code, the Door Lock Mode can no longer be toggled by pressing this button.

Hold for at least 5 seconds and release*

Simulates entering a PIN Code on a keypad via the User Credential API. The entered PIN Code is hard-coded with the value of 1234. A valid Credential entry (i.e., button press) toggles the Door Lock Mode between Secured and Unsecured, with a delay of 2 seconds, to simulate timed hardware operation. If Credential data for User UID 1, Slot 1 is changed to something other than the default PIN Code, the Door Lock Mode can no longer be toggled by pressing this button.

*: 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. Used for Indicator Command Class.

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

It can be start or stop

Starting or stopping the learn mode

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