matterbridge 1.5.3 → 1.5.5

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 (115) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README-DEV.md +13 -4
  3. package/README.md +32 -11
  4. package/dist/cluster/export.d.ts +1 -21
  5. package/dist/cluster/export.d.ts.map +1 -1
  6. package/dist/cluster/export.js +2 -21
  7. package/dist/cluster/export.js.map +1 -1
  8. package/dist/matterbridge.js +20 -20
  9. package/dist/matterbridge.js.map +1 -1
  10. package/dist/matterbridgeDevice.d.ts +105 -210
  11. package/dist/matterbridgeDevice.d.ts.map +1 -1
  12. package/dist/matterbridgeDevice.js +31 -48
  13. package/dist/matterbridgeDevice.js.map +1 -1
  14. package/dist/matterbridgePlatform.d.ts +6 -0
  15. package/dist/matterbridgePlatform.d.ts.map +1 -1
  16. package/dist/matterbridgePlatform.js +26 -0
  17. package/dist/matterbridgePlatform.js.map +1 -1
  18. package/dist/pluginManager.d.ts.map +1 -1
  19. package/dist/pluginManager.js +72 -5
  20. package/dist/pluginManager.js.map +1 -1
  21. package/frontend/build/asset-manifest.json +3 -3
  22. package/frontend/build/index.html +1 -1
  23. package/frontend/build/static/js/{main.6725e5ab.js → main.f86befcf.js} +3 -3
  24. package/frontend/build/static/js/{main.6725e5ab.js.map → main.f86befcf.js.map} +1 -1
  25. package/npm-shrinkwrap.json +7334 -0
  26. package/package.json +13 -12
  27. package/dist/cluster/AirQualityCluster.d.ts +0 -188
  28. package/dist/cluster/AirQualityCluster.d.ts.map +0 -1
  29. package/dist/cluster/AirQualityCluster.js +0 -98
  30. package/dist/cluster/AirQualityCluster.js.map +0 -1
  31. package/dist/cluster/CarbonDioxideConcentrationMeasurementCluster.d.ts +0 -396
  32. package/dist/cluster/CarbonDioxideConcentrationMeasurementCluster.d.ts.map +0 -1
  33. package/dist/cluster/CarbonDioxideConcentrationMeasurementCluster.js +0 -30
  34. package/dist/cluster/CarbonDioxideConcentrationMeasurementCluster.js.map +0 -1
  35. package/dist/cluster/CarbonMonoxideConcentrationMeasurementCluster.d.ts +0 -396
  36. package/dist/cluster/CarbonMonoxideConcentrationMeasurementCluster.d.ts.map +0 -1
  37. package/dist/cluster/CarbonMonoxideConcentrationMeasurementCluster.js +0 -30
  38. package/dist/cluster/CarbonMonoxideConcentrationMeasurementCluster.js.map +0 -1
  39. package/dist/cluster/ConcentrationMeasurementCluster.d.ts +0 -524
  40. package/dist/cluster/ConcentrationMeasurementCluster.d.ts.map +0 -1
  41. package/dist/cluster/ConcentrationMeasurementCluster.js +0 -282
  42. package/dist/cluster/ConcentrationMeasurementCluster.js.map +0 -1
  43. package/dist/cluster/DeviceEnergyManagementCluster.d.ts +0 -7851
  44. package/dist/cluster/DeviceEnergyManagementCluster.d.ts.map +0 -1
  45. package/dist/cluster/DeviceEnergyManagementCluster.js +0 -1634
  46. package/dist/cluster/DeviceEnergyManagementCluster.js.map +0 -1
  47. package/dist/cluster/DeviceEnergyManagementModeCluster.d.ts +0 -68
  48. package/dist/cluster/DeviceEnergyManagementModeCluster.d.ts.map +0 -1
  49. package/dist/cluster/DeviceEnergyManagementModeCluster.js +0 -49
  50. package/dist/cluster/DeviceEnergyManagementModeCluster.js.map +0 -1
  51. package/dist/cluster/ElectricalEnergyMeasurementCluster.d.ts +0 -4978
  52. package/dist/cluster/ElectricalEnergyMeasurementCluster.d.ts.map +0 -1
  53. package/dist/cluster/ElectricalEnergyMeasurementCluster.js +0 -510
  54. package/dist/cluster/ElectricalEnergyMeasurementCluster.js.map +0 -1
  55. package/dist/cluster/ElectricalPowerMeasurementCluster.d.ts +0 -3250
  56. package/dist/cluster/ElectricalPowerMeasurementCluster.d.ts.map +0 -1
  57. package/dist/cluster/ElectricalPowerMeasurementCluster.js +0 -675
  58. package/dist/cluster/ElectricalPowerMeasurementCluster.js.map +0 -1
  59. package/dist/cluster/FormaldehydeConcentrationMeasurementCluster.d.ts +0 -396
  60. package/dist/cluster/FormaldehydeConcentrationMeasurementCluster.d.ts.map +0 -1
  61. package/dist/cluster/FormaldehydeConcentrationMeasurementCluster.js +0 -30
  62. package/dist/cluster/FormaldehydeConcentrationMeasurementCluster.js.map +0 -1
  63. package/dist/cluster/MeasurementAccuracy.d.ts +0 -63
  64. package/dist/cluster/MeasurementAccuracy.d.ts.map +0 -1
  65. package/dist/cluster/MeasurementAccuracy.js +0 -47
  66. package/dist/cluster/MeasurementAccuracy.js.map +0 -1
  67. package/dist/cluster/MeasurementAccuracyRange.d.ts +0 -134
  68. package/dist/cluster/MeasurementAccuracyRange.d.ts.map +0 -1
  69. package/dist/cluster/MeasurementAccuracyRange.js +0 -103
  70. package/dist/cluster/MeasurementAccuracyRange.js.map +0 -1
  71. package/dist/cluster/MeasurementType.d.ts +0 -68
  72. package/dist/cluster/MeasurementType.d.ts.map +0 -1
  73. package/dist/cluster/MeasurementType.js +0 -69
  74. package/dist/cluster/MeasurementType.js.map +0 -1
  75. package/dist/cluster/NitrogenDioxideConcentrationMeasurementCluster.d.ts +0 -396
  76. package/dist/cluster/NitrogenDioxideConcentrationMeasurementCluster.d.ts.map +0 -1
  77. package/dist/cluster/NitrogenDioxideConcentrationMeasurementCluster.js +0 -34
  78. package/dist/cluster/NitrogenDioxideConcentrationMeasurementCluster.js.map +0 -1
  79. package/dist/cluster/OzoneConcentrationMeasurementCluster.d.ts +0 -395
  80. package/dist/cluster/OzoneConcentrationMeasurementCluster.d.ts.map +0 -1
  81. package/dist/cluster/OzoneConcentrationMeasurementCluster.js +0 -29
  82. package/dist/cluster/OzoneConcentrationMeasurementCluster.js.map +0 -1
  83. package/dist/cluster/Pm10ConcentrationMeasurementCluster.d.ts +0 -395
  84. package/dist/cluster/Pm10ConcentrationMeasurementCluster.d.ts.map +0 -1
  85. package/dist/cluster/Pm10ConcentrationMeasurementCluster.js +0 -29
  86. package/dist/cluster/Pm10ConcentrationMeasurementCluster.js.map +0 -1
  87. package/dist/cluster/Pm1ConcentrationMeasurementCluster.d.ts +0 -395
  88. package/dist/cluster/Pm1ConcentrationMeasurementCluster.d.ts.map +0 -1
  89. package/dist/cluster/Pm1ConcentrationMeasurementCluster.js +0 -29
  90. package/dist/cluster/Pm1ConcentrationMeasurementCluster.js.map +0 -1
  91. package/dist/cluster/Pm25ConcentrationMeasurementCluster.d.ts +0 -395
  92. package/dist/cluster/Pm25ConcentrationMeasurementCluster.d.ts.map +0 -1
  93. package/dist/cluster/Pm25ConcentrationMeasurementCluster.js +0 -29
  94. package/dist/cluster/Pm25ConcentrationMeasurementCluster.js.map +0 -1
  95. package/dist/cluster/PowerTopologyCluster.d.ts +0 -345
  96. package/dist/cluster/PowerTopologyCluster.d.ts.map +0 -1
  97. package/dist/cluster/PowerTopologyCluster.js +0 -138
  98. package/dist/cluster/PowerTopologyCluster.js.map +0 -1
  99. package/dist/cluster/RadonConcentrationMeasurementCluster.d.ts +0 -395
  100. package/dist/cluster/RadonConcentrationMeasurementCluster.d.ts.map +0 -1
  101. package/dist/cluster/RadonConcentrationMeasurementCluster.js +0 -29
  102. package/dist/cluster/RadonConcentrationMeasurementCluster.js.map +0 -1
  103. package/dist/cluster/ScenesCluster.d.ts +0 -1249
  104. package/dist/cluster/ScenesCluster.d.ts.map +0 -1
  105. package/dist/cluster/ScenesCluster.js +0 -436
  106. package/dist/cluster/ScenesCluster.js.map +0 -1
  107. package/dist/cluster/SmokeCoAlarmCluster.d.ts +0 -1575
  108. package/dist/cluster/SmokeCoAlarmCluster.d.ts.map +0 -1
  109. package/dist/cluster/SmokeCoAlarmCluster.js +0 -603
  110. package/dist/cluster/SmokeCoAlarmCluster.js.map +0 -1
  111. package/dist/cluster/TvocCluster.d.ts +0 -465
  112. package/dist/cluster/TvocCluster.d.ts.map +0 -1
  113. package/dist/cluster/TvocCluster.js +0 -197
  114. package/dist/cluster/TvocCluster.js.map +0 -1
  115. /package/frontend/build/static/js/{main.6725e5ab.js.LICENSE.txt → main.f86befcf.js.LICENSE.txt} +0 -0
