Skip to content

[HVAC] Rename thermostat-server to ThermostatCluster#41739

Open
hasty wants to merge 6 commits intoproject-chip:masterfrom
hasty:granbery/cluster_driven_thermostat
Open

[HVAC] Rename thermostat-server to ThermostatCluster#41739
hasty wants to merge 6 commits intoproject-chip:masterfrom
hasty:granbery/cluster_driven_thermostat

Conversation

@hasty
Copy link
Copy Markdown
Contributor

@hasty hasty commented Nov 3, 2025

Summary

This is a draft PR for renaming thermostat-manager to more closely fit the code-driven cluster template.

Testing

Ran test-suite locally.

Readability checklist

The checklist below will help the reviewer finish PR review in time and keep the
code readable:

  • PR title is
    descriptive
  • Apply the
    “When in Rome…”
    rule (coding style)
  • PR size is short
  • Try to avoid "squashing" and "force-update" in commit history
  • CI time didn't increase

@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 3, 2025

PR #41739: Size comparison from 5d26b5d to dea25b8

Full report (4 builds for nrfconnect, realtek, stm32)
platform target config section 5d26b5d dea25b8 change % change
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 933176 933176 0 0.0
RAM 161317 161317 0 0.0
realtek light-switch-app rtl8777g FLASH 706528 706528 0 0.0
RAM 106912 106912 0 0.0
lighting-app rtl8777g FLASH 757592 757592 0 0.0
RAM 127244 127244 0 0.0
stm32 light STM32WB5MM-DK FLASH 469972 469972 0 0.0
RAM 141312 141312 0 0.0

@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 3, 2025

PR #41739: Size comparison from 5d26b5d to c01e80a

Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section 5d26b5d c01e80a change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1106156 1106156 0 0.0
RAM 178882 178882 0 0.0
bl702 lighting-app bl702+eth FLASH 661308 661308 0 0.0
RAM 134969 134969 0 0.0
bl702+wifi FLASH 836844 836844 0 0.0
RAM 124405 124405 0 0.0
bl706+mfd+rpc+littlefs FLASH 1070388 1070388 0 0.0
RAM 117277 117277 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 899804 899804 0 0.0
RAM 105540 105540 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 983150 983150 0 0.0
RAM 109756 109756 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 770516 770516 0 0.0
RAM 103304 103304 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 782264 782264 0 0.0
RAM 108472 108472 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 728308 728308 0 0.0
RAM 97364 97364 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 712784 712784 0 0.0
RAM 97580 97580 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 554562 554562 0 0.0
RAM 205744 205744 0 0.0
lock CC3235SF_LAUNCHXL FLASH 587346 587346 0 0.0
RAM 205840 205840 0 0.0
efr32 lock-app BRD4187C FLASH 963104 963104 0 0.0
RAM 123512 123512 0 0.0
BRD4338a FLASH 757224 757224 0 0.0
RAM 254144 254144 0 0.0
window-app BRD4187C FLASH 1058276 1058276 0 0.0
RAM 119740 119740 0 0.0
esp32 all-clusters-app c3devkit DRAM 102524 102524 0 0.0
FLASH 1836510 1836510 0 0.0
IRAM 93540 93540 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 933176 933176 0 0.0
RAM 161317 161317 0 0.0
nxp contact mcxw71+release FLASH 691952 691952 0 0.0
RAM 61496 61496 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1677540 1677540 0 0.0
RAM 213908 213908 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1593932 1593948 16 0.0
RAM 211116 211116 0 0.0
light cy8ckit_062s2_43012 FLASH 1460172 1460172 0 0.0
RAM 197736 197736 0 0.0
lock cy8ckit_062s2_43012 FLASH 1492724 1492724 0 0.0
RAM 225448 225448 0 0.0
qpg lighting-app qpg6200+debug FLASH 837296 837296 0 0.0
RAM 127716 127716 0 0.0
lock-app qpg6200+debug FLASH 774108 774108 0 0.0
RAM 118692 118692 0 0.0
realtek light-switch-app rtl8777g FLASH 706528 706528 0 0.0
RAM 106912 106912 0 0.0
lighting-app rtl8777g FLASH 757592 757592 0 0.0
RAM 127244 127244 0 0.0
stm32 light STM32WB5MM-DK FLASH 469972 469972 0 0.0
RAM 141312 141312 0 0.0
telink bridge-app tl7218x FLASH 710514 710514 0 0.0
RAM 90544 90544 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 796990 796990 0 0.0
RAM 41008 41008 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 788190 788190 0 0.0
RAM 93644 93644 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 715110 715110 0 0.0
RAM 51852 51852 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 748406 748406 0 0.0
RAM 70892 70892 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 725262 725262 0 0.0
RAM 34600 34600 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 602622 602622 0 0.0
RAM 108912 108912 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 820794 820798 4 0.0
RAM 92040 92040 0 0.0

