Developing with ZBOSS for Zigbee
ZCL Power Configuration cluster

Functions

void zb_zcl_power_config_write_attr_hook (zb_uint8_t endpoint, zb_uint16_t attr_id, zb_uint8_t *new_value)
 Hook on Write attribute. More...
 

Power Configuration cluster attributes

enum  zb_zcl_power_config_attr_e {
  ZB_ZCL_ATTR_POWER_CONFIG_MAINS_VOLTAGE_ID = 0x0000, ZB_ZCL_ATTR_POWER_CONFIG_MAINS_FREQUENCY_ID = 0x0001, ZB_ZCL_ATTR_POWER_CONFIG_MAINS_ALARM_MASK_ID = 0x0010, ZB_ZCL_ATTR_POWER_CONFIG_MAINS_VOLTAGE_MIN_THRESHOLD = 0x0011,
  ZB_ZCL_ATTR_POWER_CONFIG_MAINS_VOLTAGE_MAX_THRESHOLD = 0x0012, ZB_ZCL_ATTR_POWER_CONFIG_MAINS_DWELL_TRIP_POINT = 0x0013, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_VOLTAGE_ID = 0x0020, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_PERCENTAGE_REMAINING_ID = 0x0021,
  ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_MANUFACTURER_ID = 0x0030, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_SIZE_ID = 0x0031, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_A_HR_RATING_ID = 0x0032, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_QUANTITY_ID = 0x0033,
  ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_RATED_VOLTAGE_ID = 0x0034, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_ALARM_MASK_ID = 0x0035, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_VOLTAGE_MIN_THRESHOLD_ID = 0x0036, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_VOLTAGE_THRESHOLD1_ID = 0x0037,
  ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_VOLTAGE_THRESHOLD2_ID = 0x0038, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_VOLTAGE_THRESHOLD3_ID = 0x0039, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_PERCENTAGE_MIN_THRESHOLD_ID = 0x003a, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_PERCENTAGE_THRESHOLD1_ID = 0x003b,
  ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_PERCENTAGE_THRESHOLD2_ID = 0x003c, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_PERCENTAGE_THRESHOLD3_ID = 0x003d, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_ALARM_STATE_ID = 0x003e, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_VOLTAGE_ID = 0x0040,
  ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_PERCENTAGE_REMAINING_ID = 0x0041, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_MANUFACTURER_ID = 0x0050, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_SIZE_ID = 0x0051, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_A_HR_RATING_ID = 0x0052,
  ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_QUANTITY_ID = 0x0053, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_RATED_VOLTAGE_ID = 0x0054, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_ALARM_MASK_ID = 0x0055, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_VOLTAGE_MIN_THRESHOLD_ID = 0x0056,
  ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_VOLTAGE_THRESHOLD1_ID = 0x0057, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_VOLTAGE_THRESHOLD2_ID = 0x0058, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_VOLTAGE_THRESHOLD3_ID = 0x0059, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_PERCENTAGE_MIN_THRESHOLD_ID = 0x005a,
  ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_PERCENTAGE_THRESHOLD1_ID = 0x005b, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_PERCENTAGE_THRESHOLD2_ID = 0x005c, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_PERCENTAGE_THRESHOLD3_ID = 0x005d, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_ALARM_STATE_ID = 0x005e,
  ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_VOLTAGE_ID = 0x0060, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_PERCENTAGE_REMAINING_ID = 0x0061, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_MANUFACTURER_ID = 0x0070, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_SIZE_ID = 0x0071,
  ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_A_HR_RATING_ID = 0x0072, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_QUANTITY_ID = 0x0073, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_RATED_VOLTAGE_ID = 0x0074, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_ALARM_MASK_ID = 0x0075,
  ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_VOLTAGE_MIN_THRESHOLD_ID = 0x0076, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_VOLTAGE_THRESHOLD1_ID = 0x0077, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_VOLTAGE_THRESHOLD2_ID = 0x0078, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_VOLTAGE_THRESHOLD3_ID = 0x0079,
  ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_PERCENTAGE_MIN_THRESHOLD_ID = 0x007a, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_PERCENTAGE_THRESHOLD1_ID = 0x007b, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_PERCENTAGE_THRESHOLD2_ID = 0x007c, ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_PERCENTAGE_THRESHOLD3_ID = 0x007d,
  ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_ALARM_STATE_ID = 0x007e
}
 Power Configuration cluster attribute identifiers. More...
 
