Skip to content

Commit

Permalink
Added initial EVSE device type to matter-devices.xml. Updated energy-…
Browse files Browse the repository at this point in the history
…management-app.zap to use the new device type and fixed missing clusters on Root node (#31753)
  • Loading branch information
jamesharrow authored Feb 4, 2024
1 parent 1f3675c commit 83f8665
Show file tree
Hide file tree
Showing 4 changed files with 679 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,67 @@ cluster BasicInformation = 40 {
command MfgSpecificPing(): DefaultSuccess = 0;
}

/** Nodes should be expected to be deployed to any and all regions of the world. These global regions
may have differing common languages, units of measurements, and numerical formatting
standards. As such, Nodes that visually or audibly convey information need a mechanism by which
they can be configured to use a user’s preferred language, units, etc */
cluster LocalizationConfiguration = 43 {
revision 1; // NOTE: Default/not specifically set

attribute access(write: manage) char_string<35> activeLocale = 0;
readonly attribute char_string supportedLocales[] = 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;
}

/** Nodes should be expected to be deployed to any and all regions of the world. These global regions
may have differing preferences for how dates and times are conveyed. As such, Nodes that visually
or audibly convey time information need a mechanism by which they can be configured to use a
user’s preferred format. */
cluster TimeFormatLocalization = 44 {
revision 1; // NOTE: Default/not specifically set

enum CalendarTypeEnum : enum8 {
kBuddhist = 0;
kChinese = 1;
kCoptic = 2;
kEthiopian = 3;
kGregorian = 4;
kHebrew = 5;
kIndian = 6;
kIslamic = 7;
kJapanese = 8;
kKorean = 9;
kPersian = 10;
kTaiwanese = 11;
kUseActiveLocale = 255;
}

enum HourFormatEnum : enum8 {
k12hr = 0;
k24hr = 1;
kUseActiveLocale = 255;
}

bitmap Feature : bitmap32 {
kCalendarFormat = 0x1;
}

attribute access(write: manage) HourFormatEnum hourFormat = 0;
attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1;
readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2;
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;
}

/** Nodes should be expected to be deployed to any and all regions of the world. These global regions
may have differing preferences for the units in which values are conveyed in communication to a
user. As such, Nodes that visually or audibly convey measurable values to the user need a
Expand Down Expand Up @@ -900,6 +961,111 @@ cluster GroupKeyManagement = 63 {
fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4;
}

/** This cluster provides a mechanism for querying data about electrical power as measured by the server. */
provisional cluster ElectricalPowerMeasurement = 144 {
revision 1;

enum MeasurementTypeEnum : enum16 {
kUnspecified = 0;
kVoltage = 1;
kActiveCurrent = 2;
kReactiveCurrent = 3;
kApparentCurrent = 4;
kActivePower = 5;
kReactivePower = 6;
kApparentPower = 7;
kRMSVoltage = 8;
kRMSCurrent = 9;
kRMSPower = 10;
kFrequency = 11;
kPowerFactor = 12;
kNeutralCurrent = 13;
kElectricalEnergy = 14;
}

enum PowerModeEnum : enum8 {
kUnknown = 0;
kDC = 1;
kAC = 2;
}

bitmap Feature : bitmap32 {
kDirectCurrent = 0x1;
kAlternatingCurrent = 0x2;
kPolyphasePower = 0x4;
kHarmonics = 0x8;
kPowerQuality = 0x10;
}

struct MeasurementAccuracyRangeStruct {
int64s rangeMin = 0;
int64s rangeMax = 1;
optional percent100ths percentMax = 2;
optional percent100ths percentMin = 3;
optional percent100ths percentTypical = 4;
optional int64u fixedMax = 5;
optional int64u fixedMin = 6;
optional int64u fixedTypical = 7;
}

struct MeasurementAccuracyStruct {
MeasurementTypeEnum measurementType = 0;
boolean measured = 1;
int64s minMeasuredValue = 2;
int64s maxMeasuredValue = 3;
MeasurementAccuracyRangeStruct accuracyRanges[] = 4;
}

struct HarmonicMeasurementStruct {
int8u order = 0;
nullable int64s measurement = 1;
}

struct MeasurementRangeStruct {
MeasurementTypeEnum measurementType = 0;
int64s min = 1;
int64s max = 2;
optional epoch_s startTimestamp = 3;
optional epoch_s endTimestamp = 4;
optional epoch_s minTimestamp = 5;
optional epoch_s maxTimestamp = 6;
optional systime_ms startSystime = 7;
optional systime_ms endSystime = 8;
optional systime_ms minSystime = 9;
optional systime_ms maxSystime = 10;
}

info event MeasurementPeriodRanges = 0 {
MeasurementRangeStruct ranges[] = 0;
}

readonly attribute PowerModeEnum powerMode = 0;
readonly attribute int8u numberOfMeasurementTypes = 1;
readonly attribute MeasurementAccuracyStruct accuracy[] = 2;
readonly attribute optional MeasurementRangeStruct ranges[] = 3;
readonly attribute optional nullable voltage_mv voltage = 4;
readonly attribute optional nullable amperage_ma activeCurrent = 5;
readonly attribute optional nullable amperage_ma reactiveCurrent = 6;
readonly attribute optional nullable amperage_ma apparentCurrent = 7;
readonly attribute nullable power_mw activePower = 8;
readonly attribute optional nullable power_mw reactivePower = 9;
readonly attribute optional nullable power_mw apparentPower = 10;
readonly attribute optional nullable voltage_mv RMSVoltage = 11;
readonly attribute optional nullable amperage_ma RMSCurrent = 12;
readonly attribute optional nullable power_mw RMSPower = 13;
readonly attribute optional nullable int64s frequency = 14;
readonly attribute optional nullable HarmonicMeasurementStruct harmonicCurrents[] = 15;
readonly attribute optional nullable HarmonicMeasurementStruct harmonicPhases[] = 16;
readonly attribute optional nullable int64s powerFactor = 17;
readonly attribute optional nullable amperage_ma neutralCurrent = 18;
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;
}

/** This cluster provides a mechanism for querying data about the electrical energy imported or provided by the server. */
provisional cluster ElectricalEnergyMeasurement = 145 {
revision 1;
Expand Down Expand Up @@ -1530,6 +1696,27 @@ endpoint 0 {
ram attribute clusterRevision default = 3;
}

server cluster LocalizationConfiguration {
ram attribute activeLocale;
callback attribute supportedLocales;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
}

server cluster TimeFormatLocalization {
ram attribute hourFormat;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
}

server cluster UnitLocalization {
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
Expand Down Expand Up @@ -1578,6 +1765,7 @@ endpoint 0 {
server cluster GeneralDiagnostics {
callback attribute networkInterfaces;
callback attribute rebootCount;
callback attribute upTime;
ram attribute testEventTriggersEnabled;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
Expand Down Expand Up @@ -1655,7 +1843,7 @@ endpoint 0 {
}
}
endpoint 1 {
device type ma_lightsensor = 262, version 1;
device type energy_evse = 1292, version 1;


server cluster Identify {
Expand Down Expand Up @@ -1685,6 +1873,19 @@ endpoint 1 {
callback attribute clusterRevision;
}

server cluster ElectricalPowerMeasurement {
callback attribute powerMode;
callback attribute numberOfMeasurementTypes;
callback attribute accuracy;
callback attribute activePower;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
callback attribute featureMap;
ram attribute clusterRevision default = 1;
}

server cluster ElectricalEnergyMeasurement {
emits event CumulativeEnergyMeasured;
callback attribute accuracy;
Expand Down
Loading

0 comments on commit 83f8665

Please sign in to comment.