class

Matter::Cluster::DoorLockCluster

Inherits Matter::Cluster::Base < Reference < Object

Door Lock Cluster (0x0101)

Provides remote lock/unlock control plus user/credential management for a lock. This implementation focuses on robust server-side behavior for the most commonly used Door Lock attributes and commands, including feature-gated command support.

Constants

ALL_SCHEDULES = 254_u8
ALL_USERS = 65534_u16
ATTR_ACTUATOR_ENABLED = 2_u32
ATTR_AUTO_RELOCK_TIME = 35_u32
ATTR_CREDENTIAL_RULES_SUPPORT = 27_u32
ATTR_DEFAULT_CONFIGURATION_REGISTER = 39_u32
ATTR_DOOR_CLOSED_EVENTS = 5_u32
ATTR_DOOR_OPEN_EVENTS = 4_u32
ATTR_DOOR_STATE = 3_u32

Door Position Sensor feature attributes

ATTR_ENABLE_INSIDE_STATUS_LED = 42_u32
ATTR_ENABLE_LOCAL_PROGRAMMING = 40_u32
ATTR_ENABLE_ONE_TOUCH_LOCKING = 41_u32
ATTR_ENABLE_PRIVACY_MODE_BUTTON = 43_u32
ATTR_EXPIRING_USER_TIMEOUT = 53_u32
ATTR_LANGUAGE = 33_u32

Base optional attributes

ATTR_LED_SETTINGS = 34_u32
ATTR_LOCAL_PROGRAMMING_FEATURES = 44_u32
ATTR_LOCK_STATE = 0_u32

Required attributes

ATTR_LOCK_TYPE = 1_u32
ATTR_MAX_PIN_CODE_LENGTH = 23_u32
ATTR_MAX_RFID_CODE_LENGTH = 25_u32
ATTR_MIN_PIN_CODE_LENGTH = 24_u32
ATTR_MIN_RFID_CODE_LENGTH = 26_u32
ATTR_NUMBER_OF_CREDENTIALS_SUPPORTED_PER_USER = 28_u32
ATTR_NUMBER_OF_HOLIDAY_SCHEDULES_SUPPORTED = 22_u32
ATTR_NUMBER_OF_PIN_USERS_SUPPORTED = 18_u32
ATTR_NUMBER_OF_RFID_USERS_SUPPORTED = 19_u32
ATTR_NUMBER_OF_TOTAL_USERS_SUPPORTED = 17_u32

User / credential / schedule capability attributes

ATTR_NUMBER_OF_WEEK_DAY_SCHEDULES_SUPPORTED_PER_USER = 20_u32
ATTR_NUMBER_OF_YEAR_DAY_SCHEDULES_SUPPORTED_PER_USER = 21_u32
ATTR_OPEN_PERIOD = 6_u32
ATTR_OPERATING_MODE = 37_u32
ATTR_REQUIRE_PIN_FOR_REMOTE_OPERATION = 51_u32
ATTR_SEND_PIN_OVER_THE_AIR = 50_u32
ATTR_SOUND_VOLUME = 36_u32
ATTR_SUPPORTED_OPERATING_MODES = 38_u32
ATTR_USER_CODE_TEMPORARY_DISABLE_TIME = 49_u32
ATTR_WRONG_CODE_ENTRY_LIMIT = 48_u32

Optional credential policy attributes

CLUSTER_ID = 257_u32
CLUSTER_REVISION = 9_u16
CMD_CLEAR_CREDENTIAL = 38_u32
CMD_CLEAR_HOLIDAY_SCHEDULE = 19_u32
CMD_CLEAR_USER = 29_u32
CMD_CLEAR_WEEK_DAY_SCHEDULE = 13_u32
CMD_CLEAR_YEAR_DAY_SCHEDULE = 16_u32
CMD_GET_CREDENTIAL_STATUS = 36_u32
CMD_GET_CREDENTIAL_STATUS_RESPONSE = 37_u32
CMD_GET_HOLIDAY_SCHEDULE = 18_u32
CMD_GET_USER = 27_u32
CMD_GET_USER_RESPONSE = 28_u32
CMD_GET_WEEK_DAY_SCHEDULE = 12_u32
CMD_GET_YEAR_DAY_SCHEDULE = 15_u32
CMD_LOCK_DOOR = 0_u32

