matterbridge 1.0.6 → 1.1.2

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 (66) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/LICENSE +202 -21
  3. package/README.md +90 -5
  4. package/Screenshot devices page.png +0 -0
  5. package/Screenshot home page.png +0 -0
  6. package/dist/AirQualityCluster.d.ts +22 -0
  7. package/dist/AirQualityCluster.d.ts.map +1 -1
  8. package/dist/AirQualityCluster.js +23 -1
  9. package/dist/AirQualityCluster.js.map +1 -1
  10. package/dist/ColorControlServer.d.ts +20 -3
  11. package/dist/ColorControlServer.d.ts.map +1 -1
  12. package/dist/ColorControlServer.js +20 -3
  13. package/dist/ColorControlServer.js.map +1 -1
  14. package/dist/TvocCluster.d.ts +262 -0
  15. package/dist/TvocCluster.d.ts.map +1 -0
  16. package/dist/TvocCluster.js +114 -0
  17. package/dist/TvocCluster.js.map +1 -0
  18. package/dist/index.d.ts +30 -0
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +37 -1
  21. package/dist/index.js.map +1 -1
  22. package/dist/matterbridge.d.ts +187 -17
  23. package/dist/matterbridge.d.ts.map +1 -1
  24. package/dist/matterbridge.js +721 -218
  25. package/dist/matterbridge.js.map +1 -1
  26. package/dist/matterbridgeAccessoryPlatform.d.ts +50 -11
  27. package/dist/matterbridgeAccessoryPlatform.d.ts.map +1 -1
  28. package/dist/matterbridgeAccessoryPlatform.js +56 -41
  29. package/dist/matterbridgeAccessoryPlatform.js.map +1 -1
  30. package/dist/matterbridgeComposed.d.ts +43 -0
  31. package/dist/matterbridgeComposed.d.ts.map +1 -0
  32. package/dist/matterbridgeComposed.js +58 -0
  33. package/dist/matterbridgeComposed.js.map +1 -0
  34. package/dist/matterbridgeDevice.d.ts +209 -4
  35. package/dist/matterbridgeDevice.d.ts.map +1 -1
  36. package/dist/matterbridgeDevice.js +587 -51
  37. package/dist/matterbridgeDevice.js.map +1 -1
  38. package/dist/matterbridgeDynamicPlatform.d.ts +50 -11
  39. package/dist/matterbridgeDynamicPlatform.d.ts.map +1 -1
  40. package/dist/matterbridgeDynamicPlatform.js +56 -41
  41. package/dist/matterbridgeDynamicPlatform.js.map +1 -1
  42. package/frontend/build/Matterbridge.jpg +0 -0
  43. package/frontend/build/asset-manifest.json +6 -6
  44. package/frontend/build/index.html +1 -1
  45. package/frontend/build/static/css/main.6d93e0db.css +2 -0
  46. package/frontend/build/static/css/main.6d93e0db.css.map +1 -0
  47. package/frontend/build/static/js/main.21c55a60.js +3 -0
  48. package/frontend/build/static/js/{main.a000062f.js.LICENSE.txt → main.21c55a60.js.LICENSE.txt} +2 -0
  49. package/frontend/build/static/js/main.21c55a60.js.map +1 -0
  50. package/package.json +8 -4
  51. package/.eslintrc.json +0 -45
  52. package/.gitattributes +0 -2
  53. package/.prettierignore +0 -2
  54. package/.prettierrc.json +0 -12
  55. package/frontend/README.md +0 -70
  56. package/frontend/build/static/css/main.8b969fd5.css +0 -2
  57. package/frontend/build/static/css/main.8b969fd5.css.map +0 -1
  58. package/frontend/build/static/js/main.a000062f.js +0 -3
  59. package/frontend/build/static/js/main.a000062f.js.map +0 -1
  60. package/frontend/package-lock.json +0 -18351
  61. package/frontend/package.json +0 -40
  62. package/frontend/public/favicon.ico +0 -0
  63. package/frontend/public/index.html +0 -15
  64. package/frontend/public/manifest.json +0 -15
  65. package/frontend/public/matter.png +0 -0
  66. package/frontend/public/robots.txt +0 -3
