Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c22be0b

Browse files
committedJun 27, 2024·
Update DRLC Cluster to Alchemy ZAP xml output
1 parent 36fd2f0 commit c22be0b

File tree

1 file changed

+74
-72
lines changed

1 file changed

+74
-72
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,21 @@
11
<?xml version="1.0"?>
22
<!--
33
Copyright (c) 2023 Project CHIP Authors
4+
45
Licensed under the Apache License, Version 2.0 (the "License");
56
you may not use this file except in compliance with the License.
67
You may obtain a copy of the License at
8+
79
http://www.apache.org/licenses/LICENSE-2.0
10+
811
Unless required by applicable law or agreed to in writing, software
912
distributed under the License is distributed on an "AS IS" BASIS,
1013
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1114
See the License for the specific language governing permissions and
1215
limitations under the License.
1316
-->
1417
<configurator>
15-
<domain name="Energy"/>
16-
17-
<bitmap name="Feature" type="bitmap32">
18-
<cluster code="0x0096"/>
19-
<field name="TemperatureOffset" mask="0x1"/>
20-
<field name="TemperatureSetpoint" mask="0x2"/>
21-
<field name="LoadAdjustment" mask="0x4"/>
22-
<field name="DutyCycle" mask="0x08"/>
23-
<field name="PowerSavings" mask="0x10"/>
24-
<field name="HeatingSource" mask="0x20"/>
25-
</bitmap>
26-
18+
<domain name="Energy Management"/>
2719
<bitmap name="EventControlBitmap" type="bitmap16">
2820
<cluster code="0x0096"/>
2921
<field name="RandomStart" mask="0x01"/>
@@ -84,20 +76,20 @@ limitations under the License.
8476
<struct name="TemperatureControlStruct">
8577
<cluster code="0x0096"/>
8678
<!-- Note: No TemperatureDifference type available yet in ZAP XML -->
87-
<item fieldId="0" name="CoolingTempOffset" type="int16u" isNullable="true" optional="true" />
88-
<item fieldId="1" name="HeatingtTempOffset" type="int16u" isNullable="true" optional="true" />
89-
<item fieldId="2" name="CoolingTempSetpoint" type="temperature" isNullable="true" optional="true" />
90-
<item fieldId="3" name="HeatingTempSetpoint" type="temperature" isNullable="true" optional="true" />
79+
<item fieldId="0" name="CoolingTempOffset" type="int16s" isNullable="true" optional="true"/>
80+
<item fieldId="1" name="HeatingTempOffset" type="int16s" isNullable="true" optional="true"/>
81+
<item fieldId="2" name="CoolingTempSetpoint" type="temperature" isNullable="true" optional="true"/>
82+
<item fieldId="3" name="HeatingTempSetpoint" type="temperature" isNullable="true" optional="true"/>
9183
</struct>
9284

9385
<struct name="AverageLoadControlStruct">
9486
<cluster code="0x0096"/>
95-
<item fieldId="0" name="LoadAdjustment" type="int8s" min="-100" max="100" />
87+
<item fieldId="0" name="LoadAdjustment" type="int8s" min="-100" max="100"/>
9688
</struct>
9789

9890
<struct name="DutyCycleControlStruct">
9991
<cluster code="0x0096"/>
100-
<item fieldId="0" name="DutyCycle" type="percent" />
92+
<item fieldId="0" name="DutyCycle" type="percent"/>
10193
</struct>
10294

10395
<struct name="PowerSavingsControlStruct">
@@ -107,125 +99,135 @@ limitations under the License.
10799

108100
<struct name="HeatingSourceControlStruct">
109101
<cluster code="0x0096"/>
110-
<item fieldId="0" name="HeatingSource" type="HeatingSourceEnum"/>
102+
<item fieldId="0" name="HeatingSource" type="HeatingSourceEnum" min="0x00" max="0x02"/>
111103
</struct>
112104

113105
<struct name="LoadControlEventTransitionStruct">
114106
<cluster code="0x0096"/>
115-
<item fieldId="0" name="Duration" type="int16u" max="1440"/>
116-
<item fieldId="1" name="Control" type="EventTransitionControlBitmap"/>
107+
<item fieldId="0" name="Duration" type="int16u" max="1440" default="0"/>
108+
<item fieldId="1" name="Control" type="EventTransitionControlBitmap" default="0x0000" min="0x0000" max="0x0003"/>
117109
<item fieldId="2" name="TemperatureControl" type="TemperatureControlStruct" optional="true"/>
118110
<item fieldId="3" name="AverageLoadControl" type="AverageLoadControlStruct" optional="true"/>
119111
<item fieldId="4" name="DutyCycleControl" type="DutyCycleControlStruct" optional="true"/>
120112
<item fieldId="5" name="PowerSavingsControl" type="PowerSavingsControlStruct" optional="true"/>
121113
<item fieldId="6" name="HeatingSourceControl" type="HeatingSourceControlStruct" optional="true"/>
122114
</struct>
123115

