class
Matter::Cluster::OccupancySensingCluster
Overview
Occupancy Sensing Cluster (0x0406)
Provides an interface to occupancy sensing functionality based on various sensing modalities (PIR, Ultrasonic, Physical Contact, etc.), including configuration and provision of notifications of occupancy status.
This implementation supports PIR (Passive Infrared) sensing.
Specification: Matter 1.4 § 2.7
Defined in:
matter/cluster/occupancy_sensing_cluster.crConstant Summary
-
ATTR_HOLD_TIME =
3_u32 -
ATTR_OCCUPANCY =
0_u32 -
Attributes
-
ATTR_OCCUPANCY_SENSOR_TYPE =
1_u32 -
ATTR_OCCUPANCY_SENSOR_TYPE_BITMAP =
2_u32 -
ATTR_PIR_OCCUPIED_TO_UNOCCUPIED_DELAY =
16_u32 -
ATTR_PIR_UNOCCUPIED_TO_OCCUPIED_DELAY =
17_u32 -
ATTR_PIR_UNOCCUPIED_TO_OCCUPIED_THRESH =
18_u32 -
CLUSTER_ID =
1030_u32 -
OCCUPANCY_OCCUPIED =
1_u8 -
Occupancy bitmap (bit 0 = occupied)
Constructors
Class Method Summary
-
.cluster_id
Occupancy Sensing Cluster (0x0406)
Instance Method Summary
-
#attributes : Array(AttributeMetadata)
Get all attribute metadata
-
#commands : Array(CommandMetadata)
Get all command metadata
-
#hold_time : UInt16 | Nil
Hold time in seconds (optional, writable)
-
#hold_time=(hold_time : UInt16 | Nil)
Hold time in seconds (optional, writable)
-
#name : String
Get cluster name
-
#occupancy : UInt8
Current occupancy state (bitmap, bit 0 = occupied)
-
#occupancy=(occupancy : UInt8)
Current occupancy state (bitmap, bit 0 = occupied)
-
#occupancy_sensor_type : OccupancySensorType
Sensor type (fixed)
-
#occupancy_sensor_type=(occupancy_sensor_type : OccupancySensorType)
Sensor type (fixed)
-
#occupancy_sensor_type_bitmap : UInt8
Sensor type bitmap (bit 0 = PIR)
-
#occupancy_sensor_type_bitmap=(occupancy_sensor_type_bitmap : UInt8)
Sensor type bitmap (bit 0 = PIR)
-
#occupied? : Bool
Check if currently occupied
- #on_occupancy_changed(&block : UInt8, UInt8 -> Nil)
-
#pir_occupied_to_unoccupied_delay : UInt16 | Nil
PIR-specific attributes (optional, writable)
-
#pir_occupied_to_unoccupied_delay=(pir_occupied_to_unoccupied_delay : UInt16 | Nil)
PIR-specific attributes (optional, writable)
- #pir_unoccupied_to_occupied_delay : UInt16 | Nil
- #pir_unoccupied_to_occupied_delay=(pir_unoccupied_to_occupied_delay : UInt16 | Nil)
- #pir_unoccupied_to_occupied_threshold : UInt8 | Nil
- #pir_unoccupied_to_occupied_threshold=(pir_unoccupied_to_occupied_threshold : UInt8 | Nil)
-
#read_attribute(attribute_id : UInt32) : Bytes | InteractionModel::Status
Read an attribute value
-
#update_occupancy(occupied : Bool)
Update the occupancy state
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
Class Method Detail
Occupancy Sensing Cluster (0x0406)
Provides an interface to occupancy sensing functionality based on various sensing modalities (PIR, Ultrasonic, Physical Contact, etc.), including configuration and provision of notifications of occupancy status.
This implementation supports PIR (Passive Infrared) sensing.
Specification: Matter 1.4 § 2.7
Instance Method Detail
Get all attribute metadata
Get all command metadata
Sensor type bitmap (bit 0 = PIR)
PIR-specific attributes (optional, writable)
Read an attribute value