Skip to content

Commit

Permalink
Add water-heater-mode-cluster support into control files and regenera…
Browse files Browse the repository at this point in the history
…te files
  • Loading branch information
PeterC1965 committed Jul 15, 2024
1 parent fdcd114 commit b6c1172
Show file tree
Hide file tree
Showing 23 changed files with 1,736 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/zap_clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ Generally regenerate using one of:
| 155 | 0x9B | EnergyPreference |
| 156 | 0x9C | PowerTopology |
| 157 | 0x9D | EnergyEvseMode |
| 158 | 0x9E | WaterHeaterMode |
| 159 | 0x9F | DeviceEnergyManagementMode |
| 257 | 0x101 | DoorLock |
| 258 | 0x102 | WindowCovering |
Expand Down
1 change: 1 addition & 0 deletions scripts/rules.matterlint
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/washer-controls-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/water-heater-management-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/water-heater-mode-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/wifi-network-management-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/window-covering.xml";
Expand Down
3 changes: 2 additions & 1 deletion src/app/zap-templates/zcl/data-model/all.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@
<xi:include href="chip/valve-configuration-and-control-cluster.xml" />
<xi:include href="chip/wake-on-lan-cluster.xml" />
<xi:include href="chip/washer-controls-cluster.xml" />
<xi:include href="chip/water-heater-management-cluster.xml" />
<xi:include href="chip/water-heater-management-cluster.xml" />
<xi:include href="chip/water-heater-mode-cluster.xml" />
<xi:include href="chip/wifi-network-diagnostics-cluster.xml" />
<xi:include href="chip/wifi-network-management-cluster.xml" />
<xi:include href="chip/window-covering.xml" />
Expand Down
11 changes: 11 additions & 0 deletions src/app/zap-templates/zcl/zcl-with-test-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"wake-on-lan-cluster.xml",
"washer-controls-cluster.xml",
"water-heater-management-cluster.xml",
"water-heater-mode-cluster.xml",
"wifi-network-diagnostics-cluster.xml",
"wifi-network-management-cluster.xml",
"window-covering.xml",
Expand Down Expand Up @@ -643,6 +644,16 @@
"Power Topology": ["FeatureMap"],
"Valve Configuration and Control": ["RemainingDuration"],
"Boolean State Configuration": ["CurrentSensitivityLevel"],
"Water Heater Management": [
"HeaterTypes",
"HeatDemand",
"TankVolume",
"EstimatedHeatRequired",
"TankPercentage",
"BoostState",
"FeatureMap"
],
"Water Heater Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Wi-Fi Network Management": ["SSID"]
},
"defaultReportingPolicy": "mandatory",
Expand Down
11 changes: 11 additions & 0 deletions src/app/zap-templates/zcl/zcl.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
"wake-on-lan-cluster.xml",
"washer-controls-cluster.xml",
"water-heater-management-cluster.xml",
"water-heater-mode-cluster.xml",
"wifi-network-diagnostics-cluster.xml",
"wifi-network-management-cluster.xml",
"window-covering.xml",
Expand Down Expand Up @@ -641,6 +642,16 @@
"Power Topology": ["FeatureMap"],
"Valve Configuration and Control": ["RemainingDuration"],
"Boolean State Configuration": ["CurrentSensitivityLevel"],
"Water Heater Management": [
"HeaterTypes",
"HeatDemand",
"TankVolume",
"EstimatedHeatRequired",
"TankPercentage",
"BoostState",
"FeatureMap"
],
"Water Heater Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Wi-Fi Network Management": ["SSID"]
},
"defaultReportingPolicy": "mandatory",
Expand Down
39 changes: 39 additions & 0 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -5172,6 +5172,45 @@ cluster EnergyEvseMode = 157 {
command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0;
}

/** Attributes and commands for selecting a mode from a list of supported options. */
cluster WaterHeaterMode = 158 {
revision 1;

enum ModeTag : enum16 {
kOff = 16384;
kManual = 16385;
kTimed = 16386;
}

bitmap Feature : bitmap32 {
kOnOff = 0x1;
}

readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
attribute optional nullable int8u startUpMode = 2;
attribute optional nullable int8u onMode = 3;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

request struct ChangeToModeRequest {
int8u newMode = 0;
}

response struct ChangeToModeResponse = 1 {
enum8 status = 0;
optional char_string statusText = 1;
}

/** This command is used to change device modes.
On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */
command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0;
}

/** Attributes and commands for selecting a mode from a list of supported options. */
provisional cluster DeviceEnergyManagementMode = 159 {
revision 1;
Expand Down
244 changes: 244 additions & 0 deletions src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b6c1172

Please sign in to comment.