enum  zb_zcl_power_config_mains_alarm_mask_e { ZB_ZCL_POWER_CONFIG_MAINS_ALARM_MASK_VOLTAGE_LOW = 0x01, ZB_ZCL_POWER_CONFIG_MAINS_ALARM_MASK_VOLTAGE_HIGH = 0x02, ZB_ZCL_POWER_CONFIG_MAINS_ALARM_MASK_VOLTAGE_UNAVAIL = 0x04 }
 Power Configuration MainsAlarmMask value see ZCL spec 3.3.2.2.4.7. More...
 
enum  zb_zcl_power_config_battery_size_e {
  ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_NO_BATTERY = 0, ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_BUILT_IN = 1, ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_OTHER = 2, ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_AA = 3,
  ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_AAA = 4, ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_C = 5, ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_D = 6, ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_CR2 = 7,
  ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_CR123A = 8, ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_UNKNOWN = 0xff
}
 Power Configuration BatterySize value see ZCL spec 3.3.2.2.4.2. More...
 
enum  zb_zcl_power_config_battery_alarm_mask_e { ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_MASK_VOLTAGE_LOW = 0, ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_MASK_ALARM1 = 1, ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_MASK_ALARM2 = 2, ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_MASK_ALARM3 = 3 }
 Power Configuration BatteryAlarmMask value see ZCL spec 3.3.2.2.4.7. More...
 
enum  zb_zcl_power_config_battery_alarm_code_e {
  ZB_ZCL_POWER_CONFIG_MAINS_VOLTAGE_ALARM_CODE_MIN_THRESHOLD = 0x00, ZB_ZCL_POWER_CONFIG_MAINS_VOLTAGE_ALARM_CODE_MAX_THRESHOLD = 0x01, ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE1_MIN_THRESHOLD = 0x10, ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE1_VOLTAGE1 = 0x11,
  ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE1_VOLTAGE2 = 0x12, ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE1_VOLTAGE3 = 0x13, ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE2_MIN_THRESHOLD = 0x20, ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE2_VOLTAGE1 = 0x21,
  ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE2_VOLTAGE2 = 0x22, ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE2_VOLTAGE3 = 0x23, ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE3_MIN_THRESHOLD = 0x30, ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE3_VOLTAGE1 = 0x31,
  ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE3_VOLTAGE2 = 0x32, ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE3_VOLTAGE3 = 0x33, ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_MAINS_POWER_SUPPLY_LOST_UNAVAILABLE = 0x3a
}
 Power Configuration Alarm Code for Alarm. More...
 
enum  zb_zcl_power_config_battery_alarm_state_e {
  ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE1_MIN_THRESHOLD = 1 << 0, ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE1_VOLTAGE1 = 1 << 1, ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE1_VOLTAGE2 = 1 << 2, ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE1_VOLTAGE3 = 1 << 3,
  ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE2_MIN_THRESHOLD = 1 << 10, ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE2_VOLTAGE1 = 1 << 11, ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE2_VOLTAGE2 = 1 << 12, ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE2_VOLTAGE3 = 1 << 13,
  ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE3_MIN_THRESHOLD = 1l << 20, ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE3_VOLTAGE1 = 1l << 21, ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE3_VOLTAGE2 = 1l << 22, ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE3_VOLTAGE3 = 1l << 23,
  ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_MAINS_POWER_SUPPLY_LOST_UNAVAILABLE = 1l << 30
}
 Power Configuration BatteryAlarmState. More...
 
