matterbridge 3.5.1-dev-20260121-22e98b4 → 3.5.1-dev-20260122-6461be3
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 +4 -0
- package/README-DOCKER.md +4 -2
- package/README.md +4 -1
- package/dist/frontend.d.ts +4 -0
- package/dist/frontend.js +50 -0
- package/dist/jestutils/jestHelpers.js +2 -7
- package/dist/matterbridge.js +15 -4
- package/dist/matterbridgeEndpointHelpers.js +1 -1
- package/dist/mb_mdns.js +10 -0
- package/npm-shrinkwrap.json +47 -47
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -35,6 +35,10 @@ Advantages:
|
|
|
35
35
|
- [mb_mdns]: Added additional mDNS service types for discovery.
|
|
36
36
|
- [workflows]: Added npm registry URL and caching to Node.js setup in workflow files.
|
|
37
37
|
- [workflows]: Added concurrency settings in build.yml to cancel previous runs in GitHub Actions.
|
|
38
|
+
- [preset]: Added Thermostat with preset feature. Thanks Ludovic BOUÉ (https://github.com/Luligu/matterbridge/pull/482).
|
|
39
|
+
- [matter.js]: Bump to matter.j v. 0.16.6.
|
|
40
|
+
- [mb_mdns]: Added --ip-filter params to filter incoming mDns messages by sender ip.
|
|
41
|
+
- [express]: Added a login check for internal express api. Now only /health and /memory are opened. Thanks Rogibaer (https://github.com/Luligu/matterbridge-hass/issues/149).
|
|
38
42
|
|
|
39
43
|
### Changed
|
|
40
44
|
|
package/README-DOCKER.md
CHANGED
|
@@ -18,12 +18,14 @@
|
|
|
18
18
|
|
|
19
19
|
## Run matterbridge with docker and docker compose
|
|
20
20
|
|
|
21
|
-
The Matterbridge Docker image, which includes a manifest list for the linux/amd64
|
|
21
|
+
The Matterbridge Docker image, which includes a manifest list for the linux/amd64 and linux/arm64 architectures, is published on [**Docker Hub**](https://hub.docker.com/r/luligu/matterbridge).
|
|
22
22
|
|
|
23
23
|
The image (tag **latest**) includes matterbridge and all official plugins with the latest release (as published on npm). You can just pull the new image and matterbridge with all plugins will be the latest release published on npm.
|
|
24
24
|
|
|
25
25
|
The image (tag **dev**) includes matterbridge and all plugins with the dev release (as pushed on GitHub). You can just pull the new image and matterbridge with all plugins will be the latest dev release pushed on GitHub. It is possible that the devs are outdated by published latests.
|
|
26
26
|
|
|
27
|
+
For development and testing see also the [Development Images](README-DOCKER.md#development-images).
|
|
28
|
+
|
|
27
29
|
You can directly select and add a plugin without installing it.
|
|
28
30
|
|
|
29
31
|
It is based on node:22-bookworm-slim and integrates the health check.
|
|
@@ -240,6 +242,6 @@ sudo systemctl restart docker
|
|
|
240
242
|
|
|
241
243
|
On [**Docker Hub**](https://hub.docker.com/r/luligu/matterbridge) are also published **for test and development** the Matterbridge ubuntu and alpine images, which include a manifest list for the linux/amd64, linux/arm64 architectures and are based on node 24.x.
|
|
242
244
|
|
|
243
|
-
The image (tag **ubuntu**) includes only matterbridge with the latest release (as published on npm). The plugins are not included in the image but they will be reinstalled on the first run.
|
|
245
|
+
The image (tag **ubuntu**) includes only matterbridge with the latest release (as published on npm). The plugins are not included in the image but they will be reinstalled on the first run. This image has preinstalled bluetooth essentials and python (it can be used with plugins that require bluetooth, build-essential and python).
|
|
244
246
|
|
|
245
247
|
The image (tag **alpine**) includes only matterbridge with the latest release (as published on npm). The plugins are not included in the image but they will be reinstalled on the first run.
|
package/README.md
CHANGED
|
@@ -72,11 +72,14 @@ https://blog.adafruit.com/2025/11/03/matterbridge-a-matter-plugin-manager/
|
|
|
72
72
|
To run Matterbridge, you need either a [Node.js](https://nodejs.org/en) environment or [Docker](https://docs.docker.com/get-started/get-docker/) installed on your system.
|
|
73
73
|
|
|
74
74
|
If you don't have Node.js already install, please use this method to install it on a debian device: https://github.com/nodesource/distributions.
|
|
75
|
-
The supported versions of node are 20 and
|
|
75
|
+
The supported versions of node are 20, 22 and 24. Please install Node.js 22 LTS. Don't use Node.js Current but always the Node.js LTS.
|
|
76
76
|
Node.js 23, like all odd-numbered versions, is not supported.
|
|
77
77
|
Nvm is not a good choice and should not be used for production.
|
|
78
78
|
|
|
79
79
|
If you don't have Docker already install, please use this method to install it on a debian device: https://docs.docker.com/engine/install.
|
|
80
|
+
|
|
81
|
+
If you don't have Docker already install, please use this method to install it on a Windows or macOS: https://docs.docker.com/get-started/introduction/get-docker-desktop/.
|
|
82
|
+
|
|
80
83
|
After follow the guidelines for the [Docker configurations](README-DOCKER.md).
|
|
81
84
|
|
|
82
85
|
I suggest using Docker for its simplicity.
|
package/dist/frontend.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export declare class Frontend extends EventEmitter<FrontendEvents> {
|
|
|
17
17
|
private port;
|
|
18
18
|
private listening;
|
|
19
19
|
private storedPassword;
|
|
20
|
+
private authClients;
|
|
20
21
|
private expressApp;
|
|
21
22
|
private httpServer;
|
|
22
23
|
private httpsServer;
|
|
@@ -28,6 +29,9 @@ export declare class Frontend extends EventEmitter<FrontendEvents> {
|
|
|
28
29
|
destroy(): void;
|
|
29
30
|
private msgHandler;
|
|
30
31
|
set logLevel(logLevel: LogLevel);
|
|
32
|
+
validateReq(req: import('express').Request<unknown, unknown, unknown, {
|
|
33
|
+
password?: string;
|
|
34
|
+
}>, res: import('express').Response): boolean;
|
|
31
35
|
start(port?: number): Promise<void>;
|
|
32
36
|
stop(): Promise<void>;
|
|
33
37
|
private getApiSettings;
|
package/dist/frontend.js
CHANGED
|
@@ -22,6 +22,7 @@ export class Frontend extends EventEmitter {
|
|
|
22
22
|
port = 8283;
|
|
23
23
|
listening = false;
|
|
24
24
|
storedPassword = undefined;
|
|
25
|
+
authClients = [];
|
|
25
26
|
expressApp;
|
|
26
27
|
httpServer;
|
|
27
28
|
httpsServer;
|
|
@@ -130,6 +131,14 @@ export class Frontend extends EventEmitter {
|
|
|
130
131
|
set logLevel(logLevel) {
|
|
131
132
|
this.log.logLevel = logLevel;
|
|
132
133
|
}
|
|
134
|
+
validateReq(req, res) {
|
|
135
|
+
if (req.ip && !this.authClients.includes(req.ip)) {
|
|
136
|
+
this.log.warn(`Warning blocked unauthorized access request ${req.originalUrl ?? req.url} from ${req.ip}`);
|
|
137
|
+
res.status(401).json({ error: 'Unauthorized' });
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
return true;
|
|
141
|
+
}
|
|
133
142
|
async start(port = 8283) {
|
|
134
143
|
this.port = port;
|
|
135
144
|
this.storedPassword = await this.matterbridge.nodeContext?.get('password', '');
|
|
@@ -169,6 +178,7 @@ export class Frontend extends EventEmitter {
|
|
|
169
178
|
if (this.webSocketServer?.clients.size === 0) {
|
|
170
179
|
AnsiLogger.setGlobalCallback(undefined);
|
|
171
180
|
this.log.debug('All WebSocket clients disconnected. WebSocketServer logger global callback removed');
|
|
181
|
+
this.authClients = [];
|
|
172
182
|
}
|
|
173
183
|
});
|
|
174
184
|
ws.on('error', (error) => {
|
|
@@ -405,6 +415,8 @@ export class Frontend extends EventEmitter {
|
|
|
405
415
|
if (this.storedPassword === '' || password === this.storedPassword) {
|
|
406
416
|
this.log.debug('/api/login password valid');
|
|
407
417
|
res.json({ valid: true });
|
|
418
|
+
if (req.ip)
|
|
419
|
+
this.authClients.push(req.ip);
|
|
408
420
|
}
|
|
409
421
|
else {
|
|
410
422
|
this.log.warn('/api/login error wrong password');
|
|
@@ -454,18 +466,26 @@ export class Frontend extends EventEmitter {
|
|
|
454
466
|
});
|
|
455
467
|
this.expressApp.get('/api/settings', express.json(), async (req, res) => {
|
|
456
468
|
this.log.debug('The frontend sent /api/settings');
|
|
469
|
+
if (!this.validateReq(req, res))
|
|
470
|
+
return;
|
|
457
471
|
res.json(await this.getApiSettings());
|
|
458
472
|
});
|
|
459
473
|
this.expressApp.get('/api/plugins', async (req, res) => {
|
|
460
474
|
this.log.debug('The frontend sent /api/plugins');
|
|
475
|
+
if (!this.validateReq(req, res))
|
|
476
|
+
return;
|
|
461
477
|
res.json(this.matterbridge.hasCleanupStarted ? [] : this.getPlugins());
|
|
462
478
|
});
|
|
463
479
|
this.expressApp.get('/api/devices', async (req, res) => {
|
|
464
480
|
this.log.debug('The frontend sent /api/devices');
|
|
481
|
+
if (!this.validateReq(req, res))
|
|
482
|
+
return;
|
|
465
483
|
res.json(this.matterbridge.hasCleanupStarted ? [] : this.getDevices());
|
|
466
484
|
});
|
|
467
485
|
this.expressApp.get('/api/view-mblog', async (req, res) => {
|
|
468
486
|
this.log.debug('The frontend sent /api/view-mblog');
|
|
487
|
+
if (!this.validateReq(req, res))
|
|
488
|
+
return;
|
|
469
489
|
try {
|
|
470
490
|
const fs = await import('node:fs');
|
|
471
491
|
const data = await fs.promises.readFile(path.join(this.matterbridge.matterbridgeDirectory, MATTERBRIDGE_LOGGER_FILE), 'utf8');
|
|
@@ -479,6 +499,8 @@ export class Frontend extends EventEmitter {
|
|
|
479
499
|
});
|
|
480
500
|
this.expressApp.get('/api/view-mjlog', async (req, res) => {
|
|
481
501
|
this.log.debug('The frontend sent /api/view-mjlog');
|
|
502
|
+
if (!this.validateReq(req, res))
|
|
503
|
+
return;
|
|
482
504
|
try {
|
|
483
505
|
const fs = await import('node:fs');
|
|
484
506
|
const data = await fs.promises.readFile(path.join(this.matterbridge.matterbridgeDirectory, MATTER_LOGGER_FILE), 'utf8');
|
|
@@ -492,6 +514,8 @@ export class Frontend extends EventEmitter {
|
|
|
492
514
|
});
|
|
493
515
|
this.expressApp.get('/api/view-diagnostic', async (req, res) => {
|
|
494
516
|
this.log.debug('The frontend sent /api/view-diagnostic');
|
|
517
|
+
if (!this.validateReq(req, res))
|
|
518
|
+
return;
|
|
495
519
|
await this.generateDiagnostic();
|
|
496
520
|
try {
|
|
497
521
|
const fs = await import('node:fs');
|
|
@@ -506,6 +530,8 @@ export class Frontend extends EventEmitter {
|
|
|
506
530
|
});
|
|
507
531
|
this.expressApp.get('/api/download-diagnostic', async (req, res) => {
|
|
508
532
|
this.log.debug(`The frontend sent /api/download-diagnostic`);
|
|
533
|
+
if (!this.validateReq(req, res))
|
|
534
|
+
return;
|
|
509
535
|
await this.generateDiagnostic();
|
|
510
536
|
try {
|
|
511
537
|
const fs = await import('node:fs');
|
|
@@ -526,6 +552,8 @@ export class Frontend extends EventEmitter {
|
|
|
526
552
|
});
|
|
527
553
|
this.expressApp.get('/api/viewhistory', async (req, res) => {
|
|
528
554
|
this.log.debug('The frontend sent /api/viewhistory');
|
|
555
|
+
if (!this.validateReq(req, res))
|
|
556
|
+
return;
|
|
529
557
|
try {
|
|
530
558
|
const fs = await import('node:fs');
|
|
531
559
|
const data = await fs.promises.readFile(path.join(this.matterbridge.matterbridgeDirectory, MATTERBRIDGE_HISTORY_FILE), 'utf8');
|
|
@@ -539,6 +567,8 @@ export class Frontend extends EventEmitter {
|
|
|
539
567
|
});
|
|
540
568
|
this.expressApp.get('/api/downloadhistory', async (req, res) => {
|
|
541
569
|
this.log.debug(`The frontend sent /api/downloadhistory`);
|
|
570
|
+
if (!this.validateReq(req, res))
|
|
571
|
+
return;
|
|
542
572
|
try {
|
|
543
573
|
const fs = await import('node:fs');
|
|
544
574
|
await fs.promises.access(path.join(this.matterbridge.matterbridgeDirectory, MATTERBRIDGE_HISTORY_FILE), fs.constants.F_OK);
|
|
@@ -559,6 +589,8 @@ export class Frontend extends EventEmitter {
|
|
|
559
589
|
});
|
|
560
590
|
this.expressApp.get('/api/shellyviewsystemlog', async (req, res) => {
|
|
561
591
|
this.log.debug('The frontend sent /api/shellyviewsystemlog');
|
|
592
|
+
if (!this.validateReq(req, res))
|
|
593
|
+
return;
|
|
562
594
|
try {
|
|
563
595
|
const fs = await import('node:fs');
|
|
564
596
|
const data = await fs.promises.readFile(path.join(this.matterbridge.matterbridgeDirectory, 'shelly.log'), 'utf8');
|
|
@@ -572,6 +604,8 @@ export class Frontend extends EventEmitter {
|
|
|
572
604
|
});
|
|
573
605
|
this.expressApp.get('/api/download-mblog', async (req, res) => {
|
|
574
606
|
this.log.debug(`The frontend sent /api/download-mblog ${path.join(this.matterbridge.matterbridgeDirectory, MATTERBRIDGE_LOGGER_FILE)}`);
|
|
607
|
+
if (!this.validateReq(req, res))
|
|
608
|
+
return;
|
|
575
609
|
const fs = await import('node:fs');
|
|
576
610
|
try {
|
|
577
611
|
await fs.promises.access(path.join(this.matterbridge.matterbridgeDirectory, MATTERBRIDGE_LOGGER_FILE), fs.constants.F_OK);
|
|
@@ -592,6 +626,8 @@ export class Frontend extends EventEmitter {
|
|
|
592
626
|
});
|
|
593
627
|
this.expressApp.get('/api/download-mjlog', async (req, res) => {
|
|
594
628
|
this.log.debug(`The frontend sent /api/download-mjlog ${path.join(this.matterbridge.matterbridgeDirectory, MATTERBRIDGE_LOGGER_FILE)}`);
|
|
629
|
+
if (!this.validateReq(req, res))
|
|
630
|
+
return;
|
|
595
631
|
const fs = await import('node:fs');
|
|
596
632
|
try {
|
|
597
633
|
await fs.promises.access(path.join(this.matterbridge.matterbridgeDirectory, MATTER_LOGGER_FILE), fs.constants.F_OK);
|
|
@@ -612,6 +648,8 @@ export class Frontend extends EventEmitter {
|
|
|
612
648
|
});
|
|
613
649
|
this.expressApp.get('/api/shellydownloadsystemlog', async (req, res) => {
|
|
614
650
|
this.log.debug('The frontend sent /api/shellydownloadsystemlog');
|
|
651
|
+
if (!this.validateReq(req, res))
|
|
652
|
+
return;
|
|
615
653
|
const fs = await import('node:fs');
|
|
616
654
|
try {
|
|
617
655
|
await fs.promises.access(path.join(this.matterbridge.matterbridgeDirectory, 'shelly.log'), fs.constants.F_OK);
|
|
@@ -632,6 +670,8 @@ export class Frontend extends EventEmitter {
|
|
|
632
670
|
});
|
|
633
671
|
this.expressApp.get('/api/download-mbstorage', async (req, res) => {
|
|
634
672
|
this.log.debug('The frontend sent /api/download-mbstorage');
|
|
673
|
+
if (!this.validateReq(req, res))
|
|
674
|
+
return;
|
|
635
675
|
await createZip(path.join(os.tmpdir(), `matterbridge.${NODE_STORAGE_DIR}.zip`), path.join(this.matterbridge.matterbridgeDirectory, NODE_STORAGE_DIR));
|
|
636
676
|
res.download(path.join(os.tmpdir(), `matterbridge.${NODE_STORAGE_DIR}.zip`), `matterbridge.${NODE_STORAGE_DIR}.zip`, (error) => {
|
|
637
677
|
if (error) {
|
|
@@ -642,6 +682,8 @@ export class Frontend extends EventEmitter {
|
|
|
642
682
|
});
|
|
643
683
|
this.expressApp.get('/api/download-mjstorage', async (req, res) => {
|
|
644
684
|
this.log.debug('The frontend sent /api/download-mjstorage');
|
|
685
|
+
if (!this.validateReq(req, res))
|
|
686
|
+
return;
|
|
645
687
|
await createZip(path.join(os.tmpdir(), `matterbridge.${MATTER_STORAGE_NAME}.zip`), path.join(this.matterbridge.matterbridgeDirectory, MATTER_STORAGE_NAME));
|
|
646
688
|
res.download(path.join(os.tmpdir(), `matterbridge.${MATTER_STORAGE_NAME}.zip`), `matterbridge.${MATTER_STORAGE_NAME}.zip`, (error) => {
|
|
647
689
|
if (error) {
|
|
@@ -652,6 +694,8 @@ export class Frontend extends EventEmitter {
|
|
|
652
694
|
});
|
|
653
695
|
this.expressApp.get('/api/download-pluginstorage', async (req, res) => {
|
|
654
696
|
this.log.debug('The frontend sent /api/download-pluginstorage');
|
|
697
|
+
if (!this.validateReq(req, res))
|
|
698
|
+
return;
|
|
655
699
|
await createZip(path.join(os.tmpdir(), `matterbridge.pluginstorage.zip`), this.matterbridge.matterbridgePluginDirectory);
|
|
656
700
|
res.download(path.join(os.tmpdir(), `matterbridge.pluginstorage.zip`), `matterbridge.pluginstorage.zip`, (error) => {
|
|
657
701
|
if (error) {
|
|
@@ -662,6 +706,8 @@ export class Frontend extends EventEmitter {
|
|
|
662
706
|
});
|
|
663
707
|
this.expressApp.get('/api/download-pluginconfig', async (req, res) => {
|
|
664
708
|
this.log.debug('The frontend sent /api/download-pluginconfig');
|
|
709
|
+
if (!this.validateReq(req, res))
|
|
710
|
+
return;
|
|
665
711
|
await createZip(path.join(os.tmpdir(), `matterbridge.pluginconfig.zip`), path.relative(process.cwd(), path.join(this.matterbridge.matterbridgeDirectory, '*.config.json')));
|
|
666
712
|
res.download(path.join(os.tmpdir(), `matterbridge.pluginconfig.zip`), `matterbridge.pluginconfig.zip`, (error) => {
|
|
667
713
|
if (error) {
|
|
@@ -672,6 +718,8 @@ export class Frontend extends EventEmitter {
|
|
|
672
718
|
});
|
|
673
719
|
this.expressApp.get('/api/download-backup', async (req, res) => {
|
|
674
720
|
this.log.debug('The frontend sent /api/download-backup');
|
|
721
|
+
if (!this.validateReq(req, res))
|
|
722
|
+
return;
|
|
675
723
|
res.download(path.join(os.tmpdir(), `matterbridge.backup.zip`), `matterbridge.backup.zip`, (error) => {
|
|
676
724
|
if (error) {
|
|
677
725
|
this.log.error(`Error downloading file matterbridge.backup.zip: ${error instanceof Error ? error.message : error}`);
|
|
@@ -680,6 +728,8 @@ export class Frontend extends EventEmitter {
|
|
|
680
728
|
});
|
|
681
729
|
});
|
|
682
730
|
this.expressApp.post('/api/uploadpackage', upload.single('file'), async (req, res) => {
|
|
731
|
+
if (!this.validateReq(req, res))
|
|
732
|
+
return;
|
|
683
733
|
const { filename } = req.body;
|
|
684
734
|
const file = req.file;
|
|
685
735
|
if (!file || !filename) {
|
|
@@ -519,7 +519,7 @@ export async function startServerNode(name, port, deviceType = bridge.code) {
|
|
|
519
519
|
expect(aggregator.lifecycle.isPartsReady).toBeTruthy();
|
|
520
520
|
expect(aggregator.lifecycle.hasId).toBeTruthy();
|
|
521
521
|
expect(aggregator.lifecycle.hasNumber).toBeTruthy();
|
|
522
|
-
await flushAsync();
|
|
522
|
+
await flushAsync(3, 3, 10);
|
|
523
523
|
return [server, aggregator];
|
|
524
524
|
}
|
|
525
525
|
export async function stopServerNode(server) {
|
|
@@ -531,12 +531,7 @@ export async function stopServerNode(server) {
|
|
|
531
531
|
await server.close();
|
|
532
532
|
expect(server.lifecycle.isReady).toBeFalsy();
|
|
533
533
|
expect(server.lifecycle.isOnline).toBeFalsy();
|
|
534
|
-
|
|
535
|
-
if (mdns && typeof mdns[Symbol.asyncDispose] === 'function')
|
|
536
|
-
await mdns[Symbol.asyncDispose]();
|
|
537
|
-
if (mdns && typeof mdns.close === 'function')
|
|
538
|
-
await mdns.close();
|
|
539
|
-
await flushAsync();
|
|
534
|
+
await flushAsync(3, 3, 10);
|
|
540
535
|
}
|
|
541
536
|
export async function addDevice(owner, device, pause = 10) {
|
|
542
537
|
expect(owner).toBeDefined();
|
package/dist/matterbridge.js
CHANGED
|
@@ -1420,19 +1420,30 @@ export class Matterbridge extends EventEmitter {
|
|
|
1420
1420
|
this.log.debug(`- nodeLabel: ${await storageContext.get('nodeLabel')}`);
|
|
1421
1421
|
this.log.debug(`- serialNumber: ${await storageContext.get('serialNumber')}`);
|
|
1422
1422
|
this.log.debug(`- uniqueId: ${await storageContext.get('uniqueId')}`);
|
|
1423
|
-
this.log.debug(`- softwareVersion: ${await storageContext.get('softwareVersion')}
|
|
1424
|
-
this.log.debug(`-
|
|
1423
|
+
this.log.debug(`- softwareVersion: ${await storageContext.get('softwareVersion')}`);
|
|
1424
|
+
this.log.debug(`- softwareVersionString: ${await storageContext.get('softwareVersionString')}`);
|
|
1425
|
+
this.log.debug(`- hardwareVersion: ${await storageContext.get('hardwareVersion')}`);
|
|
1426
|
+
this.log.debug(`- hardwareVersionString: ${await storageContext.get('hardwareVersionString')}`);
|
|
1425
1427
|
return storageContext;
|
|
1426
1428
|
}
|
|
1427
1429
|
async createServerNode(storageContext, port = 5540, passcode = 20242025, discriminator = 3850) {
|
|
1428
1430
|
const storeId = await storageContext.get('storeId');
|
|
1429
1431
|
this.log.notice(`Creating server node for ${storeId} on port ${port} with passcode ${passcode} and discriminator ${discriminator}...`);
|
|
1432
|
+
this.log.debug(`- storeId: ${await storageContext.get('storeId')}`);
|
|
1430
1433
|
this.log.debug(`- deviceName: ${await storageContext.get('deviceName')}`);
|
|
1431
1434
|
this.log.debug(`- deviceType: ${await storageContext.get('deviceType')}(0x${(await storageContext.get('deviceType'))?.toString(16).padStart(4, '0')})`);
|
|
1435
|
+
this.log.debug(`- vendorId: ${await storageContext.get('vendorId')}`);
|
|
1436
|
+
this.log.debug(`- vendorName: ${await storageContext.get('vendorName')}`);
|
|
1437
|
+
this.log.debug(`- productId: ${await storageContext.get('productId')}`);
|
|
1438
|
+
this.log.debug(`- productName: ${await storageContext.get('productName')}`);
|
|
1439
|
+
this.log.debug(`- productLabel: ${await storageContext.get('productLabel')}`);
|
|
1440
|
+
this.log.debug(`- nodeLabel: ${await storageContext.get('nodeLabel')}`);
|
|
1432
1441
|
this.log.debug(`- serialNumber: ${await storageContext.get('serialNumber')}`);
|
|
1433
1442
|
this.log.debug(`- uniqueId: ${await storageContext.get('uniqueId')}`);
|
|
1434
|
-
this.log.debug(`- softwareVersion: ${await storageContext.get('softwareVersion')}
|
|
1435
|
-
this.log.debug(`-
|
|
1443
|
+
this.log.debug(`- softwareVersion: ${await storageContext.get('softwareVersion')}`);
|
|
1444
|
+
this.log.debug(`- softwareVersionString: ${await storageContext.get('softwareVersionString')}`);
|
|
1445
|
+
this.log.debug(`- hardwareVersion: ${await storageContext.get('hardwareVersion')}`);
|
|
1446
|
+
this.log.debug(`- hardwareVersionString: ${await storageContext.get('hardwareVersionString')}`);
|
|
1436
1447
|
const serverNode = await ServerNode.create({
|
|
1437
1448
|
id: storeId,
|
|
1438
1449
|
environment: this.environment,
|
|
@@ -277,7 +277,7 @@ export async function invokeSubscribeHandler(endpoint, cluster, attribute, newVa
|
|
|
277
277
|
endpoint.log.error(`invokeSubscribeHandler ${hk}${event}${er} error: cluster ${behaviorId} not found on endpoint ${or}${endpoint.id}${er}:${or}${endpoint.number}${er}`);
|
|
278
278
|
return false;
|
|
279
279
|
}
|
|
280
|
-
await endpoint.act((agent) => agent[behaviorId].events[event].emit(newValue, oldValue, { ...agent.context, offline: false }));
|
|
280
|
+
await endpoint.act((agent) => agent[behaviorId].events[event].emit(newValue, oldValue, { ...agent.context, offline: false, fabric: 1 }));
|
|
281
281
|
return true;
|
|
282
282
|
}
|
|
283
283
|
export function addRequiredClusterServers(endpoint) {
|
package/dist/mb_mdns.js
CHANGED
|
@@ -18,6 +18,7 @@ Options:
|
|
|
18
18
|
--advertise <interval> Enable matterbridge mDNS advertisement each ms (default interval: 10000ms).
|
|
19
19
|
--query <interval> Enable common mDNS services query each ms (default interval: 10000ms).
|
|
20
20
|
--filter <string...> Filter strings to match in the mDNS record name (default: no filter).
|
|
21
|
+
--ip-filter <string...> Filter strings to match in the mDNS sender ip address (default: no filter).
|
|
21
22
|
--noIpv4 Disable IPv4 mDNS server (default: enabled).
|
|
22
23
|
--noIpv6 Disable IPv6 mDNS server (default: enabled).
|
|
23
24
|
--no-timeout Disable automatic timeout of 10 minutes. Reflector mode disables timeout automatically.
|
|
@@ -35,6 +36,9 @@ Examples:
|
|
|
35
36
|
# Listen for Matter commissioner and discovery service records on all interfaces
|
|
36
37
|
mb_mdns --filter _matterc._udp _matter._tcp
|
|
37
38
|
|
|
39
|
+
# Listen for Matter commissioner and discovery service records on all interfaces from specific ipv4 and ipv6 ips
|
|
40
|
+
mb_mdns --filter _matterc._udp _matter._tcp --ip-filter 192.168.69.20 fe80::1077:2e0d:2c91:aa90
|
|
41
|
+
|
|
38
42
|
# Query for mDNS devices every 10s on a specific interface
|
|
39
43
|
mb_mdns --interfaceName eth0 --query
|
|
40
44
|
|
|
@@ -162,6 +166,9 @@ Examples:
|
|
|
162
166
|
const filters = getStringArrayParameter('filter');
|
|
163
167
|
if (filters)
|
|
164
168
|
mdnsIpv4.filters.push(...filters);
|
|
169
|
+
const ipFilters = getStringArrayParameter('ip-filter');
|
|
170
|
+
if (ipFilters)
|
|
171
|
+
mdnsIpv4.ipFilters.push(...ipFilters);
|
|
165
172
|
mdnsIpv4.on('error', (err) => {
|
|
166
173
|
mdnsIpv4?.log.error(`mDNS udp4 Server error: ${err.message}\n${err.stack}`);
|
|
167
174
|
});
|
|
@@ -186,6 +193,9 @@ Examples:
|
|
|
186
193
|
const filters = getStringArrayParameter('filter');
|
|
187
194
|
if (filters)
|
|
188
195
|
mdnsIpv6.filters.push(...filters);
|
|
196
|
+
const ipFilters = getStringArrayParameter('ip-filter');
|
|
197
|
+
if (ipFilters)
|
|
198
|
+
mdnsIpv6.ipFilters.push(...ipFilters);
|
|
189
199
|
mdnsIpv6.on('error', (err) => {
|
|
190
200
|
mdnsIpv6?.log.error(`mDNS udp6 Server error: ${err.message}\n${err.stack}`);
|
|
191
201
|
});
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge",
|
|
3
|
-
"version": "3.5.1-dev-
|
|
3
|
+
"version": "3.5.1-dev-20260122-6461be3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "matterbridge",
|
|
9
|
-
"version": "3.5.1-dev-
|
|
9
|
+
"version": "3.5.1-dev-20260122-6461be3",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@matter/main": "0.16.
|
|
12
|
+
"@matter/main": "0.16.6",
|
|
13
13
|
"@matterbridge/dgram": "0.0.2",
|
|
14
14
|
"@matterbridge/jest-utils": "0.0.1",
|
|
15
15
|
"@matterbridge/utils": "0.0.1",
|
|
@@ -74,86 +74,86 @@
|
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
"node_modules/@matter/general": {
|
|
77
|
-
"version": "0.16.
|
|
78
|
-
"resolved": "https://registry.npmjs.org/@matter/general/-/general-0.16.
|
|
79
|
-
"integrity": "sha512-
|
|
77
|
+
"version": "0.16.6",
|
|
78
|
+
"resolved": "https://registry.npmjs.org/@matter/general/-/general-0.16.6.tgz",
|
|
79
|
+
"integrity": "sha512-MyMLj9MEk6e0J+qjFVxuNxySTy2RcjdtYog7d9xGrWWI1mszCiT61Q5/aE198z+v5+Lca8CX+GDfeoNIT6hdgw==",
|
|
80
80
|
"license": "Apache-2.0",
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"@noble/curves": "^2.0.1"
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
"node_modules/@matter/main": {
|
|
86
|
-
"version": "0.16.
|
|
87
|
-
"resolved": "https://registry.npmjs.org/@matter/main/-/main-0.16.
|
|
88
|
-
"integrity": "sha512-
|
|
86
|
+
"version": "0.16.6",
|
|
87
|
+
"resolved": "https://registry.npmjs.org/@matter/main/-/main-0.16.6.tgz",
|
|
88
|
+
"integrity": "sha512-QTShS4OVEXoDyjI7jeLx35EPNUho8V/RZu971aBoHU3ueIxj4/gPWecN5NBTsmEl2VaCKHnmNaT6z11lNgdIaA==",
|
|
89
89
|
"license": "Apache-2.0",
|
|
90
90
|
"dependencies": {
|
|
91
|
-
"@matter/general": "0.16.
|
|
92
|
-
"@matter/model": "0.16.
|
|
93
|
-
"@matter/node": "0.16.
|
|
94
|
-
"@matter/protocol": "0.16.
|
|
95
|
-
"@matter/types": "0.16.
|
|
91
|
+
"@matter/general": "0.16.6",
|
|
92
|
+
"@matter/model": "0.16.6",
|
|
93
|
+
"@matter/node": "0.16.6",
|
|
94
|
+
"@matter/protocol": "0.16.6",
|
|
95
|
+
"@matter/types": "0.16.6"
|
|
96
96
|
},
|
|
97
97
|
"optionalDependencies": {
|
|
98
|
-
"@matter/nodejs": "0.16.
|
|
98
|
+
"@matter/nodejs": "0.16.6"
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
101
|
"node_modules/@matter/model": {
|
|
102
|
-
"version": "0.16.
|
|
103
|
-
"resolved": "https://registry.npmjs.org/@matter/model/-/model-0.16.
|
|
104
|
-
"integrity": "sha512-
|
|
102
|
+
"version": "0.16.6",
|
|
103
|
+
"resolved": "https://registry.npmjs.org/@matter/model/-/model-0.16.6.tgz",
|
|
104
|
+
"integrity": "sha512-eTLer9EibjA87AKn1Kj/oQv3nabaWJ2Pns3bGCUbgVycgGkLELJQs8TiA2QqorGbH2upTFmYfyaVUoxtMtyHbA==",
|
|
105
105
|
"license": "Apache-2.0",
|
|
106
106
|
"dependencies": {
|
|
107
|
-
"@matter/general": "0.16.
|
|
107
|
+
"@matter/general": "0.16.6"
|
|
108
108
|
}
|
|
109
109
|
},
|
|
110
110
|
"node_modules/@matter/node": {
|
|
111
|
-
"version": "0.16.
|
|
112
|
-
"resolved": "https://registry.npmjs.org/@matter/node/-/node-0.16.
|
|
113
|
-
"integrity": "sha512-
|
|
111
|
+
"version": "0.16.6",
|
|
112
|
+
"resolved": "https://registry.npmjs.org/@matter/node/-/node-0.16.6.tgz",
|
|
113
|
+
"integrity": "sha512-gPmxxX9OG4QnAPHdQsSbs1B/gB5WIrCaTkjp/kqLKCYWuYtFbDQr+PXTWn7SdQZWY/aHZ9/e3xP4VeVd8sk4/A==",
|
|
114
114
|
"license": "Apache-2.0",
|
|
115
115
|
"dependencies": {
|
|
116
|
-
"@matter/general": "0.16.
|
|
117
|
-
"@matter/model": "0.16.
|
|
118
|
-
"@matter/protocol": "0.16.
|
|
119
|
-
"@matter/types": "0.16.
|
|
116
|
+
"@matter/general": "0.16.6",
|
|
117
|
+
"@matter/model": "0.16.6",
|
|
118
|
+
"@matter/protocol": "0.16.6",
|
|
119
|
+
"@matter/types": "0.16.6"
|
|
120
120
|
}
|
|
121
121
|
},
|
|
122
122
|
"node_modules/@matter/nodejs": {
|
|
123
|
-
"version": "0.16.
|
|
124
|
-
"resolved": "https://registry.npmjs.org/@matter/nodejs/-/nodejs-0.16.
|
|
125
|
-
"integrity": "sha512-
|
|
123
|
+
"version": "0.16.6",
|
|
124
|
+
"resolved": "https://registry.npmjs.org/@matter/nodejs/-/nodejs-0.16.6.tgz",
|
|
125
|
+
"integrity": "sha512-r4UgxNWEsOCan315Bne3k1n3KFExBW5k263wGsef6a1GViJdjAAx4IhO6GxXtPH+bPFsjYQO4N7AZ5BCR8Knqw==",
|
|
126
126
|
"license": "Apache-2.0",
|
|
127
127
|
"optional": true,
|
|
128
128
|
"dependencies": {
|
|
129
|
-
"@matter/general": "0.16.
|
|
130
|
-
"@matter/node": "0.16.
|
|
131
|
-
"@matter/protocol": "0.16.
|
|
132
|
-
"@matter/types": "0.16.
|
|
129
|
+
"@matter/general": "0.16.6",
|
|
130
|
+
"@matter/node": "0.16.6",
|
|
131
|
+
"@matter/protocol": "0.16.6",
|
|
132
|
+
"@matter/types": "0.16.6"
|
|
133
133
|
},
|
|
134
134
|
"engines": {
|
|
135
135
|
"node": ">=20.19.0 <22.0.0 || >=22.13.0"
|
|
136
136
|
}
|
|
137
137
|
},
|
|
138
138
|
"node_modules/@matter/protocol": {
|
|
139
|
-
"version": "0.16.
|
|
140
|
-
"resolved": "https://registry.npmjs.org/@matter/protocol/-/protocol-0.16.
|
|
141
|
-
"integrity": "sha512-
|
|
139
|
+
"version": "0.16.6",
|
|
140
|
+
"resolved": "https://registry.npmjs.org/@matter/protocol/-/protocol-0.16.6.tgz",
|
|
141
|
+
"integrity": "sha512-Mw5F+TZrlcrofsH84Jc1F2tldn0tLRFDVC9s5d1cwUh5196xlSyapuFGKA2TdDgjS7jSZvcMsOutSVUlVtpgqw==",
|
|
142
142
|
"license": "Apache-2.0",
|
|
143
143
|
"dependencies": {
|
|
144
|
-
"@matter/general": "0.16.
|
|
145
|
-
"@matter/model": "0.16.
|
|
146
|
-
"@matter/types": "0.16.
|
|
144
|
+
"@matter/general": "0.16.6",
|
|
145
|
+
"@matter/model": "0.16.6",
|
|
146
|
+
"@matter/types": "0.16.6"
|
|
147
147
|
}
|
|
148
148
|
},
|
|
149
149
|
"node_modules/@matter/types": {
|
|
150
|
-
"version": "0.16.
|
|
151
|
-
"resolved": "https://registry.npmjs.org/@matter/types/-/types-0.16.
|
|
152
|
-
"integrity": "sha512-
|
|
150
|
+
"version": "0.16.6",
|
|
151
|
+
"resolved": "https://registry.npmjs.org/@matter/types/-/types-0.16.6.tgz",
|
|
152
|
+
"integrity": "sha512-QUuFNJPKVj4pwudH1dX5UQx+WLGqUq2Gxg5ZMrOidWAl7jElucMJWEwMLVGDfL1vq6XXzGH5oxV2l+mVdcx2mQ==",
|
|
153
153
|
"license": "Apache-2.0",
|
|
154
154
|
"dependencies": {
|
|
155
|
-
"@matter/general": "0.16.
|
|
156
|
-
"@matter/model": "0.16.
|
|
155
|
+
"@matter/general": "0.16.6",
|
|
156
|
+
"@matter/model": "0.16.6"
|
|
157
157
|
}
|
|
158
158
|
},
|
|
159
159
|
"node_modules/@matterbridge/dgram": {
|
|
@@ -1279,9 +1279,9 @@
|
|
|
1279
1279
|
}
|
|
1280
1280
|
},
|
|
1281
1281
|
"node_modules/lodash": {
|
|
1282
|
-
"version": "4.17.
|
|
1283
|
-
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.
|
|
1284
|
-
"integrity": "sha512-
|
|
1282
|
+
"version": "4.17.23",
|
|
1283
|
+
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
|
|
1284
|
+
"integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
|
|
1285
1285
|
"license": "MIT"
|
|
1286
1286
|
},
|
|
1287
1287
|
"node_modules/lru-cache": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge",
|
|
3
|
-
"version": "3.5.1-dev-
|
|
3
|
+
"version": "3.5.1-dev-20260122-6461be3",
|
|
4
4
|
"description": "Matterbridge plugin manager for Matter",
|
|
5
5
|
"author": "https://github.com/Luligu",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
}
|
|
105
105
|
},
|
|
106
106
|
"dependencies": {
|
|
107
|
-
"@matter/main": "0.16.
|
|
107
|
+
"@matter/main": "0.16.6",
|
|
108
108
|
"@matterbridge/dgram": "0.0.2",
|
|
109
109
|
"@matterbridge/jest-utils": "0.0.1",
|
|
110
110
|
"@matterbridge/utils": "0.0.1",
|
|
@@ -118,12 +118,12 @@
|
|
|
118
118
|
"ws": "8.19.0"
|
|
119
119
|
},
|
|
120
120
|
"build": {
|
|
121
|
-
"sha": "
|
|
122
|
-
"sha7": "
|
|
123
|
-
"event": "
|
|
121
|
+
"sha": "6461be3ccab30eba315d06587206f5ca5dcdc344",
|
|
122
|
+
"sha7": "6461be3",
|
|
123
|
+
"event": "workflow_dispatch",
|
|
124
124
|
"workflow": "Daily Dev Publish to npm",
|
|
125
125
|
"type": "branch",
|
|
126
|
-
"name": "
|
|
126
|
+
"name": "dev",
|
|
127
127
|
"docker": "false"
|
|
128
128
|
}
|
|
129
129
|
}
|