Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add water heater mode cluster xml #34333

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0"?>
<!--
Copyright (c) 2024 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.
-->
<configurator>
<domain name="CHIP"/>

<enum name="ModeTag" type="enum16">
<cluster code="0x009E"/>
<item value="0x4000" name="Off"/>
<item value="0x4001" name="Manual"/>
<item value="0x4002" name="Timed"/>
</enum>

<cluster>
<domain>General</domain>
<name>Water Heater Mode</name>
<code>0x009E</code>
<define>WATER_HEATER_MODE_CLUSTER</define>
<client init="false" tick="false">true</client>
<server init="false" tick="false">true</server>
<description>Attributes and commands for selecting a mode from a list of supported options.</description>
<globalAttribute side="either" code="0xFFFD" value="1"/>

<features>
<feature bit="0" code="DEPONOFF" name="OnOff" summary="Dependency with the OnOff cluster">
<optionalConform/>
</feature>
</features>

<!-- Base data types -->
<attribute side="server" code="0x0000" define="SUPPORTED_MODES" type="array" entryType="ModeOptionStruct" writable="false" optional="false" isNullable="false" length="255">SupportedModes</attribute>
<attribute side="server" code="0x0001" define="CURRENT_MODE" type="int8u" writable="false" optional="false" isNullable="false" reportable="true">CurrentMode</attribute>
<attribute side="server" code="0x0002" define="START_UP_MODE" type="int8u" writable="true" optional="true" isNullable="true">StartUpMode</attribute>
<attribute side="server" code="0x0003" define="ON_MODE" type="int8u" writable="true" optional="true" isNullable="true">OnMode</attribute>

<!-- Commands -->
<command source="client" code="0x00" name="ChangeToMode" response="ChangeToModeResponse" optional="false">
<description>
This command is used to change device modes.
On receipt of this command the device SHALL respond with a ChangeToModeResponse command.
</description>
<arg name="NewMode" type="int8u" optional="false"/>
</command>

<command source="server" code="0x01" name="ChangeToModeResponse" disableDefaultResponse="true" optional="false">
<description>
This command is sent by the device on receipt of the ChangeToModeWithStatus command.
</description>
<arg name="Status" type="enum8" optional="false"/>
<arg name="StatusText" type="char_string" lenght="64" optional="true"/>
</command>
</cluster>
</configurator>
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",
jamesharrow marked this conversation as resolved.
Show resolved Hide resolved
"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",
jamesharrow marked this conversation as resolved.
Show resolved Hide resolved
"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
Loading
Loading