Get primary device type
Matter::Endpoint
Inherits Reference < Object
Endpoint represents a single functional unit on a Matter node Each endpoint has a device type and a set of clusters
Constructors
new(endpoint_id : DataType::EndpointNumber, device_types : Array(DeviceType) = [] of DeviceType)
Sourcenew(endpoint_id : DataType::EndpointNumber, device_type : DeviceType)
Convenience constructor for single device type
Instance methods
clusters
Sourcedevice_types
Sourceendpoint_id
Sourceget_cluster(cluster_type : T.class) : T | Nil forall T
Get a typed cluster by class Usage: endpoint.get_cluster(OnOffCluster)
get_cluster!(cluster_type : T.class) : T forall T
Get a typed cluster by class (raises if not found)
invoke_command(cluster_id : UInt32, command_id : UInt32, fields : Bytes = Bytes.new(0)) : InteractionModel::Status | Bytes
Invoke a command on a cluster on this endpoint
read_attribute(cluster_id : UInt32, attribute_id : UInt32) : InteractionModel::Status | Bytes
Read an attribute from a cluster on this endpoint
write_attribute(cluster_id : UInt32, attribute_id : UInt32, value : Bytes) : InteractionModel::Status
Write an attribute to a cluster on this endpoint