matterbridge 1.5.7 → 1.5.8

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,31 @@ 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
+ ### New Apple firmware v. 18.0
12
+
13
+ Please read this: https://github.com/Luligu/matterbridge/discussions/135
14
+
15
+ ## [1.5.8] - 2024-09-21
16
+
17
+ ### Added
18
+
19
+ - [readme]: Added podman guidelines to the README.md
20
+ - [readme]: Added instructions for setting permanent journalctl settings in service mode to prevent journal to grow
21
+ - [readme]: Added instructions for removing sudo password for npm install in service mode
22
+ - [readme]: Refactor systemd instructions for Matterbridge service
23
+ - [readme]: Added link to install matterbridge like ha addon https://github.com/Luligu/matterbridge-home-assistant-addon
24
+
25
+ ### Changed
26
+
27
+ - [package]: Update matter-node.js to 0.10.5.
28
+ - [package]: Update matter-history to 1.1.15.
29
+ - [package]: Update dependencies.
30
+ - [matterbridge]: Reset session informations when the controllers are not connected.
31
+
32
+ <a href="https://www.buymeacoffee.com/luligugithub">
33
+ <img src="./yellow-button.png" alt="Buy me a coffee" width="120">
34
+ </a>
35
+
11
36
  ## [1.5.7] - 2024-09-17
12
37
 
13
38
  ### Added
