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.
Features:
- Other (OTHER): Other sensing modality
- PassiveInfrared (PIR): PIR sensing
- Ultrasonic (US): Ultrasonic sensing
- PhysicalContact (PHY): Physical contact sensing
- ActiveInfrared (AIR): Active IR sensing
- Radar (RADAR): Radar/microwave sensing
- RfSensing (RFSENS): RF signal analysis
- Vision (VIS): Vision-based sensing
Specification: Matter 1.4 § 2.7
Defined in:
matter/cluster/occupancy_sensing_cluster.crConstant Summary
-
ATTR_HOLD_TIME =
3_u32 -
Attributes - Optional (all features)
-
ATTR_OCCUPANCY =
0_u32 -
Attributes - Required
-
ATTR_OCCUPANCY_SENSOR_TYPE =
1_u32 -
ATTR_OCCUPANCY_SENSOR_TYPE_BITMAP =
2_u32 -
ATTR_PHYSICAL_CONTACT_OCCUPIED_TO_UNOCCUPIED_DELAY =
48_u32 -
Attributes - PhysicalContact feature
-
ATTR_PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_DELAY =
49_u32 -
ATTR_PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_THRESH =
50_u32 -
ATTR_PIR_OCCUPIED_TO_UNOCCUPIED_DELAY =
16_u32 -
Attributes - PIR feature
-
ATTR_PIR_UNOCCUPIED_TO_OCCUPIED_DELAY =
17_u32 -
ATTR_PIR_UNOCCUPIED_TO_OCCUPIED_THRESH =
18_u32 -
ATTR_ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY =
32_u32 -
Attributes - Ultrasonic feature
-
ATTR_ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY =
33_u32 -
ATTR_ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESH =
34_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
-
#feature_map : Feature
Feature map
-
#feature_map=(feature_map : Feature)
Feature map
-
#hold_time : UInt16 | Nil
Optional attribute (all features)
-
#hold_time=(hold_time : UInt16 | Nil)
Optional attribute (all features)
-
#name : String
Get cluster name
-
#occupancy : UInt8
Required attributes
-
#occupancy=(occupancy : UInt8)
Required attributes
- #occupancy_sensor_type : OccupancySensorType
- #occupancy_sensor_type=(occupancy_sensor_type : OccupancySensorType)
- #occupancy_sensor_type_bitmap : UInt8
- #occupancy_sensor_type_bitmap=(occupancy_sensor_type_bitmap : UInt8)
-
#occupied? : Bool
Check if currently occupied
- #on_occupancy_changed(&block : UInt8, UInt8 -> Nil)
-
#physical_contact_occupied_to_unoccupied_delay : UInt16 | Nil
PhysicalContact-specific attributes (PhysicalContact feature)
-
#physical_contact_occupied_to_unoccupied_delay=(physical_contact_occupied_to_unoccupied_delay : UInt16 | Nil)
PhysicalContact-specific attributes (PhysicalContact feature)
- #physical_contact_unoccupied_to_occupied_delay : UInt16 | Nil
- #physical_contact_unoccupied_to_occupied_delay=(physical_contact_unoccupied_to_occupied_delay : UInt16 | Nil)
- #physical_contact_unoccupied_to_occupied_threshold : UInt8 | Nil
- #physical_contact_unoccupied_to_occupied_threshold=(physical_contact_unoccupied_to_occupied_threshold : UInt8 | Nil)
-
#pir_occupied_to_unoccupied_delay : UInt16 | Nil
PIR-specific attributes (PassiveInfrared feature)
-
#pir_occupied_to_unoccupied_delay=(pir_occupied_to_unoccupied_delay : UInt16 | Nil)
PIR-specific attributes (PassiveInfrared feature)
- #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, fabric_index : UInt8 | Nil = nil) : Bytes | InteractionModel::Status
Read an attribute value The fabric_index parameter is optional and used for fabric-scoped attributes like CurrentFabricIndex in OperationalCredentialsCluster
-
#ultrasonic_occupied_to_unoccupied_delay : UInt16 | Nil
Ultrasonic-specific attributes (Ultrasonic feature)
-
#ultrasonic_occupied_to_unoccupied_delay=(ultrasonic_occupied_to_unoccupied_delay : UInt16 | Nil)
Ultrasonic-specific attributes (Ultrasonic feature)
- #ultrasonic_unoccupied_to_occupied_delay : UInt16 | Nil
- #ultrasonic_unoccupied_to_occupied_delay=(ultrasonic_unoccupied_to_occupied_delay : UInt16 | Nil)
- #ultrasonic_unoccupied_to_occupied_threshold : UInt8 | Nil
- #ultrasonic_unoccupied_to_occupied_threshold=(ultrasonic_unoccupied_to_occupied_threshold : UInt8 | Nil)
-
#update_occupancy(occupied : Bool)
Update the occupancy state
-
#write_attribute(attribute_id : UInt32, value : Bytes) : InteractionModel::Status
Write an attribute value
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
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.
Features:
- Other (OTHER): Other sensing modality
- PassiveInfrared (PIR): PIR sensing
- Ultrasonic (US): Ultrasonic sensing
- PhysicalContact (PHY): Physical contact sensing
- ActiveInfrared (AIR): Active IR sensing
- Radar (RADAR): Radar/microwave sensing
- RfSensing (RFSENS): RF signal analysis
- Vision (VIS): Vision-based sensing
Specification: Matter 1.4 § 2.7
Instance Method Detail
Get all attribute metadata
Get all command metadata
PhysicalContact-specific attributes (PhysicalContact feature)
PhysicalContact-specific attributes (PhysicalContact feature)
PIR-specific attributes (PassiveInfrared feature)
PIR-specific attributes (PassiveInfrared feature)
Read an attribute value The fabric_index parameter is optional and used for fabric-scoped attributes like CurrentFabricIndex in OperationalCredentialsCluster
Ultrasonic-specific attributes (Ultrasonic feature)
Ultrasonic-specific attributes (Ultrasonic feature)
Write an attribute value