Skip to content

Commit

Permalink
Add WHM to the all clusters app (project-chip#34456)
Browse files Browse the repository at this point in the history
* Add WHM to the all clusters app

* Restyled by whitespace

* Restyled by clang-format

* Restyled by gn

* Fix CI test

* Address review comments from JamesH

* Address review comments from JamesH

* Address review comments from JamesH

* Restyled by clang-format

* Get tests passing again

* Restyled by clang-format

* Declare some global items for future testing (project-chip#34509)

Co-authored-by: Andrei Litvin <[email protected]>

* [LevelControl] Implemented the Q quality logic for the CurrentLevel a… (project-chip#34488)

* Implemented the Quiete reporting quality logic for the CurrentLevel and RemainingTime attributes

* Restyled by clang-format

* use c++ struct rather than c struct format

* add cluster-building-blocks to the data model public dep

---------

Co-authored-by: Restyled.io <[email protected]>

* Revert thermostat stuff breaking tot (project-chip#34518)

* Revert "update tests and thermostat server cluster for new constraints for LocalTemperatureCalibration and MinSetpointDeadBand (project-chip#34474)"

This reverts commit 335ac96.

* Revert "update constraints for LocalTemperatureCalibration and MinSetpointDeadBand attributes (project-chip#34473)"

This reverts commit 21a5bd6.

* [Telink] Update Docker image (Zephyr update) (project-chip#34503)

* Add TransportPayloadCapability flag for GetConnectedDevices and bubble (project-chip#34450)

up the flag to the wrapper IM Python APIs.

Add python script binding methods for LargePayload tests
--to check if session allows large payload.
--to close the underlying TCP connection.
--to check if the session is active.

* Remove no-longer-used MTRDevice logic for truncating data version lists (project-chip#34183)

* Remove no-longer-used MTRDevice logic for truncating data version lists

After project-chip#34111, ReadClient
handles this logic itself, so the attempted truncation in MTRDevice was now dead
code.

* Address review comment.

* Fix compile issues.

* Address another review comment.

* Address review comment.

* Address review comments by JamesH

* Remove unnecessary include file

* Address further review comments from JamhesH

* Restyled by whitespace

* Restyled by clang-format

* Address further review comments from JamesH

* Address further review comments from JamesH

* Update examples/all-clusters-app/all-clusters-common/src/WhmDelegateImpl.cpp

Co-authored-by: Boris Zbarsky <[email protected]>

* Update examples/all-clusters-app/all-clusters-common/src/WhmManufacturer.cpp

Co-authored-by: Boris Zbarsky <[email protected]>

* Update examples/all-clusters-app/all-clusters-common/src/WhmManufacturer.cpp

Co-authored-by: Boris Zbarsky <[email protected]>

* Undo suggested change from Boris as idx needed in the loop

* Update examples/all-clusters-app/all-clusters-common/src/WhmDelegateImpl.cpp

Co-authored-by: lpbeliveau-silabs <[email protected]>

* Address review comments

---------

Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: Andrei Litvin <[email protected]>
Co-authored-by: Andrei Litvin <[email protected]>
Co-authored-by: Junior Martinez <[email protected]>
Co-authored-by: C Freeman <[email protected]>
Co-authored-by: Alex Tsitsiura <[email protected]>
Co-authored-by: Pradip De <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
Co-authored-by: jamesharrow <[email protected]>
Co-authored-by: lpbeliveau-silabs <[email protected]>
  • Loading branch information
11 people authored and rochaferraz committed Jul 31, 2024
1 parent 906d7f0 commit e758d48
Show file tree
Hide file tree
Showing 19 changed files with 1,792 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4092,6 +4092,64 @@ cluster ElectricalEnergyMeasurement = 145 {
readonly attribute int16u clusterRevision = 65533;
}

/** 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. */
provisional cluster WaterHeaterManagement = 148 {
revision 1;

enum BoostStateEnum : enum8 {
kInactive = 0;
kActive = 1;
}

bitmap Feature : bitmap32 {
kEnergyManagement = 0x1;
kTankPercent = 0x2;
}

bitmap WaterHeaterDemandBitmap : bitmap8 {
kImmersionElement1 = 0x1;
kImmersionElement2 = 0x2;
kHeatPump = 0x4;
kBoiler = 0x8;
kOther = 0x10;
}

bitmap WaterHeaterTypeBitmap : bitmap8 {
kImmersionElement1 = 0x1;
kImmersionElement2 = 0x2;
kHeatPump = 0x4;
kBoiler = 0x8;
kOther = 0x10;
}

readonly attribute WaterHeaterTypeBitmap heaterTypes = 0;
readonly attribute WaterHeaterDemandBitmap heatDemand = 1;
readonly attribute optional int16u tankVolume = 2;
readonly attribute optional energy_mwh estimatedHeatRequired = 3;
readonly attribute optional percent tankPercentage = 4;
readonly attribute BoostStateEnum boostState = 5;
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 BoostRequest {
elapsed_s duration = 0;
optional boolean oneShot = 1;
optional boolean emergencyBoost = 2;
optional temperature temporarySetpoint = 3;
optional percent targetPercentage = 4;
optional percent targetReheat = 5;
}

/** Allows a client to request that the water heater is put into a Boost state. */
command access(invoke: manage) Boost(BoostRequest): DefaultSuccess = 0;
/** Allows a client to cancel an ongoing Boost operation. */
command access(invoke: manage) CancelBoost(): DefaultSuccess = 1;
}

/** 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). */
provisional cluster DeviceEnergyManagement = 152 {
revision 4;
Expand Down Expand Up @@ -8434,6 +8492,24 @@ endpoint 1 {
ram attribute clusterRevision default = 1;
}

server cluster WaterHeaterManagement {
callback attribute heaterTypes;
callback attribute heatDemand;
callback attribute tankVolume;
callback attribute estimatedHeatRequired;
callback attribute tankPercentage;
callback attribute boostState;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
callback attribute featureMap;
callback attribute clusterRevision;

handle command Boost;
handle command CancelBoost;
}

server cluster DeviceEnergyManagement {
emits event PowerAdjustStart;
emits event PowerAdjustEnd;
Expand Down
221 changes: 221 additions & 0 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -13413,6 +13413,227 @@
}
]
},
{
"name": "Water Heater Management",
"code": 148,
"mfgCode": null,
"define": "WATER_HEATER_MANAGEMENT_CLUSTER",
"side": "server",
"enabled": 1,
"apiMaturity": "provisional",
"commands": [
{
"name": "Boost",
"code": 0,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "CancelBoost",
"code": 1,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
}
],
"attributes": [
{
"name": "HeaterTypes",
"code": 0,
"mfgCode": null,
"side": "server",
"type": "WaterHeaterTypeBitmap",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "HeatDemand",
"code": 1,
"mfgCode": null,
"side": "server",
"type": "WaterHeaterDemandBitmap",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "TankVolume",
"code": 2,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "EstimatedHeatRequired",
"code": 3,
"mfgCode": null,
"side": "server",
"type": "energy_mwh",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "TankPercentage",
"code": 4,
"mfgCode": null,
"side": "server",
"type": "percent",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "BoostState",
"code": 5,
"mfgCode": null,
"side": "server",
"type": "BoostStateEnum",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "GeneratedCommandList",
"code": 65528,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AcceptedCommandList",
"code": 65529,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "EventList",
"code": 65530,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AttributeList",
"code": 65531,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "server",
"type": "bitmap32",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
},
{
"name": "Device Energy Management",
"code": 152,
Expand Down
Loading

0 comments on commit e758d48

Please sign in to comment.