@@ -0,0 +1,262 @@
1
+ /**
2
+ * This file contains the TvocMeasurement cluster.
3
+ *
4
+ * @file TvocCluster.ts
5
+ * @author Luca Liguori
6
+ * @date 2023-12-29
7
+ * @version 1.0.1
8
+ *
9
+ * Copyright 2024 Luca Liguori.
10
+ *
11
+ * Licensed under the Apache License, Version 2.0 (the "License");
12
+ * you may not use this file except in compliance with the License.
13
+ * You may obtain a copy of the License at
14
+ *
15
+ * http://www.apache.org/licenses/LICENSE-2.0
16
+ *
17
+ * Unless required by applicable law or agreed to in writing, software
18
+ * distributed under the License is distributed on an "AS IS" BASIS,
19
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
+ * See the License for the specific language governing permissions and
21
+ * limitations under the License. *
22
+ */
23
+ import { ClusterFactory, OptionalAttribute } from '@project-chip/matter-node.js/cluster';
24
+ import { Attribute } from '@project-chip/matter-node.js/cluster';
25
+ import { BitFlag, BitFlags, TypeFromPartialBitSchema } from '@project-chip/matter-node.js/schema';
26
+ export declare namespace TvocMeasurement {
27
+ enum Feature {
28
+ NumericMeasurement = "NumericMeasurement",
29
+ LevelIndication = "LevelIndication",
30
+ MediumLevel = "MediumLevel",
31
+ CriticalLevel = "CriticalLevel",
32
+ PeakMeasurement = "PeakMeasurement",
33
+ AverageMeasurement = "AverageMeasurement"
34
+ }
35
+ enum MeasurementUnitType {
36
+ PPM = 0,
37
+ PPB = 1,
38
+ PPT = 2,
39
+ MGM3 = 3,
40
+ UGM3 = 4,
41
+ NGM3 = 5,
42
+ PM3 = 6,
43
+ BQM3 = 7
44
+ }
45
+ enum MeasurementMediumType {
46
+ Air = 0,
47
+ Water = 1,
48
+ Soil = 2
49
+ }
50
+ enum LevelValueType {
51
+ Unknown = 0,
52
+ Low = 1,
53
+ Medium = 2,
54
+ High = 3,
55
+ Critical = 4
56
+ }
57
+ const Base: ClusterFactory.Definition<{
58
+ readonly id: 1070;
59
+ readonly name: "TvocMeasurement";
60
+ readonly revision: 3;
61
+ readonly features: {
62
+ readonly numericMeasurement: BitFlag;
63
+ readonly levelIndication: BitFlag;
64
+ readonly mediumLevel: BitFlag;
65
+ readonly criticalLevel: BitFlag;
66
+ readonly peakMeasurement: BitFlag;
67
+ readonly averageMeasurement: BitFlag;
68
+ };
69
+ readonly attributes: {
70
+ readonly measuredValue: Attribute<number | null, any>;
71
+ readonly minMeasuredValue: Attribute<number | null, any>;
72
+ readonly maxMeasuredValue: Attribute<number | null, any>;
73
+ readonly peakMeasuredValue: OptionalAttribute<number | null, any>;
74
+ readonly peakMeasuredValueWindow: OptionalAttribute<number, any>;
75
+ readonly averageMeasuredValue: OptionalAttribute<number | null, any>;
76
+ readonly averageMeasuredValueWindow: OptionalAttribute<number, any>;
77
+ readonly uncertainty: OptionalAttribute<number, any>;
78
+ readonly measurementUnit: OptionalAttribute<MeasurementUnitType, any>;
79
+ readonly measurementMedium: OptionalAttribute<MeasurementMediumType, any>;
80
+ readonly levelValue: OptionalAttribute<LevelValueType, any>;
81
+ };
82
+ }>;
83
+ const NumericMeasurement: ClusterFactory.TypedComponent<{}>;
84
+ const LevelIndication: ClusterFactory.TypedComponent<{}>;
85
+ const MediumLevel: ClusterFactory.TypedComponent<{}>;
86
+ const CriticalLevel: ClusterFactory.TypedComponent<{}>;
87
+ const PeakMeasurement: ClusterFactory.TypedComponent<{}>;
88
+ const AverageMeasurement: ClusterFactory.TypedComponent<{}>;
89
+ const Cluster: {
90
+ id: import("@project-chip/matter.js/util").Branded<1070 & import("@project-chip/matter.js/util").Brand<"ClusterId">, "ClusterId">;
91
+ name: "TvocMeasurement";
92
+ revision: 3;
93
+ features: {
94
+ readonly numericMeasurement: BitFlag;
95
+ readonly levelIndication: BitFlag;
96
+ readonly mediumLevel: BitFlag;
97
+ readonly criticalLevel: BitFlag;
98
+ readonly peakMeasurement: BitFlag;
99
+ readonly averageMeasurement: BitFlag;
100
+ };
101
+ supportedFeatures: {};
102
+ attributes: import("@project-chip/matter.js/util").Merge<import("@project-chip/matter.js/util").Merge<{
103
+ readonly measuredValue: Attribute<number | null, any>;
104
+ readonly minMeasuredValue: Attribute<number | null, any>;
105
+ readonly maxMeasuredValue: Attribute<number | null, any>;
106
+ readonly peakMeasuredValue: OptionalAttribute<number | null, any>;
107
+ readonly peakMeasuredValueWindow: OptionalAttribute<number, any>;
108
+ readonly averageMeasuredValue: OptionalAttribute<number | null, any>;
109
+ readonly averageMeasuredValueWindow: OptionalAttribute<number, any>;
110
+ readonly uncertainty: OptionalAttribute<number, any>;
111
+ readonly measurementUnit: OptionalAttribute<MeasurementUnitType, any>;
112
+ readonly measurementMedium: OptionalAttribute<MeasurementMediumType, any>;
113
+ readonly levelValue: OptionalAttribute<LevelValueType, any>;
114
+ }, import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
115
+ readonly numericMeasurement: BitFlag;
116
+ readonly levelIndication: BitFlag;
117
+ readonly mediumLevel: BitFlag;
118
+ readonly criticalLevel: BitFlag;
119
+ readonly peakMeasurement: BitFlag;
120
+ readonly averageMeasurement: BitFlag;
121
+ }>>, import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
122
+ readonly numericMeasurement: BitFlag;
123
+ readonly levelIndication: BitFlag;
124
+ readonly mediumLevel: BitFlag;
125
+ readonly criticalLevel: BitFlag;
126
+ readonly peakMeasurement: BitFlag;
127
+ readonly averageMeasurement: BitFlag;
128
+ }>>;
129
+ commands: {};
130
+ events: {};
131
+ unknown: false;
132
+ } & Omit<ClusterFactory.Definition<{
133
+ readonly id: 1070;
134
+ readonly name: "TvocMeasurement";
135
+ readonly revision: 3;
136
+ readonly features: {
137
+ readonly numericMeasurement: BitFlag;
138
+ readonly levelIndication: BitFlag;
139
+ readonly mediumLevel: BitFlag;
140
+ readonly criticalLevel: BitFlag;
141
+ readonly peakMeasurement: BitFlag;
142
+ readonly averageMeasurement: BitFlag;
143
+ };
144
+ readonly attributes: {
145
+ readonly measuredValue: Attribute<number | null, any>;
146
+ readonly minMeasuredValue: Attribute<number | null, any>;
147
+ readonly maxMeasuredValue: Attribute<number | null, any>;
148
+ readonly peakMeasuredValue: OptionalAttribute<number | null, any>;
149
+ readonly peakMeasuredValueWindow: OptionalAttribute<number, any>;
150
+ readonly averageMeasuredValue: OptionalAttribute<number | null, any>;
151
+ readonly averageMeasuredValueWindow: OptionalAttribute<number, any>;
152
+ readonly uncertainty: OptionalAttribute<number, any>;
153
+ readonly measurementUnit: OptionalAttribute<MeasurementUnitType, any>;
154
+ readonly measurementMedium: OptionalAttribute<MeasurementMediumType, any>;
155
+ readonly levelValue: OptionalAttribute<LevelValueType, any>;
156
+ };
157
+ }>, "attributes"> & {
158
+ readonly with: <T extends ("NumericMeasurement" | "LevelIndication" | "MediumLevel" | "CriticalLevel" | "PeakMeasurement" | "AverageMeasurement")[]>(...features_0: T) => Extension<BitFlags<{
159
+ readonly numericMeasurement: BitFlag;
160
+ readonly levelIndication: BitFlag;
161
+ readonly mediumLevel: BitFlag;
162
+ readonly criticalLevel: BitFlag;
163
+ readonly peakMeasurement: BitFlag;
164
+ readonly averageMeasurement: BitFlag;
165
+ }, T>>;
166
+ };
167
+ type Extension<SF extends TypeFromPartialBitSchema<typeof Base.features>> = Omit<typeof Base, 'supportedFeatures'> & {
168
+ supportedFeatures: SF;
169
+ } & (SF extends {
170
+ numericMeasurement: true;
171
+ } ? typeof NumericMeasurement : {}) & (SF extends {
172
+ levelIndication: true;
173
+ } ? typeof LevelIndication : {}) & (SF extends {
174
+ mediumLevel: true;
175
+ } ? typeof MediumLevel : {}) & (SF extends {
176
+ criticalLevel: true;
177
+ } ? typeof CriticalLevel : {}) & (SF extends {
178
+ peakMeasurement: true;
179
+ } ? typeof PeakMeasurement : {}) & (SF extends {
180
+ averageMeasurement: true;
181
+ } ? typeof AverageMeasurement : {});
182
+ }
183
+ export type TvocMeasurementCluster = typeof TvocMeasurement.Cluster;
184
+ export declare const TvocMeasurementCluster: {
185
+ id: import("@project-chip/matter.js/util").Branded<1070 & import("@project-chip/matter.js/util").Brand<"ClusterId">, "ClusterId">;
186
+ name: "TvocMeasurement";
187
+ revision: 3;
188
+ features: {
189
+ readonly numericMeasurement: BitFlag;
190
+ readonly levelIndication: BitFlag;
191
+ readonly mediumLevel: BitFlag;
192
+ readonly criticalLevel: BitFlag;
193
+ readonly peakMeasurement: BitFlag;
194
+ readonly averageMeasurement: BitFlag;
195
+ };
196
+ supportedFeatures: {};
197
+ attributes: import("@project-chip/matter.js/util").Merge<import("@project-chip/matter.js/util").Merge<{
198
+ readonly measuredValue: Attribute<number | null, any>;
199
+ readonly minMeasuredValue: Attribute<number | null, any>;
200
+ readonly maxMeasuredValue: Attribute<number | null, any>;
201
+ readonly peakMeasuredValue: OptionalAttribute<number | null, any>;
202
+ readonly peakMeasuredValueWindow: OptionalAttribute<number, any>;
203
+ readonly averageMeasuredValue: OptionalAttribute<number | null, any>;
204
+ readonly averageMeasuredValueWindow: OptionalAttribute<number, any>;
205
+ readonly uncertainty: OptionalAttribute<number, any>;
206
+ readonly measurementUnit: OptionalAttribute<TvocMeasurement.MeasurementUnitType, any>;
207
+ readonly measurementMedium: OptionalAttribute<TvocMeasurement.MeasurementMediumType, any>;
208
+ readonly levelValue: OptionalAttribute<TvocMeasurement.LevelValueType, any>;
209
+ }, import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
210
+ readonly numericMeasurement: BitFlag;
211
+ readonly levelIndication: BitFlag;
212
+ readonly mediumLevel: BitFlag;
213
+ readonly criticalLevel: BitFlag;
214
+ readonly peakMeasurement: BitFlag;
215
+ readonly averageMeasurement: BitFlag;
216
+ }>>, import("@project-chip/matter-node.js/cluster").GlobalAttributes<{
217
+ readonly numericMeasurement: BitFlag;
218
+ readonly levelIndication: BitFlag;
219
+ readonly mediumLevel: BitFlag;
220
+ readonly criticalLevel: BitFlag;
221
+ readonly peakMeasurement: BitFlag;
222
+ readonly averageMeasurement: BitFlag;
223
+ }>>;
224
+ commands: {};
225
+ events: {};
226
+ unknown: false;
227
+ } & Omit<ClusterFactory.Definition<{
228
+ readonly id: 1070;
229
+ readonly name: "TvocMeasurement";
230
+ readonly revision: 3;
231
+ readonly features: {
232
+ readonly numericMeasurement: BitFlag;
233
+ readonly levelIndication: BitFlag;
234
+ readonly mediumLevel: BitFlag;
235
+ readonly criticalLevel: BitFlag;
236
+ readonly peakMeasurement: BitFlag;
237
+ readonly averageMeasurement: BitFlag;
238
+ };
239
+ readonly attributes: {
240
+ readonly measuredValue: Attribute<number | null, any>;
241
+ readonly minMeasuredValue: Attribute<number | null, any>;
242
+ readonly maxMeasuredValue: Attribute<number | null, any>;
243
+ readonly peakMeasuredValue: OptionalAttribute<number | null, any>;
244
+ readonly peakMeasuredValueWindow: OptionalAttribute<number, any>;
245
+ readonly averageMeasuredValue: OptionalAttribute<number | null, any>;
246
+ readonly averageMeasuredValueWindow: OptionalAttribute<number, any>;
247
+ readonly uncertainty: OptionalAttribute<number, any>;
248
+ readonly measurementUnit: OptionalAttribute<TvocMeasurement.MeasurementUnitType, any>;
249
+ readonly measurementMedium: OptionalAttribute<TvocMeasurement.MeasurementMediumType, any>;
250
+ readonly levelValue: OptionalAttribute<TvocMeasurement.LevelValueType, any>;
251
+ };
252
+ }>, "attributes"> & {
253
+ readonly with: <T extends ("NumericMeasurement" | "LevelIndication" | "MediumLevel" | "CriticalLevel" | "PeakMeasurement" | "AverageMeasurement")[]>(...features_0: T) => TvocMeasurement.Extension<BitFlags<{
254
+ readonly numericMeasurement: BitFlag;
255
+ readonly levelIndication: BitFlag;
256
+ readonly mediumLevel: BitFlag;
257
+ readonly criticalLevel: BitFlag;
258
+ readonly peakMeasurement: BitFlag;
259
+ readonly averageMeasurement: BitFlag;
260
+ }, T>>;
261
+ };
262
+ //# sourceMappingURL=TvocCluster.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TvocCluster.d.ts","sourceRoot":"","sources":["../src/TvocCluster.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAKH,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzF,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAGlG,yBAAiB,eAAe,CAAC;IAC/B,KAAY,OAAO;QACjB,kBAAkB,uBAAuB;QACzC,eAAe,oBAAoB;QACnC,WAAW,gBAAgB;QAC3B,aAAa,kBAAkB;QAC/B,eAAe,oBAAoB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,GAC5D,CAAC,EAAE,SAAS;QAAE,aAAa,EAAE,IAAI,CAAA;KAAE,GAAG,OAAO,aAAa,GAAG,EAAE,CAAC,GAChE,CAAC,EAAE,SAAS;QAAE,eAAe,EAAE,IAAI,CAAA;KAAE,GAAG,OAAO,eAAe,GAAG,EAAE,CAAC,GACpE,CAAC,EAAE,SAAS;QAAE,kBAAkB,EAAE,IAAI,CAAA;KAAE,GAAG,OAAO,kBAAkB,GAAG,EAAE,CAAC,CAAC;CAC9E;AAED,MAAM,MAAM,sBAAsB,GAAG,OAAO,eAAe,CAAC,OAAO,CAAC;AACpE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA0B,CAAC"}
@@ -0,0 +1,114 @@
1
+ /**
2
+ * This file contains the TvocMeasurement cluster.
3
+ *
4
+ * @file TvocCluster.ts
5
+ * @author Luca Liguori
6
+ * @date 2023-12-29
7
+ * @version 1.0.1
8
+ *
9
+ * Copyright 2024 Luca Liguori.
10
+ *
11
+ * Licensed under the Apache License, Version 2.0 (the "License");
12
+ * you may not use this file except in compliance with the License.
13
+ * You may obtain a copy of the License at
14
+ *
15
+ * http://www.apache.org/licenses/LICENSE-2.0
16
+ *
17
+ * Unless required by applicable law or agreed to in writing, software
18
+ * distributed under the License is distributed on an "AS IS" BASIS,
19
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
+ * See the License for the specific language governing permissions and
21
+ * limitations under the License. *
22
+ */
23
+ /* eslint-disable @typescript-eslint/no-unused-vars */
24
+ /* eslint-disable @typescript-eslint/ban-types */
25
+ /* eslint-disable @typescript-eslint/no-namespace */
26
+ import { ClusterFactory, OptionalAttribute } from '@project-chip/matter-node.js/cluster';
27
+ import { Attribute } from '@project-chip/matter-node.js/cluster';
28
+ import { BitFlag, BitFlags } from '@project-chip/matter-node.js/schema';
29
+ import { TlvEnum, TlvNullable, TlvUInt16 } from '@project-chip/matter-node.js/tlv';
30
+ export var TvocMeasurement;
31
+ (function (TvocMeasurement) {
32
+ let Feature;
33
+ (function (Feature) {
34
+ Feature["NumericMeasurement"] = "NumericMeasurement";
35
+ Feature["LevelIndication"] = "LevelIndication";
36
+ Feature["MediumLevel"] = "MediumLevel";
37
+ Feature["CriticalLevel"] = "CriticalLevel";
38
+ Feature["PeakMeasurement"] = "PeakMeasurement";
39
+ Feature["AverageMeasurement"] = "AverageMeasurement";
40
+ })(Feature = TvocMeasurement.Feature || (TvocMeasurement.Feature = {}));
41
+ let MeasurementUnitType;
42
+ (function (MeasurementUnitType) {
43
+ MeasurementUnitType[MeasurementUnitType["PPM"] = 0] = "PPM";
44
+ MeasurementUnitType[MeasurementUnitType["PPB"] = 1] = "PPB";
45
+ MeasurementUnitType[MeasurementUnitType["PPT"] = 2] = "PPT";
46
+ MeasurementUnitType[MeasurementUnitType["MGM3"] = 3] = "MGM3";
47
+ MeasurementUnitType[MeasurementUnitType["UGM3"] = 4] = "UGM3";
48
+ MeasurementUnitType[MeasurementUnitType["NGM3"] = 5] = "NGM3";
49
+ MeasurementUnitType[MeasurementUnitType["PM3"] = 6] = "PM3";
50
+ MeasurementUnitType[MeasurementUnitType["BQM3"] = 7] = "BQM3";
51
+ })(MeasurementUnitType = TvocMeasurement.MeasurementUnitType || (TvocMeasurement.MeasurementUnitType = {}));
52
+ let MeasurementMediumType;
53
+ (function (MeasurementMediumType) {
54
+ MeasurementMediumType[MeasurementMediumType["Air"] = 0] = "Air";
55
+ MeasurementMediumType[MeasurementMediumType["Water"] = 1] = "Water";
56
+ MeasurementMediumType[MeasurementMediumType["Soil"] = 2] = "Soil";
57
+ })(MeasurementMediumType = TvocMeasurement.MeasurementMediumType || (TvocMeasurement.MeasurementMediumType = {}));
58
+ let LevelValueType;
59
+ (function (LevelValueType) {
60
+ LevelValueType[LevelValueType["Unknown"] = 0] = "Unknown";
61
+ LevelValueType[LevelValueType["Low"] = 1] = "Low";
62
+ LevelValueType[LevelValueType["Medium"] = 2] = "Medium";
63
+ LevelValueType[LevelValueType["High"] = 3] = "High";
64
+ LevelValueType[LevelValueType["Critical"] = 4] = "Critical";
65
+ })(LevelValueType = TvocMeasurement.LevelValueType || (TvocMeasurement.LevelValueType = {}));
66
+ TvocMeasurement.Base = ClusterFactory.Definition({
67
+ id: 0x042e,
68
+ name: 'TvocMeasurement',
69
+ revision: 3,
70
+ features: {
71
+ numericMeasurement: BitFlag(0),
72
+ levelIndication: BitFlag(1),
73
+ mediumLevel: BitFlag(2),
74
+ criticalLevel: BitFlag(3),
75
+ peakMeasurement: BitFlag(4),
76
+ averageMeasurement: BitFlag(5),
77
+ },
78
+ attributes: {
79
+ measuredValue: Attribute(0x0, TlvNullable(TlvUInt16), { default: 0 }),
80
+ minMeasuredValue: Attribute(0x1, TlvNullable(TlvUInt16), { default: 0 }),
81
+ maxMeasuredValue: Attribute(0x2, TlvNullable(TlvUInt16), { default: 0 }),
82
+ peakMeasuredValue: OptionalAttribute(0x3, TlvNullable(TlvUInt16), { default: 0 }),
83
+ peakMeasuredValueWindow: OptionalAttribute(0x4, TlvUInt16, { default: 1 }),
84
+ averageMeasuredValue: OptionalAttribute(0x5, TlvNullable(TlvUInt16), { default: 0 }),
85
+ averageMeasuredValueWindow: OptionalAttribute(0x6, TlvUInt16, { default: 1 }),
86
+ uncertainty: OptionalAttribute(0x7, TlvUInt16),
87
+ measurementUnit: OptionalAttribute(0x8, TlvEnum()),
88
+ measurementMedium: OptionalAttribute(0x9, TlvEnum()),
89
+ levelValue: OptionalAttribute(0xa, TlvEnum()),
90
+ },
91
+ });
92
+ TvocMeasurement.NumericMeasurement = ClusterFactory.Component({});
93
+ TvocMeasurement.LevelIndication = ClusterFactory.Component({});
94
+ TvocMeasurement.MediumLevel = ClusterFactory.Component({});
95
+ TvocMeasurement.CriticalLevel = ClusterFactory.Component({});
96
+ TvocMeasurement.PeakMeasurement = ClusterFactory.Component({});
97
+ TvocMeasurement.AverageMeasurement = ClusterFactory.Component({});
98
+ TvocMeasurement.Cluster = ClusterFactory.Extensible(TvocMeasurement.Base, (...features) => {
99
+ ClusterFactory.validateFeatureSelection(features, Feature);
100
+ const cluster = ClusterFactory.Definition({
101
+ ...TvocMeasurement.Base,
102
+ supportedFeatures: BitFlags(TvocMeasurement.Base.features, ...features),
103
+ });
104
+ ClusterFactory.extend(cluster, TvocMeasurement.NumericMeasurement, { numericMeasurement: true });
105
+ ClusterFactory.extend(cluster, TvocMeasurement.LevelIndication, { levelIndication: true });
106
+ ClusterFactory.extend(cluster, TvocMeasurement.MediumLevel, { mediumLevel: true });
107
+ ClusterFactory.extend(cluster, TvocMeasurement.CriticalLevel, { criticalLevel: true });
108
+ ClusterFactory.extend(cluster, TvocMeasurement.PeakMeasurement, { peakMeasurement: true });
109
+ ClusterFactory.extend(cluster, TvocMeasurement.AverageMeasurement, { averageMeasurement: true });
110
+ return cluster;
111
+ });
112
+ })(TvocMeasurement || (TvocMeasurement = {}));
113
+ export const TvocMeasurementCluster = TvocMeasurement.Cluster;
114
+ //# sourceMappingURL=TvocCluster.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TvocCluster.js","sourceRoot":"","sources":["../src/TvocCluster.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,sDAAsD;AACtD,iDAAiD;AACjD,oDAAoD;AACpD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzF,OAAO,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAA4B,MAAM,qCAAqC,CAAC;AAClG,OAAO,EAAE,OAAO,EAAY,WAAW,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAE7F,MAAM,KAAW,eAAe,CAkG/B;AAlGD,WAAiB,eAAe;IAC9B,IAAY,OAOX;IAPD,WAAY,OAAO;QACjB,oDAAyC,CAAA;Q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,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,37 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * This file contains the entry point of Matterbridge.
4
+ *
5
+ * @file index.ts
6
+ * @author Luca Liguori
7
+ * @date 2023-12-29
8
+ * @version 1.0.5
9
+ *
10
+ * Copyright 2023, 2024 Luca Liguori.
11
+ *
12
+ * Licensed under the Apache License, Version 2.0 (the "License");
13
+ * you may not use this file except in compliance with the License.
14
+ * You may obtain a copy of the License at
15
+ *
16
+ * http://www.apache.org/licenses/LICENSE-2.0
17
+ *
18
+ * Unless required by applicable law or agreed to in writing, software
19
+ * distributed under the License is distributed on an "AS IS" BASIS,
20
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+ * See the License for the specific language governing permissions and
22
+ * limitations under the License. *
23
+ */
24
+ import '@project-chip/matter-node.js';
25
+ export * from '@project-chip/matter-node.js/device';
26
+ export * from '@project-chip/matter-node.js/cluster';
27
+ export * from '@project-chip/matter-node.js/log';
28
+ export * from '@project-chip/matter-node.js/datatype';
29
+ export * from 'matter-history';
1
30
  export * from './matterbridge.js';