Commands

CMD_SET_CREDENTIAL = 34_u32
CMD_SET_CREDENTIAL_RESPONSE = 35_u32
CMD_SET_HOLIDAY_SCHEDULE = 17_u32
CMD_SET_USER = 26_u32
CMD_SET_WEEK_DAY_SCHEDULE = 11_u32
CMD_SET_YEAR_DAY_SCHEDULE = 14_u32
CMD_UNBOLT_DOOR = 39_u32
CMD_UNLOCK_DOOR = 1_u32
CMD_UNLOCK_WITH_TIMEOUT = 3_u32
EVT_DOOR_LOCK_ALARM = 0_u32

Events

EVT_DOOR_STATE_CHANGE = 1_u32
EVT_LOCK_OPERATION = 2_u32
EVT_LOCK_OPERATION_ERROR = 3_u32
EVT_LOCK_USER_CHANGE = 4_u32

Constructors

new(endpoint_id : DataType::EndpointNumber, feature_map : Feature = (((Feature::DoorPositionSensor | Feature::PinCredential) | Feature::CredentialOverTheAirAccess) | Feature::User) | Feature::Unbolting, lock_state : Def::LockState | Nil = Def::LockState::Locked, lock_type : Def::LockType = Def::LockType::Deadbolt, actuator_enabled : Bool = true, door_state : Def::DoorState | Nil = Def::DoorState::DoorClosed, language : String = "en", led_settings : LedSettings = LedSettings::NoLedSignal, auto_relock_time : UInt32 = 0_u32, sound_volume : SoundVolume = SoundVolume::Medium, operating_mode : Def::OperatingMode = Def::OperatingMode::Normal, supported_operating_modes : UInt16 = 0_u16, default_configuration_register : UInt16 = 0_u16, enable_local_programming : Bool = true, enable_one_touch_locking : Bool = true, enable_inside_status_led : Bool = true, enable_privacy_mode_button : Bool = true, local_programming_features : UInt8 = 255_u8, number_of_total_users_supported : UInt16 = 50_u16, number_of_pin_users_supported : UInt16 = 50_u16, number_of_rfid_users_supported : UInt16 = 50_u16, number_of_week_day_schedules_supported_per_user : UInt8 = 5_u8, number_of_year_day_schedules_supported_per_user : UInt8 = 5_u8, number_of_holiday_schedules_supported : UInt8 = 5_u8, max_pin_code_length : UInt8 = 8_u8, min_pin_code_length : UInt8 = 4_u8, max_rfid_code_length : UInt8 = 20_u8, min_rfid_code_length : UInt8 = 4_u8, credential_rules_support : UInt8 = 1_u8, number_of_credentials_supported_per_user : UInt8 = 5_u8, wrong_code_entry_limit : UInt8 = 3_u8, user_code_temporary_disable_time : UInt8 = 30_u8, send_pin_over_the_air : Bool = true, require_pin_for_remote_operation : Bool = false, expiring_user_timeout : UInt16 = 10_u16, default_pin_code : String = "1234")
Source

Class methods

cluster_id

Door Lock Cluster (0x0101)

Provides remote lock/unlock control plus user/credential management for a lock. This implementation focuses on robust server-side behavior for the most commonly used Door Lock attributes and commands, including feature-gated command support.

Source

Instance methods

actuator_enabled=(actuator_enabled : Bool)
Source
actuator_enabled?
Source
attributes

Get all attribute metadata

Source
auto_relock_time
Source
auto_relock_time=(auto_relock_time : UInt32)
Source
commands

Get all command metadata

Source
credential_rules_support
Source
credential_rules_support=(credential_rules_support : UInt8)
Source
default_configuration_register
Source
default_configuration_register=(default_configuration_register : UInt16)
Source
default_pin_code
Source
door_closed_events
Source
door_closed_events=(door_closed_events : UInt32)
Source
door_open_events
Source
door_open_events=(door_open_events : UInt32)
Source
door_state
Source
door_state=(door_state : Def::DoorState | Nil)
Source
enable_inside_status_led=(enable_inside_status_led : Bool)
Source
enable_inside_status_led?
Source
enable_local_programming=(enable_local_programming : Bool)
Source
enable_local_programming?
Source
enable_one_touch_locking=(enable_one_touch_locking : Bool)
Source
enable_one_touch_locking?
Source
enable_privacy_mode_button=(enable_privacy_mode_button : Bool)
Source
enable_privacy_mode_button?
Source
events

