matterbridge 2.1.5-dev.8 → 2.1.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 (112) hide show
  1. package/CHANGELOG.md +4 -2
  2. package/README-DOCKER.md +6 -0
  3. package/dist/cli.d.ts +25 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +26 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/cluster/export.d.ts +2 -0
  8. package/dist/cluster/export.d.ts.map +1 -0
  9. package/dist/cluster/export.js +2 -0
  10. package/dist/cluster/export.js.map +1 -0
  11. package/dist/defaultConfigSchema.d.ts +27 -0
  12. package/dist/defaultConfigSchema.d.ts.map +1 -0
  13. package/dist/defaultConfigSchema.js +23 -0
  14. package/dist/defaultConfigSchema.js.map +1 -0
  15. package/dist/deviceManager.d.ts +114 -0
  16. package/dist/deviceManager.d.ts.map +1 -0
  17. package/dist/deviceManager.js +94 -1
  18. package/dist/deviceManager.js.map +1 -0
  19. package/dist/frontend.d.ts +143 -0
  20. package/dist/frontend.d.ts.map +1 -0
  21. package/dist/frontend.js +268 -28
  22. package/dist/frontend.js.map +1 -0
  23. package/dist/index.d.ts +35 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +28 -0
  26. package/dist/index.js.map +1 -0
  27. package/dist/logger/export.d.ts +2 -0
  28. package/dist/logger/export.d.ts.map +1 -0
  29. package/dist/logger/export.js +1 -0
  30. package/dist/logger/export.js.map +1 -0
  31. package/dist/matter/behaviors.d.ts +2 -0
  32. package/dist/matter/behaviors.d.ts.map +1 -0
  33. package/dist/matter/behaviors.js +2 -0
  34. package/dist/matter/behaviors.js.map +1 -0
  35. package/dist/matter/clusters.d.ts +2 -0
  36. package/dist/matter/clusters.d.ts.map +1 -0
  37. package/dist/matter/clusters.js +2 -0
  38. package/dist/matter/clusters.js.map +1 -0
  39. package/dist/matter/devices.d.ts +2 -0
  40. package/dist/matter/devices.d.ts.map +1 -0
  41. package/dist/matter/devices.js +2 -0
  42. package/dist/matter/devices.js.map +1 -0
  43. package/dist/matter/endpoints.d.ts +2 -0
  44. package/dist/matter/endpoints.d.ts.map +1 -0
  45. package/dist/matter/endpoints.js +2 -0
  46. package/dist/matter/endpoints.js.map +1 -0
  47. package/dist/matter/export.d.ts +5 -0
  48. package/dist/matter/export.d.ts.map +1 -0
  49. package/dist/matter/export.js +2 -0
  50. package/dist/matter/export.js.map +1 -0
  51. package/dist/matter/types.d.ts +3 -0
  52. package/dist/matter/types.d.ts.map +1 -0
  53. package/dist/matter/types.js +2 -0
  54. package/dist/matter/types.js.map +1 -0
  55. package/dist/matterbridge.d.ts +409 -0
  56. package/dist/matterbridge.d.ts.map +1 -0
  57. package/dist/matterbridge.js +748 -41
  58. package/dist/matterbridge.js.map +1 -0
  59. package/dist/matterbridgeAccessoryPlatform.d.ts +39 -0
  60. package/dist/matterbridgeAccessoryPlatform.d.ts.map +1 -0
  61. package/dist/matterbridgeAccessoryPlatform.js +33 -0
  62. package/dist/matterbridgeAccessoryPlatform.js.map +1 -0
  63. package/dist/matterbridgeBehaviors.d.ts +1056 -0
  64. package/dist/matterbridgeBehaviors.d.ts.map +1 -0
  65. package/dist/matterbridgeBehaviors.js +32 -1
  66. package/dist/matterbridgeBehaviors.js.map +1 -0
  67. package/dist/matterbridgeDeviceTypes.d.ts +177 -0
  68. package/dist/matterbridgeDeviceTypes.d.ts.map +1 -0
  69. package/dist/matterbridgeDeviceTypes.js +112 -11
  70. package/dist/matterbridgeDeviceTypes.js.map +1 -0
  71. package/dist/matterbridgeDynamicPlatform.d.ts +39 -0
  72. package/dist/matterbridgeDynamicPlatform.d.ts.map +1 -0
  73. package/dist/matterbridgeDynamicPlatform.js +33 -0
  74. package/dist/matterbridgeDynamicPlatform.js.map +1 -0
  75. package/dist/matterbridgeEndpoint.d.ts +835 -0
  76. package/dist/matterbridgeEndpoint.d.ts.map +1 -0
  77. package/dist/matterbridgeEndpoint.js +690 -6
  78. package/dist/matterbridgeEndpoint.js.map +1 -0
  79. package/dist/matterbridgeEndpointHelpers.d.ts +2275 -0
  80. package/dist/matterbridgeEndpointHelpers.d.ts.map +1 -0
  81. package/dist/matterbridgeEndpointHelpers.js +117 -9
  82. package/dist/matterbridgeEndpointHelpers.js.map +1 -0
  83. package/dist/matterbridgePlatform.d.ts +159 -0
  84. package/dist/matterbridgePlatform.d.ts.map +1 -0
  85. package/dist/matterbridgePlatform.js +121 -5
  86. package/dist/matterbridgePlatform.js.map +1 -0
  87. package/dist/matterbridgeTypes.d.ts +169 -0
  88. package/dist/matterbridgeTypes.d.ts.map +1 -0
  89. package/dist/matterbridgeTypes.js +24 -0
  90. package/dist/matterbridgeTypes.js.map +1 -0
  91. package/dist/pluginManager.d.ts +236 -0
  92. package/dist/pluginManager.d.ts.map +1 -0
  93. package/dist/pluginManager.js +230 -3
  94. package/dist/pluginManager.js.map +1 -0
  95. package/dist/storage/export.d.ts +2 -0
  96. package/dist/storage/export.d.ts.map +1 -0
  97. package/dist/storage/export.js +1 -0
  98. package/dist/storage/export.js.map +1 -0
  99. package/dist/utils/colorUtils.d.ts +61 -0
  100. package/dist/utils/colorUtils.d.ts.map +1 -0
  101. package/dist/utils/colorUtils.js +205 -2
  102. package/dist/utils/colorUtils.js.map +1 -0
  103. package/dist/utils/export.d.ts +3 -0
  104. package/dist/utils/export.d.ts.map +1 -0
  105. package/dist/utils/export.js +1 -0
  106. package/dist/utils/export.js.map +1 -0
  107. package/dist/utils/utils.d.ts +231 -0
  108. package/dist/utils/utils.d.ts.map +1 -0
  109. package/dist/utils/utils.js +264 -10
  110. package/dist/utils/utils.js.map +1 -0
  111. package/npm-shrinkwrap.json +2 -2
  112. package/package.json +2 -1