#define ZB_ZCL_POWER_CONFIG_MAINS_ALARM_MASK_DEFAULT_VALUE   ((zb_uint8_t)0x00)
 Default value for MainsAlarmMask attribute.
 
#define ZB_ZCL_POWER_CONFIG_MAINS_VOLTAGE_MIN_THRESHOLD_DEFAULT_VALUE   ((zb_uint16_t)0x0000)
 Default value for MainsVoltageMinThreshold attribute.
 
#define ZB_ZCL_POWER_CONFIG_MAINS_VOLTAGE_MAX_THRESHOLD_DEFAULT_VALUE   ((zb_uint16_t)0xFFFF)
 Default value for MainsVoltageMaxThreshold attribute.
 
#define ZB_ZCL_POWER_CONFIG_MAINS_DWELL_TRIP_POINT_DEFAULT_VALUE   ((zb_uint16_t)0x0000)
 Default value for MainsDwellTripPoint attribute.
 
#define ZB_ZCL_POWER_CONFIG_BATTERY_VOLTAGE_INVALID   0xff
 BatteryVoltage attribute invalid value.
 
#define ZB_ZCL_POWER_CONFIG_BATTERY_REMAINING_UNKNOWN   0xff
 Power Configuration BatteryPercentageRemaining attribute unknown value.
 
#define ZB_ZCL_POWER_CONFIG_BATTERY_REMAINING_HA_DEFAULT_VALUE   ((zb_uint8_t)0)
 Default value for BatteryRemainingHA attribute.
 
#define ZB_ZCL_POWER_CONFIG_BATTERY_MANUFACTURER_DEFAULT_VALUE   {0}
 Default value for BatteryManufacturer attribute.
 
#define ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_DEFAULT_VALUE   0xff
 BatterySize attribute default value.
 
#define ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_MASK_DEFAULT_VALUE   0x00
 BatteryAlarmMask attribute default value.
 
#define ZB_ZCL_POWER_CONFIG_BATTERY_VOLTAGE_MIN_THRESHOLD_DEFAULT_VALUE   ((zb_uint8_t)0x0000)
 Default value for BatteryVoltageMinThreshold attribute.
 
#define ZB_ZCL_POWER_CONFIG_BATTERY_VOLTAGE_THRESHOLD1_DEFAULT_VALUE   ((zb_uint8_t)0x00)
 Default value for BatteryVoltageThreshold1 attribute.
 
#define ZB_ZCL_POWER_CONFIG_BATTERY_VOLTAGE_THRESHOLD2_DEFAULT_VALUE   ((zb_uint8_t)0x00)
 Default value for BatteryVoltageThreshold2 attribute.
 
#define ZB_ZCL_POWER_CONFIG_BATTERY_VOLTAGE_THRESHOLD3_DEFAULT_VALUE   ((zb_uint8_t)0x00)
 Default value for BatteryVoltageThreshold3 attribute.
 
#define ZB_ZCL_POWER_CONFIG_BATTERY_PERCENTAGE_MIN_THRESHOLD_DEFAULT_VALUE   ((zb_uint8_t)0x00)
 Default value for BatteryPercentageMinThreshold attribute.
 
#define ZB_ZCL_POWER_CONFIG_BATTERY_PERCENTAGE_THRESHOLD1_DEFAULT_VALUE   ((zb_uint8_t)0x00)
 Default value for BatteryPercentageThreshold1 attribute.
 
#define ZB_ZCL_POWER_CONFIG_BATTERY_PERCENTAGE_THRESHOLD2_DEFAULT_VALUE   ((zb_uint8_t)0x00)
 Default value for BatteryPercentageThreshold2 attribute.
 
#define ZB_ZCL_POWER_CONFIG_BATTERY_PERCENTAGE_THRESHOLD3_DEFAULT_VALUE   ((zb_uint8_t)0x00)
 Default value for BatteryPercentageThreshold3 attribute.
 
