Page 1 of 1

Zigbee Reporting for Smart Energy Metering

Posted: Fri Feb 23, 2024 8:58 pm
by eitell
I'm adapting the Zigbee examples to add more clusters for a specific application of mine. One of these clusters is ESP_ZB_ZCL_CLUSTER_ID_METERING.

I'm using the generic esp_zb_cluster_add_attr because I couldn't find a proper specific function to add the attributes (for instance esp_zb_electrical_meas_cluster_add_attr for electrical measurements).

And I'm facing this issue where my coordinator can't bind reports to the metering cluster, as the request to configure reports on this specific cluster times out every time, for every attribute I try. All other clusters report just fine, and performing a read instead of a report also works.

Here's how I add the attributes I want to enable reporting:

Code: Select all

ESP_ERROR_CHECK(esp_zb_cluster_add_attr(metering_cluster,
                ESP_ZB_ZCL_CLUSTER_ID_METERING, attr,
                type, ESP_ZB_ZCL_ATTR_ACCESS_READ_ONLY | ESP_ZB_ZCL_ATTR_ACCESS_REPORTING,
                &value));
Some other attributes, like formatting, multiply / division do not have ESP_ZB_ZCL_ATTR_ACCESS_REPORTING, here's a list:

Code: Select all

ESP_ZB_ZCL_ATTR_METERING_CURRENT_SUMMATION_DELIVERED_ID Read+Report
ESP_ZB_ZCL_ATTR_METERING_CURRENT_DAY_CONSUMPTION_DELIVERED_ID Read+Report
ESP_ZB_ZCL_ATTR_METERING_PREVIOUS_DAY_CONSUMPTION_DELIVERED_ID Read+Report
ESP_ZB_ZCL_ATTR_METERING_OUTLET_TEMPERATURE_ID Read+Report

ESP_ZB_ZCL_ATTR_METERING_METERING_DEVICE_TYPE_ID Read
ESP_ZB_ZCL_ATTR_METERING_METER_SERIAL_NUMBER_ID Read
ESP_ZB_ZCL_ATTR_METERING_MULTIPLIER_ID Read
ESP_ZB_ZCL_ATTR_METERING_DIVISOR_ID Read
ESP_ZB_ZCL_ATTR_METERING_UNIT_OF_MEASURE_ID Read
ESP_ZB_ZCL_ATTR_METERING_TEMPERATURE_UNIT_OF_MEASURE_ID Read

ESP_ZB_ZCL_ATTR_METERING_SUMMATION_FORMATTING_ID Read
ESP_ZB_ZCL_ATTR_METERING_HISTORICAL_CONSUMPTION_FORMATTING_ID Read
ESP_ZB_ZCL_ATTR_METERING_TEMPERATURE_FORMATTING_ID Read
I think I added all mandatory fields for se metering.

Does it need a specific configuration to allow reporting? Or is there something I'm missing?