DoorLock Cluster
Cluster ID: 0x0101 |
Endpoint: Typically on Endpoint 1 (application endpoint)
DoorLock is the core Cluster for Matter door lock devices, defining all capabilities including lock state queries, lock/unlock operations, user management, and credential (PIN code/fingerprint/NFC) management. Day-to-day development of door lock devices revolves around this Cluster.
Whether you are an app developer, firmware engineer, QA tester, or product manager, these attributes and commands are essential knowledge you need to understand.
Commands
Commands are operations sent to the door lock for execution. Most write operations require a Timed Interaction, which is a Matter security requirement for safety-critical devices like door locks. Click on a command ID in the table below to jump to its detailed description.
| ID | Name | Description | Timed Interaction |
|---|---|---|---|
0x00 |
LockDoor | Lock the door | Required |
0x01 |
UnlockDoor | Unlock the door | Required |
0x03 |
UnlockWithTimeout | Unlock, then automatically re-lock after a timeout | Required |
0x1A |
SetUser | Add or modify a user (with permissions, validity period, etc.) | Required |
0x1B |
GetUser | Query a specific user's information | Not required |
0x1D |
ClearUser | Delete a user (along with all associated credentials) | Required |
0x22 |
SetCredential | Add or modify a credential (PIN code, fingerprint, etc.) | Required |
0x24 |
GetCredentialStatus | Query the status of a specific credential slot | Not required |
0x26 |
ClearCredential | Delete a credential | Required |
0x28 |
SetAliroReaderConfig | Configure Aliro NFC reader parameters | Required |
0x29 |
ClearAliroReaderConfig | Clear Aliro NFC configuration | Required |
For security-sensitive devices like door locks, Matter requires write operations to include a timeout value (typically 5000~10000 milliseconds). This prevents man-in-the-middle attacks where an intercepted command could be replayed later — if the command is not executed within the timeout window, the device automatically rejects it.
If a LockDoor command is sent without the timeout parameter, the device will return an error immediately.
LockDoor — Lock (0x00)
Sends a lock command to the door lock. On successful execution, the LockState attribute changes from its current value to Locked (1).
This is one of the most essential and frequently used commands for door locks.
| Parameter | Type | Required | Description |
|---|---|---|---|
| PINCode | OctetString | Conditional | Required when RequirePINforRemoteOperation is true; a valid PIN code must be provided for remote locking |
Usage Scenarios & Parameters
Called when the user taps the "Lock" button on the app home screen. First check ActuatorEnabled (0x02) to confirm the actuator is available, then send this command using a Timed Interaction.
UnlockDoor — Unlock (0x01)
Sends an unlock command to the door lock. On successful execution, the LockState attribute changes to Unlocked (2).
Symmetric to LockDoor, this is also one of the most frequently used commands.
| Parameter | Type | Required | Description |
|---|---|---|---|
| PINCode | OctetString | Conditional | Required when RequirePINforRemoteOperation is true |
Usage Scenarios & Parameters
Called when the user taps "Unlock" in the app, or for remote unlocking when a guest arrives. After unlocking, it is recommended to subscribe to LockState changes and use AutoRelockTime to verify automatic re-locking.
UnlockWithTimeout — Timed Unlock (0x03)
Unlocks the door lock and automatically re-locks after a specified duration. Functionally equivalent to issuing UnlockDoor followed by waiting for AutoRelockTime, but the timeout is specified by the command parameter and is not affected by the AutoRelockTime attribute.
| Parameter | Type | Required | Description |
|---|---|---|---|
| Timeout | U16 | Yes | Auto re-lock wait time, in seconds |
| PINCode | OctetString | Conditional | Same as LockDoor |
Usage Scenarios & Parameters
Ideal for temporary guest access or package delivery scenarios — the door automatically re-locks after opening, requiring no manual action from the user.
SetCredential — Set Credential (0x22)
Adds or modifies a credential for a user. Credentials are the "keys" users use to unlock the door — they can be PIN codes, fingerprints, RFID cards, etc.
Each credential must be bound to an existing user (created via SetUser).
| Parameter | Type | Description |
|---|---|---|
| OperationType | U8 | 0 = Add, 2 = Modify |
| Credential | Struct | Contains CredentialType (PIN/Fingerprint/RFID, etc.) and CredentialIndex (slot number) |
| CredentialData | OctetString | Credential data, such as the digit sequence for a PIN code |
| UserIndex | U16 / Nullable | Bound user index. If null is passed during addition, the device automatically creates a new user |
| UserStatus | U8 / Nullable | User status (only effective when automatically creating a user) |
| UserType | U8 / Nullable | User type (only effective when automatically creating a user) |
Usage Scenarios & Parameters
Called when the user adds a new password or enrolls a fingerprint in the app. Before adding, validate the PIN code length via MinPINCodeLength (0x18) / MaxPINCodeLength (0x17), and check credential capacity via NumberOfCredentialsSupportedPerUser (0x1C).
GetCredentialStatus — Query Credential Status (0x24)
Queries whether a specific credential slot is occupied and which user it is bound to. Does not require a Timed Interaction; this is a read-only query operation.
ClearCredential — Delete Credential (0x26)
Deletes a specified credential. If a specific CredentialType and CredentialIndex are provided, the exact credential is removed; it can also batch-clear all credentials of a given type or all credentials entirely.
SetAliroReaderConfig — Configure Aliro Reader (0x28)
Configures the Aliro NFC reader's signing key, group key, supported protocol versions, and other parameters. Aliro is a new NFC tap-to-unlock standard introduced by Matter for door locks.
ClearAliroReaderConfig — Clear Aliro Config (0x29)
Resets all Aliro NFC reader configuration, restoring the device to an unconfigured state.
SetUser — Set User (0x1A)
Creates or modifies a user on the door lock. Users are "containers" for credentials — each user can have multiple bound credentials (passwords, fingerprints, etc.), and can be assigned a permission level and validity period. User management and credential management are the two most complex operations for door locks.
| Parameter | Type | Description |
|---|---|---|
| OperationType | U8 | 0 = Add, 2 = Modify, 3 = Clear |
| UserIndex | U16 | User index number (starting from 1) |
| UserName | String / Nullable | User name (optional) |
| UniqueID | U32 / Nullable | User unique identifier (optional, useful for cross-device synchronization) |
| UserStatus | U8 / Nullable | 1 = OccupiedEnabled (active), 3 = OccupiedDisabled (disabled) |
| UserType | U8 / Nullable | 0 = Unrestricted, 1 = Year Day Schedule, 6 = Remote Only, etc. |
| CredentialRule | U8 / Nullable | Credential rule: 0 = Single credential sufficient, 1 = Dual authentication required, 2 = Triple |
Usage Scenarios & Parameters
Called when registering a new user on the door lock. Typical workflow: first SetUser to create the user, then SetCredential to bind credentials to that user. When deleting a user, use ClearUser instead, which also cleans up all associated credentials.
GetUser — Query User (0x1B)
Queries detailed user information by UserIndex, including name, status, type, bound credentials list, etc. Does not require a Timed Interaction.
ClearUser — Delete User (0x1D)
Deletes the specified user along with all associated credentials. This is a "cascading delete" operation — no additional ClearCredential calls are needed.
Timed Interaction Example
When sending a lock command, the request structure looks roughly like this:
{
"timedRequest": {
"timeoutMs": 5000 // Timeout: 5 seconds
},
"invokeRequests": [{
"commandPath": {
"endpointId": 1, // Application endpoint
"clusterId": "0x0101", // DoorLock
"commandId": "0x00" // LockDoor
},
"commandFields": {} // LockDoor has no additional parameters
}]
}
Attributes
The DoorLock Cluster attributes are organized into five functional groups. Click on an attribute ID in the summary table below to jump to its detailed description.
| ID | Name | Type | Group | Description |
|---|---|---|---|---|
0x00 |
LockState | enum8 / null | Lock Core State | Current lock state |
0x01 |
LockType | enum8 | Lock Core State | Lock mechanism type |
0x02 |
ActuatorEnabled | bool | Lock Core State | Whether the actuator is enabled |
0x03 |
DoorState | enum8 / null | Lock Core State | Door physical state (requires DoorPositionSensor feature) |
0x04 |
DoorOpenEvents | uint32 | Lock Core State | Cumulative count of door open events |
0x05 |
DoorClosedEvents | uint32 | Lock Core State | Cumulative count of door close events |
0x06 |
OpenPeriod | uint16 | Lock Core State | Door open duration (seconds) |
0x11 |
NumberOfTotalUsersSupported | uint16 | Users & Credentials | Maximum total users supported |
0x12 |
NumberOfPINUsersSupported | uint16 | Users & Credentials | Maximum PIN code users supported |
0x13 |
NumberOfRFIDUsersSupported | uint16 | Users & Credentials | Maximum RFID users supported |
0x14 |
NumberOfWeekDaySchedulesSupportedPerUser | uint8 | Users & Credentials | Week day schedules per user |
0x15 |
NumberOfYearDaySchedulesSupportedPerUser | uint8 | Users & Credentials | Year day schedules per user |
0x16 |
NumberOfHolidaySchedulesSupported | uint8 | Users & Credentials | Total holiday schedules |
0x17 |
MaxPINCodeLength | uint8 | Users & Credentials | Maximum PIN code length |
0x18 |
MinPINCodeLength | uint8 | Users & Credentials | Minimum PIN code length |
0x19 |
MaxRFIDCodeLength | uint8 | Users & Credentials | Maximum RFID code length |
0x1A |
MinRFIDCodeLength | uint8 | Users & Credentials | Minimum RFID code length |
0x1B |
CredentialRulesSupport | bitmap8 | Users & Credentials | Credential rules support bitmap |
0x1C |
NumberOfCredentialsSupportedPerUser | uint8 | Users & Credentials | Maximum credentials per user |
0x21 |
Language | string | Operation & Display | Lock interface language (ISO 639-1) |
0x22 |
LEDSettings | uint8 | Operation & Display | LED indicator settings |
0x23 |
AutoRelockTime | uint32 | Operation & Display | Auto re-lock time (seconds) |
0x24 |
SoundVolume | uint8 | Operation & Display | Operating sound volume |
0x25 |
OperatingMode | enum8 | Operation & Display | Current operating mode |
0x26 |
SupportedOperatingModes | bitmap16 | Operation & Display | Supported operating modes bitmap |
0x27 |
DefaultConfigurationRegister | bitmap16 | Operation & Display | Default configuration register |
0x28 |
EnableLocalProgramming | bool | Operation & Display | Whether local programming is allowed |
0x29 |
EnableOneTouchLocking | bool | Operation & Display | Whether one-touch locking is enabled |
0x2A |
EnableInsideStatusLED | bool | Operation & Display | Whether inside status LED is enabled |
0x2B |
EnablePrivacyModeButton | bool | Operation & Display | Whether privacy mode button is enabled |
0x2C |
LocalProgrammingFeatures | bitmap8 | Operation & Display | Local programming features bitmap |
0x30 |
WrongCodeEntryLimit | uint8 | Remote Operation | Wrong code entry limit |
0x31 |
UserCodeTemporaryDisableTime | uint8 | Remote Operation | Wrong code lockout time (seconds) |
0x32 |
SendPINOverTheAir | bool | Remote Operation | Whether to send PIN over the air |
0x33 |
RequirePINforRemoteOperation | bool | Remote Operation | Whether PIN is required for remote operations |
0x80 |
AliroReaderVerificationKey | octstr | Aliro NFC | Reader verification key |
0x81 |
AliroReaderGroupIdentifier | octstr | Aliro NFC | Reader group identifier |
0x82 |
AliroReaderGroupSubIdentifier | octstr | Aliro NFC | Reader group sub-identifier |
0x83 |
AliroExpeditedTransactionSupportedProtocolVersions | list | Aliro NFC | Expedited transaction supported protocol versions |
0x84 |
AliroGroupResolvingKey | octstr | Aliro NFC | Group resolving key |
0x85 |
AliroSupportedBLEUWBProtocolVersions | list | Aliro NFC | Supported BLE UWB protocol versions |
0x86 |
AliroBLEAdvertisingVersion | uint8 | Aliro NFC | BLE advertising version |
0x87 |
NumberOfAliroCredentialIssuerKeysSupported | uint16 | Aliro NFC | Credential issuer keys count |
0x88 |
NumberOfAliroEndpointKeysSupported | uint16 | Aliro NFC | Endpoint keys count |
Lock Core State (0x00-0x06)
The most fundamental status information of the door lock, including lock state, lock type, actuator, and door position sensor data.
| ID | Name | Type | Description |
|---|---|---|---|
0x00 |
LockState Lock State |
enum8 / null | Current lock state. null indicates the device has not yet determined the lock bolt position (e.g., during initial power-up) |
0x01 |
LockType Lock Type |
enum8 | Physical type of the lock mechanism, fixed at factory |
0x02 |
ActuatorEnabled Actuator Enabled |
bool | Whether the actuator is enabled. When false, all lock/unlock commands are rejected |
0x03 |
DoorState Door State |
enum8 / null | Physical open/close state of the door. Requires the device to support the DoorPositionSensor feature |
0x04 |
DoorOpenEvents Door Open Events |
uint32 | Cumulative count of door open events (writable to reset the counter) |
0x05 |
DoorClosedEvents Door Closed Events |
uint32 | Cumulative count of door close events (writable to reset the counter) |
0x06 |
OpenPeriod Open Period |
uint16 | Duration the door has remained open without closing, in seconds |
LockState Enum Values
LockState is a Nullable type — when the device has just started up and has not yet detected the lock bolt position, this value may be null. Do not treat this field directly as a number; always check for null first.
LockType Enum Values
DoorState Enum Values
Users & Credentials (0x11-0x1C)
Describes the number of users supported by the door lock, credential type capacities, and schedule capabilities.
| ID | Name | Type | Description |
|---|---|---|---|
0x11 |
NumberOfTotalUsersSupported Total Users Supported |
uint16 | Maximum total number of users supported by the device |
0x12 |
NumberOfPINUsersSupported PIN Users |
uint16 | Maximum number of users with PIN codes |
0x13 |
NumberOfRFIDUsersSupported RFID Users |
uint16 | Maximum number of users with RFID credentials |
0x14 |
NumberOfWeekDaySchedulesSupportedPerUser Week Day Schedules |
uint8 | Number of week day schedules per user (e.g., specific time slots on Monday through Friday when unlocking is allowed) |
0x15 |
NumberOfYearDaySchedulesSupportedPerUser Year Day Schedules |
uint8 | Number of year day schedules per user (specified date ranges when unlocking is allowed) |
0x16 |
NumberOfHolidaySchedulesSupported Holiday Schedules |
uint8 | Total number of holiday schedules supported by the device (applies globally, overrides regular schedules) |
0x17 |
MaxPINCodeLength Max PIN Length |
uint8 | Maximum number of characters for a PIN code |
0x18 |
MinPINCodeLength Min PIN Length |
uint8 | Minimum number of characters required for a PIN code |
0x19 |
MaxRFIDCodeLength Max RFID Length |
uint8 | Maximum number of bytes for an RFID code |
0x1A |
MinRFIDCodeLength Min RFID Length |
uint8 | Minimum number of bytes required for an RFID code |
0x1B |
CredentialRulesSupport Credential Rules |
bitmap8 | Supported credential verification rules (see bitmap below) |
0x1C |
NumberOfCredentialsSupportedPerUser Credentials Per User |
uint8 | Maximum number of credentials that can be bound to each user |
CredentialRulesSupport Bitmap
Matter-defined credential types include: PIN (numeric passcode), RFID (card), Fingerprint, FingerVein, and Face.
Which credential types are actually supported depends on the door lock hardware. Credentials are managed via the SetCredential command.
Operation & Display (0x21-0x2C)
Controls the door lock's operating behavior, display settings, and local programming features.
| ID | Name | Type | Description |
|---|---|---|---|
0x21 |
Language Interface Language |
string | Lock interface display language, 2-character ISO 639-1 code (e.g., "en", "zh") |
0x22 |
LEDSettings LED Settings |
uint8 | Which operations cause the LED indicator to light up (see enum below) |
0x23 |
AutoRelockTime Auto Re-lock Time |
uint32 | Wait time before automatic re-locking after unlock, in seconds. 0 means no automatic re-locking |
0x24 |
SoundVolume Sound Volume |
uint8 | Volume level of the door lock's operation notification sound (see enum below) |
0x25 |
OperatingMode Operating Mode |
enum8 | The door lock's current operating mode (see enum below) |
0x26 |
SupportedOperatingModes Supported Operating Modes |
bitmap16 | Which operating modes the device supports (bitmask corresponding to OperatingMode enum values) |
0x27 |
DefaultConfigurationRegister Default Config Register |
bitmap16 | Indicates which configuration items have been modified from factory defaults |
0x28 |
EnableLocalProgramming Local Programming |
bool | Whether local adding/modifying of users and credentials via the lock panel is allowed |
0x29 |
EnableOneTouchLocking One-Touch Locking |
bool | Whether one-touch locking is enabled (touch the panel to lock the door) |
0x2A |
EnableInsideStatusLED Inside Status LED |
bool | Whether the status indicator LED on the inside of the door lock is enabled |
0x2B |
EnablePrivacyModeButton Privacy Mode Button |
bool | Whether the physical privacy mode button is enabled (when pressed, remote operations are rejected) |
0x2C |
LocalProgrammingFeatures Local Programming Features |
bitmap8 | Specific features allowed via local programming (adding users, modifying schedules, etc.) |
LEDSettings Enum Values
SoundVolume Enum Values
OperatingMode Enum Values
Remote Operation (0x30-0x33)
Attributes related to remote (network/wireless) operation security policies.
| ID | Name | Type | Description |
|---|---|---|---|
0x30 |
WrongCodeEntryLimit Wrong Code Limit |
uint8 | Maximum number of consecutive incorrect code entries before triggering a temporary lockout |
0x31 |
UserCodeTemporaryDisableTime Lockout Duration |
uint8 | Disable time after temporary lockout is triggered, in seconds |
0x32 |
SendPINOverTheAir Send PIN Over Air |
bool | Whether sending PIN codes over wireless networks is allowed (security-related, generally recommended to disable) |
0x33 |
RequirePINforRemoteOperation Require PIN for Remote |
bool | Whether remote (app/network) operations must include a PIN code. When true, LockDoor/UnlockDoor commands must carry a valid PIN |
WrongCodeEntryLimit and UserCodeTemporaryDisableTime together form the door lock's brute-force protection mechanism.
A typical configuration is lockout for 60 seconds after 5 wrong entries. The app should warn the user before reaching the limit to avoid accidentally triggering a lockout.
Aliro NFC Access (0x80-0x88)
Aliro is a new NFC tap-to-unlock standard introduced by Matter for door locks. It supports automatic unlocking when a phone is brought near the door lock, similar to the Apple digital car key experience.
Managed via SetAliroReaderConfig / ClearAliroReaderConfig commands.
| ID | Name | Type | Description |
|---|---|---|---|
0x80 |
AliroReaderVerificationKey Reader Verification Key |
octstr | Public key used to verify the reader's identity |
0x81 |
AliroReaderGroupIdentifier Reader Group ID |
octstr | Identifier for the group the reader belongs to; readers in the same group share access permissions |
0x82 |
AliroReaderGroupSubIdentifier Reader Sub-ID |
octstr | Unique sub-identifier for the reader within its group |
0x83 |
AliroExpeditedTransactionSupportedProtocolVersions Expedited Protocol Versions |
list | List of supported expedited (no full handshake required) transaction protocol versions |
0x84 |
AliroGroupResolvingKey Group Resolving Key |
octstr | Key used to resolve and identify Aliro group membership |
0x85 |
AliroSupportedBLEUWBProtocolVersions BLE UWB Protocol Versions |
list | List of supported BLE and UWB protocol versions (used for ranging and positioning) |
0x86 |
AliroBLEAdvertisingVersion BLE Advertising Version |
uint8 | BLE advertising protocol version of the Aliro reader |
0x87 |
NumberOfAliroCredentialIssuerKeysSupported Issuer Keys Count |
uint16 | Number of Aliro credential issuer keys supported by the device |
0x88 |
NumberOfAliroEndpointKeysSupported Endpoint Keys Count |
uint16 | Number of Aliro endpoint keys supported by the device |
Standard Example
Below is a typical attribute data example for a Matter door lock (JSON format), with field-by-field annotations:
{
// --- Lock Core State ---
"0x00": 1, // LockState = Locked
"0x01": 0, // LockType = DeadBolt
"0x02": true, // ActuatorEnabled = true (actuator enabled)
"0x03": 1, // DoorState = Closed
// --- Users & Credentials ---
"0x11": 10, // NumberOfTotalUsersSupported = 10
"0x12": 10, // NumberOfPINUsersSupported = 10
"0x17": 8, // MaxPINCodeLength = 8 digits
"0x18": 4, // MinPINCodeLength = 4 digits
"0x1C": 5, // NumberOfCredentialsSupportedPerUser = 5
// --- Operation & Display ---
"0x23": 30, // AutoRelockTime = 30 seconds
"0x24": 2, // SoundVolume = High
"0x25": 0, // OperatingMode = Normal
"0x26": 65535, // SupportedOperatingModes (all modes supported)
// --- Remote Operation ---
"0x30": 5, // WrongCodeEntryLimit = 5 attempts
"0x33": false // RequirePINforRemoteOperation = false
}
When reading data from a device, attribute IDs are hexadecimal strings used as keys. In the JSON above, "0x00" corresponds to LockState,
and "0x20" corresponds to OperatingMode. Cross-reference with the attribute table on this page for each field.
Common Scenarios
Scenario 1: Remote Lock / Unlock
- Read
ActuatorEnabled (0x02)to confirm the actuator is enabled - Read
RequirePINforRemoteOperation (0x33)to determine if user PIN input is required - Send
LockDoor (0x00)orUnlockDoor (0x01)command (must use Timed Interaction) - Subscribe to
LockState (0x00)changes to confirm the operation result
Scenario 2: Add New User and PIN Code
- Read
NumberOfTotalUsersSupported (0x11)to check user capacity - Send
SetUser (0x1A)to create the user - Read
MinPINCodeLength (0x18)andMaxPINCodeLength (0x17)to verify PIN length requirements - Send
SetCredential (0x22)to bind a PIN code to that user - Optionally use
GetCredentialStatus (0x24)to verify the credential was set successfully
Scenario 3: Display Lock Status on Home Screen
- Read
LockState (0x00)— handle thenullvalue properly - Read
OperatingMode (0x25)— if not Normal, the UI may need to show a notice - Read battery level from the PowerSource Cluster alongside lock status