matterbridge 1.7.2 → 2.0.0-edge1
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.
- package/CHANGELOG.md +35 -1
- package/dist/cli.js +3 -13
- package/dist/cli.js.map +1 -1
- package/dist/deviceManager.d.ts +7 -7
- package/dist/deviceManager.d.ts.map +1 -1
- package/dist/deviceManager.js +2 -2
- package/dist/deviceManager.js.map +1 -1
- package/dist/frontend.d.ts +98 -0
- package/dist/frontend.d.ts.map +1 -0
- package/dist/frontend.js +1377 -0
- package/dist/frontend.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -6
- package/dist/index.js.map +1 -1
- package/dist/matter/export.d.ts.map +1 -1
- package/dist/matter/export.js +0 -1
- package/dist/matter/export.js.map +1 -1
- package/dist/matterbridge.d.ts +82 -208
- package/dist/matterbridge.d.ts.map +1 -1
- package/dist/matterbridge.js +777 -2310
- package/dist/matterbridge.js.map +1 -1
- package/dist/matterbridgeBehaviors.d.ts +32 -851
- package/dist/matterbridgeBehaviors.d.ts.map +1 -1
- package/dist/matterbridgeBehaviors.js +22 -2
- package/dist/matterbridgeBehaviors.js.map +1 -1
- package/dist/matterbridgeEndpoint.d.ts +100 -9089
- package/dist/matterbridgeEndpoint.d.ts.map +1 -1
- package/dist/matterbridgeEndpoint.js +59 -31
- package/dist/matterbridgeEndpoint.js.map +1 -1
- package/dist/matterbridgePlatform.d.ts +14 -28
- package/dist/matterbridgePlatform.d.ts.map +1 -1
- package/dist/matterbridgePlatform.js +7 -23
- package/dist/matterbridgePlatform.js.map +1 -1
- package/dist/matterbridgeTypes.d.ts.map +1 -1
- package/dist/matterbridgeTypes.js +4 -0
- package/dist/matterbridgeTypes.js.map +1 -1
- package/dist/pluginManager.d.ts +1 -1
- package/dist/pluginManager.d.ts.map +1 -1
- package/dist/pluginManager.js +5 -11
- package/dist/pluginManager.js.map +1 -1
- package/dist/utils/utils.d.ts +1 -1
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +6 -6
- package/dist/utils/utils.js.map +1 -1
- package/frontend/build/asset-manifest.json +3 -3
- package/frontend/build/index.html +1 -1
- package/frontend/build/static/js/{main.08241820.js → main.ea28015b.js} +3 -3
- package/frontend/build/static/js/main.ea28015b.js.map +1 -0
- package/npm-shrinkwrap.json +9 -9
- package/package.json +2 -3
- package/dist/cli.d.ts +0 -25
- package/dist/cluster/export.d.ts +0 -2
- package/dist/defaultConfigSchema.d.ts +0 -27
- package/dist/index.d.ts +0 -40
- package/dist/logger/export.d.ts +0 -2
- package/dist/matter/export.d.ts +0 -11
- package/dist/matterbridgeAccessoryPlatform.d.ts +0 -39
- package/dist/matterbridgeDevice.d.ts +0 -7077
- package/dist/matterbridgeDevice.d.ts.map +0 -1
- package/dist/matterbridgeDevice.js +0 -2736
- package/dist/matterbridgeDevice.js.map +0 -1
- package/dist/matterbridgeDynamicPlatform.d.ts +0 -39
- package/dist/matterbridgeEdge.d.ts +0 -91
- package/dist/matterbridgeEdge.d.ts.map +0 -1
- package/dist/matterbridgeEdge.js +0 -1077
- package/dist/matterbridgeEdge.js.map +0 -1
- package/dist/matterbridgeTypes.d.ts +0 -172
- package/dist/matterbridgeWebsocket.d.ts +0 -49
- package/dist/matterbridgeWebsocket.d.ts.map +0 -1
- package/dist/matterbridgeWebsocket.js +0 -325
- package/dist/matterbridgeWebsocket.js.map +0 -1
- package/dist/storage/export.d.ts +0 -2
- package/dist/utils/colorUtils.d.ts +0 -61
- package/dist/utils/export.d.ts +0 -3
- package/frontend/build/static/js/main.08241820.js.map +0 -1
- /package/frontend/build/static/js/{main.08241820.js.LICENSE.txt → main.ea28015b.js.LICENSE.txt} +0 -0
package/dist/matterbridge.d.ts
CHANGED
|
@@ -21,18 +21,15 @@
|
|
|
21
21
|
* limitations under the License. *
|
|
22
22
|
*/
|
|
23
23
|
import EventEmitter from 'events';
|
|
24
|
-
import WebSocket from 'ws';
|
|
25
24
|
import { NodeStorageManager, NodeStorage } from 'node-persist-manager';
|
|
26
25
|
import { AnsiLogger } from 'node-ansi-logger';
|
|
27
|
-
import {
|
|
28
|
-
import { BaseRegisteredPlugin, MatterbridgeInformation, RegisteredPlugin, SanitizedExposedFabricInformation, SanitizedSessionInformation, SessionInformation, SystemInformation } from './matterbridgeTypes.js';
|
|
26
|
+
import { MatterbridgeInformation, RegisteredPlugin, SanitizedExposedFabricInformation, SanitizedSessionInformation, SystemInformation } from './matterbridgeTypes.js';
|
|
29
27
|
import { PluginManager } from './pluginManager.js';
|
|
30
28
|
import { DeviceManager } from './deviceManager.js';
|
|
31
29
|
import { MatterbridgeEndpoint } from './matterbridgeEndpoint.js';
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import { Aggregator } from '@project-chip/matter.js/device';
|
|
30
|
+
import { Endpoint as EndpointNode, VendorId, StorageContext, StorageManager, StorageService, Environment, ServerNode } from '@matter/main';
|
|
31
|
+
import { AggregatorEndpoint } from '@matter/main/endpoints';
|
|
32
|
+
import { Frontend } from './frontend.js';
|
|
36
33
|
/**
|
|
37
34
|
* Represents the Matterbridge application.
|
|
38
35
|
*/
|
|
@@ -57,14 +54,14 @@ export declare class Matterbridge extends EventEmitter {
|
|
|
57
54
|
profile: string | undefined;
|
|
58
55
|
edge: boolean;
|
|
59
56
|
log: AnsiLogger;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
57
|
+
matterbrideLoggerFile: string;
|
|
58
|
+
matterLoggerFile: string;
|
|
59
|
+
plugins: PluginManager;
|
|
60
|
+
devices: DeviceManager;
|
|
61
|
+
frontend: Frontend;
|
|
62
|
+
nodeStorage: NodeStorageManager | undefined;
|
|
63
|
+
nodeContext: NodeStorage | undefined;
|
|
64
|
+
nodeStorageName: string;
|
|
68
65
|
private hasCleanupStarted;
|
|
69
66
|
private initialized;
|
|
70
67
|
private execRunningCount;
|
|
@@ -76,38 +73,34 @@ export declare class Matterbridge extends EventEmitter {
|
|
|
76
73
|
private sigtermHandler;
|
|
77
74
|
private exceptionHandler;
|
|
78
75
|
private rejectionHandler;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
76
|
+
environment: Environment;
|
|
77
|
+
matterStorageName: string;
|
|
78
|
+
matterStorageService: StorageService | undefined;
|
|
79
|
+
matterStorageManager: StorageManager | undefined;
|
|
80
|
+
matterbridgeContext: StorageContext | undefined;
|
|
81
|
+
mattercontrollerContext: StorageContext | undefined;
|
|
83
82
|
protected mdnsInterface: string | undefined;
|
|
84
83
|
protected ipv4address: string | undefined;
|
|
85
84
|
protected ipv6address: string | undefined;
|
|
86
|
-
protected port: number;
|
|
87
|
-
protected passcode
|
|
88
|
-
protected discriminator
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
protected matterAggregator: Aggregator | undefined;
|
|
94
|
-
protected commissioningServer: CommissioningServer | undefined;
|
|
95
|
-
protected commissioningController: CommissioningController | undefined;
|
|
96
|
-
protected aggregatorVendorId: VendorId;
|
|
97
|
-
protected aggregatorProductId: number;
|
|
85
|
+
protected port: number | undefined;
|
|
86
|
+
protected passcode: number | undefined;
|
|
87
|
+
protected discriminator: number | undefined;
|
|
88
|
+
serverNode: ServerNode<ServerNode.RootEndpoint> | undefined;
|
|
89
|
+
aggregatorNode: EndpointNode<AggregatorEndpoint> | undefined;
|
|
90
|
+
aggregatorVendorId: VendorId;
|
|
91
|
+
aggregatorProductId: number;
|
|
98
92
|
protected static instance: Matterbridge | undefined;
|
|
99
93
|
protected constructor();
|
|
100
94
|
/**
|
|
101
95
|
* Retrieves the list of Matterbridge devices.
|
|
102
|
-
* @returns {
|
|
96
|
+
* @returns {MatterbridgeEndpoint[]} An array of MatterbridgeDevice objects.
|
|
103
97
|
*/
|
|
104
|
-
getDevices():
|
|
98
|
+
getDevices(): MatterbridgeEndpoint[];
|
|
105
99
|
/**
|
|
106
100
|
* Retrieves the list of registered plugins.
|
|
107
101
|
* @returns {RegisteredPlugin[]} An array of RegisteredPlugin objects.
|
|
108
102
|
*/
|
|
109
103
|
getPlugins(): RegisteredPlugin[];
|
|
110
|
-
matterbridgeMessageHandler: (client: WebSocket, message: WebSocket.RawData) => Promise<void>;
|
|
111
104
|
/** ***********************************************************************************************************************************/
|
|
112
105
|
/** loadInstance() and cleanup() methods */
|
|
113
106
|
/** ***********************************************************************************************************************************/
|
|
@@ -118,13 +111,13 @@ export declare class Matterbridge extends EventEmitter {
|
|
|
118
111
|
* @param initialize - Whether to initialize the Matterbridge instance after loading.
|
|
119
112
|
* @returns The loaded Matterbridge instance.
|
|
120
113
|
*/
|
|
121
|
-
static loadInstance(initialize?: boolean):
|
|
114
|
+
static loadInstance(initialize?: boolean): unknown;
|
|
122
115
|
/**
|
|
123
116
|
* Call cleanup().
|
|
124
117
|
* @deprecated This method is deprecated and is only used for jest tests.
|
|
125
118
|
*
|
|
126
119
|
*/
|
|
127
|
-
destroyInstance():
|
|
120
|
+
destroyInstance(): any;
|
|
128
121
|
/**
|
|
129
122
|
* Initializes the Matterbridge application.
|
|
130
123
|
*
|
|
@@ -135,7 +128,7 @@ export declare class Matterbridge extends EventEmitter {
|
|
|
135
128
|
*
|
|
136
129
|
* @returns A Promise that resolves when the initialization is complete.
|
|
137
130
|
*/
|
|
138
|
-
initialize():
|
|
131
|
+
initialize(): any;
|
|
139
132
|
/**
|
|
140
133
|
* Parses the command line arguments and performs the corresponding actions.
|
|
141
134
|
* @private
|
|
@@ -146,7 +139,7 @@ export declare class Matterbridge extends EventEmitter {
|
|
|
146
139
|
* Asynchronously loads and starts the registered plugins.
|
|
147
140
|
*
|
|
148
141
|
* This method is responsible for initializing and staarting all enabled plugins.
|
|
149
|
-
* It ensures that each plugin is properly loaded and started before the
|
|
142
|
+
* It ensures that each plugin is properly loaded and started before the bridge starts.
|
|
150
143
|
*
|
|
151
144
|
* @returns {Promise<void>} A promise that resolves when all plugins have been loaded and started.
|
|
152
145
|
*/
|
|
@@ -205,74 +198,67 @@ export declare class Matterbridge extends EventEmitter {
|
|
|
205
198
|
* @param {boolean} [unlink=false] - Whether to unlink the log file before creating a new one.
|
|
206
199
|
* @returns {Function} - A function that logs formatted messages to the log file.
|
|
207
200
|
*/
|
|
208
|
-
|
|
201
|
+
createMatterFileLogger(filePath: string, unlink?: boolean): unknown;
|
|
209
202
|
/**
|
|
210
|
-
*
|
|
203
|
+
* Restarts the process by exiting the current instance and loading a new instance.
|
|
211
204
|
*/
|
|
212
|
-
|
|
205
|
+
restartProcess(): any;
|
|
213
206
|
/**
|
|
214
|
-
*
|
|
207
|
+
* Shut down the process by exiting the current process.
|
|
215
208
|
*/
|
|
216
|
-
|
|
209
|
+
shutdownProcess(): any;
|
|
217
210
|
/**
|
|
218
|
-
*
|
|
211
|
+
* Update matterbridge and and shut down the process.
|
|
219
212
|
*/
|
|
220
|
-
|
|
213
|
+
updateProcess(): any;
|
|
221
214
|
/**
|
|
222
|
-
*
|
|
215
|
+
* Unregister all devices and shut down the process.
|
|
223
216
|
*/
|
|
224
|
-
|
|
217
|
+
unregisterAndShutdownProcess(): any;
|
|
225
218
|
/**
|
|
226
|
-
*
|
|
219
|
+
* Reset commissioning and shut down the process.
|
|
227
220
|
*/
|
|
228
|
-
|
|
221
|
+
shutdownProcessAndReset(): any;
|
|
229
222
|
/**
|
|
230
|
-
*
|
|
223
|
+
* Factory reset and shut down the process.
|
|
231
224
|
*/
|
|
232
|
-
|
|
225
|
+
shutdownProcessAndFactoryReset(): any;
|
|
233
226
|
/**
|
|
234
227
|
* Cleans up the Matterbridge instance.
|
|
235
228
|
* @param message - The cleanup message.
|
|
236
229
|
* @param restart - Indicates whether to restart the instance after cleanup. Default is `false`.
|
|
237
230
|
* @returns A promise that resolves when the cleanup is completed.
|
|
238
231
|
*/
|
|
239
|
-
protected cleanup(message: string, restart?: boolean):
|
|
240
|
-
addBridgedEndpoint(pluginName: string, device: MatterbridgeEndpoint): Promise<void>;
|
|
241
|
-
removeBridgedEndpoint(pluginName: string, device: MatterbridgeEndpoint): Promise<void>;
|
|
242
|
-
removeAllBridgedEndpoints(pluginName: string): Promise<void>;
|
|
243
|
-
/**
|
|
244
|
-
* Adds a bridged device to the Matterbridge.
|
|
245
|
-
* @param pluginName - The name of the plugin.
|
|
246
|
-
* @param device - The bridged device to add.
|
|
247
|
-
* @returns {Promise<void>} - A promise that resolves when the device is added.
|
|
248
|
-
*/
|
|
249
|
-
addBridgedDevice(pluginName: string, device: MatterbridgeDevice): Promise<void>;
|
|
232
|
+
protected cleanup(message: string, restart?: boolean): any;
|
|
250
233
|
/**
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
* @param
|
|
254
|
-
* @
|
|
234
|
+
* Creates and configures the server node for an accessory plugin for a given device.
|
|
235
|
+
*
|
|
236
|
+
* @param {RegisteredPlugin} plugin - The plugin to configure.
|
|
237
|
+
* @param {MatterbridgeEndpoint} device - The device to associate with the plugin.
|
|
238
|
+
* @param {boolean} [start=false] - Whether to start the server node after adding the device.
|
|
239
|
+
* @returns {Promise<void>} A promise that resolves when the server node for the accessory plugin is created and configured.
|
|
255
240
|
*/
|
|
256
|
-
|
|
241
|
+
private createAccessoryPlugin;
|
|
257
242
|
/**
|
|
258
|
-
*
|
|
243
|
+
* Creates and configures the server node for a dynamic plugin.
|
|
259
244
|
*
|
|
260
|
-
* @param
|
|
261
|
-
* @
|
|
245
|
+
* @param {RegisteredPlugin} plugin - The plugin to configure.
|
|
246
|
+
* @param {boolean} [start=false] - Whether to start the server node after adding the aggregator node.
|
|
247
|
+
* @returns {Promise<void>} A promise that resolves when the server node for the dynamic plugin is created and configured.
|
|
262
248
|
*/
|
|
263
|
-
|
|
249
|
+
private createDynamicPlugin;
|
|
264
250
|
/**
|
|
265
251
|
* Starts the Matterbridge in bridge mode.
|
|
266
252
|
* @private
|
|
267
253
|
* @returns {Promise<void>} A promise that resolves when the Matterbridge is started.
|
|
268
254
|
*/
|
|
269
|
-
|
|
255
|
+
private startBridge;
|
|
270
256
|
/**
|
|
271
257
|
* Starts the Matterbridge in childbridge mode.
|
|
272
258
|
* @private
|
|
273
259
|
* @returns {Promise<void>} A promise that resolves when the Matterbridge is started.
|
|
274
260
|
*/
|
|
275
|
-
|
|
261
|
+
private startChildbridge;
|
|
276
262
|
/**
|
|
277
263
|
* Starts the Matterbridge controller.
|
|
278
264
|
* @private
|
|
@@ -284,72 +270,27 @@ export declare class Matterbridge extends EventEmitter {
|
|
|
284
270
|
/** ***********************************************************************************************************************************/
|
|
285
271
|
/**
|
|
286
272
|
* Starts the matter storage process based on the specified storage type and name.
|
|
287
|
-
* @param {string} storageType - The type of storage to start (e.g., 'disk', 'json').
|
|
288
|
-
* @param {string} storageName - The name of the storage file.
|
|
289
|
-
* @returns {Promise<void>} - A promise that resolves when the storage process is started.
|
|
290
|
-
*/
|
|
291
|
-
protected startMatterStorage(storageType: string, storageName: string): Promise<void>;
|
|
292
|
-
/**
|
|
293
|
-
* Convert the old API matter storage to the new API format.
|
|
294
|
-
* @param {StorageContext} context - The context of Matterbridge or of the plugin.
|
|
295
|
-
* @param {string} pluginName - The name of the plugin or Matterbridge.
|
|
296
273
|
* @returns {Promise<void>} - A promise that resolves when the storage process is started.
|
|
297
274
|
*/
|
|
298
|
-
|
|
275
|
+
protected startMatterStorage(): Promise<void>;
|
|
299
276
|
/**
|
|
300
|
-
* Makes a backup copy of the specified matter
|
|
277
|
+
* Makes a backup copy of the specified matter storage directory.
|
|
301
278
|
*
|
|
302
|
-
* @param storageName - The name of the
|
|
279
|
+
* @param storageName - The name of the storage file to be backed up.
|
|
303
280
|
* @param backupName - The name of the backup file to be created.
|
|
304
281
|
*/
|
|
305
282
|
protected backupMatterStorage(storageName: string, backupName: string): Promise<void>;
|
|
306
|
-
/**
|
|
307
|
-
* Restore the specified matter JSON storage file.
|
|
308
|
-
*
|
|
309
|
-
* @param backupName - The name of the backup file to restore from.
|
|
310
|
-
* @param storageName - The name of the JSON storage file to restored.
|
|
311
|
-
*/
|
|
312
|
-
protected restoreMatterStorage(backupName: string, storageName: string): Promise<void>;
|
|
313
283
|
/**
|
|
314
284
|
* Stops the matter storage.
|
|
315
285
|
* @returns {Promise<void>} A promise that resolves when the storage is stopped.
|
|
316
286
|
*/
|
|
317
287
|
protected stopMatterStorage(): Promise<void>;
|
|
318
288
|
/**
|
|
319
|
-
* Creates a
|
|
320
|
-
* @param storageManager The storage manager to be used by the Matter server.
|
|
321
|
-
*
|
|
322
|
-
*/
|
|
323
|
-
protected createMatterServer(storageManager: StorageManager): Promise<MatterServer>;
|
|
324
|
-
/**
|
|
325
|
-
* Starts the Matter server.
|
|
326
|
-
* If the Matter server is not initialized, it logs an error and performs cleanup.
|
|
327
|
-
*/
|
|
328
|
-
protected startMatterServer(): Promise<void>;
|
|
329
|
-
/**
|
|
330
|
-
* Stops the Matter server, commissioningServer and commissioningController.
|
|
331
|
-
*/
|
|
332
|
-
protected stopMatterServer(): Promise<void>;
|
|
333
|
-
/**
|
|
334
|
-
* Creates a Matter Aggregator.
|
|
335
|
-
* @param {StorageContext} context - The storage context.
|
|
336
|
-
* @returns {Aggregator} - The created Matter Aggregator.
|
|
337
|
-
*/
|
|
338
|
-
protected createMatterAggregator(context: StorageContext, pluginName: string): Promise<Aggregator>;
|
|
339
|
-
/**
|
|
340
|
-
* Creates a matter commissioning server.
|
|
341
|
-
*
|
|
342
|
-
* @param {StorageContext} context - The storage context.
|
|
343
|
-
* @param {string} pluginName - The name of the commissioning server.
|
|
344
|
-
* @returns {CommissioningServer} The created commissioning server.
|
|
345
|
-
*/
|
|
346
|
-
protected createCommisioningServer(context: StorageContext, pluginName: string): Promise<CommissioningServer>;
|
|
347
|
-
/**
|
|
348
|
-
* Creates a commissioning server storage context.
|
|
289
|
+
* Creates a server node storage context.
|
|
349
290
|
*
|
|
350
291
|
* @param pluginName - The name of the plugin.
|
|
351
292
|
* @param deviceName - The name of the device.
|
|
352
|
-
* @param deviceType - The
|
|
293
|
+
* @param deviceType - The deviceType of the device.
|
|
353
294
|
* @param vendorId - The vendor ID.
|
|
354
295
|
* @param vendorName - The vendor name.
|
|
355
296
|
* @param productId - The product ID.
|
|
@@ -362,122 +303,55 @@ export declare class Matterbridge extends EventEmitter {
|
|
|
362
303
|
* @param hardwareVersionString - The hardware version string of the device (optional).
|
|
363
304
|
* @returns The storage context for the commissioning server.
|
|
364
305
|
*/
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
protected importCommissioningServerContext(pluginName: string, device: MatterbridgeDevice): Promise<StorageContext>;
|
|
374
|
-
/**
|
|
375
|
-
* Shows the commissioning server QR code for a given plugin.
|
|
376
|
-
* @param {CommissioningServer} commissioningServer - The commissioning server instance.
|
|
377
|
-
* @param {StorageContext} storageContext - The storage context instance.
|
|
378
|
-
* @param {NodeStorage} nodeContext - The node storage instance.
|
|
379
|
-
* @param {string} pluginName - The name of the plugin of Matterbridge in bridge mode.
|
|
380
|
-
* @returns {Promise<void>} - A promise that resolves when the QR code is shown.
|
|
381
|
-
*/
|
|
382
|
-
protected showCommissioningQRCode(commissioningServer: CommissioningServer | undefined, storageContext: StorageContext | undefined, nodeContext: NodeStorage | undefined, pluginName: string): Promise<void>;
|
|
306
|
+
private createServerNodeContext;
|
|
307
|
+
private createServerNode;
|
|
308
|
+
private startServerNode;
|
|
309
|
+
private stopServerNode;
|
|
310
|
+
private createAggregatorNode;
|
|
311
|
+
addBridgedEndpoint(pluginName: string, device: MatterbridgeEndpoint): Promise<void>;
|
|
312
|
+
removeBridgedEndpoint(pluginName: string, device: MatterbridgeEndpoint): Promise<void>;
|
|
313
|
+
removeAllBridgedEndpoints(pluginName: string): Promise<void>;
|
|
383
314
|
/**
|
|
384
315
|
* Sanitizes the fabric information by converting bigint properties to string cause res.json doesn't know bigint.
|
|
385
316
|
*
|
|
386
317
|
* @param fabricInfo - The array of exposed fabric information objects.
|
|
387
318
|
* @returns An array of sanitized exposed fabric information objects.
|
|
388
319
|
*/
|
|
389
|
-
|
|
320
|
+
private sanitizeFabricInformations;
|
|
390
321
|
/**
|
|
391
322
|
* Sanitizes the session information by converting bigint properties to string.
|
|
392
323
|
*
|
|
393
324
|
* @param sessionInfo - The array of session information objects.
|
|
394
325
|
* @returns An array of sanitized session information objects.
|
|
395
326
|
*/
|
|
396
|
-
|
|
327
|
+
private sanitizeSessionInformation;
|
|
397
328
|
/**
|
|
398
|
-
* Sets the reachability of a
|
|
329
|
+
* Sets the reachability of a matter server node and trigger ReachableChanged event.
|
|
399
330
|
*
|
|
400
|
-
* @param {
|
|
331
|
+
* @param {ServerNode<ServerNode.RootEndpoint>} serverNode - The commissioning server to set the reachability for.
|
|
401
332
|
* @param {boolean} reachable - The new reachability status.
|
|
402
333
|
*/
|
|
403
|
-
|
|
334
|
+
private setServerNodeReachability;
|
|
404
335
|
/**
|
|
405
336
|
* Sets the reachability of the specified matter aggregator and its bridged devices and trigger.
|
|
406
|
-
* @param {
|
|
337
|
+
* @param {EndpointNode<AggregatorEndpoint>} aggregatorNode - The matter aggregator to set the reachability for.
|
|
407
338
|
* @param {boolean} reachable - A boolean indicating the reachability status to set.
|
|
408
339
|
*/
|
|
409
|
-
|
|
340
|
+
private setAggregatorReachability;
|
|
410
341
|
/**
|
|
411
342
|
* Sets the reachability of a device and trigger.
|
|
412
343
|
*
|
|
413
|
-
* @param {
|
|
344
|
+
* @param {MatterbridgeEndpoint} device - The device to set the reachability for.
|
|
414
345
|
* @param {boolean} reachable - The new reachability status of the device.
|
|
415
346
|
*/
|
|
416
|
-
|
|
347
|
+
private setDeviceReachability;
|
|
417
348
|
private getVendorIdName;
|
|
418
|
-
/**
|
|
419
|
-
* Retrieves the base registered plugins sanitized for res.json().
|
|
420
|
-
* @returns {BaseRegisteredPlugin[]} A promise that resolves to an array of BaseRegisteredPlugin objects.
|
|
421
|
-
*/
|
|
422
|
-
protected getBaseRegisteredPlugins(): Promise<BaseRegisteredPlugin[]>;
|
|
423
349
|
/**
|
|
424
350
|
* Spawns a child process with the given command and arguments.
|
|
425
351
|
* @param {string} command - The command to execute.
|
|
426
352
|
* @param {string[]} args - The arguments to pass to the command (default: []).
|
|
427
353
|
* @returns {Promise<boolean>} A promise that resolves when the child process exits successfully, or rejects if there is an error.
|
|
428
354
|
*/
|
|
429
|
-
|
|
430
|
-
/**
|
|
431
|
-
* Sends a WebSocket message to all connected clients.
|
|
432
|
-
*
|
|
433
|
-
* @param {string} level - The logger level of the message: debug info notice warn error fatal...
|
|
434
|
-
* @param {string} time - The time string of the message
|
|
435
|
-
* @param {string} name - The logger name of the message
|
|
436
|
-
* @param {string} message - The content of the message.
|
|
437
|
-
*/
|
|
438
|
-
protected wssSendMessage(level: string, time: string, name: string, message: string): void;
|
|
439
|
-
/**
|
|
440
|
-
* Sends a need to refresh WebSocket message to all connected clients.
|
|
441
|
-
*
|
|
442
|
-
*/
|
|
443
|
-
protected wssSendRefreshRequired(): void;
|
|
444
|
-
/**
|
|
445
|
-
* Sends a need to restart WebSocket message to all connected clients.
|
|
446
|
-
*
|
|
447
|
-
*/
|
|
448
|
-
protected wssSendRestartRequired(): void;
|
|
449
|
-
/**
|
|
450
|
-
* Initializes the frontend of Matterbridge.
|
|
451
|
-
*
|
|
452
|
-
* @param port The port number to run the frontend server on. Default is 8283.
|
|
453
|
-
*/
|
|
454
|
-
initializeFrontend(port?: number): Promise<void>;
|
|
455
|
-
/**
|
|
456
|
-
* Retrieves the cluster text description from a given device.
|
|
457
|
-
* @param {MatterbridgeDevice} device - The MatterbridgeDevice object.
|
|
458
|
-
* @returns {string} The attributes description of the cluster servers in the device.
|
|
459
|
-
*/
|
|
460
|
-
protected getClusterTextFromDevice(device: MatterbridgeDevice): string;
|
|
461
|
-
/**
|
|
462
|
-
* Initializes the Matterbridge instance as extension for zigbee2mqtt.
|
|
463
|
-
* @deprecated This method is deprecated and will be removed in a future version.
|
|
464
|
-
*
|
|
465
|
-
* @returns A Promise that resolves when the initialization is complete.
|
|
466
|
-
*/
|
|
467
|
-
startExtension(dataPath: string, extensionVersion: string, port?: number): Promise<boolean>;
|
|
468
|
-
/**
|
|
469
|
-
* Close the Matterbridge instance as extension for zigbee2mqtt.
|
|
470
|
-
* @deprecated This method is deprecated and will be removed in a future version.
|
|
471
|
-
*
|
|
472
|
-
* @returns A Promise that resolves when the initialization is complete.
|
|
473
|
-
*/
|
|
474
|
-
stopExtension(): Promise<void>;
|
|
475
|
-
/**
|
|
476
|
-
* Checks if the extension is commissioned.
|
|
477
|
-
* @deprecated This method is deprecated and will be removed in a future version.
|
|
478
|
-
*
|
|
479
|
-
* @returns {boolean} Returns true if the extension is commissioned, false otherwise.
|
|
480
|
-
*/
|
|
481
|
-
isExtensionCommissioned(): boolean;
|
|
355
|
+
spawnCommand(command: string, args?: string[]): Promise<boolean>;
|
|
482
356
|
}
|
|
483
357
|
//# sourceMappingURL=matterbridge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matterbridge.d.ts","sourceRoot":"","sources":["../src/matterbridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;
|
|
1
|
+
{"version":3,"file":"matterbridge.d.ts","sourceRoot":"","sources":["../src/matterbridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAMH,OAAO,YAAY,MAAM,QAAQ,CAAC;AAMlC,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,UAAU,EAA2I,MAAM,kBAAkB,CAAC;AAIvL,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,iCAAiC,EAAE,2BAA2B,EAAsB,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC1L,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,aAAa,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