Skip to content

Commit 954af09

Browse files
Add XML of Meter Indentification cluster and generated files
1 parent 8b905ab commit 954af09

Some content is hidden

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

44 files changed

+6427
-0
lines changed

.github/workflows/tests.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ jobs:
202202
src/app/zap-templates/zcl/data-model/chip/sample-mei-cluster.xml \
203203
src/app/zap-templates/zcl/data-model/chip/electrical-energy-measurement-cluster.xml \
204204
src/app/zap-templates/zcl/data-model/chip/electrical-power-measurement-cluster.xml \
205+
src/app/zap-templates/zcl/data-model/chip/meter-identification-cluster.xml \
205206
"
206207
- name: Build Apps
207208
run: |
+135
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
Copyright (C) Connectivity Standards Alliance (2024). All rights reserved.
4+
The information within this document is the property of the Connectivity
5+
Standards Alliance and its use and disclosure are restricted, except as
6+
expressly set forth herein.
7+
8+
Connectivity Standards Alliance hereby grants you a fully-paid, non-exclusive,
9+
nontransferable, worldwide, limited and revocable license (without the right to
10+
sublicense), under Connectivity Standards Alliance's applicable copyright
11+
rights, to view, download, save, reproduce and use the document solely for your
12+
own internal purposes and in accordance with the terms of the license set forth
13+
herein. This license does not authorize you to, and you expressly warrant that
14+
you shall not: (a) permit others (outside your organization) to use this
15+
document; (b) post or publish this document; (c) modify, adapt, translate, or
16+
otherwise change this document in any manner or create any derivative work
17+
based on this document; (d) remove or modify any notice or label on this
18+
document, including this Copyright Notice, License and Disclaimer. The
19+
Connectivity Standards Alliance does not grant you any license hereunder other
20+
than as expressly stated herein.
21+
22+
Elements of this document may be subject to third party intellectual property
23+
rights, including without limitation, patent, copyright or trademark rights,
24+
and any such third party may or may not be a member of the Connectivity
25+
Standards Alliance. Connectivity Standards Alliance members grant other
26+
Connectivity Standards Alliance members certain intellectual property rights as
27+
set forth in the Connectivity Standards Alliance IPR Policy. Connectivity
28+
Standards Alliance members do not grant you any rights under this license. The
29+
Connectivity Standards Alliance is not responsible for, and shall not be held
30+
responsible in any manner for, identifying or failing to identify any or all
31+
such third party intellectual property rights. Please visit www.csa-iot.org for
32+
more information on how to become a member of the Connectivity Standards
33+
Alliance.
34+
35+
This document and the information contained herein are provided on an “AS IS”
36+
basis and the Connectivity Standards Alliance DISCLAIMS ALL WARRANTIES EXPRESS
37+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO (A) ANY WARRANTY THAT THE USE OF THE
38+
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OF THIRD PARTIES (INCLUDING
39+
WITHOUT LIMITATION ANY INTELLECTUAL PROPERTY RIGHTS INCLUDING PATENT, COPYRIGHT
40+
OR TRADEMARK RIGHTS); OR (B) ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
41+
FOR A PARTICULAR PURPOSE, TITLE OR NONINFRINGEMENT. IN NO EVENT WILL THE
42+
CONNECTIVITY STANDARDS ALLIANCE BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF
43+
BUSINESS, LOSS OF USE OF DATA, INTERRUPTION OF BUSINESS, OR FOR ANY OTHER
44+
DIRECT, INDIRECT, SPECIAL OR EXEMPLARY, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL
45+
DAMAGES OF ANY KIND, IN CONTRACT OR IN TORT, IN CONNECTION WITH THIS DOCUMENT
46+
OR THE INFORMATION CONTAINED HEREIN, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
47+
LOSS OR DAMAGE.
48+
49+
All company, brand and product names in this document may be trademarks that
50+
are the sole property of their respective owners.
51+
52+
This notice and disclaimer must be included on all copies of this document.
53+
54+
Connectivity Standards Alliance
55+
508 Second Street, Suite 206
56+
Davis, CA 95616, USA
57+
58+
:xrefstyle: short
59+
-->
60+
<cluster xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="types types.xsd cluster cluster.xsd" id="0x0B01" name="Meter Identification Cluster" revision="1">
61+
<revisionHistory>
62+
<revision revision="1" summary="Initial version"/>
63+
</revisionHistory>
64+
<clusterIds>
65+
<clusterId id="0x0B01" name="Meter Identification"/>
66+
</clusterIds>
67+
<classification hierarchy="base" role="application" picsCode="MTRID" scope="Endpoint"/>
68+
<features>
69+
<feature bit="0" code="PWRTHLD" name="PowerThreshold" summary="Supports information about power threshold">
70+
<optionalConform/>
71+
</feature>
72+
</features>
73+
<dataTypes>
74+
<enum name="MeterTypeEnum">
75+
<item value="0" name="Utility" summary="Utility Meter">
76+
<mandatoryConform/>
77+
</item>
78+
<item value="1" name="Private" summary="Private Meter">
79+
<mandatoryConform/>
80+
</item>
81+
<item value="2" name="Generic" summary="Generic Meter">
82+
<mandatoryConform/>
83+
</item>
84+
</enum>
85+
<enum name="PowerThresholdSourceEnum">
86+
<item value="0" name="Contract" summary="The value comes from a signed contract">
87+
<mandatoryConform/>
88+
</item>
89+
<item value="1" name="Regulator" summary="The value comes from a legal regulator">
90+
<mandatoryConform/>
91+
</item>
92+
<item value="2" name="Equipment" summary="The value comes from a certified limits of the meter">
93+
<mandatoryConform/>
94+
</item>
95+
</enum>
96+
</dataTypes>
97+
<attributes>
98+
<attribute id="0x0000" name="MeterType" type="MeterTypeEnum" default="null">
99+
<access read="true" readPrivilege="view"/>
100+
<mandatoryConform/>
101+
</attribute>
102+
<attribute id="0x0001" name="CustomerName" type="string" default="null">
103+
<access read="true" write="true" readPrivilege="view" writePrivilege="operate"/>
104+
<quality changeOmitted="false" nullable="true" scene="false" persistence="volatile" reportable="false"/>
105+
<mandatoryConform/>
106+
<constraint type="maxLength" value="64"/>
107+
</attribute>
108+
<attribute id="0x0002" name="UtilityName" type="string" default="null">
109+
<access read="true" readPrivilege="view" />
110+
<quality changeOmitted="false" nullable="true" scene="false" persistence="volatile" reportable="false"/>
111+
<mandatoryConform/>
112+
<constraint type="maxLength" value="16"/>
113+
</attribute>
114+
<attribute id="0x0003" name="PointOfDelivery" type="string" default="null">
115+
<access read="true" readPrivilege="view" />
116+
<quality changeOmitted="false" nullable="true" scene="false" persistence="volatile" reportable="false"/>
117+
<mandatoryConform/>
118+
<constraint type="maxLength" value="16"/>
119+
</attribute>
120+
<attribute id="0x0004" name="PowerThreshold" type="power-mW" default="null">
121+
<access read="true" readPrivilege="view"/>
122+
<quality changeOmitted="false" nullable="true" scene="false" persistence="volatile" reportable="false"/>
123+
<mandatoryConform>
124+
<feature name="PWRTHLD"/>
125+
</mandatoryConform>
126+
</attribute>
127+
<attribute id="0x0005" name="PowerThresholdSource" type="PowerThresholdSourceEnum" default="null">
128+
<access read="true" readPrivilege="view"/>
129+
<quality changeOmitted="false" nullable="true" scene="false" persistence="volatile" reportable="false"/>
130+
<mandatoryConform>
131+
<feature name="PWRTHLD"/>
132+
</mandatoryConform>
133+
</attribute>
134+
</attributes>
135+
</cluster>