#define ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_DEFAULT_VALUE   ((zb_uint32_t)0x00000000)
 Default value for BatteryAlarmState attribute.
 
#define ZB_ZCL_POWER_CONFIG_MAINS_ATTRIBUTE_SET   0
 Mains attribute set the least significant nibble.
 
#define ZB_ZCL_POWER_CONFIG_BATTERY_ATTRIBUTE_SET   0
 Battery attribute set the least significant nibble.
 
#define ZB_ZCL_POWER_CONFIG_BATTERY_SOURCE_2_ATTRIBUTE_SET   0x20
 Battery Source 2 attribute set the least significant nibble.
 
#define ZB_ZCL_POWER_CONFIG_BATTERY_SOURCE_3_ATTRIBUTE_SET   0x40
 Battery Source 3 attribute set the least significant nibble.
 
#define ZB_ZCL_DECLARE_POWER_CONFIG_ATTRIB_LIST(attr_list, voltage, size, quantity, rated_voltage, alarm_mask, voltage_min_threshold)
 Declare attribute list for Power Configuration cluster - server side. More...
 
#define ZB_ZCL_DECLARE_POWER_CONFIG_MAINS_ATTRIB_LIST(attr_list, voltage, frequency, alarm_mask, voltage_min_threshold, voltage_max_threshold, dwell_trip_point)
 Declare attribute list for Power Configuration cluster - server side (Mains attribute set) More...
 
#define ZB_ZCL_DECLARE_POWER_CONFIG_BATTERY_ATTRIB_LIST_EXT(attr_list, voltage, size, quantity, rated_voltage, alarm_mask, voltage_min_threshold, remaining, threshold1, threshold2, threshold3, min_threshold, percent_threshold1, percent_threshold2, percent_threshold3, alarm_state)
 Declare attribute list for Power Configuration cluster - server side (Battery attribute list extended) More...
 

Detailed Description

Macro Definition Documentation

◆ ZB_ZCL_DECLARE_POWER_CONFIG_ATTRIB_LIST

#define ZB_ZCL_DECLARE_POWER_CONFIG_ATTRIB_LIST (   attr_list,
  voltage,
  size,
  quantity,
  rated_voltage,
  alarm_mask,
  voltage_min_threshold 
)
Value:
ZB_ZCL_START_DECLARE_ATTRIB_LIST(attr_list) \
ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_VOLTAGE_ID(voltage, ), \
ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_SIZE_ID(size, ), \
ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_QUANTITY_ID(quantity, ), \
ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_RATED_VOLTAGE_ID(rated_voltage, ), \
ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_ALARM_MASK_ID(alarm_mask, ), \
ZB_SET_ATTR_DESCR_WITH_ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_VOLTAGE_MIN_THRESHOLD_ID(voltage_min_threshold, ), \
ZB_ZCL_FINISH_DECLARE_ATTRIB_LIST

Declare attribute list for Power Configuration cluster - server side.

Parameters
attr_list- attribute list name
voltage- pointer to variable to store BatteryVoltage attribute
size- pointer to variable to store BatterySize attribute
quantity- pointer to variable to store BatteryQuantity attribute
rated_voltage- pointer to variable to store BatteryRatedVoltage attribute
alarm_mask- pointer to variable to store BatteryAlarmMask attribute
voltage_min_threshold- pointer to variable to store BatteryVoltageMinThreshold attribute

◆ ZB_ZCL_DECLARE_POWER_CONFIG_BATTERY_ATTRIB_LIST_EXT