2
31
  export * from './matterbridgeDevice.js';
3
32
  export * from './matterbridgeAccessoryPlatform.js';
4
33
  export * from './matterbridgeDynamicPlatform.js';
5
34
  export * from './AirQualityCluster.js';
6
35
  export * from './ColorControlServer.js';
36
+ export * from './TvocCluster.js';
7
37
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,8BAA8B,CAAC;AAGtC,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AAEtD,cAAc,gBAAgB,CAAC;AAE/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -1,9 +1,45 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * This file contains the entry point of Matterbridge.
4
+ *
5
+ * @file index.ts
6
+ * @author Luca Liguori
7
+ * @date 2023-12-29
8
+ * @version 1.0.5
9
+ *
10
+ * Copyright 2023, 2024 Luca Liguori.
11
+ *
12
+ * Licensed under the Apache License, Version 2.0 (the "License");
13
+ * you may not use this file except in compliance with the License.
14
+ * You may obtain a copy of the License at
15
+ *
16
+ * http://www.apache.org/licenses/LICENSE-2.0
17
+ *
18
+ * Unless required by applicable law or agreed to in writing, software
19
+ * distributed under the License is distributed on an "AS IS" BASIS,
20
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+ * See the License for the specific language governing permissions and
22
+ * limitations under the License. *
23
+ */
24
+ import '@project-chip/matter-node.js';
1
25
  import { Matterbridge } from './matterbridge.js';
