matterbridge 1.5.2 → 1.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/CHANGELOG.md +31 -2
  2. package/README-DEV.md +4 -2
  3. package/dist/cluster/export.d.ts +1 -22
  4. package/dist/cluster/export.d.ts.map +1 -1
  5. package/dist/cluster/export.js +2 -22
  6. package/dist/cluster/export.js.map +1 -1
  7. package/dist/index.d.ts +3 -25
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +3 -32
  10. package/dist/index.js.map +1 -1
  11. package/dist/matterbridge.d.ts +3 -1
  12. package/dist/matterbridge.d.ts.map +1 -1
  13. package/dist/matterbridge.js +127 -20
  14. package/dist/matterbridge.js.map +1 -1
  15. package/dist/matterbridgeDevice.d.ts +4608 -2298
  16. package/dist/matterbridgeDevice.d.ts.map +1 -1
  17. package/dist/matterbridgeDevice.js +170 -582
  18. package/dist/matterbridgeDevice.js.map +1 -1
  19. package/dist/matterbridgeTypes.d.ts +3 -0
  20. package/dist/matterbridgeTypes.d.ts.map +1 -1
  21. package/dist/pluginManager.d.ts.map +1 -1
  22. package/dist/pluginManager.js +20 -4
  23. package/dist/pluginManager.js.map +1 -1
  24. package/frontend/build/asset-manifest.json +3 -3
  25. package/frontend/build/index.html +1 -1
  26. package/frontend/build/static/js/{main.cfcfbb06.js → main.f86befcf.js} +3 -3
  27. package/frontend/build/static/js/main.f86befcf.js.map +1 -0
  28. package/package.json +13 -8
  29. package/dist/cluster/AirQualityCluster.d.ts +0 -188
  30. package/dist/cluster/AirQualityCluster.d.ts.map +0 -1
  31. package/dist/cluster/AirQualityCluster.js +0 -98
  32. package/dist/cluster/AirQualityCluster.js.map +0 -1
  33. package/dist/cluster/BooleanStateConfigurationCluster.d.ts +0 -2200
  34. package/dist/cluster/BooleanStateConfigurationCluster.d.ts.map +0 -1
  35. package/dist/cluster/BooleanStateConfigurationCluster.js +0 -388
  36. package/dist/cluster/BooleanStateConfigurationCluster.js.map +0 -1
  37. package/dist/cluster/BridgedDeviceBasicInformationCluster.d.ts +0 -223
  38. package/dist/cluster/BridgedDeviceBasicInformationCluster.d.ts.map +0 -1
  39. package/dist/cluster/BridgedDeviceBasicInformationCluster.js +0 -177
  40. package/dist/cluster/BridgedDeviceBasicInformationCluster.js.map +0 -1
  41. package/dist/cluster/CarbonDioxideConcentrationMeasurementCluster.d.ts +0 -396
  42. package/dist/cluster/CarbonDioxideConcentrationMeasurementCluster.d.ts.map +0 -1
  43. package/dist/cluster/CarbonDioxideConcentrationMeasurementCluster.js +0 -30
  44. package/dist/cluster/CarbonDioxideConcentrationMeasurementCluster.js.map +0 -1
  45. package/dist/cluster/CarbonMonoxideConcentrationMeasurementCluster.d.ts +0 -396
  46. package/dist/cluster/CarbonMonoxideConcentrationMeasurementCluster.d.ts.map +0 -1
  47. package/dist/cluster/CarbonMonoxideConcentrationMeasurementCluster.js +0 -30
  48. package/dist/cluster/CarbonMonoxideConcentrationMeasurementCluster.js.map +0 -1
  49. package/dist/cluster/ConcentrationMeasurementCluster.d.ts +0 -524
  50. package/dist/cluster/ConcentrationMeasurementCluster.d.ts.map +0 -1
  51. package/dist/cluster/ConcentrationMeasurementCluster.js +0 -282
  52. package/dist/cluster/ConcentrationMeasurementCluster.js.map +0 -1
  53. package/dist/cluster/DeviceEnergyManagementCluster.d.ts +0 -7851
  54. package/dist/cluster/DeviceEnergyManagementCluster.d.ts.map +0 -1
  55. package/dist/cluster/DeviceEnergyManagementCluster.js +0 -1634
  56. package/dist/cluster/DeviceEnergyManagementCluster.js.map +0 -1
  57. package/dist/cluster/DeviceEnergyManagementModeCluster.d.ts +0 -68
  58. package/dist/cluster/DeviceEnergyManagementModeCluster.d.ts.map +0 -1
  59. package/dist/cluster/DeviceEnergyManagementModeCluster.js +0 -49
  60. package/dist/cluster/DeviceEnergyManagementModeCluster.js.map +0 -1
  61. package/dist/cluster/ElectricalEnergyMeasurementCluster.d.ts +0 -4978
  62. package/dist/cluster/ElectricalEnergyMeasurementCluster.d.ts.map +0 -1
  63. package/dist/cluster/ElectricalEnergyMeasurementCluster.js +0 -510
  64. package/dist/cluster/ElectricalEnergyMeasurementCluster.js.map +0 -1
  65. package/dist/cluster/ElectricalPowerMeasurementCluster.d.ts +0 -3250
  66. package/dist/cluster/ElectricalPowerMeasurementCluster.d.ts.map +0 -1
  67. package/dist/cluster/ElectricalPowerMeasurementCluster.js +0 -675
  68. package/dist/cluster/ElectricalPowerMeasurementCluster.js.map +0 -1
  69. package/dist/cluster/FanControlCluster.d.ts +0 -1583
  70. package/dist/cluster/FanControlCluster.d.ts.map +0 -1
  71. package/dist/cluster/FanControlCluster.js +0 -492
  72. package/dist/cluster/FanControlCluster.js.map +0 -1
  73. package/dist/cluster/FormaldehydeConcentrationMeasurementCluster.d.ts +0 -396
  74. package/dist/cluster/FormaldehydeConcentrationMeasurementCluster.d.ts.map +0 -1
  75. package/dist/cluster/FormaldehydeConcentrationMeasurementCluster.js +0 -30
  76. package/dist/cluster/FormaldehydeConcentrationMeasurementCluster.js.map +0 -1
  77. package/dist/cluster/MeasurementAccuracy.d.ts +0 -63
  78. package/dist/cluster/MeasurementAccuracy.d.ts.map +0 -1
  79. package/dist/cluster/MeasurementAccuracy.js +0 -47
  80. package/dist/cluster/MeasurementAccuracy.js.map +0 -1
  81. package/dist/cluster/MeasurementAccuracyRange.d.ts +0 -134
  82. package/dist/cluster/MeasurementAccuracyRange.d.ts.map +0 -1
  83. package/dist/cluster/MeasurementAccuracyRange.js +0 -103
  84. package/dist/cluster/MeasurementAccuracyRange.js.map +0 -1
  85. package/dist/cluster/MeasurementType.d.ts +0 -68
  86. package/dist/cluster/MeasurementType.d.ts.map +0 -1
  87. package/dist/cluster/MeasurementType.js +0 -69
  88. package/dist/cluster/MeasurementType.js.map +0 -1
  89. package/dist/cluster/NitrogenDioxideConcentrationMeasurementCluster.d.ts +0 -396
  90. package/dist/cluster/NitrogenDioxideConcentrationMeasurementCluster.d.ts.map +0 -1
  91. package/dist/cluster/NitrogenDioxideConcentrationMeasurementCluster.js +0 -34
  92. package/dist/cluster/NitrogenDioxideConcentrationMeasurementCluster.js.map +0 -1
  93. package/dist/cluster/OzoneConcentrationMeasurementCluster.d.ts +0 -395
  94. package/dist/cluster/OzoneConcentrationMeasurementCluster.d.ts.map +0 -1
  95. package/dist/cluster/OzoneConcentrationMeasurementCluster.js +0 -29
  96. package/dist/cluster/OzoneConcentrationMeasurementCluster.js.map +0 -1
  97. package/dist/cluster/Pm10ConcentrationMeasurementCluster.d.ts +0 -395
  98. package/dist/cluster/Pm10ConcentrationMeasurementCluster.d.ts.map +0 -1
  99. package/dist/cluster/Pm10ConcentrationMeasurementCluster.js +0 -29
  100. package/dist/cluster/Pm10ConcentrationMeasurementCluster.js.map +0 -1
  101. package/dist/cluster/Pm1ConcentrationMeasurementCluster.d.ts +0 -395
  102. package/dist/cluster/Pm1ConcentrationMeasurementCluster.d.ts.map +0 -1
  103. package/dist/cluster/Pm1ConcentrationMeasurementCluster.js +0 -29
  104. package/dist/cluster/Pm1ConcentrationMeasurementCluster.js.map +0 -1
  105. package/dist/cluster/Pm25ConcentrationMeasurementCluster.d.ts +0 -395
  106. package/dist/cluster/Pm25ConcentrationMeasurementCluster.d.ts.map +0 -1
  107. package/dist/cluster/Pm25ConcentrationMeasurementCluster.js +0 -29
  108. package/dist/cluster/Pm25ConcentrationMeasurementCluster.js.map +0 -1
  109. package/dist/cluster/PowerTopologyCluster.d.ts +0 -345
  110. package/dist/cluster/PowerTopologyCluster.d.ts.map +0 -1
  111. package/dist/cluster/PowerTopologyCluster.js +0 -138
  112. package/dist/cluster/PowerTopologyCluster.js.map +0 -1
  113. package/dist/cluster/RadonConcentrationMeasurementCluster.d.ts +0 -395
  114. package/dist/cluster/RadonConcentrationMeasurementCluster.d.ts.map +0 -1
  115. package/dist/cluster/RadonConcentrationMeasurementCluster.js +0 -29
  116. package/dist/cluster/RadonConcentrationMeasurementCluster.js.map +0 -1
  117. package/dist/cluster/SmokeCoAlarmCluster.d.ts +0 -1575
  118. package/dist/cluster/SmokeCoAlarmCluster.d.ts.map +0 -1
  119. package/dist/cluster/SmokeCoAlarmCluster.js +0 -603
  120. package/dist/cluster/SmokeCoAlarmCluster.js.map +0 -1
  121. package/dist/cluster/TvocCluster.d.ts +0 -465
  122. package/dist/cluster/TvocCluster.d.ts.map +0 -1
  123. package/dist/cluster/TvocCluster.js +0 -197
  124. package/dist/cluster/TvocCluster.js.map +0 -1
  125. package/frontend/build/static/js/main.cfcfbb06.js.map +0 -1
  126. /package/frontend/build/static/js/{main.cfcfbb06.js.LICENSE.txt → main.f86befcf.js.LICENSE.txt} +0 -0