#define ZB_ZCL_DECLARE_POWER_CONFIG_BATTERY_ATTRIB_LIST_EXT (   attr_list,
  voltage,
  size,
  quantity,
  rated_voltage,
  alarm_mask,
  voltage_min_threshold,
  remaining,
  threshold1,
  threshold2,
  threshold3,
  min_threshold,
  percent_threshold1,
  percent_threshold2,
  percent_threshold3,
  alarm_state 
)
Value:
ZB_ZCL_START_DECLARE_ATTRIB_LIST(attr_list) \
ZB_ZCL_POWER_CONFIG_BATTERY_ATTRIB_LIST_EXT(bat_num, \
voltage, size, quantity, rated_voltage, alarm_mask, voltage_min_threshold, \
remaining, threshold1, threshold2, threshold3, min_threshold, percent_threshold1, \
percent_threshold2, percent_threshold3, alarm_state) \
ZB_ZCL_FINISH_DECLARE_ATTRIB_LIST

Declare attribute list for Power Configuration cluster - server side (Battery attribute list extended)

Parameters
attr_list- attribute list name
voltage- pointer to variable to store BatteryVoltage attribute
size- pointer to variable to store BatterySize attribute
quantity- pointer to variable to store BatteryQuantity attribute
rated_voltage- pointer to variable to store BatteryRatedVoltage attribute
alarm_mask- pointer to variable to store BatteryAlarmMask attribute
voltage_min_threshold- pointer to variable to store BatteryVoltageMinThreshold attribute
remaining- pointer to variable to store BatteryPercentageRemaining attribute
threshold1- pointer to variable to store BatteryVoltageThreshold1 attribute
threshold2- pointer to variable to store BatteryVoltageThreshold2 attribute
threshold3- pointer to variable to store BatteryVoltageThreshold3 attribute
min_threshold- pointer to variable to store BatteryPercentageMinThreshold attribute
percent_threshold1- pointer to variable to store BatteryPercentageThreshold1 attribute
percent_threshold2- pointer to variable to store BatteryPercentageThreshold2 attribute
percent_threshold3- pointer to variable to store BatteryPercentageThreshold3 attribute
alarm_state- pointer to variable to store BatteryAlarmState attribute

◆ ZB_ZCL_DECLARE_POWER_CONFIG_MAINS_ATTRIB_LIST

#define ZB_ZCL_DECLARE_POWER_CONFIG_MAINS_ATTRIB_LIST (   attr_list,
  voltage,
  frequency,
  alarm_mask,
  voltage_min_threshold,
  voltage_max_threshold,
  dwell_trip_point 
)
Value:
ZB_ZCL_START_DECLARE_ATTRIB_LIST(attr_list) \
ZB_ZCL_POWER_CONFIG_MAINS_ATTRIB_LIST(voltage, frequency, alarm_mask, \
voltage_min_threshold, voltage_max_threshold, \
dwell_trip_point) \
ZB_ZCL_FINISH_DECLARE_ATTRIB_LIST

Declare attribute list for Power Configuration cluster - server side (Mains attribute set)

Parameters
attr_list- attribure list name
voltage- pointer to variable to store MainsVoltage attribute
frequency- pointer to variable to store MainsFrequency attribute
alarm_mask- pointer to variable to store BatteryAlarmMask attribute
voltage_min_threshold- pointer to variable to store MainsVoltageMinThreshold attribute
voltage_max_threshold- pointer to variable to store MainsVoltageMaxThreshold attribute
dwell_trip_point- pointer to variable to store MainsVoltageDwellTripPoint attribute

Enumeration Type Documentation

◆ zb_zcl_power_config_attr_e

Power Configuration cluster attribute identifiers.

See also
ZCL spec, Power Configuration Cluster 3.3.2.2
Enumerator
ZB_ZCL_ATTR_POWER_CONFIG_MAINS_VOLTAGE_ID 

MainsVoltage attribute, ZCL spec 3.3.2.2.1.1.

ZB_ZCL_ATTR_POWER_CONFIG_MAINS_FREQUENCY_ID 

MainsFrequency attribute, ZCL spec 3.3.2.2.1.2.

