connectedhomeip icon indicating copy to clipboard operation
connectedhomeip copied to clipboard

Sample apps publish unsupported attributes

Open CodeChronos928 opened this issue 2 years ago • 1 comments

Problem

The sample apps should only be publishing attributes that are supported by the device, as they are intended to be conformant starting points for actual device development.

That is not the case today. One example is the all-clusters-app. It enables the ThreadNetworkDiagnostics cluster, even on ESP32 devices that do not support thread.

As a result, anyone that tries to read the full device state from the ClusterStateCache is faced with several errors like the following:

endpoint: 0, cluster: 53, attribute: 2: Failed to read attribute value; IM Error 0x00000501: General error: 0x01

This makes the error handling of subscribed devices unreasonably complex, as they need to know which errors are safe to ignore, and which ones represent a real issue.

If clusters cannot be implemented, they should not be instantiated. We should audit all of the sample apps for issues like this, and resolve them.

CodeChronos928 avatar Aug 08 '22 20:08 CodeChronos928

Note that all-clusters-app specifically is not meant as a "sample app" in any sane form. It does not implement sane device type, and it implements a Test Cluster instance that will always fail some attribute reads/subscriptions, so it can be used for testing those sorts of failures.

For the other sample apps, we should make sure they are doing sane things. For all-clusters-app, that is unattainable while keeping it as the testing vehicle it's used as.

bzbarsky-apple avatar Aug 08 '22 21:08 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 Feb 04 '23 22:02 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 Aug 07 '23 03:08 stale[bot]

This stale issue has been automatically closed. Thank you for your contributions.

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