Skip to content

Commit

Permalink
Merge branch 'master' into add-oven-mode-yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
beckerzito committed Jan 19, 2024
2 parents 9e4a8f3 + 049fef0 commit cda6335
Show file tree
Hide file tree
Showing 123 changed files with 3,614 additions and 578 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3990,13 +3990,19 @@ provisional cluster ElectricalEnergyMeasurement = 145 {

/** 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 2;
revision 3;

enum AdjustmentCauseEnum : enum8 {
kLocalOptimization = 0;
kGridOptimization = 1;
}

enum CauseEnum : enum8 {
kNormalCompletion = 0;
kOffline = 1;
kFault = 2;
kUserOptOut = 3;
kCancelled = 4;
}

enum CostTypeEnum : enum8 {
Expand All @@ -4010,9 +4016,8 @@ provisional cluster DeviceEnergyManagement = 152 {
kOffline = 0;
kOnline = 1;
kFault = 2;
kUserOptOut = 3;
kPowerAdjustActive = 4;
kPaused = 5;
kPowerAdjustActive = 3;
kPaused = 4;
}

enum ESATypeEnum : enum8 {
Expand All @@ -4033,11 +4038,27 @@ provisional cluster DeviceEnergyManagement = 152 {
kOther = 255;
}

enum ForecastUpdateReasonEnum : enum8 {
kInternalOptimization = 0;
kLocalOptimization = 1;
kGridOptimization = 2;
}

enum OptOutStateEnum : enum8 {
kNoOptOut = 0;
kLocalOptOut = 1;
kGridOptOut = 2;
kOptOut = 3;
}

bitmap Feature : bitmap32 {
kPowerAdjustment = 0x1;
kPowerForecastReporting = 0x2;
kStateForecastReporting = 0x4;
kForecastAdjustment = 0x8;
kStartTimeAdjustment = 0x8;
kPausable = 0x10;
kForecastAdjustment = 0x20;
kConstraintBasedAdjustment = 0x40;
}

struct CostStruct {
Expand All @@ -4053,9 +4074,9 @@ provisional cluster DeviceEnergyManagement = 152 {
elapsed_s defaultDuration = 2;
elapsed_s elapsedSlotTime = 3;
elapsed_s remainingSlotTime = 4;
boolean slotIsPauseable = 5;
elapsed_s minPauseDuration = 6;
elapsed_s maxPauseDuration = 7;
optional boolean slotIsPauseable = 5;
optional elapsed_s minPauseDuration = 6;
optional elapsed_s maxPauseDuration = 7;
optional int16u manufacturerESAState = 8;
optional power_mw nominalPower = 9;
optional power_mw minPower = 10;
Expand All @@ -4077,6 +4098,7 @@ provisional cluster DeviceEnergyManagement = 152 {
optional epoch_s latestEndTime = 5;
boolean isPauseable = 6;
SlotStruct slots[] = 7;
ForecastUpdateReasonEnum forecastUpdateReason = 8;
}

struct ConstraintsStruct {
Expand Down Expand Up @@ -4113,6 +4135,7 @@ provisional cluster DeviceEnergyManagement = 152 {
}

info event Resumed = 3 {
CauseEnum cause = 0;
}

readonly attribute ESATypeEnum ESAType = 0;
Expand All @@ -4122,6 +4145,7 @@ provisional cluster DeviceEnergyManagement = 152 {
readonly attribute power_mw absMaxPower = 4;
readonly attribute optional nullable PowerAdjustStruct powerAdjustmentCapability[] = 5;
readonly attribute optional nullable ForecastStruct forecast = 6;
readonly attribute optional OptOutStateEnum optOutState = 7;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand All @@ -4132,23 +4156,28 @@ provisional cluster DeviceEnergyManagement = 152 {
request struct PowerAdjustRequestRequest {
power_mw power = 0;
elapsed_s duration = 1;
AdjustmentCauseEnum cause = 2;
}

request struct StartTimeAdjustRequestRequest {
epoch_s requestedStartTime = 0;
AdjustmentCauseEnum cause = 1;
}

request struct PauseRequestRequest {
elapsed_s duration = 0;
AdjustmentCauseEnum cause = 1;
}

request struct ModifyForecastRequestRequest {
int32u forecastId = 0;
SlotAdjustmentStruct slotAdjustments[] = 1;
AdjustmentCauseEnum cause = 2;
}

request struct RequestConstraintBasedForecastRequest {
ConstraintsStruct constraints[] = 0;
AdjustmentCauseEnum cause = 1;
}

/** Allows a client to request an adjustment in the power consumption of an ESA for a specified duration. */
Expand All @@ -4165,6 +4194,8 @@ provisional cluster DeviceEnergyManagement = 152 {
command ModifyForecastRequest(ModifyForecastRequestRequest): DefaultSuccess = 5;
/** Allows a client to ask the ESA to recompute its Forecast based on power and time constraints. */
command RequestConstraintBasedForecast(RequestConstraintBasedForecastRequest): DefaultSuccess = 6;
/** Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest, ModifyForecastRequest or RequestConstraintBasedForecast command */
command CancelRequest(): DefaultSuccess = 7;
}

/** Electric Vehicle Supply Equipment (EVSE) is equipment used to charge an Electric Vehicle (EV) or Plug-In Hybrid Electric Vehicle. This cluster provides an interface to the functionality of Electric Vehicle Supply Equipment (EVSE) management. */
Expand Down Expand Up @@ -8012,12 +8043,13 @@ endpoint 1 {
callback attribute absMaxPower;
callback attribute powerAdjustmentCapability;
callback attribute forecast;
callback attribute optOutState;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
callback attribute featureMap;
ram attribute clusterRevision default = 2;
ram attribute clusterRevision default = 3;

handle command PowerAdjustRequest;
handle command CancelPowerAdjustRequest;
Expand All @@ -8026,6 +8058,7 @@ endpoint 1 {
handle command ResumeRequest;
handle command ModifyForecastRequest;
handle command RequestConstraintBasedForecast;
handle command CancelRequest;
}

server cluster EnergyEvse {
Expand Down
40 changes: 32 additions & 8 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@
}
],
"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",
"type": "zcl-properties",
"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": [
Expand Down Expand Up @@ -12917,6 +12917,14 @@
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "CancelRequest",
"code": 7,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
}
],
"attributes": [
Expand Down Expand Up @@ -13032,6 +13040,22 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "OptOutState",
"code": 7,
"mfgCode": null,
"side": "server",
"type": "OptOutStateEnum",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "GeneratedCommandList",
"code": 65528,
Expand Down Expand Up @@ -13074,7 +13098,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": null,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -13122,7 +13146,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "2",
"defaultValue": "3",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ void emberAfDeviceEnergyManagementClusterInitCallback(chip::EndpointId endpointI
gInstance = std::make_unique<DeviceEnergyManagementManager>(
endpointId, *gDelegate,
BitMask<DeviceEnergyManagement::Feature, uint32_t>(
DeviceEnergyManagement::Feature::kPowerForecastReporting, DeviceEnergyManagement::Feature::kStateForecastReporting,
DeviceEnergyManagement::Feature::kPowerAdjustment, DeviceEnergyManagement::Feature::kForecastAdjustment),
BitMask<OptionalCommands, uint32_t>(OptionalCommands::kSupportsModifyForecastRequest,
OptionalCommands::kSupportsRequestConstraintBasedForecast));
DeviceEnergyManagement::Feature::kPowerAdjustment, DeviceEnergyManagement::Feature::kPowerForecastReporting,
DeviceEnergyManagement::Feature::kStateForecastReporting, DeviceEnergyManagement::Feature::kStartTimeAdjustment,
DeviceEnergyManagement::Feature::kPausable, DeviceEnergyManagement::Feature::kForecastAdjustment,
DeviceEnergyManagement::Feature::kConstraintBasedAdjustment));

if (!gInstance)
{
Expand Down
Loading

0 comments on commit cda6335

Please sign in to comment.