ZB_ZCL_ATTR_POWER_CONFIG_MAINS_ALARM_MASK_ID 

MainsAlarmMask attribute, ZCL spec 3.3.2.2.2.1.

ZB_ZCL_ATTR_POWER_CONFIG_MAINS_VOLTAGE_MIN_THRESHOLD 

MainsVoltageMinThreshold attribute, ZCL spec 3.3.2.2.2.2.

ZB_ZCL_ATTR_POWER_CONFIG_MAINS_VOLTAGE_MAX_THRESHOLD 

MainsVoltageMaxThreshold attribute, ZCL spec 3.3.2.2.2.3.

ZB_ZCL_ATTR_POWER_CONFIG_MAINS_DWELL_TRIP_POINT 

MainsVoltageDwellTripPoint attribute, ZCL spec 3.3.2.2.2.4.

ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_VOLTAGE_ID 

BatteryVoltage attribute, ZCL spec 3.3.2.2.3.1.

ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_PERCENTAGE_REMAINING_ID 

BatteryPercentageRemaining attribute, ZCL spec 3.3.2.2.3.2.

ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_MANUFACTURER_ID 

The BatteryManufacturer attribute is a maximum of 16 bytes in length and specifies the name of the battery manufacturer as a character string.

ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_SIZE_ID 

BatterySize attribute, ZCL spec 3.3.2.2.4.2.

ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_A_HR_RATING_ID 

The BatteryAHrRating attribute is 16 bits in length and specifies the Ampere-hour rating of the battery, measured in units of 10mAHr.

ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_QUANTITY_ID 

BatteryQuantity attribute, ZCL spec 3.3.2.2.4.4.

ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_RATED_VOLTAGE_ID 

BatteryRatedVoltage attribute, ZCL spec 3.3.2.2.4.5.

ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_ALARM_MASK_ID 

BatteryAlarmMask attribute, ZCL spec 3.3.2.2.4.6.

ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_VOLTAGE_MIN_THRESHOLD_ID 

BatteryVoltageMinThreshold attribute, ZCL spec 3.3.2.2.4.7.

ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_VOLTAGE_THRESHOLD1_ID 

BatteryVoltageThreshold1 attribute, ZCL spec 3.3.2.2.4.8.

ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_VOLTAGE_THRESHOLD2_ID 

BatteryVoltageThreshold2 attribute, ZCL spec 3.3.2.2.4.8.

ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_VOLTAGE_THRESHOLD3_ID 

BatteryVoltageThreshold3 attribute, ZCL spec 3.3.2.2.4.8.

ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_PERCENTAGE_MIN_THRESHOLD_ID 

BatteryPercentageMinThreshold attribute, ZCL spec 3.3.2.2.4.9.

ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_PERCENTAGE_THRESHOLD1_ID 

BatteryPercentageThreshold1 attribute, ZCL spec 3.3.2.2.4.10.

ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_PERCENTAGE_THRESHOLD2_ID 

BatteryPercentageThreshold2 attribute, ZCL spec 3.3.2.2.4.10.

ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_PERCENTAGE_THRESHOLD3_ID 

BatteryPercentageThreshold3 attribute, ZCL spec 3.3.2.2.4.10.

ZB_ZCL_ATTR_POWER_CONFIG_BATTERY_ALARM_STATE_ID 

BatteryAlarmState attribute, ZCL spec 3.3.2.2.4.11.

ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_VOLTAGE_ID 

Battery Information 2 attribute set, ZCL spec 3.3.2.2.5.

ZB_ZCL_ATTR_POWER_CONFIG_BATTERY2_MANUFACTURER_ID 

Battery Settings 2 attribute set, ZCL spec 3.3.2.2.6.

ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_VOLTAGE_ID 

Battery Information 3 attribute set, ZCL spec 3.3.2.2.7.

ZB_ZCL_ATTR_POWER_CONFIG_BATTERY3_MANUFACTURER_ID 

