Skip to content

Commit

Permalink
Add Device Energy Management in EP1
Browse files Browse the repository at this point in the history
  • Loading branch information
lboue authored Nov 11, 2024
1 parent 3f8166a commit 8e26de0
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions examples/chef/devices/rootnode_heatpump_87ivjRAECh.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1913,6 +1913,64 @@ cluster PowerTopology = 156 {
readonly attribute int16u clusterRevision = 65533;
}

/** Attributes and commands for selecting a mode from a list of supported options. */
provisional cluster DeviceEnergyManagementMode = 159 {
revision 2;

enum ModeTag : enum16 {
kAuto = 0;
kQuick = 1;
kQuiet = 2;
kLowNoise = 3;
kLowEnergy = 4;
kVacation = 5;
kMin = 6;
kMax = 7;
kNight = 8;
kDay = 9;
kNoOptimization = 16384;
kDeviceOptimization = 16385;
kLocalOptimization = 16386;
kGridOptimization = 16387;
}

bitmap Feature : bitmap32 {
kOnOff = 0x1;
}

struct ModeTagStruct {
optional vendor_id mfgCode = 0;
enum16 value = 1;
}

struct ModeOptionStruct {
char_string<64> label = 0;
int8u mode = 1;
ModeTagStruct modeTags[] = 2;
}

readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
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<64> statusText = 1;
}

/** This command is used to change device modes. */
command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0;
}

/** An interface for configuring and controlling the functionality of a thermostat. */
cluster Thermostat = 513 {
revision 7;
Expand Down Expand Up @@ -2459,6 +2517,7 @@ endpoint 0 {
endpoint 1 {
device type ma_powersource = 17, version 1;
device type ma_electricalsensor = 1296, version 1;
device type device_energy_management = 1293, version 1;
device type ma_heatpump = 777, version 1;

binding cluster Thermostat;
Expand Down Expand Up @@ -2543,6 +2602,19 @@ endpoint 1 {
callback attribute featureMap;
ram attribute clusterRevision default = 1;
}

server cluster DeviceEnergyManagementMode {
callback attribute supportedModes;
callback attribute currentMode;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
callback attribute featureMap;
ram attribute clusterRevision default = 2;

handle command ChangeToMode;
handle command ChangeToModeResponse;
}
}
endpoint 2 {
device type ma_tempsensor = 770, version 1;
Expand Down

0 comments on commit 8e26de0

Please sign in to comment.