Developing with ZBOSS for Zigbee
ZCL Occupancy Sensing cluster

Occupancy Sensing cluster attributes

enum  zb_zcl_occupancy_sensing_attr_e {
  ZB_ZCL_ATTR_OCCUPANCY_SENSING_OCCUPANCY_ID = 0x0000, ZB_ZCL_ATTR_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_ID = 0x0001, ZB_ZCL_ATTR_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_BITMAP_ID = 0x0002, ZB_ZCL_ATTR_OCCUPANCY_SENSING_PIR_OCC_TO_UNOCC_DELAY_ID = 0x0010,
  ZB_ZCL_ATTR_OCCUPANCY_SENSING_PIR_UNOCC_TO_OCC_DELAY_ID = 0x0011, ZB_ZCL_ATTR_OCCUPANCY_SENSING_PIR_UNOCC_TO_OCC_THRESHOLD_ID = 0x0012, ZB_ZCL_ATTR_OCCUPANCY_SENSING_ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY_ID = 0x0020, ZB_ZCL_ATTR_OCCUPANCY_SENSING_ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY_ID = 0x0021,
  ZB_ZCL_ATTR_OCCUPANCY_SENSING_ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ID = 0x0022, ZB_ZCL_ATTR_OCCUPANCY_SENSING_PHYSICAL_CONTACT_OCCUPIED_TO_UNOCCUPIED_DELAY_ID = 0x0030, ZB_ZCL_ATTR_OCCUPANCY_SENSING_PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_DELAY_ID = 0x0031, ZB_ZCL_ATTR_OCCUPANCY_SENSING_PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ID = 0x0032
}
 Occupancy Sensing cluster attribute identifiers. More...
 
enum  zb_zcl_occupancy_sensing_occupancy_e { ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_UNOCCUPIED = 0, ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_OCCUPIED = 1 }
 Permissible values for Occupancy attribute. More...
 
enum  zb_zcl_occupancy_sensing_occupancy_sensor_type_e { ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_PIR = 0, ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_ULTRASONIC = 1, ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_PIR_AND_ULTRASONIC = 2, ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_RESERVED = 3 }
 Permissible values for Occupancy Sensor Type attribute. More...
 
#define ZB_ZCL_OCCUPANCY_SENSING_PIR_OCC_TO_UNOCC_DELAY_DEFAULT_VALUE   ((zb_uint16_t)0x00)
 Default value for PIROccToUnoccDelay attribute.
 
#define ZB_ZCL_OCCUPANCY_SENSING_PIR_UNOCC_TO_OCC_DELAY_DEFAULT_VALUE   ((zb_uint16_t)0x00)
 Default value for PIRUnoccToOccDelay attribute.
 
#define ZB_ZCL_OCCUPANCY_SENSING_PIR_UNOCC_TO_OCC_THRESHOLD_DEFAULT_VALUE   ((zb_uint8_t)0x01)
 Default value for PIRUnoccToOccThreshold attribute.
 
#define ZB_ZCL_OCCUPANCY_SENSING_ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY_DEFAULT_VALUE   ((zb_uint16_t)0x00)
 Default value for UltrasonicOccupiedToUnoccupiedDelay attribute.
 
#define ZB_ZCL_OCCUPANCY_SENSING_ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY_DEFAULT_VALUE   ((zb_uint16_t)0x00)
 Default value for UltrasonicUnoccupiedToOccupiedDelay attribute.
 
#define ZB_ZCL_OCCUPANCY_SENSING_ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_DEFAULT_VALUE   ((zb_uint8_t)0x01)
 Default value for UltrasonicUnoccupiedToOccupiedThreshold attribute.
 
#define ZB_ZCL_OCCUPANCY_SENSING_PHYSICAL_CONTACT_OCCUPIED_TO_UNOCCUPIED_DELAY_DEFAULT_VALUE   ((zb_uint16_t)0x0000)
 Default value for PhysicalContactOccupiedToUnoccupiedDelay attribute.
 
#define ZB_ZCL_OCCUPANCY_SENSING_PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_DELAY_DEFAULT_VALUE   ((zb_uint16_t)0x0000)
 Default value for PhysicalContactUnoccupiedToOccupiedDelay attribute.
 
#define ZB_ZCL_OCCUPANCY_SENSING_PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_DEFAULT_VALUE   ((zb_uint8_t)0x01)
 Default value for PhysicalContactUnoccupiedToOccupiedThreshold attribute.
 
#define ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_MAX_VALUE   (ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_UNOCCUPIED)
 Maximal value for switch type attribute.
 
#define ZB_ZCL_DECLARE_OCCUPANCY_SENSING_ATTRIB_LIST(attr_list, occupancy, occupancy_sensor_type, occupancy_sensor_type_bitmap)
 Declare attribute list for Occupancy Sensing cluster. More...
 

Detailed Description

Occupancy Sensing cluster has no cluster-specific command support. Cluster attributes can be queried with common commands.

Macro Definition Documentation

◆ ZB_ZCL_DECLARE_OCCUPANCY_SENSING_ATTRIB_LIST

