matterbridge 1.5.7 → 1.5.9
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 +48 -0
- package/README-DOCKER.md +11 -2
- package/README-PODMAN.md +105 -0
- package/README-SERVICE.md +59 -4
- package/README.md +4 -0
- package/dist/defaultConfigSchema.d.ts.map +1 -1
- package/dist/defaultConfigSchema.js +9 -3
- package/dist/defaultConfigSchema.js.map +1 -1
- package/dist/matterbridge.d.ts +1 -1
- package/dist/matterbridge.d.ts.map +1 -1
- package/dist/matterbridge.js +34 -57
- package/dist/matterbridge.js.map +1 -1
- package/frontend/build/asset-manifest.json +3 -3
- package/frontend/build/index.html +1 -1
- package/frontend/build/static/js/{main.af741b33.js → main.96d6324b.js} +3 -3
- package/frontend/build/static/js/main.96d6324b.js.map +1 -0
- package/npm-shrinkwrap.json +65 -606
- package/package.json +7 -7
- package/frontend/build/static/js/main.af741b33.js.map +0 -1
- /package/frontend/build/static/js/{main.af741b33.js.LICENSE.txt → main.96d6324b.js.LICENSE.txt} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,54 @@ If you like this project and find it useful, please consider giving it a star on
|
|
|
7
7
|
### Home Assistant Community Add-ons
|
|
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
|
+
If you want to run Matterbridge in Home Assistant please use the official add-on https://github.com/Luligu/matterbridge-home-assistant-addon.
|
|
11
|
+
|
|
12
|
+
### New Apple firmware v. 18.0
|
|
13
|
+
|
|
14
|
+
Please read this: https://github.com/Luligu/matterbridge/discussions/135
|
|
15
|
+
|
|
16
|
+
### Discord
|
|
17
|
+
|
|
18
|
+
Tamer (https://github.com/tammeryousef1006) has created the Matterbridge Discord group: https://discord.gg/raWywpD4.
|
|
19
|
+
|
|
20
|
+
Feel free to join!
|
|
21
|
+
|
|
22
|
+
## [1.5.9] - 2024-09-23
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- [ingress]: Fixed download routes with Ingress from the ha addon. The add-on https://github.com/Luligu/matterbridge-home-assistant-addon has been updated to v. 1.0.4.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- [package]: Update matter-node.js to 0.10.6.
|
|
31
|
+
- [package]: Update matter-history to 1.1.16.
|
|
32
|
+
- [package]: Update dependencies.
|
|
33
|
+
|
|
34
|
+
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
35
|
+
<img src="./yellow-button.png" alt="Buy me a coffee" width="120">
|
|
36
|
+
</a>
|
|
37
|
+
|
|
38
|
+
## [1.5.8] - 2024-09-21
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- [readme]: Added podman guidelines to the README.md
|
|
43
|
+
- [readme]: Added instructions for setting permanent journalctl settings in service mode to prevent journal to grow
|
|
44
|
+
- [readme]: Added instructions for removing sudo password for npm install in service mode
|
|
45
|
+
- [readme]: Refactor systemd instructions for Matterbridge service
|
|
46
|
+
- [readme]: Added link to install matterbridge like ha addon https://github.com/Luligu/matterbridge-home-assistant-addon
|
|
47
|
+
|
|
48
|
+
### Changed
|
|
49
|
+
|
|
50
|
+
- [package]: Update matter-node.js to 0.10.5.
|
|
51
|
+
- [package]: Update matter-history to 1.1.15.
|
|
52
|
+
- [package]: Update dependencies.
|
|
53
|
+
- [matterbridge]: Reset session informations when the controllers are not connected.
|
|
54
|
+
|
|
55
|
+
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
56
|
+
<img src="./yellow-button.png" alt="Buy me a coffee" width="120">
|
|
57
|
+
</a>
|
|
10
58
|
|
|
11
59
|
## [1.5.7] - 2024-09-17
|
|
12
60
|
|
package/README-DOCKER.md
CHANGED
|
@@ -20,7 +20,7 @@ The Matterbridge Docker image, which includes a manifest list for the linux/amd6
|
|
|
20
20
|
|
|
21
21
|
### First create the Matterbridge directories
|
|
22
22
|
|
|
23
|
-
This will create the required directories if they don't exist
|
|
23
|
+
This will create the required directories in your home directory if they don't exist
|
|
24
24
|
|
|
25
25
|
```
|
|
26
26
|
cd ~
|
|
@@ -31,9 +31,18 @@ sudo chown -R $USER:$USER ./Matterbridge ./.matterbridge
|
|
|
31
31
|
|
|
32
32
|
You may need to adapt the script to your setup.
|
|
33
33
|
|
|
34
|
+
### Add your user to docker group
|
|
35
|
+
|
|
36
|
+
If you don't want to use sudo with docker commands, run this command:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
sudo groupadd docker
|
|
40
|
+
sudo usermod -aG docker $USER
|
|
41
|
+
```
|
|
42
|
+
|
|
34
43
|
### Run the Docker container and start it
|
|
35
44
|
|
|
36
|
-
The container
|
|
45
|
+
The container must have full access to the host network (needed for mdns).
|
|
37
46
|
|
|
38
47
|
```
|
|
39
48
|
docker run --name matterbridge \
|
package/README-PODMAN.md
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"> Matterbridge
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/matterbridge)
|
|
4
|
+
[](https://www.npmjs.com/package/matterbridge)
|
|
5
|
+
[](https://hub.docker.com/r/luligu/matterbridge)
|
|
6
|
+
[](https://hub.docker.com/r/luligu/matterbridge)
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/matter-history)
|
|
10
|
+
[](https://www.npmjs.com/package/node-ansi-logger)
|
|
11
|
+
[](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
|
@@ -16,6 +16,19 @@
|
|
|
16
16
|
|
|
17
17
|
## Run matterbridge as a daemon with systemctl (Linux only)
|
|
18
18
|
|
|
19
|
+
### First create the Matterbridge directories
|
|
20
|
+
|
|
21
|
+
This will create the required directories if they don't exist
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
cd ~
|
|
25
|
+
mkdir -p ./Matterbridge
|
|
26
|
+
mkdir -p ./.matterbridge
|
|
27
|
+
sudo chown -R $USER:$USER ./Matterbridge ./.matterbridge
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Then create a systemctl configuration file for Matterbridge
|
|
31
|
+
|
|
19
32
|
Create a systemctl configuration file for Matterbridge
|
|
20
33
|
|
|
21
34
|
```
|
|
@@ -72,6 +85,18 @@ sudo systemctl stop matterbridge
|
|
|
72
85
|
sudo systemctl status matterbridge.service
|
|
73
86
|
```
|
|
74
87
|
|
|
88
|
+
### Enable Matterbridge to start automatically on boot
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
sudo systemctl enable matterbridge.service
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Disable Matterbridge from starting automatically on boot
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
sudo systemctl disable matterbridge.service
|
|
98
|
+
```
|
|
99
|
+
|
|
75
100
|
### View the log of Matterbridge in real time (this will show the log with colors)
|
|
76
101
|
|
|
77
102
|
```
|
|
@@ -84,14 +109,44 @@ sudo journalctl -u matterbridge.service -f --output cat
|
|
|
84
109
|
sudo journalctl --vacuum-time=3d
|
|
85
110
|
```
|
|
86
111
|
|
|
87
|
-
|
|
112
|
+
If you want to make the setting permanent edit
|
|
113
|
+
```
|
|
114
|
+
sudo nano /etc/systemd/journald.conf
|
|
115
|
+
```
|
|
116
|
+
add
|
|
117
|
+
```
|
|
118
|
+
SystemMaxUse=3d
|
|
119
|
+
```
|
|
120
|
+
save it and run
|
|
121
|
+
```
|
|
122
|
+
sudo systemctl restart systemd-journald
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Verify that with your distro you can run sudo npm install -g matterbridge without the password
|
|
126
|
+
|
|
127
|
+
Run the following command to verify if you can install Matterbridge globally without being prompted for a password:
|
|
88
128
|
|
|
89
129
|
```
|
|
90
|
-
sudo
|
|
130
|
+
sudo npm install -g matterbridge
|
|
91
131
|
```
|
|
132
|
+
If you are not prompted for a password, no further action is required.
|
|
92
133
|
|
|
93
|
-
|
|
134
|
+
If that is not the case, open the sudoers file for editing using visudo
|
|
135
|
+
```
|
|
136
|
+
sudo visudo
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
add this line replacing USER with your user name (e.g. radxa ALL=(ALL) NOPASSWD: ALL)
|
|
94
140
|
|
|
95
141
|
```
|
|
96
|
-
|
|
142
|
+
<USER> ALL=(ALL) NOPASSWD: ALL
|
|
97
143
|
```
|
|
144
|
+
|
|
145
|
+
or if you prefers to only give access to npm without password try (e.g. radxa ALL=(ALL) NOPASSWD: /usr/bin/npm)
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
<USER> ALL=(ALL) NOPASSWD: /usr/bin/npm
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
save the file and restart the system.
|
|
152
|
+
|
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)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultConfigSchema.d.ts","sourceRoot":"","sources":["../src/defaultConfigSchema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,eAAO,MAAM,kBAAkB,EAAE,cAiBhC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,cAWhC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"defaultConfigSchema.d.ts","sourceRoot":"","sources":["../src/defaultConfigSchema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,eAAO,MAAM,kBAAkB,EAAE,cAiBhC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,cAWhC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,cAwB3B,CAAC"}
|
|
@@ -56,8 +56,9 @@ export const shelly_config = {
|
|
|
56
56
|
username: '',
|
|
57
57
|
password: '',
|
|
58
58
|
exposeSwitch: 'switch',
|
|
59
|
-
exposeInput: '
|
|
60
|
-
|
|
59
|
+
exposeInput: 'momentary',
|
|
60
|
+
exposeInputEvent: 'momentary',
|
|
61
|
+
exposePowerMeter: 'disabled',
|
|
61
62
|
blackList: [],
|
|
62
63
|
whiteList: [],
|
|
63
64
|
deviceIp: {},
|
|
@@ -65,8 +66,13 @@ export const shelly_config = {
|
|
|
65
66
|
enableStorageDiscover: true,
|
|
66
67
|
resetStorageDiscover: false,
|
|
67
68
|
enableConfigDiscover: false,
|
|
68
|
-
enableBleDiscover:
|
|
69
|
+
enableBleDiscover: true,
|
|
70
|
+
failsafeCount: 0,
|
|
71
|
+
postfix: '',
|
|
69
72
|
debug: false,
|
|
73
|
+
debugMdns: false,
|
|
74
|
+
debugCoap: false,
|
|
75
|
+
debugWs: false,
|
|
70
76
|
unregisterOnShutdown: false,
|
|
71
77
|
};
|
|
72
78
|
//# sourceMappingURL=defaultConfigSchema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultConfigSchema.js","sourceRoot":"","sources":["../src/defaultConfigSchema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,MAAM,CAAC,MAAM,kBAAkB,GAAmB;IAChD,IAAI,EAAE,0BAA0B;IAChC,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,EAAE;IACZ,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,EAAE;IACb,SAAS,EAAE,EAAE;IACb,UAAU,EAAE,EAAE;IACd,SAAS,EAAE,EAAE;I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,GAAmB;IAChD,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,iBAAiB;IACvB,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,EAAE;IACZ,OAAO,EAAE,cAAc;IACvB,SAAS,EAAE,EAAE;IACb,SAAS,EAAE,EAAE;IACb,gBAAgB,EAAE,EAAE;IACpB,KAAK,EAAE,KAAK;IACZ,oBAAoB,EAAE,KAAK;CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAmB;IAC3C,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE,iBAAiB;IACvB,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,EAAE;IACZ,YAAY,EAAE,QAAQ;IACtB,WAAW,EAAE,WAAW;IACxB,gBAAgB,EAAE,WAAW;IAC7B,gBAAgB,EAAE,UAAU;IAC5B,SAAS,EAAE,EAAE;IACb,SAAS,EAAE,EAAE;IACb,QAAQ,EAAE,EAAE;IACZ,kBAAkB,EAAE,IAAI;IACxB,qBAAqB,EAAE,IAAI;IAC3B,oBAAoB,EAAE,KAAK;IAC3B,oBAAoB,EAAE,KAAK;IAC3B,iBAAiB,EAAE,IAAI;IACvB,aAAa,EAAE,CAAC;IAChB,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,KAAK;IACZ,SAAS,EAAE,KAAK;IAChB,SAAS,EAAE,KAAK;IAChB,OAAO,EAAE,KAAK;IACd,oBAAoB,EAAE,KAAK;CAC5B,CAAC"}
|
package/dist/matterbridge.d.ts
CHANGED
|
@@ -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:
|
|
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;
|
|
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,Y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C;;;;;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"}
|
package/dist/matterbridge.js
CHANGED
|
@@ -110,8 +110,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
110
110
|
matterbridgeQrPairingCode = undefined;
|
|
111
111
|
matterbridgeManualPairingCode = undefined;
|
|
112
112
|
matterbridgeFabricInformations = [];
|
|
113
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
2266
|
+
return sessionInfo
|
|
2267
|
+
.filter((session) => session.isPeerActive)
|
|
2268
|
+
.map((session) => {
|
|
2292
2269
|
return {
|
|
2293
|
-
name:
|
|
2294
|
-
nodeId:
|
|
2295
|
-
peerNodeId:
|
|
2296
|
-
fabric:
|
|
2270
|
+
name: session.name,
|
|
2271
|
+
nodeId: session.nodeId.toString(),
|
|
2272
|
+
peerNodeId: session.peerNodeId.toString(),
|
|
2273
|
+
fabric: session.fabric
|
|
2297
2274
|
? {
|
|
2298
|
-
fabricIndex:
|
|
2299
|
-
fabricId:
|
|
2300
|
-
nodeId:
|
|
2301
|
-
rootNodeId:
|
|
2302
|
-
rootVendorId:
|
|
2303
|
-
rootVendorName: this.getVendorIdName(
|
|
2304
|
-
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:
|
|
2308
|
-
secure:
|
|
2309
|
-
lastInteractionTimestamp:
|
|
2310
|
-
lastActiveTimestamp:
|
|
2311
|
-
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
|
}
|