Repository navigation
[CSA-CP] All device cherrypicks for 1.6.1 - #1228
Merged
Matthew Albert (malbert-silabs) merged 28 commits intoOct 2, 2026
Merged
Conversation
* Port persistent storage * Update unit tests * Code update * Update attribute_persistence_provider_exclusions.txt * Update attribute_persistence_provider_exclusions.txt * Address review comment * Address review comment * Address review comment * Address review comment * Undo changes to ClusterTester.h * Address review comment * Address review comment * Address review comment * Adding unit tests for MigrateModeBaseServerStorage.cpp functionality * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Address review comments * Address review comments --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…ulated devices to unified classes (#73562) * all-devices-app: align Dishwasher, LaundryWasher, and MicrowaveOven mode clusters with spec * all-devices-app: inject DiagnosticDataProvider into DeviceFactory across ESP32, Telink, and Silabs main entrypoints * all-devices-app: implement timer-driven operational state machine emulation in impl * all-devices-app: rename LoggingOperationalStateDelegate to EmulatedOperationalStateDelegate * all-devices-app: apply review feedback for Emulated delegate names and explicit mfgCode struct initialization * all-devices-app: fix ModeTagStruct field assignments in mode delegates * all-devices-app: use ClearValue() on chip::Optional mfgCode field in mode delegates * python_testing: add all-devices-app dishwasher run to TC_DISHM_1_2 * python_testing: add all-devices-app dishwasher run to TC_DISHM_2_1 * python_testing: add all-devices-app laundry-washer run to TC_LWM_1_2 * python_testing: add all-devices-app microwave-oven run to TC_MWOM_1_2 * app/clusters: update CookTimeSec attribute in MicrowaveOvenControlCluster and add all-devices-app run to TC_MWOCTRL_2_1 * python_testing: add all-devices-app microwave-oven run to TC_MWOCTRL_2_2 * python_testing: add all-devices-app microwave-oven run to TC_MWOCTRL_2_4 and fix step ordering * app/tests: add all-devices laundry-washer run to Test_TC_LWM_2_1.yaml * app/tests: add all-devices microwave-oven run to Test_TC_MWOCTRL_2_5.yaml * app/tests: add all-devices laundry-washer run to TestOperationalState.yaml * app/tests: revert modifications to TestOperationalState.yaml * python_testing: revert test logic modification in TC_MWOCTRL_2_4.py * python_testing: update TC_MWOCTRL_2_4.py step 4 to match official Matter test plan spec % len(supportedWattsList) * all-devices-app: refactor Dishwasher, LaundryWasher, and MicrowaveOven constructors to use Config struct * all-devices-app: remove GetDiagnosticDataProvider fallback and require diagnosticDataProvider in Config * all-devices-app: reset mDelegate cluster pointer and cancel timers on OperationalState cluster unregistration * ModeBaseCluster: require DeviceTypeEntry in constructor and use Types.h in CodegenIntegration * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [mode-base-server] Add ModeBase::ClusterEntry struct and constexpr cluster constants * [all-devices-app] Decouple generic device types from impl/ concrete delegates * Restyle * [all-devices-app] Transition operational state to kRunning in microwave control callback when startAfterSetting is true * Restyle * [all-devices-app] Address PR review comments: remove magic numbers and fix camelCase parameter naming * [all-devices-app] Rename mode constants to kModeIndex* in Dishwasher.h * [all-devices-app] Revert constant names to kModeNormal/kModeHeavy/kModeLight in Dishwasher.h * [all-devices-app] Separate mode indexes and mode values with explanatory comment in Dishwasher.h * [all-devices-app] Inject TimerDelegate and PlatformManager into delegates and device types Refactor EmulatedOperationalStateDelegate, NetworkInfrastructureManager, OnOffLightSwitch, and WifiRootNode to use injected references (TimerDelegate &, PlatformManager &, DiagnosticDataProvider &) instead of accessing global DeviceLayer:: singletons. * [all-devices-app] Inject FailSafeContext, BindingTable/Manager, and minGuaranteedSubscriptionsPerFabric into device types Refactor NetworkInfrastructureManager, OnOffLightSwitch, RootNode, and DeviceFactory to take injected references for FailSafeContext &, Clusters::Binding::Table &, Clusters::Binding::Manager &, and uint16_t minGuaranteedSubscriptionsPerFabric. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [all-devices-app] Initialize platformManager, failSafeContext, and bindingTable/Manager in telink, esp32, and silabs mains Update DeviceFactory::GetInstance().Init calls across all platform mains (telink/common/src/AllDevicesServer.cpp, esp32/main/main.cpp, and silabs/src/AppTask.cpp) to populate platformManager, failSafeContext, bindingTable, and bindingManager fields in DeviceFactory::Context. * [all-devices-app] Initialize minGuaranteedSubscriptionsPerFabric in esp32, silabs, and telink mains * [all-devices-app] Refactor EmulatedMicrowaveOven to a single unified device class * [all-devices-app] Refactor EmulatedDishwasher to a single unified device class * [all-devices-app] Refactor EmulatedLaundryDryer to a single unified device class * [all-devices-app] Refactor EmulatedLaundryWasher to a single unified device class * [all-devices-app] Refactor LoggingTemperatureControlledCabinetPart and LoggingOven to unified device classes * [all-devices-app] Refactor LoggingRefrigerator to a single unified device class * [all-devices-app] Refactor RoboticVacuumCleaner and delete EmulatedOperationalStateDelegate capability * Restyle * [all-devices-app] Remove unused MicrowaveOvenModeDelegate from MicrowaveOven.h * [all-devices-app] Move domestic safe food storage defaults to LoggingRefrigerator * [all-devices-app] Restore original RoboticVacuumCleaner and operational-state capability delegates * [all-devices-app] Compute CountdownTime dynamically on read from end timestamp * [all-devices-app] Restore BooleanStateSensorAccessor in enabled_devices.cmake --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Andrei Litvin <andreilitvin@google.com>
…957) * Mode Select: migrate to code driven implementation * Mode Select: ZAP regen, CodegenIntegration wiring, and cmake build fixes - Wire CodegenIntegration layer: register ModeSelectCluster per endpoint using ZAP defaults for CurrentMode, StartUpMode, and OnMode - Guard ReleaseRegistration's Destroy() call behind IsConstructed() to prevent chipDie() on never-initialized entries - Treat stale NVM StartUpMode/OnMode values (mode removed by firmware update) as non-fatal: log and keep the current mode instead of failing - Remove unreachable write-guard branches in WriteAttribute (dead code per code-driven contract) - Add ModeSelectCluster.cpp and supported-modes-manager.h to app_config_dependent_sources.cmake so chip_configure_cluster includes them automatically for all cmake-based platforms (ESP32, NXP, Ameba, Telink, nRFConnect, Realtek) - Use _span literals for CharSpan constants in static-supported-modes-manager - Regenerate ZAP outputs * Address review feedback - Add ModeSelectCluster to src/app/clusters/BUILD.gn (static_library) so libCHIP includes it on all platforms; remove the per-platform explicit entries in app_config_dependent_sources.cmake and realtek/chip_main.cmake. - Remove Description and StandardNamespace from attributeAccessInterfaceAttributes in zcl.json so ember stores/serves them from ZAP defaults, restoring the 'Coffee' description and standard namespace values in endpoint_config.h. Remove their ReadAttribute cases and Config/Delegate fields accordingly. - Make mFeatureMap, mOptionalAttributeSet, mOnOffValueForStartUp const. - Fix UpdateStartUpMode/UpdateOnMode: return ConstraintError (not InvalidCommand) for an unsupported mode value in a WriteAttribute context. - Remove Mode Select from ClustersWithPreAttributeChangeFunctions in config-data.yaml and drop the no-op PreAttributeChanged stub. - Fix init ordering: factor startup-mode application into ApplyStartupModeLogic(). Startup() calls it after LoadPersistentAttributes(); setSupportedModesManager() calls it again on all constructed clusters so StartUpMode/OnMode behaviors still execute even though ApplicationInit() runs after Server::Init(). - Update unit tests to reflect the above (attribute list, status codes). * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * ZAP: remove spurious laundry-washer-controls-cluster.xml reference laundry-washer-controls-cluster.xml does not exist on disk; the Laundry Washer Controls cluster is already defined in washer-controls-cluster.xml which is already listed in zcl.json. The non-existent reference causes ZAP to fail when loading zcl.json, breaking the ZAP templates CI job. * Mode Select: serve Description and StandardNamespace from cluster code Description and StandardNamespace are mandatory attributes but were absent from Attributes() and ReadAttribute(), causing the framework to return UnsupportedAttribute (status 134) — breaking test_TC_MOD_1_2 step 6. Fix: - Add description and standardNamespace to Config; read from Ember RAM storage in CodegenIntegration (via GetDefault accessors) and pass to the cluster at startup. - Store as CharSpan/Nullable<uint16_t> members; serve from ReadAttribute. - Include Description::kMetadataEntry and StandardNamespace::kMetadataEntry in Attributes() kMandatory list. - Update unit tests: add Description/StandardNamespace to Attributes list expectations and add ReadDescription / ReadStandardNamespaceDefaultNull test cases. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix FeatureMap RAM storage and const members; regen - Remove FeatureMap from Mode Select attributeAccessInterfaceAttributes: fetchFeatureMap=true reads via emberAfReadAttribute, which returns Failure for EXTERNAL_STORAGE attributes → featureMap was always 0, silently dropping the OnOff feature bit. - Make mDescription and mStandardNamespace const in ModeSelectCluster. - Remove ModeSelectCluster.cpp from ameba chip_main.cmake (already in libCHIP). - Update generated Accessors, endpoint_config.h, and .matter files. * Mode Select: address review feedback on Config and MEI workaround Remove initialStartUpMode and initialOnMode from Config — these are writable attribute defaults, not fixed cluster properties. mStartUpMode and mOnMode use their in-class null defaults instead. Remove the ManufacturerExtension MEI stub from CodegenIntegration.cpp. The stub was a workaround for Realtek's test-extension build and does not belong in a standard cluster implementation. * Mode Select: remove ManufacturerExtension MEI test extension The ManufacturerExtension attribute (0xFFF10001) was a test MEI defined in mode-select-extensions.xml. Remove it from zcl-with-test-extensions.json and from the ZAP configurations and generated outputs that included it. * Mode Select: run ApplyStartupModeLogic only once per cluster instance Add mStartupLogicApplied flag so that startup mode/OnMode logic is not re-applied if setSupportedModesManager is called again at runtime, which would overwrite the mode the user had selected. * Mode Select: restore StartUpMode default of 0 when attribute is present When StartUpMode attribute is enabled, default to mode 0 (not null) so the device applies a deterministic startup mode on first boot. Computes the default from mOptionalAttributeSet in the constructor instead of via Config. Fixes TC_MOD_1_2 startup mode assertion. * Mode Select: fix zcl-with-test-extensions.json sync - Restore mode-select-extensions.xml reference (required by check_zcl_file_sync.py) - Move User Label entry to match zcl.json ordering * Mode Select: fix mContext null guard and C++17 initializers - Add mContext != nullptr guard to UpdateCurrentMode, UpdateStartUpMode, UpdateOnMode to prevent crash if called before Startup() - Replace C++20 designated initializers with ordered aggregate init in tests for strict C++17 compliance * Mode Select: add mContext null guard to Update* functions UpdateCurrentMode, UpdateStartUpMode, UpdateOnMode all dereference mContext directly in their attributeStorage.WriteValue calls. Add a VerifyOrReturnValue(mContext != nullptr, Status::Busy) guard to prevent a crash if these public functions are called before Startup() runs. * Mode Select: default StartUpMode to null Hardcoding mode 0 as the StartUpMode default was wrong — mode 0 is not guaranteed to exist in the supported modes list. The correct first-boot state is null (no override), which LoadPersistentAttributes already handles via its fallback parameter. * Mode Select: remove ManufacturerExtension from Realtek matter file The MEI ManufacturerExtension attribute and SampleMfgExtensionCommand were removed from the Realtek ZAP file but the generated matter file was not updated, causing the ZAP regen check to fail. Remove both the attribute and command from the cluster definition, and the attribute from the endpoint configuration. * Mode Select: address andy31415 review comments - Use AttributePersistence::StoreNativeEndianValue for writes in UpdateCurrentMode/StartUpMode/OnMode, eliminating manual 0xFF null- sentinel encoding and reinterpret_cast ByteSpan boilerplate. - Change Status::Busy -> Status::InvalidInState in Update* guards; Busy implies resource contention, InvalidInState is correct when the cluster context is not yet initialized. - Replace copy-assign of SupportedModesManagerDelegate with a SetEndpointId() setter on the pre-allocated entry, as suggested. - Remove getDescription() from SupportedModesManager / StaticSupportedModesManager; the description is read from Ember RAM via GetDefault() in CodegenIntegration, so this method was dead API added by this PR. - Remove ReadStringAttribute / ReadNullableUint16Attribute / ReadNullableUint8Attribute from CodegenClusterIntegration; these were added but never used (CodegenIntegration switched to ::GetDefault). * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Mode Select: add missing ember attribute callback stubs The ZAP-generated configuration.attribute-storage.cpp registers MatterModeSelectClusterServerPreAttributeChangedCallback and MatterModeSelectClusterServerAttributeChangedCallback in the cluster function table. Code-driven clusters own write validation in WriteAttribute(), so these callbacks must be stubbed to return Success / no-op. Fixes linker error: undefined symbol MatterModeSelectClusterServerPreAttributeChangedCallback * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Mode Select: fix trailing comma in Realtek .zap after MEI removal Removing the ManufacturerExtension attribute entry left a trailing comma on the preceding ClusterRevision entry in the attributes array, making the JSON invalid and breaking zap_regen_all.py for this target. * Mode Select: fix two additional CI failures from upstream 1. LaundryDryerControls (PR #73354): add missing ember attribute callback stubs PreAttributeChangedCallback/AttributeChangedCallback, same pattern as the ModeSelect fix in the previous commit. 2. test_generators golden file: the large_all_clusters_app.matter input file still had ManufacturerExtension in the ModeSelect cluster (attribute + command + endpoint instantiation), causing the generated static-cluster-config/ModeSelect.h to differ from the golden output which was already updated to remove it. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix unit test for StartUpMode null default ReadStartUpModeDefaultZero expected StartUpMode == 0, but the correct spec behavior is null (null = no startup override). Renamed and updated to ReadStartUpModeDefaultNull with EXPECT_TRUE(startUpMode.IsNull()). Revert reording * Remove callback * Mode Select: address review comments and fix all-clusters-app build * Mode Select: call ApplyStartupModeLogic in Startup, move internal API to header, remove from PreAttributeChangeFunctions * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Mode Select: restore accidentally removed PreAttributeChange entries * Try to fix CI * Mode Select: clean up unrelated laundry-dryer stubs and redundant ApplyStartupModeLogic calls in tests * Mode Select: move startup-logic tracking out of core cluster ApplyStartupModeLogic() is naturally idempotent: if StartUpMode was already applied then mStartUpMode.Value() == mCurrentMode (no-op), and same for OnMode. The mStartupLogicApplied flag was therefore redundant state that violated the code-driven rule (no codegen-specific state in core cluster files). Remove it along with the now-trivial Shutdown() override. * Mode Select: move FindClusterOnEndpoint to CodegenIntegration.h FindClusterOnEndpoint is only valid when code-driven cluster integration is active. Move its declaration from the core ModeSelectCluster.h to CodegenIntegration.h, matching the pattern used by all other migrated clusters. Update the one external caller accordingly. * Mode Select: clear OnManagerSet callback on plugin shutdown * Mode Select: list supported-modes-manager.h in BUILD.gn * Mode Select: move supported-modes-manager.h to codegen build files The compat stub includes SupportedModesManager.h which lives in the codegen target, so GN --check rejects it in BUILD.gn. Move it to app_config_dependent_sources.gni/cmake where it belongs. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add Mode Select device type Replaced C++20 designated aggregate initializers with positional C++17 aggregate initialization for `kSupportedModes` and `ModeSelectCluster::Config` in `SimulatedModeSelect.cpp` to ensure compatibility with strict C++17 toolchains (e.g., ESP32). * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Address review comments for Mode Select device type - Registered ModeSelectCluster during the startup loop in main.cpp to ensure GetClusterByEndpoint finds it correctly when dispatching AppCommandDelegate commands. - Resolved a compilation ambiguity by using the fully qualified chip::app::ModeSelect type. - Added bounds checking in SetModeSelectCurrentModeCommandHandler to ensure the 'NewMode' parameter does not exceed UINT8_MAX before casting to uint8_t. * Address remaining review comments for Mode Select device type - Fix cluster status doc totals: Mode Select flipped to code-driven and available in all-devices-app, so totals are now 102 and 55 - Fix unimplemented device types count in supported_device_types.md: moving Mode Select to the implemented table leaves 58 rows - Check and log the InteractionModel status returned by UpdateCurrentMode in the SetModeSelectCurrentMode named-pipe command handler instead of discarding it * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Remove duplicate Commissioning By Proxy row in supported_device_types.md The Commissioning By Proxy entry appeared in both the implemented table (#6) and the unimplemented table (#17). Remove the stale unimplemented row and renumber the table to match the new total. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Fix double pipes in supported_device_types.md table Rebuild the file from master and apply only the intended changes: add Mode Select to the implemented table, remove it and the duplicate Commissioning By Proxy entry from the unimplemented table, and update the section totals. Master's numbering gaps in the unimplemented table are preserved. * Doc: add Ambient Context Sensor as implemented, refresh device list - Move Ambient Context Sensor (336, 0x0150) from unimplemented to implemented in supported_device_types.md (registered in DeviceFactory since PR #72731) and update both totals. - Note the platform-override registration path in the doc methodology. - Add ambient-context-sensor and mode-select to the README --device list. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Do not advertise the OnOff feature on the simulated Mode Select device The OnOff feature declares a dependency on an OnOff cluster instance on the same endpoint. The simulated device does not compose with an OnOff cluster, so advertising the feature was incorrect. Remove it; the OnMode attribute is feature-gated and is no longer exposed. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add Identify Delegate to device factory * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Restyled by gn * add base app changes * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix silabs build * fix ci and ai comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix telink * fix comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Restyled.io <commits@restyled.io>
…slator dispatch (#73968) * Refactor Out-of-Band (OOB) accessors and named pipe handling in all-devices-app - Introduce OOBAccessor and InMemoryOOBAccessorRegistry for out-of-band control of cluster instances. - Implement cluster-level OOB accessors for OnOff, Occupancy, BooleanState, AmbientContext, BasicInformation, and ElectricalEnergyMeasurement. - Wire device-type OOB accessors across all 11 device types. - Centralize named pipe dispatching in PosixNamedPipeDispatcher with JSON translators. - Gate OOB accessors in DeviceFactory via ALL_DEVICES_APP_ENABLE_OOB_ACCESSORS build flag. - Add unit tests for OOBAccessorRegistry and cluster accessors. * Implement variadic static-hook architecture for DeviceFactory and modernize OOB/NamedPipe wiring - Template DeviceFactory on typename... Hooks with fold expression dispatch in onDeviceRegistered. - Add SimpleDeviceFactory (DeviceFactory<>) alias for zero-hook embedded builds. - Implement OOBAccessorHook and NamedPipeHook static registration policies with OnDeviceRegistered. - Decentralize POSIX named pipe translator wiring into per-device NamedPipeTranslators.h/.cpp across all 11 device types. - Clean up dead platform override overloads and update architecture, design, and developer guide documentation. * all-devices-app: address review feedback on OOB accessors and Named Pipe dispatch - Replace GetEndpointId with ExtractUInt<EndpointId> in NamedPipeCommandTranslator - Add PosixDeviceFactory::ExecuteHooks static invoker helper - Preserve underlying error in OccupancyOOBAccessor::HandleSetHoldTime - Add comprehensive C++ unit tests for Occupancy, AmbientContext, ElectricalEnergyMeasurement, and BasicInformation OOB accessors - Sync all documentation (architecture, out_of_band_control, adding_new_device, supported_device_types, supported_clusters, README, custom_product_baseline) * all-devices-app: address code review findings across OOB accessors, translators, DeviceFactory, and docs * all-devices-app: polish OOB accessors, build configs, and documentation * all-devices-app: address reviewer findings on tracing flags, struct initialization, and translator compatibility * all-devices-app: de-stutter and namespace named pipe dispatcher components - Move POSIX named pipe dispatcher, hook, command translator, and translators under namespace chip::app::NamedPipe. - Rename PosixNamedPipeDispatcher to Dispatcher, NamedPipeHook to Hook, and NamedPipeCommandTranslator to CommandTranslator. - Update all 11 device type named pipe translator registrations and main.cpp to reference chip::app::NamedPipe. - Add defensive input range validation and 64-bit integer safety checks in translators. - Synchronize all architecture, design, and onboarding documentation. * Restyle * [all-devices-app] Integrate Commissioning Proxy and RVC named-pipe simulation after master merge * [all-devices-app] Address review feedback on JSON integer extraction and markdown spelling * [all-devices-app] Implement RvcOOBAccessor and decouple RVC named pipe translator * [all-devices-app] Apply const-correctness to command translators, clean DeviceFactory, and sync documentation * [all-devices-app] Address PR review feedback on includes, C++17 initializers, CMake build, and bounds checks * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [all-devices-app] Include CodeUtils across accessor registration TUs and apply RVC/translator consistency fixes * [all-devices-app] Add TestNamedPipeTranslators unit tests and remove inverted GN dependency - Add TestNamedPipeTranslators suite covering CommandTranslator extractions, granular translators, and Dispatcher JSON routing - Remove inverted robotic-vacuum-cleaner public_deps from posix/named_pipe/BUILD.gn - Register named pipe tests in examples/BUILD.gn test group * [all-devices-app] Implement TlvMessageBuffer and use dynamic heap allocation for variable-length named pipe actions - Add TlvMessageBuffer encapsulating payload estimation and envelope overhead (kTlvEnvelopeOverhead = 64) - Migrate DispatchStringAction, RvcTranslator, and AmbientContextTranslator to TlvMessageBuffer - Add unit tests verifying TlvMessageBuffer lifecycle and large string payloads * [all-devices-app] Include <sstream> in TestNamedPipeTranslators and size nested tags in AmbientContextTranslator - Add missing #include <sstream> for std::istringstream in TestNamedPipeTranslators.cpp - Calculate total nested semantic tags for TlvMessageBuffer sizing in AmbientContextTranslator::TranslateSetPredictedActivity * [all-devices-app] Fix clang-tidy widening multiplication warnings and Telink SimpleDeviceFactory usage * [all-devices-app] Ensure symmetric BasicInformation action dispatch and validate TLV decode loop termination * [all-devices-app] Fix ESP32 CMake build by using explicit device sources instead of globbing * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [all-devices-app] Address PR review feedback: rename DeviceRegistrationEntry, MakeDevice, and NoHooksDeviceFactory * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [all-devices-app] Fix Telink NoHooksDeviceFactory usage and simplify ExtractUInt * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Andrei Litvin <andreilitvin@google.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…74278)
* Refactor all-devices-app simulated devices to inherit from device types
Simulated device implementations previously inherited from logging load base
classes rather than their corresponding leaf device types.
Refactor the logging loads into reusable delegates (LoggingOnOffDelegate,
LoggingDimmableDelegate, LoggingFanDelegate, LoggingLightDriver) and update
simulated devices to inherit from their respective device types while
composing the delegates.
Inheritance structure:
Before:
EndpointBase
▲ ▲
│ └── LoggingLoad (is-a EndpointBase)
DeviceType ▲
(unused) └── LoggingDevice (is-a LoggingLoad, NOT DeviceType)
After:
LoggingDelegate (pure delegate, no endpoint)
▲ (private)
│
EndpointBase
▲
DeviceType
▲ (public)
LoggingDevice (is-a DeviceType, composes LoggingDelegate)
Concrete mappings:
- LoggingOnOffLight -> OnOffLight (composes LoggingOnOffDelegate)
- LoggingDimmableLight -> DimmableLight (composes LoggingDimmableDelegate)
- LoggingFan -> Fan (composes LoggingFanDelegate)
- LoggingAirPurifier -> AirPurifier (composes LoggingFanDelegate)
- LoggingColorTemperatureLight -> ColorTemperatureLight (composes LoggingLightDriver)
- LoggingExtendedColorLight -> ExtendedColorLight (composes LoggingLightDriver)
- OnOffPlugInUnit / MountedOnOffControl -> OnOffLoad (composes LoggingOnOffDelegate)
- DimmablePlugInUnit / MountedDimmableLoadControl -> DimmableLoad (composes LoggingDimmableDelegate)
- ExtractorHood -> FanLoad (composes LoggingFanDelegate)
* Fix callback method name typo in LoggingFanDelegate::OnOnOffChanged
* [all-devices-app] Fix delegate null-safety, FanLoad cluster init order, and LoggingLightDriver deduplication
* [all-devices-app] Document device inheritance, optional cluster hooks, and capability trade-offs
* [docs] Format inheritance diagrams with code blocks and add dictionary overrides
Convert LaTeX math expressions to monospaced text diagrams in all-devices-app
documentation and add technical terms to the wordlist for pyspelling.
* [all-devices-app] Address review feedback on capability dependencies, diagrams, and effect validation
Qualify capability dependency guidelines to permit shared Matter APIs, align
architecture diagram notation with default hook implementations, clarify base
device type interface references, and return ConstraintError for invalid
OnOff effect variants.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Refactor Rood Node * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Restyled by gn * apply comments * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Restyled.io <commits@restyled.io>
Matthew Albert (malbert-silabs)
marked this pull request as ready for review
September 30, 2026 14:18
Matthew Albert (malbert-silabs)
requested a review
from a team
as a code owner
September 30, 2026 14:18
sarthak shaha (Sarthak-Shaha)
approved these changes
Sep 30, 2026
sarthak shaha (Sarthak-Shaha)
left a comment
Contributor
There was a problem hiding this comment.
Did not validate changes as they are cherry picks and huge, rubber stamping.
Junior Martinez (jmartinez-silabs)
approved these changes
Sep 30, 2026
Junior Martinez (jmartinez-silabs)
left a comment
Contributor
There was a problem hiding this comment.
rubber stamping too. I already reviewed most, if not all, of them on the CSA PR
Matthew Albert (malbert-silabs)
added this pull request to stack #1230
September 30, 2026 14:43
Ricardo Casallas (rcasallas-silabs)
approved these changes
Sep 30, 2026
* Re-reaise exceptions-on-failure * Check * [tests] Fix pre-existing failures surfaced by re-raising exceptions With run_test_suite.py now exiting non-zero on test failures, the pre-existing failures below became visible in CI; fix their root causes: - TestModeSelectCluster: StartUpMode is nullable and defaults to null in the code-driven server (see ReadStartUpModeDefaultsToNull unit test), so expect null instead of 0. Unsupported StartUpMode/OnMode writes return CONSTRAINT_ERROR (WriteStartUpModeInvalidValueReturnsConstrain tError), not INVALID_COMMAND. - TestScenesFabricRemoval: the TH2 "Map KeySets to GroupId" preparation step writes GroupKeyMap, which is rejected with INVALID_IN_STATE once Groupcast is adopted; gate it on !GC.S like the other non-Groupcast steps (the GC.S path maps the keyset via JoinGroup instead). - OT simulation platform: point the flash (settings) file at an absolute /tmp path. The default relative "tmp" path made otPlatFlashInit() exit the app at startup when the working directory was not writable, which crashed TestOperationalState BLE-Thread/Thread-MeshCoP runs in CI. - results.py: re-raise the original exception instead of wrapping it in a ResultError, preserving the exception type and traceback. * BUILD.gn: add blank line before comment block Matches gn format as run by restyled. * [tests] Launch test apps from a writable temp dir The OpenThread simulation platform opens two cwd-relative files at startup (the OT log and the flash/settings file) and exits via VerifyOrDie if it cannot open them, which killed apps whose working directory is unwritable (as in CI). Instead of moving the paths inside the OpenThread build, spawn app processes with cwd in the temp directory: on Linux the worker remounts /tmp per worker, so the simulation files are isolated per test run. This replaces the previous /tmp log-path and settings-path changes, which are reverted. * Revert "[tests] Launch test apps from a writable temp dir" This reverts commit be894f3a82361de6b90531bd94e90e4b6ccdf495. * Revert the app cwd change; fix the OT sim paths in the sim build Restore the /tmp log path in AppMain.cpp and the settings path define in the OpenThread simulation BUILD.gn: the sim platform opens cwd-relative files at startup and exits via VerifyOrDie when the cwd is unwritable (as in CI). The harness-wide cwd change had a much larger blast radius (all test subprocesses now ran from the temp dir), so apps inherit the harness working directory again. Document in BUILD.gn that /tmp is isolated per test run by the harness (per-worker remount, cleared between runs), so the shared settings directory never carries state across runs in CI. * [scenes] Fix ModeSelect scene recall instead of weakening the scenes tests Restore the extension field sets in TestScenesFabricSceneInfo (out-of-range 0x64 values on ColorControl and the ModeSelect entry removed in e5c1b82f476): per the Scenes Management cluster, RecallScene SHALL only fail with INVALID_COMMAND, NOT_FOUND or SUCCESS, and invalid attribute values in an extension field set SHALL be clamped to the closest valid value rather than rejected. The failures these changes were working around came from ModeSelectCluster::ApplyScene propagating ConstraintError out of a recall; apply the clamping there instead and add unit tests for closest-value and tie-breaking behavior. Also correct the openthread simulation settings-path comment: /tmp is bind-mounted once per worker process (not cleared between runs), and the simulated flash files persist across tests within a worker. Update the FabricSceneInfo step labels for the deprecated CurrentScene/CurrentGroup/SceneValid fields fixed by Scenes Management Revision 2. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Restyle yaml * [mode-select] Start the tie-break scene test from mode 4 Startup leaves CurrentMode at 0, so asserting 0 after the recall would pass even if ApplyScene did nothing. Move to mode 4 first so the test verifies the transition. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The all-device-app in CSA has sustained continued development sicne the 1.6.1 branch cutoff and almost none of those changes were backported to 1.6.1.
This SL-TEMP contains the required cherrypicks to build the all-device-app for the Zephyr version that merged recently to CSA master.
Refactor Rood Node
project-chip/connectedhomeip#74283
bbe0942 21 sept
Inherit simulated devices from leaf device types
project-chip/connectedhomeip#74278
b9b92d2 17 sept
Implement modular OOB accessors and Named Pipe translator dispatch
project-chip/connectedhomeip#73968
15f9303 10 sept
Add Identify Delegate to device factory
project-chip/connectedhomeip#73942
fc18ade 9sept 7 am
Add Mode Select device type
project-chip/connectedhomeip#73923
7295fb1 9 sept 5am
Mode Select: migrate to code driven implementation
project-chip/connectedhomeip#72957
2cfcd7e 1sept
Expand code-driven cluster support and refactor simulated devices to unified classes
project-chip/connectedhomeip#73562
0a0352b aug18
Port Mode base safe attribute persistence
project-chip/connectedhomeip#72722
f43ab1c jul 14
Related issues
N/A
Testing
Builds on-off and dishwasher on mg26 Zephyr