@@ -0,0 +1,105 @@
1
+ # <img src="https://github.com/Luligu/matterbridge/blob/main/frontend/public/matterbridge%2064x64.png" alt="Matterbridge Logo" width="64px" height="64px">&nbsp;&nbsp;&nbsp;Matterbridge
2
+
3
+ [![npm version](https://img.shields.io/npm/v/matterbridge.svg)](https://www.npmjs.com/package/matterbridge)
4
+ [![npm downloads](https://img.shields.io/npm/dt/matterbridge.svg)](https://www.npmjs.com/package/matterbridge)
5
+ [![Docker Version](https://img.shields.io/docker/v/luligu/matterbridge?label=docker%20version&sort=semver)](https://hub.docker.com/r/luligu/matterbridge)
6
+ [![Docker Pulls](https://img.shields.io/docker/pulls/luligu/matterbridge.svg)](https://hub.docker.com/r/luligu/matterbridge)
7
+ ![Node.js CI](https://github.com/Luligu/matterbridge/actions/workflows/build.yml/badge.svg)
8
+
9
+ [![power by](https://img.shields.io/badge/powered%20by-matter--history-blue)](https://www.npmjs.com/package/matter-history)
10
+ [![power by](https://img.shields.io/badge/powered%20by-node--ansi--logger-blue)](https://www.npmjs.com/package/node-ansi-logger)
11
+ [![power by](https://img.shields.io/badge/powered%20by-node--persist--manager-blue)](https://www.npmjs.com/package/node-persist-manager)
12
+
13
+ ---
14
+
15
+ # Advanced configuration
16
+
17
+ ## Install Podman if it is not already installed
18
+
19
+ ```
20
+ cd ~
21
+ sudo apt update
22
+ sudo apt install podman -y
23
+ podman --version
24
+ ```
25
+
26
+ ## Run matterbridge with podman
27
+
28
+ The Matterbridge Docker image, which includes a manifest list for the linux/amd64, linux/arm64 and linux/arm/v7 architectures, is published on Docker Hub and can be used with podman.
29
+
30
+ Podman handles container restarts a little differently than Docker. The --restart always flag doesn’t work exactly the same. If you want the container to automatically restart when the system reboots or if it crashes, you can create a systemd unit for the Podman container.
31
+
32
+ ### First create the Matterbridge directories
33
+
34
+ This will create the required directories if they don't exist
35
+
36
+ ```
37
+ cd ~
38
+ mkdir -p ./Matterbridge
39
+ mkdir -p ./.matterbridge
40
+ sudo chown -R $USER:$USER ./Matterbridge ./.matterbridge
41
+ ```
42
+
43
+ You may need to adapt the script to your setup:
44
+ - ./Matterbridge is the position outside of the container of your matterbridge plugin directory (inside your home directory).
45
+ - ./.matterbridge is the position outside of the container of your matterbridge storage directory (inside your home directory).
46
+
47
+ ### Run the Podman container (root mode) and start it
48
+
49
+ The container must have full access to the host network (needed for matter mdns).
50
+
51
+ ```
52
+ podman run --name matterbridge \
53
+ -v ~/Matterbridge:/root/Matterbridge \
54
+ -v ~/.matterbridge:/root/.matterbridge \
55
+ --network host --restart always -d docker.io/luligu/matterbridge:latest
56
+ ```
57
+
58
+ You may need to adapt the script to your setup:
59
+ - ~/Matterbridge is the position outside of the container of your matterbridge plugin directory.
60
+ - ~/.matterbridge is the position outside of the container of your matterbridge storage directory.
61
+
62
+ ### Integrate the mattebridge podman container with systemd for automatic startup after reboots
63
+
64
+ ```
65
+ podman generate systemd --name matterbridge --files --new
66
+ sudo mv container-matterbridge.service /etc/systemd/system/
67
+ sudo systemctl enable container-matterbridge
68
+ sudo systemctl start container-matterbridge
69
+ ```
70
+
71
+ ### Start the Podman container
72
+
73
+ ```
74
+ podman start matterbridge
75
+ ```
76
+
77
+ ### Stop the Podman container
78
+
79
+ ```
80
+ podman stop matterbridge
81
+ ```
82
+
83
+ ### Restart the Podman container
84
+
85
+ ```
86
+ podman restart matterbridge
87
+ ```
88
+
89
+ ### Remove the Podman container
90
+
91
+ ```
92
+ podman rm matterbridge
93
+ ```
94
+
95
+ ### Shows the logs
96
+
97
+ ```
98
+ podman logs matterbridge
99
+ ```
100
+
101
+ ### Shows the logs real time (tail)
102
+
103
+ ```
104
+ podman logs --tail 1000 -f matterbridge
105
+ ```
package/README-SERVICE.md CHANGED
@@ -72,6 +72,18 @@ sudo systemctl stop matterbridge
72
72
  sudo systemctl status matterbridge.service
73
73
  ```
74
74
 
75
+ ### Enable Matterbridge to start automatically on boot
76
+
77
+ ```
78
+ sudo systemctl enable matterbridge.service
79
+ ```
80
+
81
+ ### Disable Matterbridge from starting automatically on boot
82
+
83
+ ```
84
+ sudo systemctl disable matterbridge.service
85
+ ```
86
+
75
87
  ### View the log of Matterbridge in real time (this will show the log with colors)
76
88
 
77
89
  ```
@@ -84,14 +96,44 @@ sudo journalctl -u matterbridge.service -f --output cat
84
96
  sudo journalctl --vacuum-time=3d
85
97
  ```
86
98
 
87
- ### Enable Matterbridge to start automatically on boot
99
+ If you want to make the setting permanent edit
100
+ ```
101
+ sudo nano /etc/systemd/journald.conf
102
+ ```
103
+ add
104
+ ```
105
+ SystemMaxUse=3d
106
+ ```
107
+ save it and run
108
+ ```
109
+ sudo systemctl restart systemd-journald
110
+ ```
111
+
112
+ ### Verify that with your distro you can run sudo npm install -g matterbridge without the password
113
+
114
+ Run the following command to verify if you can install Matterbridge globally without being prompted for a password:
88
115
 
89
116
  ```
90
- sudo systemctl enable matterbridge.service
117
+ sudo npm install -g matterbridge
91
118
  ```
119
+ If you are not prompted for a password, no further action is required.
92
120
 
93
- ### Disable Matterbridge from starting automatically on boot
121
+ If that is not the case open the sudoers file for editing using visudo
122
+ ```
123
+ sudo visudo
124
+ ```
125
+
126
+ add this line replacing USER with your user name (e.g. radxa ALL=(ALL) NOPASSWD: ALL)
94
127
 
95
128
  ```
96
- sudo systemctl disable matterbridge.service
129
+ <USER> ALL=(ALL) NOPASSWD: ALL
130
+ ```
131
+
132
+ or if you prefers to only give access to npm without password try (e.g. radxa ALL=(ALL) NOPASSWD: /usr/bin/npm)
133
+
134
+ ```
135
+ <USER> ALL=(ALL) NOPASSWD: /usr/bin/npm
97
136
  ```
137
+
138
+ save the file and restart the system.
139
+
package/README.md CHANGED
@@ -134,6 +134,10 @@ Config editor:
134
134
 
135
135
  [Advanced configurations](https://github.com/Luligu/matterbridge/blob/main/README-DOCKER.md)
136
136
 
137
+ ### Run matterbridge with podman
138
+
139
+ [Advanced configurations](https://github.com/Luligu/matterbridge/blob/main/README-PODMAN.md)
140
+
137
141
  ### Run matterbridge as an home assistant add-on with the official add-on
138
142
 
139
143
  [Advanced configurations](https://github.com/Luligu/matterbridge-home-assistant-addon)
@@ -40,7 +40,7 @@ export declare class Matterbridge extends EventEmitter {
40
40
  matterbridgeQrPairingCode: string | undefined;
41
41
  matterbridgeManualPairingCode: string | undefined;
42
42
  matterbridgeFabricInformations: SanitizedExposedFabricInformation[];
43
- matterbridgeSessionInformations: Map<string, SanitizedSessionInformation>;
43
+ matterbridgeSessionInformations: SanitizedSessionInformation[];
44
44
  matterbridgePaired: boolean;
45
45
  matterbridgeConnected: boolean;
46
46
  bridgeMode: 'bridge' | 'childbridge' | 'controller' | '';
@@ -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,yBAAyB,SAAM;IAC/B,yBAAyB,EAAE,MAAM,GAAG,SAAS,CAAa;IAC1D,6BAA6B,EAAE,MAAM,GAAG,SAAS,CAAa;IAC9D,8BAA8B,EAAE,iCAAiC,EAAE,CAAM;IAEzE,+BAA+B,2CAAkD;IACjF,kBAAkB,UAAS;IAC3B,qBAAqB,UAAS;IAC9B,UAAU,EAAE,QAAQ,GAAG,aAAa,GAAG,YAAY,GAAG,EAAE,CAAM;IAC9D,WAAW,EAAE,SAAS,GAAG,QAAQ,GAAG,EAAE,CAAM;IAC5C,OAAO,qBAA2B;IAElC,GAAG,EAAG,UAAU,CAAC;IACxB,OAAO,CAAC,qBAAqB,CAA4F;IACzH,OAAO,CAAC,gBAAgB,CAAsF;IAC9G,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,OAAO,CAAiB;IAChC,OAAO,CAAC,iBAAiB,CAA0B;IACnD,OAAO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KG;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"}
@@ -110,8 +110,7 @@ export class Matterbridge extends EventEmitter {
110
110
  matterbridgeQrPairingCode = undefined;
111
111
  matterbridgeManualPairingCode = undefined;
112
112
  matterbridgeFabricInformations = [];
113
- // public matterbridgeSessionInformations: SanitizedSessionInformation[] = [];
114
- matterbridgeSessionInformations = new Map();
113
+ matterbridgeSessionInformations = [];
115
114
  matterbridgePaired = false;
116
115
  matterbridgeConnected = false;
117
116
  bridgeMode = '';
@@ -2014,10 +2013,7 @@ export class Matterbridge extends EventEmitter {
2014
2013
  if (this.bridgeMode === 'bridge') {
2015
2014
  this.matterbridgePaired = true;
2016
2015
  this.matterbridgeConnected = true;
2017
- // this.matterbridgeSessionInformations = this.sanitizeSessionInformation(sessionInformations);
2018
- sessionInformations.forEach((session) => {
2019
- this.matterbridgeSessionInformations.set(session.name, this.sanitizeSessionInformation([session])[0]);
2020
- });
2016
+ this.matterbridgeSessionInformations = this.sanitizeSessionInformation(sessionInformations);
2021
2017
  }
2022
2018
  if (this.bridgeMode === 'childbridge') {
2023
2019
  const plugin = this.plugins.get(pluginName);
@@ -2027,35 +2023,17 @@ export class Matterbridge extends EventEmitter {
2027
2023
  plugin.sessionInformations = this.sanitizeSessionInformation(sessionInformations);
2028
2024
  }
2029
2025
  }
2030
- /*
2031
- setTimeout(() => {
2032
- // We just need to configure the plugins after the controllers are connected
2033
- if (this.bridgeMode === 'bridge') {
2034
- for (const plugin of this.plugins) {
2035
- if (!plugin.enabled || !plugin.loaded || !plugin.started || plugin.error) continue;
2036
- try {
2037
- this.configurePlugin(plugin); // No await do it asyncronously
2038
- } catch (error) {
2039
- plugin.error = true;
2040
- this.log.error(`Error configuring plugin ${plg}${plugin.name}${er}`, error);
2041
- }
2042
- }
2043
- }
2044
- if (this.bridgeMode === 'childbridge') {
2045
- for (const plugin of this.plugins) {
2046
- if (plugin.name === pluginName && plugin.loaded === true && plugin.started === true && plugin.configured !== true) {
2047
- try {
2048
- this.configurePlugin(plugin); // No await do it asyncronously
2049
- } catch (error) {
2050
- plugin.error = true;
2051
- this.log.error(`Error configuring plugin ${plg}${plugin.name}${er}`, error);
2052
- }
2053
- }
2026
+ }
2027
+ else {
2028
+ if (this.bridgeMode === 'bridge') {
2029
+ this.matterbridgeSessionInformations = [];
2030
+ }
2031
+ if (this.bridgeMode === 'childbridge') {
2032
+ const plugin = this.plugins.get(pluginName);
2033
+ if (plugin) {
2034
+ plugin.sessionInformations = [];
2054
2035
  }
2055
- }
2056
- // logEndpoint(commissioningServer.getRootEndpoint());
2057
- }, 2000);
2058
- */
2036
+ }
2059
2037
  }
2060
2038
  },
2061
2039
  commissioningChangedCallback: async (fabricIndex) => {
@@ -2067,8 +2045,7 @@ export class Matterbridge extends EventEmitter {
2067
2045
  if (pluginName === 'Matterbridge') {
2068
2046
  await this.matterbridgeContext?.clearAll();
2069
2047
  this.matterbridgeFabricInformations = [];
2070
- // this.matterbridgeSessionInformations = [];
2071
- this.matterbridgeSessionInformations.clear();
2048
+ this.matterbridgeSessionInformations = [];
2072
2049
  this.matterbridgePaired = false;
2073
2050
  this.matterbridgeConnected = false;
2074
2051
  }
@@ -2221,8 +2198,7 @@ export class Matterbridge extends EventEmitter {
2221
2198
  this.matterbridgeQrPairingCode = qrPairingCode;
2222
2199
  this.matterbridgeManualPairingCode = manualPairingCode;
2223
2200
  this.matterbridgeFabricInformations = [];
2224
- // this.matterbridgeSessionInformations = [];
2225
- this.matterbridgeSessionInformations.clear();
2201
+ this.matterbridgeSessionInformations = [];
2226
2202
  this.matterbridgePaired = false;
2227
2203
  this.matterbridgeConnected = false;
2228
2204
  }
@@ -2248,8 +2224,7 @@ export class Matterbridge extends EventEmitter {
2248
2224
  });
2249
2225
  if (pluginName === 'Matterbridge') {
2250
2226
  this.matterbridgeFabricInformations = this.sanitizeFabricInformations(fabricInfo);
2251
- // this.matterbridgeSessionInformations = [];
2252
- this.matterbridgeSessionInformations.clear();
2227
+ this.matterbridgeSessionInformations = [];
2253
2228
  this.matterbridgePaired = true;
2254
2229
  }
2255
2230
  if (pluginName !== 'Matterbridge') {
@@ -2288,27 +2263,29 @@ export class Matterbridge extends EventEmitter {
2288
2263
  * @returns An array of sanitized session information objects.
2289
2264
  */
2290
2265
  sanitizeSessionInformation(sessionInfo) {
2291
- return sessionInfo.map((info) => {
2266
+ return sessionInfo
2267
+ .filter((session) => session.isPeerActive)
2268
+ .map((session) => {
2292
2269
  return {
2293
- name: info.name,
2294
- nodeId: info.nodeId.toString(),
2295
- peerNodeId: info.peerNodeId.toString(),
2296
- fabric: info.fabric
2270
+ name: session.name,
2271
+ nodeId: session.nodeId.toString(),
2272
+ peerNodeId: session.peerNodeId.toString(),
2273
+ fabric: session.fabric
2297
2274
  ? {
2298
- fabricIndex: info.fabric.fabricIndex,
2299
- fabricId: info.fabric.fabricId.toString(),
2300
- nodeId: info.fabric.nodeId.toString(),
2301
- rootNodeId: info.fabric.rootNodeId.toString(),
2302
- rootVendorId: info.fabric.rootVendorId,
2303
- rootVendorName: this.getVendorIdName(info.fabric.rootVendorId),
2304
- label: info.fabric.label,
2275
+ fabricIndex: session.fabric.fabricIndex,
2276
+ fabricId: session.fabric.fabricId.toString(),
2277
+ nodeId: session.fabric.nodeId.toString(),
2278
+ rootNodeId: session.fabric.rootNodeId.toString(),
2279
+ rootVendorId: session.fabric.rootVendorId,
2280
+ rootVendorName: this.getVendorIdName(session.fabric.rootVendorId),
2281
+ label: session.fabric.label,
2305
2282
  }
2306
2283
  : undefined,
2307
- isPeerActive: info.isPeerActive,
2308
- secure: info.secure,
2309
- lastInteractionTimestamp: info.lastInteractionTimestamp?.toString(),
2310
- lastActiveTimestamp: info.lastActiveTimestamp?.toString(),
2311
- numberOfActiveSubscriptions: info.numberOfActiveSubscriptions,
2284
+ isPeerActive: session.isPeerActive,
2285
+ secure: session.secure,
2286
+ lastInteractionTimestamp: session.lastInteractionTimestamp?.toString(),
2287
+ lastActiveTimestamp: session.lastActiveTimestamp?.toString(),
2288
+ numberOfActiveSubscriptions: session.numberOfActiveSubscriptions,
2312
2289
  };
2313
2290
  });
2314
2291
  }