@github-actions
Copy link
Copy Markdown

github-actions bot commented Nov 4, 2025

PR #41739: Size comparison from cfc90c8 to 88f9f42

Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section cfc90c8 88f9f42 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1106156 1106156 0 0.0
RAM 178882 178882 0 0.0
bl702 lighting-app bl702+eth FLASH 661308 661308 0 0.0
RAM 134969 134969 0 0.0
bl702+wifi FLASH 836844 836844 0 0.0
RAM 124405 124405 0 0.0
bl706+mfd+rpc+littlefs FLASH 1070388 1070388 0 0.0
RAM 117277 117277 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 899804 899836 32 0.0
RAM 105540 105540 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 983150 983150 0 0.0
RAM 109756 109756 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 770516 770516 0 0.0
RAM 103304 103304 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 782264 782360 96 0.0
RAM 108472 108472 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 728308 728308 0 0.0
RAM 97364 97364 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 712784 712784 0 0.0
RAM 97580 97580 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 554562 554826 264 0.0
RAM 205744 205744 0 0.0
lock CC3235SF_LAUNCHXL FLASH 587346 587706 360 0.1
RAM 205840 205840 0 0.0
efr32 lock-app BRD4187C FLASH 963104 963200 96 0.0
RAM 123512 123512 0 0.0
BRD4338a FLASH 757224 757384 160 0.0
RAM 254144 254152 8 0.0
window-app BRD4187C FLASH 1058276 1058436 160 0.0
RAM 119740 119740 0 0.0
esp32 all-clusters-app c3devkit DRAM 102524 102524 0 0.0
FLASH 1836510 1836510 0 0.0
IRAM 93540 93540 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 933176 933176 0 0.0
RAM 161317 161317 0 0.0
nxp contact mcxw71+release FLASH 691952 692104 152 0.0
RAM 61496 61496 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1677540 1677748 208 0.0
RAM 213908 213908 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1593932 1594140 208 0.0
RAM 211116 211116 0 0.0
light cy8ckit_062s2_43012 FLASH 1460172 1460380 208 0.0
RAM 197736 197736 0 0.0
lock cy8ckit_062s2_43012 FLASH 1492724 1493060 336 0.0
RAM 225448 225448 0 0.0
qpg lighting-app qpg6200+debug FLASH 837400 837480 80 0.0
RAM 127716 127716 0 0.0
lock-app qpg6200+debug FLASH 774212 774324 112 0.0
RAM 118692 118692 0 0.0
realtek light-switch-app rtl8777g FLASH 706528 706632 104 0.0
RAM 106912 106912 0 0.0
lighting-app rtl8777g FLASH 757592 757592 0 0.0
RAM 127244 127244 0 0.0
stm32 light STM32WB5MM-DK FLASH 469972 469972 0 0.0
RAM 141312 141312 0 0.0
telink bridge-app tl7218x FLASH 710514 710514 0 0.0
RAM 90544 90544 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 796990 796990 0 0.0
RAM 41008 41008 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 788190 788190 0 0.0
RAM 93644 93644 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 715110 715192 82 0.0
RAM 51852 51852 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 748406 748488 82 0.0
RAM 70892 70900 8 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 725262 725344 82 0.0
RAM 34600 34600 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 602622 602622 0 0.0
RAM 108912 108912 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 820794 820798 4 0.0
RAM 92040 92040 0 0.0

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Nov 25, 2025

CLA assistant check
All committers have signed the CLA.

…driven_thermostat

# Conflicts:
#	examples/all-clusters-app/linux/main-common.cpp
@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 8, 2025

