matterbridge 3.1.4-dev-20250715-04049c4 → 3.1.4-dev-20250715-075e722
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 +1 -0
- package/README.md +18 -18
- package/dist/matterbridge.js +4 -4
- package/dist/utils/network.js +11 -13
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -16,6 +16,7 @@ If you like this project and find it useful, please consider giving it a star on
|
|
|
16
16
|
|
|
17
17
|
- [package]: Updated dependencies.
|
|
18
18
|
- [bin]: Updated matterbridge bin.
|
|
19
|
+
- [network]: Refactor network logging to improve clarity and update logging format.
|
|
19
20
|
|
|
20
21
|
### Fixed
|
|
21
22
|
|
package/README.md
CHANGED
|
@@ -86,19 +86,19 @@ Avoid using VLAN and firewall blocking the communications between the controller
|
|
|
86
86
|
|
|
87
87
|
Follow these steps to install Matterbridge:
|
|
88
88
|
|
|
89
|
-
```
|
|
89
|
+
```bash
|
|
90
90
|
npm install -g matterbridge --omit=dev
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
on Linux or macOS you may need the necessary permissions:
|
|
94
94
|
|
|
95
|
-
```
|
|
95
|
+
```bash
|
|
96
96
|
sudo npm install -g matterbridge --omit=dev
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
Test the installation with:
|
|
100
100
|
|
|
101
|
-
```
|
|
101
|
+
```bash
|
|
102
102
|
matterbridge
|
|
103
103
|
```
|
|
104
104
|
|
|
@@ -110,7 +110,7 @@ You can then change the bridge mode and other parameters from the frontend.
|
|
|
110
110
|
|
|
111
111
|
### mode bridge
|
|
112
112
|
|
|
113
|
-
```
|
|
113
|
+
```bash
|
|
114
114
|
matterbridge -bridge
|
|
115
115
|
```
|
|
116
116
|
|
|
@@ -120,7 +120,7 @@ Matterbridge only exposes itself, and you have to pair it scanning the QR code s
|
|
|
120
120
|
|
|
121
121
|
### mode childbridge
|
|
122
122
|
|
|
123
|
-
```
|
|
123
|
+
```bash
|
|
124
124
|
matterbridge -childbridge
|
|
125
125
|
```
|
|
126
126
|
|
|
@@ -130,7 +130,7 @@ Matterbridge exposes each registered plugins, and you have to pair each one by s
|
|
|
130
130
|
|
|
131
131
|
### Use matterbridge -help to see the command line syntax
|
|
132
132
|
|
|
133
|
-
```
|
|
133
|
+
```bash
|
|
134
134
|
matterbridge -help
|
|
135
135
|
```
|
|
136
136
|
|
|
@@ -142,7 +142,7 @@ You can change the default port by adding the frontend parameter when you run it
|
|
|
142
142
|
|
|
143
143
|
Here's how to specify a different port number:
|
|
144
144
|
|
|
145
|
-
```
|
|
145
|
+
```bash
|
|
146
146
|
matterbridge -frontend [port number]
|
|
147
147
|
```
|
|
148
148
|
|
|
@@ -394,15 +394,15 @@ To install i.e. https://github.com/Luligu/matterbridge-zigbee2mqtt
|
|
|
394
394
|
|
|
395
395
|
On windows:
|
|
396
396
|
|
|
397
|
-
```
|
|
397
|
+
```powershell
|
|
398
398
|
cd $HOME\Matterbridge
|
|
399
399
|
npm install -g matterbridge-zigbee2mqtt
|
|
400
400
|
matterbridge -add matterbridge-zigbee2mqtt
|
|
401
401
|
```
|
|
402
402
|
|
|
403
|
-
On linux:
|
|
403
|
+
On linux or macOS:
|
|
404
404
|
|
|
405
|
-
```
|
|
405
|
+
```bash
|
|
406
406
|
cd ~/Matterbridge
|
|
407
407
|
sudo npm install -g matterbridge-zigbee2mqtt
|
|
408
408
|
matterbridge -add matterbridge-zigbee2mqtt
|
|
@@ -410,43 +410,43 @@ matterbridge -add matterbridge-zigbee2mqtt
|
|
|
410
410
|
|
|
411
411
|
## How to add a plugin to Matterbridge from a terminal
|
|
412
412
|
|
|
413
|
-
```
|
|
413
|
+
```bash
|
|
414
414
|
matterbridge -add [plugin path or plugin name]
|
|
415
415
|
```
|
|
416
416
|
|
|
417
417
|
## How to remove a plugin from Matterbridge from a terminal
|
|
418
418
|
|
|
419
|
-
```
|
|
419
|
+
```bash
|
|
420
420
|
matterbridge -remove [plugin path or plugin name]
|
|
421
421
|
```
|
|
422
422
|
|
|
423
423
|
## How to disable a registered plugin from a terminal
|
|
424
424
|
|
|
425
|
-
```
|
|
425
|
+
```bash
|
|
426
426
|
matterbridge -disable [plugin path or plugin name]
|
|
427
427
|
```
|
|
428
428
|
|
|
429
429
|
## How to enable a registered plugin from a terminal
|
|
430
430
|
|
|
431
|
-
```
|
|
431
|
+
```bash
|
|
432
432
|
matterbridge -enable [plugin path or plugin name]
|
|
433
433
|
```
|
|
434
434
|
|
|
435
435
|
## How to remove the commissioning information for Matterbridge so you can pair it again (bridge mode). Shutdown Matterbridge before!
|
|
436
436
|
|
|
437
|
-
```
|
|
437
|
+
```bash
|
|
438
438
|
matterbridge -reset
|
|
439
439
|
```
|
|
440
440
|
|
|
441
441
|
## How to remove the commissioning information for a registered plugin so you can pair it again (childbridge mode). Shutdown Matterbridge before!
|
|
442
442
|
|
|
443
|
-
```
|
|
443
|
+
```bash
|
|
444
444
|
matterbridge -reset [plugin path or plugin name]
|
|
445
445
|
```
|
|
446
446
|
|
|
447
447
|
## How to factory reset Matterbridge. Shutdown Matterbridge before!
|
|
448
448
|
|
|
449
|
-
```
|
|
449
|
+
```bash
|
|
450
450
|
matterbridge -factoryreset
|
|
451
451
|
```
|
|
452
452
|
|
|
@@ -470,7 +470,7 @@ Place your own certificates in the `.matterbridge/cert` directory:
|
|
|
470
470
|
|
|
471
471
|
Add the **-ssl** parameter to the command line. If desired, you can also change the frontend port with **-frontend 443**.
|
|
472
472
|
|
|
473
|
-
```
|
|
473
|
+
```bash
|
|
474
474
|
matterbridge -ssl -frontend 443
|
|
475
475
|
```
|
|
476
476
|
|
package/dist/matterbridge.js
CHANGED
|
@@ -3,7 +3,7 @@ import path from 'node:path';
|
|
|
3
3
|
import { promises as fs } from 'node:fs';
|
|
4
4
|
import EventEmitter from 'node:events';
|
|
5
5
|
import { inspect } from 'node:util';
|
|
6
|
-
import { AnsiLogger, UNDERLINE, UNDERLINEOFF, db, debugStringify, BRIGHT, RESET, er, nf, rs, wr, RED, GREEN, zb, CYAN, nt } from 'node-ansi-logger';
|
|
6
|
+
import { AnsiLogger, UNDERLINE, UNDERLINEOFF, db, debugStringify, BRIGHT, RESET, er, nf, rs, wr, RED, GREEN, zb, CYAN, nt, BLUE } from 'node-ansi-logger';
|
|
7
7
|
import { NodeStorageManager } from 'node-persist-manager';
|
|
8
8
|
import { DeviceTypeId, Endpoint, Logger, LogLevel as MatterLogLevel, LogFormat as MatterLogFormat, VendorId, StorageService, Environment, ServerNode, UINT32_MAX, UINT16_MAX, Crypto, } from '@matter/main';
|
|
9
9
|
import { DeviceCommissioner, FabricAction, MdnsService, PaseClient } from '@matter/main/protocol';
|
|
@@ -406,9 +406,10 @@ export class Matterbridge extends EventEmitter {
|
|
|
406
406
|
const availableInterfaces = Object.keys(networkInterfaces);
|
|
407
407
|
for (const [ifaceName, ifaces] of availableAddresses) {
|
|
408
408
|
if (ifaces && ifaces.length > 0) {
|
|
409
|
-
this.log.debug(`Network interface
|
|
409
|
+
this.log.debug(`Network interface ${BLUE}${ifaceName}${db}:`);
|
|
410
410
|
ifaces.forEach((iface) => {
|
|
411
|
-
this.log.debug(`- ${CYAN}${iface.family}${db} address ${CYAN}${iface.address}${db} netmask ${CYAN}${iface.netmask}${db} mac ${CYAN}${iface.mac}${db}
|
|
411
|
+
this.log.debug(`- ${CYAN}${iface.family}${db} address ${CYAN}${iface.address}${db} netmask ${CYAN}${iface.netmask}${db} mac ${CYAN}${iface.mac}${db}` +
|
|
412
|
+
`${iface.scopeid ? ` scopeid ${CYAN}${iface.scopeid}${db}` : ''}${iface.cidr ? ` cidr ${CYAN}${iface.cidr}${db}` : ''} ${CYAN}${iface.internal ? 'internal' : 'external'}${db}`);
|
|
412
413
|
});
|
|
413
414
|
}
|
|
414
415
|
}
|
|
@@ -614,7 +615,6 @@ export class Matterbridge extends EventEmitter {
|
|
|
614
615
|
}
|
|
615
616
|
if (hasParameter('loginterfaces')) {
|
|
616
617
|
const { logInterfaces } = await import('./utils/network.js');
|
|
617
|
-
this.log.info(`${plg}Matterbridge${nf} network interfaces log`);
|
|
618
618
|
logInterfaces();
|
|
619
619
|
this.shutdown = true;
|
|
620
620
|
return;
|
package/dist/utils/network.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import os from 'node:os';
|
|
2
|
-
import { AnsiLogger,
|
|
2
|
+
import { AnsiLogger, BLUE, CYAN, nf } from 'node-ansi-logger';
|
|
3
3
|
export function getIpv4InterfaceAddress() {
|
|
4
4
|
let ipv4Address;
|
|
5
5
|
const networkInterfaces = os.networkInterfaces();
|
|
@@ -54,21 +54,19 @@ export function getMacAddress() {
|
|
|
54
54
|
}
|
|
55
55
|
return macAddress;
|
|
56
56
|
}
|
|
57
|
-
export function logInterfaces(
|
|
57
|
+
export function logInterfaces() {
|
|
58
58
|
const log = new AnsiLogger({ logName: 'MatterbridgeUtils', logTimestampFormat: 4, logLevel: "info" });
|
|
59
59
|
log.logLevel = "info";
|
|
60
60
|
log.logName = 'LogInterfaces';
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
if (debug)
|
|
71
|
-
log.info('Details:', detail);
|
|
61
|
+
log.info('Available Network Interfaces:');
|
|
62
|
+
const availableAddresses = Object.entries(os.networkInterfaces());
|
|
63
|
+
for (const [ifaceName, ifaces] of availableAddresses) {
|
|
64
|
+
if (ifaces && ifaces.length > 0) {
|
|
65
|
+
log.info(`Network interface ${BLUE}${ifaceName}${nf}:`);
|
|
66
|
+
ifaces.forEach((iface) => {
|
|
67
|
+
log.info(`- ${CYAN}${iface.family}${nf} address ${CYAN}${iface.address}${nf} netmask ${CYAN}${iface.netmask}${nf} mac ${CYAN}${iface.mac}${nf}` +
|
|
68
|
+
`${iface.scopeid ? ` scopeid ${CYAN}${iface.scopeid}${nf}` : ''}${iface.cidr ? ` cidr ${CYAN}${iface.cidr}${nf}` : ''} ${CYAN}${iface.internal ? 'internal' : 'external'}${nf}`);
|
|
69
|
+
});
|
|
72
70
|
}
|
|
73
71
|
}
|
|
74
72
|
}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "matterbridge",
|
|
3
|
-
"version": "3.1.4-dev-20250715-
|
|
3
|
+
"version": "3.1.4-dev-20250715-075e722",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "matterbridge",
|
|
9
|
-
"version": "3.1.4-dev-20250715-
|
|
9
|
+
"version": "3.1.4-dev-20250715-075e722",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@matter/main": "0.15.1",
|
package/package.json
CHANGED