@@ -1,675 +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
- import { ClusterRegistry, EventPriority, MutableCluster, OptionalAttribute, OptionalEvent } from '@project-chip/matter-node.js/cluster';
8
- import { FixedAttribute, Attribute } from '@project-chip/matter-node.js/cluster';
9
- import { BitFlag } from '@project-chip/matter-node.js/schema';
10
- import { TlvEnum, TlvArray, TlvObject, TlvField, TlvInt64, TlvOptionalField, TlvEpochS, TlvSysTimeMS, TlvNullable, TlvUInt8 } from '@project-chip/matter-node.js/tlv';
11
- import { TlvMeasurementAccuracy } from './MeasurementAccuracy.js';
12
- export var ElectricalPowerMeasurement;
13
- (function (ElectricalPowerMeasurement) {
14
- /**
15
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.5.3
16
- */
17
- ElectricalPowerMeasurement.TlvHarmonicMeasurement = TlvObject({
18
- /**
19
- * This field shall be the order of the harmonic being measured. Typically this is an odd number, but servers
20
- * may choose to report even harmonics.
21
- *
22
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.5.3.1
23
- */
24
- order: TlvField(0, TlvUInt8.bound({ min: 1 })),
25
- /**
26
- * This field shall be the measured value for the given harmonic order.
27
- *
28
- * For the Harmonic Currents attribute, this value is the most recently measured harmonic current reading in
29
- * milliamps (mA). A positive value indicates that the measured harmonic current is positive, and a negative
30
- * value indicates that the measured harmonic current is negative.
31
- *
32
- * For the Harmonic Phases attribute, this value is the most recent phase of the given harmonic order
33
- *
34
- * in millidegrees (mDeg). A positive value indicates that the measured phase is leading, and a negative value
35
- * indicates that the measured phase is lagging.
36
- *
37
- * If this measurement is not currently available, a value of null shall be returned.
38
- *
39
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.5.3.2
40
- */
41
- measurement: TlvField(1, TlvNullable(TlvInt64.bound({ min: -(2 ** 62), max: 2 ** 62 }))),
42
- });
43
- /**
44
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.5.1
45
- */
46
- let PowerMode;
47
- (function (PowerMode) {
48
- PowerMode[PowerMode["Unknown"] = 0] = "Unknown";
49
- /**
50
- * Direct current
51
- */
52
- PowerMode[PowerMode["Dc"] = 1] = "Dc";
53
- /**
54
- * Alternating current, either single-phase or polyphase
55
- */
56
- PowerMode[PowerMode["Ac"] = 2] = "Ac";
57
- })(PowerMode = ElectricalPowerMeasurement.PowerMode || (ElectricalPowerMeasurement.PowerMode = {}));
58
- /**
59
- * This struct shall indicate the maximum and minimum values of a given measurement type during a measurement
60
- * period, along with the observation times of these values.
61
- *
62
- * A server which does not have the ability to determine the time in UTC, or has not yet done so, shall use the
63
- * system time fields to specify the measurement period and observation times.
64
- *
65
- * A server which has determined the time in UTC shall use the timestamp fields to specify the measurement period
66
- * and observation times. Such a server may also include the systime fields to indicate how many seconds had passed
67
- * since boot for a given timestamp; this allows for client-side resolution of UTC time for previous reports that
68
- * only included systime.
69
- *
70
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.5.2
71
- */
72
- ElectricalPowerMeasurement.TlvMeasurementRange = TlvObject({
73
- /**
74
- * This field shall be the type of measurement for the range provided.
75
- *
76
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.5.2.1
77
- */
78
- measurementType: TlvField(0, TlvEnum()),
79
- /**
80
- * This field shall be the smallest measured value for the associated measurement over either the period
81
- * between StartTimestamp and EndTimestamp, or the period between StartSystime and EndSystime, or both.
82
- *
83
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.5.2.2
84
- */
85
- min: TlvField(1, TlvInt64.bound({ min: -(2 ** 62), max: 2 ** 62 })),
86
- /**
87
- * This field shall be the largest measured value for the associated measurement over the period between either
88
- * StartTimestamp and EndTimestamp or the period between StartSystime and EndSystime, or both.
89
- *
90
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.5.2.3
91
- */
92
- max: TlvField(2, TlvInt64.bound({ min: -(2 ** 62), max: 2 ** 62 })),
93
- /**
94
- * This field shall be the timestamp in UTC of the beginning of the measurement period.
95
- *
96
- * If the server had not yet determined the time in UTC at or before the beginning of the measurement period,
97
- * or does not have the capability of determining the time in UTC, this field shall be omitted.
98
- *
99
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.5.2.4
100
- */
101
- startTimestamp: TlvOptionalField(3, TlvEpochS),
102
- /**
103
- * This field shall be the timestamp in UTC of the end of the measurement period.
104
- *
105
- * If the server had not yet determined the time in UTC at or before the beginning of the measurement period,
106
- * or does not have the capability of determining the time in UTC, this field shall be omitted.
107
- *
108
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.5.2.5
109
- */
110
- endTimestamp: TlvOptionalField(4, TlvEpochS),
111
- /**
112
- * This field shall be the most recent timestamp in UTC that the value in the Min field was measured.
113
- *
114
- * This field shall be greater than or equal to the value of the StartTimestamp field. This field shall be less
115
- * than or equal to the value of the EndTimestamp field.
116
- *
117
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.5.2.6
118
- */
119
- minTimestamp: TlvOptionalField(5, TlvEpochS),
120
- /**
121
- * This field shall be the most recent timestamp in UTC of the value in the Max field. This field shall be
122
- * greater than or equal to the value of the StartTimestamp field. This field shall be less than or equal to
123
- * the value of the EndTimestamp field.
124
- *
125
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.5.2.7
126
- */
127
- maxTimestamp: TlvOptionalField(6, TlvEpochS),
128
- /**
129
- * This field shall be the time since boot of the beginning of the measurement period.
130
- *
131
- * If the server had determined the time in UTC at or before the start of the measurement period, this field
132
- * may be omitted along with the EndSystime, MinSystime, and MaxSystime fields.
133
- *
134
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.5.2.8
135
- */
136
- startSystime: TlvOptionalField(7, TlvSysTimeMS),
137
- /**
138
- * This field shall be the time since boot of the end of the measurement period.
139
- *
140
- * If the server had determined the time in UTC at the end of the measurement period, this field may be omitted
141
- * along with the StartSystime field, MinSystime, and MaxSystime fields.
142
- *
143
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.5.2.9
144
- */
145
- endSystime: TlvOptionalField(8, TlvSysTimeMS),
146
- /**
147
- * This field shall be the measurement time since boot of the value in the Min field was measured. This field
148
- * shall be greater than or equal to the value of the StartSystime field.
149
- *
150
- * This field shall be less than or equal to the value of the EndSystime field.
151
- *
152
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.5.2.10
153
- */
154
- minSystime: TlvOptionalField(9, TlvSysTimeMS),
155
- /**
156
- * This field shall be the measurement time since boot of the value in the Max field. This field shall be
157
- * greater than or equal to the value of the StartSystime field.
158
- *
159
- * This field shall be less than or equal to the value of the EndSystime field.
160
- *
161
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.5.2.11
162
- */
163
- maxSystime: TlvOptionalField(10, TlvSysTimeMS),
164
- });
165
- /**
166
- * Body of the ElectricalPowerMeasurement measurementPeriodRanges event
167
- *
168
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.7.1
169
- */
170
- ElectricalPowerMeasurement.TlvMeasurementPeriodRangesEvent = TlvObject({
171
- /**
172
- * This shall indicate the value of the Ranges attribute at the time of event generation.
173
- *
174
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.7.1.1
175
- */
176
- ranges: TlvField(0, TlvArray(ElectricalPowerMeasurement.TlvMeasurementRange)),
177
- });
178
- /**
179
- * A ElectricalPowerMeasurementCluster supports these elements if it supports feature AlternatingCurrent.
180
- */
181
- ElectricalPowerMeasurement.AlternatingCurrentComponent = MutableCluster.Component({
182
- attributes: {
183
- /**
184
- * This shall indicate the most recent ReactiveCurrent reading in milliamps (mA).
185
- *
186
- * A positive value represents current flowing into the server, while a negative value represents current
187
- * flowing out of the server.
188
- *
189
- * The reporting interval of this attribute shall be manufacturer dependent. The server may choose to omit
190
- * publication of deltas considered not meaningful.
191
- *
192
- * The server shall NOT mark this attribute ready for report if the last time this was done was more
193
- * recently than 1 second ago.
194
- *
195
- * The server may delay marking this attribute ready for report for longer periods if needed, however the
196
- * server shall NOT delay marking this attribute as ready for report for longer than 60 seconds.
197
- *
198
- * If the current cannot be measured, a value of null shall be returned.
199
- *
200
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.6.7
201
- */
202
- reactiveCurrent: OptionalAttribute(0x6, TlvNullable(TlvInt64.bound({ min: -(2 ** 62), max: 2 ** 62 })), { default: null }),
203
- /**
204
- * This shall indicate the most recent ApparentCurrent (square root sum of the squares of active and
205
- * reactive currents) reading in milliamps (mA).
206
- *
207
- * The reporting interval of this attribute shall be manufacturer dependent. The server may choose to omit
208
- * publication of deltas considered not meaningful.
209
- *
210
- * The server shall NOT mark this attribute ready for report if the last time this was done was more
211
- * recently than 1 second ago.
212
- *
213
- * The server may delay marking this attribute ready for report for longer periods if needed, however the
214
- * server shall NOT delay marking this attribute as ready for report for longer than 60 seconds.
215
- *
216
- * If the active or reactive currents cannot be measured, a value of null shall be returned.
217
- *
218
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.6.8
219
- */
220
- apparentCurrent: OptionalAttribute(0x7, TlvNullable(TlvInt64.bound({ min: 0, max: 2 ** 62 })), { default: null }),
221
- /**
222
- * This shall indicate the most recent ReactivePower reading in millivolt-amps reactive (mVAR). A positive
223
- * value represents power imported, while a negative value represents power exported.
224
- *
225
- * The reporting interval of this attribute shall be manufacturer dependent. The server may choose to omit
226
- * publication of deltas considered not meaningful.
227
- *
228
- * The server shall NOT mark this attribute ready for report if the last time this was done was more
229
- * recently than 1 second ago.
230
- *
231
- * The server may delay marking this attribute ready for report for longer periods if needed, however the
232
- * server shall NOT delay marking this attribute as ready for report for longer than 60 seconds.
233
- *
234
- * If the reactive power cannot be measured, a value of null shall be returned.
235
- *
236
- * If the Polyphase Power feature is supported, this value represents the combined reactive power imported
237
- * or exported.
238
- *
239
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.6.10
240
- */
241
- reactivePower: OptionalAttribute(0x9, TlvNullable(TlvInt64.bound({ min: -(2 ** 62), max: 2 ** 62 })), { default: null }),
242
- /**
243
- * This shall indicate the most recent ApparentPower reading in millivolt-amps (mVA).
244
- *
245
- * A positive value represents power imported, while a negative value represents power exported.
246
- *
247
- * The reporting interval of this attribute shall be manufacturer dependent. The server may choose to omit
248
- * publication of deltas considered not meaningful.
249
- *
250
- * The server shall NOT mark this attribute ready for report if the last time this was done was more
251
- * recently than 1 second ago.
252
- *
253
- * The server may delay marking this attribute ready for report for longer periods if needed, however the
254
- * server shall NOT delay marking this attribute as ready for report for longer than 60 seconds.
255
- *
256
- * If the apparent power cannot be measured, a value of null shall be returned.
257
- *
258
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.6.11
259
- */
260
- apparentPower: OptionalAttribute(0xa, TlvNullable(TlvInt64.bound({ min: -(2 ** 62), max: 2 ** 62 })), { default: null }),
261
- /**
262
- * This shall indicate the most recent RMSVoltage reading in millivolts (mV).
263
- *
264
- * The reporting interval of this attribute shall be manufacturer dependent. The server may choose to omit
265
- * publication of deltas considered not meaningful.
266
- *
267
- * The server shall NOT mark this attribute ready for report if the last time this was done was more
268
- * recently than 1 second ago.
269
- *
270
- * The server may delay marking this attribute ready for report for longer periods if needed, however the
271
- * server shall NOT delay marking this attribute as ready for report for longer than 60 seconds.
272
- *
273
- * If the RMS voltage cannot be measured, a value of null shall be returned.
274
- *
275
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.6.12
276
- */
277
- rmsVoltage: OptionalAttribute(0xb, TlvNullable(TlvInt64.bound({ min: -(2 ** 62), max: 2 ** 62 })), { default: null }),
278
- /**
279
- * This shall indicate the most recent RMSCurrent reading in milliamps (mA).
280
- *
281
- * A positive value represents current flowing into the server, while a negative value represents current
282
- * flowing out of the server.
283
- *
284
- * The reporting interval of this attribute shall be manufacturer dependent. The server may choose to omit
285
- * publication of deltas considered not meaningful.
286
- *
287
- * The server shall NOT mark this attribute ready for report if the last time this was done was more
288
- * recently than 1 second ago.
289
- *
290
- * The server may delay marking this attribute ready for report for longer periods if needed, however the
291
- * server shall NOT delay marking this attribute as ready for report for longer than 60 seconds.
292
- *
293
- * If the RMS current cannot be measured, a value of null shall be returned.
294
- *
295
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.6.13
296
- */
297
- rmsCurrent: OptionalAttribute(0xc, TlvNullable(TlvInt64.bound({ min: -(2 ** 62), max: 2 ** 62 })), { default: null }),
298
- /**
299
- * This shall indicate the most recent RMSPower reading in milliwatts (mW).
300
- *
301
- * A positive value represents power imported, while a negative value represents power exported.
302
- *
303
- * The reporting interval of this attribute shall be manufacturer dependent. The server may choose to omit
304
- * publication of deltas considered not meaningful.
305
- *
306
- * The server shall NOT mark this attribute ready for report if the last time this was done was more
307
- * recently than 1 second ago.
308
- *
309
- * The server may delay marking this attribute ready for report for longer periods if needed, however the
310
- * server shall NOT delay marking this attribute as ready for report for longer than 60 seconds.
311
- *
312
- * If the RMS power cannot be measured, a value of null shall be returned.
313
- *
314
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.6.14
315
- */
316
- rmsPower: OptionalAttribute(0xd, TlvNullable(TlvInt64.bound({ min: -(2 ** 62), max: 2 ** 62 })), { default: null }),
317
- /**
318
- * This shall indicate the most recent Frequency reading in millihertz (mHz).
319
- *
320
- * The reporting interval of this attribute shall be manufacturer dependent. The server may choose to omit
321
- * publication of deltas considered not meaningful.
322
- *
323
- * The server shall NOT mark this attribute ready for report if the last time this was done was more
324
- * recently than 1 second ago.
325
- *
326
- * The server may delay marking this attribute ready for report for longer periods if needed, however the
327
- * server shall NOT delay marking this attribute as ready for report for longer than 60 seconds.
328
- *
329
- * If the frequency cannot be measured, a value of null shall be returned.
330
- *
331
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.6.15
332
- */
333
- frequency: OptionalAttribute(0xe, TlvNullable(TlvInt64.bound({ min: 0, max: 1000000 })), { default: null }),
334
- /**
335
- * This shall indicate the Power Factor ratio in +/- 1/100ths of a percent.
336
- *
337
- * The reporting interval of this attribute shall be manufacturer dependent. The server may choose to omit
338
- * publication of deltas considered not meaningful.
339
- *
340
- * The server shall NOT mark this attribute ready for report if the last time this was done was more
341
- * recently than 1 second ago.
342
- *
343
- * The server may delay marking this attribute ready for report for longer periods if needed, however the
344
- * server shall NOT delay marking this attribute as ready for report for longer than 60 seconds.
345
- *
346
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.6.18
347
- */
348
- powerFactor: OptionalAttribute(0x11, TlvNullable(TlvInt64.bound({ min: -10000, max: 10000 })), { default: null }),
349
- },
350
- });
351
- /**
352
- * A ElectricalPowerMeasurementCluster supports these elements if it supports feature Harmonics.
353
- */
354
- ElectricalPowerMeasurement.HarmonicsComponent = MutableCluster.Component({
355
- attributes: {
356
- /**
357
- * This shall indicate a list of HarmonicMeasurementStruct values, with each HarmonicMeasurementStruct
358
- * representing the harmonic current reading for the harmonic order specified by Order.
359
- *
360
- * The reporting interval of this attribute shall be manufacturer dependent. The server may choose to omit
361
- * publication of deltas considered not meaningful.
362
- *
363
- * The server shall NOT mark this attribute ready for report if the last time this was done was more
364
- * recently than 1 second ago.
365
- *
366
- * The server may delay marking this attribute ready for report for longer periods if needed, however the
367
- * server shall NOT delay marking this attribute as ready for report for longer than 60 seconds.
368
- *
369
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.6.16
370
- */
371
- harmonicCurrents: Attribute(0xf, TlvNullable(TlvArray(ElectricalPowerMeasurement.TlvHarmonicMeasurement)), { default: null }),
372
- },
373
- });
374
- /**
375
- * A ElectricalPowerMeasurementCluster supports these elements if it supports feature PowerQuality.
376
- */
377
- ElectricalPowerMeasurement.PowerQualityComponent = MutableCluster.Component({
378
- attributes: {
379
- /**
380
- * This shall indicate a list of HarmonicMeasurementStruct values, with each HarmonicMeasurementStruct
381
- * representing the most recent phase of the harmonic current reading for the harmonic
382
- *
383
- * order specified by Order.
384
- *
385
- * The reporting interval of this attribute shall be manufacturer dependent. The server may choose to omit
386
- * publication of deltas considered not meaningful.
387
- *
388
- * The server shall NOT mark this attribute ready for report if the last time this was done was more
389
- * recently than 1 second ago.
390
- *
391
- * The server may delay marking this attribute ready for report for longer periods if needed, however the
392
- * server shall NOT delay marking this attribute as ready for report for longer than 60 seconds.
393
- *
394
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.6.17
395
- */
396
- harmonicPhases: Attribute(0x10, TlvNullable(TlvArray(ElectricalPowerMeasurement.TlvHarmonicMeasurement)), { default: null }),
397
- },
398
- });
399
- /**
400
- * A ElectricalPowerMeasurementCluster supports these elements if it supports feature PolyphasePower.
401
- */
402
- ElectricalPowerMeasurement.PolyphasePowerComponent = MutableCluster.Component({
403
- attributes: {
404
- /**
405
- * This shall indicate the most recent NeutralCurrent reading in milliamps (mA). Typically this is a
406
- * derived value, taking the magnitude of the vector sum of phase currents.
407
- *
408
- * If the neutral current cannot be measured or derived, a value of null shall be returned.
409
- *
410
- * A positive value represents an imbalance between the phase currents when power is imported. A negative
411
- * value represents an imbalance between the phase currents when power is exported.
412
- *
413
- * The reporting interval of this attribute shall be manufacturer dependent. The server may choose to omit
414
- * publication of deltas considered not meaningful.
415
- *
416
- * The server shall NOT mark this attribute ready for report if the last time this was done was more
417
- * recently than 1 second ago.
418
- *
419
- * The server may delay marking this attribute ready for report for longer periods if needed, however the
420
- * server shall NOT delay marking this attribute as ready for report for longer than 60 seconds.
421
- *
422
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.6.19
423
- */
424
- neutralCurrent: OptionalAttribute(0x12, TlvNullable(TlvInt64.bound({ min: -(2 ** 62), max: 2 ** 62 })), { default: null }),
425
- },
426
- });
427
- /**
428
- * These are optional features supported by ElectricalPowerMeasurementCluster.
429
- *
430
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.4
431
- */
432
- let Feature;
433
- (function (Feature) {
434
- /**
435
- * DirectCurrent
436
- *
437
- * This feature indicates the cluster can measure a direct current.
438
- *
439
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.4.1
440
- */
441
- Feature["DirectCurrent"] = "DirectCurrent";
442
- /**
443
- * AlternatingCurrent
444
- *
445
- * This feature indicates the cluster can measure an alternating current.
446
- *
447
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.4.2
448
- */
449
- Feature["AlternatingCurrent"] = "AlternatingCurrent";
450
- /**
451
- * PolyphasePower
452
- *
453
- * This feature indicates the cluster represents the collective measurements for a Polyphase power supply.
454
- *
455
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.4.3
456
- */
457
- Feature["PolyphasePower"] = "PolyphasePower";
458
- /**
459
- * Harmonics
460
- *
461
- * This feature indicates the cluster can measure the harmonics of an alternating current.
462
- *
463
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.4.4
464
- */
465
- Feature["Harmonics"] = "Harmonics";
466
- /**
467
- * PowerQuality
468
- *
469
- * This feature indicates the cluster can measure the harmonic phases of an alternating current.
470
- *
471
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.4.5
472
- */
473
- Feature["PowerQuality"] = "PowerQuality";
474
- })(Feature = ElectricalPowerMeasurement.Feature || (ElectricalPowerMeasurement.Feature = {}));
475
- /**
476
- * These elements and properties are present in all ElectricalPowerMeasurement clusters.
477
- */
478
- ElectricalPowerMeasurement.Base = MutableCluster.Component({
479
- id: 0x90,
480
- name: 'ElectricalPowerMeasurement',
481
- revision: 1,
482
- features: {
483
- /**
484
- * DirectCurrent
485
- *
486
- * This feature indicates the cluster can measure a direct current.
487
- *
488
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.4.1
489
- */
490
- directCurrent: BitFlag(0),
491
- /**
492
- * AlternatingCurrent
493
- *
494
- * This feature indicates the cluster can measure an alternating current.
495
- *
496
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.4.2
497
- */
498
- alternatingCurrent: BitFlag(1),
499
- /**
500
- * PolyphasePower
501
- *
502
- * This feature indicates the cluster represents the collective measurements for a Polyphase power supply.
503
- *
504
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.4.3
505
- */
506
- polyphasePower: BitFlag(2),
507
- /**
508
- * Harmonics
509
- *
510
- * This feature indicates the cluster can measure the harmonics of an alternating current.
511
- *
512
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.4.4
513
- */
514
- harmonics: BitFlag(3),
515
- /**
516
- * PowerQuality
517
- *
518
- * This feature indicates the cluster can measure the harmonic phases of an alternating current.
519
- *
520
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.4.5
521
- */
522
- powerQuality: BitFlag(4),
523
- },
524
- attributes: {
525
- /**
526
- * This shall indicate the current mode of the server. For some servers, such as an EV, this may change
527
- * depending on the mode of charging or discharging.
528
- *
529
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.6.1
530
- */
531
- powerMode: Attribute(0x0, TlvEnum()),
532
- /**
533
- * This shall indicate the maximum number of measurement types the server is capable of reporting.
534
- *
535
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.6.2
536
- */
537
- numberOfMeasurementTypes: FixedAttribute(0x1, TlvUInt8.bound({ min: 1 })),
538
- /**
539
- * This shall indicate a list of accuracy specifications for the measurement types supported by the server.
540
- * There shall be an entry for ActivePower, as well as any other measurement types implemented by this
541
- * server.
542
- *
543
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.6.3
544
- */
545
- accuracy: FixedAttribute(0x2, TlvArray(TlvMeasurementAccuracy, { minLength: 1 })),
546
- /**
547
- * This shall indicate a list of measured ranges for different measurement types. Each measurement type
548
- * shall have at most one entry in this list, representing the range of measurements in the most recent
549
- * measurement period.
550
- *
551
- * The reporting interval of this attribute shall be manufacturer dependent. The server may choose to omit
552
- * publication of deltas considered not meaningful.
553
- *
554
- * The server shall NOT mark this attribute ready for report if the last time this was done was more
555
- * recently than 1 second ago.
556
- *
557
- * The server may delay marking this attribute ready for report for longer periods if needed, however the
558
- * server shall NOT delay marking this attribute as ready for report for longer than 60 seconds.
559
- *
560
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.6.4
561
- */
562
- ranges: OptionalAttribute(0x3, TlvArray(ElectricalPowerMeasurement.TlvMeasurementRange, { minLength: 0 }), { default: [] }),
563
- /**
564
- * This shall indicate the most recent Voltage reading in millivolts (mV).
565
- *
566
- * The reporting interval of this attribute shall be manufacturer dependent. The server may choose to omit
567
- * publication of deltas considered not meaningful.
568
- *
569
- * The server shall NOT mark this attribute ready for report if the last time this was done was more
570
- * recently than 1 second ago.
571
- *
572
- * The server may delay marking this attribute ready for report for longer periods if needed, however the
573
- * server shall NOT delay marking this attribute as ready for report for longer than 60 seconds.
574
- *
575
- * If the voltage cannot be measured, a value of null shall be returned.
576
- *
577
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.6.5
578
- */
579
- voltage: OptionalAttribute(0x4, TlvNullable(TlvInt64.bound({ min: -(2 ** 62), max: 2 ** 62 })), { default: null }),
580
- /**
581
- * This shall indicate the most recent ActiveCurrent reading in milliamps (mA).
582
- *
583
- * A positive value represents current flowing into the server, while a negative value represents current
584
- * flowing out of the server.
585
- *
586
- * The reporting interval of this attribute shall be manufacturer dependent. The server may choose to omit
587
- * publication of deltas considered not meaningful.
588
- *
589
- * The server shall NOT mark this attribute ready for report if the last time this was done was more
590
- * recently than 1 second ago.
591
- *
592
- * The server may delay marking this attribute ready for report for longer periods if needed, however the
593
- * server shall NOT delay marking this attribute as ready for report for longer than 60 seconds.
594
- *
595
- * If the current cannot be measured, a value of null shall be returned.
596
- *
597
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.6.6
598
- */
599
- activeCurrent: OptionalAttribute(0x5, TlvNullable(TlvInt64.bound({ min: -(2 ** 62), max: 2 ** 62 })), { default: null }),
600
- /**
601
- * This shall indicate the most recent ActivePower reading in milliwatts (mW). If the power cannot be
602
- * measured, a value of null shall be returned.
603
- *
604
- * A positive value represents power imported, while a negative value represents power exported.
605
- *
606
- * The reporting interval of this attribute shall be manufacturer dependent. The server may choose to omit
607
- * publication of deltas considered not meaningful.
608
- *
609
- * The server shall NOT mark this attribute ready for report if the last time this was done was more
610
- * recently than 1 second ago.
611
- *
612
- * The server may delay marking this attribute ready for report for longer periods if needed, however the
613
- * server shall NOT delay marking this attribute as ready for report for longer than 60 seconds.
614
- *
615
- * If the Polyphase Power feature is set, this value represents the combined active power imported or
616
- * exported.
617
- *
618
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.6.9
619
- */
620
- activePower: Attribute(0x8, TlvNullable(TlvInt64.bound({ min: -(2 ** 62), max: 2 ** 62 })), { default: null }),
621
- },
622
- events: {
623
- /**
624
- * If supported, this event shall be generated at the end of a measurement period. The start and end times
625
- * for measurement periods shall be determined by the server, and may represent overlapping periods.
626
- *
627
- * @see {@link MatterSpecification.v13.Cluster} § 2.13.7.1
628
- */
629
- measurementPeriodRanges: OptionalEvent(0x0, EventPriority.Info, ElectricalPowerMeasurement.TlvMeasurementPeriodRangesEvent),
630
- },
631
- /**
632
- * This metadata controls which ElectricalPowerMeasurementCluster elements matter.js activates for specific
633
- * feature combinations.
634
- */
635
- extensions: MutableCluster.Extensions({ flags: { alternatingCurrent: true }, component: ElectricalPowerMeasurement.AlternatingCurrentComponent }, { flags: { harmonics: true }, component: ElectricalPowerMeasurement.HarmonicsComponent }, { flags: { powerQuality: true }, component: ElectricalPowerMeasurement.PowerQualityComponent }, { flags: { polyphasePower: true }, component: ElectricalPowerMeasurement.PolyphasePowerComponent }, { flags: { polyphasePower: true, alternatingCurrent: false }, component: false }, { flags: { harmonics: true, alternatingCurrent: false }, component: false }, { flags: { powerQuality: true, alternatingCurrent: false }, component: false }, { flags: { directCurrent: false, alternatingCurrent: false }, component: false }),
636
- });
637
- /**
638
- * @see {@link Cluster}
639
- */
640
- ElectricalPowerMeasurement.ClusterInstance = MutableCluster.ExtensibleOnly(ElectricalPowerMeasurement.Base);
641
- ElectricalPowerMeasurement.Cluster = ElectricalPowerMeasurement.ClusterInstance;
642
- const ALTC = { alternatingCurrent: true };
643
- const HARM = { harmonics: true };
644
- const PWRQ = { powerQuality: true };
645
- const POLY = { polyphasePower: true };
646
- /**
647
- * @see {@link Complete}
648
- */
649
- ElectricalPowerMeasurement.CompleteInstance = MutableCluster({
650
- id: ElectricalPowerMeasurement.Base.id,
651
- name: ElectricalPowerMeasurement.Base.name,
652
- revision: ElectricalPowerMeasurement.Base.revision,
653
- features: ElectricalPowerMeasurement.Base.features,
654
- attributes: {
655
- ...ElectricalPowerMeasurement.Base.attributes,
656
- reactiveCurrent: MutableCluster.AsConditional(ElectricalPowerMeasurement.AlternatingCurrentComponent.attributes.reactiveCurrent, { optionalIf: [ALTC] }),
657
- apparentCurrent: MutableCluster.AsConditional(ElectricalPowerMeasurement.AlternatingCurrentComponent.attributes.apparentCurrent, { optionalIf: [ALTC] }),
658
- reactivePower: MutableCluster.AsConditional(ElectricalPowerMeasurement.AlternatingCurrentComponent.attributes.reactivePower, { optionalIf: [ALTC] }),
659
- apparentPower: MutableCluster.AsConditional(ElectricalPowerMeasurement.AlternatingCurrentComponent.attributes.apparentPower, { optionalIf: [ALTC] }),
660
- rmsVoltage: MutableCluster.AsConditional(ElectricalPowerMeasurement.AlternatingCurrentComponent.attributes.rmsVoltage, { optionalIf: [ALTC] }),
661
- rmsCurrent: MutableCluster.AsConditional(ElectricalPowerMeasurement.AlternatingCurrentComponent.attributes.rmsCurrent, { optionalIf: [ALTC] }),
662
- rmsPower: MutableCluster.AsConditional(ElectricalPowerMeasurement.AlternatingCurrentComponent.attributes.rmsPower, { optionalIf: [ALTC] }),
663
- frequency: MutableCluster.AsConditional(ElectricalPowerMeasurement.AlternatingCurrentComponent.attributes.frequency, { optionalIf: [ALTC] }),
664
- harmonicCurrents: MutableCluster.AsConditional(ElectricalPowerMeasurement.HarmonicsComponent.attributes.harmonicCurrents, { mandatoryIf: [HARM] }),
665
- harmonicPhases: MutableCluster.AsConditional(ElectricalPowerMeasurement.PowerQualityComponent.attributes.harmonicPhases, { mandatoryIf: [PWRQ] }),
666
- powerFactor: MutableCluster.AsConditional(ElectricalPowerMeasurement.AlternatingCurrentComponent.attributes.powerFactor, { optionalIf: [ALTC] }),
667
- neutralCurrent: MutableCluster.AsConditional(ElectricalPowerMeasurement.PolyphasePowerComponent.attributes.neutralCurrent, { optionalIf: [POLY] }),
668
- },
669
- events: ElectricalPowerMeasurement.Base.events,
670
- });
671
- ElectricalPowerMeasurement.Complete = ElectricalPowerMeasurement.CompleteInstance;
672
- })(ElectricalPowerMeasurement || (ElectricalPowerMeasurement = {}));
673
- export const ElectricalPowerMeasurementCluster = ElectricalPowerMeasurement.Cluster;
674
- ClusterRegistry.register(ElectricalPowerMeasurement.Complete);
675
- //# sourceMappingURL=ElectricalPowerMeasurementCluster.js.map