matterbridge 1.0.6 → 1.1.3

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 (74) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/LICENSE +202 -21
  3. package/README.md +160 -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 +188 -17
  23. package/dist/matterbridge.d.ts.map +1 -1
  24. package/dist/matterbridge.js +762 -224
  25. package/dist/matterbridge.js.map +1 -1
  26. package/dist/matterbridgeAccessoryPlatform.d.ts +65 -11
  27. package/dist/matterbridgeAccessoryPlatform.d.ts.map +1 -1
  28. package/dist/matterbridgeAccessoryPlatform.js +73 -39
  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/matterbridgeController.d.ts +2 -0
  35. package/dist/matterbridgeController.d.ts.map +1 -0
  36. package/dist/matterbridgeController.js +309 -0
  37. package/dist/matterbridgeController.js.map +1 -0
  38. package/dist/matterbridgeDevice.d.ts +209 -4
  39. package/dist/matterbridgeDevice.d.ts.map +1 -1
  40. package/dist/matterbridgeDevice.js +587 -51
  41. package/dist/matterbridgeDevice.js.map +1 -1
  42. package/dist/matterbridgeDynamicPlatform.d.ts +65 -11
  43. package/dist/matterbridgeDynamicPlatform.d.ts.map +1 -1
  44. package/dist/matterbridgeDynamicPlatform.js +73 -39
  45. package/dist/matterbridgeDynamicPlatform.js.map +1 -1
  46. package/dist/utils.d.ts +2 -0
  47. package/dist/utils.d.ts.map +1 -0
  48. package/dist/utils.js +33 -0
  49. package/dist/utils.js.map +1 -0
  50. package/frontend/build/Matterbridge.jpg +0 -0
  51. package/frontend/build/asset-manifest.json +6 -6
  52. package/frontend/build/index.html +1 -1
  53. package/frontend/build/static/css/main.6d93e0db.css +2 -0
  54. package/frontend/build/static/css/main.6d93e0db.css.map +1 -0
  55. package/frontend/build/static/js/main.b5a876cf.js +3 -0
  56. package/frontend/build/static/js/{main.a000062f.js.LICENSE.txt → main.b5a876cf.js.LICENSE.txt} +2 -0
  57. package/frontend/build/static/js/main.b5a876cf.js.map +1 -0
  58. package/package.json +16 -12
  59. package/.eslintrc.json +0 -45
  60. package/.gitattributes +0 -2
  61. package/.prettierignore +0 -2
  62. package/.prettierrc.json +0 -12
  63. package/frontend/README.md +0 -70
  64. package/frontend/build/static/css/main.8b969fd5.css +0 -2
  65. package/frontend/build/static/css/main.8b969fd5.css.map +0 -1
  66. package/frontend/build/static/js/main.a000062f.js +0 -3
  67. package/frontend/build/static/js/main.a000062f.js.map +0 -1
  68. package/frontend/package-lock.json +0 -18351
  69. package/frontend/package.json +0 -40
  70. package/frontend/public/favicon.ico +0 -0
  71. package/frontend/public/index.html +0 -15
  72. package/frontend/public/manifest.json +0 -15
  73. package/frontend/public/matter.png +0 -0
  74. package/frontend/public/robots.txt +0 -3