26
+ export * from '@project-chip/matter-node.js/device';
27
+ export * from '@project-chip/matter-node.js/cluster';
28
+ export * from '@project-chip/matter-node.js/log';
29
+ export * from '@project-chip/matter-node.js/datatype';
30
+ export * from 'matter-history';
2
31
  export * from './matterbridge.js';
3
32
  export * from './matterbridgeDevice.js';
4
33
  export * from './matterbridgeAccessoryPlatform.js';
5
34
  export * from './matterbridgeDynamicPlatform.js';
6
35
  export * from './AirQualityCluster.js';
7
36
  export * from './ColorControlServer.js';
8
- new Matterbridge();
37
+ export * from './TvocCluster.js';
38
+ async function main() {
39
+ await Matterbridge.loadInstance();
40
+ }
41
+ main().catch((error) => {
42
+ // eslint-disable-next-line no-console
43
+ console.error(`Failed to initialize Matterbridge: ${error}`);
44
+ });
9
45
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AAExC,IAAI,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,8BAA8B,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AAEtD,cAAc,gBAAgB,CAAC;AAE/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AAEjC,KAAK,UAAU,IAAI;IACjB,MAAM,YAAY,CAAC,YAAY,EAAE,CAAC;AACpC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,sCAAsC;IACtC,OAAO,CAAC,KAAK,CAAC,sCAAsC,KAAK,EAAE,CAAC,CAAC;AAC/D,CAAC,CAAC,CAAC"}