zigbee-configurable-firmware
zigbee-configurable-firmware copied to clipboard
Reporting Interval Behavior Is Not Consistent
When the device receives ConfigureReportingCommand with a minimumReportingInterval and maximumReportingInterval, the device is selecting the minimumReportingInterval.
minimumReportingInterval should NOT be used because some controllers use minimumReportingInterval=1 and that would make the device too chatty sending a report every second. This is the current behavior.
Instead, it should evaluate the Default Reporting:
- if defaultReportingInterval = 0, disable reporting.
- else if "Disable configuring the interval remotely in run-time" then enable reporting using the specified value
- else if minimumReportingInterval <= defaultReportingInterval <= maximumReportingInterval then enable reporting using the specified value
- else enable reporting using maximumRerportingInterval specified by the coordinator.
CAUTION: if reporting is enabled and "Disable configuring the interval remotely in run-time" is checked and defaultReportingInterval > maximumReportingInterval, it could cause the coordinator to have unknown behavior, for example, the coordinator can mark the device as OFFLINE until it receives a report.
The logic to evaluate the Default Reporting Interval's value could be:
- if ConfigureReportingCommand is recevied 2.1. if "Disable configuring the interval remotely in run-time" == FALSE 2.1.1 if defaultReportingInterval >= 1 2.1.1.1 If minimumReportingInterval <= defaultReportingInterval <= maximumReportingInterval then defaultReportingInterval. 2.1.1.2 else defaultReportingInterval = maximumReportingInterval. 2.2 else defaultReportingInterval.
This should result in three possible validated outcomes for defaultReportingInterval: defaultReportingInterval == 0 or minimumReportingInterval <= defaultReportingInterval <= maximumReportingInterval or defaultReportingInterval > maximumReportingInterval (this may occur if "Disable configuring the interval remotely in run-time" is checked)
Once defaultReportingInterval is validated, when ConfigureReportingCommand is recevied:
- if defaultReportingInterval == 0, reply with UNREPORTABLE_ATTRIBUTE (0x8c) or UNSUP_COMMAND (0x81)
- else reply SUCCESS (0x00)
CAUTION: if reporting is enabled, "Disable configuring the interval remotely in run-time" is checked and defaultReportingInterval > maximumReportingInterval, it could cause the coordinator to have unknown behavior, for example, the coordinator can mark the device as OFFLINE until it receives a report.