class Matter::Cluster::OtaRequestorCluster

Overview

OTA Software Update Requestor Cluster (0x002A)

Minimal implementation for devices that don't support OTA updates. This cluster is required by some controllers (e.g., Apple Home) to be present even if the device doesn't actually support OTA updates.

This implementation returns sensible defaults:

Matter Specification: Core 1.4 § 11.20.7 - OTA Software Update Requestor Cluster

Defined in:

matter/cluster/ota_requestor_cluster.cr

Constant Summary

ATTR_ATTRIBUTE_LIST = 65531_u32
ATTR_CLUSTER_REVISION = 65533_u32

Global attributes

ATTR_DEFAULT_OTA_PROVIDERS = 0_u32

Attribute IDs

ATTR_FEATURE_MAP = 65532_u32
ATTR_UPDATE_POSSIBLE = 1_u32
ATTR_UPDATE_STATE = 2_u32
ATTR_UPDATE_STATE_PROGRESS = 3_u32
CLUSTER_ID = 42_u32
CMD_ANNOUNCE_OTA_PROVIDER = 0_u32

Command IDs (optional - not implemented for minimal version)

Log = ::Log.for("matter.cluster.ota_requestor")

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), 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

def self.new(endpoint_id : DataType::EndpointNumber = DataType::EndpointNumber.new(0_u16), update_possible : Bool = true, update_state : UpdateState = UpdateState::Idle, update_state_progress : UInt8 | Nil = nil) #

[View source]

Class Method Detail

def self.cluster_id #

OTA Software Update Requestor Cluster (0x002A)

Minimal implementation for devices that don't support OTA updates. This cluster is required by some controllers (e.g., Apple Home) to be present even if the device doesn't actually support OTA updates.

This implementation returns sensible defaults:

  • UpdatePossible: true (device can be updated, but no updates available)
  • UpdateState: Idle (1) - no update in progress
  • UpdateStateProgress: null - no progress to report
  • DefaultOTAProviders: empty list

Matter Specification: Core 1.4 § 11.20.7 - OTA Software Update Requestor Cluster


[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 name : String #
Description copied from class Matter::Cluster::Base

Get cluster name


[View source]
def read_attribute(attribute_id : UInt32, fabric_index : UInt8 | Nil = nil) : InteractionModel::Status | Bytes #
Description copied from class Matter::Cluster::Base

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


[View source]
def update_possible : Bool #

Instance variables


[View source]
def update_possible=(update_possible : Bool) #

Instance variables


[View source]
def update_state : UpdateState #

[View source]
def update_state=(update_state : UpdateState) #

[View source]
def update_state_progress : UInt8 | Nil #

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

[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]