#define ZB_ZCL_DECLARE_OCCUPANCY_SENSING_ATTRIB_LIST (   attr_list,
  occupancy,
  occupancy_sensor_type,
  occupancy_sensor_type_bitmap 
)
Value:
ZB_ZCL_START_DECLARE_ATTRIB_LIST(attr_list) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_OCCUPANCY_SENSING_OCCUPANCY_ID, (occupancy)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_ID, (occupancy_sensor_type)) \
ZB_ZCL_SET_ATTR_DESC(ZB_ZCL_ATTR_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_BITMAP_ID, (occupancy_sensor_type_bitmap)) \
ZB_ZCL_FINISH_DECLARE_ATTRIB_LIST

Declare attribute list for Occupancy Sensing cluster.

Parameters
attr_list- attribute list name
occupancy- pointer to variable to store Occupancy attribute value
occupancy_sensor_type- pointer to variable to store Occupancy Sensor Type attribute value
occupancy_sensor_type_bitmap- pointer to variable to store Occupancy Sensor Type Bitmap attribute value

Enumeration Type Documentation

◆ zb_zcl_occupancy_sensing_attr_e

Occupancy Sensing cluster attribute identifiers.

See also
ZCL spec, subclause 4.8.2.2
Enumerator
ZB_ZCL_ATTR_OCCUPANCY_SENSING_OCCUPANCY_ID 

Occupancy attribute identifier

ZB_ZCL_ATTR_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_ID 

Occupancy Sensor Type attribute identifier

ZB_ZCL_ATTR_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_BITMAP_ID 

The OccupancySensorTypeBitmap attribute specifies the types of the occupancy sensor.

ZB_ZCL_ATTR_OCCUPANCY_SENSING_PIR_OCC_TO_UNOCC_DELAY_ID 

PIROccupiedToUnoccupiedDelay identifier

ZB_ZCL_ATTR_OCCUPANCY_SENSING_PIR_UNOCC_TO_OCC_DELAY_ID 

PIRUnoccupiedToOccupiedDelay identifier

ZB_ZCL_ATTR_OCCUPANCY_SENSING_PIR_UNOCC_TO_OCC_THRESHOLD_ID 

PIRUnoccupiedToOccupiedThreshold identifier

ZB_ZCL_ATTR_OCCUPANCY_SENSING_ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY_ID 

The UltrasonicOccupiedToUnoccupiedDelay attribute is 16 bits in length and specifies the time delay, in seconds, before the Ultrasonic sensor changes to its unoccupied state after the last detection of movement in the sensed area.

ZB_ZCL_ATTR_OCCUPANCY_SENSING_ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY_ID 

The UltrasonicUnoccupiedToOccupiedDelay attribute is 16 bits in length and specifies the time delay, in seconds, before the Ultrasonic sensor changes to its occupied state after the detection of movement in the sensed area.

ZB_ZCL_ATTR_OCCUPANCY_SENSING_ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ID 

The UltrasonicUnoccupiedToOccupiedThreshold attribute is 8 bits in length and specifies the number of movement detection events that must occur in the period UltrasonicUnoccupiedToOccupiedDelay, before the Ultrasonic sensor changes to its occupied state.

ZB_ZCL_ATTR_OCCUPANCY_SENSING_PHYSICAL_CONTACT_OCCUPIED_TO_UNOCCUPIED_DELAY_ID 

The PhysicalContactOccupiedToUnoccupiedDelay attribute is 16 bits in length and specifies the time delay, in seconds, before the physical contact occupancy sensor changes to its unoccupied state after detecting the unoccupied event.

ZB_ZCL_ATTR_OCCUPANCY_SENSING_PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_DELAY_ID 

The PhysicalContactUnoccupiedToOccupiedDelay attribute is 16 bits in length and specifies the time delay, in seconds, before the physical contact sensor changes to its occupied state after the detection of the occupied event.

ZB_ZCL_ATTR_OCCUPANCY_SENSING_PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_THRESHOLD_ID 

The PhysicalContactUnoccupiedToOccupiedThreshold attribute is 8 bits in length and specifies the number of movement detection events that must occur in the period PhysicalContactUnoccupiedToOccupiedDelay, before the PIR sensor changes to its occupied state.

◆ zb_zcl_occupancy_sensing_occupancy_e

Permissible values for Occupancy attribute.

See also
ZCL spec, subclause 4.8.2.2.1.1
Enumerator
ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_UNOCCUPIED 

Unoccupied value

ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_OCCUPIED 

Occupied value

◆ zb_zcl_occupancy_sensing_occupancy_sensor_type_e

Permissible values for Occupancy Sensor Type attribute.

See also
ZCL spec, subclause 4.8.2.2.1.2
Enumerator
ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_PIR 

PIR value

ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_ULTRASONIC 

Ultrasonic value

ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_PIR_AND_ULTRASONIC 

PIR and Ultrasonic value

ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_RESERVED 

Reserved value

ZB_ZCL_ATTR_OCCUPANCY_SENSING_OCCUPANCY_ID
@ ZB_ZCL_ATTR_OCCUPANCY_SENSING_OCCUPANCY_ID
Definition: zb_zcl_occupancy_sensing.h:50
ZB_ZCL_ATTR_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_ID
@ ZB_ZCL_ATTR_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_ID
Definition: zb_zcl_occupancy_sensing.h:52
ZB_ZCL_ATTR_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_BITMAP_ID
@ ZB_ZCL_ATTR_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_BITMAP_ID
Definition: zb_zcl_occupancy_sensing.h:55