docs/zap_clusters.md

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ Generally regenerate using one of:
129129
| 1294 | 0x50E | AccountLogin |
130130
| 1295 | 0x50F | ContentControl |
131131
| 1296 | 0x510 | ContentAppObserver |
132+
| 2817 | 0xB01 | MeterIdentification |
132133
| 2820 | 0xB04 | ElectricalMeasurement |
133134
| 4294048773 | 0xFFF1FC05 | UnitTesting |
134135
| 4294048774 | 0xFFF1FC06 | FaultInjection |

scripts/rules.matterlint

+1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.x
107107
load "../src/app/zap-templates/zcl/data-model/chip/sample-mei-cluster.xml";
108108
load "../src/app/zap-templates/zcl/data-model/chip/electrical-energy-measurement-cluster.xml";
109109
load "../src/app/zap-templates/zcl/data-model/chip/electrical-power-measurement-cluster.xml";
110+
load "../src/app/zap-templates/zcl/data-model/chip/meter-identification-cluster.xml";
110111
load "../src/app/zap-templates/zcl/data-model/draft/barrier-control-cluster.xml";
111112
load "../src/app/zap-templates/zcl/data-model/draft/electrical-measurement-cluster.xml";
112113
load "../src/app/zap-templates/zcl/data-model/draft/input-output-value-clusters.xml";