Get all event metadata

Source
expiring_user_timeout
Source
expiring_user_timeout=(expiring_user_timeout : UInt16)
Source
feature_map
Source
feature_map=(feature_map : Feature)
Source
language
Source
language=(language : String)
Source
led_settings
Source
led_settings=(led_settings : LedSettings)
Source
local_programming_features
Source
local_programming_features=(local_programming_features : UInt8)
Source
lock(pin : String | Nil = nil, source : Def::OperationSource = Def::OperationSource::Remote) : InteractionModel::Status

Public API for local application logic

Source
lock_state
Source
lock_state=(lock_state : Def::LockState | Nil)
Source
lock_type
Source
lock_type=(lock_type : Def::LockType)
Source
locked?
Source
max_pin_code_length
Source
max_pin_code_length=(max_pin_code_length : UInt8)
Source
max_rfid_code_length
Source
max_rfid_code_length=(max_rfid_code_length : UInt8)
Source
min_pin_code_length
Source
min_pin_code_length=(min_pin_code_length : UInt8)
Source
min_rfid_code_length
Source
min_rfid_code_length=(min_rfid_code_length : UInt8)
Source
name

Get cluster name

Source
number_of_credentials_supported_per_user
Source
number_of_credentials_supported_per_user=(number_of_credentials_supported_per_user : UInt8)
Source
number_of_holiday_schedules_supported
Source
number_of_holiday_schedules_supported=(number_of_holiday_schedules_supported : UInt8)
Source
number_of_pin_users_supported
Source
number_of_pin_users_supported=(number_of_pin_users_supported : UInt16)
Source
number_of_rfid_users_supported
Source
number_of_rfid_users_supported=(number_of_rfid_users_supported : UInt16)
Source
number_of_total_users_supported
Source
number_of_total_users_supported=(number_of_total_users_supported : UInt16)
Source
number_of_week_day_schedules_supported_per_user
Source
number_of_week_day_schedules_supported_per_user=(number_of_week_day_schedules_supported_per_user : UInt8)
Source
number_of_year_day_schedules_supported_per_user
Source
number_of_year_day_schedules_supported_per_user=(number_of_year_day_schedules_supported_per_user : UInt8)
Source
on_door_state_changed
Source
on_lock_state_changed
Source
open_period
Source
open_period=(open_period : UInt16)
Source
operating_mode
Source
operating_mode=(operating_mode : Def::OperatingMode)
Source
read_attribute(attribute_id : UInt32, fabric_index : UInt8 | Nil = nil) : Bytes | InteractionModel::Status

Read an attribute value The fabric_index parameter is optional and used for fabric-scoped attributes like CurrentFabricIndex in OperationalCredentialsCluster

Source
require_pin_for_remote_operation=(require_pin_for_remote_operation : Bool)
Source
require_pin_for_remote_operation?
Source
send_pin_over_the_air=(send_pin_over_the_air : Bool)
Source
send_pin_over_the_air?
Source
sound_volume
Source
sound_volume=(sound_volume : SoundVolume)
Source
supported_operating_modes
Source
supported_operating_modes=(supported_operating_modes : UInt16)
Source
unbolt(pin : String | Nil = nil, source : Def::OperationSource = Def::OperationSource::Remote) : InteractionModel::Status
Source
unlatched?
Source
unlock(pin : String | Nil = nil, source : Def::OperationSource = Def::OperationSource::Remote) : InteractionModel::Status
Source
unlock_with_timeout(timeout_seconds : UInt16, pin : String | Nil = nil, source : Def::OperationSource = Def::OperationSource::Remote) : InteractionModel::Status
Source
unlocked?
Source
update_door_state(new_state : Def::DoorState | Nil) : Nil
Source
user_code_temporary_disable_time
Source
user_code_temporary_disable_time=(user_code_temporary_disable_time : UInt8)
Source
write_attribute(attribute_id : UInt32, value : Bytes) : InteractionModel::Status

Write an attribute value

Source
wrong_code_entry_limit
Source
wrong_code_entry_limit=(wrong_code_entry_limit : UInt8)
Source

Nested types