class
Matter::Cluster::LevelControlCluster
- Matter::Cluster::LevelControlCluster
- Matter::Cluster::Base
- Reference
- Object
Overview
Level Control Cluster Implementation (0x0008)
Provides level control (dimming) functionality for lights, volume controls, blinds, and other devices with adjustable levels.
Features:
- OnOff (OO): Dependency with the On/Off cluster
- Lighting (LT): Lighting control interface (affects level semantics)
- Frequency (FQ): Frequency control support (provisional)
Matter Spec: Application 1.6
Defined in:
matter/cluster/level_control_cluster.crConstant Summary
-
ATTR_CURRENT_FREQUENCY =
4_u32 -
ATTR_CURRENT_LEVEL =
0_u32 -
Attributes
-
ATTR_DEFAULT_MOVE_RATE =
20_u32 -
ATTR_MAX_FREQUENCY =
6_u32 -
ATTR_MAX_LEVEL =
3_u32 -
ATTR_MIN_FREQUENCY =
5_u32 -
ATTR_MIN_LEVEL =
2_u32 -
ATTR_OFF_TRANSITION_TIME =
19_u32 -
ATTR_ON_LEVEL =
17_u32 -
ATTR_ON_OFF_TRANSITION_TIME =
16_u32 -
ATTR_ON_TRANSITION_TIME =
18_u32 -
ATTR_OPTIONS =
15_u32 -
ATTR_REMAINING_TIME =
1_u32 -
ATTR_START_UP_CURRENT_LEVEL =
16384_u32 -
CLUSTER_ID =
8_u32 -
CLUSTER_REVISION =
65533_u32 -
Global attributes
-
CMD_MOVE =
1_u32 -
CMD_MOVE_TO_CLOSEST_FREQUENCY =
8_u32 -
CMD_MOVE_TO_LEVEL =
0_u32 -
Commands
-
CMD_MOVE_TO_LEVEL_WITH_ON_OFF =
4_u32 -
CMD_MOVE_WITH_ON_OFF =
5_u32 -
CMD_STEP =
2_u32 -
CMD_STEP_WITH_ON_OFF =
6_u32 -
CMD_STOP =
3_u32 -
CMD_STOP_WITH_ON_OFF =
7_u32 -
FEATURE_MAP =
65532_u32 -
Log =
::Log.for("matter.cluster.level_control")
Constructors
Class Method Summary
-
.cluster_id
Level Control Cluster Implementation (0x0008)
Instance Method Summary
-
#attributes : Array(AttributeMetadata)
Get all attribute metadata
-
#commands : Array(CommandMetadata)
Get all command metadata
-
#current_frequency : UInt16
Frequency feature attributes
-
#current_frequency=(current_frequency : UInt16)
Frequency feature attributes
-
#current_level : UInt8
Base attributes
-
#current_level=(current_level : UInt8)
Base attributes
- #default_move_rate : UInt8 | Nil
- #default_move_rate=(default_move_rate : UInt8 | Nil)
-
#feature_map : Feature
Feature map
-
#feature_map=(feature_map : Feature)
Feature map
- #level=(level : UInt8) : UInt8
-
#level=(level : Float)
level as a percentage 0.0 - 100.0
- #max_frequency : UInt16
- #max_frequency=(max_frequency : UInt16)
- #max_level : UInt8
- #max_level=(max_level : UInt8)
- #min_frequency : UInt16
- #min_frequency=(min_frequency : UInt16)
- #min_level : UInt8
- #min_level=(min_level : UInt8)
-
#name : String
Get cluster name
- #off_transition_time : UInt16 | Nil
- #off_transition_time=(off_transition_time : UInt16 | Nil)
- #on_level : UInt8 | Nil
- #on_level=(on_level : UInt8 | Nil)
-
#on_level_changed(&block : UInt8, UInt8 -> Nil)
Set callback for level changes
- #on_off_transition_time : UInt16
- #on_off_transition_time=(on_off_transition_time : UInt16)
- #on_transition_time : UInt16 | Nil
- #on_transition_time=(on_transition_time : UInt16 | Nil)
- #options : UInt8
- #options=(options : UInt8)
-
#read_attribute(attribute_id : UInt32, fabric_index : UInt8 | Nil = nil) : InteractionModel::Status | Bytes
Read an attribute value The fabric_index parameter is optional and used for fabric-scoped attributes like CurrentFabricIndex in OperationalCredentialsCluster
-
#remaining_time : UInt16
Lighting feature attributes
-
#remaining_time=(remaining_time : UInt16)
Lighting feature attributes
-
#restore_state(json : String) : Nil
Restore cluster state from JSON.
-
#save_state : String | Nil
Save cluster state to JSON for persistence.
- #start_up_current_level : UInt8 | Nil
- #start_up_current_level=(start_up_current_level : UInt8 | Nil)
-
#write_attribute(attribute_id : UInt32, value : Bytes) : InteractionModel::Status
Write an attribute value
Instance methods inherited from class Matter::Cluster::Base
apply_scene_extension_field_set(field_set : ScenesManagementCluster::ExtensionFieldSet) : Bool
apply_scene_extension_field_set,
attributes : Array(AttributeMetadata)
attributes,
cluster_id : DataType::ClusterId
cluster_id,
cluster_id=(cluster_id : DataType::ClusterId)
cluster_id=,
commands : Array(CommandMetadata)
commands,
data_version : UInt32
data_version,
data_version=(data_version : UInt32)
data_version=,
endpoint_id : DataType::EndpointNumber
endpoint_id,
endpoint_id=(endpoint_id : DataType::EndpointNumber)
endpoint_id=,
events : Array(EventMetadata)
events,
get_attribute_metadata(attribute_id : UInt32) : AttributeMetadata | Nil
get_attribute_metadata,
get_command_metadata(command_id : UInt32) : CommandMetadata | Nil
get_command_metadata,
invoke_command(command_id : UInt32, fields : Bytes = Bytes.new(0), session_id : UInt64 | Nil = nil, is_case_session : Bool = false, fabric_index : UInt8 | Nil = nil) : InteractionModel::Status | CommandResponse
invoke_command,
name : String
name,
on_attribute_changed : Proc(UInt16, UInt32, UInt32, Nil) | Nil
on_attribute_changed,
on_attribute_changed=(on_attribute_changed : Proc(UInt16, UInt32, UInt32, Nil) | Nil)
on_attribute_changed=,
persistence_key : String
persistence_key,
read_attribute(attribute_id : UInt32, fabric_index : UInt8 | Nil = nil) : InteractionModel::Status | Bytes
read_attribute,
request_fabric_index : UInt8 | Nil
request_fabric_index,
request_fabric_index=(request_fabric_index : UInt8 | Nil)
request_fabric_index=,
request_is_case_session=(request_is_case_session : Bool)
request_is_case_session=,
request_is_case_session? : Bool
request_is_case_session?,
request_peer_node_id : UInt64 | Nil
request_peer_node_id,
request_peer_node_id=(request_peer_node_id : UInt64 | Nil)
request_peer_node_id=,
request_session_id : UInt64 | Nil
request_session_id,
request_session_id=(request_session_id : UInt64 | Nil)
request_session_id=,
restore_state(json : String) : Nil
restore_state,
save_state : String | Nil
save_state,
store_scene_extension_field_set : ScenesManagementCluster::ExtensionFieldSet | Nil
store_scene_extension_field_set,
write_attribute(attribute_id : UInt32, value : Bytes) : InteractionModel::Status
write_attribute
Constructor methods inherited from class Matter::Cluster::Base
new(endpoint_id : DataType::EndpointNumber, cluster_id : DataType::ClusterId)
new
Constructor Detail
Class Method Detail
Level Control Cluster Implementation (0x0008)
Provides level control (dimming) functionality for lights, volume controls, blinds, and other devices with adjustable levels.
Features:
- OnOff (OO): Dependency with the On/Off cluster
- Lighting (LT): Lighting control interface (affects level semantics)
- Frequency (FQ): Frequency control support (provisional)
Matter Spec: Application 1.6
Instance Method Detail
Get all attribute metadata
Get all command metadata
Read an attribute value The fabric_index parameter is optional and used for fabric-scoped attributes like CurrentFabricIndex in OperationalCredentialsCluster
Restore cluster state from JSON. Override in subclasses that need to restore state. The json parameter is the string returned by save_state.
Save cluster state to JSON for persistence. Override in subclasses that need to persist state (e.g., scenes, groups). Returns nil if no state needs to be persisted.
Write an attribute value