matter: re-enable Valve Configuration and Control cluster - #391
Conversation
configs/defconfig.common explicitly disables CONFIG_SUPPORT_VALVE_CONFIGURATION_AND_CONTROL_CLUSTER (part of a block that trims ~50 rarely-used Matter clusters for flash size), so the CHIP valve-configuration-and-control-server object never gets compiled into the published esp32-arduino-libs. esp_matter's own wrapper code (esp_matter_cluster.cpp, esp_matter_command.cpp, esp_matter_delegate_callbacks.cpp) calls into that cluster's free functions and ember callbacks unconditionally though, so any attempt to actually use esp_matter::cluster::valve_configuration_and_control / endpoint::water_valve fails at link time with undefined references - see espressif#390 for the full trace, found while working on espressif/arduino-esp32#12853 (a new MatterWaterValve endpoint). Dropping the line falls back to esp_matter's own Kconfig default (y) for this cluster, re-including it in the build. This does grow the CHIP static lib a bit - happy to scope this differently (e.g. per-target) if the added flash size is a concern. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
@SuGlider PTAL |
The PR is fine. It enables the necessary cluster in order to add the Valve endpoint to the ESP32 Matter Library. |
|
Did you know that some jobs are failing? |
|
Hi @me-no-dev @SuGlider, Thanks for merging #391 quickly. Since arduino-esp32 consumes the precompiled esp32-arduino-libs binaries rather than building CHIP from source, I believe #12853 (MatterWaterValve) can't fully link against Is there a scheduled release cadence for esp32-arduino-libs, or a way to request an on-demand rebuild/publish after a fix like this lands? Just want to know what to watch for before I can get a full link test done on #12853. Thanks! |
|
we are planing to release a new Arduino Core by next week. It shall contain this and other Matter features. |
Description of Change
configs/defconfig.commonhas a block explicitly disabling ~50 rarely-used Matter clusters to save flash ("Exclude Matter Clusters for saving memory space"), including:CONFIG_SUPPORT_VALVE_CONFIGURATION_AND_CONTROL_CLUSTER=nThis means the CHIP
src/app/clusters/valve-configuration-and-control-server/directory never gets compiled into the CHIP static library shipped inesp32-arduino-libs(verified:esp_matter's own Kconfig-drivencluster_dir.cmakegates that same directory on this exact symbol, for both the ember-style implementation inesp_matter1.5.x and the newer cluster-class implementation in 1.6.0+ - this isn't specific to either architecture generation).esp_matter's own wrapper code (esp_matter_cluster.cpp,esp_matter_command.cpp,esp_matter_delegate_callbacks.cpp) calls into that cluster's CHIP functions/ember callbacks unconditionally, without guarding those call sites behind the same Kconfig symbol. So as long as it's disabled here, anyone trying to actually useesp_matter::cluster::valve_configuration_and_control/esp_matter::endpoint::water_valvehits undefined references at link time (not a compile error, so it's easy to miss until you actually try to build something that uses it).Found this while working on espressif/arduino-esp32#12853 (a new
MatterWaterValveendpoint for the Water Valve device type). Full trace and analysis in espressif/esp32-arduino-lib-builder#390.This PR drops the line, falling back to
esp_matter's own Kconfig default (y) for this cluster, so it gets included again.Tradeoff / open question for maintainers
This is a deliberate flash-size exclusion list, not a bug, so re-enabling this cluster does grow the CHIP static lib for every board/target that pulls in Matter support - not just ones that end up using Water Valve. I don't have a way to measure the exact size delta from this environment. If that's a concern, alternatives I'd be glad to implement instead:
esp_matter's own call sites behind#ifdef CONFIG_SUPPORT_VALVE_CONFIGURATION_AND_CONTROL_CLUSTER(filed as an option in esp-matter#1830) so disabling it fails at compile time with a clear message instead of a link error - though that alone wouldn't make Water Valve usable through this toolchain, just fail more clearly.Test Environment
esp32-arduino-lib-builderbuild (this compiles the entire toolchain, not a single sketch). This is a one-line, low-risk change that mirrors the existing pattern for every other cluster in this list, but it should be validated by a real build ofesp32-arduino-libsand a link test againstMatterWaterValvebefore merge.