matterbridge 3.1.3-dev-20250712-616f7ed → 3.1.3-dev-20250714-c9b85b3
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 +7 -1
- package/README.md +8 -0
- package/dist/frontend.js +17 -13
- package/dist/matterbridge.js +26 -111
- package/dist/pluginManager.js +0 -2
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,7 +8,7 @@ If you like this project and find it useful, please consider giving it a star on
|
|
|
8
8
|
<img src="bmc-button.svg" alt="Buy me a coffee" width="120">
|
|
9
9
|
</a>
|
|
10
10
|
|
|
11
|
-
## [3.1.3] - 2025-07-
|
|
11
|
+
## [3.1.3] - 2025-07-13
|
|
12
12
|
|
|
13
13
|
### Development Breaking Changes
|
|
14
14
|
|
|
@@ -27,6 +27,12 @@ If you like this project and find it useful, please consider giving it a star on
|
|
|
27
27
|
|
|
28
28
|
- [package]: Updated dependencies.
|
|
29
29
|
- [vendorId]: Added Shortcut Labs Flic (0x1488).
|
|
30
|
+
- [server]: Refactored serverNode event handlers and types.
|
|
31
|
+
- [matterbridge]: Removed duplicated properties.
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- [shutdown]: Fixed error messages from frontend when Matterbridge is shutting down.
|
|
30
36
|
|
|
31
37
|
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
32
38
|
<img src="bmc-button.svg" alt="Buy me a coffee" width="80">
|
package/README.md
CHANGED
|
@@ -376,6 +376,14 @@ AEG RX 9 / Electrolux Pure i9 robot vacuum plugin for Matterbridge.
|
|
|
376
376
|
|
|
377
377
|
A Matterbridge plugin for Airthings air quality monitors via the Airthings Consumer API.
|
|
378
378
|
|
|
379
|
+
### [Daikin AC](https://github.com/andrasg/matterbridge-daikin-ac)
|
|
380
|
+
|
|
381
|
+
The plugin uses local connection to Daikin Wifi modules. The plugin does not work with Daikin cloud (Onecta) connected devices.
|
|
382
|
+
|
|
383
|
+
### [Roborock](https://github.com/RinDevJunior/matterbridge-roborock-vacuum-plugin)
|
|
384
|
+
|
|
385
|
+
Matterbridge Roborock Platform Plugin is a dynamic platform plugin for Matterbridge that integrates Roborock vacuums into the Matter ecosystem, enabling control via Apple Home and other Matter-compatible apps.
|
|
386
|
+
|
|
379
387
|
## How to install and add a plugin with the frontend (best option)
|
|
380
388
|
|
|
381
389
|
Just open the frontend on the link provided in the log, select a plugin and click install.
|
package/dist/frontend.js
CHANGED
|
@@ -572,6 +572,7 @@ export class Frontend extends EventEmitter {
|
|
|
572
572
|
this.matterbridge.systemInformation.heapUsed = this.formatMemoryUsage(process.memoryUsage().heapUsed);
|
|
573
573
|
this.matterbridge.matterbridgeInformation.bridgeMode = this.matterbridge.bridgeMode;
|
|
574
574
|
this.matterbridge.matterbridgeInformation.restartMode = this.matterbridge.restartMode;
|
|
575
|
+
this.matterbridge.matterbridgeInformation.profile = this.matterbridge.profile;
|
|
575
576
|
this.matterbridge.matterbridgeInformation.loggerLevel = this.matterbridge.log.logLevel;
|
|
576
577
|
this.matterbridge.matterbridgeInformation.matterLoggerLevel = Logger.defaultLogLevel;
|
|
577
578
|
this.matterbridge.matterbridgeInformation.mattermdnsinterface = this.matterbridge.mdnsInterface;
|
|
@@ -580,12 +581,13 @@ export class Frontend extends EventEmitter {
|
|
|
580
581
|
this.matterbridge.matterbridgeInformation.matterPort = (await this.matterbridge.nodeContext?.get('matterport', 5540)) ?? 5540;
|
|
581
582
|
this.matterbridge.matterbridgeInformation.matterDiscriminator = await this.matterbridge.nodeContext?.get('matterdiscriminator');
|
|
582
583
|
this.matterbridge.matterbridgeInformation.matterPasscode = await this.matterbridge.nodeContext?.get('matterpasscode');
|
|
583
|
-
this.matterbridge.
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
584
|
+
if (this.matterbridge.bridgeMode === 'bridge' && this.matterbridge.serverNode) {
|
|
585
|
+
this.matterbridge.matterbridgeInformation.matterbridgePaired = this.matterbridge.serverNode.state.commissioning.commissioned;
|
|
586
|
+
this.matterbridge.matterbridgeInformation.matterbridgeQrPairingCode = this.matterbridge.matterbridgeInformation.matterbridgeEndAdvertise ? undefined : this.matterbridge.serverNode.state.commissioning.pairingCodes.qrPairingCode;
|
|
587
|
+
this.matterbridge.matterbridgeInformation.matterbridgeManualPairingCode = this.matterbridge.matterbridgeInformation.matterbridgeEndAdvertise ? undefined : this.matterbridge.serverNode.state.commissioning.pairingCodes.manualPairingCode;
|
|
588
|
+
this.matterbridge.matterbridgeInformation.matterbridgeFabricInformations = this.matterbridge.sanitizeFabricInformations(Object.values(this.matterbridge.serverNode.state.commissioning.fabrics));
|
|
589
|
+
this.matterbridge.matterbridgeInformation.matterbridgeSessionInformations = this.matterbridge.sanitizeSessionInformation(Object.values(this.matterbridge.serverNode.state.sessions.sessions));
|
|
590
|
+
}
|
|
589
591
|
return { systemInformation: this.matterbridge.systemInformation, matterbridgeInformation: this.matterbridge.matterbridgeInformation };
|
|
590
592
|
}
|
|
591
593
|
getReachability(device) {
|
|
@@ -748,6 +750,8 @@ export class Frontend extends EventEmitter {
|
|
|
748
750
|
return attributes.trimStart().trimEnd();
|
|
749
751
|
}
|
|
750
752
|
getBaseRegisteredPlugins() {
|
|
753
|
+
if (this.matterbridge.hasCleanupStarted)
|
|
754
|
+
return [];
|
|
751
755
|
const baseRegisteredPlugins = [];
|
|
752
756
|
for (const plugin of this.matterbridge.plugins) {
|
|
753
757
|
baseRegisteredPlugins.push({
|
|
@@ -769,23 +773,25 @@ export class Frontend extends EventEmitter {
|
|
|
769
773
|
loaded: plugin.loaded,
|
|
770
774
|
started: plugin.started,
|
|
771
775
|
configured: plugin.configured,
|
|
772
|
-
paired: plugin.paired,
|
|
773
776
|
restartRequired: plugin.restartRequired,
|
|
774
|
-
fabricInformations: plugin.fabricInformations,
|
|
775
|
-
sessionInformations: plugin.sessionInformations,
|
|
776
777
|
registeredDevices: plugin.registeredDevices,
|
|
777
778
|
addedDevices: plugin.addedDevices,
|
|
778
|
-
qrPairingCode: plugin.qrPairingCode,
|
|
779
|
-
manualPairingCode: plugin.manualPairingCode,
|
|
780
779
|
configJson: plugin.configJson,
|
|
781
780
|
schemaJson: plugin.schemaJson,
|
|
782
781
|
hasWhiteList: plugin.configJson?.whiteList !== undefined,
|
|
783
782
|
hasBlackList: plugin.configJson?.blackList !== undefined,
|
|
783
|
+
paired: plugin.serverNode?.state.commissioning.commissioned,
|
|
784
|
+
qrPairingCode: this.matterbridge.matterbridgeInformation.matterbridgeEndAdvertise ? undefined : plugin.serverNode?.state.commissioning.pairingCodes.qrPairingCode,
|
|
785
|
+
manualPairingCode: this.matterbridge.matterbridgeInformation.matterbridgeEndAdvertise ? undefined : plugin.serverNode?.state.commissioning.pairingCodes.manualPairingCode,
|
|
786
|
+
fabricInformations: plugin.serverNode ? this.matterbridge.sanitizeFabricInformations(Object.values(plugin.serverNode?.state.commissioning.fabrics)) : undefined,
|
|
787
|
+
sessionInformations: plugin.serverNode ? this.matterbridge.sanitizeSessionInformation(Object.values(plugin.serverNode?.state.sessions.sessions)) : undefined,
|
|
784
788
|
});
|
|
785
789
|
}
|
|
786
790
|
return baseRegisteredPlugins;
|
|
787
791
|
}
|
|
788
792
|
async getDevices(pluginName) {
|
|
793
|
+
if (this.matterbridge.hasCleanupStarted)
|
|
794
|
+
return [];
|
|
789
795
|
const devices = [];
|
|
790
796
|
for (const device of this.matterbridge.devices.array()) {
|
|
791
797
|
if (pluginName && pluginName !== device.plugin)
|
|
@@ -1165,8 +1171,6 @@ export class Frontend extends EventEmitter {
|
|
|
1165
1171
|
else if (data.method === '/api/advertise') {
|
|
1166
1172
|
const pairingCodes = await this.matterbridge.advertiseServerNode(this.matterbridge.serverNode);
|
|
1167
1173
|
this.matterbridge.matterbridgeInformation.matterbridgeAdvertise = true;
|
|
1168
|
-
this.matterbridge.matterbridgeQrPairingCode = pairingCodes?.qrPairingCode;
|
|
1169
|
-
this.matterbridge.matterbridgeManualPairingCode = pairingCodes?.manualPairingCode;
|
|
1170
1174
|
this.wssSendRefreshRequired('matterbridgeAdvertise');
|
|
1171
1175
|
this.wssSendSnackbarMessage(`Started fabrics share`, 0);
|
|
1172
1176
|
client.send(JSON.stringify({ id: data.id, method: data.method, src: 'Matterbridge', dst: data.src, response: pairingCodes, success: true }));
|
package/dist/matterbridge.js
CHANGED
|
@@ -57,6 +57,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
57
57
|
matterbridgeSessionInformations: [],
|
|
58
58
|
matterbridgePaired: false,
|
|
59
59
|
matterbridgeAdvertise: false,
|
|
60
|
+
matterbridgeEndAdvertise: false,
|
|
60
61
|
bridgeMode: '',
|
|
61
62
|
restartMode: '',
|
|
62
63
|
virtualMode: 'outlet',
|
|
@@ -87,11 +88,6 @@ export class Matterbridge extends EventEmitter {
|
|
|
87
88
|
matterbridgeVersion = '';
|
|
88
89
|
matterbridgeLatestVersion = '';
|
|
89
90
|
matterbridgeDevVersion = '';
|
|
90
|
-
matterbridgeQrPairingCode;
|
|
91
|
-
matterbridgeManualPairingCode;
|
|
92
|
-
matterbridgeFabricInformations;
|
|
93
|
-
matterbridgeSessionInformations;
|
|
94
|
-
matterbridgePaired;
|
|
95
91
|
bridgeMode = '';
|
|
96
92
|
restartMode = '';
|
|
97
93
|
profile = getParameter('profile');
|
|
@@ -306,6 +302,19 @@ export class Matterbridge extends EventEmitter {
|
|
|
306
302
|
this.discriminator = pairingFileJson.discriminator;
|
|
307
303
|
this.log.info(`Pairing file ${CYAN}${pairingFilePath}${nf} found. Using passcode ${CYAN}${this.passcode}${nf} and discriminator ${CYAN}${this.discriminator}${nf} from pairing file.`);
|
|
308
304
|
}
|
|
305
|
+
if (pairingFileJson.privateKey && pairingFileJson.certificate && pairingFileJson.intermediateCertificate && pairingFileJson.declaration) {
|
|
306
|
+
const hexStringToUint8Array = (hexString) => {
|
|
307
|
+
const matches = hexString.match(/.{1,2}/g);
|
|
308
|
+
return matches ? new Uint8Array(matches.map((byte) => parseInt(byte, 16))) : new Uint8Array();
|
|
309
|
+
};
|
|
310
|
+
this.certification = {
|
|
311
|
+
privateKey: hexStringToUint8Array(pairingFileJson.privateKey),
|
|
312
|
+
certificate: hexStringToUint8Array(pairingFileJson.certificate),
|
|
313
|
+
intermediateCertificate: hexStringToUint8Array(pairingFileJson.intermediateCertificate),
|
|
314
|
+
declaration: hexStringToUint8Array(pairingFileJson.declaration),
|
|
315
|
+
};
|
|
316
|
+
this.log.info(`Pairing file ${CYAN}${pairingFilePath}${nf} found. Using privateKey, certificate, intermediateCertificate and declaration from pairing file.`);
|
|
317
|
+
}
|
|
309
318
|
}
|
|
310
319
|
catch (error) {
|
|
311
320
|
this.log.debug(`Pairing file ${CYAN}${pairingFilePath}${db} not found: ${error instanceof Error ? error.message : error}`);
|
|
@@ -581,11 +590,11 @@ export class Matterbridge extends EventEmitter {
|
|
|
581
590
|
let index = 0;
|
|
582
591
|
for (const plugin of this.plugins) {
|
|
583
592
|
if (index !== this.plugins.length - 1) {
|
|
584
|
-
this.log.info(`├─┬─ plugin ${plg}${plugin.name}${nf}: "${plg}${BRIGHT}${plugin.description}${RESET}${nf}" type: ${typ}${plugin.type}${nf} ${plugin.enabled ? GREEN : RED}enabled
|
|
593
|
+
this.log.info(`├─┬─ plugin ${plg}${plugin.name}${nf}: "${plg}${BRIGHT}${plugin.description}${RESET}${nf}" type: ${typ}${plugin.type}${nf} ${plugin.enabled ? GREEN : RED}enabled${nf}`);
|
|
585
594
|
this.log.info(`│ └─ entry ${UNDERLINE}${db}${plugin.path}${UNDERLINEOFF}${db}`);
|
|
586
595
|
}
|
|
587
596
|
else {
|
|
588
|
-
this.log.info(`└─┬─ plugin ${plg}${plugin.name}${nf}: "${plg}${BRIGHT}${plugin.description}${RESET}${nf}" type: ${typ}${plugin.type}${nf} ${plugin.enabled ? GREEN : RED}enabled
|
|
597
|
+
this.log.info(`└─┬─ plugin ${plg}${plugin.name}${nf}: "${plg}${BRIGHT}${plugin.description}${RESET}${nf}" type: ${typ}${plugin.type}${nf} ${plugin.enabled ? GREEN : RED}enabled${nf}`);
|
|
589
598
|
this.log.info(` └─ entry ${UNDERLINE}${db}${plugin.path}${UNDERLINEOFF}${db}`);
|
|
590
599
|
}
|
|
591
600
|
index++;
|
|
@@ -739,8 +748,6 @@ export class Matterbridge extends EventEmitter {
|
|
|
739
748
|
plugin.configured = false;
|
|
740
749
|
plugin.registeredDevices = undefined;
|
|
741
750
|
plugin.addedDevices = undefined;
|
|
742
|
-
plugin.qrPairingCode = undefined;
|
|
743
|
-
plugin.manualPairingCode = undefined;
|
|
744
751
|
this.plugins.load(plugin, true, 'Matterbridge is starting');
|
|
745
752
|
}
|
|
746
753
|
this.frontend.wssSendRefreshRequired('plugins');
|
|
@@ -1172,7 +1179,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1172
1179
|
await this.startServerNode(plugin.serverNode);
|
|
1173
1180
|
}
|
|
1174
1181
|
}
|
|
1175
|
-
async createDynamicPlugin(plugin
|
|
1182
|
+
async createDynamicPlugin(plugin) {
|
|
1176
1183
|
if (!plugin.locked) {
|
|
1177
1184
|
plugin.locked = true;
|
|
1178
1185
|
plugin.storageContext = await this.createServerNodeContext(plugin.name, 'Matterbridge', bridge.code, this.aggregatorVendorId, this.aggregatorVendorName, this.aggregatorProductId, plugin.description);
|
|
@@ -1180,8 +1187,6 @@ export class Matterbridge extends EventEmitter {
|
|
|
1180
1187
|
plugin.aggregatorNode = await this.createAggregatorNode(plugin.storageContext);
|
|
1181
1188
|
plugin.serialNumber = await plugin.storageContext.get('serialNumber', '');
|
|
1182
1189
|
await plugin.serverNode.add(plugin.aggregatorNode);
|
|
1183
|
-
if (start)
|
|
1184
|
-
await this.startServerNode(plugin.serverNode);
|
|
1185
1190
|
}
|
|
1186
1191
|
}
|
|
1187
1192
|
async startBridge() {
|
|
@@ -1293,6 +1298,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1293
1298
|
return;
|
|
1294
1299
|
clearInterval(this.startMatterInterval);
|
|
1295
1300
|
this.startMatterInterval = undefined;
|
|
1301
|
+
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
1296
1302
|
this.log.debug('Cleared startMatterInterval interval in childbridge mode');
|
|
1297
1303
|
this.configureTimeout = setTimeout(async () => {
|
|
1298
1304
|
for (const plugin of this.plugins) {
|
|
@@ -1455,73 +1461,25 @@ export class Matterbridge extends EventEmitter {
|
|
|
1455
1461
|
reachable: true,
|
|
1456
1462
|
},
|
|
1457
1463
|
});
|
|
1458
|
-
const sanitizeFabrics = (fabrics, resetSessions = false) => {
|
|
1459
|
-
const sanitizedFabrics = this.sanitizeFabricInformations(Array.from(Object.values(fabrics)));
|
|
1460
|
-
this.log.info(`Fabrics: ${debugStringify(sanitizedFabrics)}`);
|
|
1461
|
-
if (this.bridgeMode === 'bridge') {
|
|
1462
|
-
this.matterbridgeFabricInformations = sanitizedFabrics;
|
|
1463
|
-
if (resetSessions)
|
|
1464
|
-
this.matterbridgeSessionInformations = undefined;
|
|
1465
|
-
this.matterbridgePaired = true;
|
|
1466
|
-
}
|
|
1467
|
-
if (this.bridgeMode === 'childbridge') {
|
|
1468
|
-
const plugin = this.plugins.get(storeId);
|
|
1469
|
-
if (plugin) {
|
|
1470
|
-
plugin.fabricInformations = sanitizedFabrics;
|
|
1471
|
-
if (resetSessions)
|
|
1472
|
-
plugin.sessionInformations = undefined;
|
|
1473
|
-
plugin.paired = true;
|
|
1474
|
-
}
|
|
1475
|
-
}
|
|
1476
|
-
};
|
|
1477
1464
|
serverNode.lifecycle.commissioned.on(() => {
|
|
1478
1465
|
this.log.notice(`Server node for ${storeId} was initially commissioned successfully!`);
|
|
1479
1466
|
clearTimeout(this.endAdvertiseTimeout);
|
|
1480
1467
|
});
|
|
1481
|
-
serverNode.lifecycle.decommissioned.on(() =>
|
|
1468
|
+
serverNode.lifecycle.decommissioned.on(() => {
|
|
1469
|
+
this.log.notice(`Server node for ${storeId} was fully decommissioned successfully!`);
|
|
1470
|
+
clearTimeout(this.endAdvertiseTimeout);
|
|
1471
|
+
});
|
|
1482
1472
|
serverNode.lifecycle.online.on(async () => {
|
|
1483
1473
|
this.log.notice(`Server node for ${storeId} is online`);
|
|
1484
1474
|
if (!serverNode.lifecycle.isCommissioned) {
|
|
1485
1475
|
this.log.notice(`Server node for ${storeId} is not commissioned. Pair to commission ...`);
|
|
1486
1476
|
const { qrPairingCode, manualPairingCode } = serverNode.state.commissioning.pairingCodes;
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
this.matterbridgeManualPairingCode = manualPairingCode;
|
|
1490
|
-
this.matterbridgeFabricInformations = undefined;
|
|
1491
|
-
this.matterbridgeSessionInformations = undefined;
|
|
1492
|
-
this.matterbridgePaired = false;
|
|
1493
|
-
this.log.notice(`QR Code URL: https://project-chip.github.io/connectedhomeip/qrcode.html?data=${qrPairingCode}`);
|
|
1494
|
-
this.log.notice(`Manual pairing code: ${manualPairingCode}`);
|
|
1495
|
-
if (this.matterStorageService) {
|
|
1496
|
-
const storageManager = await this.matterStorageService.open(storeId);
|
|
1497
|
-
const storageContext = storageManager.createContext('persist');
|
|
1498
|
-
await storageContext.set('qrPairingCode', qrPairingCode);
|
|
1499
|
-
await storageContext.set('manualPairingCode', manualPairingCode);
|
|
1500
|
-
}
|
|
1501
|
-
}
|
|
1502
|
-
if (this.bridgeMode === 'childbridge') {
|
|
1503
|
-
const plugin = this.plugins.get(storeId);
|
|
1504
|
-
if (plugin) {
|
|
1505
|
-
plugin.qrPairingCode = qrPairingCode;
|
|
1506
|
-
plugin.manualPairingCode = manualPairingCode;
|
|
1507
|
-
plugin.fabricInformations = undefined;
|
|
1508
|
-
plugin.sessionInformations = undefined;
|
|
1509
|
-
plugin.paired = false;
|
|
1510
|
-
this.log.notice(`QR Code URL: https://project-chip.github.io/connectedhomeip/qrcode.html?data=${qrPairingCode}`);
|
|
1511
|
-
this.log.notice(`Manual pairing code: ${manualPairingCode}`);
|
|
1512
|
-
if (this.matterStorageService) {
|
|
1513
|
-
const storageManager = await this.matterStorageService.open(storeId);
|
|
1514
|
-
const storageContext = storageManager.createContext('persist');
|
|
1515
|
-
await storageContext.set('qrPairingCode', qrPairingCode);
|
|
1516
|
-
await storageContext.set('manualPairingCode', manualPairingCode);
|
|
1517
|
-
}
|
|
1518
|
-
}
|
|
1519
|
-
}
|
|
1477
|
+
this.log.notice(`QR Code URL: https://project-chip.github.io/connectedhomeip/qrcode.html?data=${qrPairingCode}`);
|
|
1478
|
+
this.log.notice(`Manual pairing code: ${manualPairingCode}`);
|
|
1520
1479
|
this.startEndAdvertiseTimer(serverNode);
|
|
1521
1480
|
}
|
|
1522
1481
|
else {
|
|
1523
1482
|
this.log.notice(`Server node for ${storeId} is already commissioned. Waiting for controllers to connect ...`);
|
|
1524
|
-
sanitizeFabrics(serverNode.state.commissioning.fabrics, true);
|
|
1525
1483
|
}
|
|
1526
1484
|
this.frontend.wssSendRefreshRequired('plugins');
|
|
1527
1485
|
this.frontend.wssSendRefreshRequired('settings');
|
|
@@ -1530,23 +1488,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1530
1488
|
});
|
|
1531
1489
|
serverNode.lifecycle.offline.on(() => {
|
|
1532
1490
|
this.log.notice(`Server node for ${storeId} is offline`);
|
|
1533
|
-
|
|
1534
|
-
this.matterbridgeQrPairingCode = undefined;
|
|
1535
|
-
this.matterbridgeManualPairingCode = undefined;
|
|
1536
|
-
this.matterbridgeFabricInformations = undefined;
|
|
1537
|
-
this.matterbridgeSessionInformations = undefined;
|
|
1538
|
-
this.matterbridgePaired = undefined;
|
|
1539
|
-
}
|
|
1540
|
-
if (this.bridgeMode === 'childbridge') {
|
|
1541
|
-
const plugin = this.plugins.get(storeId);
|
|
1542
|
-
if (plugin) {
|
|
1543
|
-
plugin.qrPairingCode = undefined;
|
|
1544
|
-
plugin.manualPairingCode = undefined;
|
|
1545
|
-
plugin.fabricInformations = undefined;
|
|
1546
|
-
plugin.sessionInformations = undefined;
|
|
1547
|
-
plugin.paired = undefined;
|
|
1548
|
-
}
|
|
1549
|
-
}
|
|
1491
|
+
this.matterbridgeInformation.matterbridgeEndAdvertise = true;
|
|
1550
1492
|
this.frontend.wssSendRefreshRequired('plugins');
|
|
1551
1493
|
this.frontend.wssSendRefreshRequired('settings');
|
|
1552
1494
|
this.frontend.wssSendSnackbarMessage(`${storeId} is offline`, 5, 'warning');
|
|
@@ -1566,35 +1508,18 @@ export class Matterbridge extends EventEmitter {
|
|
|
1566
1508
|
break;
|
|
1567
1509
|
}
|
|
1568
1510
|
this.log.notice(`Commissioned fabric index ${fabricIndex} ${action} on server node for ${storeId}: ${debugStringify(serverNode.state.commissioning.fabrics[fabricIndex])}`);
|
|
1569
|
-
sanitizeFabrics(serverNode.state.commissioning.fabrics);
|
|
1570
1511
|
this.frontend.wssSendRefreshRequired('fabrics');
|
|
1571
1512
|
});
|
|
1572
|
-
const sanitizeSessions = (sessions) => {
|
|
1573
|
-
const sanitizedSessions = this.sanitizeSessionInformation(sessions);
|
|
1574
|
-
this.log.debug(`Sessions: ${debugStringify(sanitizedSessions)}`);
|
|
1575
|
-
if (this.bridgeMode === 'bridge') {
|
|
1576
|
-
this.matterbridgeSessionInformations = sanitizedSessions;
|
|
1577
|
-
}
|
|
1578
|
-
if (this.bridgeMode === 'childbridge') {
|
|
1579
|
-
const plugin = this.plugins.get(storeId);
|
|
1580
|
-
if (plugin) {
|
|
1581
|
-
plugin.sessionInformations = sanitizedSessions;
|
|
1582
|
-
}
|
|
1583
|
-
}
|
|
1584
|
-
};
|
|
1585
1513
|
serverNode.events.sessions.opened.on((session) => {
|
|
1586
1514
|
this.log.notice(`Session opened on server node for ${storeId}: ${debugStringify(session)}`);
|
|
1587
|
-
sanitizeSessions(Object.values(serverNode.state.sessions.sessions));
|
|
1588
1515
|
this.frontend.wssSendRefreshRequired('sessions');
|
|
1589
1516
|
});
|
|
1590
1517
|
serverNode.events.sessions.closed.on((session) => {
|
|
1591
1518
|
this.log.notice(`Session closed on server node for ${storeId}: ${debugStringify(session)}`);
|
|
1592
|
-
sanitizeSessions(Object.values(serverNode.state.sessions.sessions));
|
|
1593
1519
|
this.frontend.wssSendRefreshRequired('sessions');
|
|
1594
1520
|
});
|
|
1595
1521
|
serverNode.events.sessions.subscriptionsChanged.on((session) => {
|
|
1596
1522
|
this.log.notice(`Session subscriptions changed on server node for ${storeId}: ${debugStringify(session)}`);
|
|
1597
|
-
sanitizeSessions(Object.values(serverNode.state.sessions.sessions));
|
|
1598
1523
|
this.frontend.wssSendRefreshRequired('sessions');
|
|
1599
1524
|
});
|
|
1600
1525
|
this.log.info(`Created server node for ${storeId}`);
|
|
@@ -1609,17 +1534,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1609
1534
|
this.endAdvertiseTimeout = setTimeout(() => {
|
|
1610
1535
|
if (matterServerNode.lifecycle.isCommissioned)
|
|
1611
1536
|
return;
|
|
1612
|
-
|
|
1613
|
-
this.matterbridgeQrPairingCode = undefined;
|
|
1614
|
-
this.matterbridgeManualPairingCode = undefined;
|
|
1615
|
-
}
|
|
1616
|
-
if (this.bridgeMode === 'childbridge') {
|
|
1617
|
-
const plugin = this.plugins.get(matterServerNode.id);
|
|
1618
|
-
if (plugin) {
|
|
1619
|
-
plugin.qrPairingCode = undefined;
|
|
1620
|
-
plugin.manualPairingCode = undefined;
|
|
1621
|
-
}
|
|
1622
|
-
}
|
|
1537
|
+
this.matterbridgeInformation.matterbridgeEndAdvertise = true;
|
|
1623
1538
|
this.frontend.wssSendRefreshRequired('plugins');
|
|
1624
1539
|
this.frontend.wssSendRefreshRequired('settings');
|
|
1625
1540
|
this.frontend.wssSendRefreshRequired('fabrics');
|
package/dist/pluginManager.js
CHANGED
|
@@ -72,8 +72,6 @@ export class PluginManager extends EventEmitter {
|
|
|
72
72
|
description: plugin.description,
|
|
73
73
|
author: plugin.author,
|
|
74
74
|
enabled: plugin.enabled,
|
|
75
|
-
qrPairingCode: plugin.qrPairingCode,
|
|
76
|
-
manualPairingCode: plugin.manualPairingCode,
|
|
77
75
|
});
|
|
78
76
|
}
|
|
79
77
|
await this.nodeContext.set('plugins', plugins);
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge",
|
|
3
|
-
"version": "3.1.3-dev-
|
|
3
|
+
"version": "3.1.3-dev-20250714-c9b85b3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "matterbridge",
|
|
9
|
-
"version": "3.1.3-dev-
|
|
9
|
+
"version": "3.1.3-dev-20250714-c9b85b3",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@matter/main": "0.15.1",
|
package/package.json
CHANGED