Skip to content

Commit 5a6aa87

Browse files
hastynivi-applerestyled-commitsbzbarsky-appletehampson
authored andcommitted
[HVAC] Use atomic writes with Presets (#34570)
* Add support for Presets attributes and commands to the Thermostat cluster Clean up the Thermostat cluster and remove the TemperatureSetpointHoldPolicy attribute and SetTemperatureSetpointHoldPolicy command * Restyled by whitespace * Restyled by clang-format * Restyled by gn. * Fix build error for Linux configure build of all-clusters-app * Fix Darwin CI issues Editorial fixes * Restyled by clang-format * More fixes * Restyled by clang-format * BUILD.gn fixes for CI * Apply suggestions from code review Co-authored-by: Boris Zbarsky <bzbarsky@apple.com> * Address review comments. * Restyled by clang-format * Regenerate Thermostat XML from spec * Move atomic enum to global-enums.xml, actually # Conflicts: # src/app/zap-templates/zcl/data-model/chip/global-structs.xml * Regenerate XML and convert thermostat-server to atomic writes * Pull in ACCapacityFormat typo un-fix * Update Test_TC_TSTAT_1_1 to know about AtomicResponse command. * Restyled patch * Fix weird merge with upstream * Fix emberAfIsTypeSigned not understanding temperature type * Merge fixes from atomic write branch * Relocate thermostat-manager sample code to all-clusters-common * Fix g++ build error on linux * Fix C formatter for long int, cast whole expression * Sync cast fix with master * Add thermostat-common dependency to thermostat app under linux * Remove MatterPostAttributeChangeCallback from thermostat-manager, as it conflicts with other implementations * Convert Atomic enums and structs to global * Restyled patch * Apply suggestions from code review Co-authored-by: Boris Zbarsky <bzbarsky@apple.com> * Regen with alchemy 0.6.1 * Updates based on comments * Add TC_MCORE_FS_1_3.py test implementation (#34650) * Fix most TC-SWTCH-2.4 remaining issues (#34677) - Move 2.4 in a better place in the file - Add test steps properly - Allow default button press position override Issue #34656 Testing done: - Test still passes on DUT with automation * Initial test script for Fabric Sync TC_MCORE_FS_1_2 (#34675) * Initial test script for Fabric Sync TC_MCORE_FS_1_2 * Apply suggestions from code review Co-authored-by: C Freeman <cecille@google.com> * Address Review Comments * Address review comments * Fix default timeout after other timeouts changed * Restyled by autopep8 * Fix linter error --------- Co-authored-by: C Freeman <cecille@google.com> Co-authored-by: Restyled.io <commits@restyled.io> * Test automation for FabricSync ICD BridgedDeviceBasicInfoCluster (#34628) * WIP Bridged ICD, commissioning to both fabrics * wip testing sending KeepActive * wip most steps implemented * using SIGSTOP and SIGCONT to control ICD server pausing * Update src/python_testing/TC_BRBINFO_4_1.py Co-authored-by: Terence Hampson <thampson@google.com> * comments addressed * more comments addressed * lint pass * Update src/python_testing/TC_BRBINFO_4_1.py Co-authored-by: C Freeman <cecille@google.com> * comments addressed, incl TH_SERVER configurable * added setupQRCode and setupManualCode as options for DUT commissioning * Restyled by autopep8 * Restyled by isort * Update src/python_testing/TC_BRBINFO_4_1.py Co-authored-by: Terence Hampson <thampson@google.com> * Update src/python_testing/TC_BRBINFO_4_1.py Co-authored-by: Terence Hampson <thampson@google.com> * Update src/python_testing/TC_BRBINFO_4_1.py Co-authored-by: Terence Hampson <thampson@google.com> * comments addressed * Restyled by autopep8 --------- Co-authored-by: Terence Hampson <thampson@google.com> Co-authored-by: C Freeman <cecille@google.com> Co-authored-by: Restyled.io <commits@restyled.io> * ServiceArea test scripts (#34548) * initial commit * fix bugs * fix issues reported by the linter * fix bug in checking for unique areaDesc * add TC 1.5 * Update src/python_testing/TC_SEAR_1_2.py Co-authored-by: William <hicklin@users.noreply.github.com> * Update src/python_testing/TC_SEAR_1_2.py Co-authored-by: William <hicklin@users.noreply.github.com> * address code review comments * fix issue introduced by the previous commit * address code review feedback * Update src/python_testing/TC_SEAR_1_2.py Co-authored-by: Kiel Oleson <kielo@apple.com> * address code review feedback * remove PICS checked by the TC_SEAR_1.6 * more code review updates * Restyled by autopep8 --------- Co-authored-by: William <hicklin@users.noreply.github.com> Co-authored-by: Kiel Oleson <kielo@apple.com> Co-authored-by: Restyled.io <commits@restyled.io> * Remove manual tests for Thermostat presets (#34679) * Dump details about leaked ExchangeContexts before aborting (#34617) * Dump details about leaked ExchangeContexts before aborting This is implemented via a VerifyOrDieWithObject() variant of the existing VerifyOrDie() macro that calls a DumpToLog() method on the provided object if it exists (otherwise this is simply a no-op). If CHIP_CONFIG_VERBOSE_VERIFY_OR_DIE is not enabled, VerifyOrDieWithObject() simply behaves like a plain VerifyOrDie(). DumpToLog() implementations can use ChipLogFormatRtti to log type information about an object (usually a delegate); if RTTI is disabled this simply outputs whether the object was null or not. * Address review comments * Make gcc happy and improve documentation * Remove unused include * Fix compile error without CHIP_CONFIG_VERBOSE_VERIFY_OR_DIE * Avoid unused parameter warning * [TI] CC13x4_26x4 build fixes (#34682) * lwip pbuf, map file, and hex creation when OTA is disabled * added cc13x4 family define around the non OTA hex creation * whitespace fix * reversed custom factoy data flash with cc13x4 check * more whitespace fixes * [ICD] Add missing polling function to NoWifi connectivity manager (#34684) * Add missing polling function to NoWifi connectivity manager * Update GenericConnectivityManagerImpl_NoWiFi.h Co-authored-by: Boris Zbarsky <bzbarsky@apple.com> --------- Co-authored-by: Boris Zbarsky <bzbarsky@apple.com> * [OPSTATE] Add Q test script for CountdownTime (#34632) * Add Q test * Added test to test set * Remove unused var * Restyled by autopep8 * Restyled by isort * Fix name * Use pics over other method * Removed unused stuff * Added pipe commands * Fix reset * Get example to report appropriate changes. * WiP * Added some comments * Changes to make things work * Removed dev msgs * Missed some * Removed dev msgs * Straggler * Restyled by clang-format * Restyled by autopep8 * Restyled by isort * Commented unused var * Update examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp * Fix bug --------- Co-authored-by: Restyled.io <commits@restyled.io> * YAML update to BRBINFO, ProductId (#34513) * Bridged Device Information Cluster, Attribute ProductID test reflects marking as O, not X * Update src/app/tests/suites/certification/Test_TC_BRBINFO_2_1.yaml Co-authored-by: Terence Hampson <thampson@google.com> * corrected pics * corrected pics * WIP Bridged ICD, commissioning to both fabrics * wip testing sending KeepActive * update to bridged-device-basic-information.xml and zap generated files * removed unrelated file --------- Co-authored-by: Terence Hampson <thampson@google.com> Co-authored-by: Andrei Litvin <andy314@gmail.com> * Fix simplified Linux tv-casting-app gn build error. (#34692) * adding parallel execution to restyle-diff (#34663) * adding parallel execution to restyle-diff * using xargs to call restyle-paths * fixing Copyright year * restyle the restyler * Add some bits to exercise global structs/enums to Unit Testing cluster. (#34540) * Adds things to the Unit Testing cluster XML. * This requires those things to be enabled in all-clusters-app, all-clusters-minimal-app, and one of the chef contact sensors to pass CI. * That requires an implementation in test-cluster-server * At which point might as well add a YAML test to exercise it all. * [Silabs] Port platform specific Multi-Chip OTA work (#34440) * Pull request #1836: Cherry multi ota Merge in WMN_TOOLS/matter from cherry-multi-ota to silabs_slc_1.3 Squashed commit of the following: commit 4320bb46571658bc44fb82345348265def394991 Author: Michael Rupp <michael.rupp@silabs.com> Date: Fri May 10 14:26:07 2024 -0400 remove some unwanted diffs in provision files commit be160931dc600de7e7ead378b70d6a43c3945e46 Author: Michael Rupp <michael.rupp@silabs.com> Date: Fri May 10 14:24:25 2024 -0400 revert changes to generator.project.mak commit 14b6605887166e6d5284a61feb2bf407d850bdcf Author: Michael Rupp <michael.rupp@silabs.com> Date: Fri May 10 13:06:12 2024 -0400 revert NVM key changes and script changes ... and 8 more commits * Restyled by whitespace * Restyled by clang-format * Restyled by gn * Restyled by autopep8 * remove unused libs caught by linter * update doctree with new readmes * rerun CI, cirque failing for unknown reasons * fix include guards in provision examples * Restyled by clang-format --------- Co-authored-by: Restyled.io <commits@restyled.io> * Add python tests for Thermostat presets feature (#34693) * Add python tests for Thermostat presets feature * Restyled by autopep8 * Restyled by isort * Update the PICS code for presets attribute --------- Co-authored-by: Restyled.io <commits@restyled.io> * removing unneccessary git fetch (#34698) * Restyle patch * Regen to fix ordering of global structs * Apply suggestions from code review Co-authored-by: Boris Zbarsky <bzbarsky@apple.com> * Return correct AtomicResponse when committing or rolling back * Patch tests for atomic write of presets * Fix tests to work with the new setup. Specific changes: * Enable SetActivePresetRequest command in all-clusters-app. * Fix assignment of a PresetStructWithOwnedMembers to another PresetStructWithOwnedMembers to actually work correctly. * Move constraint checks that happen on write from commit to write. * Fix sending of atomic responses to not have use-stack-after-return. * Fix PICS for the tests involved. * Fix PICS values for atomic requests * Remove PresetsSchedulesEditable and QueuedPreset from various places * Restyled patch * Restyled patch, again * Remove PICS value for PresetsSchedulesEditable * clang-tidy fixes * clang-tidy fixes --------- Co-authored-by: Nivedita Sarkar <nivedita_sarkar@apple.com> Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: Nivi Sarkar <55898241+nivi-apple@users.noreply.github.com> Co-authored-by: Boris Zbarsky <bzbarsky@apple.com> Co-authored-by: Terence Hampson <thampson@google.com> Co-authored-by: Tennessee Carmel-Veilleux <tennessee.carmelveilleux@gmail.com> Co-authored-by: Chris Letnick <cletnick@google.com> Co-authored-by: C Freeman <cecille@google.com> Co-authored-by: Douglas Rocha Ferraz <rochaferraz@google.com> Co-authored-by: Petru Lauric <81822411+plauric@users.noreply.github.com> Co-authored-by: William <hicklin@users.noreply.github.com> Co-authored-by: Kiel Oleson <kielo@apple.com> Co-authored-by: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> Co-authored-by: Anu Biradar <104591549+abiradarti@users.noreply.github.com> Co-authored-by: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Co-authored-by: Rob Bultman <rob.Bultman@gmail.com> Co-authored-by: Andrei Litvin <andy314@gmail.com> Co-authored-by: Shao Ling Tan <161761051+shaoltan-amazon@users.noreply.github.com> Co-authored-by: Amine Alami <43780877+Alami-Amine@users.noreply.github.com> Co-authored-by: Michael Rupp <95718139+mykrupp@users.noreply.github.com>
1 parent 9f525bd commit 5a6aa87

File tree

162 files changed

+3646
-2641
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+3646
-2641
lines changed

.github/workflows/tests.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ jobs:
9191
--no-print \
9292
--log-level info \
9393
src/app/zap-templates/zcl/data-model/chip/global-attributes.xml \
94+
src/app/zap-templates/zcl/data-model/chip/global-bitmaps.xml \
95+
src/app/zap-templates/zcl/data-model/chip/global-enums.xml \
9496
src/app/zap-templates/zcl/data-model/chip/global-structs.xml \
9597
src/app/zap-templates/zcl/data-model/chip/semantic-tag-namespace-enums.xml \
9698
src/app/zap-templates/zcl/data-model/chip/access-control-definitions.xml \

.vscode/settings.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@
134134
"thread": "cpp",
135135
"variant": "cpp",
136136
"any": "cpp",
137-
"future": "cpp"
137+
"future": "cpp",
138+
"list": "cpp",
139+
"unordered_set": "cpp"
138140
},
139141
// Configure paths or glob patterns to exclude from file watching.
140142
"files.watcherExclude": {

examples/air-purifier-app/air-purifier-common/air-purifier-app.matter

+46-30
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ enum AreaTypeTag : enum8 {
9999
kWorkshop = 94;
100100
}
101101

102+
enum AtomicRequestTypeEnum : enum8 {
103+
kBeginWrite = 0;
104+
kCommitWrite = 1;
105+
kRollbackWrite = 2;
106+
}
107+
102108
enum FloorSurfaceTag : enum8 {
103109
kCarpet = 0;
104110
kCeramic = 1;
@@ -220,6 +226,11 @@ struct LocationDescriptorStruct {
220226
nullable AreaTypeTag areaType = 2;
221227
}
222228

229+
struct AtomicAttributeStatusStruct {
230+
attrib_id attributeID = 0;
231+
status statusCode = 1;
232+
}
233+
223234
/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */
224235
cluster Identify = 3 {
225236
revision 4;
@@ -1520,7 +1531,7 @@ cluster ActivatedCarbonFilterMonitoring = 114 {
15201531

15211532
/** An interface for configuring and controlling the functionality of a thermostat. */
15221533
cluster Thermostat = 513 {
1523-
revision 6;
1534+
revision 7;
15241535

15251536
enum ACCapacityFormatEnum : enum8 {
15261537
kBTUh = 0;
@@ -1566,7 +1577,6 @@ cluster Thermostat = 513 {
15661577
}
15671578

15681579
enum PresetScenarioEnum : enum8 {
1569-
kUnspecified = 0;
15701580
kOccupied = 1;
15711581
kUnoccupied = 2;
15721582
kSleep = 3;
@@ -1639,7 +1649,6 @@ cluster Thermostat = 513 {
16391649
kLocalTemperatureNotExposed = 0x40;
16401650
kMatterScheduleConfiguration = 0x80;
16411651
kPresets = 0x100;
1642-
kSetpoints = 0x200;
16431652
}
16441653

16451654
bitmap HVACSystemTypeBitmap : bitmap8 {
@@ -1649,6 +1658,10 @@ cluster Thermostat = 513 {
16491658
kHeatingUsesFuel = 0x20;
16501659
}
16511660

1661+
bitmap OccupancyBitmap : bitmap8 {
1662+
kOccupied = 0x1;
1663+
}
1664+
16521665
bitmap PresetTypeFeaturesBitmap : bitmap16 {
16531666
kAutomatic = 0x1;
16541667
kSupportsNames = 0x2;
@@ -1714,7 +1727,7 @@ cluster Thermostat = 513 {
17141727
optional char_string<64> name = 2;
17151728
optional octet_string<16> presetHandle = 3;
17161729
ScheduleTransitionStruct transitions[] = 4;
1717-
optional nullable boolean builtIn = 5;
1730+
nullable boolean builtIn = 5;
17181731
}
17191732

17201733
struct PresetStruct {
@@ -1746,23 +1759,23 @@ cluster Thermostat = 513 {
17461759

17471760
readonly attribute nullable temperature localTemperature = 0;
17481761
readonly attribute optional nullable temperature outdoorTemperature = 1;
1749-
readonly attribute optional bitmap8 occupancy = 2;
1762+
readonly attribute optional OccupancyBitmap occupancy = 2;
17501763
readonly attribute optional temperature absMinHeatSetpointLimit = 3;
17511764
readonly attribute optional temperature absMaxHeatSetpointLimit = 4;
17521765
readonly attribute optional temperature absMinCoolSetpointLimit = 5;
17531766
readonly attribute optional temperature absMaxCoolSetpointLimit = 6;
17541767
readonly attribute optional int8u PICoolingDemand = 7;
17551768
readonly attribute optional int8u PIHeatingDemand = 8;
1756-
attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9;
1769+
attribute access(write: manage) optional HVACSystemTypeBitmap HVACSystemTypeConfiguration = 9;
17571770
attribute access(write: manage) optional int8s localTemperatureCalibration = 16;
1758-
attribute optional int16s occupiedCoolingSetpoint = 17;
1759-
attribute optional int16s occupiedHeatingSetpoint = 18;
1760-
attribute optional int16s unoccupiedCoolingSetpoint = 19;
1761-
attribute optional int16s unoccupiedHeatingSetpoint = 20;
1762-
attribute access(write: manage) optional int16s minHeatSetpointLimit = 21;
1763-
attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22;
1764-
attribute access(write: manage) optional int16s minCoolSetpointLimit = 23;
1765-
attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24;
1771+
attribute optional temperature occupiedCoolingSetpoint = 17;
1772+
attribute optional temperature occupiedHeatingSetpoint = 18;
1773+
attribute optional temperature unoccupiedCoolingSetpoint = 19;
1774+
attribute optional temperature unoccupiedHeatingSetpoint = 20;
1775+
attribute access(write: manage) optional temperature minHeatSetpointLimit = 21;
1776+
attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22;
1777+
attribute access(write: manage) optional temperature minCoolSetpointLimit = 23;
1778+
attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24;
17661779
attribute access(write: manage) optional int8s minSetpointDeadBand = 25;
17671780
attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26;
17681781
attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27;
@@ -1803,8 +1816,7 @@ cluster Thermostat = 513 {
18031816
readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79;
18041817
attribute access(write: manage) optional PresetStruct presets[] = 80;
18051818
attribute access(write: manage) optional ScheduleStruct schedules[] = 81;
1806-
readonly attribute optional boolean presetsSchedulesEditable = 82;
1807-
readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 83;
1819+
readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 82;
18081820
readonly attribute command_id generatedCommandList[] = 65528;
18091821
readonly attribute command_id acceptedCommandList[] = 65529;
18101822
readonly attribute event_id eventList[] = 65530;
@@ -1844,28 +1856,32 @@ cluster Thermostat = 513 {
18441856
octet_string<16> presetHandle = 0;
18451857
}
18461858

1847-
request struct StartPresetsSchedulesEditRequestRequest {
1848-
int16u timeoutSeconds = 0;
1859+
response struct AtomicResponse = 253 {
1860+
status statusCode = 0;
1861+
AtomicAttributeStatusStruct attributeStatus[] = 1;
1862+
optional int16u timeout = 2;
1863+
}
1864+
1865+
request struct AtomicRequestRequest {
1866+
AtomicRequestTypeEnum requestType = 0;
1867+
attrib_id attributeRequests[] = 1;
1868+
optional int16u timeout = 2;
18491869
}
18501870

1851-
/** Command description for SetpointRaiseLower */
1871+
/** Upon receipt, the attributes for the indicated setpoint(s) SHALL have the amount specified in the Amount field added to them. */
18521872
command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0;
1853-
/** Command description for SetWeeklySchedule */
1873+
/** This command is used to update the thermostat weekly setpoint schedule from a management system. */
18541874
command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1;
1855-
/** Command description for GetWeeklySchedule */
1875+
/** The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. */
18561876
command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2;
1857-
/** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */
1877+
/** This command is used to clear the weekly schedule. */
18581878
command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3;
1859-
/** This command is used to set the active schedule. */
1879+
/** Upon receipt, if the Schedules attribute contains a ScheduleStruct whose ScheduleHandle field matches the value of the ScheduleHandle field, the server SHALL set the thermostat's ActiveScheduleHandle attribute to the value of the ScheduleHandle field. */
18601880
command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5;
1861-
/** This command is used to set the active preset. */
1881+
/** ID */
18621882
command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6;
1863-
/** This command is used to start editing the presets and schedules. */
1864-
command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7;
1865-
/** This command is used to cancel editing presets and schedules. */
1866-
command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8;
1867-
/** This command is used to notify the server that all edits are done and should be committed. */
1868-
command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9;
1883+
/** Begins, Commits or Cancels an atomic write */
1884+
command access(invoke: manage) AtomicRequest(AtomicRequestRequest): AtomicResponse = 254;
18691885
}
18701886

18711887
/** An interface for controlling a fan in a heating/cooling system. */

examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter

+11
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ enum AreaTypeTag : enum8 {
9999
kWorkshop = 94;
100100
}
101101

102+
enum AtomicRequestTypeEnum : enum8 {
103+
kBeginWrite = 0;
104+
kCommitWrite = 1;
105+
kRollbackWrite = 2;
106+
}
107+
102108
enum FloorSurfaceTag : enum8 {
103109
kCarpet = 0;
104110
kCeramic = 1;
@@ -220,6 +226,11 @@ struct LocationDescriptorStruct {
220226
nullable AreaTypeTag areaType = 2;
221227
}
222228

229+
struct AtomicAttributeStatusStruct {
230+
attrib_id attributeID = 0;
231+
status statusCode = 1;
232+
}
233+
223234
/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */
224235
cluster Identify = 3 {
225236
revision 4;

examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

+55-34
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ enum AreaTypeTag : enum8 {
9999
kWorkshop = 94;
100100
}
101101

102+
enum AtomicRequestTypeEnum : enum8 {
103+
kBeginWrite = 0;
104+
kCommitWrite = 1;
105+
kRollbackWrite = 2;
106+
}
107+
102108
enum FloorSurfaceTag : enum8 {
103109
kCarpet = 0;
104110
kCeramic = 1;
@@ -220,6 +226,11 @@ struct LocationDescriptorStruct {
220226
nullable AreaTypeTag areaType = 2;
221227
}
222228

229+
struct AtomicAttributeStatusStruct {
230+
attrib_id attributeID = 0;
231+
status statusCode = 1;
232+
}
233+
223234
/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */
224235
cluster Identify = 3 {
225236
revision 4;
@@ -5357,7 +5368,7 @@ cluster PumpConfigurationAndControl = 512 {
53575368

53585369
/** An interface for configuring and controlling the functionality of a thermostat. */
53595370
cluster Thermostat = 513 {
5360-
revision 6;
5371+
revision 7;
53615372

53625373
enum ACCapacityFormatEnum : enum8 {
53635374
kBTUh = 0;
@@ -5403,7 +5414,6 @@ cluster Thermostat = 513 {
54035414
}
54045415

54055416
enum PresetScenarioEnum : enum8 {
5406-
kUnspecified = 0;
54075417
kOccupied = 1;
54085418
kUnoccupied = 2;
54095419
kSleep = 3;
@@ -5476,7 +5486,6 @@ cluster Thermostat = 513 {
54765486
kLocalTemperatureNotExposed = 0x40;
54775487
kMatterScheduleConfiguration = 0x80;
54785488
kPresets = 0x100;
5479-
kSetpoints = 0x200;
54805489
}
54815490

54825491
bitmap HVACSystemTypeBitmap : bitmap8 {
@@ -5486,6 +5495,10 @@ cluster Thermostat = 513 {
54865495
kHeatingUsesFuel = 0x20;
54875496
}
54885497

5498+
bitmap OccupancyBitmap : bitmap8 {
5499+
kOccupied = 0x1;
5500+
}
5501+
54895502
bitmap PresetTypeFeaturesBitmap : bitmap16 {
54905503
kAutomatic = 0x1;
54915504
kSupportsNames = 0x2;
@@ -5551,7 +5564,7 @@ cluster Thermostat = 513 {
55515564
optional char_string<64> name = 2;
55525565
optional octet_string<16> presetHandle = 3;
55535566
ScheduleTransitionStruct transitions[] = 4;
5554-
optional nullable boolean builtIn = 5;
5567+
nullable boolean builtIn = 5;
55555568
}
55565569

55575570
struct PresetStruct {
@@ -5583,23 +5596,23 @@ cluster Thermostat = 513 {
55835596

55845597
readonly attribute nullable temperature localTemperature = 0;
55855598
readonly attribute optional nullable temperature outdoorTemperature = 1;
5586-
readonly attribute optional bitmap8 occupancy = 2;
5599+
readonly attribute optional OccupancyBitmap occupancy = 2;
55875600
readonly attribute optional temperature absMinHeatSetpointLimit = 3;
55885601
readonly attribute optional temperature absMaxHeatSetpointLimit = 4;
55895602
readonly attribute optional temperature absMinCoolSetpointLimit = 5;
55905603
readonly attribute optional temperature absMaxCoolSetpointLimit = 6;
55915604
readonly attribute optional int8u PICoolingDemand = 7;
55925605
readonly attribute optional int8u PIHeatingDemand = 8;
5593-
attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9;
5606+
attribute access(write: manage) optional HVACSystemTypeBitmap HVACSystemTypeConfiguration = 9;
55945607
attribute access(write: manage) optional int8s localTemperatureCalibration = 16;
5595-
attribute optional int16s occupiedCoolingSetpoint = 17;
5596-
attribute optional int16s occupiedHeatingSetpoint = 18;
5597-
attribute optional int16s unoccupiedCoolingSetpoint = 19;
5598-
attribute optional int16s unoccupiedHeatingSetpoint = 20;
5599-
attribute access(write: manage) optional int16s minHeatSetpointLimit = 21;
5600-
attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22;
5601-
attribute access(write: manage) optional int16s minCoolSetpointLimit = 23;
5602-
attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24;
5608+
attribute optional temperature occupiedCoolingSetpoint = 17;
5609+
attribute optional temperature occupiedHeatingSetpoint = 18;
5610+
attribute optional temperature unoccupiedCoolingSetpoint = 19;
5611+
attribute optional temperature unoccupiedHeatingSetpoint = 20;
5612+
attribute access(write: manage) optional temperature minHeatSetpointLimit = 21;
5613+
attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22;
5614+
attribute access(write: manage) optional temperature minCoolSetpointLimit = 23;
5615+
attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24;
56035616
attribute access(write: manage) optional int8s minSetpointDeadBand = 25;
56045617
attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26;
56055618
attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27;
@@ -5640,8 +5653,7 @@ cluster Thermostat = 513 {
56405653
readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79;
56415654
attribute access(write: manage) optional PresetStruct presets[] = 80;
56425655
attribute access(write: manage) optional ScheduleStruct schedules[] = 81;
5643-
readonly attribute optional boolean presetsSchedulesEditable = 82;
5644-
readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 83;
5656+
readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 82;
56455657
readonly attribute command_id generatedCommandList[] = 65528;
56465658
readonly attribute command_id acceptedCommandList[] = 65529;
56475659
readonly attribute event_id eventList[] = 65530;
@@ -5681,28 +5693,32 @@ cluster Thermostat = 513 {
56815693
octet_string<16> presetHandle = 0;
56825694
}
56835695

5684-
request struct StartPresetsSchedulesEditRequestRequest {
5685-
int16u timeoutSeconds = 0;
5696+
response struct AtomicResponse = 253 {
5697+
status statusCode = 0;
5698+
AtomicAttributeStatusStruct attributeStatus[] = 1;
5699+
optional int16u timeout = 2;
5700+
}
5701+
5702+
request struct AtomicRequestRequest {
5703+
AtomicRequestTypeEnum requestType = 0;
5704+
attrib_id attributeRequests[] = 1;
5705+
optional int16u timeout = 2;
56865706
}
56875707

5688-
/** Command description for SetpointRaiseLower */
5708+
/** Upon receipt, the attributes for the indicated setpoint(s) SHALL have the amount specified in the Amount field added to them. */
56895709
command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0;
5690-
/** Command description for SetWeeklySchedule */
5710+
/** This command is used to update the thermostat weekly setpoint schedule from a management system. */
56915711
command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1;
5692-
/** Command description for GetWeeklySchedule */
5712+
/** The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. */
56935713
command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2;
5694-
/** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */
5714+
/** This command is used to clear the weekly schedule. */
56955715
command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3;
5696-
/** This command is used to set the active schedule. */
5716+
/** Upon receipt, if the Schedules attribute contains a ScheduleStruct whose ScheduleHandle field matches the value of the ScheduleHandle field, the server SHALL set the thermostat's ActiveScheduleHandle attribute to the value of the ScheduleHandle field. */
56975717
command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5;
5698-
/** This command is used to set the active preset. */
5718+
/** ID */
56995719
command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6;
5700-
/** This command is used to start editing the presets and schedules. */
5701-
command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7;
5702-
/** This command is used to cancel editing presets and schedules. */
5703-
command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8;
5704-
/** This command is used to notify the server that all edits are done and should be committed. */
5705-
command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9;
5720+
/** Begins, Commits or Cancels an atomic write */
5721+
command access(invoke: manage) AtomicRequest(AtomicRequestRequest): AtomicResponse = 254;
57065722
}
57075723

57085724
/** An interface for controlling a fan in a heating/cooling system. */
@@ -9035,10 +9051,15 @@ endpoint 1 {
90359051
ram attribute controlSequenceOfOperation default = 0x04;
90369052
ram attribute systemMode default = 0x01;
90379053
callback attribute presetTypes;
9054+
callback attribute scheduleTypes;
90389055
ram attribute numberOfPresets default = 0;
9056+
ram attribute numberOfSchedules default = 0;
9057+
ram attribute numberOfScheduleTransitionPerDay default = 0xFF;
90399058
ram attribute activePresetHandle;
9059+
ram attribute activeScheduleHandle;
90409060
callback attribute presets;
9041-
ram attribute presetsSchedulesEditable;
9061+
callback attribute schedules;
9062+
ram attribute setpointHoldExpiryTimestamp;
90429063
callback attribute generatedCommandList;
90439064
callback attribute acceptedCommandList;
90449065
callback attribute eventList;
@@ -9047,10 +9068,10 @@ endpoint 1 {
90479068
ram attribute clusterRevision default = 6;
90489069

90499070
handle command SetpointRaiseLower;
9071+
handle command SetActiveScheduleRequest;
90509072
handle command SetActivePresetRequest;
9051-
handle command StartPresetsSchedulesEditRequest;
9052-
handle command CancelPresetsSchedulesEditRequest;
9053-
handle command CommitPresetsSchedulesRequest;
9073+
handle command AtomicResponse;
9074+
handle command AtomicRequest;
90549075
}
90559076

90569077
server cluster FanControl {

0 commit comments

Comments
 (0)