This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC1352P: Unable to update Electric Measurement Attribute

Part Number: CC1352P

Hi,

I am using zr_light code base and implemented on/off along with electrical measurement cluster and sample metering. I need to report to gateway my electric cluster measurements cluster values like voltage, current, active power , power factor when ever there is a change in parameters. I am calling the below function [example for IRMS] from zclSampleLight_OnOffCB() just to see when ever on/off happens my values are seen in gateway. But it is not working the way. Can you please suggest me on how to do the update of electric measurement attributes to the gateway ?

void zclSampleLight_updateElectricMeasurmentAttribute()
{

  zclSampleElectricMeasurement_RMS_CURRENT_MeasuredValue = (uint16_t)irms;
  zstack_bdbRepChangedAttrValueReq_t Req;


  Req.attrID = ATTRID_ELECTRICAL_MEASUREMENT_RMS_CURRENT;
  Req.cluster = ZCL_CLUSTER_ID_MS_ELECTRICAL_MEASUREMENT;
  Req.endpoint = SAMPLELIGHT_ENDPOINT;
  Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId,&Req);

 }

Regards,

Praveen TV 

  • Do you binding ZCL_CLUSTER_ID_MS_ELECTRICAL_MEASUREMENT to make report to work?

  • Dear Yikai Chen,

    Yes I use binding and actually my values goes to gateway once in 30 minutes, and 30 minutes is the config reporting interval set by gateway.

    But in between if there is any change in values of electrical measurement need to wait next 30 minutes. I need to update it when ever there is a change in parameters. Or when ever there is an on/off of the load the values must be updated. 

    Regards,

    Praveen TV

  • Hi Praveen,

    It appears that you should modify the reportableChange value of your attributes, otherwise please debug the return value of Zstackapi_bdbRepChangedAttrValueReq as well as processBdbRepChangedAttrValueReq -> bdb_RepChangedAttrValue to determine why the report is not being sent.  The Zigbee Fundamentals SLA may also be of some assistance, and you can refer to the Light and TemperatureSensor examples which utilize this API inside their *_data.c files.

    Regards,
    Ryan