PR #41739: Size comparison from efdf99d to 19a5426

Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section efdf99d 19a5426 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1105860 1105860 0 0.0
RAM 178954 178954 0 0.0
bl702 lighting-app bl702+eth FLASH 660680 660680 0 0.0
RAM 135025 135025 0 0.0
bl702+wifi FLASH 836530 836530 0 0.0
RAM 124485 124485 0 0.0
bl706+mfd+rpc+littlefs FLASH 1070174 1070174 0 0.0
RAM 117341 117341 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 902384 902384 0 0.0
RAM 105932 105932 0 0.0
lighting-app bl702l+mfd+littlefs FLASH 982920 982920 0 0.0
RAM 109844 109844 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 770776 770776 0 0.0
RAM 103392 103392 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 783588 783588 0 0.0
RAM 108712 108712 0 0.0
pump-app LP_EM_CC1354P10_6 FLASH 728616 728616 0 0.0
RAM 97452 97452 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 713064 713064 0 0.0
RAM 97660 97660 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 554588 554588 0 0.0
RAM 205472 205472 0 0.0
lock CC3235SF_LAUNCHXL FLASH 588528 588528 0 0.0
RAM 205720 205720 0 0.0
efr32 lock-app BRD4187C FLASH 964748 964748 0 0.0
RAM 123776 123776 0 0.0
BRD4338a FLASH 759072 759072 0 0.0
RAM 254388 254388 0 0.0
window-app BRD4187C FLASH 1059888 1059888 0 0.0
RAM 120004 120004 0 0.0
esp32 all-clusters-app c3devkit DRAM 102812 102812 0 0.0
FLASH 1830854 1830854 0 0.0
IRAM 93540 93540 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 936264 936264 0 0.0
RAM 161724 161724 0 0.0
nxp contact mcxw71+release FLASH 695104 695104 0 0.0
RAM 61744 61744 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1680956 1680956 0 0.0
RAM 214188 214188 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1595436 1595452 16 0.0
RAM 211364 211364 0 0.0
light cy8ckit_062s2_43012 FLASH 1460060 1460060 0 0.0
RAM 197800 197800 0 0.0
lock cy8ckit_062s2_43012 FLASH 1494004 1494004 0 0.0
RAM 225672 225672 0 0.0
qpg lighting-app qpg6200+debug FLASH 838248 838248 0 0.0
RAM 127984 127984 0 0.0
lock-app qpg6200+debug FLASH 775984 775984 0 0.0
RAM 118920 118920 0 0.0
realtek light-switch-app rtl8777g FLASH 708688 708688 0 0.0
RAM 107188 107188 0 0.0
lighting-app rtl8777g FLASH 757392 757392 0 0.0
RAM 127320 127320 0 0.0
stm32 light STM32WB5MM-DK FLASH 470244 470244 0 0.0
RAM 141392 141392 0 0.0
telink bridge-app tl7218x FLASH 703898 703898 0 0.0
RAM 90760 90760 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 790246 790246 0 0.0
RAM 41176 41176 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 781558 781558 0 0.0
RAM 93860 93860 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 710042 710042 0 0.0
RAM 52232 52232 0 0.0
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 745874 745874 0 0.0
RAM 71256 71256 0 0.0
light-switch-app-ota-factory-data tl3218x_retention FLASH 720554 720554 0 0.0
RAM 34956 34956 0 0.0
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 602362 602362 0 0.0
RAM 117736 117736 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 815066 815070 4 0.0
RAM 92248 92248 0 0.0

@hasty hasty marked this pull request as ready for review December 8, 2025 23:10
Copilot AI review requested due to automatic review settings December 8, 2025 23:10
@hasty hasty changed the title [Draft] Rename thermostat-server to ThermostatCluster [HVAC] Rename thermostat-server to ThermostatCluster Dec 8, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This draft PR renames the thermostat-server cluster implementation to follow the code-driven cluster naming template (ThermostatCluster pattern), similar to other modernized clusters. The PR also changes the default MinSetpointDeadBand value from 25 (2.5°C) to 20 (2.0°C) across all configuration files and updates the corresponding test suite to restore this value after testing.

Key Changes

  • Renamed thermostat-server files to ThermostatCluster naming pattern (e.g., thermostat-server.cppThermostatCluster.cpp, thermostat-delegate.hThermostatDelegate.h)
  • Updated MinSetpointDeadBand default from 0x19 (25, representing 2.5°C) to 0x14 (20, representing 2.0°C) in server code and all configuration files
  • Enhanced test suite TC_TSTAT_2_2.py to properly restore the MinSetpointDeadBand attribute after testing

Reviewed changes