@@ -1,25 +1,64 @@
1
+ /**
2
+ * This file contains the class MatterbridgeAccessoryPlatform.
3
+ *
4
+ * @file matterbridgePlatform.ts
5
+ * @author Luca Liguori
6
+ * @date 2024-03-21
7
+ * @version 1.1.0
8
+ *
9
+ * Copyright 2024, 2025, 2026 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 { checkNotLatinCharacters } from './matterbridgeEndpointHelpers.js';
2
24
  import { isValidArray, isValidObject, isValidString } from './utils/utils.js';
25
+ // AnsiLogger module
3
26
  import { CYAN, db, er, nf, wr } from './logger/export.js';
27
+ // Storage module
4
28
  import { NodeStorageManager } from './storage/export.js';
29
+ // Node.js module
5
30
  import path from 'path';
31
+ /**
32
+ * Represents the base Matterbridge platform. It is extended by the MatterbridgeAccessoryPlatform and MatterbridgeServicePlatform classes.
33
+ *
34
+ */
6
35
  export class MatterbridgePlatform {
7
36
  matterbridge;
8
37
  log;
9
38
  config = {};
10
- name = '';
11
- type = '';
12
- version = '1.0.0';
39
+ name = ''; // Will be set by the loadPlugin() method using the package.json value.
40
+ type = ''; // Will be set by the extending classes.
41
+ version = '1.0.0'; // Will be set by the loadPlugin() method using the package.json value.
42
+ // Platform storage
13
43
  storage;
14
44
  context;
45
+ // Device and entity selection
15
46
  selectDevice = new Map();
16
47
  selectEntity = new Map();
17
- registeredEndpoints = new Map();
18
- registeredEndpointsByName = new Map();
48
+ // Registered devices
49
+ registeredEndpoints = new Map(); // uniqueId, MatterbridgeEndpoint
50
+ registeredEndpointsByName = new Map(); // deviceName, MatterbridgeEndpoint
51
+ /**
52
+ * Creates an instance of the base MatterbridgePlatform. It is extended by the MatterbridgeAccessoryPlatform and MatterbridgeServicePlatform classes.
53
+ * @param {Matterbridge} matterbridge - The Matterbridge instance.
54
+ * @param {AnsiLogger} log - The logger instance.
55
+ * @param {PlatformConfig} config - The platform configuration.
56
+ */
19
57
  constructor(matterbridge, log, config) {
20
58
  this.matterbridge = matterbridge;
21
59
  this.log = log;
22
60
  this.config = config;
61
+ // create the NodeStorageManager for the plugin platform
23
62
  if (!isValidString(this.config.name))
24
63
  return;
25
64
  this.log.debug(`Creating storage for plugin ${this.config.name} in ${path.join(this.matterbridge.matterbridgeDirectory, this.config.name)}`);
@@ -31,14 +70,32 @@ export class MatterbridgePlatform {
31
70
  forgiveParseErrors: true,
32
71
  });
33
72
  }
