class
Matter::Cluster::FanControlCluster
- Matter::Cluster::FanControlCluster
- Matter::Cluster::Base
- Reference
- Object
Overview
Fan Control Cluster (0x0202)
Provides an interface to control the speed of a fan, including basic fan mode control and percentage-based speed settings.
Features:
- MultiSpeed (SPD): Multi-speed fan control with discrete speed levels
- Auto (AUTO): Automatic mode support
- Rocking (RCK): Rocking movement support
- Wind (WND): Wind emulation support
- Step (STEP): Step command support for incremental speed changes
- AirflowDirection (DIR): Airflow direction attribute
Specification: Matter 1.4 § 4.4
Defined in:
matter/cluster/fan_control_cluster.crConstant Summary
-
ATTR_AIRFLOW_DIRECTION =
11_u32 -
Attributes - AirflowDirection feature
-
ATTR_FAN_MODE =
0_u32 -
Attributes - Required
-
ATTR_FAN_MODE_SEQUENCE =
1_u32 -
ATTR_PERCENT_CURRENT =
3_u32 -
ATTR_PERCENT_SETTING =
2_u32 -
ATTR_ROCK_SETTING =
8_u32 -
ATTR_ROCK_SUPPORT =
7_u32 -
Attributes - Rocking feature
-
ATTR_SPEED_CURRENT =
6_u32 -
ATTR_SPEED_MAX =
4_u32 -
Attributes - MultiSpeed feature
-
ATTR_SPEED_SETTING =
5_u32 -
ATTR_WIND_SETTING =
10_u32 -
ATTR_WIND_SUPPORT =
9_u32 -
Attributes - Wind feature
-
CLUSTER_ID =
514_u32 -
CMD_STEP =
0_u32 -
Commands
Constructors
Class Method Summary
-
.cluster_id
Fan Control Cluster (0x0202)
Instance Method Summary
-
#airflow_direction : AirflowDirectionEnum
AirflowDirection feature attribute
-
#airflow_direction=(airflow_direction : AirflowDirectionEnum)
AirflowDirection feature attribute
-
#attributes : Array(AttributeMetadata)
Get all attribute metadata
-
#commands : Array(CommandMetadata)
Get all command metadata
-
#fan_mode : FanMode
Required attributes
-
#fan_mode=(fan_mode : FanMode)
Required attributes
- #fan_mode_sequence : FanModeSequence
- #fan_mode_sequence=(fan_mode_sequence : FanModeSequence)
-
#feature_map : Feature
Feature map
-
#feature_map=(feature_map : Feature)
Feature map
-
#invoke_command(command_id : UInt32, command_data : Bytes) : Bytes | InteractionModel::Status
Invoke a command
-
#name : String
Get cluster name
- #on_fan_mode_changed(&block : FanMode, FanMode -> Nil)
- #on_percent_changed(&block : UInt8 | Nil, UInt8 -> Nil)
- #on_speed_changed(&block : UInt8 | Nil, UInt8 -> Nil)
- #percent_current : UInt8
- #percent_current=(percent_current : UInt8)
- #percent_setting : UInt8 | Nil
- #percent_setting=(percent_setting : UInt8 | Nil)
-
#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
- #rock_setting : RockSupport
- #rock_setting=(rock_setting : RockSupport)
-
#rock_support : RockSupport
Rocking feature attributes
-
#rock_support=(rock_support : RockSupport)
Rocking feature attributes
- #speed_current : UInt8
- #speed_current=(speed_current : UInt8)
-
#speed_max : UInt8
MultiSpeed feature attributes
-
#speed_max=(speed_max : UInt8)
MultiSpeed feature attributes
- #speed_setting : UInt8 | Nil
- #speed_setting=(speed_setting : UInt8 | Nil)
-
#update_percent_current(percent : UInt8)
Update the current fan speed percentage (read-only attribute updated by implementation)
- #wind_setting : WindSupport
- #wind_setting=(wind_setting : WindSupport)
-
#wind_support : WindSupport
Wind feature attributes
-
#wind_support=(wind_support : WindSupport)
Wind feature attributes
-
#write_attribute(attribute_id : UInt32, value : Bytes) : InteractionModel::Status
Write an attribute value
Instance methods inherited from class Matter::Cluster::Base
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=,
read_attribute(attribute_id : UInt32, fabric_index : UInt8 | Nil = nil) : InteractionModel::Status | Bytes
read_attribute,
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
Fan Control Cluster (0x0202)
Provides an interface to control the speed of a fan, including basic fan mode control and percentage-based speed settings.
Features:
- MultiSpeed (SPD): Multi-speed fan control with discrete speed levels
- Auto (AUTO): Automatic mode support
- Rocking (RCK): Rocking movement support
- Wind (WND): Wind emulation support
- Step (STEP): Step command support for incremental speed changes
- AirflowDirection (DIR): Airflow direction attribute
Specification: Matter 1.4 § 4.4
Instance Method Detail
AirflowDirection feature attribute
Get all attribute metadata
Get all command metadata
Invoke a command
Read an attribute value The fabric_index parameter is optional and used for fabric-scoped attributes like CurrentFabricIndex in OperationalCredentialsCluster
Update the current fan speed percentage (read-only attribute updated by implementation)
Write an attribute value