Copilot reviewed 27 out of 28 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/app/clusters/thermostat-server/app_config_dependent_sources.gni Updates build file list with renamed source files; missing ThermostatSuggestionStructWithOwnedMembers files
src/app/clusters/thermostat-server/app_config_dependent_sources.cmake Updates CMake build file list with renamed source files; inconsistent ordering with .gni file
src/app/clusters/thermostat-server/ThermostatDelegate.h Newly added file (renamed from thermostat-delegate.h)
src/app/clusters/thermostat-server/ThermostatClusterSuggestions.cpp Updates include paths to use renamed header files
src/app/clusters/thermostat-server/ThermostatClusterPresets.h Updates include path for ThermostatDelegate.h
src/app/clusters/thermostat-server/ThermostatClusterPresets.cpp Updates include paths to use renamed header files
src/app/clusters/thermostat-server/ThermostatClusterAtomic.cpp Updates include path for ThermostatCluster.h
src/app/clusters/thermostat-server/ThermostatCluster.h Updates include path for ThermostatDelegate.h
src/app/clusters/thermostat-server/ThermostatCluster.cpp Updates include path and changes kDefaultDeadBand from 25 to 20
src/python_testing/TC_TSTAT_2_2.py Updates MinSetpointDeadBandValue constant and adds restoration logic after testing
scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h Updates MinSetpointDeadBand default value from 0x19 to 0x14
scripts/tools/zap/tests/inputs/all-clusters-app.zap Updates MinSetpointDeadBand defaultValue from 0x19 to 0x14
scripts/py_matter_idl/matter/idl/tests/inputs/large_all_clusters_app.matter Updates MinSetpointDeadBand default and removes trailing blank lines
examples/thermostat/thermostat-common/thermostat.zap Updates MinSetpointDeadBand defaultValue from 0x19 to 0x14
examples/thermostat/thermostat-common/thermostat.matter Updates MinSetpointDeadBand default from 0x19 to 0x14
examples/thermostat/thermostat-common/include/thermostat-delegate-impl.h Updates include path for ThermostatDelegate.h
examples/thermostat/qpg/zap/thermostaticRadiatorValve.zap Updates MinSetpointDeadBand defaultValue from 0x19 to 0x14
examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter Updates MinSetpointDeadBand default from 0x19 to 0x14
examples/thermostat/linux/main.cpp Updates include path for ThermostatCluster.h
examples/placeholder/linux/apps/app2/config.zap Updates MinSetpointDeadBand defaultValue from 0x19 to 0x14
examples/placeholder/linux/apps/app2/config.matter Updates MinSetpointDeadBand default from 0x19 to 0x14
examples/placeholder/linux/apps/app1/config.zap Updates MinSetpointDeadBand defaultValue from 0x19 to 0x14
examples/placeholder/linux/apps/app1/config.matter Updates MinSetpointDeadBand default from 0x19 to 0x14
examples/all-clusters-app/realtek/data_model/all-clusters-app.zap Updates MinSetpointDeadBand defaultValue from 0x19 to 0x14
examples/all-clusters-app/realtek/data_model/all-clusters-app.matter Updates MinSetpointDeadBand default from 0x19 to 0x14
examples/all-clusters-app/linux/main-common.cpp Updates include path for ThermostatCluster.h
examples/all-clusters-app/all-clusters-common/all-clusters-app.zap Updates MinSetpointDeadBand defaultValue from 0x19 to 0x14
examples/all-clusters-app/all-clusters-common/all-clusters-app.matter Updates MinSetpointDeadBand default from 0x19 to 0x14

"ThermostatClusterPresets.cpp",
"ThermostatClusterPresets.h",
"ThermostatClusterSuggestions.cpp",
"ThermostatDelegate.h",
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file ordering is inconsistent between app_config_dependent_sources.gni and app_config_dependent_sources.cmake. The .gni file is missing ThermostatSuggestionStructWithOwnedMembers.cpp and ThermostatSuggestionStructWithOwnedMembers.h which are present in the .cmake file (lines 28-29).

Both build configuration files should include the same source files. Add these two files to the .gni file to maintain consistency.

Suggested change
"ThermostatDelegate.h",
"ThermostatDelegate.h",
"ThermostatSuggestionStructWithOwnedMembers.cpp",
"ThermostatSuggestionStructWithOwnedMembers.h",

Copilot uses AI. Check for mistakes.
Comment on lines 14 to 24
app_config_dependent_sources = [
"PresetStructWithOwnedMembers.cpp",
"PresetStructWithOwnedMembers.h",
"thermostat-delegate.h",
"thermostat-server-atomic.cpp",
"thermostat-server-presets.cpp",
"thermostat-server-presets.h",
"thermostat-server-suggestions.cpp",
"thermostat-server.cpp",
"thermostat-server.h",
"ThermostatCluster.cpp",
"ThermostatCluster.h",
"ThermostatClusterAtomic.cpp",
"ThermostatClusterPresets.cpp",
"ThermostatClusterPresets.h",
"ThermostatClusterSuggestions.cpp",
"ThermostatDelegate.h",
]
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file ordering differs between app_config_dependent_sources.gni and app_config_dependent_sources.cmake. While both should include the same files, they should also maintain a consistent order for better maintainability.

In the .gni file:

  • ThermostatCluster.cpp/h come first (lines 17-18)
  • ThermostatDelegate.h comes last (line 23)

In the .cmake file:

  • ThermostatDelegate.h comes first (line 21)
  • ThermostatCluster.cpp/h come last (lines 26-27)

Consider adopting a consistent alphabetical ordering or logical grouping (e.g., main cluster files first, then auxiliary files, then delegate interfaces) across both build systems.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants