class Matter::Cluster::FanControlCluster

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.

This implementation provides the base functionality without optional features (MultiSpeed, Rocking, Wind, AirflowDirection, Step).

Specification: Matter 1.4 § 4.4

Defined in:

matter/cluster/fan_control_cluster.cr

Constant Summary

ATTR_FAN_MODE = 0_u32

Attributes

ATTR_FAN_MODE_SEQUENCE = 1_u32
ATTR_PERCENT_CURRENT = 3_u32
ATTR_PERCENT_SETTING = 2_u32
CLUSTER_ID = 514_u32

Constructors

Class Method Summary

Instance Method Summary

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)) : InteractionModel::Status | Bytes invoke_command, name : String name, read_attribute(attribute_id : UInt32) : 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

def self.new(endpoint_id : DataType::EndpointNumber, fan_mode : FanMode = FanMode::Off, fan_mode_sequence : FanModeSequence = FanModeSequence::OffLowMedHigh, percent_setting : UInt8 | Nil = 0_u8, percent_current : UInt8 = 0_u8) #

[View source]

Class Method Detail

def self.cluster_id #

Fan Control Cluster (0x0202)

Provides an interface to control the speed of a fan, including basic fan mode control and percentage-based speed settings.

This implementation provides the base functionality without optional features (MultiSpeed, Rocking, Wind, AirflowDirection, Step).

Specification: Matter 1.4 § 4.4


[View source]

Instance Method Detail

def attributes : Array(AttributeMetadata) #
Description copied from class Matter::Cluster::Base

Get all attribute metadata


[View source]
def commands : Array(CommandMetadata) #
Description copied from class Matter::Cluster::Base

Get all command metadata


[View source]
def fan_mode : FanMode #

Current fan mode (writable)


[View source]
def fan_mode=(fan_mode : FanMode) #

Current fan mode (writable)


[View source]
def fan_mode_sequence : FanModeSequence #

Supported fan mode sequence (fixed)


[View source]
def fan_mode_sequence=(fan_mode_sequence : FanModeSequence) #

Supported fan mode sequence (fixed)


[View source]
def name : String #
Description copied from class Matter::Cluster::Base

Get cluster name


[View source]
def on_fan_mode_changed(&block : FanMode, FanMode -> Nil) #

[View source]
def on_percent_changed(&block : UInt8 | Nil, UInt8 -> Nil) #

[View source]
def percent_current : UInt8 #

Current actual fan speed percentage (0-100)


[View source]
def percent_current=(percent_current : UInt8) #

Current actual fan speed percentage (0-100)


[View source]
def percent_setting : UInt8 | Nil #

Desired fan speed percentage (0-100, nullable, writable)


[View source]
def percent_setting=(percent_setting : UInt8 | Nil) #

Desired fan speed percentage (0-100, nullable, writable)


[View source]
def read_attribute(attribute_id : UInt32) : Bytes | InteractionModel::Status #
Description copied from class Matter::Cluster::Base

Read an attribute value


[View source]
def update_percent_current(percent : UInt8) #

Update the current fan speed percentage (read-only attribute updated by implementation)


[View source]
def write_attribute(attribute_id : UInt32, value : Bytes) : InteractionModel::Status #
Description copied from class Matter::Cluster::Base

Write an attribute value


[View source]