@@ -1,1634 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-namespace */
2
- /**
3
- * @license
4
- * Copyright 2022-2024 Matter.js Authors
5
- * SPDX-License-Identifier: Apache-2.0
6
- */
7
- /** * THIS FILE IS GENERATED, DO NOT EDIT ***/
8
- import { ClusterRegistry, Command, EventPriority, FixedAttribute, MutableCluster, TlvNoResponse } from '@project-chip/matter-node.js/cluster';
9
- import { Attribute, Event } from '@project-chip/matter-node.js/cluster';
10
- import { BitFlag } from '@project-chip/matter-node.js/schema';
11
- import { TlvObject, TlvField, TlvEpochS, TlvEnum, TlvBoolean, TlvNoArguments, TlvInt64, TlvUInt32, TlvInt32, TlvUInt8, TlvOptionalField, TlvUInt16, TlvArray, TlvNullable, TlvInt8 } from '@project-chip/matter-node.js/tlv';
12
- export var DeviceEnergyManagement;
13
- (function (DeviceEnergyManagement) {
14
- /**
15
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.9
16
- */
17
- DeviceEnergyManagement.TlvPowerAdjust = TlvObject({
18
- /**
19
- * This field shall indicate the minimum power that the ESA can have its power adjusted to.
20
- *
21
- * Note that this is a signed value. Negative values indicate power flows away from loads (e.g. charging a
22
- * battery inverter).
23
- *
24
- * MinPower shall be less than MaxPower.
25
- *
26
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.9.1
27
- */
28
- minPower: TlvField(0, TlvInt64),
29
- /**
30
- * This field shall indicate the maximum power that the ESA can have its power adjusted to.
31
- *
32
- * Note that this is a signed value. Negative values indicate power flows away from loads (e.g. charging a
33
- * battery inverter).
34
- *
35
- * MinPower shall be less than MaxPower.
36
- *
37
- * For example, if the charging current of an EVSE can be adjusted within the range of 6A to 32A on a 230V
38
- * supply, then the power adjustment range is between 1380W and 7360W. Here the MinPower would be 1380W, and
39
- * MaxPower would be 7360W.
40
- *
41
- * For example, if a battery storage inverter can discharge between 0 to 3000W towards a load, then its
42
- * MinPower would be 0W and its MaxPower would be 3000W.
43
- *
44
- * In another example, if a battery storage inverter can charge its internal battery, between 0W and 2000W.
45
- * Here power is flowing away from the home loads, so the power values need to be negative. As such the
46
- * MinPower becomes -2000W and MaxPower becomes 0W.
47
- *
48
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.9.2
49
- */
50
- maxPower: TlvField(1, TlvInt64),
51
- /**
52
- * This field shall indicate the minimum duration, in seconds, that a controller may invoke an ESA power
53
- * adjustment. Manufacturers may use this to as an anti-cycling capability to avoid controllers from rapidly
54
- * making power adjustments.
55
- *
56
- * Note that MinDuration shall be less than MaxDuration.
57
- *
58
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.9.3
59
- */
60
- minDuration: TlvField(2, TlvUInt32),
61
- /**
62
- * This field shall indicate the maximum duration, in seconds, that a controller may invoke an ESA power
63
- * adjustment. Manufacturers may use this to protect the user experience, to avoid over heating of the ESA,
64
- * ensuring that there is sufficient headroom to use or store energy in the ESA or for any other reason.
65
- *
66
- * Note that MinDuration shall be less than MaxDuration.
67
- *
68
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.9.4
69
- */
70
- maxDuration: TlvField(3, TlvUInt32),
71
- });
72
- /**
73
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.6
74
- */
75
- let AdjustmentCause;
76
- (function (AdjustmentCause) {
77
- /**
78
- * The adjustment is to optimize the local energy usage
79
- */
80
- AdjustmentCause[AdjustmentCause["LocalOptimization"] = 0] = "LocalOptimization";
81
- /**
82
- * The adjustment is to optimize the grid energy usage
83
- */
84
- AdjustmentCause[AdjustmentCause["GridOptimization"] = 1] = "GridOptimization";
85
- })(AdjustmentCause = DeviceEnergyManagement.AdjustmentCause || (DeviceEnergyManagement.AdjustmentCause = {}));
86
- /**
87
- * Input to the DeviceEnergyManagement powerAdjustRequest command
88
- *
89
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.1
90
- */
91
- DeviceEnergyManagement.TlvPowerAdjustRequest = TlvObject({
92
- /**
93
- * This field shall indicate the power that the ESA shall use during the adjustment period.
94
- *
95
- * This value shall be between the MinPower and MaxPower fields of the PowerAdjustStruct in the
96
- * PowerAdjustmentCapability attribute.
97
- *
98
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.1.1
99
- */
100
- power: TlvField(0, TlvInt64),
101
- /**
102
- * This field shall indicate the duration that the ESA shall maintain the requested power for.
103
- *
104
- * This value shall be between the MinDuration and MaxDuration fields of the PowerAdjustStruct in the
105
- * PowerAdjustmentCapability attribute.
106
- *
107
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.1.2
108
- */
109
- duration: TlvField(1, TlvUInt32),
110
- /**
111
- * This field shall indicate the cause of the request from the EMS.
112
- *
113
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.1.3
114
- */
115
- cause: TlvField(2, TlvEnum()),
116
- });
117
- /**
118
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.5
119
- */
120
- let Cause;
121
- (function (Cause) {
122
- /**
123
- * The ESA completed the power adjustment as requested
124
- */
125
- Cause[Cause["NormalCompletion"] = 0] = "NormalCompletion";
126
- /**
127
- * The ESA was set to offline
128
- */
129
- Cause[Cause["Offline"] = 1] = "Offline";
130
- /**
131
- * The ESA has developed a fault could not complete the adjustment
132
- */
133
- Cause[Cause["Fault"] = 2] = "Fault";
134
- /**
135
- * The user has disabled the ESA’s flexibility capability
136
- */
137
- Cause[Cause["UserOptOut"] = 3] = "UserOptOut";
138
- /**
139
- * The adjustment was cancelled by a client
140
- */
141
- Cause[Cause["Cancelled"] = 4] = "Cancelled";
142
- })(Cause = DeviceEnergyManagement.Cause || (DeviceEnergyManagement.Cause = {}));
143
- /**
144
- * Body of the DeviceEnergyManagement powerAdjustEnd event
145
- *
146
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.10.2
147
- */
148
- DeviceEnergyManagement.TlvPowerAdjustEndEvent = TlvObject({
149
- /**
150
- * This field shall indicate the reason why the power adjustment session ended.
151
- *
152
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.10.2.1
153
- */
154
- cause: TlvField(0, TlvEnum()),
155
- /**
156
- * This field shall indicate the number of seconds that the power adjustment session lasted before ending.
157
- *
158
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.10.2.2
159
- */
160
- duration: TlvField(1, TlvUInt32),
161
- /**
162
- * This field shall indicate the approximate energy used by the ESA during the session.
163
- *
164
- * For example, if the ESA was on and was adjusted to be switched off, then this shall be 0W. If this was a
165
- * battery inverter that was requested to charge it would have a negative energy use. If this was a normal load
166
- * that was turned on, then it will have positive value.
167
- *
168
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.10.2.3
169
- */
170
- energyUse: TlvField(2, TlvInt64),
171
- });
172
- /**
173
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.1
174
- */
175
- let CostType;
176
- (function (CostType) {
177
- /**
178
- * Financial cost
179
- *
180
- * This value shall indicate that the cost is related to the financial cost to provide the energy.
181
- *
182
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.1.1
183
- */
184
- CostType[CostType["Financial"] = 0] = "Financial";
185
- /**
186
- * Grid CO2e grams cost
187
- *
188
- * This value shall indicate that the cost is related to greenhouse gas emissions (in grams of CO2e).
189
- *
190
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.1.2
191
- */
192
- CostType[CostType["GhgEmissions"] = 1] = "GhgEmissions";
193
- /**
194
- * Consumer comfort impact cost
195
- *
196
- * This value shall indicate that the cost is related to some abstract sense of comfort expressed by the
197
- * consumer; a higher value indicates more discomfort. For example, a consumer may be more comfortable knowing
198
- * that their EV is charged earlier in the day in case there is a sudden need to depart and drive to the
199
- * hospital. Or the consumer may feel inconvenienced by the fact that they need to wait for the washing machine
200
- * to finish its load so that they can use it again.
201
- *
202
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.1.3
203
- */
204
- CostType[CostType["Comfort"] = 2] = "Comfort";
205
- /**
206
- * Temperature impact cost
207
- *
208
- * This value shall indicate that the cost is related to the temperature of the home or water being at its
209
- * setpoint. Some consumers may be more sensitive to being too hot or too cold.
210
- *
211
- * This is expressed in degrees Celsius.
212
- *
213
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.1.4
214
- */
215
- CostType[CostType["Temperature"] = 3] = "Temperature";
216
- })(CostType = DeviceEnergyManagement.CostType || (DeviceEnergyManagement.CostType = {}));
217
- /**
218
- * This indicates a generic mechanism for expressing cost to run an appliance, in terms of financial, GHG
219
- * emissions, comfort value etc.
220
- *
221
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.8
222
- */
223
- DeviceEnergyManagement.TlvCost = TlvObject({
224
- /**
225
- * This field shall indicate the type of cost being represented (see CostTypeEnum).
226
- *
227
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.8.1
228
- */
229
- costType: TlvField(0, TlvEnum()),
230
- /**
231
- * This field shall indicate the value of the cost. This may be negative (indicating that it is not a cost, but
232
- * a free benefit).
233
- *
234
- * For example, if the Value was -302 and DecimalPoints was 2, then this would represent a benefit of 3.02.
235
- *
236
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.8.2
237
- */
238
- value: TlvField(1, TlvInt32),
239
- /**
240
- * This field shall indicate the number of digits to the right of the decimal point in the Value field. For
241
- * example, if the Value was 102 and DecimalPoints was 2, then this would represent a cost of 1.02.
242
- *
243
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.8.3
244
- */
245
- decimalPoints: TlvField(2, TlvUInt8),
246
- /**
247
- * Indicates the currency for the value in the Value field. The value of the currency field shall match the
248
- * values defined by [ISO 4217].
249
- *
250
- * This is an optional field. It shall be included if CostType is Financial.
251
- *
252
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.8.4
253
- */
254
- currency: TlvOptionalField(3, TlvUInt16.bound({ max: 999 })),
255
- });
256
- /**
257
- * This indicates a specific stage of an ESA’s operation.
258
- *
259
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.11
260
- */
261
- DeviceEnergyManagement.TlvSlot = TlvObject({
262
- /**
263
- * This field shall indicate the minimum time (in seconds) that the appliance expects to be in this slot for.
264
- *
265
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.11.1
266
- */
267
- minDuration: TlvField(0, TlvUInt32),
268
- /**
269
- * This field shall indicate the maximum time (in seconds) that the appliance expects to be in this slot for.
270
- *
271
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.11.2
272
- */
273
- maxDuration: TlvField(1, TlvUInt32),
274
- /**
275
- * This field shall indicate the expected time (in seconds) that the appliance expects to be in this slot for.
276
- *
277
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.11.3
278
- */
279
- defaultDuration: TlvField(2, TlvUInt32),
280
- /**
281
- * This field shall indicate the time (in seconds) that has already elapsed whilst in this slot. If the slot
282
- * has not yet been started, then it shall be 0. Once the slot has been completed, then this reflects how much
283
- * time was spent in this slot.
284
- *
285
- * When subscribed to, a change in this field value shall NOT cause the Forecast attribute to be updated since
286
- * this value may change every 1 second.
287
- *
288
- * When the Forecast attribute is read, then this value shall be the most recent value.
289
- *
290
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.11.4
291
- */
292
- elapsedSlotTime: TlvField(3, TlvUInt32),
293
- /**
294
- * This field shall indicate the time (in seconds) that is estimated to be remaining.
295
- *
296
- * Note that it may not align to the DefaultDuration - ElapsedSlotTime since an appliance may have revised its
297
- * planned operation based on conditions.
298
- *
299
- * When subscribed to, a change in this field value shall NOT cause the Forecast attribute to be updated, since
300
- * this value may change every 1 second.
301
- *
302
- * Note that if the ESA is currently paused, then this value shall not change.
303
- *
304
- * When the Forecast attribute is read, then this value shall be the most recent value.
305
- *
306
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.11.5
307
- */
308
- remainingSlotTime: TlvField(4, TlvUInt32),
309
- slotIsPauseable: TlvOptionalField(5, TlvBoolean),
310
- /**
311
- * This field shall indicate the shortest period that the slot can be paused for. This can be set to avoid
312
- * controllers trying to pause ESAs for short periods and then resuming operation in a cyclic fashion which may
313
- * damage or cause excess energy to be consumed with restarting of an operation.
314
- *
315
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.11.7
316
- */
317
- minPauseDuration: TlvOptionalField(6, TlvUInt32),
318
- /**
319
- * This field shall indicate the longest period that the slot can be paused for.
320
- *
321
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.11.8
322
- */
323
- maxPauseDuration: TlvOptionalField(7, TlvUInt32),
324
- /**
325
- * This field shall indicate a manufacturer defined value indicating the state of the ESA.
326
- *
327
- * This may be used by an observing EMS which also has access to the metering data to ascertain the typical
328
- * power drawn when the ESA is in a manufacturer defined state.
329
- *
330
- * Some appliances, such as smart thermostats, may not know how much power is being drawn by the HVAC system,
331
- * but do know what they have asked the HVAC system to do.
332
- *
333
- * Manufacturers can use this value to indicate a variety of states in an unspecified way. For example, they
334
- * may choose to use values between 0-100 as a percentage of compressor modulation, or could use these values
335
- * as Enum states meaning heating with fan, heating without fan etc.
336
- *
337
- * NOTE An ESA shall always use the same value to represent the same operating state.
338
- *
339
- * By providing this information a smart EMS may be able to learn the observed power draw when the ESA is put
340
- * into a specific state. It can potentially then use the information in the PowerForecastReporting data to
341
- * predict the power draw from the appliance and potentially ask it to modify its timing via one of the
342
- * adjustment request commands, or adjust other ESAs power to compensate.
343
- *
344
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.11.9
345
- */
346
- manufacturerEsaState: TlvOptionalField(8, TlvUInt16),
347
- /**
348
- * This field shall indicate the expected power that the appliance will use during this slot. It may be
349
- * considered the average value over the slot, and some variation from this would be expected (for example, as
350
- * it is ramping up).
351
- *
352
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.11.10
353
- */
354
- nominalPower: TlvOptionalField(9, TlvInt64),
355
- /**
356
- * This field shall indicate the lowest power that the appliance expects to use during this slot. (e.g. during
357
- * a ramp up it may be 0W).
358
- *
359
- * Some appliances (e.g. battery inverters which can charge and discharge) may have a negative power.
360
- *
361
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.11.11
362
- */
363
- minPower: TlvOptionalField(10, TlvInt64),
364
- /**
365
- * This field shall indicate the maximum power that the appliance expects to use during this slot. (e.g. during
366
- * a ramp up it may be 0W). This field ignores the effects of short-lived inrush currents.
367
- *
368
- * Some appliances (e.g. battery inverters which can charge and discharge) may have a negative power.
369
- *
370
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.11.12
371
- */
372
- maxPower: TlvOptionalField(11, TlvInt64),
373
- /**
374
- * This field shall indicate the expected energy that the appliance expects to use or produce during this slot.
375
- *
376
- * Some appliances (e.g. battery inverters which can charge and discharge) may have a negative energy.
377
- *
378
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.11.13
379
- */
380
- nominalEnergy: TlvOptionalField(12, TlvInt64),
381
- /**
382
- * This field shall indicate the current estimated cost for operating.
383
- *
384
- * For example, if the device has access to an Energy pricing server it may be able to use the tariff to
385
- * estimate the cost of energy for this slot in the power forecast.
386
- *
387
- * When an Energy Management System requests a change in the schedule, then the device may suggest a change in
388
- * the cost as a result of shifting its energy. This can allow a demand side response service to be informed of
389
- * the relative cost to use energy at a different time.
390
- *
391
- * The Costs field is a list of CostStruct structures which allows multiple CostTypeEnum and Values to be
392
- * shared by the energy appliance. These could be based on GHG emissions, comfort value for the consumer etc.
393
- *
394
- * For example, comfort could be expressed in abstract units or in currency. A water heater that is heated
395
- * earlier in the day is likely to lose some of its heat before it is needed, which could require a top-up
396
- * heating event to occur later in the day (which may incur additional cost).
397
- *
398
- * If the ESA cannot calculate its cost for any reason (such as losing its connection to a Price server) it may
399
- * omit this field. This is treated as extra meta data that an EMS may use to optimize a system.
400
- *
401
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.11.14
402
- */
403
- costs: TlvOptionalField(13, TlvArray(DeviceEnergyManagement.TlvCost, { maxLength: 5 })),
404
- /**
405
- * This field shall indicate the minimum power that the appliance can be requested to use.
406
- *
407
- * For example, some EVSEs cannot be switched on to charge below 6A which may equate to ~1.3kW in EU markets.
408
- * If the slot indicates a NominalPower of 0W (indicating it is expecting to be off), this allows an ESA to
409
- * indicate it could be switched on to charge, but this would be the minimum power limit it can be set to.
410
- *
411
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.11.15
412
- */
413
- minPowerAdjustment: TlvOptionalField(14, TlvInt64),
414
- /**
415
- * This field shall indicate the maximum power that the appliance can be requested to use.
416
- *
417
- * For example, an EVSE may be limited by its electrical supply to 32A which would be ~7.6kW in EU markets. If
418
- * the slot indicates a NominalPower of 0W (indicating it is expecting to be off), this allows an ESA to
419
- * indicate it could be switched on to charge, but this would be the maximum power limit it can be set to.
420
- *
421
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.11.16
422
- */
423
- maxPowerAdjustment: TlvOptionalField(15, TlvInt64),
424
- /**
425
- * This field shall indicate the minimum time, in seconds, that the slot can be requested to shortened to.
426
- *
427
- * For example, if the slot indicates a NominalPower of 0W (indicating it is expecting to be off), this would
428
- * allow an ESA to specify the minimum time it could be switched on for. This is to help protect the appliance
429
- * from being damaged by short cycling times.
430
- *
431
- * For example, a heat pump compressor may have a minimum cycle time of order a few minutes.
432
- *
433
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.11.17
434
- */
435
- minDurationAdjustment: TlvOptionalField(16, TlvUInt32),
436
- /**
437
- * This field shall indicate the maximum time, in seconds, that the slot can be requested to extended to.
438
- *
439
- * For example, if the slot indicates a NominalPower of 0W (indicating it is expecting to be off), this allows
440
- * an ESA to specify the maximum time it could be switched on for. This may allow a battery or water heater to
441
- * indicate the maximum duration that it can charge for before becoming full. In the case of a battery inverter
442
- * which can be discharged, it may equally indicate the maximum time the battery could be discharged for (at
443
- * the MaxPowerAdjustment power level).
444
- *
445
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.11.18
446
- */
447
- maxDurationAdjustment: TlvOptionalField(17, TlvUInt32),
448
- });
449
- /**
450
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.7
451
- */
452
- let ForecastUpdateReason;
453
- (function (ForecastUpdateReason) {
454
- /**
455
- * The update was due to internal ESA device optimization
456
- */
457
- ForecastUpdateReason[ForecastUpdateReason["InternalOptimization"] = 0] = "InternalOptimization";
458
- /**
459
- * The update was due to local EMS optimization
460
- */
461
- ForecastUpdateReason[ForecastUpdateReason["LocalOptimization"] = 1] = "LocalOptimization";
462
- /**
463
- * The update was due to grid optimization
464
- */
465
- ForecastUpdateReason[ForecastUpdateReason["GridOptimization"] = 2] = "GridOptimization";
466
- })(ForecastUpdateReason = DeviceEnergyManagement.ForecastUpdateReason || (DeviceEnergyManagement.ForecastUpdateReason = {}));
467
- /**
468
- * This indicates a list of 'slots' describing the overall timing of the ESA’s planned energy and power use, with
469
- * different power and energy demands per slot. For example, slots might be used to describe the distinct stages of
470
- * a washing machine cycle.
471
- *
472
- * Where an ESA does not know the actual power and energy use of the system, it may support the SFR
473
- *
474
- * feature and instead report its internal state.
475
- *
476
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.10
477
- */
478
- DeviceEnergyManagement.TlvForecast = TlvObject({
479
- /**
480
- * This field shall indicate the sequence number for the current forecast. If the ESA updates a forecast, it
481
- * shall monotonically increase this value.
482
- *
483
- * The ESA does not need to persist this value across reboots, since the EMS SHOULD be able to detect that any
484
- * previous subscriptions are lost if a device reboots. The loss of a subscription and subsequent
485
- * re-subscription allows the EMS to learn about any new forecasts.
486
- *
487
- * The value of ForecastId is allowed to wrap.
488
- *
489
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.10.1
490
- */
491
- forecastId: TlvField(0, TlvUInt16),
492
- /**
493
- * This field shall indicate which element of the Slots list is currently active in the Forecast sequence. A
494
- * null value indicates that the sequence has not yet started.
495
- *
496
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.10.2
497
- */
498
- activeSlotNumber: TlvField(1, TlvNullable(TlvUInt16)),
499
- /**
500
- * This field shall indicate the planned start time, in UTC, for the entire Forecast.
501
- *
502
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.10.3
503
- */
504
- startTime: TlvField(2, TlvEpochS),
505
- /**
506
- * This field shall indicate the planned end time, in UTC, for the entire Forecast.
507
- *
508
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.10.4
509
- */
510
- endTime: TlvField(3, TlvEpochS),
511
- /**
512
- * This field shall indicate the earliest start time, in UTC, that the entire Forecast can be shifted to.
513
- *
514
- * A null value indicates that it can be started immediately.
515
- *
516
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.10.5
517
- */
518
- earliestStartTime: TlvOptionalField(4, TlvNullable(TlvEpochS)),
519
- /**
520
- * This field shall indicate the latest end time, in UTC, for the entire Forecast.
521
- *
522
- * e.g. for an EVSE charging session, this may indicate the departure time for the vehicle, by which time the
523
- * charging session must end.
524
- *
525
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.10.6
526
- */
527
- latestEndTime: TlvOptionalField(5, TlvEpochS),
528
- /**
529
- * This field shall indicate that some part of the Forecast can be paused. It aims to allow a client to read
530
- * this flag and if it is false, then none of the slots contain SlotIsPausable set to true. This can save a
531
- * client from having to check each slot in the list.
532
- *
533
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.10.7
534
- */
535
- isPauseable: TlvField(6, TlvBoolean),
536
- /**
537
- * This field shall contain a list of SlotStructs.
538
- *
539
- * It shall contain at least 1 entry, and a maximum of 10.
540
- *
541
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.10.8
542
- */
543
- slots: TlvField(7, TlvArray(DeviceEnergyManagement.TlvSlot, { maxLength: 10 })),
544
- /**
545
- * This field shall contain the reason the current Forecast was generated.
546
- *
547
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.10.9
548
- */
549
- forecastUpdateReason: TlvField(8, TlvEnum()),
550
- });
551
- /**
552
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.4
553
- */
554
- let OptOutState;
555
- (function (OptOutState) {
556
- /**
557
- * The user has not opted out of either local or grid optimizations
558
- */
559
- OptOutState[OptOutState["NoOptOut"] = 0] = "NoOptOut";
560
- /**
561
- * The user has opted out of local EMS optimizations only
562
- */
563
- OptOutState[OptOutState["LocalOptOut"] = 1] = "LocalOptOut";
564
- /**
565
- * The user has opted out of grid EMS optimizations only
566
- */
567
- OptOutState[OptOutState["GridOptOut"] = 2] = "GridOptOut";
568
- /**
569
- * The user has opted out of all external optimizations
570
- */
571
- OptOutState[OptOutState["OptOut"] = 3] = "OptOut";
572
- })(OptOutState = DeviceEnergyManagement.OptOutState || (DeviceEnergyManagement.OptOutState = {}));
573
- /**
574
- * Input to the DeviceEnergyManagement pauseRequest command
575
- *
576
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.4
577
- */
578
- DeviceEnergyManagement.TlvPauseRequest = TlvObject({
579
- /**
580
- * This field shall indicate the duration that the ESA shall be paused for. This value shall be between the
581
- * MinPauseDuration and MaxPauseDuration indicated in the ActiveSlotNumber index in the Slots list in the
582
- * Forecast.
583
- *
584
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.4.1
585
- */
586
- duration: TlvField(0, TlvUInt32),
587
- /**
588
- * This field shall indicate the cause of the request from the EMS.
589
- *
590
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.4.2
591
- */
592
- cause: TlvField(1, TlvEnum()),
593
- });
594
- /**
595
- * Body of the DeviceEnergyManagement resumed event
596
- *
597
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.10.4
598
- */
599
- DeviceEnergyManagement.TlvResumedEvent = TlvObject({
600
- /**
601
- * This field shall indicate the reason why the pause ended.
602
- *
603
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.10.4.1
604
- */
605
- cause: TlvField(0, TlvEnum()),
606
- });
607
- /**
608
- * Input to the DeviceEnergyManagement startTimeAdjustRequest command
609
- *
610
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.3
611
- */
612
- DeviceEnergyManagement.TlvStartTimeAdjustRequest = TlvObject({
613
- /**
614
- * This field shall indicate the requested start time, in UTC, that the client would like the appliance to
615
- * shift its Forecast to. This value MUST be in the future.
616
- *
617
- * A client can estimate the entire Forecast sequence duration by computing the EndTime - StartTime fields from
618
- * the Forecast attribute, and therefore avoid scheduling the start time too late.
619
- *
620
- * This value shall be after the EarliestStartTime in the Forecast attribute. The new EndTime, that can be
621
- * computed from the RequestedStartTime and the Forecast sequence duration, shall be before the LatestEndTime.
622
- *
623
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.3.1
624
- */
625
- requestedStartTime: TlvField(0, TlvEpochS),
626
- /**
627
- * This field shall indicate the cause of the request from the EMS.
628
- *
629
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.3.2
630
- */
631
- cause: TlvField(1, TlvEnum()),
632
- });
633
- /**
634
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.12
635
- */
636
- DeviceEnergyManagement.TlvSlotAdjustment = TlvObject({
637
- /**
638
- * This field shall indicate the index into the Slots list within the Forecast that is to be modified. It shall
639
- * be less than the actual length of the Slots list (implicitly it must be in the range 0 to 9 based on the
640
- * maximum length of the Slots list constraint).
641
- *
642
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.12.1
643
- */
644
- slotIndex: TlvField(0, TlvUInt8),
645
- /**
646
- * This field shall indicate the new requested power that the ESA shall operate at. It MUST be between the
647
- * MinPowerAdjustment and MaxPowerAdjustment for the slot as advertised by the ESA.
648
- *
649
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.12.2
650
- */
651
- nominalPower: TlvField(1, TlvInt64),
652
- /**
653
- * This field shall indicate the new requested duration, in seconds, that the ESA shall extend or shorten the
654
- * slot duration to. It MUST be between the MinDurationAdjustment and MaxDurationAdjustment for the slot as
655
- * advertised by the ESA.
656
- *
657
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.12.3
658
- */
659
- duration: TlvField(2, TlvUInt32),
660
- });
661
- /**
662
- * Input to the DeviceEnergyManagement modifyForecastRequest command
663
- *
664
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.6
665
- */
666
- DeviceEnergyManagement.TlvModifyForecastRequest = TlvObject({
667
- /**
668
- * This field shall indicate the ForecastId that is to be modified.
669
- *
670
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.6.1
671
- */
672
- forecastId: TlvField(0, TlvUInt32),
673
- /**
674
- * This field shall contain a list of SlotAdjustment parameters that should be modified in the corresponding
675
- * Forecast with matching ForecastId.
676
- *
677
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.6.2
678
- */
679
- slotAdjustments: TlvField(1, TlvArray(DeviceEnergyManagement.TlvSlotAdjustment, { maxLength: 10 })),
680
- /**
681
- * This field shall indicate the cause of the request from the EMS.
682
- *
683
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.6.3
684
- */
685
- cause: TlvField(2, TlvEnum()),
686
- });
687
- /**
688
- * The ConstraintsStruct allows a client to inform an ESA about a constraint period (such as a grid event, or
689
- * perhaps excess solar PV). The format allows the client to suggest that the ESA can either turn up its energy
690
- * consumption, or turn down its energy consumption during this period.
691
- *
692
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.13
693
- */
694
- DeviceEnergyManagement.TlvConstraints = TlvObject({
695
- /**
696
- * This field shall indicate the start time of the constraint period that the client wishes the ESA to compute
697
- * a new Forecast.
698
- *
699
- * This value is in UTC and MUST be in the future.
700
- *
701
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.13.1
702
- */
703
- startTime: TlvField(0, TlvEpochS),
704
- /**
705
- * This field shall indicate the duration of the constraint in seconds.
706
- *
707
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.13.2
708
- */
709
- duration: TlvField(1, TlvUInt32.bound({ min: 0, max: 86400 })),
710
- /**
711
- * This field shall indicate the nominal power that client wishes the ESA to operate at during the constrained
712
- * period. It MUST be between the AbsMinPower and AbsMaxPower attributes as advertised by the ESA if it
713
- * supports PFR.
714
- *
715
- * This is a signed value and can be used to indicate charging or discharging. If the ESA does NOT support PFR
716
- * this value shall be ignored by the ESA.
717
- *
718
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.13.3
719
- */
720
- nominalPower: TlvOptionalField(2, TlvInt64),
721
- /**
722
- * This field shall indicate the maximum energy that can be transferred to or from the ESA during the
723
- * constraint period.
724
- *
725
- * This is a signed value and can be used to indicate charging or discharging. If the ESA does NOT support PFR
726
- * this value may be ignored by the ESA.
727
- *
728
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.13.4
729
- */
730
- maximumEnergy: TlvOptionalField(3, TlvInt64),
731
- /**
732
- * This field shall indicate the turn up or turn down nature that the grid wants as the outcome by the ESA
733
- * during the constraint period.
734
- *
735
- * This is expressed as a signed value between -100 to +100. A value of 0 would indicate no bias to using more
736
- * or less energy. A negative value indicates a request to use less energy. A positive value indicates a
737
- * request to use more energy.
738
- *
739
- * Note that the mapping between values and operation is manufacturer specific.
740
- *
741
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.13.5
742
- */
743
- loadControl: TlvOptionalField(4, TlvInt8),
744
- });
745
- /**
746
- * Input to the DeviceEnergyManagement requestConstraintBasedForecast command
747
- *
748
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.7
749
- */
750
- DeviceEnergyManagement.TlvRequestConstraintBasedForecastRequest = TlvObject({
751
- /**
752
- * This field shall indicate the series of turn up or turn down power requests that the ESA is being asked to
753
- * constrain its operation within.
754
- *
755
- * For example, a grid event which requires devices to reduce power (turn down) between 4pm and 6pm and due to
756
- * excess power on the grid overnight, may request ESAs to increase their power demand (turn up) between
757
- * midnight and 6am.
758
- *
759
- * If this ESA supports PFR this would have 2 entries in the list as follows:
760
- *
761
- * If this ESA supports SFR where it does not know the actual power, but has an understanding of the functions
762
- * that use more energy, it could be requested to use more or less energy using the LoadControl field as
763
- * follows:
764
- *
765
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.7.1
766
- */
767
- constraints: TlvField(0, TlvArray(DeviceEnergyManagement.TlvConstraints, { maxLength: 10 })),
768
- /**
769
- * This field shall indicate the cause of the request from the EMS.
770
- *
771
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.7.2
772
- */
773
- cause: TlvField(1, TlvEnum()),
774
- });
775
- /**
776
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.2
777
- */
778
- let EsaType;
779
- (function (EsaType) {
780
- /**
781
- * EV Supply Equipment
782
- */
783
- EsaType[EsaType["Evse"] = 0] = "Evse";
784
- /**
785
- * Space heating appliance
786
- */
787
- EsaType[EsaType["SpaceHeating"] = 1] = "SpaceHeating";
788
- /**
789
- * Water heating appliance
790
- */
791
- EsaType[EsaType["WaterHeating"] = 2] = "WaterHeating";
792
- /**
793
- * Space cooling appliance
794
- */
795
- EsaType[EsaType["SpaceCooling"] = 3] = "SpaceCooling";
796
- /**
797
- * Space heating and cooling appliance
798
- */
799
- EsaType[EsaType["SpaceHeatingCooling"] = 4] = "SpaceHeatingCooling";
800
- /**
801
- * Battery Electric Storage System
802
- */
803
- EsaType[EsaType["BatteryStorage"] = 5] = "BatteryStorage";
804
- /**
805
- * Solar PV inverter
806
- */
807
- EsaType[EsaType["SolarPv"] = 6] = "SolarPv";
808
- /**
809
- * Fridge / Freezer
810
- */
811
- EsaType[EsaType["FridgeFreezer"] = 7] = "FridgeFreezer";
812
- /**
813
- * Washing Machine
814
- */
815
- EsaType[EsaType["WashingMachine"] = 8] = "WashingMachine";
816
- /**
817
- * Dishwasher
818
- */
819
- EsaType[EsaType["Dishwasher"] = 9] = "Dishwasher";
820
- /**
821
- * Cooking appliance
822
- */
823
- EsaType[EsaType["Cooking"] = 10] = "Cooking";
824
- /**
825
- * Home water pump (e.g. drinking well)
826
- */
827
- EsaType[EsaType["HomeWaterPump"] = 11] = "HomeWaterPump";
828
- /**
829
- * Irrigation water pump
830
- */
831
- EsaType[EsaType["IrrigationWaterPump"] = 12] = "IrrigationWaterPump";
832
- /**
833
- * Pool pump
834
- */
835
- EsaType[EsaType["PoolPump"] = 13] = "PoolPump";
836
- /**
837
- * Other appliance type
838
- */
839
- EsaType[EsaType["Other"] = 255] = "Other";
840
- })(EsaType = DeviceEnergyManagement.EsaType || (DeviceEnergyManagement.EsaType = {}));
841
- /**
842
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.7.3
843
- */
844
- let EsaState;
845
- (function (EsaState) {
846
- /**
847
- * The ESA is not available to the EMS (e.g. start- up, maintenance mode)
848
- */
849
- EsaState[EsaState["Offline"] = 0] = "Offline";
850
- /**
851
- * The ESA is working normally and can be controlled by the EMS
852
- */
853
- EsaState[EsaState["Online"] = 1] = "Online";
854
- /**
855
- * The ESA has developed a fault and cannot provide service
856
- */
857
- EsaState[EsaState["Fault"] = 2] = "Fault";
858
- /**
859
- * The ESA is in the middle of a power adjustment event
860
- */
861
- EsaState[EsaState["PowerAdjustActive"] = 3] = "PowerAdjustActive";
862
- /**
863
- * The ESA is currently paused by a client using the PauseRequest command
864
- */
865
- EsaState[EsaState["Paused"] = 4] = "Paused";
866
- })(EsaState = DeviceEnergyManagement.EsaState || (DeviceEnergyManagement.EsaState = {}));
867
- /**
868
- * A DeviceEnergyManagementCluster supports these elements if it supports feature PowerAdjustment.
869
- */
870
- DeviceEnergyManagement.PowerAdjustmentComponent = MutableCluster.Component({
871
- attributes: {
872
- /**
873
- * Indicates how the ESA can be adjusted at the current time. This attribute SHOULD be updated regularly by
874
- * ESAs.
875
- *
876
- * For example, a battery storage inverter may need to regulate its internal temperature, or the charging
877
- * rate of the battery may be limited due to cold temperatures, or a change in the state of charge of the
878
- * battery may mean that the maximum charging or discharging rate is limited.
879
- *
880
- * An empty list shall indicate that no power adjustment is currently possible.
881
- *
882
- * Multiple entries in the list allow to indicate that permutations of scenarios may be possible.
883
- *
884
- * For example, a 10kWh battery could be at 80% state of charge. If charging at 2kW, then it would be full
885
- * in 1 hour. However, it could be discharged at 2kW for 4 hours.
886
- *
887
- * In this example the list of PowerAdjustStructs allows multiple scenarios to be offered as follows:
888
- *
889
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.8.6
890
- */
891
- powerAdjustmentCapability: Attribute(0x5, TlvNullable(TlvArray(DeviceEnergyManagement.TlvPowerAdjust, { maxLength: 8 })), { default: null }),
892
- },
893
- commands: {
894
- /**
895
- * Allows a client to request an adjustment in the power consumption of an ESA for a specified duration.
896
- *
897
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.1
898
- */
899
- powerAdjustRequest: Command(0x0, DeviceEnergyManagement.TlvPowerAdjustRequest, 0x0, TlvNoResponse),
900
- /**
901
- * Allows a client to cancel an ongoing PowerAdjustmentRequest operation.
902
- *
903
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.2
904
- */
905
- cancelPowerAdjustRequest: Command(0x1, TlvNoArguments, 0x1, TlvNoResponse),
906
- },
907
- events: {
908
- /**
909
- * This event shall be generated when the Power Adjustment session is started.
910
- *
911
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.10.1
912
- */
913
- powerAdjustStart: Event(0x0, EventPriority.Info, TlvNoArguments),
914
- /**
915
- * This event shall be generated when the Power Adjustment session ends.
916
- *
917
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.10.2
918
- */
919
- powerAdjustEnd: Event(0x1, EventPriority.Info, DeviceEnergyManagement.TlvPowerAdjustEndEvent),
920
- },
921
- });
922
- /**
923
- * A DeviceEnergyManagementCluster supports these elements if it supports features PowerForecastReporting or
924
- * StateForecastReporting.
925
- */
926
- DeviceEnergyManagement.PowerForecastReportingOrStateForecastReportingComponent = MutableCluster.Component({
927
- attributes: {
928
- /**
929
- * This attribute allows an ESA to share its intended forecast with a client (such as an Energy Management
930
- * System).
931
- *
932
- * A null value indicates that there is no forecast currently available
933
- *
934
- * yet been selected by the user).
935
- *
936
- * A server may reset this value attribute to null on a reboot, and it does not need to persist any
937
- * previous forecasts.
938
- *
939
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.8.7
940
- */
941
- forecast: Attribute(0x6, TlvNullable(DeviceEnergyManagement.TlvForecast), { default: null }),
942
- },
943
- });
944
- /**
945
- * A DeviceEnergyManagementCluster supports these elements if it supports features PowerAdjustment,
946
- * StartTimeAdjustment, Pausable, ForecastAdjustment or ConstraintBasedAdjustment.
947
- */
948
- DeviceEnergyManagement.PowerAdjustmentOrStartTimeAdjustmentOrPausableOrForecastAdjustmentOrConstraintBasedAdjustmentComponent = MutableCluster.Component({
949
- attributes: {
950
- /**
951
- * Indicates the current Opt-Out state of the ESA. The ESA may have a local user interface to allow the
952
- * user to control this OptOutState. An EMS may subscribe to the OptOutState to get notified about changes
953
- * in operational state.
954
- *
955
- * If the ESA is in the LocalOptOut or OptOut states, so it cannot be controlled by an EMS for local
956
- * optimization reasons, it shall reject any commands which have the AdjustmentCauseEnum value
957
- * LocalOptimization. If the ESA is in the GridOptOut or OptOut states, so it cannot be controlled by an
958
- * EMS for grid optimization reasons, it shall reject any commands which have the AdjustmentCauseEnum value
959
- * GridOptimization. If the ESA is in the LocalOptOut, GridOptOut, or NoOptOut states, the device is still
960
- * permitted to optimize its own energy usage, for example, using tariff information it may obtain.
961
- *
962
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.8.8
963
- */
964
- optOutState: Attribute(0x7, TlvEnum(), { default: OptOutState.NoOptOut }),
965
- },
966
- });
967
- /**
968
- * A DeviceEnergyManagementCluster supports these elements if it supports feature Pausable.
969
- */
970
- DeviceEnergyManagement.PausableComponent = MutableCluster.Component({
971
- commands: {
972
- /**
973
- * Allows a client to temporarily pause an operation and reduce the ESAs energy demand.
974
- *
975
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.4
976
- */
977
- pauseRequest: Command(0x3, DeviceEnergyManagement.TlvPauseRequest, 0x3, TlvNoResponse),
978
- /**
979
- * Allows a client to cancel the PauseRequest command and enable earlier resumption of operation.
980
- *
981
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.5
982
- */
983
- resumeRequest: Command(0x4, TlvNoArguments, 0x4, TlvNoResponse),
984
- },
985
- events: {
986
- /**
987
- * This event shall be generated when the ESA enters the Paused state. There is no data for this event.
988
- *
989
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.10.3
990
- */
991
- paused: Event(0x2, EventPriority.Info, TlvNoArguments),
992
- /**
993
- * This event shall be generated when the ESA leaves the Paused state and resumes operation.
994
- *
995
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.10.4
996
- */
997
- resumed: Event(0x3, EventPriority.Info, DeviceEnergyManagement.TlvResumedEvent),
998
- },
999
- });
1000
- /**
1001
- * A DeviceEnergyManagementCluster supports these elements if it supports feature StartTimeAdjustment.
1002
- */
1003
- DeviceEnergyManagement.StartTimeAdjustmentComponent = MutableCluster.Component({
1004
- commands: {
1005
- /**
1006
- * Allows a client to adjust the start time of a Forecast sequence that has not yet started operation (i.e.
1007
- * where the current Forecast StartTime is in the future).
1008
- *
1009
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.3
1010
- */
1011
- startTimeAdjustRequest: Command(0x2, DeviceEnergyManagement.TlvStartTimeAdjustRequest, 0x2, TlvNoResponse),
1012
- },
1013
- });
1014
- /**
1015
- * A DeviceEnergyManagementCluster supports these elements if it supports feature ForecastAdjustment.
1016
- */
1017
- DeviceEnergyManagement.ForecastAdjustmentComponent = MutableCluster.Component({
1018
- commands: {
1019
- /**
1020
- * Allows a client to modify a Forecast within the limits allowed by the ESA.
1021
- *
1022
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.6
1023
- */
1024
- modifyForecastRequest: Command(0x5, DeviceEnergyManagement.TlvModifyForecastRequest, 0x5, TlvNoResponse),
1025
- },
1026
- });
1027
- /**
1028
- * A DeviceEnergyManagementCluster supports these elements if it supports feature ConstraintBasedAdjustment.
1029
- */
1030
- DeviceEnergyManagement.ConstraintBasedAdjustmentComponent = MutableCluster.Component({
1031
- commands: {
1032
- /**
1033
- * Allows a client to ask the ESA to recompute its Forecast based on power and time constraints.
1034
- *
1035
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.7
1036
- */
1037
- requestConstraintBasedForecast: Command(0x6, DeviceEnergyManagement.TlvRequestConstraintBasedForecastRequest, 0x6, TlvNoResponse),
1038
- },
1039
- });
1040
- /**
1041
- * A DeviceEnergyManagementCluster supports these elements if it supports features StartTimeAdjustment,
1042
- * ForecastAdjustment or ConstraintBasedAdjustment.
1043
- */
1044
- DeviceEnergyManagement.StartTimeAdjustmentOrForecastAdjustmentOrConstraintBasedAdjustmentComponent = MutableCluster.Component({
1045
- commands: {
1046
- /**
1047
- * Allows a client to request cancellation of a previous adjustment request in a StartTimeAdjustRequest,
1048
- * ModifyForecastRequest or RequestConstraintBasedForecast command.
1049
- *
1050
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.9.8
1051
- */
1052
- cancelRequest: Command(0x7, TlvNoArguments, 0x7, TlvNoResponse),
1053
- },
1054
- });
1055
- /**
1056
- * These are optional features supported by DeviceEnergyManagementCluster.
1057
- *
1058
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.4
1059
- */
1060
- let Feature;
1061
- (function (Feature) {
1062
- /**
1063
- * PowerAdjustment (PA)
1064
- *
1065
- * For Energy Smart Appliances (ESA) the definition of being 'smart' mandates that they can report their
1066
- * current power adjustment capability and have an EMS request a temporary adjustment. This may typically be to
1067
- * curtail power requirements during peak periods, but can also be used to turn on an ESA if there is excess
1068
- * renewable or local generation (Solar PV).
1069
- *
1070
- * For example, a home may have solar PV which often produces more power than the home requires,
1071
- *
1072
- * resulting in the excess power flowing into the grid. This excess power naturally fluctuates when clouds pass
1073
- * overhead and other loads in the home are switched on and off.
1074
- *
1075
- * EVSE Example: An EMS may therefore be able to turn on the EVSE (if the vehicle is plugged in) and can start
1076
- * charging the vehicle, and periodically modify the charging power depending on PV generation and other home
1077
- * loads, so as to minimize import and export to the grid.
1078
- *
1079
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.4.1
1080
- */
1081
- Feature["PowerAdjustment"] = "PowerAdjustment";
1082
- /**
1083
- * PowerForecastReporting (PFR)
1084
- *
1085
- * For Energy Smart Appliances (ESA) the definition of being 'smart' implies that they can report their
1086
- * indicative forecast power demands or generation, to a greater or lesser extent. For some ESAs this is highly
1087
- * predictable (in terms of both power and time), in other appliances this is more challenging and only a basic
1088
- * level of forecast is possible.
1089
- *
1090
- * Forecasts are defined from a current time, using a slot format, where the slot is akin to a relatively
1091
- * constant operating mode.
1092
- *
1093
- * Washing machine example: a washing machine may have stages of a washing cycle: heating, tumbling, rinse and
1094
- * spin stages. At each stage, the approximate minimum and maximum power consumption may be known, as well as
1095
- * the duration of that stage.
1096
- *
1097
- * In some circumstances the ESA may allow the stage to be delayed or paused (subject to safety and
1098
- * manufacturer’s discretion and user preferences).
1099
- *
1100
- * Typically, appliances with a heating element cannot have their power consumption adjusted and can only be
1101
- * paused or delayed.
1102
- *
1103
- * Some ESAs may not be flexible other than a delayed cycle start (for example, once the washing cycle has been
1104
- * started then they run continuously until the cycle completes).
1105
- *
1106
- * Appliances that only support the PowerForecastReporting and not any of the adjustment features may indicate
1107
- * that they are not flexible in the forecast slot format.
1108
- *
1109
- * The PowerForecastReporting and the adjustment features aim to align to the [SAREF4ENER] ontology.
1110
- *
1111
- * Inverter driven ESAs: some inverter driven ESAs can consume or generate a variable amount of power.
1112
- *
1113
- * For example, a single phase EVSE can be adjusted in the range of 6-32Amps in 0.6 Amp steps in EU or on a
1114
- * hardwired 120V supply in the range of 6-15 Amps in US.
1115
- *
1116
- * For example, a home battery may be adjusted to charge or discharge in steps of 1W.
1117
- *
1118
- * For example, a heat pump may be able to modulate its compressor inverter between 20-100% of its rated power.
1119
- *
1120
- * The ESA indicates its power adjustment range and its nominal power consumption as part of its Forecast.
1121
- *
1122
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.4.2
1123
- */
1124
- Feature["PowerForecastReporting"] = "PowerForecastReporting";
1125
- /**
1126
- * StateForecastReporting (SFR)
1127
- *
1128
- * Some ESAs do not know their actual power consumption, but do know the state of operation. Like the
1129
- * PowerForecastingReporting feature, this uses the same slot structure mechanism to indicate a change in state
1130
- * vs time.
1131
- *
1132
- * An external observing EMS may have access to real-time meter readings, and could learn the typical power
1133
- * consumption based on the advertised internal state of the ESA.
1134
- *
1135
- * To enable this capability, the ESA shall report its internal operational state using an manufacturer
1136
- * specific value.
1137
- *
1138
- * Once the EMS has built a model of the state vs observed power consumption, it may request a forecast
1139
- * adjustment for particular times of the day, encouraging the ESA to use power at alternative times.
1140
- *
1141
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.4.3
1142
- */
1143
- Feature["StateForecastReporting"] = "StateForecastReporting";
1144
- /**
1145
- * StartTimeAdjustment (STA)
1146
- *
1147
- * ESAs which support the Start Time Adjustment feature, allow an EMS to recommend a change to the start time
1148
- * of the energy transfer that the ESA has previously suggested it would use.
1149
- *
1150
- * Washing machine example: A Washing Machine may have been set to start a wash cycle at 9pm when the variable
1151
- * tariff normally reduces.
1152
- *
1153
- * However, the EMS is aware that a grid event has occurred, making it cheaper to run the cycle at a later
1154
- * time, but the washing machine is not aware of this.
1155
- *
1156
- * The EMS first requests the Forecast data from each of its registered ESAs. It determines that the washing
1157
- * machine has a power profile suggesting it will start the wash cycle at 9pm, but the EMS now knows that the
1158
- * grid event means it will be cheaper to delay the start until 11pm.
1159
- *
1160
- * The EMS can then optimize the cost by asking the washing machine to delay starting the wash cycle until 11pm.
1161
- *
1162
- * It does this by sending a StartTimeAdjustRequest to the washing machine to request delaying the start of the
1163
- * washing cycle.
1164
- *
1165
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.4.4
1166
- */
1167
- Feature["StartTimeAdjustment"] = "StartTimeAdjustment";
1168
- /**
1169
- * Pausable (PAU)
1170
- *
1171
- * ESAs which support the Pausable feature, allow an EMS to recommend a pause in the middle of a forecast power
1172
- * profile that the ESA is currently using.
1173
- *
1174
- * Washing machine example: A Washing Machine is in operation, and starting its water heating step.
1175
- *
1176
- * However, the EMS becomes aware from the smart meter that the total home load on the grid is close to
1177
- * exceeding its allowed total grid load.
1178
- *
1179
- * The EMS first requests the Forecast data from each of its registered ESAs. It determines that the washing
1180
- * machine has a power profile suggesting its current step in the wash cycle is using power to heat the water,
1181
- * but that this step can be paused.
1182
- *
1183
- * The EMS can then reduce the grid load by asking the washing machine to pause the wash cycle for a short
1184
- * duration.
1185
- *
1186
- * It does this by sending a PauseRequest to the washing machine to request pausing the current step of the
1187
- * forecast power usage for a period to allow other home loads to finish before resuming the washing cycle.
1188
- *
1189
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.4.5
1190
- */
1191
- Feature["Pausable"] = "Pausable";
1192
- /**
1193
- * ForecastAdjustment (FA)
1194
- *
1195
- * ESAs which support the Forecast adjustment feature, allow an EMS to recommend a change to the start,
1196
- * duration and/or power level limits of the steps of the power profile that the ESA has previously suggested
1197
- * it would use.
1198
- *
1199
- * Heat pump and Solar PV example: A heat pump may have the ability to heat hot water as well as heating the
1200
- * home. The heat pump scheduling system may have determined that the home will be unoccupied during the day,
1201
- * or that the indoor temperature is above the set-point and so it knows that it will not need to heat the home.
1202
- *
1203
- * However, the hot water tank is likely to need to be reheated before the homeowner comes home in the evening.
1204
- * The heat pump is not aware that the property also has a solar PV inverter which is also an ESA that is
1205
- * communicating with the EMS.
1206
- *
1207
- * The EMS first requests the Forecast data from each of its registered ESAs. It determines that the heat pump
1208
- * has a power profile suggesting it needs to heat hot water around 6pm. The solar PV inverter has forecast
1209
- * that it will generate 3.6kW of power during the middle of the day and into the afternoon before the sun goes
1210
- * down.
1211
- *
1212
- * The EMS can then optimize the home considering other non-ESA loads and can ask the heat pump to heat the hot
1213
- * water around 3pm when it has forecast that excess solar power will be available.
1214
- *
1215
- * It does this by sending a ModifyForecastRequest to the heat pump and asks the heat pump to expect to run at
1216
- * a lower power consumption (within the solar excess power) which requires the heat pump to run for a longer
1217
- * duration to achieve its required energy demand.
1218
- *
1219
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.4.6
1220
- */
1221
- Feature["ForecastAdjustment"] = "ForecastAdjustment";
1222
- /**
1223
- * ConstraintBasedAdjustment (CON)
1224
- *
1225
- * ESAs which support the Constraint-Based Adjustment feature allow an EMS to inform the ESA of periods during
1226
- * which power usage should be modified (for example when the EMS has been made aware that the grid supplier
1227
- * has requested reduced energy usage due to overall peak grid demand) and may cause the ESA to modify the
1228
- * intended power profile has previously suggested it would use.
1229
- *
1230
- * EVSE example: An EVSE scheduling system may have determined that the vehicle would be charged starting at a
1231
- * moderate rate at 1am, so that it has enough charge by the time it is needed later that morning.
1232
- *
1233
- * However, the DSR service provider has informed the EMS that due to high forecast winds it is now forecast
1234
- * that there will be very cheap energy available from wind generation between 2am and 3am.
1235
- *
1236
- * The EMS first requests the Forecast data from each of its registered ESAs. It determines that the
1237
- *
1238
- * EVSE has a power profile suggesting it plans to start charging the vehicle at 1am.
1239
- *
1240
- * The EMS can then try to reduce the cost of charging the EV by informing the EVSE of the desire to increase
1241
- * the charging between scheduled times.
1242
- *
1243
- * It does this by sending a RequestConstraintBasedForecast to the EVSE and asks it to run at a higher
1244
- * NominalPower consumption during the constraint period, which may require it to decrease its charge rate
1245
- * outside the constraint period to achieve its required energy demand.
1246
- *
1247
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.4.7
1248
- */
1249
- Feature["ConstraintBasedAdjustment"] = "ConstraintBasedAdjustment";
1250
- })(Feature = DeviceEnergyManagement.Feature || (DeviceEnergyManagement.Feature = {}));
1251
- /**
1252
- * These elements and properties are present in all DeviceEnergyManagement clusters.
1253
- */
1254
- DeviceEnergyManagement.Base = MutableCluster.Component({
1255
- id: 0x98,
1256
- name: 'DeviceEnergyManagement',
1257
- revision: 3,
1258
- features: {
1259
- /**
1260
- * PowerAdjustment
1261
- *
1262
- * For Energy Smart Appliances (ESA) the definition of being 'smart' mandates that they can report their
1263
- * current power adjustment capability and have an EMS request a temporary adjustment. This may typically
1264
- * be to curtail power requirements during peak periods, but can also be used to turn on an ESA if there is
1265
- * excess renewable or local generation (Solar PV).
1266
- *
1267
- * For example, a home may have solar PV which often produces more power than the home requires,
1268
- *
1269
- * resulting in the excess power flowing into the grid. This excess power naturally fluctuates when clouds
1270
- * pass overhead and other loads in the home are switched on and off.
1271
- *
1272
- * EVSE Example: An EMS may therefore be able to turn on the EVSE (if the vehicle is plugged in) and can
1273
- * start charging the vehicle, and periodically modify the charging power depending on PV generation and
1274
- * other home loads, so as to minimize import and export to the grid.
1275
- *
1276
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.4.1
1277
- */
1278
- powerAdjustment: BitFlag(0),
1279
- /**
1280
- * PowerForecastReporting
1281
- *
1282
- * For Energy Smart Appliances (ESA) the definition of being 'smart' implies that they can report their
1283
- * indicative forecast power demands or generation, to a greater or lesser extent. For some ESAs this is
1284
- * highly predictable (in terms of both power and time), in other appliances this is more challenging and
1285
- * only a basic level of forecast is possible.
1286
- *
1287
- * Forecasts are defined from a current time, using a slot format, where the slot is akin to a relatively
1288
- * constant operating mode.
1289
- *
1290
- * Washing machine example: a washing machine may have stages of a washing cycle: heating, tumbling, rinse
1291
- * and spin stages. At each stage, the approximate minimum and maximum power consumption may be known, as
1292
- * well as the duration of that stage.
1293
- *
1294
- * In some circumstances the ESA may allow the stage to be delayed or paused (subject to safety and
1295
- * manufacturer’s discretion and user preferences).
1296
- *
1297
- * Typically, appliances with a heating element cannot have their power consumption adjusted and can only
1298
- * be paused or delayed.
1299
- *
1300
- * Some ESAs may not be flexible other than a delayed cycle start (for example, once the washing cycle has
1301
- * been started then they run continuously until the cycle completes).
1302
- *
1303
- * Appliances that only support the PowerForecastReporting and not any of the adjustment features may
1304
- * indicate that they are not flexible in the forecast slot format.
1305
- *
1306
- * The PowerForecastReporting and the adjustment features aim to align to the [SAREF4ENER] ontology.
1307
- *
1308
- * Inverter driven ESAs: some inverter driven ESAs can consume or generate a variable amount of power.
1309
- *
1310
- * For example, a single phase EVSE can be adjusted in the range of 6-32Amps in 0.6 Amp steps in EU or on a
1311
- * hardwired 120V supply in the range of 6-15 Amps in US.
1312
- *
1313
- * For example, a home battery may be adjusted to charge or discharge in steps of 1W.
1314
- *
1315
- * For example, a heat pump may be able to modulate its compressor inverter between 20-100% of its rated
1316
- * power.
1317
- *
1318
- * The ESA indicates its power adjustment range and its nominal power consumption as part of its Forecast.
1319
- *
1320
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.4.2
1321
- */
1322
- powerForecastReporting: BitFlag(1),
1323
- /**
1324
- * StateForecastReporting
1325
- *
1326
- * Some ESAs do not know their actual power consumption, but do know the state of operation. Like the
1327
- * PowerForecastingReporting feature, this uses the same slot structure mechanism to indicate a change in
1328
- * state vs time.
1329
- *
1330
- * An external observing EMS may have access to real-time meter readings, and could learn the typical power
1331
- * consumption based on the advertised internal state of the ESA.
1332
- *
1333
- * To enable this capability, the ESA shall report its internal operational state using an manufacturer
1334
- * specific value.
1335
- *
1336
- * Once the EMS has built a model of the state vs observed power consumption, it may request a forecast
1337
- * adjustment for particular times of the day, encouraging the ESA to use power at alternative times.
1338
- *
1339
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.4.3
1340
- */
1341
- stateForecastReporting: BitFlag(2),
1342
- /**
1343
- * StartTimeAdjustment
1344
- *
1345
- * ESAs which support the Start Time Adjustment feature, allow an EMS to recommend a change to the start
1346
- * time of the energy transfer that the ESA has previously suggested it would use.
1347
- *
1348
- * Washing machine example: A Washing Machine may have been set to start a wash cycle at 9pm when the
1349
- * variable tariff normally reduces.
1350
- *
1351
- * However, the EMS is aware that a grid event has occurred, making it cheaper to run the cycle at a later
1352
- * time, but the washing machine is not aware of this.
1353
- *
1354
- * The EMS first requests the Forecast data from each of its registered ESAs. It determines that the
1355
- * washing machine has a power profile suggesting it will start the wash cycle at 9pm, but the EMS now
1356
- * knows that the grid event means it will be cheaper to delay the start until 11pm.
1357
- *
1358
- * The EMS can then optimize the cost by asking the washing machine to delay starting the wash cycle until
1359
- * 11pm.
1360
- *
1361
- * It does this by sending a StartTimeAdjustRequest to the washing machine to request delaying the start of
1362
- * the washing cycle.
1363
- *
1364
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.4.4
1365
- */
1366
- startTimeAdjustment: BitFlag(3),
1367
- /**
1368
- * Pausable
1369
- *
1370
- * ESAs which support the Pausable feature, allow an EMS to recommend a pause in the middle of a forecast
1371
- * power profile that the ESA is currently using.
1372
- *
1373
- * Washing machine example: A Washing Machine is in operation, and starting its water heating step.
1374
- *
1375
- * However, the EMS becomes aware from the smart meter that the total home load on the grid is close to
1376
- * exceeding its allowed total grid load.
1377
- *
1378
- * The EMS first requests the Forecast data from each of its registered ESAs. It determines that the
1379
- * washing machine has a power profile suggesting its current step in the wash cycle is using power to heat
1380
- * the water, but that this step can be paused.
1381
- *
1382
- * The EMS can then reduce the grid load by asking the washing machine to pause the wash cycle for a short
1383
- * duration.
1384
- *
1385
- * It does this by sending a PauseRequest to the washing machine to request pausing the current step of the
1386
- * forecast power usage for a period to allow other home loads to finish before resuming the washing cycle.
1387
- *
1388
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.4.5
1389
- */
1390
- pausable: BitFlag(4),
1391
- /**
1392
- * ForecastAdjustment
1393
- *
1394
- * ESAs which support the Forecast adjustment feature, allow an EMS to recommend a change to the start,
1395
- * duration and/or power level limits of the steps of the power profile that the ESA has previously
1396
- * suggested it would use.
1397
- *
1398
- * Heat pump and Solar PV example: A heat pump may have the ability to heat hot water as well as heating
1399
- * the home. The heat pump scheduling system may have determined that the home will be unoccupied during
1400
- * the day, or that the indoor temperature is above the set-point and so it knows that it will not need to
1401
- * heat the home.
1402
- *
1403
- * However, the hot water tank is likely to need to be reheated before the homeowner comes home in the
1404
- * evening. The heat pump is not aware that the property also has a solar PV inverter which is also an ESA
1405
- * that is communicating with the EMS.
1406
- *
1407
- * The EMS first requests the Forecast data from each of its registered ESAs. It determines that the heat
1408
- * pump has a power profile suggesting it needs to heat hot water around 6pm. The solar PV inverter has
1409
- * forecast that it will generate 3.6kW of power during the middle of the day and into the afternoon before
1410
- * the sun goes down.
1411
- *
1412
- * The EMS can then optimize the home considering other non-ESA loads and can ask the heat pump to heat the
1413
- * hot water around 3pm when it has forecast that excess solar power will be available.
1414
- *
1415
- * It does this by sending a ModifyForecastRequest to the heat pump and asks the heat pump to expect to run
1416
- * at a lower power consumption (within the solar excess power) which requires the heat pump to run for a
1417
- * longer duration to achieve its required energy demand.
1418
- *
1419
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.4.6
1420
- */
1421
- forecastAdjustment: BitFlag(5),
1422
- /**
1423
- * ConstraintBasedAdjustment
1424
- *
1425
- * ESAs which support the Constraint-Based Adjustment feature allow an EMS to inform the ESA of periods
1426
- * during which power usage should be modified (for example when the EMS has been made aware that the grid
1427
- * supplier has requested reduced energy usage due to overall peak grid demand) and may cause the ESA to
1428
- * modify the intended power profile has previously suggested it would use.
1429
- *
1430
- * EVSE example: An EVSE scheduling system may have determined that the vehicle would be charged starting
1431
- * at a moderate rate at 1am, so that it has enough charge by the time it is needed later that morning.
1432
- *
1433
- * However, the DSR service provider has informed the EMS that due to high forecast winds it is now
1434
- * forecast that there will be very cheap energy available from wind generation between 2am and 3am.
1435
- *
1436
- * The EMS first requests the Forecast data from each of its registered ESAs. It determines that the
1437
- *
1438
- * EVSE has a power profile suggesting it plans to start charging the vehicle at 1am.
1439
- *
1440
- * The EMS can then try to reduce the cost of charging the EV by informing the EVSE of the desire to
1441
- * increase the charging between scheduled times.
1442
- *
1443
- * It does this by sending a RequestConstraintBasedForecast to the EVSE and asks it to run at a higher
1444
- * NominalPower consumption during the constraint period, which may require it to decrease its charge rate
1445
- * outside the constraint period to achieve its required energy demand.
1446
- *
1447
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.4.7
1448
- */
1449
- constraintBasedAdjustment: BitFlag(6),
1450
- },
1451
- attributes: {
1452
- /**
1453
- * Indicates the type of ESA.
1454
- *
1455
- * This attribute enables an EMS to understand some of the basic properties about how the energy may be
1456
- * consumed, generated, and stored by the ESA.
1457
- *
1458
- * For example, the heat energy converted by a heat pump will naturally be lost through the building to the
1459
- * outdoor environment relatively quickly, compared to storing heat in a well-insulated hot water tank.
1460
- * Similarly, battery storage and EVs can store electrical energy for much longer durations.
1461
- *
1462
- * This attribute can also help the EMS display information to a user and to make basic assumptions about
1463
- * typical best use of energy. For example, an EVSE may not always have an EV plugged in, so knowing the
1464
- * type of ESA that is being controlled can allow advanced energy management strategies.
1465
- *
1466
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.8.1
1467
- */
1468
- esaType: FixedAttribute(0x0, TlvEnum(), { default: EsaType.Other }),
1469
- /**
1470
- * Indicates whether the ESA is classed as a generator or load. This allows an EMS to understand whether
1471
- * the power values reported by the ESA need to have their sign inverted when dealing with forecasts and
1472
- * adjustments.
1473
- *
1474
- * For example, a solar PV inverter (being a generator) may produce positive values to indicate generation,
1475
- * however an EMS when predicting the total home load would need to subtract these positive values from the
1476
- * loads to compute a net import at the grid meter.
1477
- *
1478
- * For example, a home battery storage system (BESS) which needs to charge the battery and then discharge
1479
- * to the home loads, would be classed as a generator. These types of devices shall have this field set to
1480
- * true. When generating its forecast or advertising its PowerAdjustmentCapability, the power values shall
1481
- * be positive to indicate discharging to the loads in the home, and negative to indicate when it is
1482
- * charging its battery.
1483
- *
1484
- * GRID meter = Σ LoadPowers - Σ GeneratorPowers
1485
- *
1486
- * Example:
1487
- *
1488
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.8.2
1489
- */
1490
- esaCanGenerate: FixedAttribute(0x1, TlvBoolean, { default: true }),
1491
- /**
1492
- * Indicates the current state of the ESA.
1493
- *
1494
- * If the ESA is in the Offline or Fault state it cannot be controlled by an EMS, and may not be able to
1495
- * report its Forecast information. An EMS may subscribe to the ESAState to get notified about changes in
1496
- * operational state.
1497
- *
1498
- * The ESA may have a local user interface to allow a service technician to put the ESA into Offline mode,
1499
- * for example to avoid the EMS accidentally starting or stopping the appliance when it is being serviced
1500
- * or tested.
1501
- *
1502
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.8.3
1503
- */
1504
- esaState: Attribute(0x2, TlvEnum(), { default: EsaState.Offline }),
1505
- /**
1506
- * Indicates the minimum electrical power that the ESA can consume when switched on. This does not include
1507
- * when in power save or standby modes.
1508
- *
1509
- * Note that for Generator ESAs that can charge an internal battery (such as a battery storage inverter),
1510
- * the AbsMinPower will be a negative number representing the maximum power that the ESA can charge its
1511
- * internal battery.
1512
- *
1513
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.8.4
1514
- */
1515
- absMinPower: Attribute(0x3, TlvInt64, { default: 0 }),
1516
- /**
1517
- * Indicates the maximum electrical power that the ESA can consume when switched on.
1518
- *
1519
- * The value of the AbsMaxPower attribute shall be limited
1520
- *
1521
- * AbsMaxPower >= AbsMinPower
1522
- *
1523
- * Note that for Generator ESAs that can discharge a battery to loads in the home (such as a battery
1524
- * storage inverter), the AbsMaxPower will be a positive number representing the maximum power at which the
1525
- * ESA can discharge its internal battery.
1526
- *
1527
- * For example, a battery storage inverter that can charge its battery at a maximum power of 2000W and can
1528
- * discharge the battery at a maximum power of 3000W, would have a AbsMinPower: -2000, AbsMaxPower: 3000W.
1529
- *
1530
- * @see {@link MatterSpecification.v13.Cluster} § 9.2.8.5
1531
- */
1532
- absMaxPower: Attribute(0x4, TlvInt64, { default: 0 }),
1533
- },
1534
- /**
1535
- * This metadata controls which DeviceEnergyManagementCluster elements matter.js activates for specific feature
1536
- * combinations.
1537
- */
1538
- extensions: MutableCluster.Extensions({ flags: { powerAdjustment: true }, component: DeviceEnergyManagement.PowerAdjustmentComponent }, {
1539
- flags: { powerForecastReporting: true },
1540
- component: DeviceEnergyManagement.PowerForecastReportingOrStateForecastReportingComponent,
1541
- }, {
1542
- flags: { stateForecastReporting: true },
1543
- component: DeviceEnergyManagement.PowerForecastReportingOrStateForecastReportingComponent,
1544
- }, {
1545
- flags: { powerAdjustment: true },
1546
- component: DeviceEnergyManagement.PowerAdjustmentOrStartTimeAdjustmentOrPausableOrForecastAdjustmentOrConstraintBasedAdjustmentComponent,
1547
- }, {
1548
- flags: { startTimeAdjustment: true },
1549
- component: DeviceEnergyManagement.PowerAdjustmentOrStartTimeAdjustmentOrPausableOrForecastAdjustmentOrConstraintBasedAdjustmentComponent,
1550
- }, {
1551
- flags: { pausable: true },
1552
- component: DeviceEnergyManagement.PowerAdjustmentOrStartTimeAdjustmentOrPausableOrForecastAdjustmentOrConstraintBasedAdjustmentComponent,
1553
- }, {
1554
- flags: { forecastAdjustment: true },
1555
- component: DeviceEnergyManagement.PowerAdjustmentOrStartTimeAdjustmentOrPausableOrForecastAdjustmentOrConstraintBasedAdjustmentComponent,
1556
- }, {
1557
- flags: { constraintBasedAdjustment: true },
1558
- component: DeviceEnergyManagement.PowerAdjustmentOrStartTimeAdjustmentOrPausableOrForecastAdjustmentOrConstraintBasedAdjustmentComponent,
1559
- }, { flags: { pausable: true }, component: DeviceEnergyManagement.PausableComponent }, { flags: { startTimeAdjustment: true }, component: DeviceEnergyManagement.StartTimeAdjustmentComponent }, { flags: { forecastAdjustment: true }, component: DeviceEnergyManagement.ForecastAdjustmentComponent }, { flags: { constraintBasedAdjustment: true }, component: DeviceEnergyManagement.ConstraintBasedAdjustmentComponent }, {
1560
- flags: { startTimeAdjustment: true },
1561
- component: DeviceEnergyManagement.StartTimeAdjustmentOrForecastAdjustmentOrConstraintBasedAdjustmentComponent,
1562
- }, {
1563
- flags: { forecastAdjustment: true },
1564
- component: DeviceEnergyManagement.StartTimeAdjustmentOrForecastAdjustmentOrConstraintBasedAdjustmentComponent,
1565
- }, {
1566
- flags: { constraintBasedAdjustment: true },
1567
- component: DeviceEnergyManagement.StartTimeAdjustmentOrForecastAdjustmentOrConstraintBasedAdjustmentComponent,
1568
- }, { flags: { feature: false, startTimeAdjustment: true, stateForecastReporting: false }, component: false }, { flags: { feature: false, pausable: true, stateForecastReporting: false }, component: false }, { flags: { feature: false, forecastAdjustment: true, stateForecastReporting: false }, component: false }, {
1569
- flags: { feature: false, constraintBasedAdjustment: true, stateForecastReporting: false },
1570
- component: false,
1571
- }, { flags: { feature: false, startTimeAdjustment: true, powerForecastReporting: false }, component: false }, { flags: { feature: false, pausable: true, powerForecastReporting: false }, component: false }, { flags: { feature: false, forecastAdjustment: true, powerForecastReporting: false }, component: false }, {
1572
- flags: { feature: false, constraintBasedAdjustment: true, powerForecastReporting: false },
1573
- component: false,
1574
- }, {
1575
- flags: {
1576
- powerAdjustment: false,
1577
- powerForecastReporting: false,
1578
- stateForecastReporting: false,
1579
- startTimeAdjustment: false,
1580
- pausable: false,
1581
- forecastAdjustment: false,
1582
- constraintBasedAdjustment: false,
1583
- },
1584
- component: false,
1585
- }),
1586
- });
1587
- /**
1588
- * @see {@link Cluster}
1589
- */
1590
- DeviceEnergyManagement.ClusterInstance = MutableCluster.ExtensibleOnly(DeviceEnergyManagement.Base);
1591
- DeviceEnergyManagement.Cluster = DeviceEnergyManagement.ClusterInstance;
1592
- const PA = { powerAdjustment: true };
1593
- const PFR = { powerForecastReporting: true };
1594
- const SFR = { stateForecastReporting: true };
1595
- const STA = { startTimeAdjustment: true };
1596
- const PAU = { pausable: true };
1597
- const FA = { forecastAdjustment: true };
1598
- const CON = { constraintBasedAdjustment: true };
1599
- /**
1600
- * @see {@link Complete}
1601
- */
1602
- DeviceEnergyManagement.CompleteInstance = MutableCluster({
1603
- id: DeviceEnergyManagement.Base.id,
1604
- name: DeviceEnergyManagement.Base.name,
1605
- revision: DeviceEnergyManagement.Base.revision,
1606
- features: DeviceEnergyManagement.Base.features,
1607
- attributes: {
1608
- ...DeviceEnergyManagement.Base.attributes,
1609
- powerAdjustmentCapability: MutableCluster.AsConditional(DeviceEnergyManagement.PowerAdjustmentComponent.attributes.powerAdjustmentCapability, { mandatoryIf: [PA] }),
1610
- forecast: MutableCluster.AsConditional(DeviceEnergyManagement.PowerForecastReportingOrStateForecastReportingComponent.attributes.forecast, { mandatoryIf: [PFR, SFR] }),
1611
- optOutState: MutableCluster.AsConditional(DeviceEnergyManagement.PowerAdjustmentOrStartTimeAdjustmentOrPausableOrForecastAdjustmentOrConstraintBasedAdjustmentComponent.attributes.optOutState, { mandatoryIf: [PA, STA, PAU, FA, CON] }),
1612
- },
1613
- commands: {
1614
- powerAdjustRequest: MutableCluster.AsConditional(DeviceEnergyManagement.PowerAdjustmentComponent.commands.powerAdjustRequest, { mandatoryIf: [PA] }),
1615
- cancelPowerAdjustRequest: MutableCluster.AsConditional(DeviceEnergyManagement.PowerAdjustmentComponent.commands.cancelPowerAdjustRequest, { mandatoryIf: [PA] }),
1616
- startTimeAdjustRequest: MutableCluster.AsConditional(DeviceEnergyManagement.StartTimeAdjustmentComponent.commands.startTimeAdjustRequest, { mandatoryIf: [STA] }),
1617
- pauseRequest: MutableCluster.AsConditional(DeviceEnergyManagement.PausableComponent.commands.pauseRequest, { mandatoryIf: [PAU] }),
1618
- resumeRequest: MutableCluster.AsConditional(DeviceEnergyManagement.PausableComponent.commands.resumeRequest, { mandatoryIf: [PAU] }),
1619
- modifyForecastRequest: MutableCluster.AsConditional(DeviceEnergyManagement.ForecastAdjustmentComponent.commands.modifyForecastRequest, { mandatoryIf: [FA] }),
1620
- requestConstraintBasedForecast: MutableCluster.AsConditional(DeviceEnergyManagement.ConstraintBasedAdjustmentComponent.commands.requestConstraintBasedForecast, { mandatoryIf: [CON] }),
1621
- cancelRequest: MutableCluster.AsConditional(DeviceEnergyManagement.StartTimeAdjustmentOrForecastAdjustmentOrConstraintBasedAdjustmentComponent.commands.cancelRequest, { mandatoryIf: [STA, FA, CON] }),
1622
- },
1623
- events: {
1624
- powerAdjustStart: MutableCluster.AsConditional(DeviceEnergyManagement.PowerAdjustmentComponent.events.powerAdjustStart, { mandatoryIf: [PA] }),
1625
- powerAdjustEnd: MutableCluster.AsConditional(DeviceEnergyManagement.PowerAdjustmentComponent.events.powerAdjustEnd, { mandatoryIf: [PA] }),
1626
- paused: MutableCluster.AsConditional(DeviceEnergyManagement.PausableComponent.events.paused, { mandatoryIf: [PAU] }),
1627
- resumed: MutableCluster.AsConditional(DeviceEnergyManagement.PausableComponent.events.resumed, { mandatoryIf: [PAU] }),
1628
- },
1629
- });
1630
- DeviceEnergyManagement.Complete = DeviceEnergyManagement.CompleteInstance;
1631
- })(DeviceEnergyManagement || (DeviceEnergyManagement = {}));
1632
- export const DeviceEnergyManagementCluster = DeviceEnergyManagement.Cluster;
1633
- ClusterRegistry.register(DeviceEnergyManagement.Complete);
1634
- //# sourceMappingURL=DeviceEnergyManagementCluster.js.map