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