@@ -0,0 +1,309 @@
1
+ export {};
2
+ /* eslint-disable max-len */
3
+ /*
4
+ async function startMatterController() {
5
+ log.info('Creating mattercontrollerContext: mattercontrollerContext');
6
+ mattercontrollerContext = storageManager.createContext('mattercontrollerContext');
7
+
8
+ await createMatterServer(storageManager);
9
+
10
+ log.info('Creating matter commissioning controller');
11
+ commissioningController = new CommissioningController({
12
+ autoConnect: false,
13
+ });
14
+ await matterServer.addCommissioningController(commissioningController);
15
+
16
+ log.info('Starting matter server');
17
+ await matterServer.start();
18
+ log.info('Started matter server');
19
+
20
+ AllClustersMap[EveHistoryCluster.id] = EveHistoryCluster;
21
+ log.info('Added custom cluster:', getClusterNameById(EveHistoryCluster.id));
22
+
23
+ if (hasParameter('ble')) {
24
+ //
25
+ }
26
+
27
+ if (hasParameter('pairingcode')) {
28
+ const pairingCode = getParameter('pairingcode');
29
+ const ip = mattercontrollerContext.has('ip') ? mattercontrollerContext.get<string>('ip') : undefined;
30
+ const port = mattercontrollerContext.has('port') ? mattercontrollerContext.get<number>('port') : undefined;
31
+
32
+ let longDiscriminator, setupPin, shortDiscriminator;
33
+ if (pairingCode !== undefined) {
34
+ const pairingCodeCodec = ManualPairingCodeCodec.decode(pairingCode);
35
+ shortDiscriminator = pairingCodeCodec.shortDiscriminator;
36
+ longDiscriminator = undefined;
37
+ setupPin = pairingCodeCodec.passcode;
38
+ logger.debug(`Data extracted from pairing code: ${Logger.toJSON(pairingCodeCodec)}`);
39
+ } else {
40
+ longDiscriminator = mattercontrollerContext.get('longDiscriminator', 3840);
41
+ if (longDiscriminator > 4095) throw new Error('Discriminator value must be less than 4096');
42
+ setupPin = mattercontrollerContext.get('pin', 20202021);
43
+ }
44
+ if ((shortDiscriminator === undefined && longDiscriminator === undefined) || setupPin === undefined) {
45
+ throw new Error('Please specify the longDiscriminator of the device to commission with -longDiscriminator or provide a valid passcode with -passcode');
46
+ }
47
+
48
+ const commissioningOptions: CommissioningOptions = {
49
+ regulatoryLocation: GeneralCommissioning.RegulatoryLocationType.IndoorOutdoor,
50
+ regulatoryCountryCode: 'XX',
51
+ };
52
+ const options = {
53
+ commissioning: commissioningOptions,
54
+ discovery: {
55
+ knownAddress: ip !== undefined && port !== undefined ? { ip, port, type: 'udp' } : undefined,
56
+ identifierData: longDiscriminator !== undefined ? { longDiscriminator } : shortDiscriminator !== undefined ? { shortDiscriminator } : {},
57
+ },
58
+ passcode: setupPin,
59
+ } as NodeCommissioningOptions;
60
+ log.info(`Commissioning ... ${JSON.stringify(options)}`);
61
+ const nodeId = await commissioningController.commissionNode(options);
62
+ mattercontrollerContext.set('nodeId', nodeId.nodeId);
63
+ log.info(`Commissioning successfully done with nodeId: ${nodeId.nodeId}`);
64
+ console.log('ActiveSessionInformation:', commissioningController.getActiveSessionInformation());
65
+ } // (hasParameter('pairingcode'))
66
+
67
+ if (hasParameter('discover')) {
68
+ Logger.defaultLogLevel = Level.DEBUG;
69
+ const discover = await commissioningController.discoverCommissionableDevices({});
70
+ console.log(discover);
71
+ Logger.defaultLogLevel = Level.INFO;
72
+ }
73
+
74
+ log.info(`Commissioning controller is already commisioned: ${commissioningController.isCommissioned()}`);
75
+ const nodes = commissioningController.getCommissionedNodes();
76
+ nodes.forEach(async (nodeId) => {
77
+ log.warn(`Connecting to commissioned node: ${nodeId}`);
78
+ const node = await commissioningController.connectNode(nodeId, {
79
+ attributeChangedCallback: (peerNodeId, { path: { nodeId, clusterId, endpointId, attributeName }, value }) =>
80
+ console.log(`\x1b[37;44mattributeChangedCallback ${peerNodeId}: Attribute ${nodeId}/${endpointId}/${clusterId}/${attributeName} changed to ${Logger.toJSON(value)}\x1b[40;0m`),
81
+ eventTriggeredCallback: (peerNodeId, { path: { nodeId, clusterId, endpointId, eventName }, events }) =>
82
+ console.log(`\x1b[37;44meventTriggeredCallback ${peerNodeId}: Event ${nodeId}/${endpointId}/${clusterId}/${eventName} triggered with ${Logger.toJSON(events)}\x1b[40;0m`),
83
+ stateInformationCallback: (peerNodeId, info) => {
84
+ switch (info) {
85
+ case NodeStateInformation.Connected:
86
+ console.log(`\x1b[37;44mstateInformationCallback ${peerNodeId}: Node ${nodeId} connected\x1b[40;0m`);
87
+ break;
88
+ case NodeStateInformation.Disconnected:
89
+ console.log(`\x1b[37;44mstateInformationCallback ${peerNodeId}: Node ${nodeId} disconnected\x1b[40;0m`);
90
+ break;
91
+ case NodeStateInformation.Reconnecting:
92
+ console.log(`\x1b[37;44mstateInformationCallback ${peerNodeId}: Node ${nodeId} reconnecting\x1b[40;0m`);
93
+ break;
94
+ case NodeStateInformation.WaitingForDeviceDiscovery:
95
+ console.log(`\x1b[37;44mstateInformationCallback ${peerNodeId}: Node ${nodeId} waiting for device discovery\x1b[40;0m`);
96
+ break;
97
+ case NodeStateInformation.StructureChanged:
98
+ console.log(`\x1b[37;44mstateInformationCallback ${peerNodeId}: Node ${nodeId} structure changed\x1b[40;0m`);
99
+ break;
100
+ case NodeStateInformation.Decommissioned:
101
+ console.log(`\x1b[37;44mstateInformationCallback ${peerNodeId}: Node ${nodeId} decommissioned\x1b[40;0m`);
102
+ break;
103
+ default:
104
+ console.log(`\x1b[37;44mstateInformationCallback ${peerNodeId}: Node ${nodeId} NodeStateInformation.${info}\x1b[40;0m`);
105
+ break;
106
+ }
107
+ },
108
+ });
109
+
110
+ const info = node.getRootClusterClient(BasicInformationCluster);
111
+ let name = '';
112
+ if (info !== undefined) {
113
+ log.info(`Node ${nodeId} VendorName ${await info.getVendorNameAttribute()}`); // This call is executed remotely
114
+ log.info(`Node ${nodeId} ProductName ${(name = await info.getProductNameAttribute())}`); // This call is executed remotely
115
+ log.info(`Node ${nodeId} NodeLabel ${await info.getNodeLabelAttribute()}`); // This call is executed remotely
116
+ log.info(`Node ${nodeId} ProductLabel ${await info.getProductLabelAttribute()}`); // This call is executed remotely
117
+ log.info(`Node ${nodeId} SerialNumber ${await info.getSerialNumberAttribute()}`); // This call is executed remotely
118
+ log.info(`Node ${nodeId} UniqueId ${await info.getUniqueIdAttribute()}`); // This call is executed remotely
119
+ } else {
120
+ log.error('No BasicInformation Cluster found. This should never happen!');
121
+ }
122
+
123
+ log.warn(`Logging commissioned node: ${nodeId} name: ${name}`);
124
+ //node.logStructure();
125
+
126
+ const mattercontrollerNodeContext = storageManager.createContext(name);
127
+ const interactionClient = await node.getInteractionClient();
128
+
129
+ // Log BasicInformationCluster
130
+ const attributesInfoCluster = await interactionClient.getMultipleAttributes({
131
+ attributes: [{ clusterId: BasicInformationCluster.id }],
132
+ });
133
+ attributesInfoCluster.forEach((attribute) => {
134
+ log.info(
135
+ `${name}:BasicInformationCluster ${attribute.path.nodeId}-${attribute.path.endpointId}-${attribute.path.clusterId} id: ${attribute.path.attributeId} name: ${attribute.path.attributeName}: ${typeof attribute.value === 'object' ? stringify(attribute.value) : attribute.value}`,
136
+ );
137
+ });
138
+
139
+ // Log PowerSourceConfigurationCluster
140
+ const attributesPowerConfigCluster = await interactionClient.getMultipleAttributes({
141
+ attributes: [{ clusterId: PowerSourceConfigurationCluster.id }],
142
+ });
143
+ attributesPowerConfigCluster.forEach((attribute) => {
144
+ log.info(
145
+ `${name}:PowerSourceConfigurationCluster ${attribute.path.nodeId}-${attribute.path.endpointId}-${attribute.path.clusterId} id: ${attribute.path.attributeId} name: ${attribute.path.attributeName}: ${typeof attribute.value === 'object' ? stringify(attribute.value) : attribute.value}`,
146
+ );
147
+ });
148
+
149
+ // Log PowerSourceCluster
150
+ const attributesPowerCluster = await interactionClient.getMultipleAttributes({
151
+ attributes: [{ clusterId: PowerSourceCluster.id }],
152
+ });
153
+ attributesPowerCluster.forEach((attribute) => {
154
+ log.info(
155
+ `${name}:PowerSourceCluster ${attribute.path.nodeId}-${attribute.path.endpointId}-${attribute.path.clusterId} id: ${attribute.path.attributeId} name: ${attribute.path.attributeName}: ${typeof attribute.value === 'object' ? stringify(attribute.value) : attribute.value}`,
156
+ );
157
+ });
158
+
159
+ // Log ThreadNetworkDiagnostics
160
+ const attributesThreadCluster = await interactionClient.getMultipleAttributes({
161
+ attributes: [{ clusterId: ThreadNetworkDiagnosticsCluster.id }]
162
+ });
163
+ attributesThreadCluster.forEach(attribute => {
164
+ log.info(`${name}:ThreadNetworkDiagnosticsCluster ${attribute.path.nodeId}-${attribute.path.endpointId}-${attribute.path.clusterId} id: ${attribute.path.attributeId} name: ${attribute.path.attributeName}: ${typeof attribute.value === 'object' ? stringify(attribute.value) : attribute.value}`);
165
+ });
166
+
167
+ const devices = node.getDevices();
168
+ devices.forEach(async (device) => {
169
+ log.info(`Device id: ${device.id} name: ${device.name}`);
170
+ //logEndpoint(device);
171
+
172
+ const eveHistory = device.getClusterClient(EveHistoryCluster);
173
+ if (eveHistory !== undefined) {
174
+ log.info(`EveHistory found on id: ${device.id} name: ${device.name}`);
175
+
176
+ // Log EveHistoryCluster
177
+ const attributesEveHistoryCluster = await interactionClient.getMultipleAttributes({
178
+ attributes: [{ clusterId: EveHistoryCluster.id }],
179
+ });
180
+ attributesEveHistoryCluster.forEach((attribute) => {
181
+ log.info(
182
+ `${name}:EveHistoryCluster ${attribute.path.nodeId}-${attribute.path.endpointId}-${attribute.path.clusterId} id: ${attribute.path.attributeId} name: ${attribute.path.attributeName}: ${typeof attribute.value === 'object' ? stringify(attribute.value) : attribute.value}`,
183
+ );
184
+ });
185
+
186
+ const history = new MatterHistory(log, name, { fileName: name + '_history.json' });
187
+ let logMessage = '';
188
+
189
+ // Get and decode HistoryStatus
190
+ const historyStatus: Uint8Array = await eveHistory.getHistoryStatusAttribute();
191
+ log.info((logMessage = history.decodeHistoryStatus(Buffer.from(historyStatus))));
192
+ fs.appendFileSync(name + '.log', logMessage + '\n');
193
+
194
+ // Set HistorySetTime
195
+ const bufferSetTime = history.encodeHistorySetTime();
196
+ log.info((logMessage = history.decodeHistorySetTime(bufferSetTime)));
197
+ fs.appendFileSync(name + '.log', logMessage + '\n');
198
+ await eveHistory.setHistorySetTimeAttribute(bufferSetTime);
199
+
200
+ // Set HistoryRequest
201
+ const entryNumber = mattercontrollerNodeContext.get('nextEntry', history.getFirstEntry());
202
+ const bufferRequest = history.encodeHistoryRequest(history.clamp(entryNumber, history.getFirstEntry(), history.getLastEntry()));
203
+ log.info((logMessage = history.decodeHistoryRequest(bufferRequest)));
204
+ fs.appendFileSync(name + '.log', logMessage + '\n');
205
+ await eveHistory.setHistoryRequestAttribute(bufferRequest);
206
+
207
+ // Get HistoryEntries
208
+ let historyEntries: Uint8Array = await eveHistory.getHistoryEntriesAttribute();
209
+ let bufferHistoryEntries = Buffer.from(historyEntries);
210
+ //console.log(history.historyEntriesToString(bufferHistoryEntries));
211
+ while (bufferHistoryEntries.length > 0) {
212
+ for (let i = 0; i < bufferHistoryEntries.length; ) {
213
+ const bufferHistoryEntry = Buffer.copyBytesFrom(bufferHistoryEntries, i, bufferHistoryEntries.readUInt8(i));
214
+ i += bufferHistoryEntries.readUInt8(i);
215
+ history.decodeHistoryEntry(bufferHistoryEntry);
216
+ log.info((logMessage = history.historyEntryToString(bufferHistoryEntry)));
217
+ fs.appendFileSync(name + '.log', logMessage + '\n');
218
+ mattercontrollerNodeContext.set('nextEntry', bufferHistoryEntry.readUInt32LE(1) + 1);
219
+ }
220
+ historyEntries = await eveHistory.getHistoryEntriesAttribute();
221
+ bufferHistoryEntries = Buffer.from(historyEntries);
222
+ //console.log(history.historyEntriesToString(bufferHistoryEntries));
223
+ }
224
+ history.writeHistoryFile();
225
+ //history.logHistory(true);
226
+
227
+ eveHistory.subscribeHistoryStatusAttribute(
228
+ (value: Uint8Array) => { log.warn('Received EveHistoryStatus:', value.toHex()) }, 0, 30)
229
+ .then(() => { log.warn('Subscription successful to EveHistoryStatus.') })
230
+ .catch((error) => { log.error('Error during subscription to EveHistoryStatus:', error) });
231
+
232
+ eveHistory.subscribeHistoryEntriesAttribute(
233
+ (value: Uint8Array) => { log.warn('Received EveHistoryEntries:', value.toHex()) }, 0, 30)
234
+ .then(() => { log.warn('Subscription successful to EveHistoryEntries.') })
235
+ .catch((error) => { log.error('Error during subscription to EveHistoryEntries:', error) });
236
+
237
+ setInterval(async () => {
238
+ try {
239
+ const attributesEveCluster = await interactionClient.getMultipleAttributes({
240
+ attributes: [{ clusterId: EveHistoryCluster.id }],
241
+ });
242
+ log.info('\x1b[97;45mEve device: ' + name + '\x1b[40;0m');
243
+
244
+ attributesEveCluster.forEach((attribute) => {
245
+ if (attribute.path.attributeId === EveHistoryCluster.attributes.ConfigDataGet.id) {
246
+ const data = Buffer.from(attribute.value);
247
+ logMessage = `ConfigDataGet(${data.length}): [${data.toHex()}]`;
248
+ log.info(logMessage);
249
+ log.info('*' + history.decodeConfigData(data));
250
+ fs.appendFileSync(name + '.config.log', logMessage + '\n');
251
+ } else if (attribute.path.attributeId === EveHistoryCluster.attributes.HistoryStatus.id) {
252
+ logMessage = history.decodeHistoryStatus(Buffer.from(attribute.value));
253
+ log.info(logMessage);
254
+ fs.appendFileSync(name + '.log', logMessage + '\n');
255
+ } else if (attribute.path.attributeId === EveHistoryCluster.attributes.HistoryEntries.id) {
256
+ const bufferHistoryEntries = Buffer.from(attribute.value);
257
+ for (let i = 0; i < bufferHistoryEntries.length; ) {
258
+ const bufferHistoryEntry = Buffer.copyBytesFrom(bufferHistoryEntries, i, bufferHistoryEntries.readUInt8(i));
259
+ i += bufferHistoryEntries.readUInt8(i);
260
+ history.decodeHistoryEntry(bufferHistoryEntry);
261
+ log.info((logMessage = history.historyEntryToString(bufferHistoryEntry)));
262
+ fs.appendFileSync(name + '.log', logMessage + '\n');
263
+ }
264
+ history.writeHistoryFile();
265
+ } else if (attribute.path.attributeId === EveHistoryCluster.attributes.TimesOpened.id) {
266
+ log.info(`TimesOpened: ${attribute.value}`);
267
+ } else if (attribute.path.attributeId === EveHistoryCluster.attributes.LastEvent.id) {
268
+ log.info(`LastEvent: ${attribute.value}=${history.secsToDateString(attribute.value + history.getInitialTime() - history.getTimeOffset())}`);
269
+ } else if (attribute.path.attributeId === EveHistoryCluster.attributes.ResetTotal.id) {
270
+ log.info(`ResetTotal: ${attribute.value}=${history.secsToDateStringSinceEveEpoch(attribute.value)}`);
271
+ } else if (attribute.path.attributeId === EveHistoryCluster.attributes.Voltage.id) {
272
+ log.info(`Voltage: ${attribute.value}`);
273
+ } else if (attribute.path.attributeId === EveHistoryCluster.attributes.Current.id) {
274
+ log.info(`Current: ${attribute.value}`);
275
+ } else if (attribute.path.attributeId === EveHistoryCluster.attributes.Consumption.id) {
276
+ log.info(`Consumption: ${attribute.value}`);
277
+ } else if (attribute.path.attributeId === EveHistoryCluster.attributes.TotalConsumption.id) {
278
+ log.info(`TotalConsumption: ${attribute.value}`);
279
+ } else if (attribute.path.attributeId === EveHistoryCluster.attributes.ChildLock.id) {
280
+ log.info(`ChildLock: ${attribute.value}`);
281
+ } else if (attribute.path.attributeId === EveHistoryCluster.attributes.MotionSensitivity.id) {
282
+ log.info(`MotionSensitivity: ${attribute.value}`);
283
+ } else if (attribute.path.attributeId === EveHistoryCluster.attributes.RLoc.id) {
284
+ log.info((logMessage = `RLoc: 0x${attribute.value.toString(16)}`));
285
+ } else {
286
+ if (attribute.path.attributeId >= 0x130a0000) {
287
+ log.info(`Unknown attribute ${attribute.path.attributeName} type: ${typeof attribute.value} value: [${attribute.value.toString(16)}]${attribute.value}`);
288
+ }
289
+ }
290
+ });
291
+ } catch (error) {
292
+ console.error(error);
293
+ }
294
+ }, 30000);
295
+ } else {
296
+ log.info(`EveHistory not found on ${device.id} name: ${device.name}`);
297
+ }
298
+ }); // devices.forEach(async device => {
299
+ }); // nodes.forEach(async nodeId => {
300
+
301
+ if (hasParameter('unpairall')) {
302
+ nodes.forEach(async (nodeId) => {
303
+ await commissioningController.removeNode(nodeId);
304
+ });
305
+ process.exit(0);
306
+ }
307
+ }
308
+ */
309
+ //# sourceMappingURL=matterbridgeController.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matterbridgeController.js","sourceRoot":"","sources":["../src/matterbridgeController.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiTE"}
@@ -1,5 +1,30 @@
1
+ /**
2
+ * This file contains the class MatterbridgeDevice.
3
+ *
4
+ * @file matterbridgeDevice.ts
5
+ * @author Luca Liguori
6
+ * @date 2023-12-29
7
+ * @version 1.0.15
8
+ *
9
+ * Copyright 2023, 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
+ */
1
23
  import { ClusterServerHandlers, ColorControl, Identify, LevelControl, OnOff, PowerSource, WindowCovering } from '@project-chip/matter-node.js/cluster';