src/app/common/templates/config-data.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ CommandHandlerInterfaceOnlyClusters:
3636
- Microwave Oven Control
3737
- Energy EVSE
3838
- Energy EVSE Mode
39+
- Meter Identification
3940
- Device Energy Management
4041
- Device Energy Management Mode
4142
- Electrical Power Measurement

src/app/zap-templates/zcl/data-model/all.xml

+1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
<xi:include href="chip/temperature-control-cluster.xml" />
112112
<xi:include href="chip/refrigerator-alarm.xml" />
113113
<xi:include href="chip/matter-devices.xml" />
114+
<xi:include href="chip/meter-identification-cluster.xml" />
114115
<xi:include href="draft/barrier-control.xml" />
115116
<xi:include href="draft/electrical-measurement-cluster.xml" />
116117
<xi:include href="draft/input-output-value-clusters.xml" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
Copyright (c) 2024 Project CHIP Authors
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
Unless required by applicable law or agreed to in writing, software
9+
distributed under the License is distributed on an "AS IS" BASIS,
10+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
See the License for the specific language governing permissions and
12+
limitations under the License.
13+
-->
14+
15+
<configurator>
16+
<domain name="Energy Management"/>
17+
18+
<enum name="MeterTypeEnum" type="enum8">
19+
<cluster code="0x0B01"/>
20+
<item name="Utility" value="0x00"/>
21+
<item name="Private" value="0x01"/>
22+
<item name="Generic" value="0x02"/>
23+
</enum>
24+
25+
<enum name="PowerThresholdSourceEnum" type="enum8">
26+
<cluster code="0x0B01"/>
27+
<item name="Contract" value="0x00"/>
28+
<item name="Regulator" value="0x01"/>
29+
<item name="Equipment" value="0x02"/>
30+
</enum>
31+
32+
<cluster>
33+
<name>Meter Identification</name>
34+
<domain>Energy Management</domain>
35+
<code>0x0B01</code>
36+
<define>METER_IDENTIFICATION_CLUSTER</define>
37+
<client init="false" tick="false">true</client>
38+
<server init="false" tick="false">true</server>
39+
<description>This cluster provides attributes for determining advanced information about utility metering device.</description>
40+
41+
<features>
42+
<feature bit="0" code="PWRTHLD" name="PowerThreshold" summary="Supports information about power threshold">
43+
<provisionalConform/>
44+
</feature>
45+
</features>
46+
47+
<attribute code="0x0000" side="server" define="METER_TYPE" type="MeterTypeEnum" isNullable="true" writable="false">MeterType</attribute>
48+
<attribute code="0x0001" side="server" define="CUSTOMER_NAME" type="char_string" isNullable="true" writable="true" length="64">
49+
<access op="read" privilege="view"/>
50+
<access op="write" privilege="operate"/>
51+
<description>CustomerName</description>
52+
</attribute>
53+
<attribute code="0x0002" side="server" define="UTILITY_NAME" type="char_string" length="16" isNullable="true">UtilityName</attribute>
54+
<attribute code="0x0003" side="server" define="POINT_OF_DELIVERY" type="char_string" length="16" isNullable="true">PointOfDelivery</attribute>
55+
<attribute code="0x0004" side="server" define="POWER_THRESHOLD" type="power_mw" isNullable="true">PowerThreshold</attribute>
56+
<attribute code="0x0005" side="server" define="POWER_THRESHOLD_SOURCE" type="PowerThresholdSourceEnum" isNullable="true">PowerThresholdSource</attribute>
57+
</cluster>
58+
59+
</configurator>

