Zigbee Battery Voltage Reporting

Hi, I have a few questions about reporting battery voltage as specified in the genPowerCfg Zigbee Cluster Library spec. I modified the zigbee light switch example to include the genPowerCfg cluster. I'm using an nRF52840 DK NRF52840 dev board and the v2.5.1 SDK. I can:

  1. Set the genPowerCfg cluster battery percentage remaining attribute reporting interval over the Zigbee network.
  2. Read the battery percentage remaining attribute over the Zigbee network.
  3. Read the battery voltage attribute over the Zigbee network.
  4. Set the battery percentage remaining attribute in my nRF52840 code.
  5. Set the battery voltage attribute in my nRF52840 code.
  6. Use the ADC to read the voltage on the VDD pin and update the battery voltage attribute.

This is all great and wonderful. The battery percentage remaining is great but what I'm really interesting in are periodic reports of the battery voltage. Here's what I'm trying to figure out:

First, if I try to set the genPowerCfg cluster battery voltage attribute reporting interval over the network, I get an unreportable attribute response. I assume that since the ZCL spec does not say this shall be a reportable attribute, it's not reportable. Is there a way to make it reportable using the zboss stack?

Second, this will be a battery operated device. If the battery voltage is not reportable, what's the best way to get the battery voltage to the network coordinator? Attribute reads won't work when the device is asleep. Is there a way to send the battery percentage remaining and battery voltage to the network coordinator whenever the device wakes up? The ZCL spec does not define a genPowerCfg client. Or does the network coordinator need to poll for the battery voltage in that brief window after a keep alive or other event where the device is otherwise awake?

Third, is there better documentation on the reporting_info_t structure and what exactly I'm supposed to do with them? For example, I've added them to the endpoint declaration but it doesn't seem to matter if they're there or not:

/** Number of attribute for reporting on Dimmer Switch device */
#define ZB_DIMMER_SWITCH_REPORT_ATTR_COUNT (ZB_ZCL_POWER_CONFIG_REPORT_ATTR_COUNT)
#define ZB_DECLARE_DIMMER_SWITCH_EP(ep_name, ep_id, cluster_list)             \
    ZB_ZCL_DECLARE_DIMMER_SWITCH_SIMPLE_DESC(ep_name, ep_id,              \
          ZB_DIMMER_SWITCH_IN_CLUSTER_NUM, ZB_DIMMER_SWITCH_OUT_CLUSTER_NUM); \
    ZBOSS_DEVICE_DECLARE_REPORTING_CTX(reporting_info## ep_name,              \
        ZB_DIMMER_SWITCH_REPORT_ATTR_COUNT);                      \
    ZB_AF_DECLARE_ENDPOINT_DESC(ep_name, ep_id, ZB_AF_HA_PROFILE_ID, 0, NULL,     \
        ZB_ZCL_ARRAY_SIZE(cluster_list, zb_zcl_cluster_desc_t), cluster_list, \
        (zb_af_simple_desc_1_1_t *)&simple_desc_##ep_name,            \
        ZB_DIMMER_SWITCH_REPORT_ATTR_COUNT, reporting_info## ep_name,                           \
        0, NULL) /* No CVC ctx */

Thanks, Glen.

Parents Reply Children
No Data
Related