matterbridge 1.5.5 → 1.5.7

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 CHANGED
@@ -8,6 +8,40 @@ If you like this project and find it useful, please consider giving it a star on
8
8
 
9
9
  The Home Assistant Community Add-ons and plugins are not verified to work with Matterbridge. I strongly advise against using them. If you do use them and encounter an issue (which is likely because some do not meet the Matterbridge guidelines), please do not open an issue in the Matterbridge repository.
10
10
 
11
+ ## [1.5.7] - 2024-09-17
12
+
13
+ ### Added
14
+
15
+ - [matterbridge]: Added the [Official Matterbridge Home Assistant Add-on](https://github.com/Luligu/matterbridge-home-assistant-addon)
16
+
17
+ ### Changed
18
+
19
+ - [electricalSensor]: Refactor the getDefaultElectricalEnergyMeasurementClusterServer and getDefaultElectricalPowerMeasurementClusterServer
20
+ - [package]: Update matter-node.js to 0.10.3.
21
+ - [package]: Update matter-history to 1.1.14.
22
+ - [package]: Update dependencies.
23
+
24
+ <a href="https://www.buymeacoffee.com/luligugithub">
25
+ <img src="./yellow-button.png" alt="Buy me a coffee" width="120">
26
+ </a>
27
+
28
+ ## [1.5.6] - 2024-09-13
29
+
30
+ ### Added
31
+
32
+ - [matterbridge]: Updated to support ingress (will be released soon in the [Official Matterbridge Home Assistant Add-on](https://github.com/Luligu/matterbridge-home-assistant-addon)).
33
+ - [frontend]: Updated to support ingress.
34
+
35
+ ### Changed
36
+
37
+ - [package]: Updated typescript to 5.6.2.
38
+ - [package]: Updated express to 4.21.0.
39
+ - [package]: Updated dependencies.
40
+
41
+ <a href="https://www.buymeacoffee.com/luligugithub">
42
+ <img src="./yellow-button.png" alt="Buy me a coffee" width="120">
43
+ </a>
44
+
11
45
  ## [1.5.5] - 2024-09-09
12
46
 
13
47
  ### Changed
package/README-DEV.md CHANGED
@@ -19,36 +19,47 @@
19
19
  Matterbridge exports from:
20
20
 
21
21
  "matterbridge"
22
+
22
23
  - Matterbridge and all Matterbridge related classes.
23
24
  - All relevant matter-node.js or matter.js clusters, classes and functions.
24
25
 
25
26
  "matterbridge/cluster"
27
+
26
28
  - All clusters not present in matter.js or modified.
27
29
 
28
30
  "matterbridge/utils"
31
+
29
32
  - All general utils and colorUtils functions.
30
33
 
31
34
  "matterbridge/history"
35
+
32
36
  - MatterHistory class.
33
37
 
34
38
  "matterbridge/logger"
39
+
35
40
  - NodeAnsiLogger class.
36
41
 
37
42
  "matterbridge/storage"
43
+
38
44
  - NodeStorage classes.
39
45
 
40
- # **********
46
+ # ****\*\*****
47
+
41
48
  A plugin must never install or import from `matter-node.js` or `matter.js` directly, as this leads to a second instance of `matter.js`, causing instability and unpredictable errors such as "The only instance is Endpoint". Additionally, when Matterbridge updates the `matter.js` version, it should be consistent across all plugins.
42
- # **********
49
+
50
+ # ****\*\*****
51
+
43
52
  A plugin must never install Matterbridge (neither as dependencies nor as devDependencies). Matterbridge must be linked to the plugin:
53
+
44
54
  ```json
45
55
  "scripts": {
46
56
  '''
47
57
  "install": "node link-matterbridge-script.js",
48
58
  '''
49
- }
59
+ }
50
60
  ```
51
- # **********
61
+
62
+ # ****\*\*****
52
63
 
53
64
  In the next releases I will remove the duplicated exports so please update your plugins.
54
65
 
package/README-DOCKER.md CHANGED
@@ -28,6 +28,7 @@ mkdir -p ./Matterbridge
28
28
  mkdir -p ./.matterbridge
29
29
  sudo chown -R $USER:$USER ./Matterbridge ./.matterbridge
30
30
  ```
31
+
31
32
  You may need to adapt the script to your setup.
32
33
 
33
34
  ### Run the Docker container and start it
@@ -40,6 +41,7 @@ docker run --name matterbridge \
40
41
  -v ${HOME}/.matterbridge:/root/.matterbridge \
41
42
  --network host --restart always -d luligu/matterbridge:latest
42
43
  ```
44
+
43
45
  You may need to adapt the script to your setup.
44
46
 
45
47
  ### Run with docker compose
@@ -113,4 +115,3 @@ docker logs matterbridge
113
115
  ```
114
116
  docker logs --tail 1000 -f matterbridge
115
117
  ```
116
-
package/README-SERVICE.md CHANGED
@@ -25,7 +25,8 @@ sudo nano /etc/systemd/system/matterbridge.service
25
25
  Add the following to this file, replacing twice (!) USER with your user name (e.g. WorkingDirectory=/home/pi/Matterbridge and User=pi):
26
26
 
27
27
  You may need to adapt the configuration to your setup:
28
- - execStart on some linux distribution can also be ExecStart==/usr/bin/matterbridge -service
28
+
29
+ - execStart on some linux distribution can also be ExecStart==/usr/bin/matterbridge -service
29
30
 
30
31
  ```
31
32
  [Unit]
package/README.md CHANGED
@@ -63,10 +63,12 @@ sudo npm install -g matterbridge
63
63
  Test the installation with:
64
64
 
65
65
  ```
66
- matterbridge -bridge
66
+ matterbridge
67
67
  ```
68
68
 
69
- Now it is possible to open the frontend at the link provided in the log (e.g. http://MATTERBIDGE-IPV4-ADDRESS:8283)
69
+ Now it is possible to open the frontend at the link provided in the log (e.g. http://MATTERBIDGE-IPV4-ADDRESS:8283).
70
+
71
+ You can then change the bridge mode from the frontend.
70
72
 
71
73
  ## Usage
72
74
 
@@ -76,6 +78,8 @@ Now it is possible to open the frontend at the link provided in the log (e.g. ht
76
78
  matterbridge -bridge
77
79
  ```
78
80
 
81
+ This force Matterbridge to load in bridge mode.
82
+
79
83
  Matterbridge only exposes itself, and you have to pair it scanning the QR code shown in the frontend or in the console.
80
84
 
81
85
  ### mode childbridge
@@ -84,6 +88,8 @@ Matterbridge only exposes itself, and you have to pair it scanning the QR code s
84
88
  matterbridge -childbridge
85
89
  ```
86
90
 
91
+ This force Matterbridge to load in childbridge mode.
92
+
87
93
  Matterbridge exposes each registered plugins, and you have to pair each one by scanning the QR code shown in the frontend or in the console.
88
94
 
89
95
  ### Use matterbridge -help to see the command line syntax
@@ -101,11 +107,7 @@ You can change the default port by adding the frontend parameter when you run it
101
107
  Here's how to specify a different port number:
102
108
 
103
109
  ```
104
- matterbridge -bridge -frontend [port number]
105
- ```
106
-
107
- ```
108
- matterbridge -childbridge -frontend [port number]
110
+ matterbridge -frontend [port number]
109
111
  ```
110
112
 
111
113
  From the frontend you can do all operations in an easy way.
@@ -132,9 +134,13 @@ Config editor:
132
134
 
133
135
  [Advanced configurations](https://github.com/Luligu/matterbridge/blob/main/README-DOCKER.md)
134
136
 
135
- ### Home Assistant Community Add-ons
137
+ ### Run matterbridge as an home assistant add-on with the official add-on
138
+
139
+ [Advanced configurations](https://github.com/Luligu/matterbridge-home-assistant-addon)
140
+
141
+ ### Other Home Assistant Community Add-ons
136
142
 
137
- The Home Assistant Community Add-ons and plugins are not verified to work with Matterbridge. I strongly advise against using them. If you do use them and encounter an issue (which is likely because some do not meet the Matterbridge guidelines), please do not open an issue in the Matterbridge repository.
143
+ The other Home Assistant Community Add-ons and plugins are not verified to work with Matterbridge. I strongly advise against using them. If you do use them and encounter an issue (which is likely because some do not meet the Matterbridge guidelines), please do not open an issue in the Matterbridge repository.
138
144
 
139
145
  ## Development
140
146
 
@@ -168,8 +174,6 @@ Features:
168
174
  - If the device cover/roller component is not calibrated, a message is displayed.
169
175
  - A 10-minute timer checks if the device has reported within that time frame, and fetch un update.
170
176
 
171
-
172
-
173
177
  ### Zigbee2MQTT
174
178
 
175
179
  <a href="https://github.com/Luligu/matterbridge-zigbee2mqtt">
@@ -180,8 +184,6 @@ Matterbridge zigbee2mqtt is a matterbridge production-level plugin that expose a
180
184
 
181
185
  No hub or dedicated hardware needed.
182
186
 
183
-
184
-
185
187
  ### Somfy tahoma
186
188
 
187
189
  <a href="https://github.com/Luligu/matterbridge-somfy-tahoma">
@@ -190,7 +192,6 @@ No hub or dedicated hardware needed.
190
192
 
191
193
  Matterbridge Somfy Tahoma is a matterbridge production-level plugin that expose the Somfy Tahoma screen devices to Matter.
192
194
 
193
-
194
195
  ### Accessory platform example
195
196
 
196
197
  This an example of an accessory platform plugin.
@@ -206,6 +207,7 @@ An Accessory platform plugin only exposes one device.
206
207
  This an example of a dynamic platform plugin.
207
208
 
208
209
  It exposes:
210
+
209
211
  - a switch with onOff cluster
210
212
  - a light with onOff
211
213
  - a light with onOff and levelControl (dimmer)
@@ -339,10 +341,12 @@ So far is the only controller supporting some Matter 1.2 and 1.3 device type:
339
341
  - deviceEnergyManagement code 0x050d (Matter 1.3 with only DeviceEnergyManagementMode cluster)
340
342
 
341
343
  Electrical measurements:
344
+
342
345
  - electrical measurements from EveHistoryCluster (used in Matterbridge plugins)
343
346
  - electricalSensor code 0x0510 with clusters: ElectricalPowerMeasurement and ElectricalEnergyMeasurement (still in dev but fully working!)
344
347
 
345
348
  Other supported cluster:
349
+
346
350
  - ModeSelect
347
351
 
348
352
  ## Home Assistant issues (Matter Server for HA is still in Beta)
@@ -38,7 +38,7 @@ export declare class DeviceManager {
38
38
  remove(device: MatterbridgeDevice): boolean;
39
39
  clear(): void;
40
40
  array(): MatterbridgeDevice[];
41
- [Symbol.iterator](): IterableIterator<MatterbridgeDevice>;
41
+ [Symbol.iterator](): MapIterator<MatterbridgeDevice>;
42
42
  forEach(callback: (device: MatterbridgeDevice) => Promise<void>): Promise<void>;
43
43
  get logLevel(): LogLevel;
44
44
  set logLevel(logLevel: LogLevel);
@@ -1 +1 @@
1
- {"version":3,"file":"matterbridge.d.ts","sourceRoot":"","sources":["../src/matterbridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AASH,OAAO,YAAY,MAAM,QAAQ,CAAC;AAQlC,OAAO,EAAE,UAAU,EAAyK,MAAM,kBAAkB,CAAC;AAGrN,OAAO,EAAE,kBAAkB,EAAgC,MAAM,yBAAyB,CAAC;AAE3F,OAAO,EAAwB,uBAAuB,EAAsC,iCAAiC,EAAE,2BAA2B,EAAsB,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAkClO;;GAEG;AACH,qBAAa,YAAa,SAAQ,YAAY;IACrC,iBAAiB,EAAE,iBAAiB,CAezC;IAEK,uBAAuB,EAAE,uBAAuB,CAyBrD;IAEK,aAAa,SAAM;IACnB,aAAa,SAAM;IACnB,qBAAqB,SAAM;IAC3B,2BAA2B,SAAM;IACjC,sBAAsB,SAAM;IAC5B,mBAAmB,SAAM;IACzB,yBAA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AC,kBAAkB;IAmB1B;;;OAGG;YACW,iBAAiB;IAY/B;;OAEG;YACW,gBAAgB;IAc9B;;;;OAIG;YACW,sBAAsB;IA6CpC;;;;;;OAMG;YACW,wBAAwB;IA6LtC;;;;;;;;;;;;;;;;;OAiBG;YACW,gCAAgC;IA4B9C;;;;;;OAMG;YACW,gCAAgC;IAqC9C;;;;;;;OAOG;YACW,uBAAuB;IAyDrC;;;;;OAKG;IACH,OAAO,CAAC,0BAA0B;IAclC;;;;;OAKG;IACH,OAAO,CAAC,0BAA0B;IA0BlC;;;;;OAKG;IACH,OAAO,CAAC,kCAAkC;IAM1C;;;;OAIG;IACH,OAAO,CAAC,yBAAyB;IAWjC;;;;;OAKG;IACH,OAAO,CAAC,qBAAqB;IAM7B,OAAO,CAAC,eAAe,CAoCrB;IAEF;;;OAGG;YACW,wBAAwB;IAgCtC;;;;;OAKG;YACW,YAAY;IAqF1B;;;;;;;OAOG;IACH,OAAO,CAAC,cAAc;IAuCtB;;;;OAIG;IACG,kBAAkB,CAAC,IAAI,SAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IA0sBpD;;;;OAIG;IACH,OAAO,CAAC,wBAAwB;IAmDhC;;;;;OAKG;IACU,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,SAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAsEtG;;;;;OAKG;IACU,aAAa;IAa1B;;;;;OAKG;IACI,uBAAuB,IAAI,OAAO;CAI1C"}
@@ -263,7 +263,7 @@ export class Matterbridge extends EventEmitter {
263
263
  this.log.logLevel = await this.nodeContext.get('matterbridgeLogLevel', "info" /* LogLevel.INFO */);
264
264
  }
265
265
  MatterbridgeDevice.logLevel = this.log.logLevel;
266
- this.log.debug('Matterbridge is starting...');
266
+ this.log.notice('Matterbridge is starting...');
267
267
  this.log.debug(`Matterbridge logLevel: ${this.log.logLevel} fileLoger: ${this.matterbridgeInformation.fileLogger}.`);
268
268
  // Set matter.js logger level, format and logger (context: matterLogLevel)
269
269
  if (hasParameter('matterlogger')) {
@@ -2475,7 +2475,7 @@ export class Matterbridge extends EventEmitter {
2475
2475
  this.wssSendMessage('spawn', this.log.now(), 'Matterbridge:spawn', `child process closed with code ${code} and signal ${signal}`);
2476
2476
  if (code === 0) {
2477
2477
  if (cmdLine.startsWith('npm install -g'))
2478
- this.log.notice(`${cmdLine.replace('npm install -g ', '').replace('--verbose', '')} installed correctly`);
2478
+ this.log.notice(`Package ${cmdLine.replace('npm install -g ', '').replace('--verbose', '')} installed correctly`);
2479
2479
  this.log.debug(`Child process "${cmdLine}" closed with code ${code} and signal ${signal}`);
2480
2480
  resolve();
2481
2481
  }
@@ -2502,14 +2502,14 @@ export class Matterbridge extends EventEmitter {
2502
2502
  if (childProcess.stdout) {
2503
2503
  childProcess.stdout.on('data', (data) => {
2504
2504
  const message = data.toString().trim();
2505
- this.log.debug(`Spawn stdout: ${message}`);
2505
+ this.log.debug(`Spawn output (stdout): ${message}`);
2506
2506
  this.wssSendMessage('spawn', this.log.now(), 'Matterbridge:spawn', message);
2507
2507
  });
2508
2508
  }
2509
2509
  if (childProcess.stderr) {
2510
2510
  childProcess.stderr.on('data', (data) => {
2511
2511
  const message = data.toString().trim();
2512
- this.log.debug(`Spawn stderr: ${message}`);
2512
+ this.log.debug(`Spawn verbose (stderr): ${message}`);
2513
2513
  this.wssSendMessage('spawn', this.log.now(), 'Matterbridge:spawn', message);
2514
2514
  });
2515
2515
  }
@@ -2570,17 +2570,34 @@ export class Matterbridge extends EventEmitter {
2570
2570
  this.log.debug(`Initializing the frontend ${hasParameter('ssl') ? 'https' : 'http'} server on port ${YELLOW}${port}${db}`);
2571
2571
  // Create the express app that serves the frontend
2572
2572
  this.expressApp = express();
2573
+ // Log all requests to the server for debugging
2574
+ /*
2575
+ if (hasParameter('homedir')) {
2576
+ this.expressApp.use((req, res, next) => {
2577
+ this.log.debug(`Received request on expressApp: ${req.method} ${req.url}`);
2578
+ next();
2579
+ });
2580
+ }
2581
+ */
2582
+ // Serve static files from '/static' endpoint
2573
2583
  this.expressApp.use(express.static(path.join(this.rootDirectory, 'frontend/build')));
2574
2584
  if (!hasParameter('ssl')) {
2575
2585
  // Create an HTTP server and attach the express app
2576
2586
  this.httpServer = createServer(this.expressApp);
2577
2587
  // Listen on the specified port
2578
- this.httpServer.listen(port, () => {
2579
- if (this.systemInformation.ipv4Address !== '')
2580
- this.log.info(`The frontend http server is listening on ${UNDERLINE}http://${this.systemInformation.ipv4Address}:${port}${UNDERLINEOFF}${rs}`);
2581
- if (this.systemInformation.ipv6Address !== '')
2582
- this.log.info(`The frontend http server is listening on ${UNDERLINE}http://[${this.systemInformation.ipv6Address}]:${port}${UNDERLINEOFF}${rs}`);
2583
- });
2588
+ if (hasParameter('ingress')) {
2589
+ this.httpServer.listen(port, '0.0.0.0', () => {
2590
+ this.log.info(`The frontend http server is listening on ${UNDERLINE}http://0.0.0.0:${port}${UNDERLINEOFF}${rs}`);
2591
+ });
2592
+ }
2593
+ else {
2594
+ this.httpServer.listen(port, () => {
2595
+ if (this.systemInformation.ipv4Address !== '')
2596
+ this.log.info(`The frontend http server is listening on ${UNDERLINE}http://${this.systemInformation.ipv4Address}:${port}${UNDERLINEOFF}${rs}`);
2597
+ if (this.systemInformation.ipv6Address !== '')
2598
+ this.log.info(`The frontend http server is listening on ${UNDERLINE}http://[${this.systemInformation.ipv6Address}]:${port}${UNDERLINEOFF}${rs}`);
2599
+ });
2600
+ }
2584
2601
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2585
2602
  this.httpServer.on('error', (error) => {
2586
2603
  this.log.error(`Frontend http server error listening on ${port}`);
@@ -2628,12 +2645,19 @@ export class Matterbridge extends EventEmitter {
2628
2645
  // Create an HTTPS server with the SSL certificate and private key (ca is optional) and attach the express app
2629
2646
  this.httpsServer = https.createServer(serverOptions, this.expressApp);
2630
2647
  // Listen on the specified port
2631
- this.httpsServer.listen(port, () => {
2632
- if (this.systemInformation.ipv4Address !== '')
2633
- this.log.info(`The frontend https server is listening on ${UNDERLINE}https://${this.systemInformation.ipv4Address}:${port}${UNDERLINEOFF}${rs}`);
2634
- if (this.systemInformation.ipv6Address !== '')
2635
- this.log.info(`The frontend https server is listening on ${UNDERLINE}https://[${this.systemInformation.ipv6Address}]:${port}${UNDERLINEOFF}${rs}`);
2636
- });
2648
+ if (hasParameter('ingress')) {
2649
+ this.httpsServer.listen(port, '0.0.0.0', () => {
2650
+ this.log.info(`The frontend https server is listening on ${UNDERLINE}https://0.0.0.0:${port}${UNDERLINEOFF}${rs}`);
2651
+ });
2652
+ }
2653
+ else {
2654
+ this.httpsServer.listen(port, () => {
2655
+ if (this.systemInformation.ipv4Address !== '')
2656
+ this.log.info(`The frontend https server is listening on ${UNDERLINE}https://${this.systemInformation.ipv4Address}:${port}${UNDERLINEOFF}${rs}`);
2657
+ if (this.systemInformation.ipv6Address !== '')
2658
+ this.log.info(`The frontend https server is listening on ${UNDERLINE}https://[${this.systemInformation.ipv6Address}]:${port}${UNDERLINEOFF}${rs}`);
2659
+ });
2660
+ }
2637
2661
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2638
2662
  this.httpsServer.on('error', (error) => {
2639
2663
  this.log.error(`Frontend https server error listening on ${port}`);
@@ -2658,9 +2682,7 @@ export class Matterbridge extends EventEmitter {
2658
2682
  this.webSocketServer.on('connection', (ws, request) => {
2659
2683
  const clientIp = request.socket.remoteAddress;
2660
2684
  AnsiLogger.setGlobalCallback(this.wssSendMessage.bind(this), "debug" /* LogLevel.DEBUG */);
2661
- this.log.debug('WebSocketServer logger global callback added');
2662
2685
  this.log.info(`WebSocketServer client "${clientIp}" connected to Matterbridge`);
2663
- // this.wssSendMessage('info', this.log.now(), 'Matterbridge', `WebSocketServer client "${clientIp}" connected to Matterbridge`);
2664
2686
  ws.on('message', (message) => {
2665
2687
  this.log.debug(`WebSocket client message: ${message}`);
2666
2688
  });