73
+ /**
74
+ * This method must be overridden in the extended class.
75
+ * It is called when the platform is started.
76
+ * Use this method to create the MatterbridgeDevice and call this.registerDevice().
77
+ * @param {string} [reason] - The reason for starting.
78
+ * @throws {Error} - Throws an error if the method is not overridden.
79
+ */
34
80
  async onStart(reason) {
35
81
  this.log.error('Plugins must override onStart.', reason);
36
82
  throw new Error('Plugins must override onStart.');
37
83
  }
84
+ /**
85
+ * This method can be overridden in the extended class. Call super.onConfigure() to run checkEndpointNumbers().
86
+ * It is called after the platform has been commissioned.
87
+ * Use this method to perform any configuration of your devices.
88
+ */
38
89
  async onConfigure() {
39
90
  this.log.debug(`Configuring platform ${this.name}`);
40
91
  await this.checkEndpointNumbers();
41
92
  }
93
+ /**
94
+ * This method can be overridden in the extended class. Call super.onShutdown() to run checkEndpointNumbers() and cleanup memory.
95
+ * It is called when the platform is shutting down.
96
+ * Use this method to clean up any resources.
97
+ * @param {string} [reason] - The reason for shutting down.
98
+ */
42
99
  async onShutdown(reason) {
43
100
  this.log.debug(`Shutting down platform ${this.name}`, reason);
44
101
  await this.checkEndpointNumbers();
@@ -51,12 +108,25 @@ export class MatterbridgePlatform {
51
108
  await this.storage?.close();
52
109
  this.storage = undefined;
53
110
  }
111
+ /**
112
+ * Sets the logger level and logs a debug message indicating that the plugin doesn't override this method.
113
+ * @param {LogLevel} logLevel The new logger level.
114
+ */
54
115
  async onChangeLoggerLevel(logLevel) {
55
116
  this.log.debug(`The plugin doesn't override onChangeLoggerLevel. Logger level set to: ${logLevel}`);
56
117
  }
118
+ /**
119
+ * Check if a device with this name is already registered in the platform.
120
+ * @param {string} deviceName - The device name to check.
121
+ * @returns {boolean} True if the device is already registered, false otherwise.
122
+ */
57
123
  hasDeviceName(deviceName) {
58
124
  return this.registeredEndpointsByName.has(deviceName);
59
125
  }
126
+ /**
127
+ * Registers a device with the Matterbridge platform.
128
+ * @param {MatterbridgeEndpoint} device - The device to register.
129
+ */
60
130
  async registerDevice(device) {
61
131
  device.plugin = this.name;
62
132
  if (device.deviceName && this.registeredEndpointsByName.has(device.deviceName)) {
@@ -72,6 +142,10 @@ export class MatterbridgePlatform {
72
142
  if (device.deviceName)
73
143
  this.registeredEndpointsByName.set(device.deviceName, device);
74
144
  }
145
+ /**
146
+ * Unregisters a device registered with the Matterbridge platform.
147
+ * @param {MatterbridgeEndpoint} device - The device to unregister.
148
+ */
75
149
  async unregisterDevice(device) {
76
150
  await this.matterbridge.removeBridgedEndpoint(this.name, device);
77
151
  if (device.uniqueId)
@@ -79,11 +153,19 @@ export class MatterbridgePlatform {
79
153
  if (device.deviceName)
80
154
  this.registeredEndpointsByName.delete(device.deviceName);
81
155
  }
156
+ /**
157
+ * Unregisters all devices registered with the Matterbridge platform.
158
+ */
82
159
  async unregisterAllDevices() {
83
160
  await this.matterbridge.removeAllBridgedEndpoints(this.name);
84
161
  this.registeredEndpoints.clear();
85
162
  this.registeredEndpointsByName.clear();
86
163
  }
164
+ /**
165
+ * Verifies if the Matterbridge version meets the required version.
166
+ * @param {string} requiredVersion - The required version to compare against.
167
+ * @returns {boolean} True if the Matterbridge version meets or exceeds the required version, false otherwise.
168
+ */
87
169
  verifyMatterbridgeVersion(requiredVersion) {
88
170
  const compareVersions = (matterbridgeVersion, requiredVersion) => {
89
171
  const stripTag = (v) => {
@@ -108,9 +190,21 @@ export class MatterbridgePlatform {
108
190
  return false;
109
191
  return true;
110
192
  }
193
+ /**
194
+ * @deprecated This method is deprecated and will be removed in future versions. Use validateDevice instead.
195
+ */
111
196
  validateDeviceWhiteBlackList(device, log = true) {
112
197
  return this.validateDevice(device, log);
113
198
  }
199
+ /**
200
+ * Validates if a device is allowed based on the whitelist and blacklist configurations.
201
+ * The blacklist has priority over the whitelist.
202
+ *
203
+ * @param {string | string[]} device - The device name(s) to validate.
204
+ * @param {boolean} [log=true] - Whether to log the validation result.
205
+ * @returns {boolean} - Returns true if the device is allowed, false otherwise.
206
+ *
207
+ */
114
208
  validateDevice(device, log = true) {
115
209
  if (!Array.isArray(device))
116
210
  device = [device];
@@ -140,9 +234,21 @@ export class MatterbridgePlatform {
140
234
  this.log.info(`Skipping device ${CYAN}${device.join(', ')}${nf} because not in whitelist`);
141
235
  return false;
142
236
  }
237
+ /**
238
+ * @deprecated This method is deprecated and will be removed in future versions. Use validateEntity instead.
239
+ */
143
240
  validateEntityBlackList(device, entity, log = true) {
144
241
  return this.validateEntity(device, entity, log);
145
242
  }
243
+ /**
244
+ * Validates if an entity is allowed based on the entity blacklist and device-entity blacklist configurations.
245
+ *
246
+ * @param {string} device - The device to which the entity belongs.
247
+ * @param {string} entity - The entity to validate.
248
+ * @param {boolean} [log=true] - Whether to log the validation result.
249
+ * @returns {boolean} - Returns true if the entity is allowed, false otherwise.
250
+ *
251
+ */
146
252
  validateEntity(device, entity, log = true) {
147
253
  if (isValidArray(this.config.entityBlackList, 1) && this.config.entityBlackList.find((e) => e === entity)) {
148
254
  if (log)
@@ -161,6 +267,15 @@ export class MatterbridgePlatform {
161
267
  }
162
268
  return true;
163
269
  }
270
+ /**
271
+ * Checks and updates the endpoint numbers for Matterbridge devices.
272
+ *
273
+ * This method retrieves the list of Matterbridge devices and their child endpoints,
274
+ * compares their current endpoint numbers with the stored ones, and updates the storage
275
+ * if there are any changes. It logs the changes and updates the endpoint numbers accordingly.
276
+ *
277
+ * @returns {Promise<number>} The size of the updated endpoint map, or -1 if storage is not available.
278
+ */
164
279
  async checkEndpointNumbers() {
165
280
  if (!this.storage)
166
281
  return -1;
@@ -200,3 +315,4 @@ export class MatterbridgePlatform {
200
315
  return endpointMap.size;
201
316
  }
202
317
  }
318
+ //# sourceMappingURL=matterbridgePlatform.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matterbridgePlatform.js","sourceRoot":"","sources":["../src/matterbridgePlatform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAKH,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE9E,oBAAoB;AACpB,OAAO,EAAc,IAAI,EAAE,EAAE,EAAE,EAAE,EAAY,EAAE,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAEhF,iBAAiB;AACjB,OAAO,EAAe,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAKtE,iBAAiB;AACjB,OAAO,IAAI,MAAM,MAAM,CAAC;AAWxB;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IACxB,YAAY,CAAe;IAC3B,GAAG,CAAa;IAChB,MAAM,GAAmB,EAAE,CAAC;IAC5B,IAAI,GAAG,EAAE,CAAC,CAAC,uEAAuE;IAClF,IAAI,GAAG,EAAE,CAAC,CAAC,wCAAwC;IACnD,OAAO,GAAG,OAAO,CAAC,CAAC,uEAAuE;IAEjG,mBAAmB;IACZ,OAAO,CAAiC;IACxC,OAAO,CAA0B;IAExC,8BAA8B;IACvB,YAAY,GAAG,IAAI,GAAG,EAA8H,CAAC;IACrJ,YAAY,GAAG,IAAI,GAAG,EAAgE,CAAC;IAE9F,qBAAqB;IACd,mBAAmB,GAAG,IAAI,GAAG,EAAgC,CAAC,CAAC,iCAAiC;IAChG,yBAAyB,GAAG,IAAI,GAAG,EAAgC,CAAC,CAAC,mCAAmC;IAE/G;;;;;OAKG;IACH,YAAY,YAA0B,EAAE,GAAe,EAAE,MAAsB;QAC7E,IAAI,CAAC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,CAAC,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC,EAAE,CAAC;oBAC5D,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,4CAA4C,IAAI,GAAG,MAAM,CAAC,QAAQ,GAAG,EAAE,IAAI,IAAI,GAAG,OAAO,GAAG,EAAE,OAAO,IAAI,GAAG,KAAK,CAAC,WAAW,GAAG,EAAE,EAAE,CAAC,CAAC;oBACrJ,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,GAAG,SAAS,GAAG,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;gBAC5E,CAAC;YACH,CAAC;QACH,CAAC;QACD,MAAM,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACpE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;QACpD,OAAO,WAAW,CAAC,IAAI,CAAC;IAC1B,CAAC;CACF"}
@@ -0,0 +1,169 @@
1
+ /**
2
+ * This file contains the types for Matterbridge.
3
+ *
4
+ * @file matterbridgeTypes.ts
5
+ * @author Luca Liguori
6
+ * @date 2024-07-12
7
+ * @version 1.0.2
8
+ *
9
+ * Copyright 2023, 2024, 2025 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 { NodeStorage } from './storage/export.js';
24
+ import { LogLevel } from './logger/export.js';
25
+ import { MatterbridgePlatform, PlatformConfig, PlatformSchema } from './matterbridgePlatform.js';
26
+ import { MatterbridgeEndpoint } from './matterbridgeEndpoint.js';
27
+ import { FabricIndex, NodeId, VendorId, StorageContext, ServerNode, EndpointNumber, Endpoint as EndpointNode } from '@matter/main';
28
+ import { ExposedFabricInformation } from '@matter/main/protocol';
29
+ import { AggregatorEndpoint } from '@matter/main/endpoints/aggregator';
30
+ export declare const plg = "\u001B[38;5;33m";
31
+ export declare const dev = "\u001B[38;5;79m";
32
+ export declare const typ = "\u001B[38;5;207m";
33
+ export interface RegisteredPlugin extends BaseRegisteredPlugin {
34
+ nodeContext?: NodeStorage;
35
+ storageContext?: StorageContext;
36
+ serverNode?: ServerNode<ServerNode.RootEndpoint>;
37
+ aggregatorNode?: EndpointNode<AggregatorEndpoint>;
38
+ device?: MatterbridgeEndpoint;
39
+ platform?: MatterbridgePlatform;
40
+ reachabilityTimeout?: NodeJS.Timeout;
41
+ }
42
+ export interface BaseRegisteredPlugin {
43
+ name: string;
44
+ version: string;
45
+ description: string;
46
+ author: string;
47
+ path: string;
48
+ type: string;
49
+ latestVersion?: string;
50
+ locked?: boolean;
51
+ error?: boolean;
52
+ enabled?: boolean;
53
+ loaded?: boolean;
54
+ started?: boolean;
55
+ configured?: boolean;
56
+ paired?: boolean;
57
+ fabricInformations?: SanitizedExposedFabricInformation[];
58
+ sessionInformations?: SanitizedSessionInformation[];
59
+ registeredDevices?: number;
60
+ addedDevices?: number;
61
+ qrPairingCode?: string;
62
+ manualPairingCode?: string;
63
+ configJson?: PlatformConfig;
64
+ schemaJson?: PlatformSchema;
65
+ }
66
+ export interface SystemInformation {
67
+ interfaceName: string;
68
+ macAddress: string;
69
+ ipv4Address: string;
70
+ ipv6Address: string;
71
+ nodeVersion: string;
72
+ hostname: string;
73
+ user: string;
74
+ osType: string;
75
+ osRelease: string;
76
+ osPlatform: string;
77
+ osArch: string;
78
+ totalMemory: string;
79
+ freeMemory: string;
80
+ systemUptime: string;
81
+ cpuUsed: string;
82
+ rss: string;
83
+ heapTotal: string;
84
+ heapUsed: string;
85
+ }
86
+ export interface MatterbridgeInformation {
87
+ homeDirectory: string;
88
+ rootDirectory: string;
89
+ matterbridgeDirectory: string;
90
+ matterbridgePluginDirectory: string;
91
+ globalModulesDirectory: string;
92
+ matterbridgeVersion: string;
93
+ matterbridgeLatestVersion: string;
94
+ matterbridgeQrPairingCode: string | undefined;
95
+ matterbridgeManualPairingCode: string | undefined;
96
+ matterbridgeFabricInformations: SanitizedExposedFabricInformation[] | undefined;
97
+ matterbridgeSessionInformations: SanitizedSessionInformation[] | undefined;
98
+ matterbridgePaired: boolean | undefined;
99
+ bridgeMode: string;
100
+ restartMode: string;
101
+ readOnly: boolean;
102
+ profile?: string;
103
+ loggerLevel: LogLevel;
104
+ fileLogger: boolean;
105
+ matterLoggerLevel: number;
106
+ matterFileLogger: boolean;
107
+ mattermdnsinterface: string | undefined;
108
+ matteripv4address: string | undefined;
109
+ matteripv6address: string | undefined;
110
+ matterPort: number;
111
+ matterDiscriminator: number | undefined;
112
+ matterPasscode: number | undefined;
113
+ restartRequired: boolean;
114
+ refreshRequired: boolean;
115
+ }
116
+ export interface SanitizedExposedFabricInformation {
117
+ fabricIndex: FabricIndex;
118
+ fabricId: string;
119
+ nodeId: string;
120
+ rootNodeId: string;
121
+ rootVendorId: VendorId;
122
+ rootVendorName: string;
123
+ label: string;
124
+ }
125
+ export interface SessionInformation {
126
+ name: string;
127
+ nodeId: NodeId;
128
+ peerNodeId: NodeId;
129
+ fabric?: ExposedFabricInformation;
130
+ isPeerActive: boolean;
131
+ secure: boolean;
132
+ lastInteractionTimestamp?: number;
133
+ lastActiveTimestamp?: number;
134
+ numberOfActiveSubscriptions: number;
135
+ }
136
+ export interface SanitizedSessionInformation {
137
+ name: string;
138
+ nodeId: string;
139
+ peerNodeId: string;
140
+ fabric?: SanitizedExposedFabricInformation;
141
+ isPeerActive: boolean;
142
+ secure: boolean;
143
+ lastInteractionTimestamp?: string;
144
+ lastActiveTimestamp?: string;
145
+ numberOfActiveSubscriptions: number;
146
+ }
147
+ export interface ApiDevices {
148
+ pluginName: string;
149
+ type: string;
150
+ endpoint: EndpointNumber | undefined;
151
+ name: string;
152
+ serial: string;
153
+ productUrl: string;
154
+ configUrl?: string;
155
+ uniqueId: string;
156
+ cluster: string;
157
+ }
158
+ export interface ApiClusters {
159
+ endpoint: string;
160
+ id: string;
161
+ deviceTypes: number[];
162
+ clusterName: string;
163
+ clusterId: string;
164
+ attributeName: string;
165
+ attributeId: string;
166
+ attributeValue: string;
167
+ attributeLocalValue: unknown;
168
+ }
169
+ //# sourceMappingURL=matterbridgeTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matterbridgeTypes.d.ts","sourceRoot":"","sources":["../src/matterbridgeTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG9C,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAGjE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,cAAc,CAAC;AACnI,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAGvE,eAAO,MAAM,GAAG,oBAAoB,CAAC;AACrC,eAAO,MAAM,GAAG,oBAAoB,CAAC;AACrC,eAAO,MAAM,GAAG,qBAAqB,CAAC;AAGtC,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB;IAC5D,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,UAAU,CAAC,EAAE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cAAc,GAAG,SAAS,CAAC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,mBAAmB,EAAE,OAAO,CAAC;CAC9B"}
@@ -1,3 +1,27 @@
1
+ /**
2
+ * This file contains the types for Matterbridge.
3
+ *
4
+ * @file matterbridgeTypes.ts
5
+ * @author Luca Liguori
6
+ * @date 2024-07-12
7
+ * @version 1.0.2
8
+ *
9
+ * Copyright 2023, 2024, 2025 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
+ // Default colors
1
24
  export const plg = '\u001B[38;5;33m';
2
25
  export const dev = '\u001B[38;5;79m';
3
26
  export const typ = '\u001B[38;5;207m';
27
+ //# sourceMappingURL=matterbridgeTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matterbridgeTypes.js","sourceRoot":"","sources":["../src/matterbridgeTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAeH,iBAAiB;AACjB,MAAM,CAAC,MAAM,GAAG,GAAG,iBAAiB,CAAC;AACrC,MAAM,CAAC,MAAM,GAAG,GAAG,iBAAiB,CAAC;AACrC,MAAM,CAAC,MAAM,GAAG,GAAG,kBAAkB,CAAC"}