From e87d411bc02db48f7375ab234baf9d0400d06319 Mon Sep 17 00:00:00 2001 From: David Rempel Date: Thu, 30 Nov 2023 16:00:51 -0800 Subject: [PATCH 01/14] Doing the great thermostat renaming. --- .../all-clusters-app.matter | 237 ++++++--- .../all-clusters-common/all-clusters-app.zap | 57 ++- .../ameba/main/include/ThermostatCommands.h | 4 +- .../esp32/main/DeviceWithDisplay.cpp | 118 ++++- .../all-clusters-minimal-app.matter | 236 ++++++--- .../all-clusters-minimal-app.zap | 2 +- .../esp32/main/DeviceWithDisplay.cpp | 2 +- ...umiditysensor_thermostat_56de3d5f45.matter | 236 ++++++--- ...r_humiditysensor_thermostat_56de3d5f45.zap | 2 +- ...tnode_heatingcoolingunit_ncdGai1E5a.matter | 236 ++++++--- ...tnode_roomairconditioner_9cf3607804.matter | 236 ++++++--- ...rootnode_roomairconditioner_9cf3607804.zap | 2 +- .../rootnode_thermostat_bm3fb8dhYi.matter | 237 ++++++--- .../rootnode_thermostat_bm3fb8dhYi.zap | 2 +- .../placeholder/linux/apps/app1/config.matter | 473 +++++++++++++----- .../placeholder/linux/apps/app1/config.zap | 2 +- .../placeholder/linux/apps/app2/config.matter | 473 +++++++++++++----- .../placeholder/linux/apps/app2/config.zap | 2 +- .../thermostat/asr/src/TemperatureManager.cpp | 39 +- .../nxp/zap/thermostat_matter_thread.matter | 237 ++++++--- .../nxp/zap/thermostat_matter_thread.zap | 2 +- .../nxp/zap/thermostat_matter_wifi.matter | 237 ++++++--- .../nxp/zap/thermostat_matter_wifi.zap | 2 +- .../silabs/src/TemperatureManager.cpp | 38 +- .../telink/src/TemperatureManager.cpp | 38 +- .../thermostat-common/thermostat.matter | 236 ++++++--- .../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 | 102 ++-- .../thermostat-server/thermostat-server.cpp | 32 +- .../certification/Test_TC_TSTAT_2_1.yaml | 10 - .../data-model/chip/thermostat-cluster.xml | 317 +++++++----- .../data_model/controller-clusters.matter | 236 ++++++--- .../chip/devicecontroller/ChipClusters.java | 128 +++-- .../chip/devicecontroller/ChipStructs.java | 26 +- .../devicecontroller/ClusterIDMapping.java | 6 +- .../devicecontroller/ClusterInfoMapping.java | 60 ++- .../devicecontroller/ClusterReadMapping.java | 11 - .../devicecontroller/ClusterWriteMapping.java | 22 - .../chip/devicecontroller/cluster/files.gni | 2 +- ...atClusterWeeklyScheduleTransitionStruct.kt | 71 +++ .../cluster/clusters/ThermostatCluster.kt | 49 +- .../matter/devicecontroller/cluster/files.gni | 2 +- ...atClusterWeeklyScheduleTransitionStruct.kt | 71 +++ .../CHIPAttributeTLVValueDecoder.cpp | 24 +- .../zap-generated/CHIPClustersWrite-JNI.cpp | 63 +-- .../zap-generated/CHIPInvokeCallbacks.cpp | 184 +++++-- .../java/zap-generated/CHIPInvokeCallbacks.h | 15 + .../python/chip/clusters/CHIPClusters.py | 17 +- .../python/chip/clusters/Objects.py | 345 +++++++++---- .../MTRAttributeSpecifiedCheck.mm | 3 - .../MTRAttributeTLVValueDecoder.mm | 39 +- .../CHIP/zap-generated/MTRBaseClusters.h | 217 +++++--- .../CHIP/zap-generated/MTRBaseClusters.mm | 155 ++---- .../CHIP/zap-generated/MTRClusterConstants.h | 6 +- .../CHIP/zap-generated/MTRClusters.h | 7 +- .../CHIP/zap-generated/MTRClusters.mm | 47 +- .../zap-generated/MTRCommandPayloadsObjc.h | 61 ++- .../zap-generated/MTRCommandPayloadsObjc.mm | 240 +++++++-- .../MTRCommandPayloads_Internal.h | 12 + .../CHIP/zap-generated/MTRStructsObjc.h | 10 +- .../CHIP/zap-generated/MTRStructsObjc.mm | 8 +- .../zap-generated/attributes/Accessors.cpp | 187 +++---- .../zap-generated/attributes/Accessors.h | 104 ++-- .../app-common/zap-generated/callback.h | 6 + .../zap-generated/cluster-enums-check.h | 141 +++++- .../app-common/zap-generated/cluster-enums.h | 230 +++++++-- .../zap-generated/cluster-objects.cpp | 97 +++- .../zap-generated/cluster-objects.h | 292 +++++++---- .../app-common/zap-generated/ids/Attributes.h | 4 - .../app-common/zap-generated/ids/Commands.h | 8 + .../zap-generated/cluster/Commands.h | 118 +++-- .../cluster/ComplexArgumentParser.cpp | 10 +- .../cluster/ComplexArgumentParser.h | 5 +- .../cluster/logging/DataModelLogger.cpp | 57 ++- .../cluster/logging/DataModelLogger.h | 4 +- .../zap-generated/cluster/Commands.h | 210 +++----- 78 files changed, 5117 insertions(+), 2365 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 15cef48f6500c6..35202f6b4f81b5 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 @@ -3959,13 +3959,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; @@ -3974,13 +4002,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 StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; } - enum ThermostatSystemMode : enum8 { + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -3992,70 +4036,123 @@ 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 AlarmCodeBitmap : bitmap8 { + kInitialization = 0x1; + kHardware = 0x2; + kSelfCalibration = 0x4; } bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kScheduleConfiguration = 0x8; + kZigbeeScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; 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; + temperature heatSetpoint = 1; + 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature 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; @@ -4065,14 +4162,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; @@ -4081,27 +4178,36 @@ 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; + } + + response struct GetRelayStatusLogResponse = 1 { + int16u timeOfDay = 0; + RelayStateBitmap relayStatus = 1; + nullable temperature localTemperature = 2; + nullable int8u humidityInPercentage = 3; + temperature setPoint = 4; + int16u unreadEntries = 5; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ @@ -4112,6 +4218,8 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to query the thermostat internal relay status log. This command has no payload. */ + command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for controlling a fan in a heating/cooling system. */ @@ -7047,6 +7155,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 c0caa12cc2eebe..9d0ff0b4f2217f 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,17 +157,16 @@ 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; - } } void DoAction(int i) override @@ -233,24 +232,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 +318,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 +677,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 f9a695d21e6d8d..9099d0cf9be911 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 @@ -3490,13 +3490,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; @@ -3505,13 +3533,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 StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; } - enum ThermostatSystemMode : enum8 { + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -3523,70 +3567,123 @@ 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 AlarmCodeBitmap : bitmap8 { + kInitialization = 0x1; + kHardware = 0x2; + kSelfCalibration = 0x4; } bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kScheduleConfiguration = 0x8; + kZigbeeScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; 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; + temperature heatSetpoint = 1; + 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature 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; @@ -3596,14 +3693,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; @@ -3612,27 +3709,36 @@ 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; + } + + response struct GetRelayStatusLogResponse = 1 { + int16u timeOfDay = 0; + RelayStateBitmap relayStatus = 1; + nullable temperature localTemperature = 2; + nullable int8u humidityInPercentage = 3; + temperature setPoint = 4; + int16u unreadEntries = 5; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ @@ -3643,6 +3749,8 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to query the thermostat internal relay status log. This command has no payload. */ + command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for controlling a fan in a heating/cooling system. */ 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 dd85fcda16a152..141c1b3ec6765c 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::ThermostatSystemModeEnum::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..cfbe1822b79e8d 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 StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; } - enum ThermostatSystemMode : enum8 { + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -1167,70 +1211,123 @@ 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 AlarmCodeBitmap : bitmap8 { + kInitialization = 0x1; + kHardware = 0x2; + kSelfCalibration = 0x4; } bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kScheduleConfiguration = 0x8; + kZigbeeScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; 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; + temperature heatSetpoint = 1; + 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature 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 +1337,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 +1353,36 @@ 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; + } + + response struct GetRelayStatusLogResponse = 1 { + int16u timeOfDay = 0; + RelayStateBitmap relayStatus = 1; + nullable temperature localTemperature = 2; + nullable int8u humidityInPercentage = 3; + temperature setPoint = 4; + int16u unreadEntries = 5; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ @@ -1287,6 +1393,8 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to query the thermostat internal relay status log. This command has no payload. */ + command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for controlling a fan in a heating/cooling system. */ 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 573c76f03d23c5..7f46a270d8cba1 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -1489,13 +1489,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; @@ -1504,13 +1532,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 StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; } - enum ThermostatSystemMode : enum8 { + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -1522,70 +1566,123 @@ 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 AlarmCodeBitmap : bitmap8 { + kInitialization = 0x1; + kHardware = 0x2; + kSelfCalibration = 0x4; } bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kScheduleConfiguration = 0x8; + kZigbeeScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; 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; + temperature heatSetpoint = 1; + 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature 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; @@ -1595,14 +1692,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; @@ -1611,27 +1708,36 @@ 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; + } + + response struct GetRelayStatusLogResponse = 1 { + int16u timeOfDay = 0; + RelayStateBitmap relayStatus = 1; + nullable temperature localTemperature = 2; + nullable int8u humidityInPercentage = 3; + temperature setPoint = 4; + int16u unreadEntries = 5; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ @@ -1642,6 +1748,8 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to query the thermostat internal relay status log. This command has no payload. */ + command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for controlling a fan in a heating/cooling system. */ diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter index 96d1c16d25be15..ec17a3607268a1 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 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; @@ -1107,70 +1151,123 @@ 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 AlarmCodeBitmap : bitmap8 { + kInitialization = 0x1; + kHardware = 0x2; + kSelfCalibration = 0x4; } bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kScheduleConfiguration = 0x8; + kZigbeeScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; 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; + temperature heatSetpoint = 1; + 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature 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 +1277,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 +1293,36 @@ 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; + } + + response struct GetRelayStatusLogResponse = 1 { + int16u timeOfDay = 0; + RelayStateBitmap relayStatus = 1; + nullable temperature localTemperature = 2; + nullable int8u humidityInPercentage = 3; + temperature setPoint = 4; + int16u unreadEntries = 5; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ @@ -1227,6 +1333,8 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to query the thermostat internal relay status log. This command has no payload. */ + command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for controlling a fan in a heating/cooling system. */ 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 cce209d5335ea8..529c2aca917ccd 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -1292,13 +1292,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; @@ -1307,13 +1335,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 StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; } - enum ThermostatSystemMode : enum8 { + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -1325,70 +1369,123 @@ 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 AlarmCodeBitmap : bitmap8 { + kInitialization = 0x1; + kHardware = 0x2; + kSelfCalibration = 0x4; } bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kScheduleConfiguration = 0x8; + kZigbeeScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; 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; + temperature heatSetpoint = 1; + 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature 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; @@ -1398,14 +1495,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; @@ -1414,27 +1511,36 @@ 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; + } + + response struct GetRelayStatusLogResponse = 1 { + int16u timeOfDay = 0; + RelayStateBitmap relayStatus = 1; + nullable temperature localTemperature = 2; + nullable int8u humidityInPercentage = 3; + temperature setPoint = 4; + int16u unreadEntries = 5; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ @@ -1445,6 +1551,8 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to query the thermostat internal relay status log. This command has no payload. */ + command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for controlling a fan in a heating/cooling system. */ @@ -1919,7 +2027,6 @@ endpoint 1 { ram attribute absMaxCoolSetpointLimit default = 3200; ram attribute PICoolingDemand default = 0; ram attribute PIHeatingDemand default = 0; - ram attribute HVACSystemTypeConfiguration default = 0x00; ram attribute localTemperatureCalibration default = 0; ram attribute occupiedCoolingSetpoint default = 0x0A28; ram attribute occupiedHeatingSetpoint default = 0x07D0; 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 839a1e0e525597..97ca05201fbbdc 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -4706,13 +4706,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; @@ -4721,13 +4749,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 StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; } - enum ThermostatSystemMode : enum8 { + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -4739,70 +4783,123 @@ 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 AlarmCodeBitmap : bitmap8 { + kInitialization = 0x1; + kHardware = 0x2; + kSelfCalibration = 0x4; } bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kScheduleConfiguration = 0x8; + kZigbeeScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; 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; + temperature heatSetpoint = 1; + 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature 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; @@ -4812,14 +4909,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; @@ -4828,27 +4925,36 @@ 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; + } + + response struct GetRelayStatusLogResponse = 1 { + int16u timeOfDay = 0; + RelayStateBitmap relayStatus = 1; + nullable temperature localTemperature = 2; + nullable int8u humidityInPercentage = 3; + temperature setPoint = 4; + int16u unreadEntries = 5; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ @@ -4859,19 +4965,49 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to query the thermostat internal relay status log. This command has no payload. */ + command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for configuring and controlling the functionality of a thermostat. */ 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; @@ -4880,13 +5016,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 StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; } - enum ThermostatSystemMode : enum8 { + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -4898,70 +5050,123 @@ 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 AlarmCodeBitmap : bitmap8 { + kInitialization = 0x1; + kHardware = 0x2; + kSelfCalibration = 0x4; } bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kScheduleConfiguration = 0x8; + kZigbeeScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; 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; + temperature heatSetpoint = 1; + 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature 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; @@ -4971,14 +5176,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; @@ -4987,27 +5192,36 @@ 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; + } + + response struct GetRelayStatusLogResponse = 1 { + int16u timeOfDay = 0; + RelayStateBitmap relayStatus = 1; + nullable temperature localTemperature = 2; + nullable int8u humidityInPercentage = 3; + temperature setPoint = 4; + int16u unreadEntries = 5; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ @@ -5018,6 +5232,8 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to query the thermostat internal relay status log. This command has no payload. */ + command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ @@ -8290,7 +8506,6 @@ endpoint 0 { ram attribute absMaxCoolSetpointLimit default = 0x0C80; ram attribute PICoolingDemand; ram attribute PIHeatingDemand; - callback attribute HVACSystemTypeConfiguration default = 0; callback attribute localTemperatureCalibration default = 0; ram attribute occupiedCoolingSetpoint default = 0x0A28; ram attribute occupiedHeatingSetpoint default = 0x07D0; 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 f01e0b2838b48e..7ef1e87568bf40 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -4663,13 +4663,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; @@ -4678,13 +4706,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 StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; } - enum ThermostatSystemMode : enum8 { + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -4696,70 +4740,123 @@ 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 AlarmCodeBitmap : bitmap8 { + kInitialization = 0x1; + kHardware = 0x2; + kSelfCalibration = 0x4; } bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kScheduleConfiguration = 0x8; + kZigbeeScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; 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; + temperature heatSetpoint = 1; + 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature 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; @@ -4769,14 +4866,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; @@ -4785,27 +4882,36 @@ 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; + } + + response struct GetRelayStatusLogResponse = 1 { + int16u timeOfDay = 0; + RelayStateBitmap relayStatus = 1; + nullable temperature localTemperature = 2; + nullable int8u humidityInPercentage = 3; + temperature setPoint = 4; + int16u unreadEntries = 5; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ @@ -4816,19 +4922,49 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to query the thermostat internal relay status log. This command has no payload. */ + command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for configuring and controlling the functionality of a thermostat. */ 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; @@ -4837,13 +4973,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 StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; } - enum ThermostatSystemMode : enum8 { + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -4855,70 +5007,123 @@ 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 AlarmCodeBitmap : bitmap8 { + kInitialization = 0x1; + kHardware = 0x2; + kSelfCalibration = 0x4; } bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kScheduleConfiguration = 0x8; + kZigbeeScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; 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; + temperature heatSetpoint = 1; + 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature 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; @@ -4928,14 +5133,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; @@ -4944,27 +5149,36 @@ 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; + } + + response struct GetRelayStatusLogResponse = 1 { + int16u timeOfDay = 0; + RelayStateBitmap relayStatus = 1; + nullable temperature localTemperature = 2; + nullable int8u humidityInPercentage = 3; + temperature setPoint = 4; + int16u unreadEntries = 5; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ @@ -4975,6 +5189,8 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to query the thermostat internal relay status log. This command has no payload. */ + command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ @@ -8254,7 +8470,6 @@ endpoint 0 { ram attribute absMaxCoolSetpointLimit default = 0x0C80; ram attribute PICoolingDemand; ram attribute PIHeatingDemand; - callback attribute HVACSystemTypeConfiguration default = 0; callback attribute localTemperatureCalibration default = 0; ram attribute occupiedCoolingSetpoint default = 0x0A28; ram attribute occupiedHeatingSetpoint default = 0x07D0; 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..be543ce188f4d6 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,8 +46,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(); return CHIP_NO_ERROR; diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter index 3312d9b5d2e0de..9019608531094e 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter @@ -1920,13 +1920,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; @@ -1935,13 +1963,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 StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; } - enum ThermostatSystemMode : enum8 { + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -1953,70 +1997,123 @@ 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 AlarmCodeBitmap : bitmap8 { + kInitialization = 0x1; + kHardware = 0x2; + kSelfCalibration = 0x4; } bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kScheduleConfiguration = 0x8; + kZigbeeScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; 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; + temperature heatSetpoint = 1; + 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature 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; @@ -2026,14 +2123,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; @@ -2042,27 +2139,36 @@ 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; + } + + response struct GetRelayStatusLogResponse = 1 { + int16u timeOfDay = 0; + RelayStateBitmap relayStatus = 1; + nullable temperature localTemperature = 2; + nullable int8u humidityInPercentage = 3; + temperature setPoint = 4; + int16u unreadEntries = 5; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ @@ -2073,6 +2179,8 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to query the thermostat internal relay status log. This command has no payload. */ + command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } endpoint 0 { @@ -2465,7 +2573,6 @@ endpoint 1 { ram attribute absMaxHeatSetpointLimit default = 3000; ram attribute absMinCoolSetpointLimit default = 1600; ram attribute absMaxCoolSetpointLimit default = 3200; - ram attribute HVACSystemTypeConfiguration; persist attribute occupiedCoolingSetpoint default = 0x0A28; persist attribute occupiedHeatingSetpoint default = 0x07D0; ram attribute minHeatSetpointLimit default = 700; 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 251a64e1e42669..2b96a13d0b8a58 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter @@ -1831,13 +1831,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; @@ -1846,13 +1874,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 StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; } - enum ThermostatSystemMode : enum8 { + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -1864,70 +1908,123 @@ 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 AlarmCodeBitmap : bitmap8 { + kInitialization = 0x1; + kHardware = 0x2; + kSelfCalibration = 0x4; } bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kScheduleConfiguration = 0x8; + kZigbeeScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; 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; + temperature heatSetpoint = 1; + 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature 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; @@ -1937,14 +2034,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; @@ -1953,27 +2050,36 @@ 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; + } + + response struct GetRelayStatusLogResponse = 1 { + int16u timeOfDay = 0; + RelayStateBitmap relayStatus = 1; + nullable temperature localTemperature = 2; + nullable int8u humidityInPercentage = 3; + temperature setPoint = 4; + int16u unreadEntries = 5; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ @@ -1984,6 +2090,8 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to query the thermostat internal relay status log. This command has no payload. */ + command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } endpoint 0 { @@ -2321,7 +2429,6 @@ endpoint 1 { ram attribute absMaxHeatSetpointLimit default = 3000; ram attribute absMinCoolSetpointLimit default = 1600; ram attribute absMaxCoolSetpointLimit default = 3200; - ram attribute HVACSystemTypeConfiguration; persist attribute occupiedCoolingSetpoint default = 0x0A28; persist attribute occupiedHeatingSetpoint default = 0x07D0; ram attribute minHeatSetpointLimit default = 700; 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..d1a094bd597bf8 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 9818995f052e4c..2c062453093080 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -1671,13 +1671,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; @@ -1686,13 +1714,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 StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; } - enum ThermostatSystemMode : enum8 { + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -1704,70 +1748,123 @@ 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 AlarmCodeBitmap : bitmap8 { + kInitialization = 0x1; + kHardware = 0x2; + kSelfCalibration = 0x4; } bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kScheduleConfiguration = 0x8; + kZigbeeScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; 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; + temperature heatSetpoint = 1; + 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature 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; @@ -1777,14 +1874,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; @@ -1793,27 +1890,36 @@ 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; + } + + response struct GetRelayStatusLogResponse = 1 { + int16u timeOfDay = 0; + RelayStateBitmap relayStatus = 1; + nullable temperature localTemperature = 2; + nullable int8u humidityInPercentage = 3; + temperature setPoint = 4; + int16u unreadEntries = 5; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ @@ -1824,6 +1930,8 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to query the thermostat internal relay status log. This command has no payload. */ + command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ 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 c1e762de1b2526..e8f62eb9e4888a 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 @@ -67,13 +67,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 */ \ @@ -131,13 +124,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 */ \ @@ -195,13 +181,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 5c987480bc96ac..1a0eb436e726ac 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 @@ -269,7 +269,7 @@ #define GENERATED_DEFAULTS_COUNT (32) // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 46 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 40 #define GENERATED_MIN_MAX_DEFAULTS \ { \ \ @@ -305,15 +305,9 @@ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x7 }, /* ControlMode */ \ \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ - { (uint16_t) 0xA28, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* OccupiedCoolingSetpoint */ \ - { (uint16_t) 0x7D0, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* OccupiedHeatingSetpoint */ \ - { (uint16_t) 0x2BC, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MinHeatSetpointLimit */ \ - { (uint16_t) 0xBB8, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MaxHeatSetpointLimit */ \ - { (uint16_t) 0x640, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MinCoolSetpointLimit */ \ - { (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) 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) 0x9 }, /* SystemMode */ \ \ /* Endpoint: 1, Cluster: Fan Control (server) */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x6 }, /* FanMode */ \ @@ -1008,41 +1002,41 @@ { 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_MIN_MAX_DEFAULTS_INDEX(13), 0x00000011, 2, ZAP_TYPE(INT16S), \ - ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OccupiedCoolingSetpoint */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(14), 0x00000012, 2, ZAP_TYPE(INT16S), \ - ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OccupiedHeatingSetpoint */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(15), 0x00000015, 2, ZAP_TYPE(INT16S), \ - ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MinHeatSetpointLimit */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(16), 0x00000016, 2, ZAP_TYPE(INT16S), \ - ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MaxHeatSetpointLimit */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(17), 0x00000017, 2, ZAP_TYPE(INT16S), \ - ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MinCoolSetpointLimit */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(18), 0x00000018, 2, ZAP_TYPE(INT16S), \ - ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MaxCoolSetpointLimit */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(19), 0x00000019, 1, ZAP_TYPE(INT8S), \ + { 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_SIMPLE_DEFAULT(0x0A28), 0x00000011, 2, ZAP_TYPE(TEMPERATURE), \ + ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OccupiedCoolingSetpoint */ \ + { ZAP_SIMPLE_DEFAULT(0x07D0), 0x00000012, 2, ZAP_TYPE(TEMPERATURE), \ + ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OccupiedHeatingSetpoint */ \ + { ZAP_SIMPLE_DEFAULT(0x02BC), 0x00000015, 2, ZAP_TYPE(TEMPERATURE), \ + ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MinHeatSetpointLimit */ \ + { ZAP_SIMPLE_DEFAULT(0x0BB8), 0x00000016, 2, ZAP_TYPE(TEMPERATURE), \ + ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MaxHeatSetpointLimit */ \ + { ZAP_SIMPLE_DEFAULT(0x0640), 0x00000017, 2, ZAP_TYPE(TEMPERATURE), \ + ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MinCoolSetpointLimit */ \ + { ZAP_SIMPLE_DEFAULT(0x0C80), 0x00000018, 2, ZAP_TYPE(TEMPERATURE), \ + ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MaxCoolSetpointLimit */ \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(13), 0x00000019, 1, ZAP_TYPE(INT8S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MinSetpointDeadBand */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(20), 0x0000001B, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(14), 0x0000001B, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ControlSequenceOfOperation */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(21), 0x0000001C, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(15), 0x0000001C, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* SystemMode */ \ { ZAP_SIMPLE_DEFAULT(0x0023), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(6), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fan Control (server) */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(22), 0x00000000, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(16), 0x00000000, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* FanMode */ \ { ZAP_SIMPLE_DEFAULT(0x02), 0x00000001, 1, ZAP_TYPE(ENUM8), 0 }, /* FanModeSequence */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(23), 0x00000002, 1, ZAP_TYPE(PERCENT), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(17), 0x00000002, 1, ZAP_TYPE(PERCENT), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* PercentSetting */ \ { ZAP_SIMPLE_DEFAULT(0x00), 0x00000003, 1, ZAP_TYPE(PERCENT), 0 }, /* PercentCurrent */ \ { ZAP_SIMPLE_DEFAULT(100), 0x00000004, 1, ZAP_TYPE(INT8U), 0 }, /* SpeedMax */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(24), 0x00000005, 1, ZAP_TYPE(INT8U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(18), 0x00000005, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* SpeedSetting */ \ { ZAP_SIMPLE_DEFAULT(0x00), 0x00000006, 1, ZAP_TYPE(INT8U), 0 }, /* SpeedCurrent */ \ { ZAP_SIMPLE_DEFAULT(0x00), 0x00000007, 1, ZAP_TYPE(BITMAP8), 0 }, /* RockSupport */ \ @@ -1053,11 +1047,11 @@ { ZAP_SIMPLE_DEFAULT(2), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(25), 0x00000000, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(19), 0x00000000, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* TemperatureDisplayMode */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(26), 0x00000001, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(20), 0x00000001, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* KeypadLockout */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(27), 0x00000002, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(21), 0x00000002, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ScheduleProgrammingVisibility */ \ { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(2), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ @@ -1092,25 +1086,25 @@ { ZAP_EMPTY_DEFAULT(), 0x00000028, 2, ZAP_TYPE(INT16U), 0 }, /* Primary6X */ \ { ZAP_EMPTY_DEFAULT(), 0x00000029, 2, ZAP_TYPE(INT16U), 0 }, /* Primary6Y */ \ { ZAP_EMPTY_DEFAULT(), 0x0000002A, 1, ZAP_TYPE(INT8U), ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* Primary6Intensity */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(28), 0x00000030, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(22), 0x00000030, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* WhitePointX */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(29), 0x00000031, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(23), 0x00000031, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* WhitePointY */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(30), 0x00000032, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(24), 0x00000032, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointRX */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(31), 0x00000033, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(25), 0x00000033, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointRY */ \ { ZAP_EMPTY_DEFAULT(), 0x00000034, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* ColorPointRIntensity */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(32), 0x00000036, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(26), 0x00000036, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointGX */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(33), 0x00000037, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(27), 0x00000037, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointGY */ \ { ZAP_EMPTY_DEFAULT(), 0x00000038, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* ColorPointGIntensity */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(34), 0x0000003A, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(28), 0x0000003A, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointBX */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(35), 0x0000003B, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(29), 0x0000003B, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointBY */ \ { ZAP_EMPTY_DEFAULT(), 0x0000003C, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* ColorPointBIntensity */ \ @@ -1125,7 +1119,7 @@ { ZAP_SIMPLE_DEFAULT(0x0000), 0x0000400B, 2, ZAP_TYPE(INT16U), 0 }, /* ColorTempPhysicalMinMireds */ \ { ZAP_SIMPLE_DEFAULT(0xFEFF), 0x0000400C, 2, ZAP_TYPE(INT16U), 0 }, /* ColorTempPhysicalMaxMireds */ \ { ZAP_EMPTY_DEFAULT(), 0x0000400D, 2, ZAP_TYPE(INT16U), 0 }, /* CoupleColorTempToLevelMinMireds */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(36), 0x00004010, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(30), 0x00004010, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* StartUpColorTemperatureMireds */ \ { ZAP_SIMPLE_DEFAULT(0x1F), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ @@ -1314,13 +1308,13 @@ { ZAP_EMPTY_DEFAULT(), 0x00000024, 1, ZAP_TYPE(ENUM8), ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* enum_attr */ \ { ZAP_EMPTY_DEFAULT(), 0x00000025, 0, ZAP_TYPE(STRUCT), \ ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* struct_attr */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(37), 0x00000026, 1, ZAP_TYPE(INT8U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(31), 0x00000026, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* range_restricted_int8u */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(38), 0x00000027, 1, ZAP_TYPE(INT8S), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(32), 0x00000027, 1, ZAP_TYPE(INT8S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* range_restricted_int8s */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(39), 0x00000028, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(33), 0x00000028, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* range_restricted_int16u */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(40), 0x00000029, 2, ZAP_TYPE(INT16S), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(34), 0x00000029, 2, ZAP_TYPE(INT16S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* range_restricted_int16s */ \ { ZAP_EMPTY_DEFAULT(), 0x0000002A, 0, ZAP_TYPE(ARRAY), \ ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* list_long_octet_string */ \ @@ -1391,16 +1385,16 @@ { ZAP_EMPTY_DEFAULT(), 0x00004025, 0, ZAP_TYPE(STRUCT), \ ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* nullable_struct */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(41), 0x00004026, 1, ZAP_TYPE(INT8U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(35), 0x00004026, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* nullable_range_restricted_int8u */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(42), 0x00004027, 1, ZAP_TYPE(INT8S), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(36), 0x00004027, 1, ZAP_TYPE(INT8S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* nullable_range_restricted_int8s */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(43), 0x00004028, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(37), 0x00004028, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* nullable_range_restricted_int16u */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(44), 0x00004029, 2, ZAP_TYPE(INT16S), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(38), 0x00004029, 2, ZAP_TYPE(INT16S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* nullable_range_restricted_int16s */ \ { ZAP_EMPTY_DEFAULT(), 0x0000402A, 1, ZAP_TYPE(INT8U), \ @@ -1435,7 +1429,7 @@ { ZAP_SIMPLE_DEFAULT(1), 0x00004000, 1, ZAP_TYPE(BOOLEAN), 0 }, /* GlobalSceneControl */ \ { ZAP_SIMPLE_DEFAULT(0), 0x00004001, 2, ZAP_TYPE(INT16U), ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OnTime */ \ { ZAP_SIMPLE_DEFAULT(0), 0x00004002, 2, ZAP_TYPE(INT16U), ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OffWaitTime */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(45), 0x00004003, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(39), 0x00004003, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* StartUpOnOff */ \ { ZAP_SIMPLE_DEFAULT(0x0000), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(5), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ diff --git a/src/app/clusters/thermostat-server/thermostat-server.cpp b/src/app/clusters/thermostat-server/thermostat-server.cpp index 6c3504c6bea270..55215d491e0a5b 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; + chip::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); // clear bit 1 (LocalTemperature RemoteSensing bit) 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/tests/suites/certification/Test_TC_TSTAT_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml index 36b535a024f6c0..35a822268d3700 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml @@ -231,16 +231,6 @@ tests: minValue: 0 maxValue: 100 - - label: "Step 11: Read HVACSystemTypeConfiguration attribute from the DUT" - PICS: TSTAT.S.A0009 - command: "readAttribute" - attribute: "HVACSystemTypeConfiguration" - response: - constraints: - type: bitmap8 - minValue: 0 - maxValue: 63 - - label: "Step 12: Read LocalTemperatureCalibration attribute from the DUT" PICS: TSTAT.S.A0010 command: "readAttribute" 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..f8e95ba68a8eeb 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,19 +16,67 @@ limitations under the License. --> - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -40,33 +88,34 @@ limitations under the License. - + - + - - - - - - - - - + + + + + + + + + - + - + + @@ -76,212 +125,233 @@ 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 - - HVACSystemTypeConfiguration - - - + + AbsMinHeatSetpointLimit + AbsMaxHeatSetpointLimit + AbsMinCoolSetpointLimit + AbsMaxCoolSetpointLimit + PICoolingDemand + PIHeatingDemand LocalTemperatureCalibration - - OccupiedCoolingSetpoint - OccupiedHeatingSetpoint - UnoccupiedCoolingSetpoint - UnoccupiedHeatingSetpoint - + OccupiedCoolingSetpoint + OccupiedHeatingSetpoint + UnoccupiedCoolingSetpoint + 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 - + SetpointChangeSourceTimestamp + OccupiedSetback - - OccupiedSetbackMin - OccupiedSetbackMax - + OccupiedSetbackMin + OccupiedSetbackMax + UnoccupiedSetback - - UnoccupiedSetbackMin - UnoccupiedSetbackMax - + UnoccupiedSetbackMin + UnoccupiedSetbackMax + EmergencyHeatDelta - - + ACType - - + ACCapacity - - + ACRefrigerantType - - + ACCompressorType - - + ACErrorCode - - + ACLouverPosition - - ACCoilTemperature - + ACCoilTemperature + ACCapacityformat - Command description for SetpointRaiseLower - + Command description for SetWeeklySchedule - - - - + + + + Command description for GetWeeklySchedule - - + + - + The Clear Weekly Schedule command is used to clear the weekly schedule. @@ -292,9 +362,22 @@ limitations under the License. The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. - - - + + + + + + This command is sent from the thermostat cluster server in response to the Get Relay Status Log. After the Relay Status Entry is sent over the air to the requesting client, the specific entry will be cleared from the thermostat internal log. + + + + + + + + + This command is used to query the thermostat internal relay status log. This command has no payload. - + + \ 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 365b15dfea4758..d1c1e96b659e4e 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -5427,13 +5427,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 ThermostatControlSequence : enum8 { + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; + } + + enum ControlSequenceOfOperationEnum : enum8 { kCoolingOnly = 0; kCoolingWithReheat = 1; kHeatingOnly = 2; @@ -5442,13 +5470,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 StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; } - enum ThermostatSystemMode : enum8 { + enum SystemModeEnum : enum8 { kOff = 0; kAuto = 1; kCool = 3; @@ -5460,70 +5504,123 @@ 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 AlarmCodeBitmap : bitmap8 { + kInitialization = 0x1; + kHardware = 0x2; + kSelfCalibration = 0x4; } bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kScheduleConfiguration = 0x8; + kZigbeeScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; 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; + temperature heatSetpoint = 1; + 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional int16s occupiedCoolingSetpoint = 17; - attribute optional int16s occupiedHeatingSetpoint = 18; - attribute optional int16s unoccupiedCoolingSetpoint = 19; - attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; - attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; - attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; - attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute optional temperature occupiedCoolingSetpoint = 17; + attribute optional temperature occupiedHeatingSetpoint = 18; + attribute optional temperature unoccupiedCoolingSetpoint = 19; + attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; + attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; + attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; + attribute access(write: manage) optional temperature 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; @@ -5533,14 +5630,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; @@ -5549,27 +5646,36 @@ 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; + } + + response struct GetRelayStatusLogResponse = 1 { + int16u timeOfDay = 0; + RelayStateBitmap relayStatus = 1; + nullable temperature localTemperature = 2; + nullable int8u humidityInPercentage = 3; + temperature setPoint = 4; + int16u unreadEntries = 5; } request struct GetWeeklyScheduleRequest { - DayOfWeek daysToReturn = 0; - ModeForSequence modeToReturn = 1; + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; } /** Command description for SetpointRaiseLower */ @@ -5580,6 +5686,8 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to query the thermostat internal relay status log. This command has no payload. */ + command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for controlling a fan in a heating/cooling system. */ diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index 9d5ffd3f8f4885..94f404632f0126 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -34317,7 +34317,6 @@ public static class ThermostatCluster extends BaseChipCluster { private static final long ABS_MAX_COOL_SETPOINT_LIMIT_ATTRIBUTE_ID = 6L; private static final long P_I_COOLING_DEMAND_ATTRIBUTE_ID = 7L; private static final long P_I_HEATING_DEMAND_ATTRIBUTE_ID = 8L; - private static final long H_V_A_C_SYSTEM_TYPE_CONFIGURATION_ATTRIBUTE_ID = 9L; private static final long LOCAL_TEMPERATURE_CALIBRATION_ATTRIBUTE_ID = 16L; private static final long OCCUPIED_COOLING_SETPOINT_ATTRIBUTE_ID = 17L; private static final long OCCUPIED_HEATING_SETPOINT_ATTRIBUTE_ID = 18L; @@ -34398,11 +34397,11 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - 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) { + 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<>(); @@ -34410,9 +34409,9 @@ public void setWeeklySchedule(DefaultClusterCallback callback, Integer numberOfT BaseTLVType numberOfTransitionsForSequencetlvValue = new UIntType(numberOfTransitionsForSequence); elements.add(new StructElement(numberOfTransitionsForSequenceFieldID, numberOfTransitionsForSequencetlvValue)); - final long dayOfWeekForSequenceFieldID = 1L; - BaseTLVType dayOfWeekForSequencetlvValue = new UIntType(dayOfWeekForSequence); - elements.add(new StructElement(dayOfWeekForSequenceFieldID, dayOfWeekForSequencetlvValue)); + final long dayOfWeekforSequenceFieldID = 1L; + BaseTLVType dayOfWeekforSequencetlvValue = new UIntType(dayOfWeekforSequence); + elements.add(new StructElement(dayOfWeekforSequenceFieldID, dayOfWeekforSequencetlvValue)); final long modeForSequenceFieldID = 2L; BaseTLVType modeForSequencetlvValue = new UIntType(modeForSequence); @@ -34452,22 +34451,22 @@ public void getWeeklySchedule(GetWeeklyScheduleResponseCallback callback, Intege public void onResponse(StructType invokeStructValue) { final long numberOfTransitionsForSequenceFieldID = 0L; Integer numberOfTransitionsForSequence = null; - final long dayOfWeekForSequenceFieldID = 1L; - Integer dayOfWeekForSequence = null; + final long dayOfWeekforSequenceFieldID = 1L; + Integer dayOfWeekforSequence = null; 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) { UIntType castingValue = element.value(UIntType.class); numberOfTransitionsForSequence = castingValue.value(Integer.class); } - } else if (element.contextTagNum() == dayOfWeekForSequenceFieldID) { + } else if (element.contextTagNum() == dayOfWeekforSequenceFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - dayOfWeekForSequence = castingValue.value(Integer.class); + dayOfWeekforSequence = castingValue.value(Integer.class); } } else if (element.contextTagNum() == modeForSequenceFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -34477,11 +34476,11 @@ 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)); } } } - callback.onSuccess(numberOfTransitionsForSequence, dayOfWeekForSequence, modeForSequence, transitions); + callback.onSuccess(numberOfTransitionsForSequence, dayOfWeekforSequence, modeForSequence, transitions); }}, commandId, value, timedInvokeTimeoutMs); } @@ -34501,8 +34500,73 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } + public void getRelayStatusLog(GetRelayStatusLogResponseCallback callback) { + getRelayStatusLog(callback, 0); + } + + public void getRelayStatusLog(GetRelayStatusLogResponseCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 4L; + + ArrayList elements = new ArrayList<>(); + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + final long timeOfDayFieldID = 0L; + Integer timeOfDay = null; + final long relayStatusFieldID = 1L; + Integer relayStatus = null; + final long localTemperatureFieldID = 2L; + @Nullable Integer localTemperature = null; + final long humidityInPercentageFieldID = 3L; + @Nullable Integer humidityInPercentage = null; + final long setPointFieldID = 4L; + Integer setPoint = null; + final long unreadEntriesFieldID = 5L; + Integer unreadEntries = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == timeOfDayFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + timeOfDay = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == relayStatusFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + relayStatus = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == localTemperatureFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + localTemperature = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == humidityInPercentageFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + humidityInPercentage = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == setPointFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + setPoint = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == unreadEntriesFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + unreadEntries = castingValue.value(Integer.class); + } + } + } + callback.onSuccess(timeOfDay, relayStatus, localTemperature, humidityInPercentage, setPoint, unreadEntries); + }}, commandId, value, timedInvokeTimeoutMs); + } + 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 GetRelayStatusLogResponseCallback extends BaseClusterCallback { + void onSuccess(Integer timeOfDay, Integer relayStatus, @Nullable Integer localTemperature, @Nullable Integer humidityInPercentage, Integer setPoint, Integer unreadEntries); } public interface LocalTemperatureAttributeCallback extends BaseAttributeCallback { @@ -34790,40 +34854,6 @@ public void onSuccess(byte[] tlv) { }, P_I_HEATING_DEMAND_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readHVACSystemTypeConfigurationAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, H_V_A_C_SYSTEM_TYPE_CONFIGURATION_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, H_V_A_C_SYSTEM_TYPE_CONFIGURATION_ATTRIBUTE_ID, true); - } - - public void writeHVACSystemTypeConfigurationAttribute(DefaultClusterCallback callback, Integer value) { - writeHVACSystemTypeConfigurationAttribute(callback, value, 0); - } - - public void writeHVACSystemTypeConfigurationAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { - BaseTLVType tlvValue = new UIntType(value); - writeAttribute(new WriteAttributesCallbackImpl(callback), H_V_A_C_SYSTEM_TYPE_CONFIGURATION_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); - } - - public void subscribeHVACSystemTypeConfigurationAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, H_V_A_C_SYSTEM_TYPE_CONFIGURATION_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, H_V_A_C_SYSTEM_TYPE_CONFIGURATION_ATTRIBUTE_ID, minInterval, maxInterval); - } - public void readLocalTemperatureCalibrationAttribute( IntegerAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LOCAL_TEMPERATURE_CALIBRATION_ATTRIBUTE_ID); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java index f6c63ca6a40163..215a2516481ca8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java @@ -6233,18 +6233,18 @@ 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; + public Integer heatSetpoint; + public Integer coolSetpoint; private static final long TRANSITION_TIME_ID = 0L; 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 + Integer heatSetpoint, + Integer coolSetpoint ) { this.transitionTime = transitionTime; this.heatSetpoint = heatSetpoint; @@ -6254,19 +6254,19 @@ public ThermostatClusterThermostatScheduleTransition( public StructType encodeTlv() { ArrayList values = new ArrayList<>(); values.add(new StructElement(TRANSITION_TIME_ID, new UIntType(transitionTime))); - values.add(new StructElement(HEAT_SETPOINT_ID, heatSetpoint != null ? new IntType(heatSetpoint) : new NullType())); - values.add(new StructElement(COOL_SETPOINT_ID, coolSetpoint != null ? new IntType(coolSetpoint) : new NullType())); + values.add(new StructElement(HEAT_SETPOINT_ID, new IntType(heatSetpoint))); + values.add(new StructElement(COOL_SETPOINT_ID, new IntType(coolSetpoint))); 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; } Integer transitionTime = null; - @Nullable Integer heatSetpoint = null; - @Nullable Integer coolSetpoint = null; + Integer heatSetpoint = null; + Integer coolSetpoint = null; for (StructElement element: ((StructType)tlvValue).value()) { if (element.contextTagNum() == TRANSITION_TIME_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -6285,7 +6285,7 @@ public static ThermostatClusterThermostatScheduleTransition decodeTlv(BaseTLVTyp } } } - return new ThermostatClusterThermostatScheduleTransition( + return new ThermostatClusterWeeklyScheduleTransitionStruct( transitionTime, heatSetpoint, coolSetpoint @@ -6295,7 +6295,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/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index 44485374612055..d4dab9a6e85f1b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -10388,7 +10388,6 @@ public enum Attribute { AbsMaxCoolSetpointLimit(6L), PICoolingDemand(7L), PIHeatingDemand(8L), - HVACSystemTypeConfiguration(9L), LocalTemperatureCalibration(16L), OccupiedCoolingSetpoint(17L), OccupiedHeatingSetpoint(18L), @@ -10477,7 +10476,8 @@ public enum Command { SetpointRaiseLower(0L), SetWeeklySchedule(1L), GetWeeklySchedule(2L), - ClearWeeklySchedule(3L),; + ClearWeeklySchedule(3L), + GetRelayStatusLog(4L),; private final long id; Command(long id) { this.id = id; @@ -10512,7 +10512,7 @@ public static SetpointRaiseLowerCommandField value(int id) throws NoSuchFieldErr } throw new NoSuchFieldError(); } - }public enum SetWeeklyScheduleCommandField {NumberOfTransitionsForSequence(0),DayOfWeekForSequence(1),ModeForSequence(2),Transitions(3),; + }public enum SetWeeklyScheduleCommandField {NumberOfTransitionsForSequence(0),DayOfWeekforSequence(1),ModeForSequence(2),Transitions(3),; private final int id; SetWeeklyScheduleCommandField(int id) { this.id = id; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index eb4616451405ab..cecad29ddaa74b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -11642,16 +11642,16 @@ 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"); responseValues.put(numberOfTransitionsForSequenceResponseValue, numberOfTransitionsForSequence); - CommandResponseInfo dayOfWeekForSequenceResponseValue = new CommandResponseInfo("dayOfWeekForSequence", "Integer"); - responseValues.put(dayOfWeekForSequenceResponseValue, dayOfWeekForSequence); + CommandResponseInfo dayOfWeekforSequenceResponseValue = new CommandResponseInfo("dayOfWeekforSequence", "Integer"); + 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); @@ -11662,6 +11662,38 @@ public void onError(Exception error) { callback.onFailure(error); } } + + public static class DelegatedThermostatClusterGetRelayStatusLogResponseCallback implements ChipClusters.ThermostatCluster.GetRelayStatusLogResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer timeOfDay, Integer relayStatus, @Nullable Integer localTemperature, @Nullable Integer humidityInPercentage, Integer setPoint, Integer unreadEntries) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo timeOfDayResponseValue = new CommandResponseInfo("timeOfDay", "Integer"); + responseValues.put(timeOfDayResponseValue, timeOfDay); + CommandResponseInfo relayStatusResponseValue = new CommandResponseInfo("relayStatus", "Integer"); + responseValues.put(relayStatusResponseValue, relayStatus); + CommandResponseInfo localTemperatureResponseValue = new CommandResponseInfo("localTemperature", "Integer"); + responseValues.put(localTemperatureResponseValue, localTemperature); + CommandResponseInfo humidityInPercentageResponseValue = new CommandResponseInfo("humidityInPercentage", "Integer"); + responseValues.put(humidityInPercentageResponseValue, humidityInPercentage); + CommandResponseInfo setPointResponseValue = new CommandResponseInfo("setPoint", "Integer"); + responseValues.put(setPointResponseValue, setPoint); + CommandResponseInfo unreadEntriesResponseValue = new CommandResponseInfo("unreadEntries", "Integer"); + responseValues.put(unreadEntriesResponseValue, unreadEntries); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } public static class DelegatedThermostatClusterLocalTemperatureAttributeCallback implements ChipClusters.ThermostatCluster.LocalTemperatureAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -23211,8 +23243,8 @@ public Map> getCommandMap() { CommandParameterInfo thermostatsetWeeklySchedulenumberOfTransitionsForSequenceCommandParameterInfo = new CommandParameterInfo("numberOfTransitionsForSequence", Integer.class, Integer.class); thermostatsetWeeklyScheduleCommandParams.put("numberOfTransitionsForSequence",thermostatsetWeeklySchedulenumberOfTransitionsForSequenceCommandParameterInfo); - CommandParameterInfo thermostatsetWeeklyScheduledayOfWeekForSequenceCommandParameterInfo = new CommandParameterInfo("dayOfWeekForSequence", Integer.class, Integer.class); - thermostatsetWeeklyScheduleCommandParams.put("dayOfWeekForSequence",thermostatsetWeeklyScheduledayOfWeekForSequenceCommandParameterInfo); + CommandParameterInfo thermostatsetWeeklyScheduledayOfWeekforSequenceCommandParameterInfo = new CommandParameterInfo("dayOfWeekforSequence", Integer.class, Integer.class); + thermostatsetWeeklyScheduleCommandParams.put("dayOfWeekforSequence",thermostatsetWeeklyScheduledayOfWeekforSequenceCommandParameterInfo); CommandParameterInfo thermostatsetWeeklySchedulemodeForSequenceCommandParameterInfo = new CommandParameterInfo("modeForSequence", Integer.class, Integer.class); thermostatsetWeeklyScheduleCommandParams.put("modeForSequence",thermostatsetWeeklySchedulemodeForSequenceCommandParameterInfo); @@ -23224,10 +23256,10 @@ public Map> getCommandMap() { , (Integer) commandArguments.get("numberOfTransitionsForSequence") , (Integer) - commandArguments.get("dayOfWeekForSequence") + commandArguments.get("dayOfWeekforSequence") , (Integer) commandArguments.get("modeForSequence") - , (ArrayList) + , (ArrayList) commandArguments.get("transitions") ); }, @@ -23272,6 +23304,18 @@ public Map> getCommandMap() { ); thermostatClusterInteractionInfoMap.put("clearWeeklySchedule", thermostatclearWeeklyScheduleInteractionInfo); + Map thermostatgetRelayStatusLogCommandParams = new LinkedHashMap(); + InteractionInfo thermostatgetRelayStatusLogInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .getRelayStatusLog((ChipClusters.ThermostatCluster.GetRelayStatusLogResponseCallback) callback + ); + }, + () -> new DelegatedThermostatClusterGetRelayStatusLogResponseCallback(), + thermostatgetRelayStatusLogCommandParams + ); + thermostatClusterInteractionInfoMap.put("getRelayStatusLog", thermostatgetRelayStatusLogInteractionInfo); + commandMap.put("thermostat", thermostatClusterInteractionInfoMap); Map fanControlClusterInteractionInfoMap = new LinkedHashMap<>(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index 1cdbced7a386ac..df4d90bc72c4ac 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -10815,17 +10815,6 @@ private static Map readThermostatInteractionInfo() { readThermostatPIHeatingDemandCommandParams ); result.put("readPIHeatingDemandAttribute", readThermostatPIHeatingDemandAttributeInteractionInfo); - Map readThermostatHVACSystemTypeConfigurationCommandParams = new LinkedHashMap(); - InteractionInfo readThermostatHVACSystemTypeConfigurationAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ThermostatCluster) cluster).readHVACSystemTypeConfigurationAttribute( - (ChipClusters.IntegerAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), - readThermostatHVACSystemTypeConfigurationCommandParams - ); - result.put("readHVACSystemTypeConfigurationAttribute", readThermostatHVACSystemTypeConfigurationAttributeInteractionInfo); Map readThermostatLocalTemperatureCalibrationCommandParams = new LinkedHashMap(); InteractionInfo readThermostatLocalTemperatureCalibrationAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java index 2fffad1f36f24b..a33beec3984ebe 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java @@ -2039,28 +2039,6 @@ public Map> getWriteAttributeMap() { writePumpConfigurationAndControlInteractionInfo.put("writeControlModeAttribute", writePumpConfigurationAndControlControlModeAttributeInteractionInfo); writeAttributeMap.put("pumpConfigurationAndControl", writePumpConfigurationAndControlInteractionInfo); Map writeThermostatInteractionInfo = new LinkedHashMap<>(); - Map writeThermostatHVACSystemTypeConfigurationCommandParams = new LinkedHashMap(); - CommandParameterInfo thermostatHVACSystemTypeConfigurationCommandParameterInfo = - new CommandParameterInfo( - "value", - Integer.class, - Integer.class - ); - writeThermostatHVACSystemTypeConfigurationCommandParams.put( - "value", - thermostatHVACSystemTypeConfigurationCommandParameterInfo - ); - InteractionInfo writeThermostatHVACSystemTypeConfigurationAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ThermostatCluster) cluster).writeHVACSystemTypeConfigurationAttribute( - (DefaultClusterCallback) callback, - (Integer) commandArguments.get("value") - ); - }, - () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), - writeThermostatHVACSystemTypeConfigurationCommandParams - ); - writeThermostatInteractionInfo.put("writeHVACSystemTypeConfigurationAttribute", writeThermostatHVACSystemTypeConfigurationAttributeInteractionInfo); Map writeThermostatLocalTemperatureCalibrationCommandParams = new LinkedHashMap(); CommandParameterInfo thermostatlocalTemperatureCalibrationCommandParameterInfo = new CommandParameterInfo( 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 3f6beda67231e4..913ed5bb5af582 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni @@ -94,7 +94,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..9efc9291b92a0b --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt @@ -0,0 +1,71 @@ +/* + * + * 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) + put(ContextSpecificTag(TAG_HEAT_SETPOINT), heatSetpoint) + put(ContextSpecificTag(TAG_COOL_SETPOINT), coolSetpoint) + 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 = tlvReader.getInt(ContextSpecificTag(TAG_HEAT_SETPOINT)) + val coolSetpoint = tlvReader.getInt(ContextSpecificTag(TAG_COOL_SETPOINT)) + + 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..657c16ff1e53fe 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 @@ -23,9 +23,18 @@ import matter.devicecontroller.cluster.structs.* class ThermostatCluster(private val controller: MatterController, private val endpointId: UShort) { class GetWeeklyScheduleResponse( val numberOfTransitionsForSequence: UByte, - val dayOfWeekForSequence: UInt, + val dayOfWeekforSequence: UInt, val modeForSequence: UInt, - val transitions: List + val transitions: List + ) + + class GetRelayStatusLogResponse( + val timeOfDay: UShort, + val relayStatus: UInt, + val localTemperature: Short?, + val humidityInPercentage: UByte?, + val setPoint: Short, + val unreadEntries: UShort ) class LocalTemperatureAttribute(val value: Short?) @@ -70,9 +79,9 @@ class ThermostatCluster(private val controller: MatterController, private val en suspend fun setWeeklySchedule( numberOfTransitionsForSequence: UByte, - dayOfWeekForSequence: UInt, + dayOfWeekforSequence: UInt, modeForSequence: UInt, - transitions: List, + transitions: List, timedInvokeTimeoutMs: Int? = null ) { val commandId = 1L @@ -108,6 +117,16 @@ class ThermostatCluster(private val controller: MatterController, private val en } } + suspend fun getRelayStatusLog(timedInvokeTimeoutMs: Int? = null): GetRelayStatusLogResponse { + val commandId = 4L + + if (timedInvokeTimeoutMs != null) { + // Do the action with timedInvokeTimeoutMs + } else { + // Do the action without timedInvokeTimeoutMs + } + } + suspend fun readLocalTemperatureAttribute(): LocalTemperatureAttribute { // Implementation needs to be added here } @@ -186,28 +205,6 @@ class ThermostatCluster(private val controller: MatterController, private val en // Implementation needs to be added here } - suspend fun readHVACSystemTypeConfigurationAttribute(): UByte { - // Implementation needs to be added here - } - - suspend fun writeHVACSystemTypeConfigurationAttribute( - value: UInt, - timedWriteTimeoutMs: Int? = null - ) { - if (timedWriteTimeoutMs != null) { - // Do the action with timedWriteTimeoutMs - } else { - // Do the action without timedWriteTimeoutMs - } - } - - suspend fun subscribeHVACSystemTypeConfigurationAttribute( - minInterval: Int, - maxInterval: Int - ): UByte { - // Implementation needs to be added here - } - suspend fun readLocalTemperatureCalibrationAttribute(): Byte { // Implementation needs to be added here } 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 993016c6e672ed..03b5c0f370fef4 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/files.gni @@ -94,7 +94,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..20be46cb17e56d --- /dev/null +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt @@ -0,0 +1,71 @@ +/* + * + * 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) + put(ContextSpecificTag(TAG_HEAT_SETPOINT), heatSetpoint) + put(ContextSpecificTag(TAG_COOL_SETPOINT), coolSetpoint) + 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 = tlvReader.getShort(ContextSpecificTag(TAG_HEAT_SETPOINT)) + val coolSetpoint = tlvReader.getShort(ContextSpecificTag(TAG_COOL_SETPOINT)) + + 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 f8378c15aaf01c..d44dff41bc2ba1 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -23712,22 +23712,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::HVACSystemTypeConfiguration::Id: { - using TypeInfo = Attributes::HVACSystemTypeConfiguration::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Integer"; - std::string valueCtorSignature = "(I)V"; - jint jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } case Attributes::LocalTemperatureCalibration::Id: { using TypeInfo = Attributes::LocalTemperatureCalibration::TypeInfo; TypeInfo::DecodableType cppValue; @@ -23899,7 +23883,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; @@ -24050,7 +24034,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; @@ -24066,7 +24050,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; @@ -24355,7 +24339,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..7e3677dd792390 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -5351,58 +5351,6 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeControlModeAttribute) onFailure.release(); } -JNI_METHOD(void, ThermostatCluster, writeHVACSystemTypeConfigurationAttribute) -(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) -{ - chip::DeviceLayer::StackLock lock; - ListFreer listFreer; - using TypeInfo = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; - TypeInfo::Type cppValue; - - std::vector> cleanupByteArrays; - std::vector> cleanupStrings; - - cppValue = - static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); - - std::unique_ptr onSuccess( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onSuccess.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); - - std::unique_ptr onFailure( - Platform::New(callback), Platform::Delete); - VerifyOrReturn(onFailure.get() != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); - - CHIP_ERROR err = CHIP_NO_ERROR; - ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); - VerifyOrReturn(cppCluster != nullptr, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( - env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); - - auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); - auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); - - if (timedWriteTimeoutMs == nullptr) - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); - } - else - { - err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, - chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); - } - VerifyOrReturn( - err == CHIP_NO_ERROR, - chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); - - onSuccess.release(); - onFailure.release(); -} - JNI_METHOD(void, ThermostatCluster, writeLocalTemperatureCalibrationAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { @@ -5934,8 +5882,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 +6150,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 +6582,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..1cccaf31759fa5 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -4890,13 +4890,13 @@ void CHIPThermostatClusterGetWeeklyScheduleResponseCallback::CallbackFn( chip::JniReferences::GetInstance().CreateBoxedObject(NumberOfTransitionsForSequenceClassName.c_str(), NumberOfTransitionsForSequenceCtorSignature.c_str(), jniNumberOfTransitionsForSequence, NumberOfTransitionsForSequence); - jobject DayOfWeekForSequence; - std::string DayOfWeekForSequenceClassName = "java/lang/Integer"; - std::string DayOfWeekForSequenceCtorSignature = "(I)V"; - jint jniDayOfWeekForSequence = static_cast(dataResponse.dayOfWeekForSequence.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(DayOfWeekForSequenceClassName.c_str(), - DayOfWeekForSequenceCtorSignature.c_str(), jniDayOfWeekForSequence, - DayOfWeekForSequence); + jobject DayOfWeekforSequence; + std::string DayOfWeekforSequenceClassName = "java/lang/Integer"; + std::string DayOfWeekforSequenceCtorSignature = "(I)V"; + jint jniDayOfWeekforSequence = static_cast(dataResponse.dayOfWeekforSequence.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(DayOfWeekforSequenceClassName.c_str(), + DayOfWeekforSequenceCtorSignature.c_str(), jniDayOfWeekforSequence, + DayOfWeekforSequence); jobject ModeForSequence; std::string ModeForSequenceClassName = "java/lang/Integer"; std::string ModeForSequenceCtorSignature = "(I)V"; @@ -4919,59 +4919,155 @@ void CHIPThermostatClusterGetWeeklyScheduleResponseCallback::CallbackFn( newElement_0_transitionTimeCtorSignature.c_str(), jninewElement_0_transitionTime, newElement_0_transitionTime); jobject newElement_0_heatSetpoint; - if (entry_0.heatSetpoint.IsNull()) - { - newElement_0_heatSetpoint = nullptr; - } - else - { - std::string newElement_0_heatSetpointClassName = "java/lang/Integer"; - std::string newElement_0_heatSetpointCtorSignature = "(I)V"; - jint jninewElement_0_heatSetpoint = static_cast(entry_0.heatSetpoint.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_heatSetpointClassName.c_str(), - newElement_0_heatSetpointCtorSignature.c_str(), - jninewElement_0_heatSetpoint, newElement_0_heatSetpoint); - } + std::string newElement_0_heatSetpointClassName = "java/lang/Integer"; + std::string newElement_0_heatSetpointCtorSignature = "(I)V"; + jint jninewElement_0_heatSetpoint = static_cast(entry_0.heatSetpoint); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_heatSetpointClassName.c_str(), + newElement_0_heatSetpointCtorSignature.c_str(), + jninewElement_0_heatSetpoint, newElement_0_heatSetpoint); jobject newElement_0_coolSetpoint; - if (entry_0.coolSetpoint.IsNull()) - { - newElement_0_coolSetpoint = nullptr; - } - else - { - std::string newElement_0_coolSetpointClassName = "java/lang/Integer"; - std::string newElement_0_coolSetpointCtorSignature = "(I)V"; - jint jninewElement_0_coolSetpoint = static_cast(entry_0.coolSetpoint.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_coolSetpointClassName.c_str(), - newElement_0_coolSetpointCtorSignature.c_str(), - jninewElement_0_coolSetpoint, newElement_0_coolSetpoint); - } - - jclass thermostatScheduleTransitionStructClass_1; + std::string newElement_0_coolSetpointClassName = "java/lang/Integer"; + std::string newElement_0_coolSetpointCtorSignature = "(I)V"; + jint jninewElement_0_coolSetpoint = static_cast(entry_0.coolSetpoint); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_coolSetpointClassName.c_str(), + newElement_0_coolSetpointCtorSignature.c_str(), + jninewElement_0_coolSetpoint, newElement_0_coolSetpoint); + + 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); } - env->CallVoidMethod(javaCallbackRef, javaMethod, NumberOfTransitionsForSequence, DayOfWeekForSequence, ModeForSequence, + env->CallVoidMethod(javaCallbackRef, javaMethod, NumberOfTransitionsForSequence, DayOfWeekforSequence, ModeForSequence, Transitions); } +CHIPThermostatClusterGetRelayStatusLogResponseCallback::CHIPThermostatClusterGetRelayStatusLogResponseCallback( + jobject javaCallback) : Callback::Callback(CallbackFn, this) +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPThermostatClusterGetRelayStatusLogResponseCallback::~CHIPThermostatClusterGetRelayStatusLogResponseCallback() +{ + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +}; + +void CHIPThermostatClusterGetRelayStatusLogResponseCallback::CallbackFn( + void * context, const chip::app::Clusters::Thermostat::Commands::GetRelayStatusLogResponse::DecodableType & dataResponse) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + jmethodID javaMethod; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); + + std::unique_ptr + cppCallback(reinterpret_cast(context), + chip::Platform::Delete); + VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); + + javaCallbackRef = cppCallback->javaCallbackRef; + // Java callback is allowed to be null, exit early if this is the case. + VerifyOrReturn(javaCallbackRef != nullptr); + + err = JniReferences::GetInstance().FindMethod( + env, javaCallbackRef, "onSuccess", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", + &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); + + jobject TimeOfDay; + std::string TimeOfDayClassName = "java/lang/Integer"; + std::string TimeOfDayCtorSignature = "(I)V"; + jint jniTimeOfDay = static_cast(dataResponse.timeOfDay); + chip::JniReferences::GetInstance().CreateBoxedObject(TimeOfDayClassName.c_str(), TimeOfDayCtorSignature.c_str(), + jniTimeOfDay, TimeOfDay); + jobject RelayStatus; + std::string RelayStatusClassName = "java/lang/Integer"; + std::string RelayStatusCtorSignature = "(I)V"; + jint jniRelayStatus = static_cast(dataResponse.relayStatus.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(RelayStatusClassName.c_str(), RelayStatusCtorSignature.c_str(), + jniRelayStatus, RelayStatus); + jobject LocalTemperature; + if (dataResponse.localTemperature.IsNull()) + { + LocalTemperature = nullptr; + } + else + { + std::string LocalTemperatureClassName = "java/lang/Integer"; + std::string LocalTemperatureCtorSignature = "(I)V"; + jint jniLocalTemperature = static_cast(dataResponse.localTemperature.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + LocalTemperatureClassName.c_str(), LocalTemperatureCtorSignature.c_str(), jniLocalTemperature, LocalTemperature); + } + jobject HumidityInPercentage; + if (dataResponse.humidityInPercentage.IsNull()) + { + HumidityInPercentage = nullptr; + } + else + { + std::string HumidityInPercentageClassName = "java/lang/Integer"; + std::string HumidityInPercentageCtorSignature = "(I)V"; + jint jniHumidityInPercentage = static_cast(dataResponse.humidityInPercentage.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(HumidityInPercentageClassName.c_str(), + HumidityInPercentageCtorSignature.c_str(), + jniHumidityInPercentage, HumidityInPercentage); + } + jobject SetPoint; + std::string SetPointClassName = "java/lang/Integer"; + std::string SetPointCtorSignature = "(I)V"; + jint jniSetPoint = static_cast(dataResponse.setPoint); + chip::JniReferences::GetInstance().CreateBoxedObject(SetPointClassName.c_str(), SetPointCtorSignature.c_str(), + jniSetPoint, SetPoint); + jobject UnreadEntries; + std::string UnreadEntriesClassName = "java/lang/Integer"; + std::string UnreadEntriesCtorSignature = "(I)V"; + jint jniUnreadEntries = static_cast(dataResponse.unreadEntries); + chip::JniReferences::GetInstance().CreateBoxedObject(UnreadEntriesClassName.c_str(), UnreadEntriesCtorSignature.c_str(), + jniUnreadEntries, UnreadEntries); + + env->CallVoidMethod(javaCallbackRef, javaMethod, TimeOfDay, RelayStatus, LocalTemperature, HumidityInPercentage, SetPoint, + UnreadEntries); +} CHIPChannelClusterChangeChannelResponseCallback::CHIPChannelClusterChangeChannelResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) { diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h index 23b691e07a332b..5d1004a18f30f0 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h @@ -766,6 +766,21 @@ class CHIPThermostatClusterGetWeeklyScheduleResponseCallback jobject javaCallbackRef; }; +class CHIPThermostatClusterGetRelayStatusLogResponseCallback + : public Callback::Callback +{ +public: + CHIPThermostatClusterGetRelayStatusLogResponseCallback(jobject javaCallback); + + ~CHIPThermostatClusterGetRelayStatusLogResponseCallback(); + + static void CallbackFn(void * context, + const chip::app::Clusters::Thermostat::Commands::GetRelayStatusLogResponse::DecodableType & data); + +private: + jobject javaCallbackRef; +}; + class CHIPChannelClusterChangeChannelResponseCallback : public Callback::Callback { diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 3a63b5141721e8..5c530ed580c789 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -7704,9 +7704,9 @@ class ChipClusters: "commandName": "SetWeeklySchedule", "args": { "numberOfTransitionsForSequence": "int", - "dayOfWeekForSequence": "int", + "dayOfWeekforSequence": "int", "modeForSequence": "int", - "transitions": "ThermostatScheduleTransition", + "transitions": "WeeklyScheduleTransitionStruct", }, }, 0x00000002: { @@ -7723,6 +7723,12 @@ class ChipClusters: "args": { }, }, + 0x00000004: { + "commandId": 0x00000004, + "commandName": "GetRelayStatusLog", + "args": { + }, + }, }, "attributes": { 0x00000000: { @@ -7779,13 +7785,6 @@ class ChipClusters: "type": "int", "reportable": True, }, - 0x00000009: { - "attributeName": "HVACSystemTypeConfiguration", - "attributeId": 0x00000009, - "type": "int", - "reportable": True, - "writable": True, - }, 0x00000010: { "attributeName": "LocalTemperatureCalibration", "attributeId": 0x00000010, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 9401e9653c15d1..fc72afcea6b556 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -27518,7 +27518,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="absMaxCoolSetpointLimit", Tag=0x00000006, Type=typing.Optional[int]), ClusterObjectFieldDescriptor(Label="PICoolingDemand", Tag=0x00000007, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="PIHeatingDemand", Tag=0x00000008, Type=typing.Optional[uint]), - ClusterObjectFieldDescriptor(Label="HVACSystemTypeConfiguration", Tag=0x00000009, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="localTemperatureCalibration", Tag=0x00000010, Type=typing.Optional[int]), ClusterObjectFieldDescriptor(Label="occupiedCoolingSetpoint", Tag=0x00000011, Type=typing.Optional[int]), ClusterObjectFieldDescriptor(Label="occupiedHeatingSetpoint", Tag=0x00000012, Type=typing.Optional[int]), @@ -27530,17 +27529,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]), @@ -27550,14 +27549,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]), @@ -27575,7 +27574,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: absMaxCoolSetpointLimit: 'typing.Optional[int]' = None PICoolingDemand: 'typing.Optional[uint]' = None PIHeatingDemand: 'typing.Optional[uint]' = None - HVACSystemTypeConfiguration: 'typing.Optional[uint]' = None localTemperatureCalibration: 'typing.Optional[int]' = None occupiedCoolingSetpoint: 'typing.Optional[int]' = None occupiedHeatingSetpoint: 'typing.Optional[int]' = None @@ -27587,17 +27585,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 @@ -27607,14 +27605,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 @@ -27623,17 +27621,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 ThermostatControlSequence(MatterIntEnum): + 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 ControlSequenceOfOperationEnum(MatterIntEnum): kCoolingOnly = 0x00 kCoolingWithReheat = 0x01 kHeatingOnly = 0x02 @@ -27646,17 +27688,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 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 ThermostatSystemMode(MatterIntEnum): + 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 @@ -27672,45 +27738,101 @@ 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 AlarmCodeBitmap(IntFlag): + kInitialization = 0x1 + kHardware = 0x2 + kSelfCalibration = 0x4 class Feature(IntFlag): kHeating = 0x1 kCooling = 0x2 kOccupancy = 0x4 - kScheduleConfiguration = 0x8 + kZigbeeScheduleConfiguration = 0x8 kSetback = 0x10 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( Fields=[ ClusterObjectFieldDescriptor(Label="transitionTime", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="heatSetpoint", Tag=1, Type=typing.Union[Nullable, int]), - ClusterObjectFieldDescriptor(Label="coolSetpoint", Tag=2, Type=typing.Union[Nullable, int]), + ClusterObjectFieldDescriptor(Label="heatSetpoint", Tag=1, Type=int), + ClusterObjectFieldDescriptor(Label="coolSetpoint", Tag=2, Type=int), ]) transitionTime: 'uint' = 0 - heatSetpoint: 'typing.Union[Nullable, int]' = NullValue - coolSetpoint: 'typing.Union[Nullable, int]' = NullValue + heatSetpoint: 'int' = 0 + coolSetpoint: 'int' = 0 class Commands: @dataclass @@ -27724,11 +27846,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 @@ -27743,15 +27865,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="numberOfTransitionsForSequence", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="dayOfWeekForSequence", Tag=1, 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 + 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): @@ -27765,15 +27887,41 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="numberOfTransitionsForSequence", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="dayOfWeekForSequence", Tag=1, 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 + 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 GetRelayStatusLogResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000201 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = False + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="timeOfDay", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="relayStatus", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="localTemperature", Tag=2, Type=typing.Union[Nullable, int]), + ClusterObjectFieldDescriptor(Label="humidityInPercentage", Tag=3, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="setPoint", Tag=4, Type=int), + ClusterObjectFieldDescriptor(Label="unreadEntries", Tag=5, Type=uint), + ]) + + timeOfDay: 'uint' = 0 + relayStatus: 'uint' = 0 + localTemperature: 'typing.Union[Nullable, int]' = NullValue + humidityInPercentage: 'typing.Union[Nullable, uint]' = NullValue + setPoint: 'int' = 0 + unreadEntries: 'uint' = 0 @dataclass class GetWeeklySchedule(ClusterCommand): @@ -27806,6 +27954,19 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ]) + @dataclass + class GetRelayStatusLog(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000201 + command_id: typing.ClassVar[int] = 0x00000004 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'GetRelayStatusLogResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + class Attributes: @dataclass class LocalTemperature(ClusterAttributeDescriptor): @@ -27951,22 +28112,6 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None - @dataclass - class HVACSystemTypeConfiguration(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000201 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000009 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - @dataclass class LocalTemperatureCalibration(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -28155,9 +28300,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): @@ -28171,9 +28316,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): @@ -28187,9 +28332,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): @@ -28203,9 +28348,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): @@ -28251,9 +28396,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): @@ -28315,9 +28460,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): @@ -28475,9 +28620,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): @@ -28507,9 +28652,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): @@ -28523,9 +28668,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): @@ -28555,9 +28700,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): @@ -28587,9 +28732,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/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index 264fb5d4ba7f5a..684d9fda449778 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -3480,9 +3480,6 @@ static BOOL AttributeIsSpecifiedInThermostatCluster(AttributeId aAttributeId) case Attributes::PIHeatingDemand::Id: { return YES; } - case Attributes::HVACSystemTypeConfiguration::Id: { - return YES; - } case Attributes::LocalTemperatureCalibration::Id: { return YES; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 6984dd50ecabf4..741a178a66c6f1 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -9579,17 +9579,6 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::HVACSystemTypeConfiguration::Id: { - using TypeInfo = Attributes::HVACSystemTypeConfiguration::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } case Attributes::LocalTemperatureCalibration::Id: { using TypeInfo = Attributes::LocalTemperatureCalibration::TypeInfo; TypeInfo::DecodableType cppValue; @@ -9708,7 +9697,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: { @@ -9730,7 +9719,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: { @@ -9741,7 +9730,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: { @@ -9752,7 +9741,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: { @@ -9785,7 +9774,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: { @@ -9811,7 +9800,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: { @@ -9822,7 +9811,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: { @@ -9833,7 +9822,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: { @@ -9971,7 +9960,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: { @@ -9993,7 +9982,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: { @@ -10004,7 +9993,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: { @@ -10015,7 +10004,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: { @@ -10026,7 +10015,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: { @@ -10052,7 +10041,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 8e934e47fe4877..7b8c6cbdcf91be 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -8701,6 +8701,14 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)clearWeeklyScheduleWithCompletion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command GetRelayStatusLog + * + * This command is used to query the thermostat internal relay status log. This command has no payload. + */ +- (void)getRelayStatusLogWithParams:(MTRThermostatClusterGetRelayStatusLogParams * _Nullable)params completion:(void (^)(MTRThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)getRelayStatusLogWithCompletion:(void (^)(MTRThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams *)params @@ -8756,14 +8764,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributePIHeatingDemandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeHVACSystemTypeConfigurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeHVACSystemTypeConfigurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - - (void)readAttributeLocalTemperatureCalibrationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -17373,73 +17373,163 @@ 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, 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)); +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, 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, 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_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatControlSequenceOfOperationCoolingWithReheat MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatControlSequenceOfOperationHeatingOnly MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRThermostatControlSequenceOfOperationHeatingWithReheat MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRThermostatControlSequenceOfOperationCoolingAndHeating MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRThermostatControlSequenceOfOperationCoolingAndHeatingWithReheat MTR_PROVISIONALLY_AVAILABLE = 0x05, +} MTR_PROVISIONALLY_AVAILABLE; + +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_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatSetpointRaiseLowerModeCool MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatSetpointRaiseLowerModeBoth MTR_PROVISIONALLY_AVAILABLE = 0x02, +} MTR_PROVISIONALLY_AVAILABLE; + +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, - MTRThermostatSystemModeAuto MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRThermostatSystemModeCool MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTRThermostatSystemModeHeat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRThermostatSystemModeEmergencyHeat MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, - MTRThermostatSystemModeEmergencyHeating MTR_DEPRECATED("Please use MTRThermostatSystemModeEmergencyHeat", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, - MTRThermostatSystemModePrecooling MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, - MTRThermostatSystemModeFanOnly MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, - MTRThermostatSystemModeDry MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x08, - 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)); + MTRThermostatSystemModeOff MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatSystemModeAuto MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatSystemModeCool MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRThermostatSystemModeHeat MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRThermostatSystemModeEmergencyHeat MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRThermostatSystemModePrecooling MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRThermostatSystemModeFanOnly MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRThermostatSystemModeDry MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRThermostatSystemModeSleep MTR_PROVISIONALLY_AVAILABLE = 0x09, +} MTR_PROVISIONALLY_AVAILABLE; -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, -} MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +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_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatRunningModeCool MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRThermostatRunningModeHeat MTR_PROVISIONALLY_AVAILABLE = 0x04, +} MTR_PROVISIONALLY_AVAILABLE; + +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(uint8_t, MTRThermostatAlarmCodeBitmap) { + MTRThermostatAlarmCodeBitmapInitialization MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatAlarmCodeBitmapHardware MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRThermostatAlarmCodeBitmapSelfCalibration MTR_PROVISIONALLY_AVAILABLE = 0x4, +} 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, MTRThermostatFeatureOccupancy MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRThermostatFeatureScheduleConfiguration MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x8, - MTRThermostatFeatureSchedule MTR_DEPRECATED("Please use MTRThermostatFeatureScheduleConfiguration", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x8, + MTRThermostatFeatureZigbeeScheduleConfiguration MTR_PROVISIONALLY_AVAILABLE = 0x8, MTRThermostatFeatureSetback MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, MTRThermostatFeatureAutoMode MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x20, MTRThermostatFeatureAutomode MTR_DEPRECATED("Please use MTRThermostatFeatureAutoMode", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x20, 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, 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)); +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_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatScheduleDayOfWeekBitmapMonday MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRThermostatScheduleDayOfWeekBitmapTuesday MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRThermostatScheduleDayOfWeekBitmapWednesday MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRThermostatScheduleDayOfWeekBitmapThursday MTR_PROVISIONALLY_AVAILABLE = 0x10, + MTRThermostatScheduleDayOfWeekBitmapFriday MTR_PROVISIONALLY_AVAILABLE = 0x20, + MTRThermostatScheduleDayOfWeekBitmapSaturday MTR_PROVISIONALLY_AVAILABLE = 0x40, + MTRThermostatScheduleDayOfWeekBitmapAway MTR_PROVISIONALLY_AVAILABLE = 0x80, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint8_t, MTRThermostatScheduleModeBitmap) { + MTRThermostatScheduleModeBitmapHeatSetpointPresent MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatScheduleModeBitmapCoolSetpointPresent MTR_PROVISIONALLY_AVAILABLE = 0x2, +} MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRFanControlAirflowDirection) { MTRFanControlAirflowDirectionForward MTR_PROVISIONALLY_AVAILABLE = 0x00, @@ -23374,15 +23464,6 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePIHeatingDemandWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + (void)readAttributePIHeatingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePIHeatingDemandWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)readAttributeHVACSystemTypeConfigurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHVACSystemTypeConfigurationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeHVACSystemTypeConfigurationWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeHVACSystemTypeConfigurationWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -- (void)subscribeAttributeHVACSystemTypeConfigurationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeHVACSystemTypeConfigurationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); -+ (void)readAttributeHVACSystemTypeConfigurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHVACSystemTypeConfigurationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - - (void)readAttributeLocalTemperatureCalibrationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocalTemperatureCalibrationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLocalTemperatureCalibrationWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLocalTemperatureCalibrationWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 70a9678fab237f..7691e6114459c1 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -62506,6 +62506,34 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa queue:self.callbackQueue completion:responseHandler]; } +- (void)getRelayStatusLogWithCompletion:(void (^)(MTRThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self getRelayStatusLogWithParams:nil completion:completion]; +} +- (void)getRelayStatusLogWithParams:(MTRThermostatClusterGetRelayStatusLogParams * _Nullable)params completion:(void (^)(MTRThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRThermostatClusterGetRelayStatusLogParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::GetRelayStatusLog::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRThermostatClusterGetRelayStatusLogResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} - (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { @@ -62831,70 +62859,6 @@ + (void)readAttributePIHeatingDemandWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeHVACSystemTypeConfigurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeHVACSystemTypeConfigurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeLocalTemperatureCalibrationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; @@ -63567,7 +63531,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); }); @@ -63695,7 +63659,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); }); @@ -63903,7 +63867,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); }); @@ -64036,7 +64000,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); }); @@ -64590,7 +64554,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); }); @@ -64718,7 +64682,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); }); @@ -64782,7 +64746,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); }); @@ -64846,7 +64810,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); }); @@ -64910,7 +64874,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); }); @@ -65010,7 +64974,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); }); @@ -65605,49 +65569,6 @@ + (void)readAttributePIHeatingDemandWithAttributeCache:(MTRAttributeCacheContain }]; } -- (void)readAttributeHVACSystemTypeConfigurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeHVACSystemTypeConfigurationWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeHVACSystemTypeConfigurationWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeHVACSystemTypeConfigurationWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeHVACSystemTypeConfigurationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeHVACSystemTypeConfigurationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeHVACSystemTypeConfigurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeHVACSystemTypeConfigurationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - - (void)readAttributeLocalTemperatureCalibrationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { [self readAttributeLocalTemperatureCalibrationWithCompletion: diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index ecef7171bb2f72..1a4eba24dae44c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -3145,9 +3145,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRClusterThermostatAttributePIHeatingDemandID MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterThermostatAttributePIHeatingDemandID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000008, - MTRClusterThermostatAttributeHVACSystemTypeConfigurationID - MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterThermostatAttributeHVACSystemTypeConfigurationID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) - = 0x00000009, MTRClusterThermostatAttributeLocalTemperatureCalibrationID MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterThermostatAttributeLocalTemperatureCalibrationID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000010, @@ -3291,7 +3288,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterThermostatAttributeAbsMaxCoolSetpointLimitID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000006, MTRAttributeIDTypeClusterThermostatAttributePICoolingDemandID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000007, MTRAttributeIDTypeClusterThermostatAttributePIHeatingDemandID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000008, - MTRAttributeIDTypeClusterThermostatAttributeHVACSystemTypeConfigurationID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000009, MTRAttributeIDTypeClusterThermostatAttributeLocalTemperatureCalibrationID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000010, MTRAttributeIDTypeClusterThermostatAttributeOccupiedCoolingSetpointID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000011, MTRAttributeIDTypeClusterThermostatAttributeOccupiedHeatingSetpointID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000012, @@ -6407,8 +6403,10 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterThermostatCommandSetpointRaiseLowerID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, MTRCommandIDTypeClusterThermostatCommandGetWeeklyScheduleResponseID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, MTRCommandIDTypeClusterThermostatCommandSetWeeklyScheduleID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, + MTRCommandIDTypeClusterThermostatCommandGetRelayStatusLogResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, MTRCommandIDTypeClusterThermostatCommandGetWeeklyScheduleID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000002, MTRCommandIDTypeClusterThermostatCommandClearWeeklyScheduleID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000003, + MTRCommandIDTypeClusterThermostatCommandGetRelayStatusLogID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, // Cluster FanControl deprecated command id names diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 71ba182bfb07a8..500dd3b7f8aac3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -4034,6 +4034,9 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)clearWeeklyScheduleWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)getRelayStatusLogWithParams:(MTRThermostatClusterGetRelayStatusLogParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)getRelayStatusLogWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeLocalTemperatureWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4053,10 +4056,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributePIHeatingDemandWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeHVACSystemTypeConfigurationWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - - (NSDictionary * _Nullable)readAttributeLocalTemperatureCalibrationWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index f97fbea379ab13..45656d3a39bfff 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -11927,6 +11927,37 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa completion:responseHandler]; } +- (void)getRelayStatusLogWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self getRelayStatusLogWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)getRelayStatusLogWithParams:(MTRThermostatClusterGetRelayStatusLogParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRThermostatClusterGetRelayStatusLogParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::GetRelayStatusLog::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRThermostatClusterGetRelayStatusLogResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + - (NSDictionary * _Nullable)readAttributeLocalTemperatureWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeLocalTemperatureID) params:params]; @@ -11972,22 +12003,6 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePIHeatingDemandID) params:params]; } -- (NSDictionary * _Nullable)readAttributeHVACSystemTypeConfigurationWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeHVACSystemTypeConfigurationID) params:params]; -} - -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeHVACSystemTypeConfigurationWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeHVACSystemTypeConfigurationID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; -} - - (NSDictionary * _Nullable)readAttributeLocalTemperatureCalibrationWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeLocalTemperatureCalibrationID) params:params]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 034e7b3efbcabd..b3163c6b658f72 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -7297,7 +7297,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSNumber * _Nonnull numberOfTransitionsForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekforSequence MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull modeForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -7337,7 +7337,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSNumber * _Nonnull numberOfTransitionsForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekforSequence MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull modeForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -7368,6 +7368,35 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRThermostatClusterGetRelayStatusLogResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull timeOfDay MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull relayStatus MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nullable localTemperature MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nullable humidityInPercentage MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull setPoint MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull unreadEntries MTR_PROVISIONALLY_AVAILABLE; + +/** + * Initialize an MTRThermostatClusterGetRelayStatusLogResponseParams with a response-value dictionary + * of the sort that MTRDeviceResponseHandler would receive. + * + * Will return nil and hand out an error if the response-value dictionary is not + * a command data response or is not the right command response. + * + * Will return nil and hand out an error if the data response does not match the known + * schema for this command. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRThermostatClusterGetWeeklyScheduleParams : NSObject @@ -7428,6 +7457,34 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRThermostatClusterGetRelayStatusLogParams : NSObject +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + MTR_PROVISIONALLY_AVAILABLE @interface MTRFanControlClusterStepParams : NSObject diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 84aa2dd3157ba2..c9927a7d902ad8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -20241,7 +20241,7 @@ - (instancetype)init _numberOfTransitionsForSequence = @(0); - _dayOfWeekForSequence = @(0); + _dayOfWeekforSequence = @(0); _modeForSequence = @(0); @@ -20256,7 +20256,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRThermostatClusterGetWeeklyScheduleResponseParams alloc] init]; other.numberOfTransitionsForSequence = self.numberOfTransitionsForSequence; - other.dayOfWeekForSequence = self.dayOfWeekForSequence; + other.dayOfWeekforSequence = self.dayOfWeekforSequence; other.modeForSequence = self.modeForSequence; other.transitions = self.transitions; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; @@ -20266,7 +20266,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: numberOfTransitionsForSequence:%@; dayOfWeekForSequence:%@; modeForSequence:%@; transitions:%@; >", NSStringFromClass([self class]), _numberOfTransitionsForSequence, _dayOfWeekForSequence, _modeForSequence, _transitions]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: numberOfTransitionsForSequence:%@; dayOfWeekforSequence:%@; modeForSequence:%@; transitions:%@; >", NSStringFromClass([self class]), _numberOfTransitionsForSequence, _dayOfWeekforSequence, _modeForSequence, _transitions]; return descriptionString; } @@ -20320,7 +20320,7 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Thermost self.numberOfTransitionsForSequence = [NSNumber numberWithUnsignedChar:decodableStruct.numberOfTransitionsForSequence]; } { - self.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:decodableStruct.dayOfWeekForSequence.Raw()]; + self.dayOfWeekforSequence = [NSNumber numberWithUnsignedChar:decodableStruct.dayOfWeekforSequence.Raw()]; } { self.modeForSequence = [NSNumber numberWithUnsignedChar:decodableStruct.modeForSequence.Raw()]; @@ -20331,19 +20331,11 @@ - (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; - } else { - newElement_0.heatSetpoint = [NSNumber numberWithShort:entry_0.heatSetpoint.Value()]; - } - if (entry_0.coolSetpoint.IsNull()) { - newElement_0.coolSetpoint = nil; - } else { - newElement_0.coolSetpoint = [NSNumber numberWithShort:entry_0.coolSetpoint.Value()]; - } + newElement_0.heatSetpoint = [NSNumber numberWithShort:entry_0.heatSetpoint]; + newElement_0.coolSetpoint = [NSNumber numberWithShort:entry_0.coolSetpoint]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -20365,7 +20357,7 @@ - (instancetype)init _numberOfTransitionsForSequence = @(0); - _dayOfWeekForSequence = @(0); + _dayOfWeekforSequence = @(0); _modeForSequence = @(0); @@ -20381,7 +20373,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRThermostatClusterSetWeeklyScheduleParams alloc] init]; other.numberOfTransitionsForSequence = self.numberOfTransitionsForSequence; - other.dayOfWeekForSequence = self.dayOfWeekForSequence; + other.dayOfWeekforSequence = self.dayOfWeekforSequence; other.modeForSequence = self.modeForSequence; other.transitions = self.transitions; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; @@ -20392,7 +20384,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: numberOfTransitionsForSequence:%@; dayOfWeekForSequence:%@; modeForSequence:%@; transitions:%@; >", NSStringFromClass([self class]), _numberOfTransitionsForSequence, _dayOfWeekForSequence, _modeForSequence, _transitions]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: numberOfTransitionsForSequence:%@; dayOfWeekforSequence:%@; modeForSequence:%@; transitions:%@; >", NSStringFromClass([self class]), _numberOfTransitionsForSequence, _dayOfWeekforSequence, _modeForSequence, _transitions]; return descriptionString; } @@ -20408,7 +20400,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.numberOfTransitionsForSequence = self.numberOfTransitionsForSequence.unsignedCharValue; } { - encodableStruct.dayOfWeekForSequence = static_cast>(self.dayOfWeekForSequence.unsignedCharValue); + encodableStruct.dayOfWeekforSequence = static_cast>(self.dayOfWeekforSequence.unsignedCharValue); } { encodableStruct.modeForSequence = static_cast>(self.modeForSequence.unsignedCharValue); @@ -20424,24 +20416,14 @@ - (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(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].heatSetpoint.SetNonNull(); - nonNullValue_2 = element_0.heatSetpoint.shortValue; - } - if (element_0.coolSetpoint == nil) { - listHolder_0->mList[i_0].coolSetpoint.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].coolSetpoint.SetNonNull(); - nonNullValue_2 = element_0.coolSetpoint.shortValue; - } + listHolder_0->mList[i_0].heatSetpoint = element_0.heatSetpoint.shortValue; + listHolder_0->mList[i_0].coolSetpoint = element_0.coolSetpoint.shortValue; } encodableStruct.transitions = ListType_0(listHolder_0->mList, self.transitions.count); } else { @@ -20488,6 +20470,123 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end +@implementation MTRThermostatClusterGetRelayStatusLogResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _timeOfDay = @(0); + + _relayStatus = @(0); + + _localTemperature = nil; + + _humidityInPercentage = nil; + + _setPoint = @(0); + + _unreadEntries = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRThermostatClusterGetRelayStatusLogResponseParams alloc] init]; + + other.timeOfDay = self.timeOfDay; + other.relayStatus = self.relayStatus; + other.localTemperature = self.localTemperature; + other.humidityInPercentage = self.humidityInPercentage; + other.setPoint = self.setPoint; + other.unreadEntries = self.unreadEntries; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: timeOfDay:%@; relayStatus:%@; localTemperature:%@; humidityInPercentage:%@; setPoint:%@; unreadEntries:%@; >", NSStringFromClass([self class]), _timeOfDay, _relayStatus, _localTemperature, _humidityInPercentage, _setPoint, _unreadEntries]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::Thermostat::Commands::GetRelayStatusLogResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } + + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); + + CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); + if (err == CHIP_NO_ERROR) { + DecodableType decodedStruct; + err = chip::app::DataModel::Decode(reader, decodedStruct); + if (err == CHIP_NO_ERROR) { + err = [self _setFieldsFromDecodableStruct:decodedStruct]; + if (err == CHIP_NO_ERROR) { + return self; + } + } + } + + NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; + MTR_LOG_ERROR("%s", errorStr.UTF8String); + if (error != nil) { + NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; + *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; + } + return nil; +} + +@end + +@implementation MTRThermostatClusterGetRelayStatusLogResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Thermostat::Commands::GetRelayStatusLogResponse::DecodableType &)decodableStruct +{ + { + self.timeOfDay = [NSNumber numberWithUnsignedShort:decodableStruct.timeOfDay]; + } + { + self.relayStatus = [NSNumber numberWithUnsignedShort:decodableStruct.relayStatus.Raw()]; + } + { + if (decodableStruct.localTemperature.IsNull()) { + self.localTemperature = nil; + } else { + self.localTemperature = [NSNumber numberWithShort:decodableStruct.localTemperature.Value()]; + } + } + { + if (decodableStruct.humidityInPercentage.IsNull()) { + self.humidityInPercentage = nil; + } else { + self.humidityInPercentage = [NSNumber numberWithUnsignedChar:decodableStruct.humidityInPercentage.Value()]; + } + } + { + self.setPoint = [NSNumber numberWithShort:decodableStruct.setPoint]; + } + { + self.unreadEntries = [NSNumber numberWithUnsignedShort:decodableStruct.unreadEntries]; + } + return CHIP_NO_ERROR; +} + +@end + @implementation MTRThermostatClusterGetWeeklyScheduleParams - (instancetype)init { @@ -20646,6 +20745,79 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end +@implementation MTRThermostatClusterGetRelayStatusLogParams +- (instancetype)init +{ + if (self = [super init]) { + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRThermostatClusterGetRelayStatusLogParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + +@end + +@implementation MTRThermostatClusterGetRelayStatusLogParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::Thermostat::Commands::GetRelayStatusLog::Type encodableStruct; + ListFreer listFreer; + + auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); + + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); + + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +{ + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; + } + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} +@end + @implementation MTRFanControlClusterStepParams - (instancetype)init { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index f29c330020957b..13f8e371e641b1 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -1318,6 +1318,12 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface MTRThermostatClusterGetRelayStatusLogResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Thermostat::Commands::GetRelayStatusLogResponse::DecodableType &)decodableStruct; + +@end + @interface MTRThermostatClusterGetWeeklyScheduleParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; @@ -1330,6 +1336,12 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface MTRThermostatClusterGetRelayStatusLogParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + @interface MTRFanControlClusterStepParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 3bc24e45d309f7..6e290bbcb936fd 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -1317,11 +1317,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRPumpConfigurationAndControlClusterTurbineOperationEvent : NSObject @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_PROVISIONALLY_AVAILABLE +@interface MTRThermostatClusterWeeklyScheduleTransitionStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull heatSetpoint MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull coolSetpoint MTR_PROVISIONALLY_AVAILABLE; @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 fa9319d59092fc..638fb4e11263b5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -5483,23 +5483,23 @@ - (NSString *)description @end -@implementation MTRThermostatClusterThermostatScheduleTransition +@implementation MTRThermostatClusterWeeklyScheduleTransitionStruct - (instancetype)init { if (self = [super init]) { _transitionTime = @(0); - _heatSetpoint = nil; + _heatSetpoint = @(0); - _coolSetpoint = nil; + _coolSetpoint = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTRThermostatClusterThermostatScheduleTransition alloc] init]; + auto other = [[MTRThermostatClusterWeeklyScheduleTransitionStruct alloc] init]; other.transitionTime = self.transitionTime; other.heatSetpoint = self.heatSetpoint; 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 1ef7156594cd19..08f29bf125cd52 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 @@ -15202,7 +15202,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) @@ -15211,7 +15211,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) @@ -15255,7 +15255,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) @@ -15264,7 +15264,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) @@ -15336,7 +15336,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 @@ -15367,7 +15367,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 @@ -15398,7 +15398,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 @@ -15429,7 +15429,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 @@ -15496,37 +15496,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) } // namespace PIHeatingDemand -namespace HVACSystemTypeConfiguration { - -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - *value = Traits::StorageToWorking(temp); - return status; -} -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) - { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); -} - -} // namespace HVACSystemTypeConfiguration - namespace LocalTemperatureCalibration { EmberAfStatus Get(chip::EndpointId endpoint, int8_t * value) @@ -15584,7 +15553,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 OccupiedCoolingSetpoint @@ -15615,7 +15584,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 OccupiedHeatingSetpoint @@ -15646,7 +15615,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 UnoccupiedCoolingSetpoint @@ -15677,7 +15646,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 UnoccupiedHeatingSetpoint @@ -15708,7 +15677,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 MinHeatSetpointLimit @@ -15739,7 +15708,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 MaxHeatSetpointLimit @@ -15770,7 +15739,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 MinCoolSetpointLimit @@ -15801,7 +15770,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 MaxCoolSetpointLimit @@ -15839,9 +15808,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)); @@ -15853,9 +15822,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; @@ -15870,9 +15839,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)); @@ -15884,9 +15853,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; @@ -15901,9 +15870,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)); @@ -15915,9 +15884,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; @@ -15932,9 +15901,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)); @@ -15946,9 +15915,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; @@ -15963,9 +15932,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)); @@ -15977,9 +15946,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; @@ -16056,9 +16025,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)); @@ -16070,9 +16039,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; @@ -16140,9 +16109,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)); @@ -16154,9 +16123,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; @@ -16171,9 +16140,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)); @@ -16185,9 +16154,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; @@ -16202,9 +16171,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)); @@ -16216,9 +16185,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; @@ -16666,9 +16635,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)); @@ -16680,9 +16649,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; @@ -16728,9 +16697,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)); @@ -16742,9 +16711,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; @@ -16759,9 +16728,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)); @@ -16773,9 +16742,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; @@ -16790,9 +16759,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)); @@ -16804,9 +16773,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; @@ -16821,9 +16790,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)); @@ -16835,9 +16804,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; @@ -16879,7 +16848,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) @@ -16888,7 +16857,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) @@ -16905,9 +16874,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)); @@ -16919,9 +16888,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 75172b89fdbf7e..1b5713f09cbe0e 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 @@ -2765,14 +2765,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); @@ -2784,22 +2784,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 @@ -2813,53 +2813,48 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace PIHeatingDemand -namespace HVACSystemTypeConfiguration { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); -} // namespace HVACSystemTypeConfiguration - namespace LocalTemperatureCalibration { EmberAfStatus Get(chip::EndpointId endpoint, int8_t * value); // int8s EmberAfStatus Set(chip::EndpointId endpoint, int8_t value); } // namespace LocalTemperatureCalibration namespace OccupiedCoolingSetpoint { -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 OccupiedCoolingSetpoint namespace OccupiedHeatingSetpoint { -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 OccupiedHeatingSetpoint namespace UnoccupiedCoolingSetpoint { -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 UnoccupiedCoolingSetpoint namespace UnoccupiedHeatingSetpoint { -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 UnoccupiedHeatingSetpoint namespace MinHeatSetpointLimit { -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 MinHeatSetpointLimit namespace MaxHeatSetpointLimit { -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 MaxHeatSetpointLimit namespace MinCoolSetpointLimit { -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 MinCoolSetpointLimit namespace MaxCoolSetpointLimit { -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 MaxCoolSetpointLimit @@ -2869,29 +2864,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 { @@ -2905,8 +2902,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 { @@ -2917,18 +2915,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 { @@ -2991,8 +2993,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 { @@ -3001,35 +3003,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/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index 94c0e7c6e495e3..633e5a86151ed9 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -10229,6 +10229,12 @@ bool emberAfThermostatClusterGetWeeklyScheduleCallback( bool emberAfThermostatClusterClearWeeklyScheduleCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::DecodableType & commandData); +/** + * @brief Thermostat Cluster GetRelayStatusLog Command callback (from client) + */ +bool emberAfThermostatClusterGetRelayStatusLogCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Thermostat::Commands::GetRelayStatusLog::DecodableType & commandData); /** * @brief Fan Control Cluster Step Command callback (from client) */ 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 68cc836da58614..6aa5f4425f32cc 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 @@ -2098,22 +2098,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: @@ -2127,22 +2183,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: @@ -2159,6 +2245,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 ced7bc64fc61e0..a66c14674a443a 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 @@ -3108,21 +3108,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, @@ -3137,21 +3193,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 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 ThermostatSystemMode -enum class ThermostatSystemMode : uint8_t +// Enum for SystemModeEnum +enum class SystemModeEnum : uint8_t { kOff = 0x00, kAuto = 0x01, @@ -3169,8 +3255,100 @@ enum class ThermostatSystemMode : uint8_t kUnknownEnumValue = 2, }; -// Bitmap for DayOfWeek -enum class DayOfWeek : uint8_t +// Enum for TemperatureSetpointHoldEnum +enum class TemperatureSetpointHoldEnum : uint8_t +{ + 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 AlarmCodeBitmap +enum class AlarmCodeBitmap : uint8_t +{ + kInitialization = 0x1, + kHardware = 0x2, + kSelfCalibration = 0x4, +}; + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kHeating = 0x1, + kCooling = 0x2, + kOccupancy = 0x4, + kZigbeeScheduleConfiguration = 0x8, + kSetback = 0x10, + kAutoMode = 0x20, + kLocalTemperatureNotExposed = 0x40, +}; + +// 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, @@ -3182,20 +3360,8 @@ enum class DayOfWeek : uint8_t kAway = 0x80, }; -// Bitmap for Feature -enum class Feature : uint32_t -{ - kHeating = 0x1, - kCooling = 0x2, - kOccupancy = 0x4, - kScheduleConfiguration = 0x8, - kSetback = 0x10, - kAutoMode = 0x20, - kLocalTemperatureNotExposed = 0x40, -}; - -// Bitmap for ModeForSequence -enum class ModeForSequence : uint8_t +// 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 c9ea1a045e35e2..1a1746cf8485fc 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 @@ -17693,7 +17693,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 }; @@ -17737,7 +17737,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } -} // namespace ThermostatScheduleTransition +} // namespace WeeklyScheduleTransitionStruct } // namespace Structs namespace Commands { @@ -17785,7 +17785,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; encoder.Encode(to_underlying(Fields::kNumberOfTransitionsForSequence), numberOfTransitionsForSequence); - encoder.Encode(to_underlying(Fields::kDayOfWeekForSequence), dayOfWeekForSequence); + encoder.Encode(to_underlying(Fields::kDayOfWeekforSequence), dayOfWeekforSequence); encoder.Encode(to_underlying(Fields::kModeForSequence), modeForSequence); encoder.Encode(to_underlying(Fields::kTransitions), transitions); return encoder.Finalize(); @@ -17809,9 +17809,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, numberOfTransitionsForSequence); } - else if (__context_tag == to_underlying(Fields::kDayOfWeekForSequence)) + else if (__context_tag == to_underlying(Fields::kDayOfWeekforSequence)) { - err = DataModel::Decode(reader, dayOfWeekForSequence); + err = DataModel::Decode(reader, dayOfWeekforSequence); } else if (__context_tag == to_underlying(Fields::kModeForSequence)) { @@ -17834,7 +17834,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; encoder.Encode(to_underlying(Fields::kNumberOfTransitionsForSequence), numberOfTransitionsForSequence); - encoder.Encode(to_underlying(Fields::kDayOfWeekForSequence), dayOfWeekForSequence); + encoder.Encode(to_underlying(Fields::kDayOfWeekforSequence), dayOfWeekforSequence); encoder.Encode(to_underlying(Fields::kModeForSequence), modeForSequence); encoder.Encode(to_underlying(Fields::kTransitions), transitions); return encoder.Finalize(); @@ -17858,9 +17858,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, numberOfTransitionsForSequence); } - else if (__context_tag == to_underlying(Fields::kDayOfWeekForSequence)) + else if (__context_tag == to_underlying(Fields::kDayOfWeekforSequence)) { - err = DataModel::Decode(reader, dayOfWeekForSequence); + err = DataModel::Decode(reader, dayOfWeekforSequence); } else if (__context_tag == to_underlying(Fields::kModeForSequence)) { @@ -17878,6 +17878,65 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } // namespace SetWeeklySchedule. +namespace GetRelayStatusLogResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kTimeOfDay), timeOfDay); + encoder.Encode(to_underlying(Fields::kRelayStatus), relayStatus); + encoder.Encode(to_underlying(Fields::kLocalTemperature), localTemperature); + encoder.Encode(to_underlying(Fields::kHumidityInPercentage), humidityInPercentage); + encoder.Encode(to_underlying(Fields::kSetPoint), setPoint); + encoder.Encode(to_underlying(Fields::kUnreadEntries), unreadEntries); + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kTimeOfDay)) + { + err = DataModel::Decode(reader, timeOfDay); + } + else if (__context_tag == to_underlying(Fields::kRelayStatus)) + { + err = DataModel::Decode(reader, relayStatus); + } + else if (__context_tag == to_underlying(Fields::kLocalTemperature)) + { + err = DataModel::Decode(reader, localTemperature); + } + else if (__context_tag == to_underlying(Fields::kHumidityInPercentage)) + { + err = DataModel::Decode(reader, humidityInPercentage); + } + else if (__context_tag == to_underlying(Fields::kSetPoint)) + { + err = DataModel::Decode(reader, setPoint); + } + else if (__context_tag == to_underlying(Fields::kUnreadEntries)) + { + err = DataModel::Decode(reader, unreadEntries); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace GetRelayStatusLogResponse. namespace GetWeeklySchedule { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { @@ -17937,6 +17996,26 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } // namespace ClearWeeklySchedule. +namespace GetRelayStatusLog { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + return encoder.Finalize(); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + } +} +} // namespace GetRelayStatusLog. } // namespace Commands namespace Attributes { @@ -17962,8 +18041,6 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return DataModel::Decode(reader, PICoolingDemand); case Attributes::PIHeatingDemand::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, PIHeatingDemand); - case Attributes::HVACSystemTypeConfiguration::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, HVACSystemTypeConfiguration); case Attributes::LocalTemperatureCalibration::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, localTemperatureCalibration); case Attributes::OccupiedCoolingSetpoint::TypeInfo::GetAttributeId(): 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 4b7d700dfc0585..d7527a2e3ab0e8 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 @@ -25319,7 +25319,7 @@ struct DecodableType } // namespace PumpConfigurationAndControl namespace Thermostat { namespace Structs { -namespace ThermostatScheduleTransition { +namespace WeeklyScheduleTransitionStruct { enum class Fields : uint8_t { kTransitionTime = 0, @@ -25331,8 +25331,8 @@ struct Type { public: uint16_t transitionTime = static_cast(0); - DataModel::Nullable heatSetpoint; - DataModel::Nullable coolSetpoint; + int16_t heatSetpoint = static_cast(0); + int16_t coolSetpoint = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -25343,7 +25343,7 @@ struct Type using DecodableType = Type; -} // namespace ThermostatScheduleTransition +} // namespace WeeklyScheduleTransitionStruct } // namespace Structs namespace Commands { @@ -25364,6 +25364,11 @@ struct Type; struct DecodableType; } // namespace SetWeeklySchedule +namespace GetRelayStatusLogResponse { +struct Type; +struct DecodableType; +} // namespace GetRelayStatusLogResponse + namespace GetWeeklySchedule { struct Type; struct DecodableType; @@ -25374,6 +25379,11 @@ struct Type; struct DecodableType; } // namespace ClearWeeklySchedule +namespace GetRelayStatusLog { +struct Type; +struct DecodableType; +} // namespace GetRelayStatusLog + } // namespace Commands namespace Commands { @@ -25391,8 +25401,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; @@ -25407,8 +25417,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 @@ -25416,7 +25426,7 @@ namespace GetWeeklyScheduleResponse { enum class Fields : uint8_t { kNumberOfTransitionsForSequence = 0, - kDayOfWeekForSequence = 1, + kDayOfWeekforSequence = 1, kModeForSequence = 2, kTransitions = 3, }; @@ -25428,10 +25438,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; @@ -25446,10 +25456,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 @@ -25457,7 +25467,7 @@ namespace SetWeeklySchedule { enum class Fields : uint8_t { kNumberOfTransitionsForSequence = 0, - kDayOfWeekForSequence = 1, + kDayOfWeekforSequence = 1, kModeForSequence = 2, kTransitions = 3, }; @@ -25469,10 +25479,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; @@ -25487,13 +25497,60 @@ 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 +namespace GetRelayStatusLogResponse { +enum class Fields : uint8_t +{ + kTimeOfDay = 0, + kRelayStatus = 1, + kLocalTemperature = 2, + kHumidityInPercentage = 3, + kSetPoint = 4, + kUnreadEntries = 5, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::GetRelayStatusLogResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + + uint16_t timeOfDay = static_cast(0); + chip::BitMask relayStatus = static_cast>(0); + DataModel::Nullable localTemperature; + DataModel::Nullable humidityInPercentage; + int16_t setPoint = static_cast(0); + uint16_t unreadEntries = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::GetRelayStatusLogResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + + uint16_t timeOfDay = static_cast(0); + chip::BitMask relayStatus = static_cast>(0); + DataModel::Nullable localTemperature; + DataModel::Nullable humidityInPercentage; + int16_t setPoint = static_cast(0); + uint16_t unreadEntries = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace GetRelayStatusLogResponse namespace GetWeeklySchedule { enum class Fields : uint8_t { @@ -25508,8 +25565,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; @@ -25524,8 +25581,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 @@ -25557,6 +25614,34 @@ struct DecodableType CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ClearWeeklySchedule +namespace GetRelayStatusLog { +enum class Fields : uint8_t +{ +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::GetRelayStatusLog::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::Thermostat::Commands::GetRelayStatusLogResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::GetRelayStatusLog::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace GetRelayStatusLog } // namespace Commands namespace Attributes { @@ -25669,18 +25754,6 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace PIHeatingDemand -namespace HVACSystemTypeConfiguration { -struct TypeInfo -{ - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; - - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::HVACSystemTypeConfiguration::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace HVACSystemTypeConfiguration namespace LocalTemperatureCalibration { struct TypeInfo { @@ -25804,9 +25877,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; } @@ -25816,9 +25889,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; } @@ -25828,9 +25901,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; } @@ -25840,9 +25913,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; } @@ -25852,9 +25925,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; } @@ -25888,9 +25961,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; } @@ -25912,9 +25985,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; } @@ -25924,9 +25997,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; } @@ -25936,9 +26009,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; } @@ -26056,9 +26129,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; } @@ -26080,9 +26153,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; } @@ -26092,9 +26165,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; } @@ -26104,9 +26177,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; } @@ -26116,9 +26189,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; } @@ -26140,9 +26213,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; } @@ -26203,7 +26276,6 @@ struct TypeInfo Attributes::AbsMaxCoolSetpointLimit::TypeInfo::DecodableType absMaxCoolSetpointLimit = static_cast(0); Attributes::PICoolingDemand::TypeInfo::DecodableType PICoolingDemand = static_cast(0); Attributes::PIHeatingDemand::TypeInfo::DecodableType PIHeatingDemand = static_cast(0); - Attributes::HVACSystemTypeConfiguration::TypeInfo::DecodableType HVACSystemTypeConfiguration = static_cast(0); Attributes::LocalTemperatureCalibration::TypeInfo::DecodableType localTemperatureCalibration = static_cast(0); Attributes::OccupiedCoolingSetpoint::TypeInfo::DecodableType occupiedCoolingSetpoint = static_cast(0); Attributes::OccupiedHeatingSetpoint::TypeInfo::DecodableType occupiedHeatingSetpoint = static_cast(0); @@ -26214,20 +26286,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; @@ -26237,14 +26316,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/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index 87714609e2a5b5..b17d725d21a493 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -4344,10 +4344,6 @@ namespace PIHeatingDemand { static constexpr AttributeId Id = 0x00000008; } // namespace PIHeatingDemand -namespace HVACSystemTypeConfiguration { -static constexpr AttributeId Id = 0x00000009; -} // namespace HVACSystemTypeConfiguration - namespace LocalTemperatureCalibration { static constexpr AttributeId Id = 0x00000010; } // namespace LocalTemperatureCalibration diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index 963edaddc0cbea..b594ec057f9345 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -1174,6 +1174,10 @@ namespace SetWeeklySchedule { static constexpr CommandId Id = 0x00000001; } // namespace SetWeeklySchedule +namespace GetRelayStatusLogResponse { +static constexpr CommandId Id = 0x00000001; +} // namespace GetRelayStatusLogResponse + namespace GetWeeklySchedule { static constexpr CommandId Id = 0x00000002; } // namespace GetWeeklySchedule @@ -1182,6 +1186,10 @@ namespace ClearWeeklySchedule { static constexpr CommandId Id = 0x00000003; } // namespace ClearWeeklySchedule +namespace GetRelayStatusLog { +static constexpr CommandId Id = 0x00000004; +} // namespace GetRelayStatusLog + } // namespace Commands } // namespace Thermostat diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index e872590aac7742..6943afae67bb26 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -8421,6 +8421,7 @@ class BarrierControlBarrierControlStop : public ClusterCommand | * SetWeeklySchedule | 0x01 | | * GetWeeklySchedule | 0x02 | | * ClearWeeklySchedule | 0x03 | +| * GetRelayStatusLog | 0x04 | |------------------------------------------------------------------------------| | Attributes: | | | * LocalTemperature | 0x0000 | @@ -8432,7 +8433,6 @@ class BarrierControlBarrierControlStop : public ClusterCommand | * AbsMaxCoolSetpointLimit | 0x0006 | | * PICoolingDemand | 0x0007 | | * PIHeatingDemand | 0x0008 | -| * HVACSystemTypeConfiguration | 0x0009 | | * LocalTemperatureCalibration | 0x0010 | | * OccupiedCoolingSetpoint | 0x0011 | | * OccupiedHeatingSetpoint | 0x0012 | @@ -8531,7 +8531,7 @@ class ThermostatSetWeeklySchedule : public ClusterCommand ClusterCommand("set-weekly-schedule", credsIssuerConfig), mComplex_Transitions(&mRequest.transitions) { AddArgument("NumberOfTransitionsForSequence", 0, UINT8_MAX, &mRequest.numberOfTransitionsForSequence); - AddArgument("DayOfWeekForSequence", 0, UINT8_MAX, &mRequest.dayOfWeekForSequence); + AddArgument("DayOfWeekforSequence", 0, UINT8_MAX, &mRequest.dayOfWeekforSequence); AddArgument("ModeForSequence", 0, UINT8_MAX, &mRequest.modeForSequence); AddArgument("Transitions", &mComplex_Transitions); ClusterCommand::AddArguments(); @@ -8561,7 +8561,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; }; @@ -8641,6 +8641,43 @@ class ThermostatClearWeeklySchedule : public ClusterCommand chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Type mRequest; }; +/* + * Command GetRelayStatusLog + */ +class ThermostatGetRelayStatusLog : public ClusterCommand +{ +public: + ThermostatGetRelayStatusLog(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-relay-status-log", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::GetRelayStatusLog::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } + + CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::GetRelayStatusLog::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::Thermostat::Commands::GetRelayStatusLog::Type mRequest; +}; + /*----------------------------------------------------------------------------*\ | Cluster FanControl | 0x0202 | |------------------------------------------------------------------------------| @@ -20070,6 +20107,7 @@ void registerClusterThermostat(Commands & commands, CredentialIssuerCommands * c make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // + make_unique(credsIssuerConfig), // // // Attributes // @@ -20087,8 +20125,6 @@ void registerClusterThermostat(Commands & commands, CredentialIssuerCommands * c credsIssuerConfig), // make_unique(Id, "picooling-demand", Attributes::PICoolingDemand::Id, credsIssuerConfig), // make_unique(Id, "piheating-demand", Attributes::PIHeatingDemand::Id, credsIssuerConfig), // - make_unique(Id, "hvacsystem-type-configuration", Attributes::HVACSystemTypeConfiguration::Id, - credsIssuerConfig), // make_unique(Id, "local-temperature-calibration", Attributes::LocalTemperatureCalibration::Id, credsIssuerConfig), // make_unique(Id, "occupied-cooling-setpoint", Attributes::OccupiedCoolingSetpoint::Id, credsIssuerConfig), // @@ -20168,9 +20204,6 @@ void registerClusterThermostat(Commands & commands, CredentialIssuerCommands * c WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "piheating-demand", 0, UINT8_MAX, Attributes::PIHeatingDemand::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "hvacsystem-type-configuration", 0, UINT8_MAX, - Attributes::HVACSystemTypeConfiguration::Id, WriteCommandType::kWrite, - credsIssuerConfig), // make_unique>(Id, "local-temperature-calibration", INT8_MIN, INT8_MAX, Attributes::LocalTemperatureCalibration::Id, WriteCommandType::kWrite, credsIssuerConfig), // @@ -20196,35 +20229,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), // @@ -20250,23 +20287,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), // @@ -20294,8 +20334,6 @@ void registerClusterThermostat(Commands & commands, CredentialIssuerCommands * c credsIssuerConfig), // make_unique(Id, "picooling-demand", Attributes::PICoolingDemand::Id, credsIssuerConfig), // make_unique(Id, "piheating-demand", Attributes::PIHeatingDemand::Id, credsIssuerConfig), // - make_unique(Id, "hvacsystem-type-configuration", Attributes::HVACSystemTypeConfiguration::Id, - credsIssuerConfig), // make_unique(Id, "local-temperature-calibration", Attributes::LocalTemperatureCalibration::Id, credsIssuerConfig), // make_unique(Id, "occupied-cooling-setpoint", Attributes::OccupiedCoolingSetpoint::Id, diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 17bb154ec9319a..4a4f5d430fc184 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -2666,7 +2666,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); @@ -2674,11 +2674,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]; @@ -2697,7 +2697,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 cf97dceec4101b..4d725720168f68 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -334,10 +334,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 e055a0e282b46b..490d76b14a6b4b 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -2349,7 +2349,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, "{"); { @@ -6308,12 +6308,25 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, DataModelLogger::LogString(label, indent, "{"); ReturnErrorOnFailure( DataModelLogger::LogValue("numberOfTransitionsForSequence", indent + 1, value.numberOfTransitionsForSequence)); - ReturnErrorOnFailure(DataModelLogger::LogValue("dayOfWeekForSequence", indent + 1, value.dayOfWeekForSequence)); + ReturnErrorOnFailure(DataModelLogger::LogValue("dayOfWeekforSequence", indent + 1, value.dayOfWeekforSequence)); ReturnErrorOnFailure(DataModelLogger::LogValue("modeForSequence", indent + 1, value.modeForSequence)); ReturnErrorOnFailure(DataModelLogger::LogValue("transitions", indent + 1, value.transitions)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const Thermostat::Commands::GetRelayStatusLogResponse::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + ReturnErrorOnFailure(DataModelLogger::LogValue("timeOfDay", indent + 1, value.timeOfDay)); + ReturnErrorOnFailure(DataModelLogger::LogValue("relayStatus", indent + 1, value.relayStatus)); + ReturnErrorOnFailure(DataModelLogger::LogValue("localTemperature", indent + 1, value.localTemperature)); + ReturnErrorOnFailure(DataModelLogger::LogValue("humidityInPercentage", indent + 1, value.humidityInPercentage)); + ReturnErrorOnFailure(DataModelLogger::LogValue("setPoint", indent + 1, value.setPoint)); + ReturnErrorOnFailure(DataModelLogger::LogValue("unreadEntries", indent + 1, value.unreadEntries)); + DataModelLogger::LogString(indent, "}"); + return CHIP_NO_ERROR; +} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Channel::Commands::ChangeChannelResponse::DecodableType & value) { @@ -11886,11 +11899,6 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("PIHeatingDemand", 1, value); } - case Thermostat::Attributes::HVACSystemTypeConfiguration::Id: { - uint8_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("HVACSystemTypeConfiguration", 1, value); - } case Thermostat::Attributes::LocalTemperatureCalibration::Id: { int8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); @@ -11942,27 +11950,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); } @@ -11977,7 +11985,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); } @@ -11987,17 +11995,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); } @@ -12047,7 +12055,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); } @@ -12057,22 +12065,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); } @@ -12082,7 +12090,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); } @@ -16308,6 +16316,11 @@ CHIP_ERROR DataModelLogger::LogCommand(const chip::app::ConcreteCommandPath & pa ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GetWeeklyScheduleResponse", 1, value); } + case Thermostat::Commands::GetRelayStatusLogResponse::Id: { + Thermostat::Commands::GetRelayStatusLogResponse::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("GetRelayStatusLogResponse", 1, value); + } } break; } 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 764456afeb2fd6..ab5116c87fa789 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -212,7 +212,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); @@ -635,6 +635,8 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::Thermostat::Commands::GetRelayStatusLogResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, 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 b1195b8c68d366..7f6226d20bd3e1 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -93245,6 +93245,7 @@ class SubscribeAttributePumpConfigurationAndControlClusterRevision : public Subs | * SetWeeklySchedule | 0x01 | | * GetWeeklySchedule | 0x02 | | * ClearWeeklySchedule | 0x03 | +| * GetRelayStatusLog | 0x04 | |------------------------------------------------------------------------------| | Attributes: | | | * LocalTemperature | 0x0000 | @@ -93256,7 +93257,6 @@ class SubscribeAttributePumpConfigurationAndControlClusterRevision : public Subs | * AbsMaxCoolSetpointLimit | 0x0006 | | * PICoolingDemand | 0x0007 | | * PIHeatingDemand | 0x0008 | -| * HVACSystemTypeConfiguration | 0x0009 | | * LocalTemperatureCalibration | 0x0010 | | * OccupiedCoolingSetpoint | 0x0011 | | * OccupiedHeatingSetpoint | 0x0012 | @@ -93365,7 +93365,9 @@ class ThermostatSetWeeklySchedule : public ClusterCommand { , mComplex_Transitions(&mRequest.transitions) { AddArgument("NumberOfTransitionsForSequence", 0, UINT8_MAX, &mRequest.numberOfTransitionsForSequence); - AddArgument("DayOfWeekForSequence", 0, UINT8_MAX, &mRequest.dayOfWeekForSequence); +#if MTR_ENABLE_PROVISIONAL + AddArgument("DayOfWeekforSequence", 0, UINT8_MAX, &mRequest.dayOfWeekforSequence); +#endif // MTR_ENABLE_PROVISIONAL AddArgument("ModeForSequence", 0, UINT8_MAX, &mRequest.modeForSequence); AddArgument("Transitions", &mComplex_Transitions); ClusterCommand::AddArguments(); @@ -93383,24 +93385,18 @@ class ThermostatSetWeeklySchedule : public ClusterCommand { __auto_type * params = [[MTRThermostatClusterSetWeeklyScheduleParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.numberOfTransitionsForSequence = [NSNumber numberWithUnsignedChar:mRequest.numberOfTransitionsForSequence]; - params.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:mRequest.dayOfWeekForSequence.Raw()]; +#if MTR_ENABLE_PROVISIONAL + params.dayOfWeekforSequence = [NSNumber numberWithUnsignedChar:mRequest.dayOfWeekforSequence.Raw()]; +#endif // MTR_ENABLE_PROVISIONAL params.modeForSequence = [NSNumber numberWithUnsignedChar:mRequest.modeForSequence.Raw()]; { // 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; - } else { - newElement_0.heatSetpoint = [NSNumber numberWithShort:entry_0.heatSetpoint.Value()]; - } - if (entry_0.coolSetpoint.IsNull()) { - newElement_0.coolSetpoint = nil; - } else { - newElement_0.coolSetpoint = [NSNumber numberWithShort:entry_0.coolSetpoint.Value()]; - } + newElement_0.heatSetpoint = [NSNumber numberWithShort:entry_0.heatSetpoint]; + newElement_0.coolSetpoint = [NSNumber numberWithShort:entry_0.coolSetpoint]; [array_0 addObject:newElement_0]; } params.transitions = array_0; @@ -93426,7 +93422,7 @@ class ThermostatSetWeeklySchedule : public ClusterCommand { private: chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type mRequest; - TypedComplexArgument> mComplex_Transitions; + TypedComplexArgument> mComplex_Transitions; }; /* @@ -93528,6 +93524,59 @@ class ThermostatClearWeeklySchedule : public ClusterCommand { private: }; +#if MTR_ENABLE_PROVISIONAL +/* + * Command GetRelayStatusLog + */ +class ThermostatGetRelayStatusLog : public ClusterCommand { +public: + ThermostatGetRelayStatusLog() + : ClusterCommand("get-relay-status-log") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::GetRelayStatusLog::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterGetRelayStatusLogParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getRelayStatusLogWithParams:params completion: + ^(MTRThermostatClusterGetRelayStatusLogResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::Thermostat::Commands::GetRelayStatusLogResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::Thermostat::Commands::GetRelayStatusLogResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#endif // MTR_ENABLE_PROVISIONAL + /* * Attribute LocalTemperature */ @@ -94266,129 +94315,6 @@ class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { } }; -/* - * Attribute HVACSystemTypeConfiguration - */ -class ReadThermostatHVACSystemTypeConfiguration : public ReadAttribute { -public: - ReadThermostatHVACSystemTypeConfiguration() - : ReadAttribute("hvacsystem-type-configuration") - { - } - - ~ReadThermostatHVACSystemTypeConfiguration() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHVACSystemTypeConfigurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Thermostat HVACSystemTypeConfiguration read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatHVACSystemTypeConfiguration : public WriteAttribute { -public: - WriteThermostatHVACSystemTypeConfiguration() - : WriteAttribute("hvacsystem-type-configuration") - { - AddArgument("attr-name", "hvacsystem-type-configuration"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatHVACSystemTypeConfiguration() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeHVACSystemTypeConfigurationWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat HVACSystemTypeConfiguration write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public SubscribeAttribute { -public: - SubscribeAttributeThermostatHVACSystemTypeConfiguration() - : SubscribeAttribute("hvacsystem-type-configuration") - { - } - - ~SubscribeAttributeThermostatHVACSystemTypeConfiguration() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeHVACSystemTypeConfigurationWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /* * Attribute LocalTemperatureCalibration */ @@ -174559,6 +174485,9 @@ void registerClusterThermostat(Commands & commands) make_unique(), // make_unique(), // make_unique(), // +#if MTR_ENABLE_PROVISIONAL + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // make_unique(Id), // @@ -174580,9 +174509,6 @@ void registerClusterThermostat(Commands & commands) make_unique(), // make_unique(), // make_unique(), // - make_unique(), // - make_unique(), // - make_unique(), // make_unique(), // make_unique(), // make_unique(), // From f5d6796123fd70488d26ca65b2d6e5561c7a4140 Mon Sep 17 00:00:00 2001 From: David Rempel Date: Thu, 30 Nov 2023 20:47:01 -0800 Subject: [PATCH 02/14] Fixed a bad merge --- examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp b/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp index 9d0ff0b4f2217f..1debfaf0f9632e 100644 --- a/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp +++ b/examples/all-clusters-app/esp32/main/DeviceWithDisplay.cpp @@ -167,6 +167,7 @@ class EditAttributeListModel : public TouchesMatterStackModel return true; default: return false; + } } void DoAction(int i) override From e9404113c65a62542723f779cec43bb09ddf544d Mon Sep 17 00:00:00 2001 From: David Rempel Date: Thu, 30 Nov 2023 21:12:12 -0800 Subject: [PATCH 03/14] and missed this rename --- .../all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp b/examples/all-clusters-minimal-app/esp32/main/DeviceWithDisplay.cpp index 141c1b3ec6765c..d925d00f259875 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, app::Clusters::Thermostat::ThermostatSystemModeEnum::kHeat); + 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"); From 39ebe7914a54eadfbd1b7ec7eed0272763d34934 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Fri, 1 Dec 2023 05:12:56 +0000 Subject: [PATCH 04/14] Restyled by whitespace --- examples/thermostat/asr/src/TemperatureManager.cpp | 2 +- examples/thermostat/telink/src/TemperatureManager.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/thermostat/asr/src/TemperatureManager.cpp b/examples/thermostat/asr/src/TemperatureManager.cpp index be543ce188f4d6..c8268f5a9aebf9 100644 --- a/examples/thermostat/asr/src/TemperatureManager.cpp +++ b/examples/thermostat/asr/src/TemperatureManager.cpp @@ -79,7 +79,7 @@ switch (systemMode) mThermMode = 2; break; // unknown value; } - + GetAppTask().UpdateThermoStatUI(); return CHIP_NO_ERROR; diff --git a/examples/thermostat/telink/src/TemperatureManager.cpp b/examples/thermostat/telink/src/TemperatureManager.cpp index d1a094bd597bf8..ee52427d95c5bc 100644 --- a/examples/thermostat/telink/src/TemperatureManager.cpp +++ b/examples/thermostat/telink/src/TemperatureManager.cpp @@ -49,7 +49,7 @@ CHIP_ERROR TemperatureManager::Init() mCurrentTempCelsius = ConvertToPrintableTemp(temp.Value()); mHeatingCelsiusSetPoint = ConvertToPrintableTemp(coolingSetpoint); mCoolingCelsiusSetPoint = ConvertToPrintableTemp(heatingSetpoint); - + switch (systemMode) { case SystemModeEnum::kOff: From d16aa43816113bd482f8278fb1a85855e4ac5b56 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Fri, 1 Dec 2023 05:12:58 +0000 Subject: [PATCH 05/14] Restyled by clang-format --- examples/thermostat/asr/src/TemperatureManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/thermostat/asr/src/TemperatureManager.cpp b/examples/thermostat/asr/src/TemperatureManager.cpp index c8268f5a9aebf9..b560e5c22970f7 100644 --- a/examples/thermostat/asr/src/TemperatureManager.cpp +++ b/examples/thermostat/asr/src/TemperatureManager.cpp @@ -46,7 +46,7 @@ CHIP_ERROR TemperatureManager::Init() mCurrentTempCelsius = ConvertToPrintableTemp(temp.Value()); mHeatingCelsiusSetPoint = ConvertToPrintableTemp(coolingSetpoint); mCoolingCelsiusSetPoint = ConvertToPrintableTemp(heatingSetpoint); -switch (systemMode) + switch (systemMode) { case SystemModeEnum::kOff: mThermMode = 0; From 29740d939622634e43667736691c507c94b67aab Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 1 Dec 2023 17:14:11 -0500 Subject: [PATCH 06/14] Adjust Darwin availability for the renames. --- .../CHIP/templates/availability.yaml | 116 ++++++++++++- .../CHIP/zap-generated/MTRBaseClusters.h | 154 +++++++++++++----- .../CHIP/zap-generated/MTRStructsObjc.h | 19 ++- .../CHIP/zap-generated/MTRStructsObjc.mm | 6 + 4 files changed, 247 insertions(+), 48 deletions(-) diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 4804eb6d625210..13f5fb913dc7e2 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 @@ -7840,6 +7868,8 @@ RVCCleanMode: - ModeTagStruct - ModeOptionStruct + Thermostat: + - WeeklyScheduleTransitionStruct struct fields: RVCOperationalState: OperationalStateStruct: @@ -7865,6 +7895,11 @@ - label - mode - modeTags + Thermostat: + WeeklyScheduleTransitionStruct: + - transitionTime + - heatSetpoint + - coolSetpoint events: RVCOperationalState: - OperationalError @@ -7898,6 +7933,9 @@ RVCCleanMode: - ModeTag - StatusCode + Thermostat: + - ControlSequenceOfOperationEnum + - SetpointRaiseLowerModeEnum enum values: ContentLauncher: StatusEnum: @@ -8044,6 +8082,18 @@ - Mop StatusCode: - CleaningInProgress + Thermostat: + ControlSequenceOfOperationEnum: + - CoolingOnly + - CoolingWithReheat + - HeatingOnly + - HeatingWithReheat + - CoolingAndHeating + - CoolingAndHeatingWithReheat + SetpointRaiseLowerModeEnum: + - Heat + - Cool + - Both bitmaps: Scenes: - CopyModeBitmap @@ -8057,6 +8107,9 @@ - Feature RVCCleanMode: - Feature + Thermostat: + - ScheduleDayOfWeekBitmap + - ScheduleModeBitmap bitmap values: PumpConfigurationAndControl: PumpStatusBitmap: @@ -8084,7 +8137,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: @@ -8094,6 +8163,9 @@ - ContentLaunchStatusEnum KeypadInput: - CecKeyCode + Thermostat: + - ThermostatControlSequence + - SetpointAdjustMode enum values: FanControl: FanModeSequenceEnum: @@ -8106,6 +8178,9 @@ - SupportedStreamingProtocol LevelControl: - LevelControlOptions + Thermostat: + - DayOfWeek + - ModeForSequence bitmap values: PumpConfigurationAndControl: PumpStatusBitmap: @@ -8177,6 +8252,17 @@ NetworkInfoStruct: - networkIdentifier - clientIdentifier + enums: + Thermostat: + # Targeting Spring 2024 Matter release + - StartOfWeekEnum + - TemperatureSetpointHoldEnum + - ACCapacityFormatEnum + - ACCompressorTypeEnum + - ACLouverPositionEnum + - ACRefrigerantTypeEnum + - ACTypeEnum + - SetpointChangeSourceEnum bitmaps: NetworkCommissioning: # Targeting Spring 2024 Matter release @@ -8184,6 +8270,13 @@ Scenes: # Targeting Spring 2024 Matter release - NameSupportBitmap + Thermostat: + # Targeting Spring 2024 Matter release + - ACErrorCodeBitmap + - HVACSystemTypeBitmap + - ProgrammingOperationModeBitmap + - RelayStateBitmap + - RemoteSensingBitmap bitmap values: OnOff: Feature: @@ -8196,6 +8289,9 @@ WiFiSecurityBitmap: - WPA3MatterPDC renames: + structs: + Thermostat: + WeeklyScheduleTransitionStruct: ThermostatScheduleTransition event fields: WiFiNetworkDiagnostics: AssociationFailure: @@ -8205,6 +8301,9 @@ StatusEnum: ContentLaunchStatusEnum KeypadInput: CECKeyCodeEnum: CecKeyCode + Thermostat: + ControlSequenceOfOperationEnum: ThermostatControlSequence + SetpointRaiseLowerModeEnum: SetpointAdjustMode enum values: ContentLauncher: # The URLNotAvailable value got renamed at the same time @@ -8230,6 +8329,9 @@ SupportedProtocolsBitmap: SupportedStreamingProtocol LevelControl: OptionsBitmap: LevelControlOptions + Thermostat: + ScheduleDayOfWeekBitmap: DayOfWeek + ScheduleModeBitmap: ModeForSequence bitmap values: PumpConfigurationAndControl: PumpStatusBitmap: diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 7b8c6cbdcf91be..a2443f5ef3cded 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -17408,13 +17408,35 @@ typedef NS_ENUM(uint8_t, MTRThermostatACType) { } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRThermostatControlSequenceOfOperation) { - MTRThermostatControlSequenceOfOperationCoolingOnly MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRThermostatControlSequenceOfOperationCoolingWithReheat MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRThermostatControlSequenceOfOperationHeatingOnly MTR_PROVISIONALLY_AVAILABLE = 0x02, - MTRThermostatControlSequenceOfOperationHeatingWithReheat MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRThermostatControlSequenceOfOperationCoolingAndHeating MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRThermostatControlSequenceOfOperationCoolingAndHeatingWithReheat MTR_PROVISIONALLY_AVAILABLE = 0x05, -} MTR_PROVISIONALLY_AVAILABLE; + 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)) + 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, MTRThermostatSetpointChangeSource) { MTRThermostatSetpointChangeSourceManual MTR_PROVISIONALLY_AVAILABLE = 0x00, @@ -17423,10 +17445,26 @@ typedef NS_ENUM(uint8_t, MTRThermostatSetpointChangeSource) { } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRThermostatSetpointRaiseLowerMode) { - MTRThermostatSetpointRaiseLowerModeHeat MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRThermostatSetpointRaiseLowerModeCool MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRThermostatSetpointRaiseLowerModeBoth MTR_PROVISIONALLY_AVAILABLE = 0x02, -} MTR_PROVISIONALLY_AVAILABLE; + 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, @@ -17439,16 +17477,17 @@ typedef NS_ENUM(uint8_t, MTRThermostatStartOfWeek) { } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRThermostatSystemMode) { - MTRThermostatSystemModeOff MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRThermostatSystemModeAuto MTR_PROVISIONALLY_AVAILABLE = 0x01, - MTRThermostatSystemModeCool MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRThermostatSystemModeHeat MTR_PROVISIONALLY_AVAILABLE = 0x04, - MTRThermostatSystemModeEmergencyHeat MTR_PROVISIONALLY_AVAILABLE = 0x05, - MTRThermostatSystemModePrecooling MTR_PROVISIONALLY_AVAILABLE = 0x06, - MTRThermostatSystemModeFanOnly MTR_PROVISIONALLY_AVAILABLE = 0x07, - MTRThermostatSystemModeDry MTR_PROVISIONALLY_AVAILABLE = 0x08, - MTRThermostatSystemModeSleep MTR_PROVISIONALLY_AVAILABLE = 0x09, -} MTR_PROVISIONALLY_AVAILABLE; + MTRThermostatSystemModeOff MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTRThermostatSystemModeAuto MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, + MTRThermostatSystemModeCool MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, + MTRThermostatSystemModeHeat MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, + MTRThermostatSystemModeEmergencyHeat MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x05, + MTRThermostatSystemModeEmergencyHeating MTR_DEPRECATED("Please use MTRThermostatSystemModeEmergencyHeat", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x05, + MTRThermostatSystemModePrecooling MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, + MTRThermostatSystemModeFanOnly MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, + MTRThermostatSystemModeDry MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x08, + 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_ENUM(uint8_t, MTRThermostatTemperatureSetpointHold) { MTRThermostatTemperatureSetpointHoldSetpointHoldOff MTR_PROVISIONALLY_AVAILABLE = 0x00, @@ -17456,10 +17495,10 @@ typedef NS_ENUM(uint8_t, MTRThermostatTemperatureSetpointHold) { } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint8_t, MTRThermostatRunningMode) { - MTRThermostatRunningModeOff MTR_PROVISIONALLY_AVAILABLE = 0x00, - MTRThermostatRunningModeCool MTR_PROVISIONALLY_AVAILABLE = 0x03, - MTRThermostatRunningModeHeat MTR_PROVISIONALLY_AVAILABLE = 0x04, -} MTR_PROVISIONALLY_AVAILABLE; + 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, @@ -17516,20 +17555,61 @@ typedef NS_OPTIONS(uint8_t, MTRThermostatRemoteSensingBitmap) { } MTR_PROVISIONALLY_AVAILABLE; typedef NS_OPTIONS(uint8_t, MTRThermostatScheduleDayOfWeekBitmap) { - MTRThermostatScheduleDayOfWeekBitmapSunday MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRThermostatScheduleDayOfWeekBitmapMonday MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRThermostatScheduleDayOfWeekBitmapTuesday MTR_PROVISIONALLY_AVAILABLE = 0x4, - MTRThermostatScheduleDayOfWeekBitmapWednesday MTR_PROVISIONALLY_AVAILABLE = 0x8, - MTRThermostatScheduleDayOfWeekBitmapThursday MTR_PROVISIONALLY_AVAILABLE = 0x10, - MTRThermostatScheduleDayOfWeekBitmapFriday MTR_PROVISIONALLY_AVAILABLE = 0x20, - MTRThermostatScheduleDayOfWeekBitmapSaturday MTR_PROVISIONALLY_AVAILABLE = 0x40, - MTRThermostatScheduleDayOfWeekBitmapAway MTR_PROVISIONALLY_AVAILABLE = 0x80, -} MTR_PROVISIONALLY_AVAILABLE; + 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_PROVISIONALLY_AVAILABLE = 0x1, - MTRThermostatScheduleModeBitmapCoolSetpointPresent MTR_PROVISIONALLY_AVAILABLE = 0x2, -} MTR_PROVISIONALLY_AVAILABLE; + 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)) + 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/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 6e290bbcb936fd..7481ef14c27d03 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -1317,11 +1317,22 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRPumpConfigurationAndControlClusterTurbineOperationEvent : NSObject @end -MTR_PROVISIONALLY_AVAILABLE +MTR_NEWLY_AVAILABLE @interface MTRThermostatClusterWeeklyScheduleTransitionStruct : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull heatSetpoint MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull coolSetpoint MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull heatSetpoint MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull coolSetpoint MTR_NEWLY_AVAILABLE; +@end + +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 * _Nonnull 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 * _Nonnull 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 638fb4e11263b5..a12a0a79c2c0df 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -5516,6 +5516,12 @@ - (NSString *)description @end +@implementation MTRThermostatClusterThermostatScheduleTransition : MTRThermostatClusterWeeklyScheduleTransitionStruct +@dynamic transitionTime; +@dynamic heatSetpoint; +@dynamic coolSetpoint; +@end + @implementation MTRChannelClusterProgramCastStruct - (instancetype)init { From c473c6f21ba1c9776ef401b1c930ee9f6e8fd8b9 Mon Sep 17 00:00:00 2001 From: David Rempel <63119829+drempelg@users.noreply.github.com> Date: Fri, 1 Dec 2023 14:37:45 -0800 Subject: [PATCH 07/14] Update src/app/clusters/thermostat-server/thermostat-server.cpp Co-authored-by: Boris Zbarsky --- src/app/clusters/thermostat-server/thermostat-server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/clusters/thermostat-server/thermostat-server.cpp b/src/app/clusters/thermostat-server/thermostat-server.cpp index 55215d491e0a5b..3d6fd60ed8665c 100644 --- a/src/app/clusters/thermostat-server/thermostat-server.cpp +++ b/src/app/clusters/thermostat-server/thermostat-server.cpp @@ -97,7 +97,7 @@ CHIP_ERROR ThermostatAttrAccess::Read(const ConcreteReadAttributePath & aPath, A case RemoteSensing::Id: if (localTemperatureNotExposedSupported) { - chip::BitMask valueRemoteSensing; + BitMask valueRemoteSensing; EmberAfStatus status = RemoteSensing::Get(aPath.mEndpointId, &valueRemoteSensing); if (status != EMBER_ZCL_STATUS_SUCCESS) { From fce08ea0119e25e5c4134ca4ba147474c0efeadf Mon Sep 17 00:00:00 2001 From: David Rempel <63119829+drempelg@users.noreply.github.com> Date: Fri, 1 Dec 2023 14:37:59 -0800 Subject: [PATCH 08/14] Update src/app/clusters/thermostat-server/thermostat-server.cpp Co-authored-by: Boris Zbarsky --- src/app/clusters/thermostat-server/thermostat-server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/clusters/thermostat-server/thermostat-server.cpp b/src/app/clusters/thermostat-server/thermostat-server.cpp index 3d6fd60ed8665c..62dd031056d872 100644 --- a/src/app/clusters/thermostat-server/thermostat-server.cpp +++ b/src/app/clusters/thermostat-server/thermostat-server.cpp @@ -104,7 +104,7 @@ CHIP_ERROR ThermostatAttrAccess::Read(const ConcreteReadAttributePath & aPath, A StatusIB statusIB(ToInteractionModelStatus(status)); return statusIB.ToChipError(); } - valueRemoteSensing.Clear(RemoteSensingBitmap::kLocalTemperature); // clear bit 1 (LocalTemperature RemoteSensing bit) + valueRemoteSensing.Clear(RemoteSensingBitmap::kLocalTemperature); return aEncoder.Encode(valueRemoteSensing); } break; From b4ba301c1056b455645b35d67d11f0638bc0e5a4 Mon Sep 17 00:00:00 2001 From: David Rempel Date: Fri, 1 Dec 2023 18:12:56 -0800 Subject: [PATCH 09/14] Bunch of changes related to review --- .../all-clusters-app.matter | 36 +-- .../all-clusters-minimal-app.matter | 36 +-- ...umiditysensor_thermostat_56de3d5f45.matter | 36 +-- ...tnode_heatingcoolingunit_ncdGai1E5a.matter | 36 +-- ...tnode_roomairconditioner_9cf3607804.matter | 36 +-- .../rootnode_thermostat_bm3fb8dhYi.matter | 37 +-- .../placeholder/linux/apps/app1/config.matter | 73 ++---- .../placeholder/linux/apps/app2/config.matter | 73 ++---- .../nxp/zap/thermostat_matter_thread.matter | 37 +-- .../nxp/zap/thermostat_matter_wifi.matter | 37 +-- .../thermostat-common/thermostat.matter | 36 +-- .../app-templates/endpoint_config.h | 72 +++--- .../certification/Test_TC_TSTAT_2_1.yaml | 10 + .../data-model/chip/thermostat-cluster.xml | 72 +++--- .../data_model/controller-clusters.matter | 36 +-- .../chip/devicecontroller/ChipClusters.java | 124 ++++------ .../chip/devicecontroller/ChipStructs.java | 16 +- .../devicecontroller/ClusterIDMapping.java | 6 +- .../devicecontroller/ClusterInfoMapping.java | 56 +---- .../devicecontroller/ClusterReadMapping.java | 11 + .../devicecontroller/ClusterWriteMapping.java | 22 ++ ...atClusterWeeklyScheduleTransitionStruct.kt | 32 ++- .../cluster/clusters/ThermostatCluster.kt | 45 ++-- ...atClusterWeeklyScheduleTransitionStruct.kt | 32 ++- .../CHIPAttributeTLVValueDecoder.cpp | 16 ++ .../zap-generated/CHIPClustersWrite-JNI.cpp | 52 ++++ .../zap-generated/CHIPInvokeCallbacks.cpp | 164 +++---------- .../java/zap-generated/CHIPInvokeCallbacks.h | 15 -- .../python/chip/clusters/CHIPClusters.py | 15 +- .../python/chip/clusters/Objects.py | 80 ++---- .../MTRAttributeSpecifiedCheck.mm | 3 + .../MTRAttributeTLVValueDecoder.mm | 11 + .../CHIP/zap-generated/MTRBaseClusters.h | 34 +-- .../CHIP/zap-generated/MTRBaseClusters.mm | 135 +++++++--- .../CHIP/zap-generated/MTRClusterConstants.h | 6 +- .../CHIP/zap-generated/MTRClusters.h | 7 +- .../CHIP/zap-generated/MTRClusters.mm | 47 ++-- .../zap-generated/MTRCommandPayloadsObjc.h | 61 +---- .../zap-generated/MTRCommandPayloadsObjc.mm | 232 +++--------------- .../MTRCommandPayloads_Internal.h | 12 - .../CHIP/zap-generated/MTRStructsObjc.h | 8 +- .../CHIP/zap-generated/MTRStructsObjc.mm | 4 +- .../zap-generated/attributes/Accessors.cpp | 39 ++- .../zap-generated/attributes/Accessors.h | 13 +- .../app-common/zap-generated/callback.h | 6 - .../app-common/zap-generated/cluster-enums.h | 22 +- .../zap-generated/cluster-objects.cpp | 93 +------ .../zap-generated/cluster-objects.h | 114 ++------- .../app-common/zap-generated/ids/Attributes.h | 4 + .../app-common/zap-generated/ids/Commands.h | 8 - .../zap-generated/cluster/Commands.h | 49 +--- .../cluster/logging/DataModelLogger.cpp | 25 +- .../cluster/logging/DataModelLogger.h | 2 - .../zap-generated/cluster/Commands.h | 204 ++++++++++----- 54 files changed, 971 insertions(+), 1517 deletions(-) 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 35202f6b4f81b5..9820471540c95a 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 @@ -4055,17 +4055,11 @@ cluster Thermostat = 513 { kFanFail = 0x10; } - bitmap AlarmCodeBitmap : bitmap8 { - kInitialization = 0x1; - kHardware = 0x2; - kSelfCalibration = 0x4; - } - bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kZigbeeScheduleConfiguration = 0x8; + kScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; @@ -4118,8 +4112,8 @@ cluster Thermostat = 513 { struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - temperature heatSetpoint = 1; - temperature coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } readonly attribute nullable temperature localTemperature = 0; @@ -4131,11 +4125,12 @@ cluster Thermostat = 513 { 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional temperature occupiedCoolingSetpoint = 17; - attribute optional temperature occupiedHeatingSetpoint = 18; - attribute optional temperature unoccupiedCoolingSetpoint = 19; - attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; @@ -4184,27 +4179,18 @@ cluster Thermostat = 513 { response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } - response struct GetRelayStatusLogResponse = 1 { - int16u timeOfDay = 0; - RelayStateBitmap relayStatus = 1; - nullable temperature localTemperature = 2; - nullable int8u humidityInPercentage = 3; - temperature setPoint = 4; - int16u unreadEntries = 5; - } - request struct GetWeeklyScheduleRequest { ScheduleDayOfWeekBitmap daysToReturn = 0; ScheduleModeBitmap modeToReturn = 1; @@ -4218,8 +4204,6 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to query the thermostat internal relay status log. This command has no payload. */ - command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for controlling a fan in a heating/cooling system. */ 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 9099d0cf9be911..41b5d8315a8942 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 @@ -3586,17 +3586,11 @@ cluster Thermostat = 513 { kFanFail = 0x10; } - bitmap AlarmCodeBitmap : bitmap8 { - kInitialization = 0x1; - kHardware = 0x2; - kSelfCalibration = 0x4; - } - bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kZigbeeScheduleConfiguration = 0x8; + kScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; @@ -3649,8 +3643,8 @@ cluster Thermostat = 513 { struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - temperature heatSetpoint = 1; - temperature coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } readonly attribute nullable temperature localTemperature = 0; @@ -3662,11 +3656,12 @@ cluster Thermostat = 513 { 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional temperature occupiedCoolingSetpoint = 17; - attribute optional temperature occupiedHeatingSetpoint = 18; - attribute optional temperature unoccupiedCoolingSetpoint = 19; - attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; @@ -3715,27 +3710,18 @@ cluster Thermostat = 513 { response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } - response struct GetRelayStatusLogResponse = 1 { - int16u timeOfDay = 0; - RelayStateBitmap relayStatus = 1; - nullable temperature localTemperature = 2; - nullable int8u humidityInPercentage = 3; - temperature setPoint = 4; - int16u unreadEntries = 5; - } - request struct GetWeeklyScheduleRequest { ScheduleDayOfWeekBitmap daysToReturn = 0; ScheduleModeBitmap modeToReturn = 1; @@ -3749,8 +3735,6 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to query the thermostat internal relay status log. This command has no payload. */ - command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for controlling a fan in a heating/cooling system. */ 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 cfbe1822b79e8d..a7cb03ca961ba9 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 @@ -1230,17 +1230,11 @@ cluster Thermostat = 513 { kFanFail = 0x10; } - bitmap AlarmCodeBitmap : bitmap8 { - kInitialization = 0x1; - kHardware = 0x2; - kSelfCalibration = 0x4; - } - bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kZigbeeScheduleConfiguration = 0x8; + kScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; @@ -1293,8 +1287,8 @@ cluster Thermostat = 513 { struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - temperature heatSetpoint = 1; - temperature coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } readonly attribute nullable temperature localTemperature = 0; @@ -1306,11 +1300,12 @@ cluster Thermostat = 513 { 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional temperature occupiedCoolingSetpoint = 17; - attribute optional temperature occupiedHeatingSetpoint = 18; - attribute optional temperature unoccupiedCoolingSetpoint = 19; - attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; @@ -1359,27 +1354,18 @@ cluster Thermostat = 513 { response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } - response struct GetRelayStatusLogResponse = 1 { - int16u timeOfDay = 0; - RelayStateBitmap relayStatus = 1; - nullable temperature localTemperature = 2; - nullable int8u humidityInPercentage = 3; - temperature setPoint = 4; - int16u unreadEntries = 5; - } - request struct GetWeeklyScheduleRequest { ScheduleDayOfWeekBitmap daysToReturn = 0; ScheduleModeBitmap modeToReturn = 1; @@ -1393,8 +1379,6 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to query the thermostat internal relay status log. This command has no payload. */ - command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for controlling a fan in a heating/cooling system. */ diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 7f46a270d8cba1..c907131ff3ee28 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -1585,17 +1585,11 @@ cluster Thermostat = 513 { kFanFail = 0x10; } - bitmap AlarmCodeBitmap : bitmap8 { - kInitialization = 0x1; - kHardware = 0x2; - kSelfCalibration = 0x4; - } - bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kZigbeeScheduleConfiguration = 0x8; + kScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; @@ -1648,8 +1642,8 @@ cluster Thermostat = 513 { struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - temperature heatSetpoint = 1; - temperature coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } readonly attribute nullable temperature localTemperature = 0; @@ -1661,11 +1655,12 @@ cluster Thermostat = 513 { 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional temperature occupiedCoolingSetpoint = 17; - attribute optional temperature occupiedHeatingSetpoint = 18; - attribute optional temperature unoccupiedCoolingSetpoint = 19; - attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; @@ -1714,27 +1709,18 @@ cluster Thermostat = 513 { response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } - response struct GetRelayStatusLogResponse = 1 { - int16u timeOfDay = 0; - RelayStateBitmap relayStatus = 1; - nullable temperature localTemperature = 2; - nullable int8u humidityInPercentage = 3; - temperature setPoint = 4; - int16u unreadEntries = 5; - } - request struct GetWeeklyScheduleRequest { ScheduleDayOfWeekBitmap daysToReturn = 0; ScheduleModeBitmap modeToReturn = 1; @@ -1748,8 +1734,6 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to query the thermostat internal relay status log. This command has no payload. */ - command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for controlling a fan in a heating/cooling system. */ diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter index ec17a3607268a1..70ae6a123f9e7f 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter @@ -1170,17 +1170,11 @@ cluster Thermostat = 513 { kFanFail = 0x10; } - bitmap AlarmCodeBitmap : bitmap8 { - kInitialization = 0x1; - kHardware = 0x2; - kSelfCalibration = 0x4; - } - bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kZigbeeScheduleConfiguration = 0x8; + kScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; @@ -1233,8 +1227,8 @@ cluster Thermostat = 513 { struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - temperature heatSetpoint = 1; - temperature coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } readonly attribute nullable temperature localTemperature = 0; @@ -1246,11 +1240,12 @@ cluster Thermostat = 513 { 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional temperature occupiedCoolingSetpoint = 17; - attribute optional temperature occupiedHeatingSetpoint = 18; - attribute optional temperature unoccupiedCoolingSetpoint = 19; - attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; @@ -1299,27 +1294,18 @@ cluster Thermostat = 513 { response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } - response struct GetRelayStatusLogResponse = 1 { - int16u timeOfDay = 0; - RelayStateBitmap relayStatus = 1; - nullable temperature localTemperature = 2; - nullable int8u humidityInPercentage = 3; - temperature setPoint = 4; - int16u unreadEntries = 5; - } - request struct GetWeeklyScheduleRequest { ScheduleDayOfWeekBitmap daysToReturn = 0; ScheduleModeBitmap modeToReturn = 1; @@ -1333,8 +1319,6 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to query the thermostat internal relay status log. This command has no payload. */ - command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for controlling a fan in a heating/cooling system. */ diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 529c2aca917ccd..64c32f2d58e6fc 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -1388,17 +1388,11 @@ cluster Thermostat = 513 { kFanFail = 0x10; } - bitmap AlarmCodeBitmap : bitmap8 { - kInitialization = 0x1; - kHardware = 0x2; - kSelfCalibration = 0x4; - } - bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kZigbeeScheduleConfiguration = 0x8; + kScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; @@ -1451,8 +1445,8 @@ cluster Thermostat = 513 { struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - temperature heatSetpoint = 1; - temperature coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } readonly attribute nullable temperature localTemperature = 0; @@ -1464,11 +1458,12 @@ cluster Thermostat = 513 { 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional temperature occupiedCoolingSetpoint = 17; - attribute optional temperature occupiedHeatingSetpoint = 18; - attribute optional temperature unoccupiedCoolingSetpoint = 19; - attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; @@ -1517,27 +1512,18 @@ cluster Thermostat = 513 { response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } - response struct GetRelayStatusLogResponse = 1 { - int16u timeOfDay = 0; - RelayStateBitmap relayStatus = 1; - nullable temperature localTemperature = 2; - nullable int8u humidityInPercentage = 3; - temperature setPoint = 4; - int16u unreadEntries = 5; - } - request struct GetWeeklyScheduleRequest { ScheduleDayOfWeekBitmap daysToReturn = 0; ScheduleModeBitmap modeToReturn = 1; @@ -1551,8 +1537,6 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to query the thermostat internal relay status log. This command has no payload. */ - command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for controlling a fan in a heating/cooling system. */ @@ -2027,6 +2011,7 @@ endpoint 1 { ram attribute absMaxCoolSetpointLimit default = 3200; ram attribute PICoolingDemand default = 0; ram attribute PIHeatingDemand default = 0; + ram attribute HVACSystemTypeConfiguration default = 0x00; ram attribute localTemperatureCalibration default = 0; ram attribute occupiedCoolingSetpoint default = 0x0A28; ram attribute occupiedHeatingSetpoint default = 0x07D0; diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 97ca05201fbbdc..fdf7243dcfd850 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -4802,17 +4802,11 @@ cluster Thermostat = 513 { kFanFail = 0x10; } - bitmap AlarmCodeBitmap : bitmap8 { - kInitialization = 0x1; - kHardware = 0x2; - kSelfCalibration = 0x4; - } - bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kZigbeeScheduleConfiguration = 0x8; + kScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; @@ -4865,8 +4859,8 @@ cluster Thermostat = 513 { struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - temperature heatSetpoint = 1; - temperature coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } readonly attribute nullable temperature localTemperature = 0; @@ -4878,11 +4872,12 @@ cluster Thermostat = 513 { 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional temperature occupiedCoolingSetpoint = 17; - attribute optional temperature occupiedHeatingSetpoint = 18; - attribute optional temperature unoccupiedCoolingSetpoint = 19; - attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; @@ -4931,27 +4926,18 @@ cluster Thermostat = 513 { response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } - response struct GetRelayStatusLogResponse = 1 { - int16u timeOfDay = 0; - RelayStateBitmap relayStatus = 1; - nullable temperature localTemperature = 2; - nullable int8u humidityInPercentage = 3; - temperature setPoint = 4; - int16u unreadEntries = 5; - } - request struct GetWeeklyScheduleRequest { ScheduleDayOfWeekBitmap daysToReturn = 0; ScheduleModeBitmap modeToReturn = 1; @@ -4965,8 +4951,6 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to query the thermostat internal relay status log. This command has no payload. */ - command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for configuring and controlling the functionality of a thermostat. */ @@ -5069,17 +5053,11 @@ cluster Thermostat = 513 { kFanFail = 0x10; } - bitmap AlarmCodeBitmap : bitmap8 { - kInitialization = 0x1; - kHardware = 0x2; - kSelfCalibration = 0x4; - } - bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kZigbeeScheduleConfiguration = 0x8; + kScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; @@ -5132,8 +5110,8 @@ cluster Thermostat = 513 { struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - temperature heatSetpoint = 1; - temperature coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } readonly attribute nullable temperature localTemperature = 0; @@ -5145,11 +5123,12 @@ cluster Thermostat = 513 { 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional temperature occupiedCoolingSetpoint = 17; - attribute optional temperature occupiedHeatingSetpoint = 18; - attribute optional temperature unoccupiedCoolingSetpoint = 19; - attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; @@ -5198,27 +5177,18 @@ cluster Thermostat = 513 { response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } - response struct GetRelayStatusLogResponse = 1 { - int16u timeOfDay = 0; - RelayStateBitmap relayStatus = 1; - nullable temperature localTemperature = 2; - nullable int8u humidityInPercentage = 3; - temperature setPoint = 4; - int16u unreadEntries = 5; - } - request struct GetWeeklyScheduleRequest { ScheduleDayOfWeekBitmap daysToReturn = 0; ScheduleModeBitmap modeToReturn = 1; @@ -5232,8 +5202,6 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to query the thermostat internal relay status log. This command has no payload. */ - command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ @@ -8506,6 +8474,7 @@ endpoint 0 { ram attribute absMaxCoolSetpointLimit default = 0x0C80; ram attribute PICoolingDemand; ram attribute PIHeatingDemand; + callback attribute HVACSystemTypeConfiguration default = 0; callback attribute localTemperatureCalibration default = 0; ram attribute occupiedCoolingSetpoint default = 0x0A28; ram attribute occupiedHeatingSetpoint default = 0x07D0; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 7ef1e87568bf40..16701e1bb80b2f 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -4759,17 +4759,11 @@ cluster Thermostat = 513 { kFanFail = 0x10; } - bitmap AlarmCodeBitmap : bitmap8 { - kInitialization = 0x1; - kHardware = 0x2; - kSelfCalibration = 0x4; - } - bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kZigbeeScheduleConfiguration = 0x8; + kScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; @@ -4822,8 +4816,8 @@ cluster Thermostat = 513 { struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - temperature heatSetpoint = 1; - temperature coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } readonly attribute nullable temperature localTemperature = 0; @@ -4835,11 +4829,12 @@ cluster Thermostat = 513 { 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional temperature occupiedCoolingSetpoint = 17; - attribute optional temperature occupiedHeatingSetpoint = 18; - attribute optional temperature unoccupiedCoolingSetpoint = 19; - attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; @@ -4888,27 +4883,18 @@ cluster Thermostat = 513 { response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } - response struct GetRelayStatusLogResponse = 1 { - int16u timeOfDay = 0; - RelayStateBitmap relayStatus = 1; - nullable temperature localTemperature = 2; - nullable int8u humidityInPercentage = 3; - temperature setPoint = 4; - int16u unreadEntries = 5; - } - request struct GetWeeklyScheduleRequest { ScheduleDayOfWeekBitmap daysToReturn = 0; ScheduleModeBitmap modeToReturn = 1; @@ -4922,8 +4908,6 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to query the thermostat internal relay status log. This command has no payload. */ - command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for configuring and controlling the functionality of a thermostat. */ @@ -5026,17 +5010,11 @@ cluster Thermostat = 513 { kFanFail = 0x10; } - bitmap AlarmCodeBitmap : bitmap8 { - kInitialization = 0x1; - kHardware = 0x2; - kSelfCalibration = 0x4; - } - bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kZigbeeScheduleConfiguration = 0x8; + kScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; @@ -5089,8 +5067,8 @@ cluster Thermostat = 513 { struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - temperature heatSetpoint = 1; - temperature coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } readonly attribute nullable temperature localTemperature = 0; @@ -5102,11 +5080,12 @@ cluster Thermostat = 513 { 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional temperature occupiedCoolingSetpoint = 17; - attribute optional temperature occupiedHeatingSetpoint = 18; - attribute optional temperature unoccupiedCoolingSetpoint = 19; - attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; @@ -5155,27 +5134,18 @@ cluster Thermostat = 513 { response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } - response struct GetRelayStatusLogResponse = 1 { - int16u timeOfDay = 0; - RelayStateBitmap relayStatus = 1; - nullable temperature localTemperature = 2; - nullable int8u humidityInPercentage = 3; - temperature setPoint = 4; - int16u unreadEntries = 5; - } - request struct GetWeeklyScheduleRequest { ScheduleDayOfWeekBitmap daysToReturn = 0; ScheduleModeBitmap modeToReturn = 1; @@ -5189,8 +5159,6 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to query the thermostat internal relay status log. This command has no payload. */ - command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ @@ -8470,6 +8438,7 @@ endpoint 0 { ram attribute absMaxCoolSetpointLimit default = 0x0C80; ram attribute PICoolingDemand; ram attribute PIHeatingDemand; + callback attribute HVACSystemTypeConfiguration default = 0; callback attribute localTemperatureCalibration default = 0; ram attribute occupiedCoolingSetpoint default = 0x0A28; ram attribute occupiedHeatingSetpoint default = 0x07D0; diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter index 9019608531094e..f6815e05fb2689 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter @@ -2016,17 +2016,11 @@ cluster Thermostat = 513 { kFanFail = 0x10; } - bitmap AlarmCodeBitmap : bitmap8 { - kInitialization = 0x1; - kHardware = 0x2; - kSelfCalibration = 0x4; - } - bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kZigbeeScheduleConfiguration = 0x8; + kScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; @@ -2079,8 +2073,8 @@ cluster Thermostat = 513 { struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - temperature heatSetpoint = 1; - temperature coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } readonly attribute nullable temperature localTemperature = 0; @@ -2092,11 +2086,12 @@ cluster Thermostat = 513 { 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional temperature occupiedCoolingSetpoint = 17; - attribute optional temperature occupiedHeatingSetpoint = 18; - attribute optional temperature unoccupiedCoolingSetpoint = 19; - attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; @@ -2145,27 +2140,18 @@ cluster Thermostat = 513 { response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } - response struct GetRelayStatusLogResponse = 1 { - int16u timeOfDay = 0; - RelayStateBitmap relayStatus = 1; - nullable temperature localTemperature = 2; - nullable int8u humidityInPercentage = 3; - temperature setPoint = 4; - int16u unreadEntries = 5; - } - request struct GetWeeklyScheduleRequest { ScheduleDayOfWeekBitmap daysToReturn = 0; ScheduleModeBitmap modeToReturn = 1; @@ -2179,8 +2165,6 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to query the thermostat internal relay status log. This command has no payload. */ - command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } endpoint 0 { @@ -2573,6 +2557,7 @@ endpoint 1 { ram attribute absMaxHeatSetpointLimit default = 3000; ram attribute absMinCoolSetpointLimit default = 1600; ram attribute absMaxCoolSetpointLimit default = 3200; + ram attribute HVACSystemTypeConfiguration; persist attribute occupiedCoolingSetpoint default = 0x0A28; persist attribute occupiedHeatingSetpoint default = 0x07D0; ram attribute minHeatSetpointLimit default = 700; diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter index 2b96a13d0b8a58..c4d29cd44a8e21 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter @@ -1927,17 +1927,11 @@ cluster Thermostat = 513 { kFanFail = 0x10; } - bitmap AlarmCodeBitmap : bitmap8 { - kInitialization = 0x1; - kHardware = 0x2; - kSelfCalibration = 0x4; - } - bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kZigbeeScheduleConfiguration = 0x8; + kScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; @@ -1990,8 +1984,8 @@ cluster Thermostat = 513 { struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - temperature heatSetpoint = 1; - temperature coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } readonly attribute nullable temperature localTemperature = 0; @@ -2003,11 +1997,12 @@ cluster Thermostat = 513 { 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional temperature occupiedCoolingSetpoint = 17; - attribute optional temperature occupiedHeatingSetpoint = 18; - attribute optional temperature unoccupiedCoolingSetpoint = 19; - attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; @@ -2056,27 +2051,18 @@ cluster Thermostat = 513 { response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } - response struct GetRelayStatusLogResponse = 1 { - int16u timeOfDay = 0; - RelayStateBitmap relayStatus = 1; - nullable temperature localTemperature = 2; - nullable int8u humidityInPercentage = 3; - temperature setPoint = 4; - int16u unreadEntries = 5; - } - request struct GetWeeklyScheduleRequest { ScheduleDayOfWeekBitmap daysToReturn = 0; ScheduleModeBitmap modeToReturn = 1; @@ -2090,8 +2076,6 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to query the thermostat internal relay status log. This command has no payload. */ - command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } endpoint 0 { @@ -2429,6 +2413,7 @@ endpoint 1 { ram attribute absMaxHeatSetpointLimit default = 3000; ram attribute absMinCoolSetpointLimit default = 1600; ram attribute absMaxCoolSetpointLimit default = 3200; + ram attribute HVACSystemTypeConfiguration; persist attribute occupiedCoolingSetpoint default = 0x0A28; persist attribute occupiedHeatingSetpoint default = 0x07D0; ram attribute minHeatSetpointLimit default = 700; diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 2c062453093080..917fd66ea42b3e 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -1767,17 +1767,11 @@ cluster Thermostat = 513 { kFanFail = 0x10; } - bitmap AlarmCodeBitmap : bitmap8 { - kInitialization = 0x1; - kHardware = 0x2; - kSelfCalibration = 0x4; - } - bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kZigbeeScheduleConfiguration = 0x8; + kScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; @@ -1830,8 +1824,8 @@ cluster Thermostat = 513 { struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - temperature heatSetpoint = 1; - temperature coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } readonly attribute nullable temperature localTemperature = 0; @@ -1843,11 +1837,12 @@ cluster Thermostat = 513 { 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional temperature occupiedCoolingSetpoint = 17; - attribute optional temperature occupiedHeatingSetpoint = 18; - attribute optional temperature unoccupiedCoolingSetpoint = 19; - attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; @@ -1896,27 +1891,18 @@ cluster Thermostat = 513 { response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } - response struct GetRelayStatusLogResponse = 1 { - int16u timeOfDay = 0; - RelayStateBitmap relayStatus = 1; - nullable temperature localTemperature = 2; - nullable int8u humidityInPercentage = 3; - temperature setPoint = 4; - int16u unreadEntries = 5; - } - request struct GetWeeklyScheduleRequest { ScheduleDayOfWeekBitmap daysToReturn = 0; ScheduleModeBitmap modeToReturn = 1; @@ -1930,8 +1916,6 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to query the thermostat internal relay status log. This command has no payload. */ - command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ 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 1a0eb436e726ac..cccbbf2c359a57 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 @@ -269,7 +269,7 @@ #define GENERATED_DEFAULTS_COUNT (32) // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 40 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 42 #define GENERATED_MIN_MAX_DEFAULTS \ { \ \ @@ -305,9 +305,11 @@ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x7 }, /* ControlMode */ \ \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ - { (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) 0x9 }, /* SystemMode */ \ + { (uint16_t) 0xA28, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* OccupiedCoolingSetpoint */ \ + { (uint16_t) 0x7D0, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* OccupiedHeatingSetpoint */ \ + { (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) 0x9 }, /* SystemMode */ \ \ /* Endpoint: 1, Cluster: Fan Control (server) */ \ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x6 }, /* FanMode */ \ @@ -1007,10 +1009,10 @@ { 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_SIMPLE_DEFAULT(0x0A28), 0x00000011, 2, ZAP_TYPE(TEMPERATURE), \ - ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OccupiedCoolingSetpoint */ \ - { ZAP_SIMPLE_DEFAULT(0x07D0), 0x00000012, 2, ZAP_TYPE(TEMPERATURE), \ - ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OccupiedHeatingSetpoint */ \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(13), 0x00000011, 2, ZAP_TYPE(INT16S), \ + ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OccupiedCoolingSetpoint */ \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(14), 0x00000012, 2, ZAP_TYPE(INT16S), \ + ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OccupiedHeatingSetpoint */ \ { ZAP_SIMPLE_DEFAULT(0x02BC), 0x00000015, 2, ZAP_TYPE(TEMPERATURE), \ ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MinHeatSetpointLimit */ \ { ZAP_SIMPLE_DEFAULT(0x0BB8), 0x00000016, 2, ZAP_TYPE(TEMPERATURE), \ @@ -1019,24 +1021,24 @@ ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MinCoolSetpointLimit */ \ { ZAP_SIMPLE_DEFAULT(0x0C80), 0x00000018, 2, ZAP_TYPE(TEMPERATURE), \ ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MaxCoolSetpointLimit */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(13), 0x00000019, 1, ZAP_TYPE(INT8S), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(15), 0x00000019, 1, ZAP_TYPE(INT8S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MinSetpointDeadBand */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(14), 0x0000001B, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(16), 0x0000001B, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ControlSequenceOfOperation */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(15), 0x0000001C, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(17), 0x0000001C, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* SystemMode */ \ { ZAP_SIMPLE_DEFAULT(0x0023), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(6), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fan Control (server) */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(16), 0x00000000, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(18), 0x00000000, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* FanMode */ \ { ZAP_SIMPLE_DEFAULT(0x02), 0x00000001, 1, ZAP_TYPE(ENUM8), 0 }, /* FanModeSequence */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(17), 0x00000002, 1, ZAP_TYPE(PERCENT), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(19), 0x00000002, 1, ZAP_TYPE(PERCENT), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* PercentSetting */ \ { ZAP_SIMPLE_DEFAULT(0x00), 0x00000003, 1, ZAP_TYPE(PERCENT), 0 }, /* PercentCurrent */ \ { ZAP_SIMPLE_DEFAULT(100), 0x00000004, 1, ZAP_TYPE(INT8U), 0 }, /* SpeedMax */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(18), 0x00000005, 1, ZAP_TYPE(INT8U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(20), 0x00000005, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* SpeedSetting */ \ { ZAP_SIMPLE_DEFAULT(0x00), 0x00000006, 1, ZAP_TYPE(INT8U), 0 }, /* SpeedCurrent */ \ { ZAP_SIMPLE_DEFAULT(0x00), 0x00000007, 1, ZAP_TYPE(BITMAP8), 0 }, /* RockSupport */ \ @@ -1047,11 +1049,11 @@ { ZAP_SIMPLE_DEFAULT(2), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(19), 0x00000000, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(21), 0x00000000, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* TemperatureDisplayMode */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(20), 0x00000001, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(22), 0x00000001, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* KeypadLockout */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(21), 0x00000002, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(23), 0x00000002, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ScheduleProgrammingVisibility */ \ { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(2), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ @@ -1086,25 +1088,25 @@ { ZAP_EMPTY_DEFAULT(), 0x00000028, 2, ZAP_TYPE(INT16U), 0 }, /* Primary6X */ \ { ZAP_EMPTY_DEFAULT(), 0x00000029, 2, ZAP_TYPE(INT16U), 0 }, /* Primary6Y */ \ { ZAP_EMPTY_DEFAULT(), 0x0000002A, 1, ZAP_TYPE(INT8U), ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* Primary6Intensity */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(22), 0x00000030, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(24), 0x00000030, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* WhitePointX */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(23), 0x00000031, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(25), 0x00000031, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* WhitePointY */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(24), 0x00000032, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(26), 0x00000032, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointRX */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(25), 0x00000033, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(27), 0x00000033, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointRY */ \ { ZAP_EMPTY_DEFAULT(), 0x00000034, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* ColorPointRIntensity */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(26), 0x00000036, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(28), 0x00000036, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointGX */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(27), 0x00000037, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(29), 0x00000037, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointGY */ \ { ZAP_EMPTY_DEFAULT(), 0x00000038, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* ColorPointGIntensity */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(28), 0x0000003A, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(30), 0x0000003A, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointBX */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(29), 0x0000003B, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(31), 0x0000003B, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointBY */ \ { ZAP_EMPTY_DEFAULT(), 0x0000003C, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* ColorPointBIntensity */ \ @@ -1119,7 +1121,7 @@ { ZAP_SIMPLE_DEFAULT(0x0000), 0x0000400B, 2, ZAP_TYPE(INT16U), 0 }, /* ColorTempPhysicalMinMireds */ \ { ZAP_SIMPLE_DEFAULT(0xFEFF), 0x0000400C, 2, ZAP_TYPE(INT16U), 0 }, /* ColorTempPhysicalMaxMireds */ \ { ZAP_EMPTY_DEFAULT(), 0x0000400D, 2, ZAP_TYPE(INT16U), 0 }, /* CoupleColorTempToLevelMinMireds */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(30), 0x00004010, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(32), 0x00004010, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* StartUpColorTemperatureMireds */ \ { ZAP_SIMPLE_DEFAULT(0x1F), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ @@ -1308,13 +1310,13 @@ { ZAP_EMPTY_DEFAULT(), 0x00000024, 1, ZAP_TYPE(ENUM8), ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* enum_attr */ \ { ZAP_EMPTY_DEFAULT(), 0x00000025, 0, ZAP_TYPE(STRUCT), \ ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* struct_attr */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(31), 0x00000026, 1, ZAP_TYPE(INT8U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(33), 0x00000026, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* range_restricted_int8u */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(32), 0x00000027, 1, ZAP_TYPE(INT8S), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(34), 0x00000027, 1, ZAP_TYPE(INT8S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* range_restricted_int8s */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(33), 0x00000028, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(35), 0x00000028, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* range_restricted_int16u */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(34), 0x00000029, 2, ZAP_TYPE(INT16S), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(36), 0x00000029, 2, ZAP_TYPE(INT16S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* range_restricted_int16s */ \ { ZAP_EMPTY_DEFAULT(), 0x0000002A, 0, ZAP_TYPE(ARRAY), \ ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* list_long_octet_string */ \ @@ -1385,16 +1387,16 @@ { ZAP_EMPTY_DEFAULT(), 0x00004025, 0, ZAP_TYPE(STRUCT), \ ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* nullable_struct */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(35), 0x00004026, 1, ZAP_TYPE(INT8U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(37), 0x00004026, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* nullable_range_restricted_int8u */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(36), 0x00004027, 1, ZAP_TYPE(INT8S), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(38), 0x00004027, 1, ZAP_TYPE(INT8S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* nullable_range_restricted_int8s */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(37), 0x00004028, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(39), 0x00004028, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* nullable_range_restricted_int16u */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(38), 0x00004029, 2, ZAP_TYPE(INT16S), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(40), 0x00004029, 2, ZAP_TYPE(INT16S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* nullable_range_restricted_int16s */ \ { ZAP_EMPTY_DEFAULT(), 0x0000402A, 1, ZAP_TYPE(INT8U), \ @@ -1429,7 +1431,7 @@ { ZAP_SIMPLE_DEFAULT(1), 0x00004000, 1, ZAP_TYPE(BOOLEAN), 0 }, /* GlobalSceneControl */ \ { ZAP_SIMPLE_DEFAULT(0), 0x00004001, 2, ZAP_TYPE(INT16U), ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OnTime */ \ { ZAP_SIMPLE_DEFAULT(0), 0x00004002, 2, ZAP_TYPE(INT16U), ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OffWaitTime */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(39), 0x00004003, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(41), 0x00004003, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* StartUpOnOff */ \ { ZAP_SIMPLE_DEFAULT(0x0000), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(5), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml index 35a822268d3700..36b535a024f6c0 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_2_1.yaml @@ -231,6 +231,16 @@ tests: minValue: 0 maxValue: 100 + - label: "Step 11: Read HVACSystemTypeConfiguration attribute from the DUT" + PICS: TSTAT.S.A0009 + command: "readAttribute" + attribute: "HVACSystemTypeConfiguration" + response: + constraints: + type: bitmap8 + minValue: 0 + maxValue: 63 + - label: "Step 12: Read LocalTemperatureCalibration attribute from the DUT" PICS: TSTAT.S.A0010 command: "readAttribute" 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 f8e95ba68a8eeb..d8957691e62e9f 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 @@ -21,7 +21,7 @@ limitations under the License. - + @@ -36,13 +36,6 @@ limitations under the License. - - - - - - - @@ -198,8 +191,8 @@ limitations under the License. - - + + @@ -211,26 +204,31 @@ limitations under the License. true true - LocalTemperature - OutdoorTemperature + LocalTemperature + OutdoorTemperature Occupancy - AbsMinHeatSetpointLimit - AbsMaxHeatSetpointLimit - AbsMinCoolSetpointLimit - AbsMaxCoolSetpointLimit + AbsMinHeatSetpointLimit + AbsMaxHeatSetpointLimit + AbsMinCoolSetpointLimit + AbsMaxCoolSetpointLimit PICoolingDemand PIHeatingDemand + + HVACSystemTypeConfiguration + + + LocalTemperatureCalibration - OccupiedCoolingSetpoint - OccupiedHeatingSetpoint - UnoccupiedCoolingSetpoint - UnoccupiedHeatingSetpoint - + OccupiedCoolingSetpoint + OccupiedHeatingSetpoint + UnoccupiedCoolingSetpoint + UnoccupiedHeatingSetpoint + MinHeatSetpointLimit @@ -246,7 +244,7 @@ limitations under the License. MaxCoolSetpointLimit - + MinSetpointDeadBand @@ -262,7 +260,7 @@ limitations under the License. SystemMode - ThermostatRunningMode + ThermostatRunningMode StartOfWeek NumberOfWeeklyTransitions NumberOfDailyTransitions @@ -286,14 +284,14 @@ limitations under the License. OccupiedSetback - OccupiedSetbackMin - OccupiedSetbackMax - + OccupiedSetbackMin + OccupiedSetbackMax + UnoccupiedSetback - UnoccupiedSetbackMin - UnoccupiedSetbackMax + UnoccupiedSetbackMin + UnoccupiedSetbackMax EmergencyHeatDelta @@ -340,7 +338,7 @@ limitations under the License. - + @@ -351,7 +349,7 @@ limitations under the License. - + The Clear Weekly Schedule command is used to clear the weekly schedule. @@ -362,22 +360,10 @@ limitations under the License. The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. - + - - This command is sent from the thermostat cluster server in response to the Get Relay Status Log. After the Relay Status Entry is sent over the air to the requesting client, the specific entry will be cleared from the thermostat internal log. - - - - - - - - - This command is used to query the thermostat internal relay status log. This command has no payload. - \ 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 d1c1e96b659e4e..365db8193dd845 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -5523,17 +5523,11 @@ cluster Thermostat = 513 { kFanFail = 0x10; } - bitmap AlarmCodeBitmap : bitmap8 { - kInitialization = 0x1; - kHardware = 0x2; - kSelfCalibration = 0x4; - } - bitmap Feature : bitmap32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kZigbeeScheduleConfiguration = 0x8; + kScheduleConfiguration = 0x8; kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; @@ -5586,8 +5580,8 @@ cluster Thermostat = 513 { struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; - temperature heatSetpoint = 1; - temperature coolSetpoint = 2; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; } readonly attribute nullable temperature localTemperature = 0; @@ -5599,11 +5593,12 @@ cluster Thermostat = 513 { 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; attribute access(write: manage) optional int8s localTemperatureCalibration = 16; - attribute optional temperature occupiedCoolingSetpoint = 17; - attribute optional temperature occupiedHeatingSetpoint = 18; - attribute optional temperature unoccupiedCoolingSetpoint = 19; - attribute optional temperature unoccupiedHeatingSetpoint = 20; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; @@ -5652,27 +5647,18 @@ cluster Thermostat = 513 { response struct GetWeeklyScheduleResponse = 0 { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } request struct SetWeeklyScheduleRequest { int8u numberOfTransitionsForSequence = 0; - ScheduleDayOfWeekBitmap dayOfWeekforSequence = 1; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; ScheduleModeBitmap modeForSequence = 2; WeeklyScheduleTransitionStruct transitions[] = 3; } - response struct GetRelayStatusLogResponse = 1 { - int16u timeOfDay = 0; - RelayStateBitmap relayStatus = 1; - nullable temperature localTemperature = 2; - nullable int8u humidityInPercentage = 3; - temperature setPoint = 4; - int16u unreadEntries = 5; - } - request struct GetWeeklyScheduleRequest { ScheduleDayOfWeekBitmap daysToReturn = 0; ScheduleModeBitmap modeToReturn = 1; @@ -5686,8 +5672,6 @@ cluster Thermostat = 513 { command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; - /** This command is used to query the thermostat internal relay status log. This command has no payload. */ - command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; } /** An interface for controlling a fan in a heating/cooling system. */ diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index 94f404632f0126..cebe11b0919ede 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -34317,6 +34317,7 @@ public static class ThermostatCluster extends BaseChipCluster { private static final long ABS_MAX_COOL_SETPOINT_LIMIT_ATTRIBUTE_ID = 6L; private static final long P_I_COOLING_DEMAND_ATTRIBUTE_ID = 7L; private static final long P_I_HEATING_DEMAND_ATTRIBUTE_ID = 8L; + private static final long H_V_A_C_SYSTEM_TYPE_CONFIGURATION_ATTRIBUTE_ID = 9L; private static final long LOCAL_TEMPERATURE_CALIBRATION_ATTRIBUTE_ID = 16L; private static final long OCCUPIED_COOLING_SETPOINT_ATTRIBUTE_ID = 17L; private static final long OCCUPIED_HEATING_SETPOINT_ATTRIBUTE_ID = 18L; @@ -34397,11 +34398,11 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - 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) { + 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<>(); @@ -34409,9 +34410,9 @@ public void setWeeklySchedule(DefaultClusterCallback callback, Integer numberOfT BaseTLVType numberOfTransitionsForSequencetlvValue = new UIntType(numberOfTransitionsForSequence); elements.add(new StructElement(numberOfTransitionsForSequenceFieldID, numberOfTransitionsForSequencetlvValue)); - final long dayOfWeekforSequenceFieldID = 1L; - BaseTLVType dayOfWeekforSequencetlvValue = new UIntType(dayOfWeekforSequence); - elements.add(new StructElement(dayOfWeekforSequenceFieldID, dayOfWeekforSequencetlvValue)); + final long dayOfWeekForSequenceFieldID = 1L; + BaseTLVType dayOfWeekForSequencetlvValue = new UIntType(dayOfWeekForSequence); + elements.add(new StructElement(dayOfWeekForSequenceFieldID, dayOfWeekForSequencetlvValue)); final long modeForSequenceFieldID = 2L; BaseTLVType modeForSequencetlvValue = new UIntType(modeForSequence); @@ -34451,8 +34452,8 @@ public void getWeeklySchedule(GetWeeklyScheduleResponseCallback callback, Intege public void onResponse(StructType invokeStructValue) { final long numberOfTransitionsForSequenceFieldID = 0L; Integer numberOfTransitionsForSequence = null; - final long dayOfWeekforSequenceFieldID = 1L; - Integer dayOfWeekforSequence = null; + final long dayOfWeekForSequenceFieldID = 1L; + Integer dayOfWeekForSequence = null; final long modeForSequenceFieldID = 2L; Integer modeForSequence = null; final long transitionsFieldID = 3L; @@ -34463,10 +34464,10 @@ public void onResponse(StructType invokeStructValue) { UIntType castingValue = element.value(UIntType.class); numberOfTransitionsForSequence = castingValue.value(Integer.class); } - } else if (element.contextTagNum() == dayOfWeekforSequenceFieldID) { + } else if (element.contextTagNum() == dayOfWeekForSequenceFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - dayOfWeekforSequence = castingValue.value(Integer.class); + dayOfWeekForSequence = castingValue.value(Integer.class); } } else if (element.contextTagNum() == modeForSequenceFieldID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -34480,7 +34481,7 @@ public void onResponse(StructType invokeStructValue) { } } } - callback.onSuccess(numberOfTransitionsForSequence, dayOfWeekforSequence, modeForSequence, transitions); + callback.onSuccess(numberOfTransitionsForSequence, dayOfWeekForSequence, modeForSequence, transitions); }}, commandId, value, timedInvokeTimeoutMs); } @@ -34500,73 +34501,8 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } - public void getRelayStatusLog(GetRelayStatusLogResponseCallback callback) { - getRelayStatusLog(callback, 0); - } - - public void getRelayStatusLog(GetRelayStatusLogResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 4L; - - ArrayList elements = new ArrayList<>(); - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - final long timeOfDayFieldID = 0L; - Integer timeOfDay = null; - final long relayStatusFieldID = 1L; - Integer relayStatus = null; - final long localTemperatureFieldID = 2L; - @Nullable Integer localTemperature = null; - final long humidityInPercentageFieldID = 3L; - @Nullable Integer humidityInPercentage = null; - final long setPointFieldID = 4L; - Integer setPoint = null; - final long unreadEntriesFieldID = 5L; - Integer unreadEntries = null; - for (StructElement element: invokeStructValue.value()) { - if (element.contextTagNum() == timeOfDayFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - timeOfDay = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == relayStatusFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - relayStatus = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == localTemperatureFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Int) { - IntType castingValue = element.value(IntType.class); - localTemperature = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == humidityInPercentageFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - humidityInPercentage = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == setPointFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.Int) { - IntType castingValue = element.value(IntType.class); - setPoint = castingValue.value(Integer.class); - } - } else if (element.contextTagNum() == unreadEntriesFieldID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - unreadEntries = castingValue.value(Integer.class); - } - } - } - callback.onSuccess(timeOfDay, relayStatus, localTemperature, humidityInPercentage, setPoint, unreadEntries); - }}, commandId, value, timedInvokeTimeoutMs); - } - public interface GetWeeklyScheduleResponseCallback extends BaseClusterCallback { - void onSuccess(Integer numberOfTransitionsForSequence, Integer dayOfWeekforSequence, Integer modeForSequence, ArrayList transitions); - } - - public interface GetRelayStatusLogResponseCallback extends BaseClusterCallback { - void onSuccess(Integer timeOfDay, Integer relayStatus, @Nullable Integer localTemperature, @Nullable Integer humidityInPercentage, Integer setPoint, Integer unreadEntries); + void onSuccess(Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions); } public interface LocalTemperatureAttributeCallback extends BaseAttributeCallback { @@ -34854,6 +34790,40 @@ public void onSuccess(byte[] tlv) { }, P_I_HEATING_DEMAND_ATTRIBUTE_ID, minInterval, maxInterval); } + public void readHVACSystemTypeConfigurationAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, H_V_A_C_SYSTEM_TYPE_CONFIGURATION_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, H_V_A_C_SYSTEM_TYPE_CONFIGURATION_ATTRIBUTE_ID, true); + } + + public void writeHVACSystemTypeConfigurationAttribute(DefaultClusterCallback callback, Integer value) { + writeHVACSystemTypeConfigurationAttribute(callback, value, 0); + } + + public void writeHVACSystemTypeConfigurationAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), H_V_A_C_SYSTEM_TYPE_CONFIGURATION_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeHVACSystemTypeConfigurationAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, H_V_A_C_SYSTEM_TYPE_CONFIGURATION_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, H_V_A_C_SYSTEM_TYPE_CONFIGURATION_ATTRIBUTE_ID, minInterval, maxInterval); + } + public void readLocalTemperatureCalibrationAttribute( IntegerAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, LOCAL_TEMPERATURE_CALIBRATION_ATTRIBUTE_ID); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java index 215a2516481ca8..26932c11fd712c 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java @@ -6235,16 +6235,16 @@ public String toString() { } public static class ThermostatClusterWeeklyScheduleTransitionStruct { public Integer transitionTime; - public Integer heatSetpoint; - public Integer coolSetpoint; + public @Nullable Integer heatSetpoint; + public @Nullable Integer coolSetpoint; private static final long TRANSITION_TIME_ID = 0L; private static final long HEAT_SETPOINT_ID = 1L; private static final long COOL_SETPOINT_ID = 2L; public ThermostatClusterWeeklyScheduleTransitionStruct( Integer transitionTime, - Integer heatSetpoint, - Integer coolSetpoint + @Nullable Integer heatSetpoint, + @Nullable Integer coolSetpoint ) { this.transitionTime = transitionTime; this.heatSetpoint = heatSetpoint; @@ -6254,8 +6254,8 @@ public ThermostatClusterWeeklyScheduleTransitionStruct( public StructType encodeTlv() { ArrayList values = new ArrayList<>(); values.add(new StructElement(TRANSITION_TIME_ID, new UIntType(transitionTime))); - values.add(new StructElement(HEAT_SETPOINT_ID, new IntType(heatSetpoint))); - values.add(new StructElement(COOL_SETPOINT_ID, new IntType(coolSetpoint))); + values.add(new StructElement(HEAT_SETPOINT_ID, heatSetpoint != null ? new IntType(heatSetpoint) : new NullType())); + values.add(new StructElement(COOL_SETPOINT_ID, coolSetpoint != null ? new IntType(coolSetpoint) : new NullType())); return new StructType(values); } @@ -6265,8 +6265,8 @@ public static ThermostatClusterWeeklyScheduleTransitionStruct decodeTlv(BaseTLVT return null; } Integer transitionTime = null; - Integer heatSetpoint = null; - Integer coolSetpoint = null; + @Nullable Integer heatSetpoint = null; + @Nullable Integer coolSetpoint = null; for (StructElement element: ((StructType)tlvValue).value()) { if (element.contextTagNum() == TRANSITION_TIME_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index d4dab9a6e85f1b..44485374612055 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -10388,6 +10388,7 @@ public enum Attribute { AbsMaxCoolSetpointLimit(6L), PICoolingDemand(7L), PIHeatingDemand(8L), + HVACSystemTypeConfiguration(9L), LocalTemperatureCalibration(16L), OccupiedCoolingSetpoint(17L), OccupiedHeatingSetpoint(18L), @@ -10476,8 +10477,7 @@ public enum Command { SetpointRaiseLower(0L), SetWeeklySchedule(1L), GetWeeklySchedule(2L), - ClearWeeklySchedule(3L), - GetRelayStatusLog(4L),; + ClearWeeklySchedule(3L),; private final long id; Command(long id) { this.id = id; @@ -10512,7 +10512,7 @@ public static SetpointRaiseLowerCommandField value(int id) throws NoSuchFieldErr } throw new NoSuchFieldError(); } - }public enum SetWeeklyScheduleCommandField {NumberOfTransitionsForSequence(0),DayOfWeekforSequence(1),ModeForSequence(2),Transitions(3),; + }public enum SetWeeklyScheduleCommandField {NumberOfTransitionsForSequence(0),DayOfWeekForSequence(1),ModeForSequence(2),Transitions(3),; private final int id; SetWeeklyScheduleCommandField(int id) { this.id = id; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index cecad29ddaa74b..b011bb7b1286b8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -11642,13 +11642,13 @@ 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"); responseValues.put(numberOfTransitionsForSequenceResponseValue, numberOfTransitionsForSequence); - CommandResponseInfo dayOfWeekforSequenceResponseValue = new CommandResponseInfo("dayOfWeekforSequence", "Integer"); - responseValues.put(dayOfWeekforSequenceResponseValue, dayOfWeekforSequence); + CommandResponseInfo dayOfWeekForSequenceResponseValue = new CommandResponseInfo("dayOfWeekForSequence", "Integer"); + responseValues.put(dayOfWeekForSequenceResponseValue, dayOfWeekForSequence); CommandResponseInfo modeForSequenceResponseValue = new CommandResponseInfo("modeForSequence", "Integer"); responseValues.put(modeForSequenceResponseValue, modeForSequence); // transitions: WeeklyScheduleTransitionStruct @@ -11662,38 +11662,6 @@ public void onError(Exception error) { callback.onFailure(error); } } - - public static class DelegatedThermostatClusterGetRelayStatusLogResponseCallback implements ChipClusters.ThermostatCluster.GetRelayStatusLogResponseCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(Integer timeOfDay, Integer relayStatus, @Nullable Integer localTemperature, @Nullable Integer humidityInPercentage, Integer setPoint, Integer unreadEntries) { - Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo timeOfDayResponseValue = new CommandResponseInfo("timeOfDay", "Integer"); - responseValues.put(timeOfDayResponseValue, timeOfDay); - CommandResponseInfo relayStatusResponseValue = new CommandResponseInfo("relayStatus", "Integer"); - responseValues.put(relayStatusResponseValue, relayStatus); - CommandResponseInfo localTemperatureResponseValue = new CommandResponseInfo("localTemperature", "Integer"); - responseValues.put(localTemperatureResponseValue, localTemperature); - CommandResponseInfo humidityInPercentageResponseValue = new CommandResponseInfo("humidityInPercentage", "Integer"); - responseValues.put(humidityInPercentageResponseValue, humidityInPercentage); - CommandResponseInfo setPointResponseValue = new CommandResponseInfo("setPoint", "Integer"); - responseValues.put(setPointResponseValue, setPoint); - CommandResponseInfo unreadEntriesResponseValue = new CommandResponseInfo("unreadEntries", "Integer"); - responseValues.put(unreadEntriesResponseValue, unreadEntries); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception error) { - callback.onFailure(error); - } - } public static class DelegatedThermostatClusterLocalTemperatureAttributeCallback implements ChipClusters.ThermostatCluster.LocalTemperatureAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -23243,8 +23211,8 @@ public Map> getCommandMap() { CommandParameterInfo thermostatsetWeeklySchedulenumberOfTransitionsForSequenceCommandParameterInfo = new CommandParameterInfo("numberOfTransitionsForSequence", Integer.class, Integer.class); thermostatsetWeeklyScheduleCommandParams.put("numberOfTransitionsForSequence",thermostatsetWeeklySchedulenumberOfTransitionsForSequenceCommandParameterInfo); - CommandParameterInfo thermostatsetWeeklyScheduledayOfWeekforSequenceCommandParameterInfo = new CommandParameterInfo("dayOfWeekforSequence", Integer.class, Integer.class); - thermostatsetWeeklyScheduleCommandParams.put("dayOfWeekforSequence",thermostatsetWeeklyScheduledayOfWeekforSequenceCommandParameterInfo); + CommandParameterInfo thermostatsetWeeklyScheduledayOfWeekForSequenceCommandParameterInfo = new CommandParameterInfo("dayOfWeekForSequence", Integer.class, Integer.class); + thermostatsetWeeklyScheduleCommandParams.put("dayOfWeekForSequence",thermostatsetWeeklyScheduledayOfWeekForSequenceCommandParameterInfo); CommandParameterInfo thermostatsetWeeklySchedulemodeForSequenceCommandParameterInfo = new CommandParameterInfo("modeForSequence", Integer.class, Integer.class); thermostatsetWeeklyScheduleCommandParams.put("modeForSequence",thermostatsetWeeklySchedulemodeForSequenceCommandParameterInfo); @@ -23256,7 +23224,7 @@ public Map> getCommandMap() { , (Integer) commandArguments.get("numberOfTransitionsForSequence") , (Integer) - commandArguments.get("dayOfWeekforSequence") + commandArguments.get("dayOfWeekForSequence") , (Integer) commandArguments.get("modeForSequence") , (ArrayList) @@ -23304,18 +23272,6 @@ public Map> getCommandMap() { ); thermostatClusterInteractionInfoMap.put("clearWeeklySchedule", thermostatclearWeeklyScheduleInteractionInfo); - Map thermostatgetRelayStatusLogCommandParams = new LinkedHashMap(); - InteractionInfo thermostatgetRelayStatusLogInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ThermostatCluster) cluster) - .getRelayStatusLog((ChipClusters.ThermostatCluster.GetRelayStatusLogResponseCallback) callback - ); - }, - () -> new DelegatedThermostatClusterGetRelayStatusLogResponseCallback(), - thermostatgetRelayStatusLogCommandParams - ); - thermostatClusterInteractionInfoMap.put("getRelayStatusLog", thermostatgetRelayStatusLogInteractionInfo); - commandMap.put("thermostat", thermostatClusterInteractionInfoMap); Map fanControlClusterInteractionInfoMap = new LinkedHashMap<>(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index df4d90bc72c4ac..1cdbced7a386ac 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -10815,6 +10815,17 @@ private static Map readThermostatInteractionInfo() { readThermostatPIHeatingDemandCommandParams ); result.put("readPIHeatingDemandAttribute", readThermostatPIHeatingDemandAttributeInteractionInfo); + Map readThermostatHVACSystemTypeConfigurationCommandParams = new LinkedHashMap(); + InteractionInfo readThermostatHVACSystemTypeConfigurationAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster).readHVACSystemTypeConfigurationAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatHVACSystemTypeConfigurationCommandParams + ); + result.put("readHVACSystemTypeConfigurationAttribute", readThermostatHVACSystemTypeConfigurationAttributeInteractionInfo); Map readThermostatLocalTemperatureCalibrationCommandParams = new LinkedHashMap(); InteractionInfo readThermostatLocalTemperatureCalibrationAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java index a33beec3984ebe..2fffad1f36f24b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java @@ -2039,6 +2039,28 @@ public Map> getWriteAttributeMap() { writePumpConfigurationAndControlInteractionInfo.put("writeControlModeAttribute", writePumpConfigurationAndControlControlModeAttributeInteractionInfo); writeAttributeMap.put("pumpConfigurationAndControl", writePumpConfigurationAndControlInteractionInfo); Map writeThermostatInteractionInfo = new LinkedHashMap<>(); + Map writeThermostatHVACSystemTypeConfigurationCommandParams = new LinkedHashMap(); + CommandParameterInfo thermostatHVACSystemTypeConfigurationCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeThermostatHVACSystemTypeConfigurationCommandParams.put( + "value", + thermostatHVACSystemTypeConfigurationCommandParameterInfo + ); + InteractionInfo writeThermostatHVACSystemTypeConfigurationAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster).writeHVACSystemTypeConfigurationAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeThermostatHVACSystemTypeConfigurationCommandParams + ); + writeThermostatInteractionInfo.put("writeHVACSystemTypeConfigurationAttribute", writeThermostatHVACSystemTypeConfigurationAttributeInteractionInfo); Map writeThermostatLocalTemperatureCalibrationCommandParams = new LinkedHashMap(); CommandParameterInfo thermostatlocalTemperatureCalibrationCommandParameterInfo = new CommandParameterInfo( 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 index 9efc9291b92a0b..343952b9a54a79 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt @@ -24,8 +24,8 @@ import matter.tlv.TlvWriter class ThermostatClusterWeeklyScheduleTransitionStruct( val transitionTime: UInt, - val heatSetpoint: Int, - val coolSetpoint: Int + val heatSetpoint: Int?, + val coolSetpoint: Int? ) { override fun toString(): String = buildString { append("ThermostatClusterWeeklyScheduleTransitionStruct {\n") @@ -39,8 +39,16 @@ class ThermostatClusterWeeklyScheduleTransitionStruct( tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_TRANSITION_TIME), transitionTime) - put(ContextSpecificTag(TAG_HEAT_SETPOINT), heatSetpoint) - put(ContextSpecificTag(TAG_COOL_SETPOINT), coolSetpoint) + 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() } } @@ -56,8 +64,20 @@ class ThermostatClusterWeeklyScheduleTransitionStruct( ): ThermostatClusterWeeklyScheduleTransitionStruct { tlvReader.enterStructure(tlvTag) val transitionTime = tlvReader.getUInt(ContextSpecificTag(TAG_TRANSITION_TIME)) - val heatSetpoint = tlvReader.getInt(ContextSpecificTag(TAG_HEAT_SETPOINT)) - val coolSetpoint = tlvReader.getInt(ContextSpecificTag(TAG_COOL_SETPOINT)) + 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() 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 657c16ff1e53fe..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 @@ -23,20 +23,11 @@ import matter.devicecontroller.cluster.structs.* class ThermostatCluster(private val controller: MatterController, private val endpointId: UShort) { class GetWeeklyScheduleResponse( val numberOfTransitionsForSequence: UByte, - val dayOfWeekforSequence: UInt, + val dayOfWeekForSequence: UInt, val modeForSequence: UInt, val transitions: List ) - class GetRelayStatusLogResponse( - val timeOfDay: UShort, - val relayStatus: UInt, - val localTemperature: Short?, - val humidityInPercentage: UByte?, - val setPoint: Short, - val unreadEntries: UShort - ) - class LocalTemperatureAttribute(val value: Short?) class OutdoorTemperatureAttribute(val value: Short?) @@ -79,7 +70,7 @@ class ThermostatCluster(private val controller: MatterController, private val en suspend fun setWeeklySchedule( numberOfTransitionsForSequence: UByte, - dayOfWeekforSequence: UInt, + dayOfWeekForSequence: UInt, modeForSequence: UInt, transitions: List, timedInvokeTimeoutMs: Int? = null @@ -117,16 +108,6 @@ class ThermostatCluster(private val controller: MatterController, private val en } } - suspend fun getRelayStatusLog(timedInvokeTimeoutMs: Int? = null): GetRelayStatusLogResponse { - val commandId = 4L - - if (timedInvokeTimeoutMs != null) { - // Do the action with timedInvokeTimeoutMs - } else { - // Do the action without timedInvokeTimeoutMs - } - } - suspend fun readLocalTemperatureAttribute(): LocalTemperatureAttribute { // Implementation needs to be added here } @@ -205,6 +186,28 @@ class ThermostatCluster(private val controller: MatterController, private val en // Implementation needs to be added here } + suspend fun readHVACSystemTypeConfigurationAttribute(): UByte { + // Implementation needs to be added here + } + + suspend fun writeHVACSystemTypeConfigurationAttribute( + value: UInt, + timedWriteTimeoutMs: Int? = null + ) { + if (timedWriteTimeoutMs != null) { + // Do the action with timedWriteTimeoutMs + } else { + // Do the action without timedWriteTimeoutMs + } + } + + suspend fun subscribeHVACSystemTypeConfigurationAttribute( + minInterval: Int, + maxInterval: Int + ): UByte { + // Implementation needs to be added here + } + suspend fun readLocalTemperatureCalibrationAttribute(): Byte { // Implementation needs to be added here } 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 index 20be46cb17e56d..5f93367f7ea4e3 100644 --- a/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt +++ b/src/controller/java/generated/java/matter/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt @@ -24,8 +24,8 @@ import matter.tlv.TlvWriter class ThermostatClusterWeeklyScheduleTransitionStruct( val transitionTime: UShort, - val heatSetpoint: Short, - val coolSetpoint: Short + val heatSetpoint: Short?, + val coolSetpoint: Short? ) { override fun toString(): String = buildString { append("ThermostatClusterWeeklyScheduleTransitionStruct {\n") @@ -39,8 +39,16 @@ class ThermostatClusterWeeklyScheduleTransitionStruct( tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_TRANSITION_TIME), transitionTime) - put(ContextSpecificTag(TAG_HEAT_SETPOINT), heatSetpoint) - put(ContextSpecificTag(TAG_COOL_SETPOINT), coolSetpoint) + 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() } } @@ -56,8 +64,20 @@ class ThermostatClusterWeeklyScheduleTransitionStruct( ): ThermostatClusterWeeklyScheduleTransitionStruct { tlvReader.enterStructure(tlvTag) val transitionTime = tlvReader.getUShort(ContextSpecificTag(TAG_TRANSITION_TIME)) - val heatSetpoint = tlvReader.getShort(ContextSpecificTag(TAG_HEAT_SETPOINT)) - val coolSetpoint = tlvReader.getShort(ContextSpecificTag(TAG_COOL_SETPOINT)) + 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() diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index d44dff41bc2ba1..c1c7ef1ea29f9d 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -23712,6 +23712,22 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } + case Attributes::HVACSystemTypeConfiguration::Id: { + using TypeInfo = Attributes::HVACSystemTypeConfiguration::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } case Attributes::LocalTemperatureCalibration::Id: { using TypeInfo = Attributes::LocalTemperatureCalibration::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp index 7e3677dd792390..c8b407678f3d20 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -5351,6 +5351,58 @@ JNI_METHOD(void, PumpConfigurationAndControlCluster, writeControlModeAttribute) onFailure.release(); } +JNI_METHOD(void, ThermostatCluster, writeHVACSystemTypeConfigurationAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + cppValue = + static_cast>(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, ThermostatCluster, writeLocalTemperatureCalibrationAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index 1cccaf31759fa5..1c361f0c6f7546 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -4890,13 +4890,13 @@ void CHIPThermostatClusterGetWeeklyScheduleResponseCallback::CallbackFn( chip::JniReferences::GetInstance().CreateBoxedObject(NumberOfTransitionsForSequenceClassName.c_str(), NumberOfTransitionsForSequenceCtorSignature.c_str(), jniNumberOfTransitionsForSequence, NumberOfTransitionsForSequence); - jobject DayOfWeekforSequence; - std::string DayOfWeekforSequenceClassName = "java/lang/Integer"; - std::string DayOfWeekforSequenceCtorSignature = "(I)V"; - jint jniDayOfWeekforSequence = static_cast(dataResponse.dayOfWeekforSequence.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(DayOfWeekforSequenceClassName.c_str(), - DayOfWeekforSequenceCtorSignature.c_str(), jniDayOfWeekforSequence, - DayOfWeekforSequence); + jobject DayOfWeekForSequence; + std::string DayOfWeekForSequenceClassName = "java/lang/Integer"; + std::string DayOfWeekForSequenceCtorSignature = "(I)V"; + jint jniDayOfWeekForSequence = static_cast(dataResponse.dayOfWeekForSequence.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(DayOfWeekForSequenceClassName.c_str(), + DayOfWeekForSequenceCtorSignature.c_str(), jniDayOfWeekForSequence, + DayOfWeekForSequence); jobject ModeForSequence; std::string ModeForSequenceClassName = "java/lang/Integer"; std::string ModeForSequenceCtorSignature = "(I)V"; @@ -4919,19 +4919,33 @@ void CHIPThermostatClusterGetWeeklyScheduleResponseCallback::CallbackFn( newElement_0_transitionTimeCtorSignature.c_str(), jninewElement_0_transitionTime, newElement_0_transitionTime); jobject newElement_0_heatSetpoint; - std::string newElement_0_heatSetpointClassName = "java/lang/Integer"; - std::string newElement_0_heatSetpointCtorSignature = "(I)V"; - jint jninewElement_0_heatSetpoint = static_cast(entry_0.heatSetpoint); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_heatSetpointClassName.c_str(), - newElement_0_heatSetpointCtorSignature.c_str(), - jninewElement_0_heatSetpoint, newElement_0_heatSetpoint); + if (entry_0.heatSetpoint.IsNull()) + { + newElement_0_heatSetpoint = nullptr; + } + else + { + std::string newElement_0_heatSetpointClassName = "java/lang/Integer"; + std::string newElement_0_heatSetpointCtorSignature = "(I)V"; + jint jninewElement_0_heatSetpoint = static_cast(entry_0.heatSetpoint.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_heatSetpointClassName.c_str(), + newElement_0_heatSetpointCtorSignature.c_str(), + jninewElement_0_heatSetpoint, newElement_0_heatSetpoint); + } jobject newElement_0_coolSetpoint; - std::string newElement_0_coolSetpointClassName = "java/lang/Integer"; - std::string newElement_0_coolSetpointCtorSignature = "(I)V"; - jint jninewElement_0_coolSetpoint = static_cast(entry_0.coolSetpoint); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_coolSetpointClassName.c_str(), - newElement_0_coolSetpointCtorSignature.c_str(), - jninewElement_0_coolSetpoint, newElement_0_coolSetpoint); + if (entry_0.coolSetpoint.IsNull()) + { + newElement_0_coolSetpoint = nullptr; + } + else + { + std::string newElement_0_coolSetpointClassName = "java/lang/Integer"; + std::string newElement_0_coolSetpointCtorSignature = "(I)V"; + jint jninewElement_0_coolSetpoint = static_cast(entry_0.coolSetpoint.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_coolSetpointClassName.c_str(), + newElement_0_coolSetpointCtorSignature.c_str(), + jninewElement_0_coolSetpoint, newElement_0_coolSetpoint); + } jclass weeklyScheduleTransitionStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( @@ -4955,119 +4969,9 @@ void CHIPThermostatClusterGetWeeklyScheduleResponseCallback::CallbackFn( chip::JniReferences::GetInstance().AddToList(Transitions, newElement_0); } - env->CallVoidMethod(javaCallbackRef, javaMethod, NumberOfTransitionsForSequence, DayOfWeekforSequence, ModeForSequence, + env->CallVoidMethod(javaCallbackRef, javaMethod, NumberOfTransitionsForSequence, DayOfWeekForSequence, ModeForSequence, Transitions); } -CHIPThermostatClusterGetRelayStatusLogResponseCallback::CHIPThermostatClusterGetRelayStatusLogResponseCallback( - jobject javaCallback) : Callback::Callback(CallbackFn, this) -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - return; - } - - javaCallbackRef = env->NewGlobalRef(javaCallback); - if (javaCallbackRef == nullptr) - { - ChipLogError(Zcl, "Could not create global reference for Java callback"); - } -} - -CHIPThermostatClusterGetRelayStatusLogResponseCallback::~CHIPThermostatClusterGetRelayStatusLogResponseCallback() -{ - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -}; - -void CHIPThermostatClusterGetRelayStatusLogResponseCallback::CallbackFn( - void * context, const chip::app::Clusters::Thermostat::Commands::GetRelayStatusLogResponse::DecodableType & dataResponse) -{ - chip::DeviceLayer::StackUnlock unlock; - CHIP_ERROR err = CHIP_NO_ERROR; - JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); - jobject javaCallbackRef; - jmethodID javaMethod; - - VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Error invoking Java callback: no JNIEnv")); - - std::unique_ptr - cppCallback(reinterpret_cast(context), - chip::Platform::Delete); - VerifyOrReturn(cppCallback != nullptr, ChipLogError(Zcl, "Error invoking Java callback: failed to cast native callback")); - - javaCallbackRef = cppCallback->javaCallbackRef; - // Java callback is allowed to be null, exit early if this is the case. - VerifyOrReturn(javaCallbackRef != nullptr); - - err = JniReferences::GetInstance().FindMethod( - env, javaCallbackRef, "onSuccess", - "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", - &javaMethod); - VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error invoking Java callback: %s", ErrorStr(err))); - - jobject TimeOfDay; - std::string TimeOfDayClassName = "java/lang/Integer"; - std::string TimeOfDayCtorSignature = "(I)V"; - jint jniTimeOfDay = static_cast(dataResponse.timeOfDay); - chip::JniReferences::GetInstance().CreateBoxedObject(TimeOfDayClassName.c_str(), TimeOfDayCtorSignature.c_str(), - jniTimeOfDay, TimeOfDay); - jobject RelayStatus; - std::string RelayStatusClassName = "java/lang/Integer"; - std::string RelayStatusCtorSignature = "(I)V"; - jint jniRelayStatus = static_cast(dataResponse.relayStatus.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(RelayStatusClassName.c_str(), RelayStatusCtorSignature.c_str(), - jniRelayStatus, RelayStatus); - jobject LocalTemperature; - if (dataResponse.localTemperature.IsNull()) - { - LocalTemperature = nullptr; - } - else - { - std::string LocalTemperatureClassName = "java/lang/Integer"; - std::string LocalTemperatureCtorSignature = "(I)V"; - jint jniLocalTemperature = static_cast(dataResponse.localTemperature.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - LocalTemperatureClassName.c_str(), LocalTemperatureCtorSignature.c_str(), jniLocalTemperature, LocalTemperature); - } - jobject HumidityInPercentage; - if (dataResponse.humidityInPercentage.IsNull()) - { - HumidityInPercentage = nullptr; - } - else - { - std::string HumidityInPercentageClassName = "java/lang/Integer"; - std::string HumidityInPercentageCtorSignature = "(I)V"; - jint jniHumidityInPercentage = static_cast(dataResponse.humidityInPercentage.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(HumidityInPercentageClassName.c_str(), - HumidityInPercentageCtorSignature.c_str(), - jniHumidityInPercentage, HumidityInPercentage); - } - jobject SetPoint; - std::string SetPointClassName = "java/lang/Integer"; - std::string SetPointCtorSignature = "(I)V"; - jint jniSetPoint = static_cast(dataResponse.setPoint); - chip::JniReferences::GetInstance().CreateBoxedObject(SetPointClassName.c_str(), SetPointCtorSignature.c_str(), - jniSetPoint, SetPoint); - jobject UnreadEntries; - std::string UnreadEntriesClassName = "java/lang/Integer"; - std::string UnreadEntriesCtorSignature = "(I)V"; - jint jniUnreadEntries = static_cast(dataResponse.unreadEntries); - chip::JniReferences::GetInstance().CreateBoxedObject(UnreadEntriesClassName.c_str(), UnreadEntriesCtorSignature.c_str(), - jniUnreadEntries, UnreadEntries); - - env->CallVoidMethod(javaCallbackRef, javaMethod, TimeOfDay, RelayStatus, LocalTemperature, HumidityInPercentage, SetPoint, - UnreadEntries); -} CHIPChannelClusterChangeChannelResponseCallback::CHIPChannelClusterChangeChannelResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) { diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h index 5d1004a18f30f0..23b691e07a332b 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.h +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.h @@ -766,21 +766,6 @@ class CHIPThermostatClusterGetWeeklyScheduleResponseCallback jobject javaCallbackRef; }; -class CHIPThermostatClusterGetRelayStatusLogResponseCallback - : public Callback::Callback -{ -public: - CHIPThermostatClusterGetRelayStatusLogResponseCallback(jobject javaCallback); - - ~CHIPThermostatClusterGetRelayStatusLogResponseCallback(); - - static void CallbackFn(void * context, - const chip::app::Clusters::Thermostat::Commands::GetRelayStatusLogResponse::DecodableType & data); - -private: - jobject javaCallbackRef; -}; - class CHIPChannelClusterChangeChannelResponseCallback : public Callback::Callback { diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 5c530ed580c789..3f7e37ba55259c 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -7704,7 +7704,7 @@ class ChipClusters: "commandName": "SetWeeklySchedule", "args": { "numberOfTransitionsForSequence": "int", - "dayOfWeekforSequence": "int", + "dayOfWeekForSequence": "int", "modeForSequence": "int", "transitions": "WeeklyScheduleTransitionStruct", }, @@ -7723,12 +7723,6 @@ class ChipClusters: "args": { }, }, - 0x00000004: { - "commandId": 0x00000004, - "commandName": "GetRelayStatusLog", - "args": { - }, - }, }, "attributes": { 0x00000000: { @@ -7785,6 +7779,13 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x00000009: { + "attributeName": "HVACSystemTypeConfiguration", + "attributeId": 0x00000009, + "type": "int", + "reportable": True, + "writable": True, + }, 0x00000010: { "attributeName": "LocalTemperatureCalibration", "attributeId": 0x00000010, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index fc72afcea6b556..b09f85a8103133 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -27518,6 +27518,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="absMaxCoolSetpointLimit", Tag=0x00000006, Type=typing.Optional[int]), ClusterObjectFieldDescriptor(Label="PICoolingDemand", Tag=0x00000007, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="PIHeatingDemand", Tag=0x00000008, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="HVACSystemTypeConfiguration", Tag=0x00000009, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="localTemperatureCalibration", Tag=0x00000010, Type=typing.Optional[int]), ClusterObjectFieldDescriptor(Label="occupiedCoolingSetpoint", Tag=0x00000011, Type=typing.Optional[int]), ClusterObjectFieldDescriptor(Label="occupiedHeatingSetpoint", Tag=0x00000012, Type=typing.Optional[int]), @@ -27574,6 +27575,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: absMaxCoolSetpointLimit: 'typing.Optional[int]' = None PICoolingDemand: 'typing.Optional[uint]' = None PIHeatingDemand: 'typing.Optional[uint]' = None + HVACSystemTypeConfiguration: 'typing.Optional[uint]' = None localTemperatureCalibration: 'typing.Optional[int]' = None occupiedCoolingSetpoint: 'typing.Optional[int]' = None occupiedHeatingSetpoint: 'typing.Optional[int]' = None @@ -27765,16 +27767,11 @@ class ACErrorCodeBitmap(IntFlag): kCoilSensorFail = 0x8 kFanFail = 0x10 - class AlarmCodeBitmap(IntFlag): - kInitialization = 0x1 - kHardware = 0x2 - kSelfCalibration = 0x4 - class Feature(IntFlag): kHeating = 0x1 kCooling = 0x2 kOccupancy = 0x4 - kZigbeeScheduleConfiguration = 0x8 + kScheduleConfiguration = 0x8 kSetback = 0x10 kAutoMode = 0x20 kLocalTemperatureNotExposed = 0x40 @@ -27826,13 +27823,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="transitionTime", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="heatSetpoint", Tag=1, Type=int), - ClusterObjectFieldDescriptor(Label="coolSetpoint", Tag=2, Type=int), + ClusterObjectFieldDescriptor(Label="heatSetpoint", Tag=1, Type=typing.Union[Nullable, int]), + ClusterObjectFieldDescriptor(Label="coolSetpoint", Tag=2, Type=typing.Union[Nullable, int]), ]) transitionTime: 'uint' = 0 - heatSetpoint: 'int' = 0 - coolSetpoint: 'int' = 0 + heatSetpoint: 'typing.Union[Nullable, int]' = NullValue + coolSetpoint: 'typing.Union[Nullable, int]' = NullValue class Commands: @dataclass @@ -27865,13 +27862,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="numberOfTransitionsForSequence", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="dayOfWeekforSequence", Tag=1, 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.WeeklyScheduleTransitionStruct]), ]) numberOfTransitionsForSequence: 'uint' = 0 - dayOfWeekforSequence: 'uint' = 0 + dayOfWeekForSequence: 'uint' = 0 modeForSequence: 'uint' = 0 transitions: 'typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]' = field(default_factory=lambda: []) @@ -27887,42 +27884,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="numberOfTransitionsForSequence", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="dayOfWeekforSequence", Tag=1, 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.WeeklyScheduleTransitionStruct]), ]) numberOfTransitionsForSequence: 'uint' = 0 - dayOfWeekforSequence: 'uint' = 0 + dayOfWeekForSequence: 'uint' = 0 modeForSequence: 'uint' = 0 transitions: 'typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]' = field(default_factory=lambda: []) - @dataclass - class GetRelayStatusLogResponse(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000201 - command_id: typing.ClassVar[int] = 0x00000001 - is_client: typing.ClassVar[bool] = False - response_type: typing.ClassVar[str] = None - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="timeOfDay", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="relayStatus", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="localTemperature", Tag=2, Type=typing.Union[Nullable, int]), - ClusterObjectFieldDescriptor(Label="humidityInPercentage", Tag=3, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="setPoint", Tag=4, Type=int), - ClusterObjectFieldDescriptor(Label="unreadEntries", Tag=5, Type=uint), - ]) - - timeOfDay: 'uint' = 0 - relayStatus: 'uint' = 0 - localTemperature: 'typing.Union[Nullable, int]' = NullValue - humidityInPercentage: 'typing.Union[Nullable, uint]' = NullValue - setPoint: 'int' = 0 - unreadEntries: 'uint' = 0 - @dataclass class GetWeeklySchedule(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000201 @@ -27954,19 +27925,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: Fields=[ ]) - @dataclass - class GetRelayStatusLog(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000201 - command_id: typing.ClassVar[int] = 0x00000004 - is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'GetRelayStatusLogResponse' - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ]) - class Attributes: @dataclass class LocalTemperature(ClusterAttributeDescriptor): @@ -28112,6 +28070,22 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None + @dataclass + class HVACSystemTypeConfiguration(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000201 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000009 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + @dataclass class LocalTemperatureCalibration(ClusterAttributeDescriptor): @ChipUtility.classproperty diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index 684d9fda449778..264fb5d4ba7f5a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -3480,6 +3480,9 @@ static BOOL AttributeIsSpecifiedInThermostatCluster(AttributeId aAttributeId) case Attributes::PIHeatingDemand::Id: { return YES; } + case Attributes::HVACSystemTypeConfiguration::Id: { + return YES; + } case Attributes::LocalTemperatureCalibration::Id: { return YES; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 741a178a66c6f1..cc9d3ed0afa8a4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -9579,6 +9579,17 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } + case Attributes::HVACSystemTypeConfiguration::Id: { + using TypeInfo = Attributes::HVACSystemTypeConfiguration::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } case Attributes::LocalTemperatureCalibration::Id: { using TypeInfo = Attributes::LocalTemperatureCalibration::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index a2443f5ef3cded..124da56cbcf82a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -8701,14 +8701,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)clearWeeklyScheduleWithCompletion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -/** - * Command GetRelayStatusLog - * - * This command is used to query the thermostat internal relay status log. This command has no payload. - */ -- (void)getRelayStatusLogWithParams:(MTRThermostatClusterGetRelayStatusLogParams * _Nullable)params completion:(void (^)(MTRThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)getRelayStatusLogWithCompletion:(void (^)(MTRThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams *)params @@ -8764,6 +8756,14 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributePIHeatingDemandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeHVACSystemTypeConfigurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeHVACSystemTypeConfigurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + - (void)readAttributeLocalTemperatureCalibrationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -17508,17 +17508,12 @@ typedef NS_OPTIONS(uint32_t, MTRThermostatACErrorCodeBitmap) { MTRThermostatACErrorCodeBitmapFanFail MTR_PROVISIONALLY_AVAILABLE = 0x10, } MTR_PROVISIONALLY_AVAILABLE; -typedef NS_OPTIONS(uint8_t, MTRThermostatAlarmCodeBitmap) { - MTRThermostatAlarmCodeBitmapInitialization MTR_PROVISIONALLY_AVAILABLE = 0x1, - MTRThermostatAlarmCodeBitmapHardware MTR_PROVISIONALLY_AVAILABLE = 0x2, - MTRThermostatAlarmCodeBitmapSelfCalibration MTR_PROVISIONALLY_AVAILABLE = 0x4, -} 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, MTRThermostatFeatureOccupancy MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRThermostatFeatureZigbeeScheduleConfiguration MTR_PROVISIONALLY_AVAILABLE = 0x8, + MTRThermostatFeatureScheduleConfiguration MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x8, + MTRThermostatFeatureSchedule MTR_DEPRECATED("Please use MTRThermostatFeatureScheduleConfiguration", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x8, MTRThermostatFeatureSetback MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, MTRThermostatFeatureAutoMode MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x20, MTRThermostatFeatureAutomode MTR_DEPRECATED("Please use MTRThermostatFeatureAutoMode", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x20, @@ -23544,6 +23539,15 @@ typedef NS_OPTIONS(uint8_t, MTRTestClusterSimpleBitmap) { reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributePIHeatingDemandWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + (void)readAttributePIHeatingDemandWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributePIHeatingDemandWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)readAttributeHVACSystemTypeConfigurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHVACSystemTypeConfigurationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeHVACSystemTypeConfigurationWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeHVACSystemTypeConfigurationWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); +- (void)subscribeAttributeHVACSystemTypeConfigurationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_DEPRECATED("Please use subscribeAttributeHVACSystemTypeConfigurationWithParams:subscriptionEstablished:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); ++ (void)readAttributeHVACSystemTypeConfigurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeHVACSystemTypeConfigurationWithAttributeCache:endpoint:queue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); + - (void)readAttributeLocalTemperatureCalibrationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler MTR_DEPRECATED("Please use readAttributeLocalTemperatureCalibrationWithCompletion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLocalTemperatureCalibrationWithValue:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler MTR_DEPRECATED("Please use writeAttributeLocalTemperatureCalibrationWithValue:params:completion:", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 7691e6114459c1..35b88c5c316c58 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -62506,34 +62506,6 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa queue:self.callbackQueue completion:responseHandler]; } -- (void)getRelayStatusLogWithCompletion:(void (^)(MTRThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self getRelayStatusLogWithParams:nil completion:completion]; -} -- (void)getRelayStatusLogWithParams:(MTRThermostatClusterGetRelayStatusLogParams * _Nullable)params completion:(void (^)(MTRThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRThermostatClusterGetRelayStatusLogParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Thermostat::Commands::GetRelayStatusLog::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRThermostatClusterGetRelayStatusLogResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { @@ -62859,6 +62831,70 @@ + (void)readAttributePIHeatingDemandWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } +- (void)readAttributeHVACSystemTypeConfigurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeHVACSystemTypeConfigurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + - (void)readAttributeLocalTemperatureCalibrationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; @@ -65569,6 +65605,49 @@ + (void)readAttributePIHeatingDemandWithAttributeCache:(MTRAttributeCacheContain }]; } +- (void)readAttributeHVACSystemTypeConfigurationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeHVACSystemTypeConfigurationWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeHVACSystemTypeConfigurationWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeHVACSystemTypeConfigurationWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeHVACSystemTypeConfigurationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeHVACSystemTypeConfigurationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeHVACSystemTypeConfigurationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeHVACSystemTypeConfigurationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + - (void)readAttributeLocalTemperatureCalibrationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { [self readAttributeLocalTemperatureCalibrationWithCompletion: diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 1a4eba24dae44c..ecef7171bb2f72 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -3145,6 +3145,9 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRClusterThermostatAttributePIHeatingDemandID MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterThermostatAttributePIHeatingDemandID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000008, + MTRClusterThermostatAttributeHVACSystemTypeConfigurationID + MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterThermostatAttributeHVACSystemTypeConfigurationID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) + = 0x00000009, MTRClusterThermostatAttributeLocalTemperatureCalibrationID MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterThermostatAttributeLocalTemperatureCalibrationID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x00000010, @@ -3288,6 +3291,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterThermostatAttributeAbsMaxCoolSetpointLimitID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000006, MTRAttributeIDTypeClusterThermostatAttributePICoolingDemandID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000007, MTRAttributeIDTypeClusterThermostatAttributePIHeatingDemandID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000008, + MTRAttributeIDTypeClusterThermostatAttributeHVACSystemTypeConfigurationID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000009, MTRAttributeIDTypeClusterThermostatAttributeLocalTemperatureCalibrationID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000010, MTRAttributeIDTypeClusterThermostatAttributeOccupiedCoolingSetpointID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000011, MTRAttributeIDTypeClusterThermostatAttributeOccupiedHeatingSetpointID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000012, @@ -6403,10 +6407,8 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterThermostatCommandSetpointRaiseLowerID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, MTRCommandIDTypeClusterThermostatCommandGetWeeklyScheduleResponseID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, MTRCommandIDTypeClusterThermostatCommandSetWeeklyScheduleID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, - MTRCommandIDTypeClusterThermostatCommandGetRelayStatusLogResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, MTRCommandIDTypeClusterThermostatCommandGetWeeklyScheduleID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000002, MTRCommandIDTypeClusterThermostatCommandClearWeeklyScheduleID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000003, - MTRCommandIDTypeClusterThermostatCommandGetRelayStatusLogID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, // Cluster FanControl deprecated command id names diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 500dd3b7f8aac3..71ba182bfb07a8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -4034,9 +4034,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)clearWeeklyScheduleWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)getRelayStatusLogWithParams:(MTRThermostatClusterGetRelayStatusLogParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)getRelayStatusLogWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, NSError * _Nullable error))completion - MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeLocalTemperatureWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4056,6 +4053,10 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributePIHeatingDemandWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary * _Nullable)readAttributeHVACSystemTypeConfigurationWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); + - (NSDictionary * _Nullable)readAttributeLocalTemperatureCalibrationWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 45656d3a39bfff..f97fbea379ab13 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -11927,37 +11927,6 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa completion:responseHandler]; } -- (void)getRelayStatusLogWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self getRelayStatusLogWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; -} -- (void)getRelayStatusLogWithParams:(MTRThermostatClusterGetRelayStatusLogParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRThermostatClusterGetRelayStatusLogResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRThermostatClusterGetRelayStatusLogParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Thermostat::Commands::GetRelayStatusLog::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRThermostatClusterGetRelayStatusLogResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - - (NSDictionary * _Nullable)readAttributeLocalTemperatureWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeLocalTemperatureID) params:params]; @@ -12003,6 +11972,22 @@ - (void)getRelayStatusLogWithParams:(MTRThermostatClusterGetRelayStatusLogParams return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePIHeatingDemandID) params:params]; } +- (NSDictionary * _Nullable)readAttributeHVACSystemTypeConfigurationWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeHVACSystemTypeConfigurationID) params:params]; +} + +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeHVACSystemTypeConfigurationWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeHVACSystemTypeConfigurationID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + - (NSDictionary * _Nullable)readAttributeLocalTemperatureCalibrationWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeLocalTemperatureCalibrationID) params:params]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index b3163c6b658f72..034e7b3efbcabd 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -7297,7 +7297,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSNumber * _Nonnull numberOfTransitionsForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekforSequence MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @property (nonatomic, copy) NSNumber * _Nonnull modeForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -7337,7 +7337,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSNumber * _Nonnull numberOfTransitionsForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekforSequence MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeekForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @property (nonatomic, copy) NSNumber * _Nonnull modeForSequence MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -7368,35 +7368,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRThermostatClusterGetRelayStatusLogResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull timeOfDay MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSNumber * _Nonnull relayStatus MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSNumber * _Nullable localTemperature MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSNumber * _Nullable humidityInPercentage MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSNumber * _Nonnull setPoint MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSNumber * _Nonnull unreadEntries MTR_PROVISIONALLY_AVAILABLE; - -/** - * Initialize an MTRThermostatClusterGetRelayStatusLogResponseParams with a response-value dictionary - * of the sort that MTRDeviceResponseHandler would receive. - * - * Will return nil and hand out an error if the response-value dictionary is not - * a command data response or is not the right command response. - * - * Will return nil and hand out an error if the data response does not match the known - * schema for this command. - */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; -@end - MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRThermostatClusterGetWeeklyScheduleParams : NSObject @@ -7457,34 +7428,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRThermostatClusterGetRelayStatusLogParams : NSObject -/** - * Controls whether the command is a timed command (using Timed Invoke). - * - * If nil (the default value), a regular invoke is done for commands that do - * not require a timed invoke and a timed invoke with some default timed request - * timeout is done for commands that require a timed invoke. - * - * If not nil, a timed invoke is done, with the provided value used as the timed - * request timeout. The value should be chosen small enough to provide the - * desired security properties but large enough that it will allow a round-trip - * from the sever to the client (for the status response and actual invoke - * request) within the timeout window. - * - */ -@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; - -/** - * Controls how much time, in seconds, we will allow for the server to process the command. - * - * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. - * - * If nil, the framework will try to select an appropriate timeout value itself. - */ -@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; -@end - MTR_PROVISIONALLY_AVAILABLE @interface MTRFanControlClusterStepParams : NSObject diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index c9927a7d902ad8..e6e1c65c1dab9b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -20241,7 +20241,7 @@ - (instancetype)init _numberOfTransitionsForSequence = @(0); - _dayOfWeekforSequence = @(0); + _dayOfWeekForSequence = @(0); _modeForSequence = @(0); @@ -20256,7 +20256,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRThermostatClusterGetWeeklyScheduleResponseParams alloc] init]; other.numberOfTransitionsForSequence = self.numberOfTransitionsForSequence; - other.dayOfWeekforSequence = self.dayOfWeekforSequence; + other.dayOfWeekForSequence = self.dayOfWeekForSequence; other.modeForSequence = self.modeForSequence; other.transitions = self.transitions; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; @@ -20266,7 +20266,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: numberOfTransitionsForSequence:%@; dayOfWeekforSequence:%@; modeForSequence:%@; transitions:%@; >", NSStringFromClass([self class]), _numberOfTransitionsForSequence, _dayOfWeekforSequence, _modeForSequence, _transitions]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: numberOfTransitionsForSequence:%@; dayOfWeekForSequence:%@; modeForSequence:%@; transitions:%@; >", NSStringFromClass([self class]), _numberOfTransitionsForSequence, _dayOfWeekForSequence, _modeForSequence, _transitions]; return descriptionString; } @@ -20320,7 +20320,7 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Thermost self.numberOfTransitionsForSequence = [NSNumber numberWithUnsignedChar:decodableStruct.numberOfTransitionsForSequence]; } { - self.dayOfWeekforSequence = [NSNumber numberWithUnsignedChar:decodableStruct.dayOfWeekforSequence.Raw()]; + self.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:decodableStruct.dayOfWeekForSequence.Raw()]; } { self.modeForSequence = [NSNumber numberWithUnsignedChar:decodableStruct.modeForSequence.Raw()]; @@ -20334,8 +20334,16 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Thermost MTRThermostatClusterWeeklyScheduleTransitionStruct * newElement_0; newElement_0 = [MTRThermostatClusterWeeklyScheduleTransitionStruct new]; newElement_0.transitionTime = [NSNumber numberWithUnsignedShort:entry_0.transitionTime]; - newElement_0.heatSetpoint = [NSNumber numberWithShort:entry_0.heatSetpoint]; - newElement_0.coolSetpoint = [NSNumber numberWithShort:entry_0.coolSetpoint]; + if (entry_0.heatSetpoint.IsNull()) { + newElement_0.heatSetpoint = nil; + } else { + newElement_0.heatSetpoint = [NSNumber numberWithShort:entry_0.heatSetpoint.Value()]; + } + if (entry_0.coolSetpoint.IsNull()) { + newElement_0.coolSetpoint = nil; + } else { + newElement_0.coolSetpoint = [NSNumber numberWithShort:entry_0.coolSetpoint.Value()]; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -20357,7 +20365,7 @@ - (instancetype)init _numberOfTransitionsForSequence = @(0); - _dayOfWeekforSequence = @(0); + _dayOfWeekForSequence = @(0); _modeForSequence = @(0); @@ -20373,7 +20381,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRThermostatClusterSetWeeklyScheduleParams alloc] init]; other.numberOfTransitionsForSequence = self.numberOfTransitionsForSequence; - other.dayOfWeekforSequence = self.dayOfWeekforSequence; + other.dayOfWeekForSequence = self.dayOfWeekForSequence; other.modeForSequence = self.modeForSequence; other.transitions = self.transitions; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; @@ -20384,7 +20392,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: numberOfTransitionsForSequence:%@; dayOfWeekforSequence:%@; modeForSequence:%@; transitions:%@; >", NSStringFromClass([self class]), _numberOfTransitionsForSequence, _dayOfWeekforSequence, _modeForSequence, _transitions]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: numberOfTransitionsForSequence:%@; dayOfWeekForSequence:%@; modeForSequence:%@; transitions:%@; >", NSStringFromClass([self class]), _numberOfTransitionsForSequence, _dayOfWeekForSequence, _modeForSequence, _transitions]; return descriptionString; } @@ -20400,7 +20408,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader encodableStruct.numberOfTransitionsForSequence = self.numberOfTransitionsForSequence.unsignedCharValue; } { - encodableStruct.dayOfWeekforSequence = static_cast>(self.dayOfWeekforSequence.unsignedCharValue); + encodableStruct.dayOfWeekForSequence = static_cast>(self.dayOfWeekForSequence.unsignedCharValue); } { encodableStruct.modeForSequence = static_cast>(self.modeForSequence.unsignedCharValue); @@ -20422,8 +20430,18 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } auto element_0 = (MTRThermostatClusterWeeklyScheduleTransitionStruct *) self.transitions[i_0]; listHolder_0->mList[i_0].transitionTime = element_0.transitionTime.unsignedShortValue; - listHolder_0->mList[i_0].heatSetpoint = element_0.heatSetpoint.shortValue; - listHolder_0->mList[i_0].coolSetpoint = element_0.coolSetpoint.shortValue; + if (element_0.heatSetpoint == nil) { + listHolder_0->mList[i_0].heatSetpoint.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].heatSetpoint.SetNonNull(); + nonNullValue_2 = element_0.heatSetpoint.shortValue; + } + if (element_0.coolSetpoint == nil) { + listHolder_0->mList[i_0].coolSetpoint.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].coolSetpoint.SetNonNull(); + nonNullValue_2 = element_0.coolSetpoint.shortValue; + } } encodableStruct.transitions = ListType_0(listHolder_0->mList, self.transitions.count); } else { @@ -20470,123 +20488,6 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRThermostatClusterGetRelayStatusLogResponseParams -- (instancetype)init -{ - if (self = [super init]) { - - _timeOfDay = @(0); - - _relayStatus = @(0); - - _localTemperature = nil; - - _humidityInPercentage = nil; - - _setPoint = @(0); - - _unreadEntries = @(0); - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRThermostatClusterGetRelayStatusLogResponseParams alloc] init]; - - other.timeOfDay = self.timeOfDay; - other.relayStatus = self.relayStatus; - other.localTemperature = self.localTemperature; - other.humidityInPercentage = self.humidityInPercentage; - other.setPoint = self.setPoint; - other.unreadEntries = self.unreadEntries; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: timeOfDay:%@; relayStatus:%@; localTemperature:%@; humidityInPercentage:%@; setPoint:%@; unreadEntries:%@; >", NSStringFromClass([self class]), _timeOfDay, _relayStatus, _localTemperature, _humidityInPercentage, _setPoint, _unreadEntries]; - return descriptionString; -} - -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error -{ - if (!(self = [super init])) { - return nil; - } - - using DecodableType = chip::app::Clusters::Thermostat::Commands::GetRelayStatusLogResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; - if (buffer.IsNull()) { - return nil; - } - - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); - - CHIP_ERROR err = reader.Next(chip::TLV::AnonymousTag()); - if (err == CHIP_NO_ERROR) { - DecodableType decodedStruct; - err = chip::app::DataModel::Decode(reader, decodedStruct); - if (err == CHIP_NO_ERROR) { - err = [self _setFieldsFromDecodableStruct:decodedStruct]; - if (err == CHIP_NO_ERROR) { - return self; - } - } - } - - NSString * errorStr = [NSString stringWithFormat:@"Command payload decoding failed: %s", err.AsString()]; - MTR_LOG_ERROR("%s", errorStr.UTF8String); - if (error != nil) { - NSDictionary * userInfo = @{ NSLocalizedFailureReasonErrorKey : NSLocalizedString(errorStr, nil) }; - *error = [NSError errorWithDomain:MTRErrorDomain code:MTRErrorCodeSchemaMismatch userInfo:userInfo]; - } - return nil; -} - -@end - -@implementation MTRThermostatClusterGetRelayStatusLogResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Thermostat::Commands::GetRelayStatusLogResponse::DecodableType &)decodableStruct -{ - { - self.timeOfDay = [NSNumber numberWithUnsignedShort:decodableStruct.timeOfDay]; - } - { - self.relayStatus = [NSNumber numberWithUnsignedShort:decodableStruct.relayStatus.Raw()]; - } - { - if (decodableStruct.localTemperature.IsNull()) { - self.localTemperature = nil; - } else { - self.localTemperature = [NSNumber numberWithShort:decodableStruct.localTemperature.Value()]; - } - } - { - if (decodableStruct.humidityInPercentage.IsNull()) { - self.humidityInPercentage = nil; - } else { - self.humidityInPercentage = [NSNumber numberWithUnsignedChar:decodableStruct.humidityInPercentage.Value()]; - } - } - { - self.setPoint = [NSNumber numberWithShort:decodableStruct.setPoint]; - } - { - self.unreadEntries = [NSNumber numberWithUnsignedShort:decodableStruct.unreadEntries]; - } - return CHIP_NO_ERROR; -} - -@end - @implementation MTRThermostatClusterGetWeeklyScheduleParams - (instancetype)init { @@ -20745,79 +20646,6 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRThermostatClusterGetRelayStatusLogParams -- (instancetype)init -{ - if (self = [super init]) { - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRThermostatClusterGetRelayStatusLogParams alloc] init]; - - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; - return descriptionString; -} - -@end - -@implementation MTRThermostatClusterGetRelayStatusLogParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader -{ - chip::app::Clusters::Thermostat::Commands::GetRelayStatusLog::Type encodableStruct; - ListFreer listFreer; - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; - } - - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); - - ReturnErrorOnFailure(writer.Finalize(&buffer)); - - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); -} - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error -{ - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; - } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } - } - return decodedObj; -} -@end - @implementation MTRFanControlClusterStepParams - (instancetype)init { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index 13f8e371e641b1..f29c330020957b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h @@ -1318,12 +1318,6 @@ NS_ASSUME_NONNULL_BEGIN @end -@interface MTRThermostatClusterGetRelayStatusLogResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Thermostat::Commands::GetRelayStatusLogResponse::DecodableType &)decodableStruct; - -@end - @interface MTRThermostatClusterGetWeeklyScheduleParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; @@ -1336,12 +1330,6 @@ NS_ASSUME_NONNULL_BEGIN @end -@interface MTRThermostatClusterGetRelayStatusLogParams (InternalMethods) - -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; - -@end - @interface MTRFanControlClusterStepParams (InternalMethods) - (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 7481ef14c27d03..567112e1c5b3b2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -1320,8 +1320,8 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) MTR_NEWLY_AVAILABLE @interface MTRThermostatClusterWeeklyScheduleTransitionStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull heatSetpoint MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull coolSetpoint 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)) @@ -1329,9 +1329,9 @@ MTR_NEWLY_DEPRECATED("Please use MTRThermostatClusterWeeklyScheduleTransitionStr @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 * _Nonnull heatSetpoint 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)) MTR_NEWLY_DEPRECATED("Please use MTRThermostatClusterWeeklyScheduleTransitionStruct"); -@property (nonatomic, copy) NSNumber * _Nonnull coolSetpoint 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"); @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index a12a0a79c2c0df..a29dc4b04b227f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -5490,9 +5490,9 @@ - (instancetype)init _transitionTime = @(0); - _heatSetpoint = @(0); + _heatSetpoint = nil; - _coolSetpoint = @(0); + _coolSetpoint = nil; } return self; } 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 08f29bf125cd52..5fa465299e24e0 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 @@ -15496,6 +15496,37 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) } // namespace PIHeatingDemand +namespace HVACSystemTypeConfiguration { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + *value = Traits::StorageToWorking(temp); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); +} + +} // namespace HVACSystemTypeConfiguration + namespace LocalTemperatureCalibration { EmberAfStatus Get(chip::EndpointId endpoint, int8_t * value) @@ -15553,7 +15584,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_TEMPERATURE_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } } // namespace OccupiedCoolingSetpoint @@ -15584,7 +15615,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_TEMPERATURE_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } } // namespace OccupiedHeatingSetpoint @@ -15615,7 +15646,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_TEMPERATURE_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } } // namespace UnoccupiedCoolingSetpoint @@ -15646,7 +15677,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_TEMPERATURE_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } } // namespace UnoccupiedHeatingSetpoint 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 1b5713f09cbe0e..ddb09e6ce08b06 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 @@ -2813,28 +2813,33 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace PIHeatingDemand +namespace HVACSystemTypeConfiguration { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace HVACSystemTypeConfiguration + namespace LocalTemperatureCalibration { EmberAfStatus Get(chip::EndpointId endpoint, int8_t * value); // int8s EmberAfStatus Set(chip::EndpointId endpoint, int8_t value); } // namespace LocalTemperatureCalibration namespace OccupiedCoolingSetpoint { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace OccupiedCoolingSetpoint namespace OccupiedHeatingSetpoint { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace OccupiedHeatingSetpoint namespace UnoccupiedCoolingSetpoint { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace UnoccupiedCoolingSetpoint namespace UnoccupiedHeatingSetpoint { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace UnoccupiedHeatingSetpoint diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index 633e5a86151ed9..94c0e7c6e495e3 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -10229,12 +10229,6 @@ bool emberAfThermostatClusterGetWeeklyScheduleCallback( bool emberAfThermostatClusterClearWeeklyScheduleCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::DecodableType & commandData); -/** - * @brief Thermostat Cluster GetRelayStatusLog Command callback (from client) - */ -bool emberAfThermostatClusterGetRelayStatusLogCallback( - chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, - const chip::app::Clusters::Thermostat::Commands::GetRelayStatusLog::DecodableType & commandData); /** * @brief Fan Control Cluster Step Command callback (from client) */ 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 a66c14674a443a..26f03394aa98fb 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 @@ -3290,24 +3290,16 @@ enum class ACErrorCodeBitmap : uint32_t kFanFail = 0x10, }; -// Bitmap for AlarmCodeBitmap -enum class AlarmCodeBitmap : uint8_t -{ - kInitialization = 0x1, - kHardware = 0x2, - kSelfCalibration = 0x4, -}; - // Bitmap for Feature enum class Feature : uint32_t { - kHeating = 0x1, - kCooling = 0x2, - kOccupancy = 0x4, - kZigbeeScheduleConfiguration = 0x8, - kSetback = 0x10, - kAutoMode = 0x20, - kLocalTemperatureNotExposed = 0x40, + kHeating = 0x1, + kCooling = 0x2, + kOccupancy = 0x4, + kScheduleConfiguration = 0x8, + kSetback = 0x10, + kAutoMode = 0x20, + kLocalTemperatureNotExposed = 0x40, }; // Bitmap for HVACSystemTypeBitmap 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 1a1746cf8485fc..9bf92c2309b560 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 @@ -17785,7 +17785,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; encoder.Encode(to_underlying(Fields::kNumberOfTransitionsForSequence), numberOfTransitionsForSequence); - encoder.Encode(to_underlying(Fields::kDayOfWeekforSequence), dayOfWeekforSequence); + encoder.Encode(to_underlying(Fields::kDayOfWeekForSequence), dayOfWeekForSequence); encoder.Encode(to_underlying(Fields::kModeForSequence), modeForSequence); encoder.Encode(to_underlying(Fields::kTransitions), transitions); return encoder.Finalize(); @@ -17809,9 +17809,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, numberOfTransitionsForSequence); } - else if (__context_tag == to_underlying(Fields::kDayOfWeekforSequence)) + else if (__context_tag == to_underlying(Fields::kDayOfWeekForSequence)) { - err = DataModel::Decode(reader, dayOfWeekforSequence); + err = DataModel::Decode(reader, dayOfWeekForSequence); } else if (__context_tag == to_underlying(Fields::kModeForSequence)) { @@ -17834,7 +17834,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; encoder.Encode(to_underlying(Fields::kNumberOfTransitionsForSequence), numberOfTransitionsForSequence); - encoder.Encode(to_underlying(Fields::kDayOfWeekforSequence), dayOfWeekforSequence); + encoder.Encode(to_underlying(Fields::kDayOfWeekForSequence), dayOfWeekForSequence); encoder.Encode(to_underlying(Fields::kModeForSequence), modeForSequence); encoder.Encode(to_underlying(Fields::kTransitions), transitions); return encoder.Finalize(); @@ -17858,9 +17858,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, numberOfTransitionsForSequence); } - else if (__context_tag == to_underlying(Fields::kDayOfWeekforSequence)) + else if (__context_tag == to_underlying(Fields::kDayOfWeekForSequence)) { - err = DataModel::Decode(reader, dayOfWeekforSequence); + err = DataModel::Decode(reader, dayOfWeekForSequence); } else if (__context_tag == to_underlying(Fields::kModeForSequence)) { @@ -17878,65 +17878,6 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } // namespace SetWeeklySchedule. -namespace GetRelayStatusLogResponse { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kTimeOfDay), timeOfDay); - encoder.Encode(to_underlying(Fields::kRelayStatus), relayStatus); - encoder.Encode(to_underlying(Fields::kLocalTemperature), localTemperature); - encoder.Encode(to_underlying(Fields::kHumidityInPercentage), humidityInPercentage); - encoder.Encode(to_underlying(Fields::kSetPoint), setPoint); - encoder.Encode(to_underlying(Fields::kUnreadEntries), unreadEntries); - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kTimeOfDay)) - { - err = DataModel::Decode(reader, timeOfDay); - } - else if (__context_tag == to_underlying(Fields::kRelayStatus)) - { - err = DataModel::Decode(reader, relayStatus); - } - else if (__context_tag == to_underlying(Fields::kLocalTemperature)) - { - err = DataModel::Decode(reader, localTemperature); - } - else if (__context_tag == to_underlying(Fields::kHumidityInPercentage)) - { - err = DataModel::Decode(reader, humidityInPercentage); - } - else if (__context_tag == to_underlying(Fields::kSetPoint)) - { - err = DataModel::Decode(reader, setPoint); - } - else if (__context_tag == to_underlying(Fields::kUnreadEntries)) - { - err = DataModel::Decode(reader, unreadEntries); - } - else - { - } - - ReturnErrorOnFailure(err); - } -} -} // namespace GetRelayStatusLogResponse. namespace GetWeeklySchedule { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { @@ -17996,26 +17937,6 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } // namespace ClearWeeklySchedule. -namespace GetRelayStatusLog { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - return encoder.Finalize(); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - } -} -} // namespace GetRelayStatusLog. } // namespace Commands namespace Attributes { @@ -18041,6 +17962,8 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return DataModel::Decode(reader, PICoolingDemand); case Attributes::PIHeatingDemand::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, PIHeatingDemand); + case Attributes::HVACSystemTypeConfiguration::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, HVACSystemTypeConfiguration); case Attributes::LocalTemperatureCalibration::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, localTemperatureCalibration); case Attributes::OccupiedCoolingSetpoint::TypeInfo::GetAttributeId(): 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 d7527a2e3ab0e8..32f671bc079595 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 @@ -25331,8 +25331,8 @@ struct Type { public: uint16_t transitionTime = static_cast(0); - int16_t heatSetpoint = static_cast(0); - int16_t coolSetpoint = static_cast(0); + DataModel::Nullable heatSetpoint; + DataModel::Nullable coolSetpoint; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -25364,11 +25364,6 @@ struct Type; struct DecodableType; } // namespace SetWeeklySchedule -namespace GetRelayStatusLogResponse { -struct Type; -struct DecodableType; -} // namespace GetRelayStatusLogResponse - namespace GetWeeklySchedule { struct Type; struct DecodableType; @@ -25379,11 +25374,6 @@ struct Type; struct DecodableType; } // namespace ClearWeeklySchedule -namespace GetRelayStatusLog { -struct Type; -struct DecodableType; -} // namespace GetRelayStatusLog - } // namespace Commands namespace Commands { @@ -25426,7 +25416,7 @@ namespace GetWeeklyScheduleResponse { enum class Fields : uint8_t { kNumberOfTransitionsForSequence = 0, - kDayOfWeekforSequence = 1, + kDayOfWeekForSequence = 1, kModeForSequence = 2, kTransitions = 3, }; @@ -25439,7 +25429,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitMask dayOfWeekforSequence = static_cast>(0); + chip::BitMask dayOfWeekForSequence = static_cast>(0); chip::BitMask modeForSequence = static_cast>(0); DataModel::List transitions; @@ -25457,7 +25447,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitMask dayOfWeekforSequence = static_cast>(0); + chip::BitMask dayOfWeekForSequence = static_cast>(0); chip::BitMask modeForSequence = static_cast>(0); DataModel::DecodableList transitions; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -25467,7 +25457,7 @@ namespace SetWeeklySchedule { enum class Fields : uint8_t { kNumberOfTransitionsForSequence = 0, - kDayOfWeekforSequence = 1, + kDayOfWeekForSequence = 1, kModeForSequence = 2, kTransitions = 3, }; @@ -25480,7 +25470,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitMask dayOfWeekforSequence = static_cast>(0); + chip::BitMask dayOfWeekForSequence = static_cast>(0); chip::BitMask modeForSequence = static_cast>(0); DataModel::List transitions; @@ -25498,59 +25488,12 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitMask dayOfWeekforSequence = 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 -namespace GetRelayStatusLogResponse { -enum class Fields : uint8_t -{ - kTimeOfDay = 0, - kRelayStatus = 1, - kLocalTemperature = 2, - kHumidityInPercentage = 3, - kSetPoint = 4, - kUnreadEntries = 5, -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetRelayStatusLogResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - - uint16_t timeOfDay = static_cast(0); - chip::BitMask relayStatus = static_cast>(0); - DataModel::Nullable localTemperature; - DataModel::Nullable humidityInPercentage; - int16_t setPoint = static_cast(0); - uint16_t unreadEntries = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return false; } -}; - -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::GetRelayStatusLogResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - - uint16_t timeOfDay = static_cast(0); - chip::BitMask relayStatus = static_cast>(0); - DataModel::Nullable localTemperature; - DataModel::Nullable humidityInPercentage; - int16_t setPoint = static_cast(0); - uint16_t unreadEntries = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace GetRelayStatusLogResponse namespace GetWeeklySchedule { enum class Fields : uint8_t { @@ -25614,34 +25557,6 @@ struct DecodableType CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ClearWeeklySchedule -namespace GetRelayStatusLog { -enum class Fields : uint8_t -{ -}; - -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetRelayStatusLog::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::Thermostat::Commands::GetRelayStatusLogResponse::DecodableType; - - static constexpr bool MustUseTimedInvoke() { return false; } -}; - -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::GetRelayStatusLog::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace GetRelayStatusLog } // namespace Commands namespace Attributes { @@ -25754,6 +25669,18 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace PIHeatingDemand +namespace HVACSystemTypeConfiguration { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::HVACSystemTypeConfiguration::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace HVACSystemTypeConfiguration namespace LocalTemperatureCalibration { struct TypeInfo { @@ -26276,6 +26203,7 @@ struct TypeInfo Attributes::AbsMaxCoolSetpointLimit::TypeInfo::DecodableType absMaxCoolSetpointLimit = static_cast(0); Attributes::PICoolingDemand::TypeInfo::DecodableType PICoolingDemand = static_cast(0); Attributes::PIHeatingDemand::TypeInfo::DecodableType PIHeatingDemand = static_cast(0); + Attributes::HVACSystemTypeConfiguration::TypeInfo::DecodableType HVACSystemTypeConfiguration = static_cast(0); Attributes::LocalTemperatureCalibration::TypeInfo::DecodableType localTemperatureCalibration = static_cast(0); Attributes::OccupiedCoolingSetpoint::TypeInfo::DecodableType occupiedCoolingSetpoint = static_cast(0); Attributes::OccupiedHeatingSetpoint::TypeInfo::DecodableType occupiedHeatingSetpoint = static_cast(0); diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index b17d725d21a493..87714609e2a5b5 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -4344,6 +4344,10 @@ namespace PIHeatingDemand { static constexpr AttributeId Id = 0x00000008; } // namespace PIHeatingDemand +namespace HVACSystemTypeConfiguration { +static constexpr AttributeId Id = 0x00000009; +} // namespace HVACSystemTypeConfiguration + namespace LocalTemperatureCalibration { static constexpr AttributeId Id = 0x00000010; } // namespace LocalTemperatureCalibration diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h index b594ec057f9345..963edaddc0cbea 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Commands.h @@ -1174,10 +1174,6 @@ namespace SetWeeklySchedule { static constexpr CommandId Id = 0x00000001; } // namespace SetWeeklySchedule -namespace GetRelayStatusLogResponse { -static constexpr CommandId Id = 0x00000001; -} // namespace GetRelayStatusLogResponse - namespace GetWeeklySchedule { static constexpr CommandId Id = 0x00000002; } // namespace GetWeeklySchedule @@ -1186,10 +1182,6 @@ namespace ClearWeeklySchedule { static constexpr CommandId Id = 0x00000003; } // namespace ClearWeeklySchedule -namespace GetRelayStatusLog { -static constexpr CommandId Id = 0x00000004; -} // namespace GetRelayStatusLog - } // namespace Commands } // namespace Thermostat diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 6943afae67bb26..f86bebe0f22ee6 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -8421,7 +8421,6 @@ class BarrierControlBarrierControlStop : public ClusterCommand | * SetWeeklySchedule | 0x01 | | * GetWeeklySchedule | 0x02 | | * ClearWeeklySchedule | 0x03 | -| * GetRelayStatusLog | 0x04 | |------------------------------------------------------------------------------| | Attributes: | | | * LocalTemperature | 0x0000 | @@ -8433,6 +8432,7 @@ class BarrierControlBarrierControlStop : public ClusterCommand | * AbsMaxCoolSetpointLimit | 0x0006 | | * PICoolingDemand | 0x0007 | | * PIHeatingDemand | 0x0008 | +| * HVACSystemTypeConfiguration | 0x0009 | | * LocalTemperatureCalibration | 0x0010 | | * OccupiedCoolingSetpoint | 0x0011 | | * OccupiedHeatingSetpoint | 0x0012 | @@ -8531,7 +8531,7 @@ class ThermostatSetWeeklySchedule : public ClusterCommand ClusterCommand("set-weekly-schedule", credsIssuerConfig), mComplex_Transitions(&mRequest.transitions) { AddArgument("NumberOfTransitionsForSequence", 0, UINT8_MAX, &mRequest.numberOfTransitionsForSequence); - AddArgument("DayOfWeekforSequence", 0, UINT8_MAX, &mRequest.dayOfWeekforSequence); + AddArgument("DayOfWeekForSequence", 0, UINT8_MAX, &mRequest.dayOfWeekForSequence); AddArgument("ModeForSequence", 0, UINT8_MAX, &mRequest.modeForSequence); AddArgument("Transitions", &mComplex_Transitions); ClusterCommand::AddArguments(); @@ -8641,43 +8641,6 @@ class ThermostatClearWeeklySchedule : public ClusterCommand chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Type mRequest; }; -/* - * Command GetRelayStatusLog - */ -class ThermostatGetRelayStatusLog : public ClusterCommand -{ -public: - ThermostatGetRelayStatusLog(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-relay-status-log", credsIssuerConfig) - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::GetRelayStatusLog::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, - commandId, endpointIds.at(0)); - return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); - } - - CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::GetRelayStatusLog::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, - groupId); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); - } - -private: - chip::app::Clusters::Thermostat::Commands::GetRelayStatusLog::Type mRequest; -}; - /*----------------------------------------------------------------------------*\ | Cluster FanControl | 0x0202 | |------------------------------------------------------------------------------| @@ -20107,7 +20070,6 @@ void registerClusterThermostat(Commands & commands, CredentialIssuerCommands * c make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // // // Attributes // @@ -20125,6 +20087,8 @@ void registerClusterThermostat(Commands & commands, CredentialIssuerCommands * c credsIssuerConfig), // make_unique(Id, "picooling-demand", Attributes::PICoolingDemand::Id, credsIssuerConfig), // make_unique(Id, "piheating-demand", Attributes::PIHeatingDemand::Id, credsIssuerConfig), // + make_unique(Id, "hvacsystem-type-configuration", Attributes::HVACSystemTypeConfiguration::Id, + credsIssuerConfig), // make_unique(Id, "local-temperature-calibration", Attributes::LocalTemperatureCalibration::Id, credsIssuerConfig), // make_unique(Id, "occupied-cooling-setpoint", Attributes::OccupiedCoolingSetpoint::Id, credsIssuerConfig), // @@ -20204,6 +20168,9 @@ void registerClusterThermostat(Commands & commands, CredentialIssuerCommands * c WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "piheating-demand", 0, UINT8_MAX, Attributes::PIHeatingDemand::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "hvacsystem-type-configuration", 0, UINT8_MAX, + Attributes::HVACSystemTypeConfiguration::Id, WriteCommandType::kWrite, + credsIssuerConfig), // make_unique>(Id, "local-temperature-calibration", INT8_MIN, INT8_MAX, Attributes::LocalTemperatureCalibration::Id, WriteCommandType::kWrite, credsIssuerConfig), // @@ -20334,6 +20301,8 @@ void registerClusterThermostat(Commands & commands, CredentialIssuerCommands * c credsIssuerConfig), // make_unique(Id, "picooling-demand", Attributes::PICoolingDemand::Id, credsIssuerConfig), // make_unique(Id, "piheating-demand", Attributes::PIHeatingDemand::Id, credsIssuerConfig), // + make_unique(Id, "hvacsystem-type-configuration", Attributes::HVACSystemTypeConfiguration::Id, + credsIssuerConfig), // make_unique(Id, "local-temperature-calibration", Attributes::LocalTemperatureCalibration::Id, credsIssuerConfig), // make_unique(Id, "occupied-cooling-setpoint", Attributes::OccupiedCoolingSetpoint::Id, 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 490d76b14a6b4b..2a90f32be77fea 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -6308,25 +6308,12 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, DataModelLogger::LogString(label, indent, "{"); ReturnErrorOnFailure( DataModelLogger::LogValue("numberOfTransitionsForSequence", indent + 1, value.numberOfTransitionsForSequence)); - ReturnErrorOnFailure(DataModelLogger::LogValue("dayOfWeekforSequence", indent + 1, value.dayOfWeekforSequence)); + ReturnErrorOnFailure(DataModelLogger::LogValue("dayOfWeekForSequence", indent + 1, value.dayOfWeekForSequence)); ReturnErrorOnFailure(DataModelLogger::LogValue("modeForSequence", indent + 1, value.modeForSequence)); ReturnErrorOnFailure(DataModelLogger::LogValue("transitions", indent + 1, value.transitions)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const Thermostat::Commands::GetRelayStatusLogResponse::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - ReturnErrorOnFailure(DataModelLogger::LogValue("timeOfDay", indent + 1, value.timeOfDay)); - ReturnErrorOnFailure(DataModelLogger::LogValue("relayStatus", indent + 1, value.relayStatus)); - ReturnErrorOnFailure(DataModelLogger::LogValue("localTemperature", indent + 1, value.localTemperature)); - ReturnErrorOnFailure(DataModelLogger::LogValue("humidityInPercentage", indent + 1, value.humidityInPercentage)); - ReturnErrorOnFailure(DataModelLogger::LogValue("setPoint", indent + 1, value.setPoint)); - ReturnErrorOnFailure(DataModelLogger::LogValue("unreadEntries", indent + 1, value.unreadEntries)); - DataModelLogger::LogString(indent, "}"); - return CHIP_NO_ERROR; -} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const Channel::Commands::ChangeChannelResponse::DecodableType & value) { @@ -11899,6 +11886,11 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("PIHeatingDemand", 1, value); } + case Thermostat::Attributes::HVACSystemTypeConfiguration::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("HVACSystemTypeConfiguration", 1, value); + } case Thermostat::Attributes::LocalTemperatureCalibration::Id: { int8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); @@ -16316,11 +16308,6 @@ CHIP_ERROR DataModelLogger::LogCommand(const chip::app::ConcreteCommandPath & pa ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("GetWeeklyScheduleResponse", 1, value); } - case Thermostat::Commands::GetRelayStatusLogResponse::Id: { - Thermostat::Commands::GetRelayStatusLogResponse::DecodableType value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("GetRelayStatusLogResponse", 1, value); - } } break; } 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 ab5116c87fa789..f9731afe5d07b0 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -635,8 +635,6 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType & value); -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::Thermostat::Commands::GetRelayStatusLogResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Channel::Commands::ChangeChannelResponse::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, 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 7f6226d20bd3e1..a6351e83dad987 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -93245,7 +93245,6 @@ class SubscribeAttributePumpConfigurationAndControlClusterRevision : public Subs | * SetWeeklySchedule | 0x01 | | * GetWeeklySchedule | 0x02 | | * ClearWeeklySchedule | 0x03 | -| * GetRelayStatusLog | 0x04 | |------------------------------------------------------------------------------| | Attributes: | | | * LocalTemperature | 0x0000 | @@ -93257,6 +93256,7 @@ class SubscribeAttributePumpConfigurationAndControlClusterRevision : public Subs | * AbsMaxCoolSetpointLimit | 0x0006 | | * PICoolingDemand | 0x0007 | | * PIHeatingDemand | 0x0008 | +| * HVACSystemTypeConfiguration | 0x0009 | | * LocalTemperatureCalibration | 0x0010 | | * OccupiedCoolingSetpoint | 0x0011 | | * OccupiedHeatingSetpoint | 0x0012 | @@ -93365,9 +93365,7 @@ class ThermostatSetWeeklySchedule : public ClusterCommand { , mComplex_Transitions(&mRequest.transitions) { AddArgument("NumberOfTransitionsForSequence", 0, UINT8_MAX, &mRequest.numberOfTransitionsForSequence); -#if MTR_ENABLE_PROVISIONAL - AddArgument("DayOfWeekforSequence", 0, UINT8_MAX, &mRequest.dayOfWeekforSequence); -#endif // MTR_ENABLE_PROVISIONAL + AddArgument("DayOfWeekForSequence", 0, UINT8_MAX, &mRequest.dayOfWeekForSequence); AddArgument("ModeForSequence", 0, UINT8_MAX, &mRequest.modeForSequence); AddArgument("Transitions", &mComplex_Transitions); ClusterCommand::AddArguments(); @@ -93385,9 +93383,7 @@ class ThermostatSetWeeklySchedule : public ClusterCommand { __auto_type * params = [[MTRThermostatClusterSetWeeklyScheduleParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.numberOfTransitionsForSequence = [NSNumber numberWithUnsignedChar:mRequest.numberOfTransitionsForSequence]; -#if MTR_ENABLE_PROVISIONAL - params.dayOfWeekforSequence = [NSNumber numberWithUnsignedChar:mRequest.dayOfWeekforSequence.Raw()]; -#endif // MTR_ENABLE_PROVISIONAL + params.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:mRequest.dayOfWeekForSequence.Raw()]; params.modeForSequence = [NSNumber numberWithUnsignedChar:mRequest.modeForSequence.Raw()]; { // Scope for our temporary variables auto * array_0 = [NSMutableArray new]; @@ -93395,8 +93391,16 @@ class ThermostatSetWeeklySchedule : public ClusterCommand { MTRThermostatClusterWeeklyScheduleTransitionStruct * newElement_0; newElement_0 = [MTRThermostatClusterWeeklyScheduleTransitionStruct new]; newElement_0.transitionTime = [NSNumber numberWithUnsignedShort:entry_0.transitionTime]; - newElement_0.heatSetpoint = [NSNumber numberWithShort:entry_0.heatSetpoint]; - newElement_0.coolSetpoint = [NSNumber numberWithShort:entry_0.coolSetpoint]; + if (entry_0.heatSetpoint.IsNull()) { + newElement_0.heatSetpoint = nil; + } else { + newElement_0.heatSetpoint = [NSNumber numberWithShort:entry_0.heatSetpoint.Value()]; + } + if (entry_0.coolSetpoint.IsNull()) { + newElement_0.coolSetpoint = nil; + } else { + newElement_0.coolSetpoint = [NSNumber numberWithShort:entry_0.coolSetpoint.Value()]; + } [array_0 addObject:newElement_0]; } params.transitions = array_0; @@ -93524,59 +93528,6 @@ class ThermostatClearWeeklySchedule : public ClusterCommand { private: }; -#if MTR_ENABLE_PROVISIONAL -/* - * Command GetRelayStatusLog - */ -class ThermostatGetRelayStatusLog : public ClusterCommand { -public: - ThermostatGetRelayStatusLog() - : ClusterCommand("get-relay-status-log") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::GetRelayStatusLog::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterGetRelayStatusLogParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getRelayStatusLogWithParams:params completion: - ^(MTRThermostatClusterGetRelayStatusLogResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::Thermostat::Commands::GetRelayStatusLogResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::Thermostat::Commands::GetRelayStatusLogResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL - /* * Attribute LocalTemperature */ @@ -94315,6 +94266,129 @@ class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { } }; +/* + * Attribute HVACSystemTypeConfiguration + */ +class ReadThermostatHVACSystemTypeConfiguration : public ReadAttribute { +public: + ReadThermostatHVACSystemTypeConfiguration() + : ReadAttribute("hvacsystem-type-configuration") + { + } + + ~ReadThermostatHVACSystemTypeConfiguration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeHVACSystemTypeConfigurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Thermostat HVACSystemTypeConfiguration read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatHVACSystemTypeConfiguration : public WriteAttribute { +public: + WriteThermostatHVACSystemTypeConfiguration() + : WriteAttribute("hvacsystem-type-configuration") + { + AddArgument("attr-name", "hvacsystem-type-configuration"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatHVACSystemTypeConfiguration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeHVACSystemTypeConfigurationWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat HVACSystemTypeConfiguration write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public SubscribeAttribute { +public: + SubscribeAttributeThermostatHVACSystemTypeConfiguration() + : SubscribeAttribute("hvacsystem-type-configuration") + { + } + + ~SubscribeAttributeThermostatHVACSystemTypeConfiguration() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeHVACSystemTypeConfigurationWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute LocalTemperatureCalibration */ @@ -174485,9 +174559,6 @@ void registerClusterThermostat(Commands & commands) make_unique(), // make_unique(), // make_unique(), // -#if MTR_ENABLE_PROVISIONAL - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(Id), // make_unique(Id), // make_unique(Id), // @@ -174509,6 +174580,9 @@ void registerClusterThermostat(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // From ebbf1b8150bd32f8a38dcf3525f292afe40e4576 Mon Sep 17 00:00:00 2001 From: David Rempel Date: Mon, 4 Dec 2023 10:49:21 -0800 Subject: [PATCH 10/14] restored the min/max's for the writable attributes --- .../app-templates/endpoint_config.h | 76 ++++++++++--------- .../data-model/chip/thermostat-cluster.xml | 10 +-- 2 files changed, 45 insertions(+), 41 deletions(-) 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 cccbbf2c359a57..f126d5452502cd 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 @@ -269,7 +269,7 @@ #define GENERATED_DEFAULTS_COUNT (32) // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 42 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 46 #define GENERATED_MIN_MAX_DEFAULTS \ { \ \ @@ -307,6 +307,10 @@ /* Endpoint: 1, Cluster: Thermostat (server) */ \ { (uint16_t) 0xA28, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* OccupiedCoolingSetpoint */ \ { (uint16_t) 0x7D0, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* OccupiedHeatingSetpoint */ \ + { (uint16_t) 0x2BC, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MinHeatSetpointLimit */ \ + { (uint16_t) 0xBB8, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MaxHeatSetpointLimit */ \ + { (uint16_t) 0x640, (uint16_t) -0x6AB3, (uint16_t) 0x7FFF }, /* MinCoolSetpointLimit */ \ + { (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) 0x9 }, /* SystemMode */ \ @@ -1013,32 +1017,32 @@ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OccupiedCoolingSetpoint */ \ { ZAP_MIN_MAX_DEFAULTS_INDEX(14), 0x00000012, 2, ZAP_TYPE(INT16S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OccupiedHeatingSetpoint */ \ - { ZAP_SIMPLE_DEFAULT(0x02BC), 0x00000015, 2, ZAP_TYPE(TEMPERATURE), \ - ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MinHeatSetpointLimit */ \ - { ZAP_SIMPLE_DEFAULT(0x0BB8), 0x00000016, 2, ZAP_TYPE(TEMPERATURE), \ - ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MaxHeatSetpointLimit */ \ - { ZAP_SIMPLE_DEFAULT(0x0640), 0x00000017, 2, ZAP_TYPE(TEMPERATURE), \ - ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MinCoolSetpointLimit */ \ - { ZAP_SIMPLE_DEFAULT(0x0C80), 0x00000018, 2, ZAP_TYPE(TEMPERATURE), \ - ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MaxCoolSetpointLimit */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(15), 0x00000019, 1, ZAP_TYPE(INT8S), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(15), 0x00000015, 2, ZAP_TYPE(TEMPERATURE), \ + ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MinHeatSetpointLimit */ \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(16), 0x00000016, 2, ZAP_TYPE(TEMPERATURE), \ + ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MaxHeatSetpointLimit */ \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(17), 0x00000017, 2, ZAP_TYPE(TEMPERATURE), \ + ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MinCoolSetpointLimit */ \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(18), 0x00000018, 2, ZAP_TYPE(TEMPERATURE), \ + ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MaxCoolSetpointLimit */ \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(19), 0x00000019, 1, ZAP_TYPE(INT8S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MinSetpointDeadBand */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(16), 0x0000001B, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(20), 0x0000001B, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ControlSequenceOfOperation */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(17), 0x0000001C, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(21), 0x0000001C, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* SystemMode */ \ { ZAP_SIMPLE_DEFAULT(0x0023), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(6), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fan Control (server) */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(18), 0x00000000, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(22), 0x00000000, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* FanMode */ \ { ZAP_SIMPLE_DEFAULT(0x02), 0x00000001, 1, ZAP_TYPE(ENUM8), 0 }, /* FanModeSequence */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(19), 0x00000002, 1, ZAP_TYPE(PERCENT), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(23), 0x00000002, 1, ZAP_TYPE(PERCENT), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* PercentSetting */ \ { ZAP_SIMPLE_DEFAULT(0x00), 0x00000003, 1, ZAP_TYPE(PERCENT), 0 }, /* PercentCurrent */ \ { ZAP_SIMPLE_DEFAULT(100), 0x00000004, 1, ZAP_TYPE(INT8U), 0 }, /* SpeedMax */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(20), 0x00000005, 1, ZAP_TYPE(INT8U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(24), 0x00000005, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* SpeedSetting */ \ { ZAP_SIMPLE_DEFAULT(0x00), 0x00000006, 1, ZAP_TYPE(INT8U), 0 }, /* SpeedCurrent */ \ { ZAP_SIMPLE_DEFAULT(0x00), 0x00000007, 1, ZAP_TYPE(BITMAP8), 0 }, /* RockSupport */ \ @@ -1049,11 +1053,11 @@ { ZAP_SIMPLE_DEFAULT(2), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(21), 0x00000000, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(25), 0x00000000, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* TemperatureDisplayMode */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(22), 0x00000001, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(26), 0x00000001, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* KeypadLockout */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(23), 0x00000002, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(27), 0x00000002, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ScheduleProgrammingVisibility */ \ { ZAP_SIMPLE_DEFAULT(0), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(2), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ @@ -1088,25 +1092,25 @@ { ZAP_EMPTY_DEFAULT(), 0x00000028, 2, ZAP_TYPE(INT16U), 0 }, /* Primary6X */ \ { ZAP_EMPTY_DEFAULT(), 0x00000029, 2, ZAP_TYPE(INT16U), 0 }, /* Primary6Y */ \ { ZAP_EMPTY_DEFAULT(), 0x0000002A, 1, ZAP_TYPE(INT8U), ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* Primary6Intensity */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(24), 0x00000030, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(28), 0x00000030, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* WhitePointX */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(25), 0x00000031, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(29), 0x00000031, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* WhitePointY */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(26), 0x00000032, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(30), 0x00000032, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointRX */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(27), 0x00000033, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(31), 0x00000033, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointRY */ \ { ZAP_EMPTY_DEFAULT(), 0x00000034, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* ColorPointRIntensity */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(28), 0x00000036, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(32), 0x00000036, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointGX */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(29), 0x00000037, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(33), 0x00000037, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointGY */ \ { ZAP_EMPTY_DEFAULT(), 0x00000038, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* ColorPointGIntensity */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(30), 0x0000003A, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(34), 0x0000003A, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointBX */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(31), 0x0000003B, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(35), 0x0000003B, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* ColorPointBY */ \ { ZAP_EMPTY_DEFAULT(), 0x0000003C, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* ColorPointBIntensity */ \ @@ -1121,7 +1125,7 @@ { ZAP_SIMPLE_DEFAULT(0x0000), 0x0000400B, 2, ZAP_TYPE(INT16U), 0 }, /* ColorTempPhysicalMinMireds */ \ { ZAP_SIMPLE_DEFAULT(0xFEFF), 0x0000400C, 2, ZAP_TYPE(INT16U), 0 }, /* ColorTempPhysicalMaxMireds */ \ { ZAP_EMPTY_DEFAULT(), 0x0000400D, 2, ZAP_TYPE(INT16U), 0 }, /* CoupleColorTempToLevelMinMireds */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(32), 0x00004010, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(36), 0x00004010, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* StartUpColorTemperatureMireds */ \ { ZAP_SIMPLE_DEFAULT(0x1F), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ @@ -1310,13 +1314,13 @@ { ZAP_EMPTY_DEFAULT(), 0x00000024, 1, ZAP_TYPE(ENUM8), ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* enum_attr */ \ { ZAP_EMPTY_DEFAULT(), 0x00000025, 0, ZAP_TYPE(STRUCT), \ ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* struct_attr */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(33), 0x00000026, 1, ZAP_TYPE(INT8U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(37), 0x00000026, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* range_restricted_int8u */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(34), 0x00000027, 1, ZAP_TYPE(INT8S), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(38), 0x00000027, 1, ZAP_TYPE(INT8S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* range_restricted_int8s */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(35), 0x00000028, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(39), 0x00000028, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* range_restricted_int16u */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(36), 0x00000029, 2, ZAP_TYPE(INT16S), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(40), 0x00000029, 2, ZAP_TYPE(INT16S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* range_restricted_int16s */ \ { ZAP_EMPTY_DEFAULT(), 0x0000002A, 0, ZAP_TYPE(ARRAY), \ ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* list_long_octet_string */ \ @@ -1387,16 +1391,16 @@ { ZAP_EMPTY_DEFAULT(), 0x00004025, 0, ZAP_TYPE(STRUCT), \ ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* nullable_struct */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(37), 0x00004026, 1, ZAP_TYPE(INT8U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(41), 0x00004026, 1, ZAP_TYPE(INT8U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* nullable_range_restricted_int8u */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(38), 0x00004027, 1, ZAP_TYPE(INT8S), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(42), 0x00004027, 1, ZAP_TYPE(INT8S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* nullable_range_restricted_int8s */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(39), 0x00004028, 2, ZAP_TYPE(INT16U), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(43), 0x00004028, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* nullable_range_restricted_int16u */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(40), 0x00004029, 2, ZAP_TYPE(INT16S), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(44), 0x00004029, 2, ZAP_TYPE(INT16S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* nullable_range_restricted_int16s */ \ { ZAP_EMPTY_DEFAULT(), 0x0000402A, 1, ZAP_TYPE(INT8U), \ @@ -1431,7 +1435,7 @@ { ZAP_SIMPLE_DEFAULT(1), 0x00004000, 1, ZAP_TYPE(BOOLEAN), 0 }, /* GlobalSceneControl */ \ { ZAP_SIMPLE_DEFAULT(0), 0x00004001, 2, ZAP_TYPE(INT16U), ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OnTime */ \ { ZAP_SIMPLE_DEFAULT(0), 0x00004002, 2, ZAP_TYPE(INT16U), ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OffWaitTime */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(41), 0x00004003, 1, ZAP_TYPE(ENUM8), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(45), 0x00004003, 1, ZAP_TYPE(ENUM8), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE) }, /* StartUpOnOff */ \ { ZAP_SIMPLE_DEFAULT(0x0000), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), 0 }, /* FeatureMap */ \ { ZAP_SIMPLE_DEFAULT(5), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ 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 d8957691e62e9f..3fd36f417df8b7 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 @@ -228,19 +228,19 @@ limitations under the License. OccupiedHeatingSetpoint UnoccupiedCoolingSetpoint UnoccupiedHeatingSetpoint - + MinHeatSetpointLimit - + MaxHeatSetpointLimit - + MinCoolSetpointLimit - + MaxCoolSetpointLimit @@ -321,7 +321,7 @@ limitations under the License. ACCoilTemperature - + ACCapacityformat From 5d956521b2150b4279ee089b439e88152f4c4496 Mon Sep 17 00:00:00 2001 From: David Rempel Date: Wed, 6 Dec 2023 23:09:28 -0800 Subject: [PATCH 11/14] 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. --- .../all-clusters-common/all-clusters-app.matter | 8 ++++---- .../all-clusters-minimal-app.matter | 8 ++++---- ...r_humiditysensor_thermostat_56de3d5f45.matter | 8 ++++---- ...rootnode_heatingcoolingunit_ncdGai1E5a.matter | 8 ++++---- ...rootnode_roomairconditioner_9cf3607804.matter | 8 ++++---- .../rootnode_thermostat_bm3fb8dhYi.matter | 8 ++++---- .../placeholder/linux/apps/app1/config.matter | 16 ++++++++-------- .../placeholder/linux/apps/app2/config.matter | 16 ++++++++-------- .../nxp/zap/thermostat_matter_thread.matter | 8 ++++---- .../nxp/zap/thermostat_matter_wifi.matter | 8 ++++---- .../thermostat-common/thermostat.matter | 8 ++++---- .../app-templates/endpoint_config.h | 8 ++++---- .../thermostat-server/thermostat-server.cpp | 2 ++ src/app/util/attribute-table.cpp | 2 ++ .../zcl/data-model/chip/thermostat-cluster.xml | 8 ++++---- .../data_model/controller-clusters.matter | 8 ++++---- .../zap-generated/attributes/Accessors.cpp | 8 ++++---- .../zap-generated/attributes/Accessors.h | 8 ++++---- 18 files changed, 76 insertions(+), 72 deletions(-) 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 9820471540c95a..40b193a9701d3a 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 @@ -4131,10 +4131,10 @@ cluster Thermostat = 513 { attribute optional int16s occupiedHeatingSetpoint = 18; attribute optional int16s unoccupiedCoolingSetpoint = 19; attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; - attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; - attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; - attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + 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 RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; 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 41b5d8315a8942..d637e275e7633f 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 @@ -3662,10 +3662,10 @@ cluster Thermostat = 513 { attribute optional int16s occupiedHeatingSetpoint = 18; attribute optional int16s unoccupiedCoolingSetpoint = 19; attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; - attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; - attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; - attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + 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 RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; 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 a7cb03ca961ba9..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 @@ -1306,10 +1306,10 @@ cluster Thermostat = 513 { attribute optional int16s occupiedHeatingSetpoint = 18; attribute optional int16s unoccupiedCoolingSetpoint = 19; attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; - attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; - attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; - attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + 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 RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index c907131ff3ee28..f996b6755dc160 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -1661,10 +1661,10 @@ cluster Thermostat = 513 { attribute optional int16s occupiedHeatingSetpoint = 18; attribute optional int16s unoccupiedCoolingSetpoint = 19; attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; - attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; - attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; - attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + 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 RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter index 70ae6a123f9e7f..26e51b22608ab0 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter @@ -1246,10 +1246,10 @@ cluster Thermostat = 513 { attribute optional int16s occupiedHeatingSetpoint = 18; attribute optional int16s unoccupiedCoolingSetpoint = 19; attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; - attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; - attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; - attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + 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 RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 64c32f2d58e6fc..c66fa12d622f75 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -1464,10 +1464,10 @@ cluster Thermostat = 513 { attribute optional int16s occupiedHeatingSetpoint = 18; attribute optional int16s unoccupiedCoolingSetpoint = 19; attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; - attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; - attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; - attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + 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 RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index fdf7243dcfd850..5cabc321414c30 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -4878,10 +4878,10 @@ cluster Thermostat = 513 { attribute optional int16s occupiedHeatingSetpoint = 18; attribute optional int16s unoccupiedCoolingSetpoint = 19; attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; - attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; - attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; - attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + 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 RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; @@ -5129,10 +5129,10 @@ cluster Thermostat = 513 { attribute optional int16s occupiedHeatingSetpoint = 18; attribute optional int16s unoccupiedCoolingSetpoint = 19; attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; - attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; - attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; - attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + 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 RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 16701e1bb80b2f..cbe288845b5999 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -4835,10 +4835,10 @@ cluster Thermostat = 513 { attribute optional int16s occupiedHeatingSetpoint = 18; attribute optional int16s unoccupiedCoolingSetpoint = 19; attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; - attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; - attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; - attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + 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 RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; @@ -5086,10 +5086,10 @@ cluster Thermostat = 513 { attribute optional int16s occupiedHeatingSetpoint = 18; attribute optional int16s unoccupiedCoolingSetpoint = 19; attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; - attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; - attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; - attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + 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 RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter index f6815e05fb2689..1ed6aa02988471 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter @@ -2092,10 +2092,10 @@ cluster Thermostat = 513 { attribute optional int16s occupiedHeatingSetpoint = 18; attribute optional int16s unoccupiedCoolingSetpoint = 19; attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; - attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; - attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; - attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + 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 RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; diff --git a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter index c4d29cd44a8e21..c93965668ca0aa 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter @@ -2003,10 +2003,10 @@ cluster Thermostat = 513 { attribute optional int16s occupiedHeatingSetpoint = 18; attribute optional int16s unoccupiedCoolingSetpoint = 19; attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; - attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; - attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; - attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + 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 RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 917fd66ea42b3e..bc3fa44b0c1157 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -1843,10 +1843,10 @@ cluster Thermostat = 513 { attribute optional int16s occupiedHeatingSetpoint = 18; attribute optional int16s unoccupiedCoolingSetpoint = 19; attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; - attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; - attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; - attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + 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 RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; 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 f126d5452502cd..25cbd7f5737a21 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 @@ -1017,13 +1017,13 @@ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OccupiedCoolingSetpoint */ \ { ZAP_MIN_MAX_DEFAULTS_INDEX(14), 0x00000012, 2, ZAP_TYPE(INT16S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* OccupiedHeatingSetpoint */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(15), 0x00000015, 2, ZAP_TYPE(TEMPERATURE), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(15), 0x00000015, 2, ZAP_TYPE(INT16S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MinHeatSetpointLimit */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(16), 0x00000016, 2, ZAP_TYPE(TEMPERATURE), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(16), 0x00000016, 2, ZAP_TYPE(INT16S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MaxHeatSetpointLimit */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(17), 0x00000017, 2, ZAP_TYPE(TEMPERATURE), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(17), 0x00000017, 2, ZAP_TYPE(INT16S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MinCoolSetpointLimit */ \ - { ZAP_MIN_MAX_DEFAULTS_INDEX(18), 0x00000018, 2, ZAP_TYPE(TEMPERATURE), \ + { ZAP_MIN_MAX_DEFAULTS_INDEX(18), 0x00000018, 2, ZAP_TYPE(INT16S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MaxCoolSetpointLimit */ \ { ZAP_MIN_MAX_DEFAULTS_INDEX(19), 0x00000019, 1, ZAP_TYPE(INT8S), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE) }, /* MinSetpointDeadBand */ \ diff --git a/src/app/clusters/thermostat-server/thermostat-server.cpp b/src/app/clusters/thermostat-server/thermostat-server.cpp index 62dd031056d872..9c3ea41a9bee75 100644 --- a/src/app/clusters/thermostat-server/thermostat-server.cpp +++ b/src/app/clusters/thermostat-server/thermostat-server.cpp @@ -194,6 +194,8 @@ MatterThermostatClusterServerPreAttributeChangedCallback(const app::ConcreteAttr bool CoolSupported = false; bool OccupancySupported = false; + ChipLogError(Zcl, "WTF!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); + if (FeatureMap::Get(endpoint, &OurFeatureMap) != EMBER_ZCL_STATUS_SUCCESS) OurFeatureMap = FEATURE_MAP_DEFAULT; diff --git a/src/app/util/attribute-table.cpp b/src/app/util/attribute-table.cpp index a4829d5d98719d..bce44f7ac6ab5d 100644 --- a/src/app/util/attribute-table.cpp +++ b/src/app/util/attribute-table.cpp @@ -169,6 +169,7 @@ EmberAfStatus emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, Attribu 0, // buffer size false); // write? + // if we dont support that attribute if (metadata == nullptr) { @@ -202,6 +203,7 @@ EmberAfStatus emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, Attribu uint16_t dataLen = emberAfAttributeSize(metadata); const uint8_t * minBytes; const uint8_t * maxBytes; + if (dataLen <= 2) { static_assert(sizeof(minv.defaultValue) == 2, "if statement relies on size of minv.defaultValue being 2"); 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 3fd36f417df8b7..492be0ac3d538b 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 @@ -228,19 +228,19 @@ limitations under the License. OccupiedHeatingSetpoint UnoccupiedCoolingSetpoint UnoccupiedHeatingSetpoint - + MinHeatSetpointLimit - + MaxHeatSetpointLimit - + MinCoolSetpointLimit - + MaxCoolSetpointLimit diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 365db8193dd845..030202269f5e3c 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -5599,10 +5599,10 @@ cluster Thermostat = 513 { attribute optional int16s occupiedHeatingSetpoint = 18; attribute optional int16s unoccupiedCoolingSetpoint = 19; attribute optional int16s unoccupiedHeatingSetpoint = 20; - attribute access(write: manage) optional temperature minHeatSetpointLimit = 21; - attribute access(write: manage) optional temperature maxHeatSetpointLimit = 22; - attribute access(write: manage) optional temperature minCoolSetpointLimit = 23; - attribute access(write: manage) optional temperature maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + 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 RemoteSensingBitmap remoteSensing = 26; attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; 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 5fa465299e24e0..1e8e9bfd03e5d2 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 @@ -15708,7 +15708,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_TEMPERATURE_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } } // namespace MinHeatSetpointLimit @@ -15739,7 +15739,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_TEMPERATURE_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } } // namespace MaxHeatSetpointLimit @@ -15770,7 +15770,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_TEMPERATURE_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } } // namespace MinCoolSetpointLimit @@ -15801,7 +15801,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_TEMPERATURE_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } } // namespace MaxCoolSetpointLimit 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 ddb09e6ce08b06..31e1247ab1a6ad 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 @@ -2844,22 +2844,22 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace UnoccupiedHeatingSetpoint namespace MinHeatSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace MinHeatSetpointLimit namespace MaxHeatSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace MaxHeatSetpointLimit namespace MinCoolSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace MinCoolSetpointLimit namespace MaxCoolSetpointLimit { -EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // temperature +EmberAfStatus Get(chip::EndpointId endpoint, int16_t * value); // int16s EmberAfStatus Set(chip::EndpointId endpoint, int16_t value); } // namespace MaxCoolSetpointLimit From 681699fea66042b36b95306f773971d787ccf1f5 Mon Sep 17 00:00:00 2001 From: David Rempel Date: Thu, 7 Dec 2023 20:48:02 -0800 Subject: [PATCH 12/14] Removed log line again (guess I didn't add/commit again before pushing) --- src/app/clusters/thermostat-server/thermostat-server.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/app/clusters/thermostat-server/thermostat-server.cpp b/src/app/clusters/thermostat-server/thermostat-server.cpp index 9c3ea41a9bee75..62dd031056d872 100644 --- a/src/app/clusters/thermostat-server/thermostat-server.cpp +++ b/src/app/clusters/thermostat-server/thermostat-server.cpp @@ -194,8 +194,6 @@ MatterThermostatClusterServerPreAttributeChangedCallback(const app::ConcreteAttr bool CoolSupported = false; bool OccupancySupported = false; - ChipLogError(Zcl, "WTF!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); - if (FeatureMap::Get(endpoint, &OurFeatureMap) != EMBER_ZCL_STATUS_SUCCESS) OurFeatureMap = FEATURE_MAP_DEFAULT; From 95b7fbdc8ed0433adbb2082bda8730bc3e28ec4a Mon Sep 17 00:00:00 2001 From: David Rempel <63119829+drempelg@users.noreply.github.com> Date: Thu, 7 Dec 2023 20:50:17 -0800 Subject: [PATCH 13/14] Update src/app/clusters/thermostat-server/thermostat-server.cpp Co-authored-by: Boris Zbarsky --- src/app/clusters/thermostat-server/thermostat-server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/clusters/thermostat-server/thermostat-server.cpp b/src/app/clusters/thermostat-server/thermostat-server.cpp index 62dd031056d872..85ed4f14d5b6e3 100644 --- a/src/app/clusters/thermostat-server/thermostat-server.cpp +++ b/src/app/clusters/thermostat-server/thermostat-server.cpp @@ -97,7 +97,7 @@ CHIP_ERROR ThermostatAttrAccess::Read(const ConcreteReadAttributePath & aPath, A case RemoteSensing::Id: if (localTemperatureNotExposedSupported) { - BitMask valueRemoteSensing; + BitMask valueRemoteSensing; EmberAfStatus status = RemoteSensing::Get(aPath.mEndpointId, &valueRemoteSensing); if (status != EMBER_ZCL_STATUS_SUCCESS) { From 89f2040e28a8d809985a554e29b6142f305d6350 Mon Sep 17 00:00:00 2001 From: David Rempel Date: Thu, 7 Dec 2023 20:57:18 -0800 Subject: [PATCH 14/14] fixed some white space issues and restored defaults --- src/app/util/attribute-table.cpp | 2 -- .../zcl/data-model/chip/thermostat-cluster.xml | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/app/util/attribute-table.cpp b/src/app/util/attribute-table.cpp index bce44f7ac6ab5d..a4829d5d98719d 100644 --- a/src/app/util/attribute-table.cpp +++ b/src/app/util/attribute-table.cpp @@ -169,7 +169,6 @@ EmberAfStatus emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, Attribu 0, // buffer size false); // write? - // if we dont support that attribute if (metadata == nullptr) { @@ -203,7 +202,6 @@ EmberAfStatus emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, Attribu uint16_t dataLen = emberAfAttributeSize(metadata); const uint8_t * minBytes; const uint8_t * maxBytes; - if (dataLen <= 2) { static_assert(sizeof(minv.defaultValue) == 2, "if statement relies on size of minv.defaultValue being 2"); 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 492be0ac3d538b..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 @@ -227,7 +227,7 @@ limitations under the License. OccupiedCoolingSetpoint OccupiedHeatingSetpoint UnoccupiedCoolingSetpoint - UnoccupiedHeatingSetpoint + UnoccupiedHeatingSetpoint MinHeatSetpointLimit @@ -279,8 +279,8 @@ limitations under the License. ThermostatRunningState SetpointChangeSource SetpointChangeAmount - SetpointChangeSourceTimestamp - + SetpointChangeSourceTimestamp + OccupiedSetback