Skip to content

Commit 03e95d4

Browse files
committed
Add WHM to the all clusters app
1 parent f6022e4 commit 03e95d4

32 files changed

+2709
-492
lines changed

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

+140
Original file line numberDiff line numberDiff line change
@@ -4075,6 +4075,64 @@ cluster ElectricalEnergyMeasurement = 145 {
40754075
readonly attribute int16u clusterRevision = 65533;
40764076
}
40774077

4078+
/** This cluster is used to allow clients to control the operation of a hot water heating appliance so that it can be used with energy management. */
4079+
provisional cluster WaterHeaterManagement = 148 {
4080+
revision 1;
4081+
4082+
enum BoostStateEnum : enum8 {
4083+
kInactive = 0;
4084+
kActive = 1;
4085+
}
4086+
4087+
bitmap Feature : bitmap32 {
4088+
kEnergyManagement = 0x1;
4089+
kTankPercent = 0x2;
4090+
}
4091+
4092+
bitmap WaterHeaterDemandBitmap : bitmap8 {
4093+
kImmersionElement1 = 0x1;
4094+
kImmersionElement2 = 0x2;
4095+
kHeatPump = 0x4;
4096+
kBoiler = 0x8;
4097+
kOther = 0x10;
4098+
}
4099+
4100+
bitmap WaterHeaterTypeBitmap : bitmap8 {
4101+
kImmersionElement1 = 0x1;
4102+
kImmersionElement2 = 0x2;
4103+
kHeatPump = 0x4;
4104+
kBoiler = 0x8;
4105+
kOther = 0x10;
4106+
}
4107+
4108+
readonly attribute WaterHeaterTypeBitmap heaterTypes = 0;
4109+
readonly attribute WaterHeaterDemandBitmap heatDemand = 1;
4110+
readonly attribute optional int16u tankVolume = 2;
4111+
readonly attribute optional energy_mwh estimatedHeatRequired = 3;
4112+
readonly attribute optional percent tankPercentage = 4;
4113+
readonly attribute BoostStateEnum boostState = 5;
4114+
readonly attribute command_id generatedCommandList[] = 65528;
4115+
readonly attribute command_id acceptedCommandList[] = 65529;
4116+
readonly attribute event_id eventList[] = 65530;
4117+
readonly attribute attrib_id attributeList[] = 65531;
4118+
readonly attribute bitmap32 featureMap = 65532;
4119+
readonly attribute int16u clusterRevision = 65533;
4120+
4121+
request struct BoostRequest {
4122+
elapsed_s duration = 0;
4123+
optional boolean oneShot = 1;
4124+
optional boolean emergencyBoost = 2;
4125+
optional temperature temporarySetpoint = 3;
4126+
optional percent targetPercentage = 4;
4127+
optional percent targetReheat = 5;
4128+
}
4129+
4130+
/** Allows a client to request that the water heater is put into a Boost state. */
4131+
command access(invoke: manage) Boost(BoostRequest): DefaultSuccess = 0;
4132+
/** Allows a client to cancel an ongoing Boost operation. */
4133+
command access(invoke: manage) CancelBoost(): DefaultSuccess = 1;
4134+
}
4135+
40784136
/** This cluster allows a client to manage the power draw of a device. An example of such a client could be an Energy Management System (EMS) which controls an Energy Smart Appliance (ESA). */
40794137
provisional cluster DeviceEnergyManagement = 152 {
40804138
revision 4;
@@ -4582,6 +4640,56 @@ cluster EnergyEvseMode = 157 {
45824640
command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0;
45834641
}
45844642

4643+
/** Attributes and commands for selecting a mode from a list of supported options. */
4644+
cluster WaterHeaterMode = 158 {
4645+
revision 1;
4646+
4647+
enum ModeTag : enum16 {
4648+
kOff = 16384;
4649+
kManual = 16385;
4650+
kTimed = 16386;
4651+
}
4652+
4653+
bitmap Feature : bitmap32 {
4654+
kOnOff = 0x1;
4655+
}
4656+
4657+
struct ModeTagStruct {
4658+
optional vendor_id mfgCode = 0;
4659+
enum16 value = 1;
4660+
}
4661+
4662+
struct ModeOptionStruct {
4663+
char_string<64> label = 0;
4664+
int8u mode = 1;
4665+
ModeTagStruct modeTags[] = 2;
4666+
}
4667+
4668+
readonly attribute ModeOptionStruct supportedModes[] = 0;
4669+
readonly attribute int8u currentMode = 1;
4670+
attribute optional nullable int8u startUpMode = 2;
4671+
attribute optional nullable int8u onMode = 3;
4672+
readonly attribute command_id generatedCommandList[] = 65528;
4673+
readonly attribute command_id acceptedCommandList[] = 65529;
4674+
readonly attribute event_id eventList[] = 65530;
4675+
readonly attribute attrib_id attributeList[] = 65531;
4676+
readonly attribute bitmap32 featureMap = 65532;
4677+
readonly attribute int16u clusterRevision = 65533;
4678+
4679+
request struct ChangeToModeRequest {
4680+
int8u newMode = 0;
4681+
}
4682+
4683+
response struct ChangeToModeResponse = 1 {
4684+
enum8 status = 0;
4685+
optional char_string statusText = 1;
4686+
}
4687+
4688+
/** This command is used to change device modes.
4689+
On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */
4690+
command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0;
4691+
}
4692+
45854693
/** Attributes and commands for selecting a mode from a list of supported options. */
45864694
provisional cluster DeviceEnergyManagementMode = 159 {
45874695
revision 1;
@@ -8377,6 +8485,24 @@ endpoint 1 {
83778485
ram attribute clusterRevision default = 1;
83788486
}
83798487

8488+
server cluster WaterHeaterManagement {
8489+
callback attribute heaterTypes;
8490+
callback attribute heatDemand;
8491+
callback attribute tankVolume;
8492+
callback attribute estimatedHeatRequired;
8493+
callback attribute tankPercentage;
8494+
callback attribute boostState;
8495+
callback attribute generatedCommandList;
8496+
callback attribute acceptedCommandList;
8497+
callback attribute eventList;
8498+
callback attribute attributeList;
8499+
callback attribute featureMap;
8500+
callback attribute clusterRevision;
8501+
8502+
handle command Boost;
8503+
handle command CancelBoost;
8504+
}
8505+
83808506
server cluster DeviceEnergyManagement {
83818507
emits event PowerAdjustStart;
83828508
emits event PowerAdjustEnd;
@@ -8489,6 +8615,20 @@ endpoint 1 {
84898615
handle command ChangeToModeResponse;
84908616
}
84918617

8618+
server cluster WaterHeaterMode {
8619+
callback attribute supportedModes;
8620+
callback attribute currentMode;
8621+
callback attribute generatedCommandList;
8622+
callback attribute acceptedCommandList;
8623+
callback attribute eventList;
8624+
callback attribute attributeList;
8625+
callback attribute featureMap;
8626+
ram attribute clusterRevision default = 1;
8627+
8628+
handle command ChangeToMode;
8629+
handle command ChangeToModeResponse;
8630+
}
8631+
84928632
server cluster DeviceEnergyManagementMode {
84938633
callback attribute supportedModes;
84948634
callback attribute currentMode;

0 commit comments

Comments
 (0)