connectedhomeip icon indicating copy to clipboard operation
connectedhomeip copied to clipboard

Only call MatterReportingAttributeChangeCallback on write if the data version changes.

Open bzbarsky-apple opened this issue 3 years ago • 1 comments

Problem

Right now we have two places where writes can call MatterReportingAttributeChangeCallback:

  1. WriteSingleClusterData
  2. 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.

bzbarsky-apple avatar Dec 14 '21 23:12 bzbarsky-apple

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Sep 17 '22 00:09 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Mar 22 '23 22:03 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Oct 15 '23 07:10 stale[bot]

Note: the implementation proposed above does not work, because we actually update data version from inside MatterReportingAttributeChangeCallback nowadays.

bzbarsky-apple avatar Oct 16 '23 16:10 bzbarsky-apple

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.

tcarmelveilleux avatar Oct 16 '23 16:10 tcarmelveilleux