Skip to content

Commit 005fc35

Browse files
authored
Merge branch 'master' into rjosefsen/update-occupancy-sensing-revision
2 parents 6da7e12 + 38d5e18 commit 005fc35

File tree

216 files changed

+21783
-2613
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

216 files changed

+21783
-2613
lines changed

.github/workflows/tests.yaml

+24-21
Large diffs are not rendered by default.

BUILD.gn

-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import("//build_overrides/build.gni")
1616
import("//build_overrides/chip.gni")
1717
import("//build_overrides/mbedtls.gni")
1818
import("//build_overrides/nlassert.gni")
19-
import("//build_overrides/nlio.gni")
2019
import("//build_overrides/nlunit_test.gni")
2120
import("//build_overrides/pigweed.gni")
2221

@@ -136,7 +135,6 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
136135
"${chip_root}/src/system",
137136
"${chip_root}/src/transport",
138137
"${nlassert_root}:nlassert",
139-
"${nlio_root}:nlio",
140138
"${nlunit_test_root}:nlunit-test",
141139
]
142140

docs/clusters.md

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ Generally regenerate using one of:
7777
| 114 | 0x72 | ActivatedCarbonFilterMonitoring |
7878
| 128 | 0x80 | BooleanStateConfiguration |
7979
| 129 | 0x81 | ValveConfigurationAndControl |
80+
| 144 | 0x90 | ElectricalPowerMeasurement |
8081
| 145 | 0x91 | ElectricalEnergyMeasurement |
8182
| 150 | 0x96 | DemandResponseLoadControl |
8283
| 151 | 0x97 | Messages |

examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

+145-2
Original file line numberDiff line numberDiff line change
@@ -3859,6 +3859,111 @@ provisional cluster ValveConfigurationAndControl = 129 {
38593859
command Close(): DefaultSuccess = 1;
38603860
}
38613861

