Programming a ZED to be used as a temperature sensor, we've encountered several issues with the reporting mechanism, namely with the minimum reportable changes. The problem is that, seemingly, Reportable Change attribute does not work and has no effect over the device's behaviour.
Lets say we configure the measuredValue of Temperature cluster's minimum reporting time to be 10 seconds, maximum reporting time to be 20, and Reportable Change to be 4 degrees. If, on my uC, i only poll the sensor and update the variable holding the measured value within the attribute list without explicitly issuing a Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId, zReq), no reporting is issued until maximum reporting interval expires (case 1). However, with the same reporting settings, if i explicitly call Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId, zReq) after each polling loop, the measuredValue attribute will be updated even if delta is smaller than Reportable Change was configured to (case 2).
My questions are the following:
- For (case 1), does the zstack not handle reporting by itself, outside of responding to Reportable Attribute requests when maximum reporting time expires?
- Again for (case 1), do i have to specially handle Reportable Change configurations myself and provide my own implementation for handling this specific configuration? e.g.: by always checking that last reported value and current value differ by Reportable Change and manually trigger Zstackapi_bdbRepChangedAttrValueReq(appServiceTaskId, zReq)
- If question 2 is not true, then for (case 2), what is the point of Reportable Change if i can send values that differ with less than that?
Is there something else that i am misunderstanding about this reporting mechanism?
Also, on the side, are there some guidelines or resources for developing sleepy end devices?