zigbee-configurable-firmware icon indicating copy to clipboard operation
zigbee-configurable-firmware copied to clipboard

Reporting Interval Behavior Is Not Consistent

Open LenirSantiago opened this issue 3 years ago • 0 comments
trafficstars

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:

  1. if defaultReportingInterval = 0, disable reporting.
  2. else if "Disable configuring the interval remotely in run-time" then enable reporting using the specified value
  3. else if minimumReportingInterval <= defaultReportingInterval <= maximumReportingInterval then enable reporting using the specified value
  4. 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:

  1. 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:

  1. if defaultReportingInterval == 0, reply with UNREPORTABLE_ATTRIBUTE (0x8c) or UNSUP_COMMAND (0x81)
  2. 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.

LenirSantiago avatar Oct 06 '22 22:10 LenirSantiago