124-
<struct name="LoadControlEventStruct">
125-
<cluster code="0x0096"/>
126-
<item fieldId="0" name="EventID" type="octet_string" length="16"/>
127-
<item fieldId="1" name="ProgramID" type="octet_string" length="16" isNullable="true"/>
128-
<item fieldId="2" name="Status" type="LoadControlEventStatusEnum" defaut="0" />
129-
<item fieldId="3" name="Control" type="EventControlBitmap" />
130-
<item fieldId="4" name="Criticality" type="CriticalityLevelEnum" defaut="0" />
131-
<item fieldId="5" name="StartTime" type="epoch_s" isNullable="true" />
132-
<item fieldId="6" name="Transitions" array="true" type="LoadControlEventTransitionStruct" />
116+
<!-- This does not quite match the spec, which has LoadControlEventStruct as a
117+
fabric-scoped struct with some fabric-sensitive fields, but that doesn't
118+
really make sense in all the places where the struct is used, and the spec
119+
does not really define other things in a way that would work with that at
120+
the moment. -->
121+
<struct name="LoadControlEventStruct" isFabricScoped="true">
122+
<cluster code="0x0096"/>
123+
<item fieldId="0" name="EventID" type="octet_string" length="16" default="0" minLength="16"/>
124+
<item fieldId="1" name="ProgramID" type="octet_string" length="16" isNullable="true" isFabricSensitive="true" minLength="16"/>
125+
<item fieldId="2" name="Status" type="LoadControlEventStatusEnum" optional="true" isFabricSensitive="true" min="0x00" max="0x0C"/>
126+
<item fieldId="3" name="Control" type="EventControlBitmap" isFabricSensitive="true" default="0x0001" min="0x0000" max="0x0001"/>
127+
<item fieldId="4" name="Criticality" type="CriticalityLevelEnum" isFabricSensitive="true" default="0x00" min="0x00" max="0x06"/>
128+
<item fieldId="5" name="StartTime" type="epoch_s" defaut="0" isNullable="true" isFabricSensitive="true"/>
129+
<item fieldId="6" name="Transitions" type="LoadControlEventTransitionStruct" array="true" isFabricSensitive="true"/>
133130
</struct>
134131

135-
<struct name="LoadControlProgramStruct">
132+
<struct name="LoadControlProgramStruct" isFabricScoped="true">
136133
<cluster code="0x0096"/>
137-
<item fieldId="0" name="ProgramID" type="octet_string" length="16"/>
138-
<item fieldId="1" name="Name" type="long_char_string" length="32"/>
139-
<item fieldId="2" name="RandomStartMinutes" type="int8u" isNullable="true" min="0x00" max="0x3C"/>
140-
<item fieldId="3" name="RandomDurationMinutes" type="int8u" isNullable="true" min="0x00" max="0x3C"/>
134+
<item fieldId="0" name="ProgramID" type="octet_string" length="16" default="0" minLength="16"/>
135+
<item fieldId="1" name="Name" type="char_string" length="32"/>
136+
<item fieldId="2" name="RandomStartMinutes" type="int8u" isNullable="true" max="60"/>
137+
<item fieldId="3" name="RandomDurationMinutes" type="int8u" isNullable="true" max="0x3C"/>
141138
</struct>
142139