3862+
/** This cluster provides a mechanism for querying data about electrical power as measured by the server. */
3863+
provisional cluster ElectricalPowerMeasurement = 144 {
3864+
revision 1;
3865+
3866+
enum MeasurementTypeEnum : enum16 {
3867+
kUnspecified = 0;
3868+
kVoltage = 1;
3869+
kActiveCurrent = 2;
3870+
kReactiveCurrent = 3;
3871+
kApparentCurrent = 4;
3872+
kActivePower = 5;
3873+
kReactivePower = 6;
3874+
kApparentPower = 7;
3875+
kRMSVoltage = 8;
3876+
kRMSCurrent = 9;
3877+
kRMSPower = 10;
3878+
kFrequency = 11;
3879+
kPowerFactor = 12;
3880+
kNeutralCurrent = 13;
3881+
kElectricalEnergy = 14;
3882+
}
3883+
3884+
enum PowerModeEnum : enum8 {
3885+
kUnknown = 0;
3886+
kDC = 1;
3887+
kAC = 2;
3888+
}
3889+
3890+
bitmap Feature : bitmap32 {
3891+
kDirectCurrent = 0x1;
3892+
kAlternatingCurrent = 0x2;
3893+
kPolyphasePower = 0x4;
3894+
kHarmonics = 0x8;
3895+
kPowerQuality = 0x10;
3896+
}
3897+
3898+
struct MeasurementAccuracyRangeStruct {
3899+
int64s rangeMin = 0;
3900+
int64s rangeMax = 1;
3901+
optional percent100ths percentMax = 2;
3902+
optional percent100ths percentMin = 3;
3903+
optional percent100ths percentTypical = 4;
3904+
optional int64u fixedMax = 5;
3905+
optional int64u fixedMin = 6;
3906+
optional int64u fixedTypical = 7;
3907+
}
3908+
3909+
struct MeasurementAccuracyStruct {
3910+
MeasurementTypeEnum measurementType = 0;
3911+
boolean measured = 1;
3912+
int64s minMeasuredValue = 2;
3913+
int64s maxMeasuredValue = 3;
3914+
MeasurementAccuracyRangeStruct accuracyRanges[] = 4;
3915+
}
3916+
3917+
struct HarmonicMeasurementStruct {
3918+
int8u order = 0;
3919+
nullable int64s measurement = 1;
3920+
}
3921+
3922+
struct MeasurementRangeStruct {
3923+
MeasurementTypeEnum measurementType = 0;
3924+
int64s min = 1;
3925+
int64s max = 2;
3926+
optional epoch_s startTimestamp = 3;
3927+
optional epoch_s endTimestamp = 4;
3928+
optional epoch_s minTimestamp = 5;
3929+
optional epoch_s maxTimestamp = 6;
3930+
optional systime_ms startSystime = 7;
3931+
optional systime_ms endSystime = 8;
3932+
optional systime_ms minSystime = 9;
3933+
optional systime_ms maxSystime = 10;
3934+
}
3935+
3936+
info event MeasurementPeriodRanges = 0 {
3937+
MeasurementRangeStruct ranges[] = 0;
3938+
}
3939+
3940+
readonly attribute PowerModeEnum powerMode = 0;
3941+
readonly attribute int8u numberOfMeasurementTypes = 1;
3942+
readonly attribute MeasurementAccuracyStruct accuracy[] = 2;
3943+
readonly attribute optional MeasurementRangeStruct ranges[] = 3;
3944+
readonly attribute optional nullable voltage_mv voltage = 4;
3945+
readonly attribute optional nullable amperage_ma activeCurrent = 5;
3946+
readonly attribute optional nullable amperage_ma reactiveCurrent = 6;
3947+
readonly attribute optional nullable amperage_ma apparentCurrent = 7;
3948+
readonly attribute nullable power_mw activePower = 8;
3949+
readonly attribute optional nullable power_mw reactivePower = 9;
3950+
readonly attribute optional nullable power_mw apparentPower = 10;
3951+
readonly attribute optional nullable voltage_mv RMSVoltage = 11;
3952+
readonly attribute optional nullable amperage_ma RMSCurrent = 12;
3953+
readonly attribute optional nullable power_mw RMSPower = 13;
3954+
readonly attribute optional nullable int64s frequency = 14;
3955+
readonly attribute optional nullable HarmonicMeasurementStruct harmonicCurrents[] = 15;
3956+
readonly attribute optional nullable HarmonicMeasurementStruct harmonicPhases[] = 16;
3957+
readonly attribute optional nullable int64s powerFactor = 17;
3958+
readonly attribute optional nullable amperage_ma neutralCurrent = 18;
3959+
readonly attribute command_id generatedCommandList[] = 65528;
3960+
readonly attribute command_id acceptedCommandList[] = 65529;
3961+
readonly attribute event_id eventList[] = 65530;
3962+
readonly attribute attrib_id attributeList[] = 65531;
3963+
readonly attribute bitmap32 featureMap = 65532;
3964+
readonly attribute int16u clusterRevision = 65533;
3965+
}
3966+
38623967
/** This cluster provides a mechanism for querying data about the electrical energy imported or provided by the server. */
38633968
provisional cluster ElectricalEnergyMeasurement = 145 {
38643969
revision 1;
@@ -3907,8 +4012,15 @@ provisional cluster ElectricalEnergyMeasurement = 145 {
39074012
MeasurementAccuracyRangeStruct accuracyRanges[] = 4;
39084013
}
39094014

4015+
struct CumulativeEnergyResetStruct {
4016+
optional nullable epoch_s importedResetTimestamp = 0;
4017+
optional nullable epoch_s exportedResetTimestamp = 1;
4018+
optional nullable systime_ms importedResetSystime = 2;
4019+
optional nullable systime_ms exportedResetSystime = 3;
4020+
}
4021+
39104022
struct EnergyMeasurementStruct {
3911-
int64s energy = 0;
4023+
energy_mwh energy = 0;
39124024
optional epoch_s startTimestamp = 1;
39134025
optional epoch_s endTimestamp = 2;
39144026
optional systime_ms startSystime = 3;
@@ -3930,6 +4042,7 @@ provisional cluster ElectricalEnergyMeasurement = 145 {
39304042
readonly attribute optional nullable EnergyMeasurementStruct cumulativeEnergyExported = 2;
39314043
readonly attribute optional nullable EnergyMeasurementStruct periodicEnergyImported = 3;
39324044
readonly attribute optional nullable EnergyMeasurementStruct periodicEnergyExported = 4;
4045+
readonly attribute optional nullable CumulativeEnergyResetStruct cumulativeEnergyReset = 5;
39334046
readonly attribute command_id generatedCommandList[] = 65528;
39344047
readonly attribute command_id acceptedCommandList[] = 65529;
39354048
readonly attribute event_id eventList[] = 65530;
@@ -8083,6 +8196,35 @@ endpoint 1 {
80838196
handle command Close;
80848197
}
80858198

8199+
server cluster ElectricalPowerMeasurement {
8200+
emits event MeasurementPeriodRanges;
8201+
callback attribute powerMode;
8202+
callback attribute numberOfMeasurementTypes;
8203+
callback attribute accuracy;
8204+
callback attribute ranges;
8205+
callback attribute voltage;
8206+
callback attribute activeCurrent;
8207+
callback attribute reactiveCurrent;
8208+
callback attribute apparentCurrent;
8209+
callback attribute activePower;
8210+
callback attribute reactivePower;
8211+
callback attribute apparentPower;
8212+
callback attribute RMSVoltage;
8213+
callback attribute RMSCurrent;
8214+
callback attribute RMSPower;
8215+
callback attribute frequency;
8216+
callback attribute harmonicCurrents;
8217+
callback attribute harmonicPhases;
8218+
callback attribute powerFactor;
8219+
callback attribute neutralCurrent;
8220+
callback attribute generatedCommandList;
8221+
callback attribute acceptedCommandList;
8222+
callback attribute eventList;
8223+
callback attribute attributeList;
8224+
callback attribute featureMap;
8225+
ram attribute clusterRevision default = 1;
8226+
}
8227+
80868228
server cluster ElectricalEnergyMeasurement {
80878229
emits event CumulativeEnergyMeasured;
80888230
emits event PeriodicEnergyMeasured;
@@ -8091,11 +8233,12 @@ endpoint 1 {
80918233
callback attribute cumulativeEnergyExported;
80928234
callback attribute periodicEnergyImported;
80938235
callback attribute periodicEnergyExported;
8236+
callback attribute cumulativeEnergyReset;
80948237
callback attribute generatedCommandList;
80958238
callback attribute acceptedCommandList;
80968239
callback attribute eventList;
80978240
callback attribute attributeList;
8098-
ram attribute featureMap default = 0x000F;
8241+
callback attribute featureMap;
80998242
ram attribute clusterRevision default = 1;
81008243
}
81018244

0 commit comments

Comments
 (0)