class

Matter::Cluster::OccupancySensingCluster

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

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

Constants

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

new(endpoint_id : DataType::EndpointNumber, feature_map : Feature = Feature::PassiveInfrared, occupancy : UInt8 = 0_u8, occupancy_sensor_type : OccupancySensorType = OccupancySensorType::PIR, occupancy_sensor_type_bitmap : UInt8 = 1_u8, hold_time : UInt16 | Nil = nil, pir_occupied_to_unoccupied_delay : UInt16 | Nil = nil, pir_unoccupied_to_occupied_delay : UInt16 | Nil = nil, pir_unoccupied_to_occupied_threshold : UInt8 | Nil = nil, ultrasonic_occupied_to_unoccupied_delay : UInt16 | Nil = nil, ultrasonic_unoccupied_to_occupied_delay : UInt16 | Nil = nil, ultrasonic_unoccupied_to_occupied_threshold : UInt8 | Nil = nil, physical_contact_occupied_to_unoccupied_delay : UInt16 | Nil = nil, physical_contact_unoccupied_to_occupied_delay : UInt16 | Nil = nil, physical_contact_unoccupied_to_occupied_threshold : UInt8 | Nil = nil)
Source

Class methods

cluster_id

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

Source

Instance methods

attributes

Get all attribute metadata

Source
commands

Get all command metadata

Source
feature_map

Feature map

Source
feature_map=(feature_map : Feature)

Feature map

Source
hold_time

Optional attribute (all features)

Source
hold_time=(hold_time : UInt16 | Nil)

Optional attribute (all features)

Source
name

Get cluster name

Source
occupancy

Required attributes

Source
occupancy=(occupancy : UInt8)

Required attributes

Source
occupancy_sensor_type
Source
occupancy_sensor_type=(occupancy_sensor_type : OccupancySensorType)
Source
occupancy_sensor_type_bitmap
Source
occupancy_sensor_type_bitmap=(occupancy_sensor_type_bitmap : UInt8)
Source
occupied?

Check if currently occupied

Source
on_occupancy_changed
Source
physical_contact_occupied_to_unoccupied_delay

PhysicalContact-specific attributes (PhysicalContact feature)

Source
physical_contact_occupied_to_unoccupied_delay=(physical_contact_occupied_to_unoccupied_delay : UInt16 | Nil)

PhysicalContact-specific attributes (PhysicalContact feature)

Source
physical_contact_unoccupied_to_occupied_delay
Source
physical_contact_unoccupied_to_occupied_delay=(physical_contact_unoccupied_to_occupied_delay : UInt16 | Nil)
Source
physical_contact_unoccupied_to_occupied_threshold
Source
physical_contact_unoccupied_to_occupied_threshold=(physical_contact_unoccupied_to_occupied_threshold : UInt8 | Nil)
Source
pir_occupied_to_unoccupied_delay

PIR-specific attributes (PassiveInfrared feature)

Source
pir_occupied_to_unoccupied_delay=(pir_occupied_to_unoccupied_delay : UInt16 | Nil)

PIR-specific attributes (PassiveInfrared feature)

Source
pir_unoccupied_to_occupied_delay
Source
pir_unoccupied_to_occupied_delay=(pir_unoccupied_to_occupied_delay : UInt16 | Nil)
Source
pir_unoccupied_to_occupied_threshold
Source
pir_unoccupied_to_occupied_threshold=(pir_unoccupied_to_occupied_threshold : UInt8 | Nil)
Source
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

Source
ultrasonic_occupied_to_unoccupied_delay

Ultrasonic-specific attributes (Ultrasonic feature)

Source
ultrasonic_occupied_to_unoccupied_delay=(ultrasonic_occupied_to_unoccupied_delay : UInt16 | Nil)

Ultrasonic-specific attributes (Ultrasonic feature)

Source
ultrasonic_unoccupied_to_occupied_delay
Source
ultrasonic_unoccupied_to_occupied_delay=(ultrasonic_unoccupied_to_occupied_delay : UInt16 | Nil)
Source
ultrasonic_unoccupied_to_occupied_threshold
Source
ultrasonic_unoccupied_to_occupied_threshold=(ultrasonic_unoccupied_to_occupied_threshold : UInt8 | Nil)
Source
update_occupancy(occupied : Bool)

Update the occupancy state

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

Write an attribute value

Source

Nested types