143-
<cluster>
140+
<cluster apiMaturity="provisional">
144141
<name>Demand Response Load Control</name>
145-
<domain>Energy</domain>
142+
<domain>General</domain>
146143
<description>This cluster provides an interface to the functionality of Smart Energy Demand Response and Load Control.</description>
147144
<code>0x0096</code>
148145
<define>DEMAND_RESPONSE_LOAD_CONTROL_CLUSTER</define>
149146
<client tick="false" init="false">true</client>
150147
<server tick="false" init="false">true</server>
151148
<globalAttribute side="either" code="0xFFFD" value="4"/>
152-
153149
<features>
154-
<feature bit="0" code="TEMPO" name="TemperatureOffset" summary="Supports temperature offsets">
150+
<feature bit="0" code="ENRLG" name="Enrollment Groups" summary="Supports enrollment groups">
151+
<optionalConform/>
152+
</feature>
153+
<feature bit="1" code="TEMPO" name="TemperatureOffset" summary="Supports temperature offsets">
155154
<optionalConform choice="a" more="true"/>
156155
</feature>
157-
<feature bit="1" code="TEMPS" name="TemperatureSetpoint" summary="Supports temperature setpoints">
156+
<feature bit="2" code="TEMPS" name="TemperatureSetpoint" summary="Supports temperature setpoints">
158157
<optionalConform choice="a" more="true"/>
159158
</feature>
160-
<feature bit="2" code="LOADA" name="LoadAdjustment" summary="Supports average load adjustment percentage">
159+
<feature bit="3" code="LOADA" name="LoadAdjustment" summary="Supports average load adjustment percentage">
161160
<optionalConform choice="a" more="true"/>
162161
</feature>
163-
<feature bit="3" code="DUTYC" name="DutyCycle" summary="Supports duty cycle adjustment">
162+
<feature bit="4" code="DUTYC" name="DutyCycle" summary="Supports duty cycle adjustment">
164163
<optionalConform choice="a" more="true"/>
165164
</feature>
166-
<feature bit="4" code="PWRSV" name="PowerSavings" summary="Supports power savings">
165+
<feature bit="5" code="PWRSV" name="PowerSavings" summary="Supports power savings">
167166
<optionalConform choice="a" more="true"/>
168167
</feature>
169-
<feature bit="5" code="HEATS" name="HeatingSource" summary="Supports selecting heating source">
168+
<feature bit="6" code="HEATS" name="HeatingSource" summary="Supports selecting heating source">
170169
<optionalConform choice="a" more="true"/>
171170
</feature>
172171
</features>
173-
174-
<attribute side="server" code="0x0000" define="LOAD_CONTROL_PROGRAMS" type="ARRAY" entryType="LoadControlProgramStruct" writable="false">LoadControlPrograms</attribute>
175-
<attribute side="server" code="0x0001" define="NUMBER_OF_LOAD_CONTROL_PROGRAMS" type="int8u" min="5" writable="false" default="5">NumberOfLoadControlPrograms</attribute>
176-
<attribute side="server" code="0x0002" define="LOAD_CONTROL_EVENTS" type="ARRAY" entryType="LoadControlEventStruct" writable="false">Events</attribute>
177-
<attribute side="server" code="0x0003" define="LOAD_CONTROL_ACTIVE_EVENTS" type="ARRAY" entryType="LoadControlEventStruct" writable="false">ActiveEvents</attribute>
178-
<attribute side="server" code="0x0004" define="NUMBER_OF_EVENTS_PER_PROGRAM" type="int8u" min="10" writable="false" default="10">NumberOfEventsPerProgram</attribute>
179-
<attribute side="server" code="0x0005" define="NUMBER_OF_TRANSITIONS" type="int8u" min="3" writable="false" default="3">NumberOfTransitions</attribute>
180-
<attribute side="server" code="0x0006" define="DEFAULT_RANDOM_START" type="int8u" min="0" max="0x3C" default="0x1E" writable="true">
172+
<attribute side="server" code="0x0000" define="LOAD_CONTROL_PROGRAMS" type="array" entryType="LoadControlProgramStruct">LoadControlPrograms</attribute>
173+
<attribute side="server" code="0x0001" define="NUMBER_OF_LOAD_CONTROL_PROGRAMS" type="int8u" min="5" default="5">NumberOfLoadControlPrograms</attribute>
174+
<attribute side="server" code="0x0002" define="LOAD_CONTROL_EVENTS" type="array" entryType="LoadControlEventStruct">Events</attribute>
175+
<attribute side="server" code="0x0003" define="LOAD_CONTROL_ACTIVE_EVENTS" type="array" entryType="octet_string">ActiveEvents</attribute>
176+
<attribute side="server" code="0x0004" define="NUMBER_OF_EVENTS_PER_PROGRAM" type="int8u" min="10" default="10">NumberOfEventsPerProgram</attribute>
177+
<attribute side="server" code="0x0005" define="NUMBER_OF_TRANSITIONS" type="int8u" min="3" default="3">NumberOfTransitions</attribute>
178+
<attribute side="server" code="0x0006" define="DEFAULT_RANDOM_START" type="int8u" max="0x3C" default="0x1E" writable="true">
181179
<description>DefaultRandomStart</description>
182-
<access op="read" privilege="view"/>
183180
<access op="write" privilege="manage"/>
184181
</attribute>
185-
<attribute side="server" code="0x0007" define="DEFAULT_RANDOM_DURATION" type="int8u" min="0" max="0x3C" default="0" writable="true">
182+
<attribute side="server" code="0x0007" define="DEFAULT_RANDOM_DURATION" type="int8u" max="0x3C" default="0" writable="true">
186183
<description>DefaultRandomDuration</description>
187-
<access op="read" privilege="view"/>
188184
<access op="write" privilege="manage"/>
189185
</attribute>
190-
191186
<command source="client" code="0x00" name="RegisterLoadControlProgramRequest" optional="false">
192187
<description>
193188
Upon receipt, this SHALL insert a new LoadControlProgramStruct into LoadControlPrograms, or if the ProgramID matches an existing LoadControlProgramStruct, then the provider SHALL be updated with the provided values.
194189
</description>
195-
<arg name="LoadControlProgram" type="LoadControlProgramStruct"/>
190+
<arg id="0" name="LoadControlProgram" type="LoadControlProgramStruct"/>
196191
</command>
192+
197193
<command source="client" code="0x01" name="UnregisterLoadControlProgramRequest" optional="false">
198194
<description>
199195
Upon receipt, this SHALL remove a the LoadControlProgramStruct from LoadControlPrograms with the matching ProgramID.
200196
</description>
201-
<arg name="LoadControlProgramID" type="octet_string" length="16"/>
197+
<arg id="0" name="LoadControlProgramID" type="octet_string" length="16" minLength="16"/>
202198
</command>
199+
203200
<command source="client" code="0x02" name="AddLoadControlEventRequest" optional="false">
204201
<description>
205202
On receipt of the AddLoadControlEventsRequest command, the server SHALL add a load control event.
206203
</description>
207-
<arg name="Event" type="LoadControlEventStruct"/>
204+
<arg id="0" name="Event" type="LoadControlEventStruct"/>
208205
</command>
206+
209207
<command source="client" code="0x03" name="RemoveLoadControlEventRequest" optional="false">
210208
<description>
211209
Upon receipt, this SHALL remove the LoadControlEventStruct with the matching EventID from LoadEventPrograms.
212210
</description>
213-
<arg name="EventID" type="octet_string" length="16"/>
214-
<arg name="CancelControl" type="CancelControlBitmap"/>
211+
<arg id="0" name="EventID" type="octet_string" length="16" minLength="16"/>
212+
<arg id="1" name="CancelControl" type="CancelControlBitmap" default="0x0000" min="0x0000" max="0x0001"/>
215213
</command>
216214

