class

Matter::Cluster::ScenesManagementCluster

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

Constants

ATTR_FABRIC_SCENE_INFO = 2_u32
ATTR_SCENE_TABLE_SIZE = 1_u32

Attribute IDs

CLUSTER_ID = 98_u32
CLUSTER_REVISION = 65533_u32

Global attributes

CMD_ADD_SCENE = 0_u32

Command IDs

CMD_ADD_SCENE_RESPONSE = 0_u32

Response IDs

CMD_COPY_SCENE = 64_u32
CMD_COPY_SCENE_RESPONSE = 64_u32
CMD_GET_SCENE_MEMBERSHIP = 6_u32
CMD_GET_SCENE_MEMBERSHIP_RESPONSE = 6_u32
CMD_RECALL_SCENE = 5_u32
CMD_REMOVE_ALL_SCENES = 3_u32
CMD_REMOVE_ALL_SCENES_RESPONSE = 3_u32
CMD_REMOVE_SCENE = 2_u32
CMD_REMOVE_SCENE_RESPONSE = 2_u32
CMD_STORE_SCENE = 4_u32
CMD_STORE_SCENE_RESPONSE = 4_u32
CMD_VIEW_SCENE = 1_u32
CMD_VIEW_SCENE_RESPONSE = 1_u32
FEATURE_MAP_ATTR = 65532_u32
Log = ::Log.for("matter.cluster.scenes")

Constructors

new(endpoint_id : DataType::EndpointNumber, feature_map : Feature = Feature::SceneNames, scene_table_size : UInt16 = 16_u16)
Source

Class methods

cluster_id
Source

Instance methods

apply_extension_field_sets

Callback to apply extension field sets to other clusters during RecallScene Receives the stored extension field sets to apply to sceneable clusters

Source
apply_extension_field_sets=(apply_extension_field_sets : Proc(Array(ExtensionFieldSet), Nil) | Nil)

Callback to apply extension field sets to other clusters during RecallScene Receives the stored extension field sets to apply to sceneable clusters

Source
attributes

Get all attribute metadata

Source
commands

Get all command metadata

Source
fabric_scene_info

Per-fabric scene info

Source
fabric_scene_info=(fabric_scene_info : Hash(UInt8, SceneInfo))

Per-fabric scene info

Source
feature_map

Feature map

Source
feature_map=(feature_map : Feature)

Feature map

Source
get_extension_field_sets

Callback to get current extension field sets from other clusters during StoreScene Returns array of extension field sets representing current state of sceneable clusters

Source
get_extension_field_sets=(get_extension_field_sets : Proc(Array(ExtensionFieldSet)) | Nil)

Callback to get current extension field sets from other clusters during StoreScene Returns array of extension field sets representing current state of sceneable clusters

Source
has_scene?(group_id : UInt16, scene_id : UInt8, fabric_index : UInt8 = 1_u8) : Bool
Source
invalidate_current_scene(fabric_index : UInt8 = 1_u8)
Source
name

Get cluster name

Source
on_recall_scene

Callback for when scene is recalled (legacy - use apply_extension_field_sets instead)

Source
on_recall_scene=(on_recall_scene : Proc(UInt16, UInt8, Nil) | Nil)

Callback for when scene is recalled (legacy - use apply_extension_field_sets instead)

Source
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

Source
restore_state(json : String) : Nil

Restore scene state from JSON

Source
save_state

Save all scene state to JSON

Source
scene_count(fabric_index : UInt8 = 1_u8) : Int32
Source
scene_table_size

Scene table size (total across all fabrics)

Source
scene_table_size=(scene_table_size : UInt16)

Scene table size (total across all fabrics)

Source
scenes

Scene storage: {fabric_index, group_id, scene_id} => SceneData

Source
scenes=(scenes : Hash(Tuple(UInt8, UInt16, UInt8), SceneData))

Scene storage: {fabric_index, group_id, scene_id} => SceneData

Source

Nested types