Skip to content

Commit 83f8665

Browse files
authored
Added initial EVSE device type to matter-devices.xml. Updated energy-management-app.zap to use the new device type and fixed missing clusters on Root node (project-chip#31753)
1 parent 1f3675c commit 83f8665

File tree

4 files changed

+679
-12
lines changed

4 files changed

+679
-12
lines changed

examples/energy-management-app/energy-management-common/energy-management-app.matter

+202-1
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,67 @@ cluster BasicInformation = 40 {
256256
command MfgSpecificPing(): DefaultSuccess = 0;
257257
}
258258

259+
/** Nodes should be expected to be deployed to any and all regions of the world. These global regions
260+
may have differing common languages, units of measurements, and numerical formatting
261+
standards. As such, Nodes that visually or audibly convey information need a mechanism by which
262+
they can be configured to use a user’s preferred language, units, etc */
263+
cluster LocalizationConfiguration = 43 {
264+
revision 1; // NOTE: Default/not specifically set
265+
266+
attribute access(write: manage) char_string<35> activeLocale = 0;
267+
readonly attribute char_string supportedLocales[] = 1;
268+
readonly attribute command_id generatedCommandList[] = 65528;
269+
readonly attribute command_id acceptedCommandList[] = 65529;
270+
readonly attribute event_id eventList[] = 65530;
271+
readonly attribute attrib_id attributeList[] = 65531;
272+
readonly attribute bitmap32 featureMap = 65532;
273+
readonly attribute int16u clusterRevision = 65533;
274+
}
275+
276+
/** Nodes should be expected to be deployed to any and all regions of the world. These global regions
277+
may have differing preferences for how dates and times are conveyed. As such, Nodes that visually
278+
or audibly convey time information need a mechanism by which they can be configured to use a
279+
user’s preferred format. */
280+
cluster TimeFormatLocalization = 44 {
281+
revision 1; // NOTE: Default/not specifically set
282+
283+
enum CalendarTypeEnum : enum8 {
284+
kBuddhist = 0;
285+
kChinese = 1;
286+
kCoptic = 2;
287+
kEthiopian = 3;
288+
kGregorian = 4;
289+
kHebrew = 5;
290+
kIndian = 6;
291+
kIslamic = 7;
292+
kJapanese = 8;
293+
kKorean = 9;
294+
kPersian = 10;
295+
kTaiwanese = 11;
296+
kUseActiveLocale = 255;
297+
}
298+
299+
enum HourFormatEnum : enum8 {
300+
k12hr = 0;
301+
k24hr = 1;
302+
kUseActiveLocale = 255;
303+
}
304+
305+
bitmap Feature : bitmap32 {
306+
kCalendarFormat = 0x1;
307+
}
308+
309+
attribute access(write: manage) HourFormatEnum hourFormat = 0;
310+
attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1;
311+
readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2;
312+
readonly attribute command_id generatedCommandList[] = 65528;
313+
readonly attribute command_id acceptedCommandList[] = 65529;
314+
readonly attribute event_id eventList[] = 65530;
315+
readonly attribute attrib_id attributeList[] = 65531;
316+
readonly attribute bitmap32 featureMap = 65532;
317+
readonly attribute int16u clusterRevision = 65533;
318+
}
319+
259320
/** Nodes should be expected to be deployed to any and all regions of the world. These global regions
260321
may have differing preferences for the units in which values are conveyed in communication to a
261322
user. As such, Nodes that visually or audibly convey measurable values to the user need a
@@ -900,6 +961,111 @@ cluster GroupKeyManagement = 63 {
900961
fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4;
901962
}
902963

964+
/** This cluster provides a mechanism for querying data about electrical power as measured by the server. */
965+
provisional cluster ElectricalPowerMeasurement = 144 {
966+
revision 1;
967+
968+
enum MeasurementTypeEnum : enum16 {
969+
kUnspecified = 0;
970+
kVoltage = 1;
971+
kActiveCurrent = 2;
972+
kReactiveCurrent = 3;
973+
kApparentCurrent = 4;
974+
kActivePower = 5;
975+
kReactivePower = 6;
976+
kApparentPower = 7;
977+
kRMSVoltage = 8;
978+
kRMSCurrent = 9;
979+
kRMSPower = 10;
980+
kFrequency = 11;
981+
kPowerFactor = 12;
982+
kNeutralCurrent = 13;
983+
kElectricalEnergy = 14;
984+
}
985+
986+
enum PowerModeEnum : enum8 {
987+
kUnknown = 0;
988+
kDC = 1;
989+
kAC = 2;
990+
}
991+
992+
bitmap Feature : bitmap32 {
993+
kDirectCurrent = 0x1;
994+
kAlternatingCurrent = 0x2;
995+
kPolyphasePower = 0x4;
996+
kHarmonics = 0x8;
997+
kPowerQuality = 0x10;
998+
}
999+
1000+
struct MeasurementAccuracyRangeStruct {
1001+
int64s rangeMin = 0;
1002+
int64s rangeMax = 1;
1003+
optional percent100ths percentMax = 2;
1004+
optional percent100ths percentMin = 3;
1005+
optional percent100ths percentTypical = 4;
1006+
optional int64u fixedMax = 5;
1007+
optional int64u fixedMin = 6;
1008+
optional int64u fixedTypical = 7;
1009+
}
1010+
1011+
struct MeasurementAccuracyStruct {
1012+
MeasurementTypeEnum measurementType = 0;
1013+
boolean measured = 1;
1014+
int64s minMeasuredValue = 2;
1015+
int64s maxMeasuredValue = 3;
1016+
MeasurementAccuracyRangeStruct accuracyRanges[] = 4;
1017+
}
1018+
1019+
struct HarmonicMeasurementStruct {
1020+
int8u order = 0;
1021+
nullable int64s measurement = 1;
1022+
}
1023+
1024+
struct MeasurementRangeStruct {
1025+
MeasurementTypeEnum measurementType = 0;
1026+
int64s min = 1;
1027+
int64s max = 2;
1028+
optional epoch_s startTimestamp = 3;
1029+
optional epoch_s endTimestamp = 4;
1030+
optional epoch_s minTimestamp = 5;
1031+
optional epoch_s maxTimestamp = 6;
1032+
optional systime_ms startSystime = 7;
1033+
optional systime_ms endSystime = 8;
1034+
optional systime_ms minSystime = 9;
1035+
optional systime_ms maxSystime = 10;
1036+
}
1037+
1038+
info event MeasurementPeriodRanges = 0 {
1039+
MeasurementRangeStruct ranges[] = 0;
1040+
}
1041+
1042+
readonly attribute PowerModeEnum powerMode = 0;
1043+
readonly attribute int8u numberOfMeasurementTypes = 1;
1044+
readonly attribute MeasurementAccuracyStruct accuracy[] = 2;
1045+
readonly attribute optional MeasurementRangeStruct ranges[] = 3;
1046+
readonly attribute optional nullable voltage_mv voltage = 4;
1047+
readonly attribute optional nullable amperage_ma activeCurrent = 5;
1048+
readonly attribute optional nullable amperage_ma reactiveCurrent = 6;
1049+
readonly attribute optional nullable amperage_ma apparentCurrent = 7;
1050+
readonly attribute nullable power_mw activePower = 8;
1051+
readonly attribute optional nullable power_mw reactivePower = 9;
1052+
readonly attribute optional nullable power_mw apparentPower = 10;
1053+
readonly attribute optional nullable voltage_mv RMSVoltage = 11;
1054+
readonly attribute optional nullable amperage_ma RMSCurrent = 12;
1055+
readonly attribute optional nullable power_mw RMSPower = 13;
1056+
readonly attribute optional nullable int64s frequency = 14;
1057+
readonly attribute optional nullable HarmonicMeasurementStruct harmonicCurrents[] = 15;
1058+
readonly attribute optional nullable HarmonicMeasurementStruct harmonicPhases[] = 16;
1059+
readonly attribute optional nullable int64s powerFactor = 17;
1060+
readonly attribute optional nullable amperage_ma neutralCurrent = 18;
1061+
readonly attribute command_id generatedCommandList[] = 65528;
1062+
readonly attribute command_id acceptedCommandList[] = 65529;
1063+
readonly attribute event_id eventList[] = 65530;
1064+
readonly attribute attrib_id attributeList[] = 65531;
1065+
readonly attribute bitmap32 featureMap = 65532;
1066+
readonly attribute int16u clusterRevision = 65533;
1067+
}
1068+
9031069
/** This cluster provides a mechanism for querying data about the electrical energy imported or provided by the server. */
9041070
provisional cluster ElectricalEnergyMeasurement = 145 {
9051071
revision 1;
@@ -1530,6 +1696,27 @@ endpoint 0 {
15301696
ram attribute clusterRevision default = 3;
15311697
}
15321698

1699+
server cluster LocalizationConfiguration {
1700+
ram attribute activeLocale;
1701+
callback attribute supportedLocales;
1702+
callback attribute generatedCommandList;
1703+
callback attribute acceptedCommandList;
1704+
callback attribute eventList;
1705+
callback attribute attributeList;
1706+
ram attribute featureMap default = 0;
1707+
ram attribute clusterRevision default = 1;
1708+
}
1709+
1710+
server cluster TimeFormatLocalization {
1711+
ram attribute hourFormat;
1712+
callback attribute generatedCommandList;
1713+
callback attribute acceptedCommandList;
1714+
callback attribute eventList;
1715+
callback attribute attributeList;
1716+
ram attribute featureMap default = 0;
1717+
ram attribute clusterRevision default = 1;
1718+
}
1719+
15331720
server cluster UnitLocalization {
15341721
callback attribute generatedCommandList;
15351722
callback attribute acceptedCommandList;
@@ -1578,6 +1765,7 @@ endpoint 0 {
15781765
server cluster GeneralDiagnostics {
15791766
callback attribute networkInterfaces;
15801767
callback attribute rebootCount;
1768+
callback attribute upTime;
15811769
ram attribute testEventTriggersEnabled;
15821770
callback attribute generatedCommandList;
15831771
callback attribute acceptedCommandList;
@@ -1655,7 +1843,7 @@ endpoint 0 {
16551843
}
16561844
}
16571845
endpoint 1 {
1658-
device type ma_lightsensor = 262, version 1;
1846+
device type energy_evse = 1292, version 1;
16591847

16601848

16611849
server cluster Identify {
@@ -1685,6 +1873,19 @@ endpoint 1 {
16851873
callback attribute clusterRevision;
16861874
}
16871875

1876+
server cluster ElectricalPowerMeasurement {
1877+
callback attribute powerMode;
1878+
callback attribute numberOfMeasurementTypes;
1879+
callback attribute accuracy;
1880+
callback attribute activePower;
1881+
callback attribute generatedCommandList;
1882+
callback attribute acceptedCommandList;
1883+
callback attribute eventList;
1884+
callback attribute attributeList;
1885+
callback attribute featureMap;
1886+
ram attribute clusterRevision default = 1;
1887+
}
1888+
16881889
server cluster ElectricalEnergyMeasurement {
16891890
emits event CumulativeEnergyMeasured;
16901891
callback attribute accuracy;

0 commit comments

Comments
 (0)