217-
<event side="server" code="0x00" name="LoadControlEventStatusChange" priority="info" optional="false">
215+
<event side="server" code="0x00" name="LoadControlEventStatusChange" priority="info" isFabricSensitive="true">
218216
<description>This event SHALL be generated when the status of a LoadControlEventStruct changes.</description>
219-
<field id="0" name="EventID" type="octet_string" length="16"/>
220-
<field id="1" name="TransitionIndex" type="int8u" isNullable="true"/>
221-
<field id="2" name="Status" type="LoadControlEventStatusEnum"/>
222-
<field id="3" name="Criticality" type="CriticalityLevelEnum"/>
223-
<field id="4" name="Control" type="EventControlBitmap"/>
224-
<field id="5" name="TemperatureControl" type="TemperatureControlStruct" isNullable="true" optional="true" />
225-
<field id="6" name="AverageLoadControl" type="AverageLoadControlStruct" isNullable="true" optional="true" />
226-
<field id="7" name="DutyCycleControl" type="DutyCycleControlStruct" isNullable="true" optional="true" />
227-
<field id="8" name="PowerSavingsControl" type="PowerSavingsControlStruct" isNullable="true" optional="true" />
228-
<field id="9" name="HeatingSourceControl" type="HeatingSourceControlStruct" isNullable="true" optional="true" />
217+
<field id="0" name="EventID" type="octet_string" length="16" minLength="16"/>
218+
<field id="1" name="TransitionIndex" type="int8u"/>
219+
<field id="2" name="Status" type="LoadControlEventStatusEnum" min="0x00" max="0x0C"/>
220+
<field id="3" name="Criticality" type="CriticalityLevelEnum" min="0x00" max="0x06"/>
221+
<field id="4" name="Control" type="EventControlBitmap" default="0x0000" min="0x0000" max="0x0001"/>
222+
<field id="5" name="TemperatureControl" type="TemperatureControlStruct" isNullable="true" optional="true"/>
223+
<field id="6" name="AverageLoadControl" type="AverageLoadControlStruct" isNullable="true" optional="true"/>
224+
<field id="7" name="DutyCycleControl" type="DutyCycleControlStruct" isNullable="true" optional="true"/>
225+
<field id="8" name="PowerSavingsControl" type="PowerSavingsControlStruct" isNullable="true" optional="true"/>
226+
<field id="9" name="HeatingSourceControl" type="HeatingSourceControlStruct" isNullable="true" optional="true"/>
227+
<!-- Spec has an invalid field ID that cannot be used, so not enabling the Signature field for now. See
228+
https://github.com/CHIP-Specifications/connectedhomeip-spec/issues/8515 -->
229+
<!-- <field id="0xFF" name="Signature" type="octet_string" length="48" isNullable="true"/> -->
229230
</event>
231+
230232
</cluster>
231233
</configurator>

0 commit comments

Comments
 (0)
Please sign in to comment.