2
24
  import { Device, DeviceTypeDefinition, EndpointOptions } from '@project-chip/matter-node.js/device';
25
+ import { MatterHistory } from 'matter-history';
26
+ import { AirQuality } from './AirQualityCluster.js';
27
+ import { AnsiLogger } from 'node-ansi-logger';
3
28
  type MakeMandatory<T> = Exclude<T, undefined>;
4
29
  type MatterbridgeDeviceCommands = {
5
30
  identify: MakeMandatory<ClusterServerHandlers<typeof Identify.Cluster>['identify']>;
@@ -33,25 +58,205 @@ declare const MatterbridgeDevice_base: new (definition: DeviceTypeDefinition, op
33
58
  };
34
59
  export declare class MatterbridgeDevice extends MatterbridgeDevice_base {
35
60
  constructor(definition: DeviceTypeDefinition, options?: EndpointOptions);
61
+ addDeviceType(deviceType: DeviceTypeDefinition): void;
62
+ /**
63
+ * Creates a room Eve History Cluster Server.
64
+ *
65
+ * @param history - The MatterHistory object.
66
+ * @param log - The AnsiLogger object.
67
+ */
68
+ createRoomEveHistoryClusterServer(history: MatterHistory, log: AnsiLogger): void;
69
+ /**
70
+ * Creates a Weather Eve History Cluster Server.
71
+ *
72
+ * @param history - The MatterHistory instance.
73
+ * @param log - The AnsiLogger instance.
74
+ */
75
+ createWeatherEveHistoryClusterServer(history: MatterHistory, log: AnsiLogger): void;
76
+ /**
77
+ * Creates an Energy Eve History Cluster Server.
78
+ *
79
+ * @param history - The MatterHistory object.
80
+ * @param log - The AnsiLogger object.
81
+ */
82
+ createEnergyEveHistoryClusterServer(history: MatterHistory, log: AnsiLogger): void;
83
+ /**
84
+ * Creates a Motion Eve History Cluster Server.
85
+ *
86
+ * @param history - The MatterHistory object.
87
+ * @param log - The AnsiLogger object.
88
+ */
89
+ createMotionEveHistoryClusterServer(history: MatterHistory, log: AnsiLogger): void;
90
+ /**
91
+ * Creates a door EveHistoryCluster server.
92
+ *
93
+ * @param history - The MatterHistory instance.
94
+ * @param log - The AnsiLogger instance.
95
+ */
96
+ createDoorEveHistoryClusterServer(history: MatterHistory, log: AnsiLogger): void;
97
+ /**
98
+ * Creates a default IdentifyCluster server.
99
+ */
36
100
  createDefaultIdentifyClusterServer(): void;
101
+ /**
102
+ * Creates a default groups cluster server and adds it to the device.
103
+ */
37
104
  createDefaultGroupsClusterServer(): void;
105
+ /**
106
+ * Creates a default scenes cluster server and adds it to the current instance.
107
+ */
38
108
  createDefaultScenesClusterServer(): void;
39
- createDefaultBridgedDeviceBasicInformationClusterServer(deviceName: string, uniqueId: string, vendorId?: number, vendorName?: string, productName?: string): void;
40
- createDefaultBasicInformationClusterServer(deviceName: string, uniqueId: string, vendorId: number, vendorName: string, productId: number, productName: string): void;
109
+ /**
110
+ * Creates a unique identifier based on the provided parameters.
111
+ * @param param1 - The first parameter.
112
+ * @param param2 - The second parameter.
113
+ * @param param3 - The third parameter.
114
+ * @param param4 - The fourth parameter.
115
+ * @returns A unique identifier generated using the MD5 hash algorithm.
116
+ */
117
+ private createUniqueId;
118
+ /**
119
+ * Creates a default Basic Information Cluster Server.
120
+ *
121
+ * @param deviceName - The name of the device.
122
+ * @param serialNumber - The serial number of the device.
123
+ * @param vendorId - The vendor ID of the device.
124
+ * @param vendorName - The vendor name of the device.
125
+ * @param productId - The product ID of the device.
126
+ * @param productName - The product name of the device.
127
+ * @param softwareVersion - The software version of the device. Default is 1.
128
+ * @param softwareVersionString - The software version string of the device. Default is 'v.1.0.0'.
129
+ * @param hardwareVersion - The hardware version of the device. Default is 1.
130
+ * @param hardwareVersionString - The hardware version string of the device. Default is 'v.1.0.0'.
131
+ */
132
+ createDefaultBasicInformationClusterServer(deviceName: string, serialNumber: string, vendorId: number, vendorName: string, productId: number, productName: string, softwareVersion?: number, softwareVersionString?: string, hardwareVersion?: number, hardwareVersionString?: string): void;
133
+ /**
134
+ * Creates a default BridgedDeviceBasicInformationClusterServer.
135
+ *
136
+ * @param deviceName - The name of the device.
137
+ * @param serialNumber - The serial number of the device.
138
+ * @param vendorId - The vendor ID of the device.
139
+ * @param vendorName - The name of the vendor.
140
+ * @param productName - The name of the product.
141
+ * @param softwareVersion - The software version of the device. Default is 1.
142
+ * @param softwareVersionString - The software version string of the device. Default is 'v.1.0.0'.
143
+ * @param hardwareVersion - The hardware version of the device. Default is 1.
144
+ * @param hardwareVersionString - The hardware version string of the device. Default is 'v.1.0.0'.
145
+ */
146
+ createDefaultBridgedDeviceBasicInformationClusterServer(deviceName: string, serialNumber: string, vendorId: number, vendorName: string, productName: string, softwareVersion?: number, softwareVersionString?: string, hardwareVersion?: number, hardwareVersionString?: string): void;
147
+ /**
148
+ * Creates a default Electrical Measurement Cluster Server.
149
+ *
150
+ * @param voltage - The RMS voltage value.
151
+ * @param current - The RMS current value.
152
+ * @param power - The active power value.
153
+ * @param consumption - The total active power consumption value.
154
+ */
155
+ createDefaultElectricalMeasurementClusterServer(voltage?: number, current?: number, power?: number, consumption?: number): void;
156
+ /**
157
+ * Creates a default Thread Network Diagnostics Cluster server.
158
+ *
159
+ * @remarks
160
+ * This method adds a cluster server used only to give the networkName to Eve app.
161
+ *
162
+ * @returns void
163
+ */
41
164
  createDefaultThreadNetworkDiagnosticsClusterServer(): void;
165
+ /**
166
+ * Creates a default OnOff cluster server.
167
+ *
168
+ * @param onOff - The initial state of the OnOff cluster (default: false).
169
+ */
42
170
  createDefaultOnOffClusterServer(onOff?: boolean): void;
171
+ /**
172
+ * Creates a default window covering cluster server.
173
+ *
174
+ * @param positionPercent100ths - The position percentage in 100ths (0-10000). Defaults to 0.
175
+ */
43
176
  createDefaultWindowCoveringClusterServer(positionPercent100ths?: number): void;
177
+ /**
178
+ * Creates a default occupancy sensing cluster server.
179
+ *
180
+ * @param occupied - A boolean indicating whether the occupancy is occupied or not. Default is false.
181
+ */
44
182
  createDefaultOccupancySensingClusterServer(occupied?: boolean): void;
183
+ /**
184
+ * Creates a default Illuminance Measurement Cluster Server.
185
+ *
186
+ * @param measuredValue - The measured value of illuminance.
187
+ */
45
188
  createDefaultIlluminanceMeasurementClusterServer(measuredValue?: number): void;
189
+ /**
190
+ * Creates a default temperature measurement cluster server.
191
+ *
192
+ * @param measuredValue - The measured value of the temperature.
193
+ */
46
194
  createDefaultTemperatureMeasurementClusterServer(measuredValue?: number): void;
195
+ /**
196
+ * Creates a default RelativeHumidityMeasurementCluster server.
197
+ *
198
+ * @param measuredValue - The measured value of the relative humidity.
199
+ */
47
200
  createDefaultRelativeHumidityMeasurementClusterServer(measuredValue?: number): void;
201
+ /**
202
+ * Creates a default Pressure Measurement Cluster Server.
203
+ *
204
+ * @param measuredValue - The measured value for the pressure.
205
+ */
48
206
  createDefaultPressureMeasurementClusterServer(measuredValue?: number): void;
207
+ /**
208
+ * Creates a default boolean state cluster server.
209
+ *
210
+ * @param contact - Optional boolean value indicating the contact state. Defaults to `true` if not provided.
211
+ */
49
212
  createDefaultBooleanStateClusterServer(contact?: boolean): void;
50
- createDefaultPowerSourceReplaceableBatteryClusterServer(batPercentRemaining?: number, batChargeLevel?: PowerSource.BatChargeLevel, batVoltage?: number): void;
213
+ /**
214
+ * Creates a default power source replaceable battery cluster server.
215
+ *
216
+ * @param batPercentRemaining - The remaining battery percentage (default: 100).
217
+ * @param batChargeLevel - The battery charge level (default: PowerSource.BatChargeLevel.Ok).
218
+ * @param batVoltage - The battery voltage (default: 1500).
219
+ * @param batReplacementDescription - The battery replacement description (default: 'Battery type').
220
+ * @param batQuantity - The battery quantity (default: 1).
221
+ */
222
+ createDefaultPowerSourceReplaceableBatteryClusterServer(batPercentRemaining?: number, batChargeLevel?: PowerSource.BatChargeLevel, batVoltage?: number, batReplacementDescription?: string, batQuantity?: number): void;
223
+ /**
224
+ * Creates a default power source rechargeable battery cluster server.
225
+ *
226
+ * @param batPercentRemaining - The remaining battery percentage (default: 100).
227
+ * @param batChargeLevel - The battery charge level (default: PowerSource.BatChargeLevel.Ok).
228
+ * @param batVoltage - The battery voltage (default: 1500).
229
+ */
51
230
  createDefaultPowerSourceRechargableBatteryClusterServer(batPercentRemaining?: number, batChargeLevel?: PowerSource.BatChargeLevel, batVoltage?: number): void;
231
+ /**
232
+ * Creates a default power source wired cluster server.
233
+ *
234
+ * @param wiredCurrentType - The type of wired current (default: PowerSource.WiredCurrentType.Ac)
235
+ */
52
236
  createDefaultPowerSourceWiredClusterServer(wiredCurrentType?: PowerSource.WiredCurrentType): void;
237
+ /**
238
+ * Creates a default power source configuration cluster server.
239
+ *
240
+ * @remarks
241
+ * The endpoint at this time is only known for Accessory Platforms.
242
+ * Don't use it in Dynamic Platforms.
243
+ *
244
+ *
245
+ * @param endpointNumber - The endpoint number where to find the PowerSourceCluster.
246
+ */
53
247
  createDefaultPowerSourceConfigurationClusterServer(endpointNumber: number): void;
54
- createDefaultAirQualityClusterServer(): void;
248
+ /**
249
+ * Creates a default air quality cluster server.
250
+ *
251
+ * @param airQuality The air quality type. Defaults to `AirQuality.AirQualityType.Unknown`.
252
+ */
253
+ createDefaultAirQualityClusterServer(airQuality?: AirQuality.AirQualityType): void;
254
+ /**
255
+ * Creates a default TVOC measurement cluster server.
256
+ *
257
+ * @param measuredValue - The measured value for TVOC.
258
+ */
259
+ createDefaultTvocMeasurementClusterServer(measuredValue?: number): void;
55
260
  }
56
261
  export {};
57
262
  //# sourceMappingURL=matterbridgeDevice.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"matterbridgeDevice.d.ts","sourceRoot":"","sources":["../src/matterbridgeDevice.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,qBAAqB,EACrB,YAAY,EAEZ,QAAQ,EAGR,YAAY,EAGZ,KAAK,EAEL,WAAW,EAWX,cAAc,EAIf,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAiB,oBAAoB,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAInH,KAAK,aAAa,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;AAE9C,KAAK,0BAA0B,GAAG;IAChC,QAAQ,EAAE,aAAa,CAAC,qBAAqB,CAAC,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;IAEpF,EAAE,EAAE,aAAa,CAAC,qBAAqB,CAAC,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IACtE,GAAG,EAAE,aAAa,CAAC,qBAAqB,CAAC,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IACxE,MAAM,EAAE,aAAa,CAAC,qBAAqB,CAAC,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC9E,aAAa,EAAE,aAAa,CAAC,qBAAqB,CAAC,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,eAAe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