class

Matter::MatterNode

Inherits Reference < Object

MatterNode represents a complete Matter device with multiple endpoints

Constructors

Instance methods

add_endpoint(endpoint : Endpoint)

Add an endpoint to this node

Source
description

Get a human-readable description of this matter node

Source
endpoint_count

Get the number of endpoints

Source
endpoint_ids

Get all endpoint IDs

Source
endpoints
Source
get_cluster(endpoint_id : UInt16, cluster_type : T.class) : T | Nil forall T

Get a typed cluster from an endpoint Usage: node.get_cluster(1_u16, OnOffCluster)

Source
get_cluster!(endpoint_id : UInt16, cluster_type : T.class) : T forall T

Get a typed cluster from an endpoint (raises if not found)

Source
get_endpoint(endpoint_id : UInt16) : Endpoint | Nil

Get an endpoint by ID

Source
get_endpoint!(endpoint_id : UInt16) : Endpoint

Get an endpoint by ID (raises if not found)

Source
has_endpoint?(endpoint_id : UInt16) : Bool

Check if node has an endpoint

Source
invoke_command(endpoint_id : UInt16, cluster_id : UInt32, command_id : UInt32, fields : Bytes = Bytes.new(0)) : InteractionModel::Status | Bytes

Invoke a command on a cluster on an endpoint

Source
read_attribute(endpoint_id : UInt16, cluster_id : UInt32, attribute_id : UInt32) : InteractionModel::Status | Bytes

Read an attribute from a cluster on an endpoint

Source
valid?

Check if all endpoints are valid

Source
validate

Validate all endpoints

Source
write_attribute(endpoint_id : UInt16, cluster_id : UInt32, attribute_id : UInt32, value : Bytes) : InteractionModel::Status

Write an attribute to a cluster on an endpoint

Source