From 0d9332e1b3982834fdec8c225c79275f69a0fc10 Mon Sep 17 00:00:00 2001 From: David Rempel <63119829+drempelg@users.noreply.github.com> Date: Fri, 8 Dec 2023 09:28:49 -0800 Subject: [PATCH] Doing the great thermostat renaming. (#30758) * Doing the great thermostat renaming. * Fixed a bad merge * and missed this rename * Restyled by whitespace * Restyled by clang-format * Adjust Darwin availability for the renames. * Update src/app/clusters/thermostat-server/thermostat-server.cpp Co-authored-by: Boris Zbarsky * Update src/app/clusters/thermostat-server/thermostat-server.cpp Co-authored-by: Boris Zbarsky * Bunch of changes related to review * restored the min/max's for the writable attributes * Reverted the min/max's to int16s again. Using temperature was causing the test suite to fail when writing to them. Temperature is the only type defined in chip-types.xml as signed (even signed int's aren't) and it looks like the min/max checking in attribute-table.cpp didn't like that. * Removed log line again (guess I didn't add/commit again before pushing) * Update src/app/clusters/thermostat-server/thermostat-server.cpp Co-authored-by: Boris Zbarsky * fixed some white space issues and restored defaults --------- Co-authored-by: Restyled.io Co-authored-by: Boris Zbarsky --- .../all-clusters-app.matter | 201 ++++++--- .../all-clusters-common/all-clusters-app.zap | 57 ++- .../ameba/main/include/ThermostatCommands.h | 4 +- .../esp32/main/DeviceWithDisplay.cpp | 117 ++++- .../all-clusters-minimal-app.matter | 200 ++++++--- .../all-clusters-minimal-app.zap | 2 +- .../esp32/main/DeviceWithDisplay.cpp | 2 +- ...umiditysensor_thermostat_56de3d5f45.matter | 200 ++++++--- ...r_humiditysensor_thermostat_56de3d5f45.zap | 2 +- ...tnode_heatingcoolingunit_ncdGai1E5a.matter | 200 ++++++--- ...tnode_roomairconditioner_9cf3607804.matter | 200 ++++++--- ...rootnode_roomairconditioner_9cf3607804.zap | 2 +- .../rootnode_thermostat_bm3fb8dhYi.matter | 200 ++++++--- .../rootnode_thermostat_bm3fb8dhYi.zap | 2 +- .../placeholder/linux/apps/app1/config.matter | 400 +++++++++++++----- .../placeholder/linux/apps/app1/config.zap | 2 +- .../placeholder/linux/apps/app2/config.matter | 400 +++++++++++++----- .../placeholder/linux/apps/app2/config.zap | 2 +- .../thermostat/asr/src/TemperatureManager.cpp | 37 +- .../nxp/zap/thermostat_matter_thread.matter | 200 ++++++--- .../nxp/zap/thermostat_matter_thread.zap | 2 +- .../nxp/zap/thermostat_matter_wifi.matter | 200 ++++++--- .../nxp/zap/thermostat_matter_wifi.zap | 2 +- .../silabs/src/TemperatureManager.cpp | 38 +- .../telink/src/TemperatureManager.cpp | 38 +- .../thermostat-common/thermostat.matter | 200 ++++++--- .../thermostat-common/thermostat.zap | 2 +- .../zap/tests/inputs/all-clusters-app.zap | 2 +- .../all-clusters-app/app-templates/access.h | 21 - .../app-templates/endpoint_config.h | 12 +- .../thermostat-server/thermostat-server.cpp | 32 +- .../data-model/chip/thermostat-cluster.xml | 257 +++++++---- .../data_model/controller-clusters.matter | 200 ++++++--- .../chip/devicecontroller/ChipClusters.java | 10 +- .../chip/devicecontroller/ChipStructs.java | 10 +- .../devicecontroller/ClusterInfoMapping.java | 6 +- .../chip/devicecontroller/cluster/files.gni | 2 +- ...atClusterWeeklyScheduleTransitionStruct.kt | 91 ++++ .../cluster/clusters/ThermostatCluster.kt | 4 +- .../matter/devicecontroller/cluster/files.gni | 2 +- ...atClusterWeeklyScheduleTransitionStruct.kt | 91 ++++ .../CHIPAttributeTLVValueDecoder.cpp | 8 +- .../zap-generated/CHIPClustersWrite-JNI.cpp | 11 +- .../zap-generated/CHIPInvokeCallbacks.cpp | 18 +- .../python/chip/clusters/CHIPClusters.py | 2 +- .../python/chip/clusters/Objects.py | 265 ++++++++---- .../CHIP/templates/availability.yaml | 115 ++++- .../MTRAttributeTLVValueDecoder.mm | 28 +- .../CHIP/zap-generated/MTRBaseClusters.h | 235 ++++++++-- .../CHIP/zap-generated/MTRBaseClusters.mm | 20 +- .../zap-generated/MTRCommandPayloadsObjc.mm | 8 +- .../CHIP/zap-generated/MTRStructsObjc.h | 19 +- .../CHIP/zap-generated/MTRStructsObjc.mm | 10 +- .../zap-generated/attributes/Accessors.cpp | 140 +++--- .../zap-generated/attributes/Accessors.h | 83 ++-- .../zap-generated/cluster-enums-check.h | 141 +++++- .../app-common/zap-generated/cluster-enums.h | 214 ++++++++-- .../zap-generated/cluster-objects.cpp | 4 +- .../zap-generated/cluster-objects.h | 186 ++++---- .../zap-generated/cluster/Commands.h | 69 +-- .../cluster/ComplexArgumentParser.cpp | 10 +- .../cluster/ComplexArgumentParser.h | 5 +- .../cluster/logging/DataModelLogger.cpp | 32 +- .../cluster/logging/DataModelLogger.h | 2 +- .../zap-generated/cluster/Commands.h | 6 +- 65 files changed, 3846 insertions(+), 1437 deletions(-) create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt create mode 100644 src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index f5e513014fb578..c8c0cc26d379bb 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -3961,13 +3961,41 @@ cluster PumpConfigurationAndControl = 512 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; } - enum ThermostatControlSequence : enum8 { + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; + } + + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -3976,13 +4004,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; + } + + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; } - enum ThermostatSystemMode : enum8 { + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -3994,15 +4038,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -4015,24 +4067,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -4046,18 +4138,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -4067,14 +4159,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4083,27 +4175,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ @@ -7049,6 +7141,7 @@ endpoint 1 { ram attribute systemMode default = 0x01; callback attribute generatedCommandList; callback attribute acceptedCommandList; + callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0023; ram attribute clusterRevision default = 6; diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 84ef5e05e26b4c..9d8216013aa144 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -17,6 +17,12 @@ } ], "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl-with-test-extensions.json", @@ -24,12 +30,6 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data with some extensions" - }, - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "version": "chip-v1" } ], "endpointTypes": [ @@ -12581,7 +12581,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12597,7 +12597,7 @@ "code": 3, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12613,7 +12613,7 @@ "code": 4, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12629,7 +12629,7 @@ "code": 5, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12645,7 +12645,7 @@ "code": 6, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12661,7 +12661,7 @@ "code": 17, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12677,7 +12677,7 @@ "code": 18, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12693,7 +12693,7 @@ "code": 21, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12709,7 +12709,7 @@ "code": 22, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12725,7 +12725,7 @@ "code": 23, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12741,7 +12741,7 @@ "code": 24, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12773,7 +12773,7 @@ "code": 27, "mfgCode": null, "side": "server", - "type": "ThermostatControlSequence", + "type": "ControlSequenceOfOperationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12789,7 +12789,7 @@ "code": 28, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "SystemModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -12832,6 +12832,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "AttributeList", "code": 65531, @@ -21724,5 +21740,6 @@ "endpointId": 65534, "networkId": 0 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/all-clusters-app/ameba/main/include/ThermostatCommands.h b/examples/all-clusters-app/ameba/main/include/ThermostatCommands.h index 31ff5098869680..7d6c77af81ef1e 100644 --- a/examples/all-clusters-app/ameba/main/include/ThermostatCommands.h +++ b/examples/all-clusters-app/ameba/main/include/ThermostatCommands.h @@ -154,7 +154,7 @@ void ProcessThermostatUnicastBindingCommand(BindingCommandData * data, const Emb switch (data->commandId) { case Clusters::Thermostat::Commands::SetpointRaiseLower::Id: - setpointRaiseLowerCommand.mode = static_cast(data->args[0]); + setpointRaiseLowerCommand.mode = static_cast(data->args[0]); setpointRaiseLowerCommand.amount = static_cast(data->args[1]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, setpointRaiseLowerCommand, onSuccess, onFailure); @@ -171,7 +171,7 @@ void ProcessThermostatGroupBindingCommand(BindingCommandData * data, const Ember switch (data->commandId) { case Clusters::Thermostat::Commands::SetpointRaiseLower::Id: - setpointRaiseLowerCommand.mode = static_cast(data->args[0]); + setpointRaiseLowerCommand.mode = static_cast(data->args[0]); setpointRaiseLowerCommand.amount = static_cast(data->args[1]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, setpointRaiseLowerCommand); break; diff --git a/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp b/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp index 621ee8f6d2ce0a..0668411a9bfbd3 100644 --- a/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp +++ b/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp @@ -141,14 +141,14 @@ class EditAttributeListModel : public TouchesMatterStackModel // false otherwise. bool isValidThermostatSystemMode(uint8_t systemMode) { - chip::app::Clusters::Thermostat::ThermostatSystemMode mode = - static_cast(systemMode); + chip::app::Clusters::Thermostat::SystemModeEnum mode = + static_cast(systemMode); switch (mode) { - case chip::app::Clusters::Thermostat::ThermostatSystemMode::kOff: - case chip::app::Clusters::Thermostat::ThermostatSystemMode::kAuto: - case chip::app::Clusters::Thermostat::ThermostatSystemMode::kCool: - case chip::app::Clusters::Thermostat::ThermostatSystemMode::kHeat: + case chip::app::Clusters::Thermostat::SystemModeEnum::kOff: + case chip::app::Clusters::Thermostat::SystemModeEnum::kAuto: + case chip::app::Clusters::Thermostat::SystemModeEnum::kCool: + case chip::app::Clusters::Thermostat::SystemModeEnum::kHeat: return true; default: return false; @@ -157,13 +157,13 @@ class EditAttributeListModel : public TouchesMatterStackModel bool isValidThermostatRunningMode(uint8_t runningMode) { - chip::app::Clusters::Thermostat::ThermostatRunningMode mode = - static_cast(runningMode); + chip::app::Clusters::Thermostat::ThermostatRunningModeEnum mode = + static_cast(runningMode); switch (mode) { - case chip::app::Clusters::Thermostat::ThermostatRunningMode::kOff: - case chip::app::Clusters::Thermostat::ThermostatRunningMode::kCool: - case chip::app::Clusters::Thermostat::ThermostatRunningMode::kHeat: + case chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kOff: + case chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kCool: + case chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kHeat: return true; default: return false; @@ -233,24 +233,77 @@ class EditAttributeListModel : public TouchesMatterStackModel else if (name == "SystemMode") { // System modes - Off, Auto, Cool and Heat are currently supported. + chip::app::Clusters::Thermostat::SystemModeEnum modeEnum = + chip::app::Clusters::Thermostat::SystemModeEnum::kUnknownEnumValue; uint8_t mode = n; + + switch (n) + { + case 0: + modeEnum = chip::app::Clusters::Thermostat::SystemModeEnum::kOff; + break; + case 1: + modeEnum = chip::app::Clusters::Thermostat::SystemModeEnum::kAuto; + break; + case 3: + modeEnum = chip::app::Clusters::Thermostat::SystemModeEnum::kCool; + break; + case 4: + modeEnum = chip::app::Clusters::Thermostat::SystemModeEnum::kHeat; + break; + case 5: + modeEnum = chip::app::Clusters::Thermostat::SystemModeEnum::kEmergencyHeat; + break; + case 6: + modeEnum = chip::app::Clusters::Thermostat::SystemModeEnum::kPrecooling; + break; + case 7: + modeEnum = chip::app::Clusters::Thermostat::SystemModeEnum::kFanOnly; + break; + case 8: + modeEnum = chip::app::Clusters::Thermostat::SystemModeEnum::kDry; + break; + case 9: + modeEnum = chip::app::Clusters::Thermostat::SystemModeEnum::kSleep; + break; + default: + modeEnum = chip::app::Clusters::Thermostat::SystemModeEnum::kUnknownEnumValue; + break; + } + // Update the system mode here for hardcoded endpoint 1 if (isValidThermostatSystemMode(mode)) { ESP_LOGI(TAG, "System Mode changed to : %d", mode); - app::Clusters::Thermostat::Attributes::SystemMode::Set(1, static_cast(mode)); + app::Clusters::Thermostat::Attributes::SystemMode::Set(1, modeEnum); // If system mode is auto set running mode to off otherwise set it to what the system mode is set to - if (mode == static_cast(chip::app::Clusters::Thermostat::ThermostatSystemMode::kAuto)) + if (modeEnum == chip::app::Clusters::Thermostat::SystemModeEnum::kAuto) { app::Clusters::Thermostat::Attributes::ThermostatRunningMode::Set( - 1, static_cast(chip::app::Clusters::Thermostat::ThermostatRunningMode::kOff)); + 1, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kOff); } else { if (isValidThermostatRunningMode(mode)) { ESP_LOGI(TAG, "Running Mode changed to : %d", mode); - app::Clusters::Thermostat::Attributes::ThermostatRunningMode::Set(1, static_cast(mode)); + chip::app::Clusters::Thermostat::ThermostatRunningModeEnum runningModeEnum; + switch (mode) + { + case 0: + runningModeEnum = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kOff; + break; + case 3: + runningModeEnum = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kCool; + break; + case 4: + runningModeEnum = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kHeat; + break; + default: + runningModeEnum = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kUnknownEnumValue; + break; + } + app::Clusters::Thermostat::Attributes::ThermostatRunningMode::Set(1, runningModeEnum); } else { @@ -266,20 +319,38 @@ class EditAttributeListModel : public TouchesMatterStackModel else if (name == "RunningMode") { // Get the system mode - uint8_t systemMode = static_cast(chip::app::Clusters::Thermostat::ThermostatRunningMode::kOff); - app::Clusters::Thermostat::Attributes::SystemMode::Get(1, static_cast(&systemMode)); - if (systemMode != static_cast(chip::app::Clusters::Thermostat::ThermostatSystemMode::kAuto)) + chip::app::Clusters::Thermostat::SystemModeEnum systemMode = chip::app::Clusters::Thermostat::SystemModeEnum::kOff; + app::Clusters::Thermostat::Attributes::SystemMode::Get(1, &systemMode); + if (systemMode != chip::app::Clusters::Thermostat::SystemModeEnum::kAuto) { - ESP_LOGI(TAG, "Running mode can be changed only for system mode auto. Current system mode %d", systemMode); + ESP_LOGI(TAG, "Running mode can be changed only for system mode auto. Current system mode %d", + static_cast(systemMode)); } else { uint8_t mode = n; + chip::app::Clusters::Thermostat::ThermostatRunningModeEnum modeEnum = + chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kUnknownEnumValue; // update the running mode here for hardcoded endpoint 1 if (isValidThermostatRunningMode(mode)) { ESP_LOGI(TAG, "Running Mode changed to : %d", mode); - app::Clusters::Thermostat::Attributes::ThermostatRunningMode::Set(1, static_cast(mode)); + switch (n) + { + case 0: + modeEnum = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kOff; + break; + case 3: + modeEnum = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kCool; + break; + case 4: + modeEnum = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kHeat; + break; + default: + modeEnum = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kUnknownEnumValue; + break; + } + app::Clusters::Thermostat::Attributes::ThermostatRunningMode::Set(1, modeEnum); } else { @@ -607,15 +678,15 @@ void SetupPretendDevices() app::Clusters::TemperatureMeasurement::Attributes::MeasuredValue::Set(1, static_cast(21 * 100)); app::Clusters::Thermostat::Attributes::LocalTemperature::Set(1, static_cast(21 * 100)); AddAttribute("SystemMode", "4"); - app::Clusters::Thermostat::Attributes::SystemMode::Set( - 1, static_cast(chip::app::Clusters::Thermostat::ThermostatSystemMode::kHeat)); + app::Clusters::Thermostat::Attributes::SystemMode::Set(1, chip::app::Clusters::Thermostat::SystemModeEnum::kHeat); + AddAttribute("CoolSetpoint", "19"); app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::Set(1, static_cast(19 * 100)); AddAttribute("HeatSetpoint", "25"); app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::Set(1, static_cast(25 * 100)); AddAttribute("RunningMode", "4"); app::Clusters::Thermostat::Attributes::ThermostatRunningMode::Set( - 1, static_cast(chip::app::Clusters::Thermostat::ThermostatRunningMode::kHeat)); + 1, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum::kHeat); AddDevice("Humidity Sensor"); AddEndpoint("External"); diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 3254c32d6deb89..df9b42ae958a30 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -3492,13 +3492,41 @@ cluster PumpConfigurationAndControl = 512 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; } - enum ThermostatControlSequence : enum8 { + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; + } + + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -3507,13 +3535,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; + } + + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; } - enum ThermostatSystemMode : enum8 { + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -3525,15 +3569,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -3546,24 +3598,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -3577,18 +3669,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -3598,14 +3690,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3614,27 +3706,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index 12d5c94c6c5ab8..f8242628a7b01e 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -6883,7 +6883,7 @@ "code": 27, "mfgCode": null, "side": "server", - "type": "ThermostatControlSequence", + "type": "ControlSequenceOfOperationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp b/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp index 9ed8fc733deca2..c588c84bcff2d0 100644 --- a/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp +++ b/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp @@ -544,7 +544,7 @@ void SetupPretendDevices() app::Clusters::TemperatureMeasurement::Attributes::MeasuredValue::Set(1, static_cast(21 * 100)); app::Clusters::Thermostat::Attributes::LocalTemperature::Set(1, static_cast(21 * 100)); AddAttribute("SystemMode", "4"); - app::Clusters::Thermostat::Attributes::SystemMode::Set(1, 4); + app::Clusters::Thermostat::Attributes::SystemMode::Set(1, app::Clusters::Thermostat::SystemModeEnum::kHeat); AddAttribute("OccupiedCoolingSetpoint", "19"); app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::Set(1, static_cast(19 * 100)); AddAttribute("OccupiedHeatingSetpoint", "25"); diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter index 8a22d48b7236db..3b314b809d1095 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter @@ -1134,13 +1134,41 @@ cluster ActivatedCarbonFilterMonitoring = 114 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; } - enum ThermostatControlSequence : enum8 { + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; + } + + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -1149,13 +1177,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; + } + + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; } - enum ThermostatSystemMode : enum8 { + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -1167,15 +1211,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -1188,24 +1240,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -1219,18 +1311,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -1240,14 +1332,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1256,27 +1348,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap index f6a7cb27aa01bf..ddf9888809e6e9 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap @@ -7705,7 +7705,7 @@ "code": 27, "mfgCode": null, "side": "server", - "type": "ThermostatControlSequence", + "type": "ControlSequenceOfOperationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index c972cef32145f1..6fd4e77968fd0e 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -1491,13 +1491,41 @@ cluster FixedLabel = 64 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; } - enum ThermostatControlSequence : enum8 { + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; + } + + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -1506,13 +1534,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; + } + + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; } - enum ThermostatSystemMode : enum8 { + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -1524,15 +1568,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -1545,24 +1597,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -1576,18 +1668,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -1597,14 +1689,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1613,27 +1705,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter index 96d1c16d25be15..26e51b22608ab0 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter @@ -1074,13 +1074,41 @@ cluster GroupKeyManagement = 63 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; } - enum ThermostatControlSequence : enum8 { + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; + } + + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -1089,13 +1117,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; } - enum ThermostatSystemMode : enum8 { + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; + } + + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -1107,15 +1151,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -1128,24 +1180,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -1159,18 +1251,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -1180,14 +1272,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1196,27 +1288,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap index 2c97a55da45253..2feee5a947ccf4 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap @@ -2728,7 +2728,7 @@ "code": 27, "mfgCode": null, "side": "server", - "type": "ThermostatControlSequence", + "type": "ControlSequenceOfOperationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 3afc8aa2d9f902..f57988f799736e 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -1294,13 +1294,41 @@ cluster FixedLabel = 64 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; } - enum ThermostatControlSequence : enum8 { + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; + } + + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -1309,13 +1337,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; + } + + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; } - enum ThermostatSystemMode : enum8 { + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -1327,15 +1371,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -1348,24 +1400,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -1379,18 +1471,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -1400,14 +1492,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1416,27 +1508,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap index bf2babfd7a107b..a63173975d4c2b 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap @@ -3367,7 +3367,7 @@ "code": 27, "mfgCode": null, "side": "server", - "type": "ThermostatControlSequence", + "type": "ControlSequenceOfOperationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 9aad9b3db0277e..f34eb32708abb6 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -4708,13 +4708,41 @@ cluster PumpConfigurationAndControl = 512 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; } - enum ThermostatControlSequence : enum8 { + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; + } + + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -4723,13 +4751,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; + } + + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; } - enum ThermostatSystemMode : enum8 { + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -4741,15 +4785,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -4762,24 +4814,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -4793,18 +4885,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -4814,14 +4906,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4830,27 +4922,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ @@ -4867,13 +4959,41 @@ cluster Thermostat = 513 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; } - enum ThermostatControlSequence : enum8 { + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; + } + + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -4882,13 +5002,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; + } + + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; } - enum ThermostatSystemMode : enum8 { + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -4900,15 +5036,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -4921,24 +5065,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -4952,18 +5136,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -4973,14 +5157,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4989,27 +5173,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index 4c256254cb0aac..11f85e323bcf83 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -8244,7 +8244,7 @@ "code": 27, "mfgCode": null, "side": "server", - "type": "ThermostatControlSequence", + "type": "ControlSequenceOfOperationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index eef0d4bc5acaa6..5ebe16e7842ee3 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -4665,13 +4665,41 @@ cluster PumpConfigurationAndControl = 512 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; } - enum ThermostatControlSequence : enum8 { + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; + } + + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -4680,13 +4708,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; + } + + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; } - enum ThermostatSystemMode : enum8 { + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -4698,15 +4742,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -4719,24 +4771,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -4750,18 +4842,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -4771,14 +4863,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4787,27 +4879,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ @@ -4824,13 +4916,41 @@ cluster Thermostat = 513 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; } - enum ThermostatControlSequence : enum8 { + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; + } + + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -4839,13 +4959,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; + } + + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; } - enum ThermostatSystemMode : enum8 { + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -4857,15 +4993,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -4878,24 +5022,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -4909,18 +5093,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -4930,14 +5114,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4946,27 +5130,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index ec6b823927ebc6..85b3958dde6f7e 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -8318,7 +8318,7 @@ "code": 27, "mfgCode": null, "side": "server", - "type": "ThermostatControlSequence", + "type": "ControlSequenceOfOperationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/thermostat/asr/src/TemperatureManager.cpp b/examples/thermostat/asr/src/TemperatureManager.cpp index 219f428e85e781..b560e5c22970f7 100644 --- a/examples/thermostat/asr/src/TemperatureManager.cpp +++ b/examples/thermostat/asr/src/TemperatureManager.cpp @@ -24,6 +24,7 @@ using namespace chip; using namespace ::chip::DeviceLayer; constexpr EndpointId kThermostatEndpoint = 1; +using namespace ::chip::app::Clusters::Thermostat; namespace ThermAttr = chip::app::Clusters::Thermostat::Attributes; @@ -33,7 +34,7 @@ CHIP_ERROR TemperatureManager::Init() { app::DataModel::Nullable temp; int16_t heatingSetpoint, coolingSetpoint; - uint8_t systemMode; + SystemModeEnum systemMode; PlatformMgr().LockChipStack(); ThermAttr::LocalTemperature::Get(kThermostatEndpoint, temp); @@ -45,7 +46,39 @@ CHIP_ERROR TemperatureManager::Init() mCurrentTempCelsius = ConvertToPrintableTemp(temp.Value()); mHeatingCelsiusSetPoint = ConvertToPrintableTemp(coolingSetpoint); mCoolingCelsiusSetPoint = ConvertToPrintableTemp(heatingSetpoint); - mThermMode = systemMode; + switch (systemMode) + { + case SystemModeEnum::kOff: + mThermMode = 0; + break; + case SystemModeEnum::kAuto: + mThermMode = 1; + break; + case SystemModeEnum::kCool: + mThermMode = 3; + break; + case SystemModeEnum::kHeat: + mThermMode = 4; + break; + case SystemModeEnum::kEmergencyHeat: + mThermMode = 5; + break; + case SystemModeEnum::kPrecooling: + mThermMode = 6; + break; + case SystemModeEnum::kFanOnly: + mThermMode = 7; + break; + case SystemModeEnum::kDry: + mThermMode = 8; + break; + case SystemModeEnum::kSleep: + mThermMode = 9; + break; + default: + mThermMode = 2; + break; // unknown value; + } GetAppTask().UpdateThermoStatUI(); diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter index 7b9caf9d4c0961..03d30b40d10e66 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter @@ -1922,13 +1922,41 @@ cluster UserLabel = 65 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; } - enum ThermostatControlSequence : enum8 { + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; + } + + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -1937,13 +1965,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; + } + + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; } - enum ThermostatSystemMode : enum8 { + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -1955,15 +1999,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -1976,24 +2028,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -2007,18 +2099,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -2028,14 +2120,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2044,27 +2136,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.zap b/examples/thermostat/nxp/zap/thermostat_matter_thread.zap index 4ab13650744b73..d5927370f28635 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.zap +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.zap @@ -4791,7 +4791,7 @@ "code": 27, "mfgCode": null, "side": "server", - "type": "ThermostatControlSequence", + "type": "ControlSequenceOfOperationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter index 31a5bd3f0032b6..2d4659a3997923 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter @@ -1833,13 +1833,41 @@ cluster UserLabel = 65 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; } - enum ThermostatControlSequence : enum8 { + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; + } + + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -1848,13 +1876,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; + } + + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; } - enum ThermostatSystemMode : enum8 { + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -1866,15 +1910,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -1887,24 +1939,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -1918,18 +2010,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -1939,14 +2031,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1955,27 +2047,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap b/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap index 8c2c487c092685..a4b725903ac7a1 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.zap @@ -3933,7 +3933,7 @@ "code": 27, "mfgCode": null, "side": "server", - "type": "ThermostatControlSequence", + "type": "ControlSequenceOfOperationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/thermostat/silabs/src/TemperatureManager.cpp b/examples/thermostat/silabs/src/TemperatureManager.cpp index 7bff7a7907cb96..f858e438a7449f 100644 --- a/examples/thermostat/silabs/src/TemperatureManager.cpp +++ b/examples/thermostat/silabs/src/TemperatureManager.cpp @@ -36,6 +36,7 @@ using namespace ::chip::DeviceLayer; constexpr EndpointId kThermostatEndpoint = 1; +using namespace ::chip::app::Clusters::Thermostat; namespace ThermAttr = chip::app::Clusters::Thermostat::Attributes; /********************************************************** * Variable declarations @@ -47,7 +48,7 @@ CHIP_ERROR TemperatureManager::Init() { app::DataModel::Nullable temp; int16_t heatingSetpoint, coolingSetpoint; - uint8_t systemMode; + SystemModeEnum systemMode; PlatformMgr().LockChipStack(); ThermAttr::LocalTemperature::Get(kThermostatEndpoint, temp); @@ -59,7 +60,40 @@ CHIP_ERROR TemperatureManager::Init() mCurrentTempCelsius = ConvertToPrintableTemp((temp.IsNull()) ? static_cast(0.0) : temp.Value()); mHeatingCelsiusSetPoint = ConvertToPrintableTemp(coolingSetpoint); mCoolingCelsiusSetPoint = ConvertToPrintableTemp(heatingSetpoint); - mThermMode = systemMode; + + switch (systemMode) + { + case SystemModeEnum::kOff: + mThermMode = 0; + break; + case SystemModeEnum::kAuto: + mThermMode = 1; + break; + case SystemModeEnum::kCool: + mThermMode = 3; + break; + case SystemModeEnum::kHeat: + mThermMode = 4; + break; + case SystemModeEnum::kEmergencyHeat: + mThermMode = 5; + break; + case SystemModeEnum::kPrecooling: + mThermMode = 6; + break; + case SystemModeEnum::kFanOnly: + mThermMode = 7; + break; + case SystemModeEnum::kDry: + mThermMode = 8; + break; + case SystemModeEnum::kSleep: + mThermMode = 9; + break; + default: + mThermMode = 2; + break; // unknown value; + } AppTask::GetAppTask().UpdateThermoStatUI(); diff --git a/examples/thermostat/telink/src/TemperatureManager.cpp b/examples/thermostat/telink/src/TemperatureManager.cpp index ca8b0eb4d98cb4..ee52427d95c5bc 100644 --- a/examples/thermostat/telink/src/TemperatureManager.cpp +++ b/examples/thermostat/telink/src/TemperatureManager.cpp @@ -28,6 +28,7 @@ using namespace ::chip::DeviceLayer; constexpr EndpointId kThermostatEndpoint = 1; +using namespace ::chip::app::Clusters::Thermostat; namespace ThermAttr = chip::app::Clusters::Thermostat::Attributes; TemperatureManager TemperatureManager::sTempMgr; @@ -36,7 +37,7 @@ CHIP_ERROR TemperatureManager::Init() { app::DataModel::Nullable temp; int16_t heatingSetpoint, coolingSetpoint; - uint8_t systemMode; + SystemModeEnum systemMode; PlatformMgr().LockChipStack(); ThermAttr::LocalTemperature::Get(kThermostatEndpoint, temp); @@ -48,7 +49,40 @@ CHIP_ERROR TemperatureManager::Init() mCurrentTempCelsius = ConvertToPrintableTemp(temp.Value()); mHeatingCelsiusSetPoint = ConvertToPrintableTemp(coolingSetpoint); mCoolingCelsiusSetPoint = ConvertToPrintableTemp(heatingSetpoint); - mThermMode = systemMode; + + switch (systemMode) + { + case SystemModeEnum::kOff: + mThermMode = 0; + break; + case SystemModeEnum::kAuto: + mThermMode = 1; + break; + case SystemModeEnum::kCool: + mThermMode = 3; + break; + case SystemModeEnum::kHeat: + mThermMode = 4; + break; + case SystemModeEnum::kEmergencyHeat: + mThermMode = 5; + break; + case SystemModeEnum::kPrecooling: + mThermMode = 6; + break; + case SystemModeEnum::kFanOnly: + mThermMode = 7; + break; + case SystemModeEnum::kDry: + mThermMode = 8; + break; + case SystemModeEnum::kSleep: + mThermMode = 9; + break; + default: + mThermMode = 2; + break; // unknown value; + } GetAppTask().UpdateThermoStatUI(); diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 4256e6e3bcde0d..e7beccc1e529ef 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -1673,13 +1673,41 @@ cluster UserLabel = 65 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; } - enum ThermostatControlSequence : enum8 { + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; + } + + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -1688,13 +1716,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; + } + + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; } - enum ThermostatSystemMode : enum8 { + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -1706,15 +1750,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -1727,24 +1779,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -1758,18 +1850,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -1779,14 +1871,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1795,27 +1887,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 3ec9b3bd280bf7..51d93649dce726 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -4842,7 +4842,7 @@ "code": 27, "mfgCode": null, "side": "server", - "type": "ThermostatControlSequence", + "type": "ControlSequenceOfOperationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap index 7dbc442eb1e503..c62d16a6db7703 100644 --- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap +++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap @@ -10005,7 +10005,7 @@ "code": 27, "mfgCode": null, "side": "server", - "type": "ThermostatControlSequence", + "type": "ControlSequenceOfOperationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h index a8ba20d854ac53..837dc58d560ca0 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h @@ -68,13 +68,6 @@ /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MinHeatSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MaxHeatSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MinCoolSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MaxCoolSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MinSetpointDeadBand, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: ControlSequenceOfOperation, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: SystemMode, Privilege: view */ \ /* Cluster: Thermostat User Interface Configuration, Attribute: KeypadLockout, Privilege: view */ \ /* Cluster: Thermostat User Interface Configuration, Attribute: ScheduleProgrammingVisibility, Privilege: view */ \ /* Cluster: Color Control, Attribute: WhitePointX, Privilege: view */ \ @@ -133,13 +126,6 @@ /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MinHeatSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MaxHeatSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MinCoolSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MaxCoolSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MinSetpointDeadBand, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: ControlSequenceOfOperation, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: SystemMode, Privilege: view */ \ /* Cluster: Thermostat User Interface Configuration, Attribute: KeypadLockout, Privilege: view */ \ /* Cluster: Thermostat User Interface Configuration, Attribute: ScheduleProgrammingVisibility, Privilege: view */ \ /* Cluster: Color Control, Attribute: WhitePointX, Privilege: view */ \ @@ -198,13 +184,6 @@ /* Cluster: Pump Configuration and Control, Attribute: LifetimeEnergyConsumed, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: OperationMode, Privilege: view */ \ /* Cluster: Pump Configuration and Control, Attribute: ControlMode, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MinHeatSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MaxHeatSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MinCoolSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MaxCoolSetpointLimit, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: MinSetpointDeadBand, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: ControlSequenceOfOperation, Privilege: view */ \ - /* Cluster: Thermostat, Attribute: SystemMode, Privilege: view */ \ /* Cluster: Thermostat User Interface Configuration, Attribute: KeypadLockout, Privilege: view */ \ /* Cluster: Thermostat User Interface Configuration, Attribute: ScheduleProgrammingVisibility, Privilege: view */ \ /* Cluster: Color Control, Attribute: WhitePointX, Privilege: view */ \ diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h index b17b1f10b542f0..c761ccbbcedbca 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h @@ -310,7 +310,7 @@ { (uint16_t) 0xC80, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MaxCoolSetpointLimit */ \ { (uint16_t) 0x19, (uint16_t) 0x0, (uint16_t) 0x19 }, /* MinSetpointDeadBand */ \ { (uint16_t) 0x4, (uint16_t) 0x0, (uint16_t) 0x5 }, /* ControlSequenceOfOperation */ \ - { (uint16_t) 0x1, (uint16_t) 0x0, (uint16_t) 0x7 }, /* SystemMode */ \ + { (uint16_t) 0x1, (uint16_t) 0x0, (uint16_t) 0x9 }, /* SystemMode */ \ \ /* Endpoint: 1, Cluster: Fan Control (server) */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x6 }, /* FanMode */ \ @@ -1005,11 +1005,11 @@ { ZAP_SIMPLE_DEFAULT(3), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ - { ZAP_EMPTY_DEFAULT(), 0x00000000, 2, ZAP_TYPE(INT16S), ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* LocalTemperature */ \ - { ZAP_SIMPLE_DEFAULT(0x02BC), 0x00000003, 2, ZAP_TYPE(INT16S), 0 }, /* AbsMinHeatSetpointLimit */ \ - { ZAP_SIMPLE_DEFAULT(0x0BB8), 0x00000004, 2, ZAP_TYPE(INT16S), 0 }, /* AbsMaxHeatSetpointLimit */ \ - { ZAP_SIMPLE_DEFAULT(0x0640), 0x00000005, 2, ZAP_TYPE(INT16S), 0 }, /* AbsMinCoolSetpointLimit */ \ - { ZAP_SIMPLE_DEFAULT(0x0C80), 0x00000006, 2, ZAP_TYPE(INT16S), 0 }, /* AbsMaxCoolSetpointLimit */ \ + { ZAP_EMPTY_DEFAULT(), 0x00000000, 2, ZAP_TYPE(TEMPERATURE), ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* LocalTemperature */ \ + { ZAP_SIMPLE_DEFAULT(0x02BC), 0x00000003, 2, ZAP_TYPE(TEMPERATURE), 0 }, /* AbsMinHeatSetpointLimit */ \ + { ZAP_SIMPLE_DEFAULT(0x0BB8), 0x00000004, 2, ZAP_TYPE(TEMPERATURE), 0 }, /* AbsMaxHeatSetpointLimit */ \ + { ZAP_SIMPLE_DEFAULT(0x0640), 0x00000005, 2, ZAP_TYPE(TEMPERATURE), 0 }, /* AbsMinCoolSetpointLimit */ \ + { ZAP_SIMPLE_DEFAULT(0x0C80), 0x00000006, 2, ZAP_TYPE(TEMPERATURE), 0 }, /* AbsMaxCoolSetpointLimit */ \ { ZAP_MIN_MAX_DEFAULTS_INDEX(12), 0x00000011, 2, ZAP_TYPE(INT16S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OccupiedCoolingSetpoint */ \ { ZAP_MIN_MAX_DEFAULTS_INDEX(13), 0x00000012, 2, ZAP_TYPE(INT16S), \ diff --git a/src/app/clusters/thermostat-server/thermostat-server.cpp b/src/app/clusters/thermostat-server/thermostat-server.cpp index 6c3504c6bea270..85ed4f14d5b6e3 100644 --- a/src/app/clusters/thermostat-server/thermostat-server.cpp +++ b/src/app/clusters/thermostat-server/thermostat-server.cpp @@ -97,14 +97,14 @@ CHIP_ERROR ThermostatAttrAccess::Read(const ConcreteReadAttributePath & aPath, A case RemoteSensing::Id: if (localTemperatureNotExposedSupported) { - uint8_t valueRemoteSensing; + BitMask valueRemoteSensing; EmberAfStatus status = RemoteSensing::Get(aPath.mEndpointId, &valueRemoteSensing); if (status != EMBER_ZCL_STATUS_SUCCESS) { StatusIB statusIB(ToInteractionModelStatus(status)); return statusIB.ToChipError(); } - valueRemoteSensing &= 0xFE; // clear bit 1 (LocalTemperature RemoteSensing bit) + valueRemoteSensing.Clear(RemoteSensingBitmap::kLocalTemperature); return aEncoder.Encode(valueRemoteSensing); } break; @@ -395,37 +395,37 @@ MatterThermostatClusterServerPreAttributeChangedCallback(const app::ConcreteAttr case ControlSequenceOfOperation::Id: { uint8_t requestedCSO; requestedCSO = *value; - if (requestedCSO > to_underlying(ThermostatControlSequence::kCoolingAndHeatingWithReheat)) + if (requestedCSO > to_underlying(ControlSequenceOfOperationEnum::kCoolingAndHeatingWithReheat)) return imcode::InvalidValue; return imcode::Success; } case SystemMode::Id: { - ThermostatControlSequence ControlSequenceOfOperation; + ControlSequenceOfOperationEnum ControlSequenceOfOperation; EmberAfStatus status = ControlSequenceOfOperation::Get(endpoint, &ControlSequenceOfOperation); if (status != EMBER_ZCL_STATUS_SUCCESS) { return imcode::InvalidValue; } - auto RequestedSystemMode = static_cast(*value); - if (ControlSequenceOfOperation > ThermostatControlSequence::kCoolingAndHeatingWithReheat || - RequestedSystemMode > ThermostatSystemMode::kFanOnly) + auto RequestedSystemMode = static_cast(*value); + if (ControlSequenceOfOperation > ControlSequenceOfOperationEnum::kCoolingAndHeatingWithReheat || + RequestedSystemMode > SystemModeEnum::kFanOnly) { return imcode::InvalidValue; } switch (ControlSequenceOfOperation) { - case ThermostatControlSequence::kCoolingOnly: - case ThermostatControlSequence::kCoolingWithReheat: - if (RequestedSystemMode == ThermostatSystemMode::kHeat || RequestedSystemMode == ThermostatSystemMode::kEmergencyHeat) + case ControlSequenceOfOperationEnum::kCoolingOnly: + case ControlSequenceOfOperationEnum::kCoolingWithReheat: + if (RequestedSystemMode == SystemModeEnum::kHeat || RequestedSystemMode == SystemModeEnum::kEmergencyHeat) return imcode::InvalidValue; else return imcode::Success; - case ThermostatControlSequence::kHeatingOnly: - case ThermostatControlSequence::kHeatingWithReheat: - if (RequestedSystemMode == ThermostatSystemMode::kCool || RequestedSystemMode == ThermostatSystemMode::kPrecooling) + case ControlSequenceOfOperationEnum::kHeatingOnly: + case ControlSequenceOfOperationEnum::kHeatingWithReheat: + if (RequestedSystemMode == SystemModeEnum::kCool || RequestedSystemMode == SystemModeEnum::kPrecooling) return imcode::InvalidValue; else return imcode::Success; @@ -644,7 +644,7 @@ bool emberAfThermostatClusterSetpointRaiseLowerCallback(app::CommandHandler * co switch (mode) { - case SetpointAdjustMode::kBoth: + case SetpointRaiseLowerModeEnum::kBoth: if (HeatSupported && CoolSupported) { int16_t DesiredCoolingSetpoint, CoolLimit, DesiredHeatingSetpoint, HeatLimit; @@ -724,7 +724,7 @@ bool emberAfThermostatClusterSetpointRaiseLowerCallback(app::CommandHandler * co status = EMBER_ZCL_STATUS_SUCCESS; break; - case SetpointAdjustMode::kCool: + case SetpointRaiseLowerModeEnum::kCool: if (CoolSupported) { if (OccupiedCoolingSetpoint::Get(aEndpointId, &CoolingSetpoint) == EMBER_ZCL_STATUS_SUCCESS) @@ -777,7 +777,7 @@ bool emberAfThermostatClusterSetpointRaiseLowerCallback(app::CommandHandler * co status = EMBER_ZCL_STATUS_INVALID_COMMAND; break; - case SetpointAdjustMode::kHeat: + case SetpointRaiseLowerModeEnum::kHeat: if (HeatSupported) { if (OccupiedHeatingSetpoint::Get(aEndpointId, &HeatingSetpoint) == EMBER_ZCL_STATUS_SUCCESS) diff --git a/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml index 1c15c5fc8b7fc8..567216018d07ff 100644 --- a/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml @@ -16,7 +16,6 @@ limitations under the License. --> - @@ -28,7 +27,49 @@ limitations under the License. - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -40,33 +81,34 @@ limitations under the License. - + - + - - - - - - - - - + + + + + + + + + - + - + + @@ -76,55 +118,103 @@ limitations under the License. - + - - - - - - + + + + + + - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + - + + + + + + + + + + + + + + + + + - - - + + + Thermostat - HVAC + HVAC An interface for configuring and controlling the functionality of a thermostat. 0x0201 THERMOSTAT_CLUSTER true true - LocalTemperature - OutdoorTemperature - Occupancy + LocalTemperature + OutdoorTemperature + Occupancy - AbsMinHeatSetpointLimit - AbsMaxHeatSetpointLimit - AbsMinCoolSetpointLimit - AbsMaxCoolSetpointLimit - PICoolingDemand - PIHeatingDemand + + AbsMinHeatSetpointLimit + AbsMaxHeatSetpointLimit + AbsMinCoolSetpointLimit + AbsMaxCoolSetpointLimit + PICoolingDemand + PIHeatingDemand HVACSystemTypeConfiguration @@ -132,7 +222,6 @@ limitations under the License. LocalTemperatureCalibration - OccupiedCoolingSetpoint @@ -141,145 +230,124 @@ limitations under the License. UnoccupiedHeatingSetpoint MinHeatSetpointLimit - MaxHeatSetpointLimit - MinCoolSetpointLimit - MaxCoolSetpointLimit - MinSetpointDeadBand - - + RemoteSensing - - + ControlSequenceOfOperation - - + SystemMode - - ThermostatRunningMode - StartOfWeek - NumberOfWeeklyTransitions - NumberOfDailyTransitions - + ThermostatRunningMode + StartOfWeek + NumberOfWeeklyTransitions + NumberOfDailyTransitions + TemperatureSetpointHold - TemperatureSetpointHoldDuration - - + ThermostatProgrammingOperationMode - - ThermostatRunningState - SetpointChangeSource + ThermostatRunningState + SetpointChangeSource SetpointChangeAmount SetpointChangeSourceTimestamp OccupiedSetback - OccupiedSetbackMin OccupiedSetbackMax UnoccupiedSetback - UnoccupiedSetbackMin UnoccupiedSetbackMax - + EmergencyHeatDelta - - + ACType - - + ACCapacity - - + ACRefrigerantType - - + ACCompressorType - - + ACErrorCode - - + ACLouverPosition - - ACCoilTemperature - + ACCoilTemperature + ACCapacityformat - Command description for SetpointRaiseLower - + Command description for SetWeeklySchedule - - - - + + + + Command description for GetWeeklySchedule - - + + @@ -292,9 +360,10 @@ limitations under the License. The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. - - - + + + - + + \ No newline at end of file diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 20c8be920011cf..73cb03e45c0693 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -5608,13 +5608,41 @@ cluster PumpConfigurationAndControl = 512 { cluster Thermostat = 513 { revision 6; - enum SetpointAdjustMode : enum8 { - kHeat = 0; - kCool = 1; - kBoth = 2; + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; + } + + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; } - enum ThermostatControlSequence : enum8 { + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -5623,13 +5651,29 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } - enum ThermostatRunningMode : enum8 { - kOff = 0; - kCool = 3; - kHeat = 4; + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; + } + + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; } - enum ThermostatSystemMode : enum8 { + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -5641,15 +5685,23 @@ cluster Thermostat = 513 { kSleep = 9; } - bitmap DayOfWeek : bitmap8 { - kSunday = 0x1; - kMonday = 0x2; - kTuesday = 0x4; - kWednesday = 0x8; - kThursday = 0x10; - kFriday = 0x20; - kSaturday = 0x40; - kAway = 0x80; + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; } bitmap Feature : bitmap32 { @@ -5662,24 +5714,64 @@ cluster Thermostat = 513 { kLocalTemperatureNotExposed = 0x40; } - bitmap ModeForSequence : bitmap8 { + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { kHeatSetpointPresent = 0x1; kCoolSetpointPresent = 0x2; } - struct ThermostatScheduleTransition { + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - nullable int16s heatSetpoint = 1; - nullable int16s coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } - readonly attribute nullable int16s localTemperature = 0; - readonly attribute optional nullable int16s outdoorTemperature = 1; + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; readonly attribute optional bitmap8 occupancy = 2; - readonly attribute optional int16s absMinHeatSetpointLimit = 3; - readonly attribute optional int16s absMaxHeatSetpointLimit = 4; - readonly attribute optional int16s absMinCoolSetpointLimit = 5; - readonly attribute optional int16s absMaxCoolSetpointLimit = 6; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; readonly attribute optional int8u PICoolingDemand = 7; readonly attribute optional int8u PIHeatingDemand = 8; attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; @@ -5693,18 +5785,18 @@ cluster Thermostat = 513 { attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; attribute access(write: manage) optional int8s minSetpointDeadBand = 25; - attribute access(write: manage) optional bitmap8 remoteSensing = 26; - attribute access(write: manage) ThermostatControlSequence controlSequenceOfOperation = 27; - attribute access(write: manage) enum8 systemMode = 28; - readonly attribute optional enum8 thermostatRunningMode = 30; - readonly attribute optional enum8 startOfWeek = 32; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; readonly attribute optional int8u numberOfWeeklyTransitions = 33; readonly attribute optional int8u numberOfDailyTransitions = 34; - attribute access(write: manage) optional enum8 temperatureSetpointHold = 35; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; - attribute access(write: manage) optional bitmap8 thermostatProgrammingOperationMode = 37; - readonly attribute optional bitmap16 thermostatRunningState = 41; - readonly attribute optional enum8 setpointChangeSource = 48; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; readonly attribute optional nullable int16s setpointChangeAmount = 49; readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; attribute access(write: manage) optional nullable int8u occupiedSetback = 52; @@ -5714,14 +5806,14 @@ cluster Thermostat = 513 { readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; attribute access(write: manage) optional int8u emergencyHeatDelta = 58; - attribute access(write: manage) optional enum8 ACType = 64; + attribute access(write: manage) optional ACTypeEnum ACType = 64; attribute access(write: manage) optional int16u ACCapacity = 65; - attribute access(write: manage) optional enum8 ACRefrigerantType = 66; - attribute access(write: manage) optional enum8 ACCompressorType = 67; - attribute access(write: manage) optional bitmap32 ACErrorCode = 68; - attribute access(write: manage) optional enum8 ACLouverPosition = 69; - readonly attribute optional nullable int16s ACCoilTemperature = 70; - attribute access(write: manage) optional enum8 ACCapacityformat = 71; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5730,27 +5822,27 @@ cluster Thermostat = 513 { readonly attribute int16u clusterRevision = 65533; request struct SetpointRaiseLowerRequest { - SetpointAdjustMode mode = 0; + SetpointRaiseLowerModeEnum mode = 0; int8s amount = 1; } response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - DayOfWeek dayOfWeekForSequence = 1; - ModeForSequence modeForSequence = 2; - ThermostatScheduleTransition transitions[] = 3; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index 5f62096b3ac315..1eed51794fad6f 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -34915,11 +34915,11 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public void setWeeklySchedule(DefaultClusterCallback callback, Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions) { + public void setWeeklySchedule(DefaultClusterCallback callback, Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions) { setWeeklySchedule(callback, numberOfTransitionsForSequence, dayOfWeekForSequence, modeForSequence, transitions, 0); } - public void setWeeklySchedule(DefaultClusterCallback callback, Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions, int timedInvokeTimeoutMs) { + public void setWeeklySchedule(DefaultClusterCallback callback, Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions, int timedInvokeTimeoutMs) { final long commandId = 1L; ArrayList elements = new ArrayList<>(); @@ -34974,7 +34974,7 @@ public void onResponse(StructType invokeStructValue) { final long modeForSequenceFieldID = 2L; Integer modeForSequence = null; final long transitionsFieldID = 3L; - ArrayList transitions = null; + ArrayList transitions = null; for (StructElement element: invokeStructValue.value()) { if (element.contextTagNum() == numberOfTransitionsForSequenceFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -34994,7 +34994,7 @@ public void onResponse(StructType invokeStructValue) { } else if (element.contextTagNum() == transitionsFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.Array) { ArrayType castingValue = element.value(ArrayType.class); - transitions = castingValue.map((elementcastingValue) -> ChipStructs.ThermostatClusterThermostatScheduleTransition.decodeTlv(elementcastingValue)); + transitions = castingValue.map((elementcastingValue) -> ChipStructs.ThermostatClusterWeeklyScheduleTransitionStruct.decodeTlv(elementcastingValue)); } } } @@ -35019,7 +35019,7 @@ public void onResponse(StructType invokeStructValue) { } public interface GetWeeklyScheduleResponseCallback extends BaseClusterCallback { - void onSuccess(Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions); + void onSuccess(Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions); } public interface LocalTemperatureAttributeCallback extends BaseAttributeCallback { diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java index 0ec9d77140e3f2..ba1b077bbf57b2 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java @@ -7049,7 +7049,7 @@ public String toString() { return output.toString(); } } -public static class ThermostatClusterThermostatScheduleTransition { +public static class ThermostatClusterWeeklyScheduleTransitionStruct { public Integer transitionTime; public @Nullable Integer heatSetpoint; public @Nullable Integer coolSetpoint; @@ -7057,7 +7057,7 @@ public static class ThermostatClusterThermostatScheduleTransition { private static final long HEAT_SETPOINT_ID = 1L; private static final long COOL_SETPOINT_ID = 2L; - public ThermostatClusterThermostatScheduleTransition( + public ThermostatClusterWeeklyScheduleTransitionStruct( Integer transitionTime, @Nullable Integer heatSetpoint, @Nullable Integer coolSetpoint @@ -7076,7 +7076,7 @@ public StructType encodeTlv() { return new StructType(values); } - public static ThermostatClusterThermostatScheduleTransition decodeTlv(BaseTLVType tlvValue) { + public static ThermostatClusterWeeklyScheduleTransitionStruct decodeTlv(BaseTLVType tlvValue) { if (tlvValue == null || tlvValue.type() != TLVType.Struct) { return null; } @@ -7101,7 +7101,7 @@ public static ThermostatClusterThermostatScheduleTransition decodeTlv(BaseTLVTyp } } } - return new ThermostatClusterThermostatScheduleTransition( + return new ThermostatClusterWeeklyScheduleTransitionStruct( transitionTime, heatSetpoint, coolSetpoint @@ -7111,7 +7111,7 @@ public static ThermostatClusterThermostatScheduleTransition decodeTlv(BaseTLVTyp @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("ThermostatClusterThermostatScheduleTransition {\n"); + output.append("ThermostatClusterWeeklyScheduleTransitionStruct {\n"); output.append("\ttransitionTime: "); output.append(transitionTime); output.append("\n"); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index a7d630abca1b50..db477f41ca12bd 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -11768,7 +11768,7 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions) { + public void onSuccess(Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo numberOfTransitionsForSequenceResponseValue = new CommandResponseInfo("numberOfTransitionsForSequence", "Integer"); @@ -11777,7 +11777,7 @@ public void onSuccess(Integer numberOfTransitionsForSequence, Integer dayOfWeekF responseValues.put(dayOfWeekForSequenceResponseValue, dayOfWeekForSequence); CommandResponseInfo modeForSequenceResponseValue = new CommandResponseInfo("modeForSequence", "Integer"); responseValues.put(modeForSequenceResponseValue, modeForSequence); - // transitions: ThermostatScheduleTransition + // transitions: WeeklyScheduleTransitionStruct // Conversion from this type to Java is not properly implemented yet callback.onSuccess(responseValues); @@ -23477,7 +23477,7 @@ public Map> getCommandMap() { commandArguments.get("dayOfWeekForSequence") , (Integer) commandArguments.get("modeForSequence") - , (ArrayList) + , (ArrayList) commandArguments.get("transitions") ); }, diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni index 9bfc09a2d3798c..a7049a39a43861 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni @@ -100,7 +100,7 @@ structs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ScenesClusterSceneInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt", diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt new file mode 100644 index 00000000000000..343952b9a54a79 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt @@ -0,0 +1,91 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ThermostatClusterWeeklyScheduleTransitionStruct( + val transitionTime: UInt, + val heatSetpoint: Int?, + val coolSetpoint: Int? +) { + override fun toString(): String = buildString { + append("ThermostatClusterWeeklyScheduleTransitionStruct {\n") + append("\ttransitionTime : $transitionTime\n") + append("\theatSetpoint : $heatSetpoint\n") + append("\tcoolSetpoint : $coolSetpoint\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_TRANSITION_TIME), transitionTime) + if (heatSetpoint != null) { + put(ContextSpecificTag(TAG_HEAT_SETPOINT), heatSetpoint) + } else { + putNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) + } + if (coolSetpoint != null) { + put(ContextSpecificTag(TAG_COOL_SETPOINT), coolSetpoint) + } else { + putNull(ContextSpecificTag(TAG_COOL_SETPOINT)) + } + endStructure() + } + } + + companion object { + private const val TAG_TRANSITION_TIME = 0 + private const val TAG_HEAT_SETPOINT = 1 + private const val TAG_COOL_SETPOINT = 2 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): ThermostatClusterWeeklyScheduleTransitionStruct { + tlvReader.enterStructure(tlvTag) + val transitionTime = tlvReader.getUInt(ContextSpecificTag(TAG_TRANSITION_TIME)) + val heatSetpoint = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_HEAT_SETPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) + null + } + val coolSetpoint = + if (!tlvReader.isNull()) { + tlvReader.getInt(ContextSpecificTag(TAG_COOL_SETPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_COOL_SETPOINT)) + null + } + + tlvReader.exitContainer() + + return ThermostatClusterWeeklyScheduleTransitionStruct( + transitionTime, + heatSetpoint, + coolSetpoint + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ThermostatCluster.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ThermostatCluster.kt index 1e451858dabaf1..6eeddc77e8fb7f 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ThermostatCluster.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/clusters/ThermostatCluster.kt @@ -25,7 +25,7 @@ class ThermostatCluster(private val controller: MatterController, private val en val numberOfTransitionsForSequence: UByte, val dayOfWeekForSequence: UInt, val modeForSequence: UInt, - val transitions: List + val transitions: List ) class LocalTemperatureAttribute(val value: Short?) @@ -72,7 +72,7 @@ class ThermostatCluster(private val controller: MatterController, private val en numberOfTransitionsForSequence: UByte, dayOfWeekForSequence: UInt, modeForSequence: UInt, - transitions: List, + transitions: List, timedInvokeTimeoutMs: Int? = null ) { val commandId = 1L diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni index 96cab92844d9b1..bbcafb5fbff65a 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni @@ -100,7 +100,7 @@ matter_structs_sources = [ "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ScenesClusterSceneInfoStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/SoftwareDiagnosticsClusterThreadMetricsStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/TargetNavigatorClusterTargetInfoStruct.kt", - "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThermostatClusterThermostatScheduleTransition.kt", + "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt", "${chip_root}/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterRouteTableStruct.kt", diff --git a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt new file mode 100644 index 00000000000000..5f93367f7ea4e3 --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt @@ -0,0 +1,91 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.devicecontroller.cluster.structs + +import matter.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ThermostatClusterWeeklyScheduleTransitionStruct( + val transitionTime: UShort, + val heatSetpoint: Short?, + val coolSetpoint: Short? +) { + override fun toString(): String = buildString { + append("ThermostatClusterWeeklyScheduleTransitionStruct {\n") + append("\ttransitionTime : $transitionTime\n") + append("\theatSetpoint : $heatSetpoint\n") + append("\tcoolSetpoint : $coolSetpoint\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_TRANSITION_TIME), transitionTime) + if (heatSetpoint != null) { + put(ContextSpecificTag(TAG_HEAT_SETPOINT), heatSetpoint) + } else { + putNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) + } + if (coolSetpoint != null) { + put(ContextSpecificTag(TAG_COOL_SETPOINT), coolSetpoint) + } else { + putNull(ContextSpecificTag(TAG_COOL_SETPOINT)) + } + endStructure() + } + } + + companion object { + private const val TAG_TRANSITION_TIME = 0 + private const val TAG_HEAT_SETPOINT = 1 + private const val TAG_COOL_SETPOINT = 2 + + fun fromTlv( + tlvTag: Tag, + tlvReader: TlvReader + ): ThermostatClusterWeeklyScheduleTransitionStruct { + tlvReader.enterStructure(tlvTag) + val transitionTime = tlvReader.getUShort(ContextSpecificTag(TAG_TRANSITION_TIME)) + val heatSetpoint = + if (!tlvReader.isNull()) { + tlvReader.getShort(ContextSpecificTag(TAG_HEAT_SETPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_HEAT_SETPOINT)) + null + } + val coolSetpoint = + if (!tlvReader.isNull()) { + tlvReader.getShort(ContextSpecificTag(TAG_COOL_SETPOINT)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_COOL_SETPOINT)) + null + } + + tlvReader.exitContainer() + + return ThermostatClusterWeeklyScheduleTransitionStruct( + transitionTime, + heatSetpoint, + coolSetpoint + ) + } + } +} diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 6879d8659a759e..aee716ee76a3f3 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -24661,7 +24661,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); + jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; @@ -24812,7 +24812,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); + jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; @@ -24828,7 +24828,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); + jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; @@ -25117,7 +25117,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jobject value; std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(cppValue); + jlong jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp index e55f6a63f9297c..c8b407678f3d20 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -5934,8 +5934,8 @@ JNI_METHOD(void, ThermostatCluster, writeRemoteSensingAttribute) std::vector> cleanupByteArrays; std::vector> cleanupStrings; - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + cppValue.SetRaw(static_cast::IntegerType>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value))); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -6202,8 +6202,8 @@ JNI_METHOD(void, ThermostatCluster, writeThermostatProgrammingOperationModeAttri std::vector> cleanupByteArrays; std::vector> cleanupStrings; - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + cppValue.SetRaw(static_cast::IntegerType>( + chip::JniReferences::GetInstance().IntegerToPrimitive(value))); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -6634,7 +6634,8 @@ JNI_METHOD(void, ThermostatCluster, writeACErrorCodeAttribute) std::vector> cleanupByteArrays; std::vector> cleanupStrings; - cppValue = static_cast>(chip::JniReferences::GetInstance().LongToPrimitive(value)); + cppValue.SetRaw(static_cast::IntegerType>( + chip::JniReferences::GetInstance().LongToPrimitive(value))); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index 6b14927999f48a..1c361f0c6f7546 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -4947,24 +4947,24 @@ void CHIPThermostatClusterGetWeeklyScheduleResponseCallback::CallbackFn( jninewElement_0_coolSetpoint, newElement_0_coolSetpoint); } - jclass thermostatScheduleTransitionStructClass_1; + jclass weeklyScheduleTransitionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ThermostatClusterThermostatScheduleTransition", - thermostatScheduleTransitionStructClass_1); + env, "chip/devicecontroller/ChipStructs$ThermostatClusterWeeklyScheduleTransitionStruct", + weeklyScheduleTransitionStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterThermostatScheduleTransition"); + ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterWeeklyScheduleTransitionStruct"); return; } - jmethodID thermostatScheduleTransitionStructCtor_1 = env->GetMethodID( - thermostatScheduleTransitionStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); - if (thermostatScheduleTransitionStructCtor_1 == nullptr) + jmethodID weeklyScheduleTransitionStructStructCtor_1 = env->GetMethodID( + weeklyScheduleTransitionStructStructClass_1, "", "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V"); + if (weeklyScheduleTransitionStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterThermostatScheduleTransition constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterWeeklyScheduleTransitionStruct constructor"); return; } - newElement_0 = env->NewObject(thermostatScheduleTransitionStructClass_1, thermostatScheduleTransitionStructCtor_1, + newElement_0 = env->NewObject(weeklyScheduleTransitionStructStructClass_1, weeklyScheduleTransitionStructStructCtor_1, newElement_0_transitionTime, newElement_0_heatSetpoint, newElement_0_coolSetpoint); chip::JniReferences::GetInstance().AddToList(Transitions, newElement_0); } diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 394088dc6a4ff4..ceaa6c58fc82fa 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -7841,7 +7841,7 @@ class ChipClusters: "numberOfTransitionsForSequence": "int", "dayOfWeekForSequence": "int", "modeForSequence": "int", - "transitions": "ThermostatScheduleTransition", + "transitions": "WeeklyScheduleTransitionStruct", }, }, 0x00000002: { diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index c31495ba34cfc9..9b7b5c38555d43 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -28166,17 +28166,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="maxCoolSetpointLimit", Tag=0x00000018, Type=typing.Optional[int]), ClusterObjectFieldDescriptor(Label="minSetpointDeadBand", Tag=0x00000019, Type=typing.Optional[int]), ClusterObjectFieldDescriptor(Label="remoteSensing", Tag=0x0000001A, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="controlSequenceOfOperation", Tag=0x0000001B, Type=Thermostat.Enums.ThermostatControlSequence), - ClusterObjectFieldDescriptor(Label="systemMode", Tag=0x0000001C, Type=uint), - ClusterObjectFieldDescriptor(Label="thermostatRunningMode", Tag=0x0000001E, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="startOfWeek", Tag=0x00000020, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="controlSequenceOfOperation", Tag=0x0000001B, Type=Thermostat.Enums.ControlSequenceOfOperationEnum), + ClusterObjectFieldDescriptor(Label="systemMode", Tag=0x0000001C, Type=Thermostat.Enums.SystemModeEnum), + ClusterObjectFieldDescriptor(Label="thermostatRunningMode", Tag=0x0000001E, Type=typing.Optional[Thermostat.Enums.ThermostatRunningModeEnum]), + ClusterObjectFieldDescriptor(Label="startOfWeek", Tag=0x00000020, Type=typing.Optional[Thermostat.Enums.StartOfWeekEnum]), ClusterObjectFieldDescriptor(Label="numberOfWeeklyTransitions", Tag=0x00000021, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="numberOfDailyTransitions", Tag=0x00000022, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="temperatureSetpointHold", Tag=0x00000023, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="temperatureSetpointHold", Tag=0x00000023, Type=typing.Optional[Thermostat.Enums.TemperatureSetpointHoldEnum]), ClusterObjectFieldDescriptor(Label="temperatureSetpointHoldDuration", Tag=0x00000024, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="thermostatProgrammingOperationMode", Tag=0x00000025, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="thermostatRunningState", Tag=0x00000029, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="setpointChangeSource", Tag=0x00000030, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="setpointChangeSource", Tag=0x00000030, Type=typing.Optional[Thermostat.Enums.SetpointChangeSourceEnum]), ClusterObjectFieldDescriptor(Label="setpointChangeAmount", Tag=0x00000031, Type=typing.Union[None, Nullable, int]), ClusterObjectFieldDescriptor(Label="setpointChangeSourceTimestamp", Tag=0x00000032, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="occupiedSetback", Tag=0x00000034, Type=typing.Union[None, Nullable, uint]), @@ -28186,14 +28186,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="unoccupiedSetbackMin", Tag=0x00000038, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="unoccupiedSetbackMax", Tag=0x00000039, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="emergencyHeatDelta", Tag=0x0000003A, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="ACType", Tag=0x00000040, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="ACType", Tag=0x00000040, Type=typing.Optional[Thermostat.Enums.ACTypeEnum]), ClusterObjectFieldDescriptor(Label="ACCapacity", Tag=0x00000041, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="ACRefrigerantType", Tag=0x00000042, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="ACCompressorType", Tag=0x00000043, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="ACRefrigerantType", Tag=0x00000042, Type=typing.Optional[Thermostat.Enums.ACRefrigerantTypeEnum]), + ClusterObjectFieldDescriptor(Label="ACCompressorType", Tag=0x00000043, Type=typing.Optional[Thermostat.Enums.ACCompressorTypeEnum]), ClusterObjectFieldDescriptor(Label="ACErrorCode", Tag=0x00000044, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="ACLouverPosition", Tag=0x00000045, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="ACLouverPosition", Tag=0x00000045, Type=typing.Optional[Thermostat.Enums.ACLouverPositionEnum]), ClusterObjectFieldDescriptor(Label="ACCoilTemperature", Tag=0x00000046, Type=typing.Union[None, Nullable, int]), - ClusterObjectFieldDescriptor(Label="ACCapacityformat", Tag=0x00000047, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="ACCapacityformat", Tag=0x00000047, Type=typing.Optional[Thermostat.Enums.ACCapacityFormatEnum]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -28223,17 +28223,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: maxCoolSetpointLimit: 'typing.Optional[int]' = None minSetpointDeadBand: 'typing.Optional[int]' = None remoteSensing: 'typing.Optional[uint]' = None - controlSequenceOfOperation: 'Thermostat.Enums.ThermostatControlSequence' = None - systemMode: 'uint' = None - thermostatRunningMode: 'typing.Optional[uint]' = None - startOfWeek: 'typing.Optional[uint]' = None + controlSequenceOfOperation: 'Thermostat.Enums.ControlSequenceOfOperationEnum' = None + systemMode: 'Thermostat.Enums.SystemModeEnum' = None + thermostatRunningMode: 'typing.Optional[Thermostat.Enums.ThermostatRunningModeEnum]' = None + startOfWeek: 'typing.Optional[Thermostat.Enums.StartOfWeekEnum]' = None numberOfWeeklyTransitions: 'typing.Optional[uint]' = None numberOfDailyTransitions: 'typing.Optional[uint]' = None - temperatureSetpointHold: 'typing.Optional[uint]' = None + temperatureSetpointHold: 'typing.Optional[Thermostat.Enums.TemperatureSetpointHoldEnum]' = None temperatureSetpointHoldDuration: 'typing.Union[None, Nullable, uint]' = None thermostatProgrammingOperationMode: 'typing.Optional[uint]' = None thermostatRunningState: 'typing.Optional[uint]' = None - setpointChangeSource: 'typing.Optional[uint]' = None + setpointChangeSource: 'typing.Optional[Thermostat.Enums.SetpointChangeSourceEnum]' = None setpointChangeAmount: 'typing.Union[None, Nullable, int]' = None setpointChangeSourceTimestamp: 'typing.Optional[uint]' = None occupiedSetback: 'typing.Union[None, Nullable, uint]' = None @@ -28243,14 +28243,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: unoccupiedSetbackMin: 'typing.Union[None, Nullable, uint]' = None unoccupiedSetbackMax: 'typing.Union[None, Nullable, uint]' = None emergencyHeatDelta: 'typing.Optional[uint]' = None - ACType: 'typing.Optional[uint]' = None + ACType: 'typing.Optional[Thermostat.Enums.ACTypeEnum]' = None ACCapacity: 'typing.Optional[uint]' = None - ACRefrigerantType: 'typing.Optional[uint]' = None - ACCompressorType: 'typing.Optional[uint]' = None + ACRefrigerantType: 'typing.Optional[Thermostat.Enums.ACRefrigerantTypeEnum]' = None + ACCompressorType: 'typing.Optional[Thermostat.Enums.ACCompressorTypeEnum]' = None ACErrorCode: 'typing.Optional[uint]' = None - ACLouverPosition: 'typing.Optional[uint]' = None + ACLouverPosition: 'typing.Optional[Thermostat.Enums.ACLouverPositionEnum]' = None ACCoilTemperature: 'typing.Union[None, Nullable, int]' = None - ACCapacityformat: 'typing.Optional[uint]' = None + ACCapacityformat: 'typing.Optional[Thermostat.Enums.ACCapacityFormatEnum]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -28259,17 +28259,61 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class SetpointAdjustMode(MatterIntEnum): - kHeat = 0x00 - kCool = 0x01 - kBoth = 0x02 + class ACCapacityFormatEnum(MatterIntEnum): + kBTUh = 0x00 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving and unknown # enum value. This specific should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 1, + + class ACCompressorTypeEnum(MatterIntEnum): + kUnknown = 0x00 + kT1 = 0x01 + kT2 = 0x02 + kT3 = 0x03 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 4, + + class ACLouverPositionEnum(MatterIntEnum): + kClosed = 0x01 + kOpen = 0x02 + kQuarter = 0x03 + kHalf = 0x04 + kThreeQuarters = 0x05 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 0, + + class ACRefrigerantTypeEnum(MatterIntEnum): + kUnknown = 0x00 + kR22 = 0x01 + kR410a = 0x02 + kR407c = 0x03 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 4, + + class ACTypeEnum(MatterIntEnum): + kUnknown = 0x00 + kCoolingFixed = 0x01 + kHeatPumpFixed = 0x02 + kCoolingInverter = 0x03 + kHeatPumpInverter = 0x04 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 5, - class ThermostatControlSequence(MatterIntEnum): + class ControlSequenceOfOperationEnum(MatterIntEnum): kCoolingOnly = 0x00 kCoolingWithReheat = 0x01 kHeatingOnly = 0x02 @@ -28282,17 +28326,41 @@ class ThermostatControlSequence(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 6, - class ThermostatRunningMode(MatterIntEnum): - kOff = 0x00 - kCool = 0x03 - kHeat = 0x04 + class SetpointChangeSourceEnum(MatterIntEnum): + kManual = 0x00 + kSchedule = 0x01 + kExternal = 0x02 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving and unknown # enum value. This specific should never be transmitted. - kUnknownEnumValue = 1, + kUnknownEnumValue = 3, - class ThermostatSystemMode(MatterIntEnum): + class SetpointRaiseLowerModeEnum(MatterIntEnum): + kHeat = 0x00 + kCool = 0x01 + kBoth = 0x02 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 3, + + class StartOfWeekEnum(MatterIntEnum): + kSunday = 0x00 + kMonday = 0x01 + kTuesday = 0x02 + kWednesday = 0x03 + kThursday = 0x04 + kFriday = 0x05 + kSaturday = 0x06 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 7, + + class SystemModeEnum(MatterIntEnum): kOff = 0x00 kAuto = 0x01 kCool = 0x03 @@ -28308,16 +28376,32 @@ class ThermostatSystemMode(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 2, + class TemperatureSetpointHoldEnum(MatterIntEnum): + kSetpointHoldOff = 0x00 + kSetpointHoldOn = 0x01 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 2, + + class ThermostatRunningModeEnum(MatterIntEnum): + kOff = 0x00 + kCool = 0x03 + kHeat = 0x04 + # All received enum values that are not listed above will be mapped + # to kUnknownEnumValue. This is a helper enum value that should only + # be used by code to process how it handles receiving and unknown + # enum value. This specific should never be transmitted. + kUnknownEnumValue = 1, + class Bitmaps: - class DayOfWeek(IntFlag): - kSunday = 0x1 - kMonday = 0x2 - kTuesday = 0x4 - kWednesday = 0x8 - kThursday = 0x10 - kFriday = 0x20 - kSaturday = 0x40 - kAway = 0x80 + class ACErrorCodeBitmap(IntFlag): + kCompressorFail = 0x1 + kRoomSensorFail = 0x2 + kOutdoorSensorFail = 0x4 + kCoilSensorFail = 0x8 + kFanFail = 0x10 class Feature(IntFlag): kHeating = 0x1 @@ -28328,13 +28412,48 @@ class Feature(IntFlag): kAutoMode = 0x20 kLocalTemperatureNotExposed = 0x40 - class ModeForSequence(IntFlag): + class HVACSystemTypeBitmap(IntFlag): + kCoolingStage = 0x3 + kHeatingStage = 0xC + kHeatingIsHeatPump = 0x10 + kHeatingUsesFuel = 0x20 + + class ProgrammingOperationModeBitmap(IntFlag): + kScheduleActive = 0x1 + kAutoRecovery = 0x2 + kEconomy = 0x4 + + class RelayStateBitmap(IntFlag): + kHeat = 0x1 + kCool = 0x2 + kFan = 0x4 + kHeatStage2 = 0x8 + kCoolStage2 = 0x10 + kFanStage2 = 0x20 + kFanStage3 = 0x40 + + class RemoteSensingBitmap(IntFlag): + kLocalTemperature = 0x1 + kOutdoorTemperature = 0x2 + kOccupancy = 0x4 + + class ScheduleDayOfWeekBitmap(IntFlag): + kSunday = 0x1 + kMonday = 0x2 + kTuesday = 0x4 + kWednesday = 0x8 + kThursday = 0x10 + kFriday = 0x20 + kSaturday = 0x40 + kAway = 0x80 + + class ScheduleModeBitmap(IntFlag): kHeatSetpointPresent = 0x1 kCoolSetpointPresent = 0x2 class Structs: @dataclass - class ThermostatScheduleTransition(ClusterObject): + class WeeklyScheduleTransitionStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( @@ -28360,11 +28479,11 @@ class SetpointRaiseLower(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="mode", Tag=0, Type=Thermostat.Enums.SetpointAdjustMode), + ClusterObjectFieldDescriptor(Label="mode", Tag=0, Type=Thermostat.Enums.SetpointRaiseLowerModeEnum), ClusterObjectFieldDescriptor(Label="amount", Tag=1, Type=int), ]) - mode: 'Thermostat.Enums.SetpointAdjustMode' = 0 + mode: 'Thermostat.Enums.SetpointRaiseLowerModeEnum' = 0 amount: 'int' = 0 @dataclass @@ -28381,13 +28500,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="numberOfTransitionsForSequence", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="dayOfWeekForSequence", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="modeForSequence", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="transitions", Tag=3, Type=typing.List[Thermostat.Structs.ThermostatScheduleTransition]), + ClusterObjectFieldDescriptor(Label="transitions", Tag=3, Type=typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]), ]) numberOfTransitionsForSequence: 'uint' = 0 dayOfWeekForSequence: 'uint' = 0 modeForSequence: 'uint' = 0 - transitions: 'typing.List[Thermostat.Structs.ThermostatScheduleTransition]' = field(default_factory=lambda: []) + transitions: 'typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]' = field(default_factory=lambda: []) @dataclass class SetWeeklySchedule(ClusterCommand): @@ -28403,13 +28522,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="numberOfTransitionsForSequence", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="dayOfWeekForSequence", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="modeForSequence", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="transitions", Tag=3, Type=typing.List[Thermostat.Structs.ThermostatScheduleTransition]), + ClusterObjectFieldDescriptor(Label="transitions", Tag=3, Type=typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]), ]) numberOfTransitionsForSequence: 'uint' = 0 dayOfWeekForSequence: 'uint' = 0 modeForSequence: 'uint' = 0 - transitions: 'typing.List[Thermostat.Structs.ThermostatScheduleTransition]' = field(default_factory=lambda: []) + transitions: 'typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]' = field(default_factory=lambda: []) @dataclass class GetWeeklySchedule(ClusterCommand): @@ -28791,9 +28910,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=Thermostat.Enums.ThermostatControlSequence) + return ClusterObjectFieldDescriptor(Type=Thermostat.Enums.ControlSequenceOfOperationEnum) - value: 'Thermostat.Enums.ThermostatControlSequence' = 0 + value: 'Thermostat.Enums.ControlSequenceOfOperationEnum' = 0 @dataclass class SystemMode(ClusterAttributeDescriptor): @@ -28807,9 +28926,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=uint) + return ClusterObjectFieldDescriptor(Type=Thermostat.Enums.SystemModeEnum) - value: 'uint' = 0 + value: 'Thermostat.Enums.SystemModeEnum' = 0 @dataclass class ThermostatRunningMode(ClusterAttributeDescriptor): @@ -28823,9 +28942,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ThermostatRunningModeEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[Thermostat.Enums.ThermostatRunningModeEnum]' = None @dataclass class StartOfWeek(ClusterAttributeDescriptor): @@ -28839,9 +28958,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.StartOfWeekEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[Thermostat.Enums.StartOfWeekEnum]' = None @dataclass class NumberOfWeeklyTransitions(ClusterAttributeDescriptor): @@ -28887,9 +29006,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.TemperatureSetpointHoldEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[Thermostat.Enums.TemperatureSetpointHoldEnum]' = None @dataclass class TemperatureSetpointHoldDuration(ClusterAttributeDescriptor): @@ -28951,9 +29070,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.SetpointChangeSourceEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[Thermostat.Enums.SetpointChangeSourceEnum]' = None @dataclass class SetpointChangeAmount(ClusterAttributeDescriptor): @@ -29111,9 +29230,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ACTypeEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[Thermostat.Enums.ACTypeEnum]' = None @dataclass class ACCapacity(ClusterAttributeDescriptor): @@ -29143,9 +29262,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ACRefrigerantTypeEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[Thermostat.Enums.ACRefrigerantTypeEnum]' = None @dataclass class ACCompressorType(ClusterAttributeDescriptor): @@ -29159,9 +29278,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ACCompressorTypeEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[Thermostat.Enums.ACCompressorTypeEnum]' = None @dataclass class ACErrorCode(ClusterAttributeDescriptor): @@ -29191,9 +29310,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ACLouverPositionEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[Thermostat.Enums.ACLouverPositionEnum]' = None @dataclass class ACCoilTemperature(ClusterAttributeDescriptor): @@ -29223,9 +29342,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[Thermostat.Enums.ACCapacityFormatEnum]) - value: 'typing.Optional[uint]' = None + value: 'typing.Optional[Thermostat.Enums.ACCapacityFormatEnum]' = None @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 46b8a46e08f0ac..23672a12d84896 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -3223,8 +3223,16 @@ Thermostat: - SetpointAdjustMode - ThermostatControlSequence - - ThermostatRunningMode - - ThermostatSystemMode + # ThermostatRunningModeEnum was originally named + # ThermostatRunningMode, but we generate the same API for the + # names with/without "Enum" at the end, so the name can just + # change here. + - ThermostatRunningModeEnum + # SystemModeEnum was originally named ThermostatSystemMode, but we + # generate the same API for the names with/without "Enum" at the + # end and the cluster name present/absent at the beginning, so the + # name can just change here. + - SystemModeEnum FanControl: - FanModeSequenceType - FanModeType @@ -3935,11 +3943,19 @@ - HeatingWithReheat - CoolingAndHeating - CoolingAndHeatingWithReheat - ThermostatRunningMode: + # ThermostatRunningModeEnum was originally named + # ThermostatRunningMode, but we generate the same API for the + # names with/without "Enum" at the end, so the name can just + # change here. + ThermostatRunningModeEnum: - Off - Cool - Heat - ThermostatSystemMode: + # SystemModeEnum was originally named ThermostatSystemMode, but we + # generate the same API for the names with/without "Enum" at the + # end and the cluster name present/absent at the beginning, so the + # name can just change here. + SystemModeEnum: - Off - Auto - Cool @@ -5899,7 +5915,11 @@ ParameterEnum: - Video Thermostat: - ThermostatSystemMode: + # SystemModeEnum was originally named ThermostatSystemMode, but we + # generate the same API for the names with/without "Enum" at the + # end and the cluster name present/absent at the beginning, so the + # name can just change here. + SystemModeEnum: - EmergencyHeat - Dry - Sleep @@ -6319,7 +6339,11 @@ - PIXELS - PERCENTAGE Thermostat: - ThermostatSystemMode: + # SystemModeEnum was originally named ThermostatSystemMode, but we + # generate the same API for the names with/without "Enum" at the + # end and the cluster name present/absent at the beginning, so the + # name can just change here. + SystemModeEnum: - EmergencyHeating SetpointAdjustMode: - HeatSetpoint @@ -6715,7 +6739,11 @@ Pixels: PIXELS Percentage: PERCENTAGE Thermostat: - ThermostatSystemMode: + # SystemModeEnum was originally named ThermostatSystemMode, but we + # generate the same API for the names with/without "Enum" at the + # end and the cluster name present/absent at the beginning, so the + # name can just change here. + SystemModeEnum: EmergencyHeat: EmergencyHeating SetpointAdjustMode: Heat: HeatSetpoint @@ -7839,6 +7867,8 @@ RVCCleanMode: - ModeTagStruct - ModeOptionStruct + Thermostat: + - WeeklyScheduleTransitionStruct struct fields: RVCOperationalState: OperationalStateStruct: @@ -7864,6 +7894,11 @@ - label - mode - modeTags + Thermostat: + WeeklyScheduleTransitionStruct: + - transitionTime + - heatSetpoint + - coolSetpoint events: RVCOperationalState: - OperationalError @@ -7897,6 +7932,9 @@ RVCCleanMode: - ModeTag - StatusCode + Thermostat: + - ControlSequenceOfOperationEnum + - SetpointRaiseLowerModeEnum enum values: ContentLauncher: StatusEnum: @@ -8043,6 +8081,18 @@ - Mop StatusCode: - CleaningInProgress + Thermostat: + ControlSequenceOfOperationEnum: + - CoolingOnly + - CoolingWithReheat + - HeatingOnly + - HeatingWithReheat + - CoolingAndHeating + - CoolingAndHeatingWithReheat + SetpointRaiseLowerModeEnum: + - Heat + - Cool + - Both bitmaps: Scenes: - CopyModeBitmap @@ -8056,6 +8106,9 @@ - Feature RVCCleanMode: - Feature + Thermostat: + - ScheduleDayOfWeekBitmap + - ScheduleModeBitmap bitmap values: PumpConfigurationAndControl: PumpStatusBitmap: @@ -8083,7 +8136,23 @@ RVCCleanMode: Feature: - OnOff + Thermostat: + ScheduleDayOfWeekBitmap: + - Sunday + - Monday + - Tuesday + - Wednesday + - Thursday + - Friday + - Saturday + - Away + ScheduleModeBitmap: + - HeatSetpointPresent + - CoolSetpointPresent deprecated: + structs: + Thermostat: + - ThermostatScheduleTransition event fields: WiFiNetworkDiagnostics: AssociationFailure: @@ -8093,6 +8162,9 @@ - ContentLaunchStatusEnum KeypadInput: - CecKeyCode + Thermostat: + - ThermostatControlSequence + - SetpointAdjustMode enum values: FanControl: FanModeSequenceEnum: @@ -8105,6 +8177,9 @@ - SupportedStreamingProtocol LevelControl: - LevelControlOptions + Thermostat: + - DayOfWeek + - ModeForSequence bitmap values: PumpConfigurationAndControl: PumpStatusBitmap: @@ -8246,6 +8321,16 @@ # Targeting Spring 2024 Matter release - TargetUpdated enums: + Thermostat: + # Targeting Spring 2024 Matter release + - StartOfWeekEnum + - TemperatureSetpointHoldEnum + - ACCapacityFormatEnum + - ACCompressorTypeEnum + - ACLouverPositionEnum + - ACRefrigerantTypeEnum + - ACTypeEnum + - SetpointChangeSourceEnum Channel: # Targeting Spring 2024 Matter release - ChannelTypeEnum @@ -8277,6 +8362,13 @@ Scenes: # Targeting Spring 2024 Matter release - NameSupportBitmap + Thermostat: + # Targeting Spring 2024 Matter release + - ACErrorCodeBitmap + - HVACSystemTypeBitmap + - ProgrammingOperationModeBitmap + - RelayStateBitmap + - RemoteSensingBitmap Channel: # Targeting Spring 2024 Matter release - RecordingFlagBitmap @@ -8311,6 +8403,9 @@ - TextTracks - AudioTracks renames: + structs: + Thermostat: + WeeklyScheduleTransitionStruct: ThermostatScheduleTransition event fields: WiFiNetworkDiagnostics: AssociationFailure: @@ -8320,6 +8415,9 @@ StatusEnum: ContentLaunchStatusEnum KeypadInput: CECKeyCodeEnum: CecKeyCode + Thermostat: + ControlSequenceOfOperationEnum: ThermostatControlSequence + SetpointRaiseLowerModeEnum: SetpointAdjustMode enum values: ContentLauncher: # The URLNotAvailable value got renamed at the same time @@ -8345,6 +8443,9 @@ SupportedProtocolsBitmap: SupportedStreamingProtocol LevelControl: OptionsBitmap: LevelControlOptions + Thermostat: + ScheduleDayOfWeekBitmap: DayOfWeek + ScheduleModeBitmap: ModeForSequence bitmap values: PumpConfigurationAndControl: PumpStatusBitmap: diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 0c496ccb3e2eec..068658d831aeac 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -9944,7 +9944,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } case Attributes::ControlSequenceOfOperation::Id: { @@ -9966,7 +9966,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::ThermostatRunningMode::Id: { @@ -9977,7 +9977,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::StartOfWeek::Id: { @@ -9988,7 +9988,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::NumberOfWeeklyTransitions::Id: { @@ -10021,7 +10021,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::TemperatureSetpointHoldDuration::Id: { @@ -10047,7 +10047,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } case Attributes::ThermostatRunningState::Id: { @@ -10058,7 +10058,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; return value; } case Attributes::SetpointChangeSource::Id: { @@ -10069,7 +10069,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::SetpointChangeAmount::Id: { @@ -10207,7 +10207,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::ACCapacity::Id: { @@ -10229,7 +10229,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::ACCompressorType::Id: { @@ -10240,7 +10240,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::ACErrorCode::Id: { @@ -10251,7 +10251,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; return value; } case Attributes::ACLouverPosition::Id: { @@ -10262,7 +10262,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } case Attributes::ACCoilTemperature::Id: { @@ -10288,7 +10288,7 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } default: { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 0ff039c1057447..1db156e4c1428c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -17573,29 +17573,108 @@ typedef NS_OPTIONS(uint16_t, MTRPumpConfigurationAndControlPumpStatus) { MTRPumpConfigurationAndControlPumpStatusRemoteTemperature MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmapRemoteTemperature", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)) = 0x100, } MTR_DEPRECATED("Please use MTRPumpConfigurationAndControlPumpStatusBitmap", ios(16.1, 16.5), macos(13.0, 13.4), watchos(9.1, 9.5), tvos(16.1, 16.5)); -typedef NS_ENUM(uint8_t, MTRThermostatSetpointAdjustMode) { - MTRThermostatSetpointAdjustModeHeat MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00, - MTRThermostatSetpointAdjustModeHeatSetpoint MTR_DEPRECATED("Please use MTRThermostatSetpointAdjustModeHeat", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, - MTRThermostatSetpointAdjustModeCool MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x01, - MTRThermostatSetpointAdjustModeCoolSetpoint MTR_DEPRECATED("Please use MTRThermostatSetpointAdjustModeCool", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, - MTRThermostatSetpointAdjustModeBoth MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x02, - MTRThermostatSetpointAdjustModeHeatAndCoolSetpoints MTR_DEPRECATED("Please use MTRThermostatSetpointAdjustModeBoth", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRThermostatACCapacityFormat) { + MTRThermostatACCapacityFormatBTUh MTR_PROVISIONALLY_AVAILABLE = 0x00, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatACCompressorType) { + MTRThermostatACCompressorTypeUnknown MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatACCompressorTypeT1 MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatACCompressorTypeT2 MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRThermostatACCompressorTypeT3 MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatACLouverPosition) { + MTRThermostatACLouverPositionClosed MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatACLouverPositionOpen MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRThermostatACLouverPositionQuarter MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRThermostatACLouverPositionHalf MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRThermostatACLouverPositionThreeQuarters MTR_PROVISIONALLY_AVAILABLE = 0x05, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatACRefrigerantType) { + MTRThermostatACRefrigerantTypeUnknown MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatACRefrigerantTypeR22 MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatACRefrigerantTypeR410a MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRThermostatACRefrigerantTypeR407c MTR_PROVISIONALLY_AVAILABLE = 0x03, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatACType) { + MTRThermostatACTypeUnknown MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatACTypeCoolingFixed MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatACTypeHeatPumpFixed MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRThermostatACTypeCoolingInverter MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRThermostatACTypeHeatPumpInverter MTR_PROVISIONALLY_AVAILABLE = 0x04, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatControlSequenceOfOperation) { + MTRThermostatControlSequenceOfOperationCoolingOnly MTR_NEWLY_AVAILABLE = 0x00, + MTRThermostatControlSequenceOfOperationCoolingWithReheat MTR_NEWLY_AVAILABLE = 0x01, + MTRThermostatControlSequenceOfOperationHeatingOnly MTR_NEWLY_AVAILABLE = 0x02, + MTRThermostatControlSequenceOfOperationHeatingWithReheat MTR_NEWLY_AVAILABLE = 0x03, + MTRThermostatControlSequenceOfOperationCoolingAndHeating MTR_NEWLY_AVAILABLE = 0x04, + MTRThermostatControlSequenceOfOperationCoolingAndHeatingWithReheat MTR_NEWLY_AVAILABLE = 0x05, +} MTR_NEWLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRThermostatControlSequence) { - MTRThermostatControlSequenceCoolingOnly MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRThermostatControlSequenceCoolingWithReheat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRThermostatControlSequenceHeatingOnly MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, - MTRThermostatControlSequenceHeatingWithReheat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRThermostatControlSequenceCoolingAndHeating MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRThermostatControlSequenceCoolingAndHeatingWithReheat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + MTRThermostatControlSequenceCoolingOnly MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationCoolingOnly") + = 0x00, + MTRThermostatControlSequenceCoolingWithReheat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationCoolingWithReheat") + = 0x01, + MTRThermostatControlSequenceHeatingOnly MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationHeatingOnly") + = 0x02, + MTRThermostatControlSequenceHeatingWithReheat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationHeatingWithReheat") + = 0x03, + MTRThermostatControlSequenceCoolingAndHeating MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationCoolingAndHeating") + = 0x04, + MTRThermostatControlSequenceCoolingAndHeatingWithReheat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationCoolingAndHeatingWithReheat") + = 0x05, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatControlSequenceOfOperation"); -typedef NS_ENUM(uint8_t, MTRThermostatRunningMode) { - MTRThermostatRunningModeOff MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRThermostatRunningModeCool MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRThermostatRunningModeHeat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTRThermostatSetpointChangeSource) { + MTRThermostatSetpointChangeSourceManual MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatSetpointChangeSourceSchedule MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatSetpointChangeSourceExternal MTR_PROVISIONALLY_AVAILABLE = 0x02, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatSetpointRaiseLowerMode) { + MTRThermostatSetpointRaiseLowerModeHeat MTR_NEWLY_AVAILABLE = 0x00, + MTRThermostatSetpointRaiseLowerModeCool MTR_NEWLY_AVAILABLE = 0x01, + MTRThermostatSetpointRaiseLowerModeBoth MTR_NEWLY_AVAILABLE = 0x02, +} MTR_NEWLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatSetpointAdjustMode) { + MTRThermostatSetpointAdjustModeHeat MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeHeat") + = 0x00, + MTRThermostatSetpointAdjustModeHeatSetpoint MTR_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeHeat", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00, + MTRThermostatSetpointAdjustModeCool MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeCool") + = 0x01, + MTRThermostatSetpointAdjustModeCoolSetpoint MTR_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeCool", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x01, + MTRThermostatSetpointAdjustModeBoth MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeBoth") + = 0x02, + MTRThermostatSetpointAdjustModeHeatAndCoolSetpoints MTR_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerModeBoth", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x02, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatSetpointRaiseLowerMode"); + +typedef NS_ENUM(uint8_t, MTRThermostatStartOfWeek) { + MTRThermostatStartOfWeekSunday MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatStartOfWeekMonday MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatStartOfWeekTuesday MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRThermostatStartOfWeekWednesday MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRThermostatStartOfWeekThursday MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRThermostatStartOfWeekFriday MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRThermostatStartOfWeekSaturday MTR_PROVISIONALLY_AVAILABLE = 0x06, +} MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRThermostatSystemMode) { MTRThermostatSystemModeOff MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, @@ -17610,18 +17689,25 @@ typedef NS_ENUM(uint8_t, MTRThermostatSystemMode) { MTRThermostatSystemModeSleep MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x09, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -typedef NS_OPTIONS(uint8_t, MTRThermostatDayOfWeek) { - MTRThermostatDayOfWeekSunday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRThermostatDayOfWeekMonday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, - MTRThermostatDayOfWeekTuesday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRThermostatDayOfWeekWednesday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, - MTRThermostatDayOfWeekThursday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, - MTRThermostatDayOfWeekFriday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, - MTRThermostatDayOfWeekSaturday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, - MTRThermostatDayOfWeekAway MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x80, - MTRThermostatDayOfWeekAwayOrVacation MTR_DEPRECATED("Please use MTRThermostatDayOfWeekAway", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x80, +typedef NS_ENUM(uint8_t, MTRThermostatTemperatureSetpointHold) { + MTRThermostatTemperatureSetpointHoldSetpointHoldOff MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatTemperatureSetpointHoldSetpointHoldOn MTR_PROVISIONALLY_AVAILABLE = 0x01, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTRThermostatRunningMode) { + MTRThermostatRunningModeOff MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRThermostatRunningModeCool MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRThermostatRunningModeHeat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRThermostatACErrorCodeBitmap) { + MTRThermostatACErrorCodeBitmapCompressorFail MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatACErrorCodeBitmapRoomSensorFail MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRThermostatACErrorCodeBitmapOutdoorSensorFail MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRThermostatACErrorCodeBitmapCoilSensorFail MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRThermostatACErrorCodeBitmapFanFail MTR_PROVISIONALLY_AVAILABLE = 0x10, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_OPTIONS(uint32_t, MTRThermostatFeature) { MTRThermostatFeatureHeating MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, MTRThermostatFeatureCooling MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, @@ -17634,12 +17720,91 @@ typedef NS_OPTIONS(uint32_t, MTRThermostatFeature) { MTRThermostatFeatureLocalTemperatureNotExposed MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x40, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint8_t, MTRThermostatHVACSystemTypeBitmap) { + MTRThermostatHVACSystemTypeBitmapCoolingStage MTR_PROVISIONALLY_AVAILABLE = 0x3, + MTRThermostatHVACSystemTypeBitmapHeatingStage MTR_PROVISIONALLY_AVAILABLE = 0xC, + MTRThermostatHVACSystemTypeBitmapHeatingIsHeatPump MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRThermostatHVACSystemTypeBitmapHeatingUsesFuel MTR_PROVISIONALLY_AVAILABLE = 0x20, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint8_t, MTRThermostatProgrammingOperationModeBitmap) { + MTRThermostatProgrammingOperationModeBitmapScheduleActive MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatProgrammingOperationModeBitmapAutoRecovery MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRThermostatProgrammingOperationModeBitmapEconomy MTR_PROVISIONALLY_AVAILABLE = 0x4, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint16_t, MTRThermostatRelayStateBitmap) { + MTRThermostatRelayStateBitmapHeat MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatRelayStateBitmapCool MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRThermostatRelayStateBitmapFan MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRThermostatRelayStateBitmapHeatStage2 MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRThermostatRelayStateBitmapCoolStage2 MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRThermostatRelayStateBitmapFanStage2 MTR_PROVISIONALLY_AVAILABLE = 0x20, + MTRThermostatRelayStateBitmapFanStage3 MTR_PROVISIONALLY_AVAILABLE = 0x40, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint8_t, MTRThermostatRemoteSensingBitmap) { + MTRThermostatRemoteSensingBitmapLocalTemperature MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatRemoteSensingBitmapOutdoorTemperature MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRThermostatRemoteSensingBitmapOccupancy MTR_PROVISIONALLY_AVAILABLE = 0x4, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint8_t, MTRThermostatScheduleDayOfWeekBitmap) { + MTRThermostatScheduleDayOfWeekBitmapSunday MTR_NEWLY_AVAILABLE = 0x1, + MTRThermostatScheduleDayOfWeekBitmapMonday MTR_NEWLY_AVAILABLE = 0x2, + MTRThermostatScheduleDayOfWeekBitmapTuesday MTR_NEWLY_AVAILABLE = 0x4, + MTRThermostatScheduleDayOfWeekBitmapWednesday MTR_NEWLY_AVAILABLE = 0x8, + MTRThermostatScheduleDayOfWeekBitmapThursday MTR_NEWLY_AVAILABLE = 0x10, + MTRThermostatScheduleDayOfWeekBitmapFriday MTR_NEWLY_AVAILABLE = 0x20, + MTRThermostatScheduleDayOfWeekBitmapSaturday MTR_NEWLY_AVAILABLE = 0x40, + MTRThermostatScheduleDayOfWeekBitmapAway MTR_NEWLY_AVAILABLE = 0x80, +} MTR_NEWLY_AVAILABLE; + +typedef NS_OPTIONS(uint8_t, MTRThermostatDayOfWeek) { + MTRThermostatDayOfWeekSunday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapSunday") + = 0x1, + MTRThermostatDayOfWeekMonday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapMonday") + = 0x2, + MTRThermostatDayOfWeekTuesday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapTuesday") + = 0x4, + MTRThermostatDayOfWeekWednesday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapWednesday") + = 0x8, + MTRThermostatDayOfWeekThursday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapThursday") + = 0x10, + MTRThermostatDayOfWeekFriday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapFriday") + = 0x20, + MTRThermostatDayOfWeekSaturday MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapSaturday") + = 0x40, + MTRThermostatDayOfWeekAway MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapAway") + = 0x80, + MTRThermostatDayOfWeekAwayOrVacation MTR_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmapAway", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x80, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleDayOfWeekBitmap"); + +typedef NS_OPTIONS(uint8_t, MTRThermostatScheduleModeBitmap) { + MTRThermostatScheduleModeBitmapHeatSetpointPresent MTR_NEWLY_AVAILABLE = 0x1, + MTRThermostatScheduleModeBitmapCoolSetpointPresent MTR_NEWLY_AVAILABLE = 0x2, +} MTR_NEWLY_AVAILABLE; + typedef NS_OPTIONS(uint8_t, MTRThermostatModeForSequence) { - MTRThermostatModeForSequenceHeatSetpointPresent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x1, - MTRThermostatModeForSequenceHeatSetpointFieldPresent MTR_DEPRECATED("Please use MTRThermostatModeForSequenceHeatSetpointPresent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, - MTRThermostatModeForSequenceCoolSetpointPresent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x2, - MTRThermostatModeForSequenceCoolSetpointFieldPresent MTR_DEPRECATED("Please use MTRThermostatModeForSequenceCoolSetpointPresent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + MTRThermostatModeForSequenceHeatSetpointPresent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleModeBitmapHeatSetpointPresent") + = 0x1, + MTRThermostatModeForSequenceHeatSetpointFieldPresent MTR_DEPRECATED("Please use MTRThermostatScheduleModeBitmapHeatSetpointPresent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x1, + MTRThermostatModeForSequenceCoolSetpointPresent MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleModeBitmapCoolSetpointPresent") + = 0x2, + MTRThermostatModeForSequenceCoolSetpointFieldPresent MTR_DEPRECATED("Please use MTRThermostatScheduleModeBitmapCoolSetpointPresent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, +} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatScheduleModeBitmap"); typedef NS_ENUM(uint8_t, MTRFanControlAirflowDirection) { MTRFanControlAirflowDirectionForward MTR_PROVISIONALLY_AVAILABLE = 0x00, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 49ea2821d06254..447b836708be5c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -64216,7 +64216,7 @@ - (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value params:( ListFreer listFreer; using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -64344,7 +64344,7 @@ - (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value params:(MTR ListFreer listFreer; using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -64552,7 +64552,7 @@ - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)valu ListFreer listFreer; using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -64685,7 +64685,7 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _N ListFreer listFreer; using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -65239,7 +65239,7 @@ - (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWrit ListFreer listFreer; using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -65367,7 +65367,7 @@ - (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value para ListFreer listFreer; using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -65431,7 +65431,7 @@ - (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value param ListFreer listFreer; using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -65495,7 +65495,7 @@ - (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value params:(MT ListFreer listFreer; using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; + cppValue = static_cast>(value.unsignedIntValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -65559,7 +65559,7 @@ - (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value param ListFreer listFreer; using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); @@ -65659,7 +65659,7 @@ - (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value param ListFreer listFreer; using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 222f8213226deb..319c22ab6ecc41 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -20941,8 +20941,8 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Thermost auto iter_0 = decodableStruct.transitions.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRThermostatClusterThermostatScheduleTransition * newElement_0; - newElement_0 = [MTRThermostatClusterThermostatScheduleTransition new]; + MTRThermostatClusterWeeklyScheduleTransitionStruct * newElement_0; + newElement_0 = [MTRThermostatClusterWeeklyScheduleTransitionStruct new]; newElement_0.transitionTime = [NSNumber numberWithUnsignedShort:entry_0.transitionTime]; if (entry_0.heatSetpoint.IsNull()) { newElement_0.heatSetpoint = nil; @@ -21034,11 +21034,11 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } listFreer.add(listHolder_0); for (size_t i_0 = 0; i_0 < self.transitions.count; ++i_0) { - if (![self.transitions[i_0] isKindOfClass:[MTRThermostatClusterThermostatScheduleTransition class]]) { + if (![self.transitions[i_0] isKindOfClass:[MTRThermostatClusterWeeklyScheduleTransitionStruct class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (MTRThermostatClusterThermostatScheduleTransition *) self.transitions[i_0]; + auto element_0 = (MTRThermostatClusterWeeklyScheduleTransitionStruct *) self.transitions[i_0]; listHolder_0->mList[i_0].transitionTime = element_0.transitionTime.unsignedShortValue; if (element_0.heatSetpoint == nil) { listHolder_0->mList[i_0].heatSetpoint.SetNull(); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 897b02746a79d2..65a361cf605a95 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -1402,11 +1402,22 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRPumpConfigurationAndControlClusterTurbineOperationEvent : NSObject @end +MTR_NEWLY_AVAILABLE +@interface MTRThermostatClusterWeeklyScheduleTransitionStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable heatSetpoint MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable coolSetpoint MTR_NEWLY_AVAILABLE; +@end + MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTRThermostatClusterThermostatScheduleTransition : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable heatSetpoint MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nullable coolSetpoint MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_NEWLY_DEPRECATED("Please use MTRThermostatClusterWeeklyScheduleTransitionStruct") +@interface MTRThermostatClusterThermostatScheduleTransition : MTRThermostatClusterWeeklyScheduleTransitionStruct +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatClusterWeeklyScheduleTransitionStruct"); +@property (nonatomic, copy) NSNumber * _Nullable heatSetpoint MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatClusterWeeklyScheduleTransitionStruct"); +@property (nonatomic, copy) NSNumber * _Nullable coolSetpoint MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatClusterWeeklyScheduleTransitionStruct"); @end MTR_PROVISIONALLY_AVAILABLE diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 4dce113940b30b..1262d5d534593a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -5855,7 +5855,7 @@ - (NSString *)description @end -@implementation MTRThermostatClusterThermostatScheduleTransition +@implementation MTRThermostatClusterWeeklyScheduleTransitionStruct - (instancetype)init { if (self = [super init]) { @@ -5871,7 +5871,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRThermostatClusterThermostatScheduleTransition alloc] init]; + auto other = [[MTRThermostatClusterWeeklyScheduleTransitionStruct alloc] init]; other.transitionTime = self.transitionTime; other.heatSetpoint = self.heatSetpoint; @@ -5888,6 +5888,12 @@ - (NSString *)description @end +@implementation MTRThermostatClusterThermostatScheduleTransition : MTRThermostatClusterWeeklyScheduleTransitionStruct +@dynamic transitionTime; +@dynamic heatSetpoint; +@dynamic coolSetpoint; +@end + @implementation MTRChannelClusterProgramCastStruct - (instancetype)init { diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index a2c2c50e52c268..8a37b3770fe22c 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp @@ -15425,7 +15425,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) @@ -15434,7 +15434,7 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) @@ -15478,7 +15478,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) @@ -15487,7 +15487,7 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) @@ -15559,7 +15559,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } } // namespace AbsMinHeatSetpointLimit @@ -15590,7 +15590,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } } // namespace AbsMaxHeatSetpointLimit @@ -15621,7 +15621,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } } // namespace AbsMinCoolSetpointLimit @@ -15652,7 +15652,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } } // namespace AbsMaxCoolSetpointLimit @@ -16062,9 +16062,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, int8_t value) namespace RemoteSensing { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16076,9 +16076,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -16093,9 +16093,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace ControlSequenceOfOperation { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatControlSequence * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16107,9 +16107,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::Th *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatControlSequence value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -16124,9 +16124,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::Th namespace SystemMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16138,9 +16138,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -16155,9 +16155,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace ThermostatRunningMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16169,9 +16169,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -16186,9 +16186,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace StartOfWeek { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16200,9 +16200,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -16279,9 +16279,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace TemperatureSetpointHold { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16293,9 +16293,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -16363,9 +16363,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace ThermostatProgrammingOperationMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16377,9 +16377,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -16394,9 +16394,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace ThermostatRunningState { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16408,9 +16408,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -16425,9 +16425,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace SetpointChangeSource { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16439,9 +16439,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -16889,9 +16889,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace ACType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16903,9 +16903,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -16951,9 +16951,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace ACRefrigerantType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16965,9 +16965,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -16982,9 +16982,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace ACCompressorType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -16996,9 +16996,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17013,9 +17013,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace ACErrorCode { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -17027,9 +17027,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17044,9 +17044,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) namespace ACLouverPosition { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -17058,9 +17058,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17102,7 +17102,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } EmberAfStatus SetNull(chip::EndpointId endpoint) @@ -17111,7 +17111,7 @@ EmberAfStatus SetNull(chip::EndpointId endpoint) Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) @@ -17128,9 +17128,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace ACCapacityformat { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -17142,9 +17142,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index 259cc40d0c46f4..616148bb9327fa 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h +++ b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h @@ -2806,14 +2806,14 @@ namespace Thermostat { namespace Attributes { namespace LocalTemperature { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace LocalTemperature namespace OutdoorTemperature { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); @@ -2825,22 +2825,22 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace Occupancy namespace AbsMinHeatSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace AbsMinHeatSetpointLimit namespace AbsMaxHeatSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace AbsMaxHeatSetpointLimit namespace AbsMinCoolSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace AbsMinCoolSetpointLimit namespace AbsMaxCoolSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace AbsMaxCoolSetpointLimit @@ -2910,29 +2910,31 @@ EmberAfStatus Set(chip::EndpointId endpoint, int8_t value); } // namespace MinSetpointDeadBand namespace RemoteSensing { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value); // RemoteSensingBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace RemoteSensing namespace ControlSequenceOfOperation { EmberAfStatus Get(chip::EndpointId endpoint, - chip::app::Clusters::Thermostat::ThermostatControlSequence * value); // ThermostatControlSequence -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatControlSequence value); + chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum * value); // ControlSequenceOfOperationEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum value); } // namespace ControlSequenceOfOperation namespace SystemMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum * value); // SystemModeEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum value); } // namespace SystemMode namespace ThermostatRunningMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::Thermostat::ThermostatRunningModeEnum * value); // ThermostatRunningModeEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum value); } // namespace ThermostatRunningMode namespace StartOfWeek { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum * value); // StartOfWeekEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum value); } // namespace StartOfWeek namespace NumberOfWeeklyTransitions { @@ -2946,8 +2948,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace NumberOfDailyTransitions namespace TemperatureSetpointHold { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum * value); // TemperatureSetpointHoldEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum value); } // namespace TemperatureSetpointHold namespace TemperatureSetpointHoldDuration { @@ -2958,18 +2961,22 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl } // namespace TemperatureSetpointHoldDuration namespace ThermostatProgrammingOperationMode { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus +Get(chip::EndpointId endpoint, + chip::BitMask * value); // ProgrammingOperationModeBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace ThermostatProgrammingOperationMode namespace ThermostatRunningState { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // bitmap16 -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value); // RelayStateBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace ThermostatRunningState namespace SetpointChangeSource { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::Thermostat::SetpointChangeSourceEnum * value); // SetpointChangeSourceEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum value); } // namespace SetpointChangeSource namespace SetpointChangeAmount { @@ -3032,8 +3039,8 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace EmergencyHeatDelta namespace ACType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum * value); // ACTypeEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum value); } // namespace ACType namespace ACCapacity { @@ -3042,35 +3049,37 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace ACCapacity namespace ACRefrigerantType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum * value); // ACRefrigerantTypeEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum value); } // namespace ACRefrigerantType namespace ACCompressorType { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum * value); // ACCompressorTypeEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum value); } // namespace ACCompressorType namespace ACErrorCode { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * value); // ACErrorCodeBitmap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitMask value); } // namespace ACErrorCode namespace ACLouverPosition { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum * value); // ACLouverPositionEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum value); } // namespace ACLouverPosition namespace ACCoilTemperature { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // temperature EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); EmberAfStatus SetNull(chip::EndpointId endpoint); EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace ACCoilTemperature namespace ACCapacityformat { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum * value); // ACCapacityFormatEnum +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum value); } // namespace ACCapacityformat namespace FeatureMap { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index e55aa6b0c1426d..7ef15603b1df39 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -2170,22 +2170,78 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(PumpConfigurationAndCon } } -static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::SetpointAdjustMode val) +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ACCapacityFormatEnum val) { - using EnumType = Thermostat::SetpointAdjustMode; + using EnumType = Thermostat::ACCapacityFormatEnum; switch (val) { - case EnumType::kHeat: - case EnumType::kCool: - case EnumType::kBoth: + case EnumType::kBTUh: return val; default: - return static_cast(3); + return static_cast(1); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ACCompressorTypeEnum val) +{ + using EnumType = Thermostat::ACCompressorTypeEnum; + switch (val) + { + case EnumType::kUnknown: + case EnumType::kT1: + case EnumType::kT2: + case EnumType::kT3: + return val; + default: + return static_cast(4); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ThermostatControlSequence val) +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ACLouverPositionEnum val) { - using EnumType = Thermostat::ThermostatControlSequence; + using EnumType = Thermostat::ACLouverPositionEnum; + switch (val) + { + case EnumType::kClosed: + case EnumType::kOpen: + case EnumType::kQuarter: + case EnumType::kHalf: + case EnumType::kThreeQuarters: + return val; + default: + return static_cast(0); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ACRefrigerantTypeEnum val) +{ + using EnumType = Thermostat::ACRefrigerantTypeEnum; + switch (val) + { + case EnumType::kUnknown: + case EnumType::kR22: + case EnumType::kR410a: + case EnumType::kR407c: + return val; + default: + return static_cast(4); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ACTypeEnum val) +{ + using EnumType = Thermostat::ACTypeEnum; + switch (val) + { + case EnumType::kUnknown: + case EnumType::kCoolingFixed: + case EnumType::kHeatPumpFixed: + case EnumType::kCoolingInverter: + case EnumType::kHeatPumpInverter: + return val; + default: + return static_cast(5); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ControlSequenceOfOperationEnum val) +{ + using EnumType = Thermostat::ControlSequenceOfOperationEnum; switch (val) { case EnumType::kCoolingOnly: @@ -2199,22 +2255,52 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ThermostatC return static_cast(6); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ThermostatRunningMode val) +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::SetpointChangeSourceEnum val) { - using EnumType = Thermostat::ThermostatRunningMode; + using EnumType = Thermostat::SetpointChangeSourceEnum; + switch (val) + { + case EnumType::kManual: + case EnumType::kSchedule: + case EnumType::kExternal: + return val; + default: + return static_cast(3); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::SetpointRaiseLowerModeEnum val) +{ + using EnumType = Thermostat::SetpointRaiseLowerModeEnum; switch (val) { - case EnumType::kOff: - case EnumType::kCool: case EnumType::kHeat: + case EnumType::kCool: + case EnumType::kBoth: return val; default: - return static_cast(1); + return static_cast(3); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::StartOfWeekEnum val) +{ + using EnumType = Thermostat::StartOfWeekEnum; + switch (val) + { + case EnumType::kSunday: + case EnumType::kMonday: + case EnumType::kTuesday: + case EnumType::kWednesday: + case EnumType::kThursday: + case EnumType::kFriday: + case EnumType::kSaturday: + return val; + default: + return static_cast(7); } } -static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ThermostatSystemMode val) +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::SystemModeEnum val) { - using EnumType = Thermostat::ThermostatSystemMode; + using EnumType = Thermostat::SystemModeEnum; switch (val) { case EnumType::kOff: @@ -2231,6 +2317,31 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ThermostatS return static_cast(2); } } +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::TemperatureSetpointHoldEnum val) +{ + using EnumType = Thermostat::TemperatureSetpointHoldEnum; + switch (val) + { + case EnumType::kSetpointHoldOff: + case EnumType::kSetpointHoldOn: + return val; + default: + return static_cast(2); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ThermostatRunningModeEnum val) +{ + using EnumType = Thermostat::ThermostatRunningModeEnum; + switch (val) + { + case EnumType::kOff: + case EnumType::kCool: + case EnumType::kHeat: + return val; + default: + return static_cast(1); + } +} static auto __attribute__((unused)) EnsureKnownEnumValue(FanControl::AirflowDirectionEnum val) { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index edf7ad13dc3cc8..bd815d7b2bdebe 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -3191,21 +3191,77 @@ enum class PumpStatusBitmap : uint16_t namespace Thermostat { -// Enum for SetpointAdjustMode -enum class SetpointAdjustMode : uint8_t +// Enum for ACCapacityFormatEnum +enum class ACCapacityFormatEnum : uint8_t { - kHeat = 0x00, - kCool = 0x01, - kBoth = 0x02, + kBTUh = 0x00, // All received enum values that are not listed above will be mapped // to kUnknownEnumValue. This is a helper enum value that should only // be used by code to process how it handles receiving and unknown // enum value. This specific should never be transmitted. - kUnknownEnumValue = 3, + kUnknownEnumValue = 1, +}; + +// Enum for ACCompressorTypeEnum +enum class ACCompressorTypeEnum : uint8_t +{ + kUnknown = 0x00, + kT1 = 0x01, + kT2 = 0x02, + kT3 = 0x03, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 4, +}; + +// Enum for ACLouverPositionEnum +enum class ACLouverPositionEnum : uint8_t +{ + kClosed = 0x01, + kOpen = 0x02, + kQuarter = 0x03, + kHalf = 0x04, + kThreeQuarters = 0x05, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 0, +}; + +// Enum for ACRefrigerantTypeEnum +enum class ACRefrigerantTypeEnum : uint8_t +{ + kUnknown = 0x00, + kR22 = 0x01, + kR410a = 0x02, + kR407c = 0x03, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 4, +}; + +// Enum for ACTypeEnum +enum class ACTypeEnum : uint8_t +{ + kUnknown = 0x00, + kCoolingFixed = 0x01, + kHeatPumpFixed = 0x02, + kCoolingInverter = 0x03, + kHeatPumpInverter = 0x04, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 5, }; -// Enum for ThermostatControlSequence -enum class ThermostatControlSequence : uint8_t +// Enum for ControlSequenceOfOperationEnum +enum class ControlSequenceOfOperationEnum : uint8_t { kCoolingOnly = 0x00, kCoolingWithReheat = 0x01, @@ -3220,21 +3276,51 @@ enum class ThermostatControlSequence : uint8_t kUnknownEnumValue = 6, }; -// Enum for ThermostatRunningMode -enum class ThermostatRunningMode : uint8_t +// Enum for SetpointChangeSourceEnum +enum class SetpointChangeSourceEnum : uint8_t { - kOff = 0x00, - kCool = 0x03, - kHeat = 0x04, + kManual = 0x00, + kSchedule = 0x01, + kExternal = 0x02, // All received enum values that are not listed above will be mapped // to kUnknownEnumValue. This is a helper enum value that should only // be used by code to process how it handles receiving and unknown // enum value. This specific should never be transmitted. - kUnknownEnumValue = 1, + kUnknownEnumValue = 3, }; -// Enum for ThermostatSystemMode -enum class ThermostatSystemMode : uint8_t +// Enum for SetpointRaiseLowerModeEnum +enum class SetpointRaiseLowerModeEnum : uint8_t +{ + kHeat = 0x00, + kCool = 0x01, + kBoth = 0x02, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 3, +}; + +// Enum for StartOfWeekEnum +enum class StartOfWeekEnum : uint8_t +{ + kSunday = 0x00, + kMonday = 0x01, + kTuesday = 0x02, + kWednesday = 0x03, + kThursday = 0x04, + kFriday = 0x05, + kSaturday = 0x06, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 7, +}; + +// Enum for SystemModeEnum +enum class SystemModeEnum : uint8_t { kOff = 0x00, kAuto = 0x01, @@ -3252,17 +3338,39 @@ enum class ThermostatSystemMode : uint8_t kUnknownEnumValue = 2, }; -// Bitmap for DayOfWeek -enum class DayOfWeek : uint8_t +// Enum for TemperatureSetpointHoldEnum +enum class TemperatureSetpointHoldEnum : uint8_t { - kSunday = 0x1, - kMonday = 0x2, - kTuesday = 0x4, - kWednesday = 0x8, - kThursday = 0x10, - kFriday = 0x20, - kSaturday = 0x40, - kAway = 0x80, + kSetpointHoldOff = 0x00, + kSetpointHoldOn = 0x01, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 2, +}; + +// Enum for ThermostatRunningModeEnum +enum class ThermostatRunningModeEnum : uint8_t +{ + kOff = 0x00, + kCool = 0x03, + kHeat = 0x04, + // All received enum values that are not listed above will be mapped + // to kUnknownEnumValue. This is a helper enum value that should only + // be used by code to process how it handles receiving and unknown + // enum value. This specific should never be transmitted. + kUnknownEnumValue = 1, +}; + +// Bitmap for ACErrorCodeBitmap +enum class ACErrorCodeBitmap : uint32_t +{ + kCompressorFail = 0x1, + kRoomSensorFail = 0x2, + kOutdoorSensorFail = 0x4, + kCoilSensorFail = 0x8, + kFanFail = 0x10, }; // Bitmap for Feature @@ -3277,8 +3385,58 @@ enum class Feature : uint32_t kLocalTemperatureNotExposed = 0x40, }; -// Bitmap for ModeForSequence -enum class ModeForSequence : uint8_t +// Bitmap for HVACSystemTypeBitmap +enum class HVACSystemTypeBitmap : uint8_t +{ + kCoolingStage = 0x3, + kHeatingStage = 0xC, + kHeatingIsHeatPump = 0x10, + kHeatingUsesFuel = 0x20, +}; + +// Bitmap for ProgrammingOperationModeBitmap +enum class ProgrammingOperationModeBitmap : uint8_t +{ + kScheduleActive = 0x1, + kAutoRecovery = 0x2, + kEconomy = 0x4, +}; + +// Bitmap for RelayStateBitmap +enum class RelayStateBitmap : uint16_t +{ + kHeat = 0x1, + kCool = 0x2, + kFan = 0x4, + kHeatStage2 = 0x8, + kCoolStage2 = 0x10, + kFanStage2 = 0x20, + kFanStage3 = 0x40, +}; + +// Bitmap for RemoteSensingBitmap +enum class RemoteSensingBitmap : uint8_t +{ + kLocalTemperature = 0x1, + kOutdoorTemperature = 0x2, + kOccupancy = 0x4, +}; + +// Bitmap for ScheduleDayOfWeekBitmap +enum class ScheduleDayOfWeekBitmap : uint8_t +{ + kSunday = 0x1, + kMonday = 0x2, + kTuesday = 0x4, + kWednesday = 0x8, + kThursday = 0x10, + kFriday = 0x20, + kSaturday = 0x40, + kAway = 0x80, +}; + +// Bitmap for ScheduleModeBitmap +enum class ScheduleModeBitmap : uint8_t { kHeatSetpointPresent = 0x1, kCoolSetpointPresent = 0x2, diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index a50c729dc7cd99..56efe1d5e0bc3e 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -18465,7 +18465,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) namespace Thermostat { namespace Structs { -namespace ThermostatScheduleTransition { +namespace WeeklyScheduleTransitionStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; @@ -18509,7 +18509,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } -} // namespace ThermostatScheduleTransition +} // namespace WeeklyScheduleTransitionStruct } // namespace Structs namespace Commands { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 39bbac1c12ac58..421dad0af3e981 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -26102,7 +26102,7 @@ struct DecodableType } // namespace PumpConfigurationAndControl namespace Thermostat { namespace Structs { -namespace ThermostatScheduleTransition { +namespace WeeklyScheduleTransitionStruct { enum class Fields : uint8_t { kTransitionTime = 0, @@ -26126,7 +26126,7 @@ struct Type using DecodableType = Type; -} // namespace ThermostatScheduleTransition +} // namespace WeeklyScheduleTransitionStruct } // namespace Structs namespace Commands { @@ -26174,8 +26174,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetpointRaiseLower::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - SetpointAdjustMode mode = static_cast(0); - int8_t amount = static_cast(0); + SetpointRaiseLowerModeEnum mode = static_cast(0); + int8_t amount = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -26190,8 +26190,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetpointRaiseLower::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - SetpointAdjustMode mode = static_cast(0); - int8_t amount = static_cast(0); + SetpointRaiseLowerModeEnum mode = static_cast(0); + int8_t amount = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SetpointRaiseLower @@ -26211,10 +26211,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetWeeklyScheduleResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitMask dayOfWeekForSequence = static_cast>(0); - chip::BitMask modeForSequence = static_cast>(0); - DataModel::List transitions; + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitMask dayOfWeekForSequence = static_cast>(0); + chip::BitMask modeForSequence = static_cast>(0); + DataModel::List transitions; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -26229,10 +26229,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetWeeklyScheduleResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitMask dayOfWeekForSequence = static_cast>(0); - chip::BitMask modeForSequence = static_cast>(0); - DataModel::DecodableList transitions; + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitMask dayOfWeekForSequence = static_cast>(0); + chip::BitMask modeForSequence = static_cast>(0); + DataModel::DecodableList transitions; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetWeeklyScheduleResponse @@ -26252,10 +26252,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::SetWeeklySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitMask dayOfWeekForSequence = static_cast>(0); - chip::BitMask modeForSequence = static_cast>(0); - DataModel::List transitions; + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitMask dayOfWeekForSequence = static_cast>(0); + chip::BitMask modeForSequence = static_cast>(0); + DataModel::List transitions; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -26270,10 +26270,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::SetWeeklySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitMask dayOfWeekForSequence = static_cast>(0); - chip::BitMask modeForSequence = static_cast>(0); - DataModel::DecodableList transitions; + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitMask dayOfWeekForSequence = static_cast>(0); + chip::BitMask modeForSequence = static_cast>(0); + DataModel::DecodableList transitions; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace SetWeeklySchedule @@ -26291,8 +26291,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetWeeklySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - chip::BitMask daysToReturn = static_cast>(0); - chip::BitMask modeToReturn = static_cast>(0); + chip::BitMask daysToReturn = static_cast>(0); + chip::BitMask modeToReturn = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -26307,8 +26307,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetWeeklySchedule::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - chip::BitMask daysToReturn = static_cast>(0); - chip::BitMask modeToReturn = static_cast>(0); + chip::BitMask daysToReturn = static_cast>(0); + chip::BitMask modeToReturn = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetWeeklySchedule @@ -26587,9 +26587,9 @@ struct TypeInfo namespace RemoteSensing { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::RemoteSensing::Id; } @@ -26599,9 +26599,9 @@ struct TypeInfo namespace ControlSequenceOfOperation { struct TypeInfo { - using Type = chip::app::Clusters::Thermostat::ThermostatControlSequence; - using DecodableType = chip::app::Clusters::Thermostat::ThermostatControlSequence; - using DecodableArgType = chip::app::Clusters::Thermostat::ThermostatControlSequence; + using Type = chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum; + using DecodableType = chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ControlSequenceOfOperation::Id; } @@ -26611,9 +26611,9 @@ struct TypeInfo namespace SystemMode { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::Thermostat::SystemModeEnum; + using DecodableType = chip::app::Clusters::Thermostat::SystemModeEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::SystemModeEnum; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SystemMode::Id; } @@ -26623,9 +26623,9 @@ struct TypeInfo namespace ThermostatRunningMode { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum; + using DecodableType = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::ThermostatRunningModeEnum; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ThermostatRunningMode::Id; } @@ -26635,9 +26635,9 @@ struct TypeInfo namespace StartOfWeek { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::Thermostat::StartOfWeekEnum; + using DecodableType = chip::app::Clusters::Thermostat::StartOfWeekEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::StartOfWeekEnum; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::StartOfWeek::Id; } @@ -26671,9 +26671,9 @@ struct TypeInfo namespace TemperatureSetpointHold { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum; + using DecodableType = chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::TemperatureSetpointHold::Id; } @@ -26695,9 +26695,9 @@ struct TypeInfo namespace ThermostatProgrammingOperationMode { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ThermostatProgrammingOperationMode::Id; } @@ -26707,9 +26707,9 @@ struct TypeInfo namespace ThermostatRunningState { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ThermostatRunningState::Id; } @@ -26719,9 +26719,9 @@ struct TypeInfo namespace SetpointChangeSource { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::Thermostat::SetpointChangeSourceEnum; + using DecodableType = chip::app::Clusters::Thermostat::SetpointChangeSourceEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::SetpointChangeSourceEnum; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SetpointChangeSource::Id; } @@ -26839,9 +26839,9 @@ struct TypeInfo namespace ACType { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::Thermostat::ACTypeEnum; + using DecodableType = chip::app::Clusters::Thermostat::ACTypeEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::ACTypeEnum; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ACType::Id; } @@ -26863,9 +26863,9 @@ struct TypeInfo namespace ACRefrigerantType { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum; + using DecodableType = chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ACRefrigerantType::Id; } @@ -26875,9 +26875,9 @@ struct TypeInfo namespace ACCompressorType { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::Thermostat::ACCompressorTypeEnum; + using DecodableType = chip::app::Clusters::Thermostat::ACCompressorTypeEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::ACCompressorTypeEnum; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ACCompressorType::Id; } @@ -26887,9 +26887,9 @@ struct TypeInfo namespace ACErrorCode { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ACErrorCode::Id; } @@ -26899,9 +26899,9 @@ struct TypeInfo namespace ACLouverPosition { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::Thermostat::ACLouverPositionEnum; + using DecodableType = chip::app::Clusters::Thermostat::ACLouverPositionEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::ACLouverPositionEnum; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ACLouverPosition::Id; } @@ -26923,9 +26923,9 @@ struct TypeInfo namespace ACCapacityformat { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::Thermostat::ACCapacityFormatEnum; + using DecodableType = chip::app::Clusters::Thermostat::ACCapacityFormatEnum; + using DecodableArgType = chip::app::Clusters::Thermostat::ACCapacityFormatEnum; static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::ACCapacityformat::Id; } @@ -26997,20 +26997,27 @@ struct TypeInfo Attributes::MinCoolSetpointLimit::TypeInfo::DecodableType minCoolSetpointLimit = static_cast(0); Attributes::MaxCoolSetpointLimit::TypeInfo::DecodableType maxCoolSetpointLimit = static_cast(0); Attributes::MinSetpointDeadBand::TypeInfo::DecodableType minSetpointDeadBand = static_cast(0); - Attributes::RemoteSensing::TypeInfo::DecodableType remoteSensing = static_cast(0); + Attributes::RemoteSensing::TypeInfo::DecodableType remoteSensing = + static_cast>(0); Attributes::ControlSequenceOfOperation::TypeInfo::DecodableType controlSequenceOfOperation = - static_cast(0); - Attributes::SystemMode::TypeInfo::DecodableType systemMode = static_cast(0); - Attributes::ThermostatRunningMode::TypeInfo::DecodableType thermostatRunningMode = static_cast(0); - Attributes::StartOfWeek::TypeInfo::DecodableType startOfWeek = static_cast(0); + static_cast(0); + Attributes::SystemMode::TypeInfo::DecodableType systemMode = + static_cast(0); + Attributes::ThermostatRunningMode::TypeInfo::DecodableType thermostatRunningMode = + static_cast(0); + Attributes::StartOfWeek::TypeInfo::DecodableType startOfWeek = + static_cast(0); Attributes::NumberOfWeeklyTransitions::TypeInfo::DecodableType numberOfWeeklyTransitions = static_cast(0); Attributes::NumberOfDailyTransitions::TypeInfo::DecodableType numberOfDailyTransitions = static_cast(0); - Attributes::TemperatureSetpointHold::TypeInfo::DecodableType temperatureSetpointHold = static_cast(0); + Attributes::TemperatureSetpointHold::TypeInfo::DecodableType temperatureSetpointHold = + static_cast(0); Attributes::TemperatureSetpointHoldDuration::TypeInfo::DecodableType temperatureSetpointHoldDuration; Attributes::ThermostatProgrammingOperationMode::TypeInfo::DecodableType thermostatProgrammingOperationMode = - static_cast(0); - Attributes::ThermostatRunningState::TypeInfo::DecodableType thermostatRunningState = static_cast(0); - Attributes::SetpointChangeSource::TypeInfo::DecodableType setpointChangeSource = static_cast(0); + static_cast>(0); + Attributes::ThermostatRunningState::TypeInfo::DecodableType thermostatRunningState = + static_cast>(0); + Attributes::SetpointChangeSource::TypeInfo::DecodableType setpointChangeSource = + static_cast(0); Attributes::SetpointChangeAmount::TypeInfo::DecodableType setpointChangeAmount; Attributes::SetpointChangeSourceTimestamp::TypeInfo::DecodableType setpointChangeSourceTimestamp = static_cast(0); Attributes::OccupiedSetback::TypeInfo::DecodableType occupiedSetback; @@ -27020,14 +27027,19 @@ struct TypeInfo Attributes::UnoccupiedSetbackMin::TypeInfo::DecodableType unoccupiedSetbackMin; Attributes::UnoccupiedSetbackMax::TypeInfo::DecodableType unoccupiedSetbackMax; Attributes::EmergencyHeatDelta::TypeInfo::DecodableType emergencyHeatDelta = static_cast(0); - Attributes::ACType::TypeInfo::DecodableType ACType = static_cast(0); - Attributes::ACCapacity::TypeInfo::DecodableType ACCapacity = static_cast(0); - Attributes::ACRefrigerantType::TypeInfo::DecodableType ACRefrigerantType = static_cast(0); - Attributes::ACCompressorType::TypeInfo::DecodableType ACCompressorType = static_cast(0); - Attributes::ACErrorCode::TypeInfo::DecodableType ACErrorCode = static_cast(0); - Attributes::ACLouverPosition::TypeInfo::DecodableType ACLouverPosition = static_cast(0); + Attributes::ACType::TypeInfo::DecodableType ACType = static_cast(0); + Attributes::ACCapacity::TypeInfo::DecodableType ACCapacity = static_cast(0); + Attributes::ACRefrigerantType::TypeInfo::DecodableType ACRefrigerantType = + static_cast(0); + Attributes::ACCompressorType::TypeInfo::DecodableType ACCompressorType = + static_cast(0); + Attributes::ACErrorCode::TypeInfo::DecodableType ACErrorCode = + static_cast>(0); + Attributes::ACLouverPosition::TypeInfo::DecodableType ACLouverPosition = + static_cast(0); Attributes::ACCoilTemperature::TypeInfo::DecodableType ACCoilTemperature; - Attributes::ACCapacityformat::TypeInfo::DecodableType ACCapacityformat = static_cast(0); + Attributes::ACCapacityformat::TypeInfo::DecodableType ACCapacityformat = + static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 0f137dc77b7126..c966ee0534f603 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -8870,7 +8870,7 @@ class ThermostatSetWeeklySchedule : public ClusterCommand private: chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type mRequest; TypedComplexArgument< - chip::app::DataModel::List> + chip::app::DataModel::List> mComplex_Transitions; }; @@ -20604,35 +20604,39 @@ void registerClusterThermostat(Commands & commands, CredentialIssuerCommands * c Attributes::MaxCoolSetpointLimit::Id, WriteCommandType::kWrite, credsIssuerConfig), // make_unique>(Id, "min-setpoint-dead-band", INT8_MIN, INT8_MAX, Attributes::MinSetpointDeadBand::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "remote-sensing", 0, UINT8_MAX, Attributes::RemoteSensing::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>( + make_unique>>( + Id, "remote-sensing", 0, UINT8_MAX, Attributes::RemoteSensing::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>( Id, "control-sequence-of-operation", 0, UINT8_MAX, Attributes::ControlSequenceOfOperation::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "system-mode", 0, UINT8_MAX, Attributes::SystemMode::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "thermostat-running-mode", 0, UINT8_MAX, Attributes::ThermostatRunningMode::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "start-of-week", 0, UINT8_MAX, Attributes::StartOfWeek::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>( + Id, "system-mode", 0, UINT8_MAX, Attributes::SystemMode::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>( + Id, "thermostat-running-mode", 0, UINT8_MAX, Attributes::ThermostatRunningMode::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>( + Id, "start-of-week", 0, UINT8_MAX, Attributes::StartOfWeek::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "number-of-weekly-transitions", 0, UINT8_MAX, Attributes::NumberOfWeeklyTransitions::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "number-of-daily-transitions", 0, UINT8_MAX, Attributes::NumberOfDailyTransitions::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "temperature-setpoint-hold", 0, UINT8_MAX, Attributes::TemperatureSetpointHold::Id, - WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>( + Id, "temperature-setpoint-hold", 0, UINT8_MAX, Attributes::TemperatureSetpointHold::Id, WriteCommandType::kWrite, + credsIssuerConfig), // make_unique>>( Id, "temperature-setpoint-hold-duration", 0, UINT16_MAX, Attributes::TemperatureSetpointHoldDuration::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "thermostat-programming-operation-mode", 0, UINT8_MAX, - Attributes::ThermostatProgrammingOperationMode::Id, WriteCommandType::kWrite, - credsIssuerConfig), // - make_unique>(Id, "thermostat-running-state", 0, UINT16_MAX, Attributes::ThermostatRunningState::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "setpoint-change-source", 0, UINT8_MAX, Attributes::SetpointChangeSource::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "thermostat-programming-operation-mode", 0, UINT8_MAX, Attributes::ThermostatProgrammingOperationMode::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "thermostat-running-state", 0, UINT16_MAX, Attributes::ThermostatRunningState::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>( + Id, "setpoint-change-source", 0, UINT8_MAX, Attributes::SetpointChangeSource::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // make_unique>>(Id, "setpoint-change-amount", INT16_MIN, INT16_MAX, Attributes::SetpointChangeAmount::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -20658,23 +20662,26 @@ void registerClusterThermostat(Commands & commands, CredentialIssuerCommands * c WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "emergency-heat-delta", 0, UINT8_MAX, Attributes::EmergencyHeatDelta::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "actype", 0, UINT8_MAX, Attributes::ACType::Id, WriteCommandType::kWrite, - credsIssuerConfig), // + make_unique>(Id, "actype", 0, UINT8_MAX, Attributes::ACType::Id, + WriteCommandType::kWrite, credsIssuerConfig), // make_unique>(Id, "accapacity", 0, UINT16_MAX, Attributes::ACCapacity::Id, WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "acrefrigerant-type", 0, UINT8_MAX, Attributes::ACRefrigerantType::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "accompressor-type", 0, UINT8_MAX, Attributes::ACCompressorType::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "acerror-code", 0, UINT32_MAX, Attributes::ACErrorCode::Id, - WriteCommandType::kWrite, credsIssuerConfig), // - make_unique>(Id, "aclouver-position", 0, UINT8_MAX, Attributes::ACLouverPosition::Id, - WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>( + Id, "acrefrigerant-type", 0, UINT8_MAX, Attributes::ACRefrigerantType::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>( + Id, "accompressor-type", 0, UINT8_MAX, Attributes::ACCompressorType::Id, WriteCommandType::kWrite, + credsIssuerConfig), // + make_unique>>( + Id, "acerror-code", 0, UINT32_MAX, Attributes::ACErrorCode::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>( + Id, "aclouver-position", 0, UINT8_MAX, Attributes::ACLouverPosition::Id, WriteCommandType::kWrite, + credsIssuerConfig), // make_unique>>(Id, "accoil-temperature", INT16_MIN, INT16_MAX, Attributes::ACCoilTemperature::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "accapacityformat", 0, UINT8_MAX, Attributes::ACCapacityformat::Id, - WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>( + Id, "accapacityformat", 0, UINT8_MAX, Attributes::ACCapacityformat::Id, WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 19e50685722e60..0a6a0757b2bf82 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -3085,7 +3085,7 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::DoorLock::Structs::Cre } CHIP_ERROR ComplexArgumentParser::Setup(const char * label, - chip::app::Clusters::Thermostat::Structs::ThermostatScheduleTransition::Type & request, + chip::app::Clusters::Thermostat::Structs::WeeklyScheduleTransitionStruct::Type & request, Json::Value & value) { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); @@ -3093,11 +3093,11 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, // Copy to track which members we already processed. Json::Value valueCopy(value); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ThermostatScheduleTransition.transitionTime", "transitionTime", + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("WeeklyScheduleTransitionStruct.transitionTime", "transitionTime", value.isMember("transitionTime"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ThermostatScheduleTransition.heatSetpoint", "heatSetpoint", + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("WeeklyScheduleTransitionStruct.heatSetpoint", "heatSetpoint", value.isMember("heatSetpoint"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ThermostatScheduleTransition.coolSetpoint", "coolSetpoint", + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("WeeklyScheduleTransitionStruct.coolSetpoint", "coolSetpoint", value.isMember("coolSetpoint"))); char labelWithMember[kMaxLabelLength]; @@ -3116,7 +3116,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); } -void ComplexArgumentParser::Finalize(chip::app::Clusters::Thermostat::Structs::ThermostatScheduleTransition::Type & request) +void ComplexArgumentParser::Finalize(chip::app::Clusters::Thermostat::Structs::WeeklyScheduleTransitionStruct::Type & request) { ComplexArgumentParser::Finalize(request.transitionTime); ComplexArgumentParser::Finalize(request.heatSetpoint); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index ef7483fc069ea5..8c5b30bd425cd8 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -365,10 +365,11 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::DoorLock::Struc static void Finalize(chip::app::Clusters::DoorLock::Structs::CredentialStruct::Type & request); -static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Thermostat::Structs::ThermostatScheduleTransition::Type & request, +static CHIP_ERROR Setup(const char * label, + chip::app::Clusters::Thermostat::Structs::WeeklyScheduleTransitionStruct::Type & request, Json::Value & value); -static void Finalize(chip::app::Clusters::Thermostat::Structs::ThermostatScheduleTransition::Type & request); +static void Finalize(chip::app::Clusters::Thermostat::Structs::WeeklyScheduleTransitionStruct::Type & request); static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Channel::Structs::ProgramCastStruct::Type & request, Json::Value & value); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index de381669e6f090..f6e11f2ac60c10 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -2743,7 +2743,7 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::Thermostat::Structs::ThermostatScheduleTransition::DecodableType & value) + const chip::app::Clusters::Thermostat::Structs::WeeklyScheduleTransitionStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { @@ -12466,27 +12466,27 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("MinSetpointDeadBand", 1, value); } case Thermostat::Attributes::RemoteSensing::Id: { - uint8_t value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("RemoteSensing", 1, value); } case Thermostat::Attributes::ControlSequenceOfOperation::Id: { - chip::app::Clusters::Thermostat::ThermostatControlSequence value; + chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ControlSequenceOfOperation", 1, value); } case Thermostat::Attributes::SystemMode::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::SystemModeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SystemMode", 1, value); } case Thermostat::Attributes::ThermostatRunningMode::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::ThermostatRunningModeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ThermostatRunningMode", 1, value); } case Thermostat::Attributes::StartOfWeek::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::StartOfWeekEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("StartOfWeek", 1, value); } @@ -12501,7 +12501,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("NumberOfDailyTransitions", 1, value); } case Thermostat::Attributes::TemperatureSetpointHold::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("TemperatureSetpointHold", 1, value); } @@ -12511,17 +12511,17 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("TemperatureSetpointHoldDuration", 1, value); } case Thermostat::Attributes::ThermostatProgrammingOperationMode::Id: { - uint8_t value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ThermostatProgrammingOperationMode", 1, value); } case Thermostat::Attributes::ThermostatRunningState::Id: { - uint16_t value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ThermostatRunningState", 1, value); } case Thermostat::Attributes::SetpointChangeSource::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::SetpointChangeSourceEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("SetpointChangeSource", 1, value); } @@ -12571,7 +12571,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("EmergencyHeatDelta", 1, value); } case Thermostat::Attributes::ACType::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::ACTypeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ACType", 1, value); } @@ -12581,22 +12581,22 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("ACCapacity", 1, value); } case Thermostat::Attributes::ACRefrigerantType::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ACRefrigerantType", 1, value); } case Thermostat::Attributes::ACCompressorType::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::ACCompressorTypeEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ACCompressorType", 1, value); } case Thermostat::Attributes::ACErrorCode::Id: { - uint32_t value; + chip::BitMask value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ACErrorCode", 1, value); } case Thermostat::Attributes::ACLouverPosition::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::ACLouverPositionEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ACLouverPosition", 1, value); } @@ -12606,7 +12606,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("ACCoilTemperature", 1, value); } case Thermostat::Attributes::ACCapacityformat::Id: { - uint8_t value; + chip::app::Clusters::Thermostat::ACCapacityFormatEnum value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ACCapacityformat", 1, value); } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index 6e0e479a1267ab..ac9d4a8a4ccd5b 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -230,7 +230,7 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::DoorLock::Structs::CredentialStruct::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::Thermostat::Structs::ThermostatScheduleTransition::DecodableType & value); + const chip::app::Clusters::Thermostat::Structs::WeeklyScheduleTransitionStruct::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Channel::Structs::ProgramCastStruct::DecodableType & value); diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index f14ad269fcba15..b481d620a2a43b 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -94936,8 +94936,8 @@ class ThermostatSetWeeklySchedule : public ClusterCommand { { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; for (auto & entry_0 : mRequest.transitions) { - MTRThermostatClusterThermostatScheduleTransition * newElement_0; - newElement_0 = [MTRThermostatClusterThermostatScheduleTransition new]; + MTRThermostatClusterWeeklyScheduleTransitionStruct * newElement_0; + newElement_0 = [MTRThermostatClusterWeeklyScheduleTransitionStruct new]; newElement_0.transitionTime = [NSNumber numberWithUnsignedShort:entry_0.transitionTime]; if (entry_0.heatSetpoint.IsNull()) { newElement_0.heatSetpoint = nil; @@ -94974,7 +94974,7 @@ class ThermostatSetWeeklySchedule : public ClusterCommand { private: chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type mRequest; - TypedComplexArgument> mComplex_Transitions; + TypedComplexArgument> mComplex_Transitions; }; /*