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.

Target Audience

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
What is Timed Interaction?

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.

ParameterTypeRequiredDescription
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.

ParameterTypeRequiredDescription
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.

ParameterTypeRequiredDescription
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).

ParameterTypeDescription
OperationTypeU80 = Add, 2 = Modify
CredentialStructContains CredentialType (PIN/Fingerprint/RFID, etc.) and CredentialIndex (slot number)
CredentialDataOctetStringCredential data, such as the digit sequence for a PIN code
UserIndexU16 / NullableBound user index. If null is passed during addition, the device automatically creates a new user
UserStatusU8 / NullableUser status (only effective when automatically creating a user)
UserTypeU8 / NullableUser 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.

ParameterTypeDescription
OperationTypeU80 = Add, 2 = Modify, 3 = Clear
UserIndexU16User index number (starting from 1)
UserNameString / NullableUser name (optional)
UniqueIDU32 / NullableUser unique identifier (optional, useful for cross-device synchronization)
UserStatusU8 / Nullable1 = OccupiedEnabled (active), 3 = OccupiedDisabled (disabled)
UserTypeU8 / Nullable0 = Unrestricted, 1 = Year Day Schedule, 6 = Remote Only, etc.
CredentialRuleU8 / NullableCredential 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.

IDNameTypeDescription
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

0
NotFullyLocked Not fully locked (possibly due to a mechanical fault or door not fully closed)
1
Locked Locked
2
Unlocked Unlocked
3
Unlatched Latch bolt retracted (intermediate state, not fully unlocked)
null
Unknown Device has not yet determined the lock bolt position
Developer Tip

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

0
DeadBolt Deadbolt lock
1
Magnetic Magnetic lock
2
Other Other type
3
Mortise Mortise lock
4
Rim Rim lock
5
LatchBolt Latch bolt lock
6
CylindricalLock Cylindrical lock
7
TubularLock Tubular lock
8
InterconnectedLock Interconnected lock
9
DeadLatch Dead latch
10
DoorFurniture Door furniture

DoorState Enum Values

0
Open Door is open
1
Closed Door is closed
2
JammedOpen Door is jammed in the open position
3
ForcedOpen Door was forced open (security alert)
4
Unspecified Unspecified
5
Ajar Door is ajar (not fully closed)
null
Unknown Sensor could not determine door state

Users & Credentials (0x11-0x1C)

Describes the number of users supported by the door lock, credential type capacities, and schedule capabilities.

IDNameTypeDescription
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

Bit 0
Single Supports single credential to unlock
Bit 1
Dual Supports dual credential verification (e.g., PIN + fingerprint)
Bit 2
Tri Supports triple credential verification
Credential Types

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.

IDNameTypeDescription
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

0
Never LED never lights up
1
AccessLockUnlock Lights up only during lock/unlock operations
2
NotAccessLockUnlock Lights up only during non-lock/unlock operations
3
All Lights up for all operations

SoundVolume Enum Values

0
Silent Silent
1
Low Low volume
2
High High volume

OperatingMode Enum Values

0
Normal Normal mode, all users can operate normally
1
Vacation Vacation mode, remote operations restricted
2
Privacy Privacy mode, only local operations allowed
3
NoRemoteLockUnlock Remote lock/unlock disabled
4
Passage Passage mode, door remains unlocked

Remote Operation (0x30-0x33)

Attributes related to remote (network/wireless) operation security policies.

IDNameTypeDescription
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
Security Note

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.

IDNameTypeDescription
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
}
Developer Tip

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

  1. Read ActuatorEnabled (0x02) to confirm the actuator is enabled
  2. Read RequirePINforRemoteOperation (0x33) to determine if user PIN input is required
  3. Send LockDoor (0x00) or UnlockDoor (0x01) command (must use Timed Interaction)
  4. Subscribe to LockState (0x00) changes to confirm the operation result

Scenario 2: Add New User and PIN Code

  1. Read NumberOfTotalUsersSupported (0x11) to check user capacity
  2. Send SetUser (0x1A) to create the user
  3. Read MinPINCodeLength (0x18) and MaxPINCodeLength (0x17) to verify PIN length requirements
  4. Send SetCredential (0x22) to bind a PIN code to that user
  5. Optionally use GetCredentialStatus (0x24) to verify the credential was set successfully

Scenario 3: Display Lock Status on Home Screen

  1. Read LockState (0x00) — handle the null value properly
  2. Read OperatingMode (0x25) — if not Normal, the UI may need to show a notice
  3. Read battery level from the PowerSource Cluster alongside lock status