connectedhomeip
connectedhomeip copied to clipboard
Only call MatterReportingAttributeChangeCallback on write if the data version changes.
Problem
Right now we have two places where writes can call MatterReportingAttributeChangeCallback
:
-
WriteSingleClusterData
-
emAfWriteAttribute
Both call it unconditionally, even if the value being written is identical to the current value.
Proposed Solution
Once we have dataversion support, read the dataversion, then write the value, then read the dataversion and only report if it has changed.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Note: the implementation proposed above does not work, because we actually update data version from inside MatterReportingAttributeChangeCallback nowadays.
Overall: this is the largest cause of needless reports, and fixing this will have a big impact on reducing congestion for large fan-outs of lighting commands.