Battery Settings 3 attribute set, ZCL spec 3.3.2.2.8.

◆ zb_zcl_power_config_battery_alarm_code_e

Power Configuration Alarm Code for Alarm.

See also
ZCL spec 3.3.2.2.4.7, Table 3-25
Enumerator
ZB_ZCL_POWER_CONFIG_MAINS_VOLTAGE_ALARM_CODE_MIN_THRESHOLD 

MainsVoltageAlarmCode - MainsVoltageMinThreshold reached for Mains Voltage.

ZB_ZCL_POWER_CONFIG_MAINS_VOLTAGE_ALARM_CODE_MAX_THRESHOLD 

MainsVoltageAlarmCode - MainsVoltageMaxThreshold reached for Mains Voltage.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE1_MIN_THRESHOLD 

BatteryAlarmCode - BatteryVoltageMinThreshold or BatteryPercentageMinThreshold reached for Battery Source 1.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE1_VOLTAGE1 

BatteryAlarmCode - BatteryVoltageMinThreshold1 or BatteryPercentageMinThreshold1 reached for Battery Source 1.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE1_VOLTAGE2 

BatteryAlarmCode - BatteryVoltageMinThreshold2 or BatteryPercentageMinThreshold2 reached for Battery Source 1.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE1_VOLTAGE3 

BatteryAlarmCode - BatteryVoltageMinThreshold3 or BatteryPercentageMinThreshold3 reached for Battery Source 1.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE2_MIN_THRESHOLD 

BatteryAlarmCode - BatteryVoltageMinThreshold or BatteryPercentageMinThreshold reached for Battery Source 2.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE2_VOLTAGE1 

BatteryAlarmCode - BatteryVoltageMinThreshold1 or BatteryPercentageMinThreshold1 reached for Battery Source 2.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE2_VOLTAGE2 

BatteryAlarmCode - BatteryVoltageMinThreshold2 or BatteryPercentageMinThreshold2 reached for Battery Source 2.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE2_VOLTAGE3 

BatteryAlarmCode - BatteryVoltageMinThreshold3 or BatteryPercentageMinThreshold3 reached for Battery Source 2.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE3_MIN_THRESHOLD 

BatteryAlarmCode - BatteryVoltageMinThreshold or BatteryPercentageMinThreshold reached for Battery Source 3.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE3_VOLTAGE1 

BatteryAlarmCode - BatteryVoltageMinThreshold1 or BatteryPercentageMinThreshold1 reached for Battery Source 3.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE3_VOLTAGE2 

BatteryAlarmCode - BatteryVoltageMinThreshold2 or BatteryPercentageMinThreshold2 reached for Battery Source 3.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_SOURCE3_VOLTAGE3 

BatteryAlarmCode - BatteryVoltageMinThreshold3 or BatteryPercentageMinThreshold3 reached for Battery Source 3.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_CODE_MAINS_POWER_SUPPLY_LOST_UNAVAILABLE 

Mains power supply lost/unavailable (i.e., device is running on battery)

◆ zb_zcl_power_config_battery_alarm_mask_e

Power Configuration BatteryAlarmMask value see ZCL spec 3.3.2.2.4.7.

Enumerator
ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_MASK_VOLTAGE_LOW 

BatteryAlarmMask - Battery voltage too low.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_MASK_ALARM1 

BatteryAlarmMask - Alarm1.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_MASK_ALARM2 

BatteryAlarmMask - Alarm2.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_MASK_ALARM3 

BatteryAlarmMask - Alarm3.

◆ zb_zcl_power_config_battery_alarm_state_e

Power Configuration BatteryAlarmState.

See also
ZCL spec 3.3.2.2.4.11, Table 3-26
Enumerator
ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE1_MIN_THRESHOLD 

BatteryAlarmCode - BatteryVoltageMinThreshold or BatteryPercentageMinThreshold reached for Battery Source 1.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE1_VOLTAGE1 