src/app/zap-templates/zcl/zcl-with-test-extensions.json

+1
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131
"window-covering.xml",
132132
"matter-devices.xml",
133133
"sample-mei-cluster.xml",
134+
"meter-identification-cluster.xml",
134135
"types/door-lock.xml",
135136
"types/occupancy-sensing.xml",
136137
"types/thermostat-user-interface-configuration.xml"

src/app/zap-templates/zcl/zcl.json

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@
129129
"window-covering.xml",
130130
"matter-devices.xml",
131131
"sample-mei-cluster.xml",
132+
"meter-identification-cluster.xml",
132133
"types/door-lock.xml",
133134
"types/occupancy-sensing.xml",
134135
"types/thermostat-user-interface-configuration.xml"

src/app/zap_cluster_list.json

+3
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@
131131
"LAUNDRY_DRYER_CONTROLS_CLUSTER": [],
132132
"WIFI_NETWORK_DIAGNOSTICS_CLUSTER": [],
133133
"WINDOW_COVERING_CLUSTER": [],
134+
"METER_INDENTIFICATION_CLUSTER": [],
135+
"METER_IDENTIFICATION_CLUSTER": [],
134136
"ZLL_COMMISSIONING_CLUSTER": []
135137
},
136138
"ServerDirectories": {
@@ -311,6 +313,7 @@
311313
"WIFI_NETWORK_DIAGNOSTICS_CLUSTER": ["wifi-network-diagnostics-server"],
312314
"WIFI_NETWORK_MANAGEMENT_CLUSTER": ["wifi-network-management-server"],
313315
"WINDOW_COVERING_CLUSTER": ["window-covering-server"],
316+
"METER_IDENTIFICATION_CLUSTER": ["meter-identification-server"],
314317
"ZLL_COMMISSIONING_CLUSTER": []
315318
}
316319
}

src/controller/data_model/controller-clusters.matter

+34
Original file line numberDiff line numberDiff line change
@@ -8811,6 +8811,40 @@ provisional cluster ContentAppObserver = 1296 {
88118811
command ContentAppMessage(ContentAppMessageRequest): ContentAppMessageResponse = 0;
88128812
}
88138813

8814+
/** This cluster provides attributes for determining advanced information about utility metering device. */
8815+
cluster MeterIdentification = 2817 {
8816+
revision 1; // NOTE: Default/not specifically set
8817+
8818+
enum MeterTypeEnum : enum8 {
8819+
kUtility = 0;
8820+
kPrivate = 1;
8821+
kGeneric = 2;
8822+
}
8823+
8824+
enum PowerThresholdSourceEnum : enum8 {
8825+
kContract = 0;
8826+
kRegulator = 1;
8827+
kEquipment = 2;
8828+
}
8829+
8830+
bitmap Feature : bitmap32 {
8831+
kPowerThreshold = 0x1;
8832+
}
8833+
8834+
readonly attribute nullable MeterTypeEnum meterType = 0;
8835+
attribute nullable char_string<64> customerName = 1;
8836+
readonly attribute nullable char_string<16> utilityName = 2;
8837+
readonly attribute nullable char_string<16> pointOfDelivery = 3;
8838+
readonly attribute nullable power_mw powerThreshold = 4;
8839+
readonly attribute nullable PowerThresholdSourceEnum powerThresholdSource = 5;
8840+
readonly attribute command_id generatedCommandList[] = 65528;
8841+
readonly attribute command_id acceptedCommandList[] = 65529;
8842+
readonly attribute event_id eventList[] = 65530;
8843+
readonly attribute attrib_id attributeList[] = 65531;
8844+
readonly attribute bitmap32 featureMap = 65532;
8845+
readonly attribute int16u clusterRevision = 65533;
8846+
}
8847+
88148848
/** Attributes related to the electrical properties of a device. This cluster is used by power outlets and other devices that need to provide instantaneous data as opposed to metrology data which should be retrieved from the metering cluster.. */
88158849
deprecated cluster ElectricalMeasurement = 2820 {
88168850
revision 3;

0 commit comments

Comments
 (0)