BatteryAlarmCode - BatteryVoltageMinThreshold1 or BatteryPercentageMinThreshold1 reached for Battery Source 1.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE1_VOLTAGE2 

BatteryAlarmCode - BatteryVoltageMinThreshold2 or BatteryPercentageMinThreshold2 reached for Battery Source 1.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE1_VOLTAGE3 

BatteryAlarmCode - BatteryVoltageMinThreshold3 or BatteryPercentageMinThreshold3 reached for Battery Source 1.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE2_MIN_THRESHOLD 

BatteryAlarmCode - BatteryVoltageMinThreshold or BatteryPercentageMinThreshold reached for Battery Source 2.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE2_VOLTAGE1 

BatteryAlarmCode - BatteryVoltageMinThreshold1 or BatteryPercentageMinThreshold1 reached for Battery Source 2.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE2_VOLTAGE2 

BatteryAlarmCode - BatteryVoltageMinThreshold2 or BatteryPercentageMinThreshold2 reached for Battery Source 2.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE2_VOLTAGE3 

BatteryAlarmCode - BatteryVoltageMinThreshold3 or BatteryPercentageMinThreshold3 reached for Battery Source 2.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE3_MIN_THRESHOLD 

BatteryAlarmCode - BatteryVoltageMinThreshold or BatteryPercentageMinThreshold reached for Battery Source 3.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE3_VOLTAGE1 

BatteryAlarmCode - BatteryVoltageMinThreshold1 or BatteryPercentageMinThreshold1 reached for Battery Source 3.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE3_VOLTAGE2 

BatteryAlarmCode - BatteryVoltageMinThreshold2 or BatteryPercentageMinThreshold2 reached for Battery Source 3.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_SOURCE3_VOLTAGE3 

BatteryAlarmCode - BatteryVoltageMinThreshold3 or BatteryPercentageMinThreshold3 reached for Battery Source 3.

ZB_ZCL_POWER_CONFIG_BATTERY_ALARM_STATE_MAINS_POWER_SUPPLY_LOST_UNAVAILABLE 

Mains power supply lost/unavailable (i.e., device is running on battery)

◆ zb_zcl_power_config_battery_size_e

Power Configuration BatterySize value see ZCL spec 3.3.2.2.4.2.

Enumerator
ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_NO_BATTERY 

BatterySize - no battery.

ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_BUILT_IN 

BatterySize - built in.

ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_OTHER 

BatterySize - other.

ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_AA 

BatterySize - AA.

ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_AAA 

BatterySize - AAA.

ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_C 

BatterySize - C.

ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_D 

BatterySize - D.

ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_CR2 

BatterySize - CR2.

ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_CR123A 

BatterySize - CR123A.

ZB_ZCL_POWER_CONFIG_BATTERY_SIZE_UNKNOWN 

BatterySize - unknown.

◆ zb_zcl_power_config_mains_alarm_mask_e

Power Configuration MainsAlarmMask value see ZCL spec 3.3.2.2.4.7.

Enumerator
ZB_ZCL_POWER_CONFIG_MAINS_ALARM_MASK_VOLTAGE_LOW 

MainsAlarmMask - Mains Voltage too low.

ZB_ZCL_POWER_CONFIG_MAINS_ALARM_MASK_VOLTAGE_HIGH 

MainsAlarmMask - Mains Voltage too high.

ZB_ZCL_POWER_CONFIG_MAINS_ALARM_MASK_VOLTAGE_UNAVAIL 

MainsAlarmMask - Mains power supply lost/unavailable.

Function Documentation

◆ zb_zcl_power_config_write_attr_hook()

void zb_zcl_power_config_write_attr_hook ( zb_uint8_t  endpoint,
zb_uint16_t  attr_id,
zb_uint8_t new_value 
)

Hook on Write attribute.

Parameters
endpoint- endpoint number
attr_id- ID of attribute being written
new_value- pointer to new value of attribute