matterbridge 1.6.0 → 1.6.2
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 +53 -1
- package/README-DEV.md +0 -4
- package/README-NGINX.md +63 -0
- package/README.md +8 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +18 -8
- package/dist/cli.js.map +1 -1
- package/dist/defaultConfigSchema.d.ts +1 -1
- package/dist/defaultConfigSchema.js +1 -1
- package/dist/deviceManager.d.ts +2 -2
- package/dist/deviceManager.d.ts.map +1 -1
- package/dist/deviceManager.js +2 -2
- package/dist/deviceManager.js.map +1 -1
- package/dist/index.d.ts +10 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -11
- package/dist/index.js.map +1 -1
- package/dist/matter/export.d.ts +5 -0
- package/dist/matter/export.d.ts.map +1 -0
- package/dist/matter/export.js +5 -0
- package/dist/matter/export.js.map +1 -0
- package/dist/matterbridge.d.ts +32 -16
- package/dist/matterbridge.d.ts.map +1 -1
- package/dist/matterbridge.js +254 -115
- package/dist/matterbridge.js.map +1 -1
- package/dist/matterbridgeAccessoryPlatform.d.ts +1 -1
- package/dist/matterbridgeAccessoryPlatform.d.ts.map +1 -1
- package/dist/matterbridgeAccessoryPlatform.js +1 -1
- package/dist/matterbridgeAccessoryPlatform.js.map +1 -1
- package/dist/matterbridgeBehaviors.d.ts +1123 -0
- package/dist/matterbridgeBehaviors.d.ts.map +1 -0
- package/dist/matterbridgeBehaviors.js +281 -0
- package/dist/matterbridgeBehaviors.js.map +1 -0
- package/dist/matterbridgeDevice.d.ts +2069 -1511
- package/dist/matterbridgeDevice.d.ts.map +1 -1
- package/dist/matterbridgeDevice.js +192 -196
- package/dist/matterbridgeDevice.js.map +1 -1
- package/dist/matterbridgeDeviceTypes.d.ts +58 -0
- package/dist/matterbridgeDeviceTypes.d.ts.map +1 -0
- package/dist/matterbridgeDeviceTypes.js +308 -0
- package/dist/matterbridgeDeviceTypes.js.map +1 -0
- package/dist/matterbridgeDynamicPlatform.d.ts +1 -1
- package/dist/matterbridgeDynamicPlatform.d.ts.map +1 -1
- package/dist/matterbridgeDynamicPlatform.js +1 -1
- package/dist/matterbridgeDynamicPlatform.js.map +1 -1
- package/dist/matterbridgeEdge.d.ts +20 -21
- package/dist/matterbridgeEdge.d.ts.map +1 -1
- package/dist/matterbridgeEdge.js +506 -103
- package/dist/matterbridgeEdge.js.map +1 -1
- package/dist/matterbridgeEndpoint.d.ts +3545 -2336
- package/dist/matterbridgeEndpoint.d.ts.map +1 -1
- package/dist/matterbridgeEndpoint.js +672 -468
- package/dist/matterbridgeEndpoint.js.map +1 -1
- package/dist/matterbridgePlatform.d.ts +5 -4
- package/dist/matterbridgePlatform.d.ts.map +1 -1
- package/dist/matterbridgePlatform.js +11 -3
- package/dist/matterbridgePlatform.js.map +1 -1
- package/dist/matterbridgeTypes.d.ts +7 -8
- package/dist/matterbridgeTypes.d.ts.map +1 -1
- package/dist/matterbridgeTypes.js.map +1 -1
- package/dist/matterbridgeWebsocket.d.ts +1 -1
- package/dist/matterbridgeWebsocket.d.ts.map +1 -1
- package/dist/matterbridgeWebsocket.js +41 -3
- package/dist/matterbridgeWebsocket.js.map +1 -1
- package/dist/pluginManager.d.ts +1 -1
- package/dist/pluginManager.d.ts.map +1 -1
- package/dist/pluginManager.js +17 -8
- package/dist/pluginManager.js.map +1 -1
- package/dist/utils/colorUtils.d.ts +1 -1
- package/dist/utils/colorUtils.js +2 -2
- package/dist/utils/colorUtils.js.map +1 -1
- package/dist/utils/utils.d.ts +42 -1
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +105 -3
- package/dist/utils/utils.js.map +1 -1
- package/frontend/build/asset-manifest.json +62 -6
- package/frontend/build/index.html +1 -1
- package/frontend/build/static/css/main.823e08b6.css +2 -0
- package/frontend/build/static/css/main.823e08b6.css.map +1 -0
- package/frontend/build/static/js/main.a14c87e7.js +115 -0
- package/frontend/build/static/js/{main.045d08f7.js.LICENSE.txt → main.a14c87e7.js.LICENSE.txt} +3 -3
- package/frontend/build/static/js/main.a14c87e7.js.map +1 -0
- package/frontend/build/static/media/roboto-cyrillic-300-normal.1b79538ccd585c259996.woff2 +0 -0
- package/frontend/build/static/media/roboto-cyrillic-300-normal.5f077fd7b977d1715acf.woff +0 -0
- package/frontend/build/static/media/roboto-cyrillic-400-normal.5d2930082227d172f62c.woff +0 -0
- package/frontend/build/static/media/roboto-cyrillic-400-normal.a9e19870cf6c4b973427.woff2 +0 -0
- package/frontend/build/static/media/roboto-cyrillic-500-normal.0ae2428323939af5e1ad.woff2 +0 -0
- package/frontend/build/static/media/roboto-cyrillic-500-normal.dd7bc8a52c6c70c5a3f5.woff +0 -0
- package/frontend/build/static/media/roboto-cyrillic-700-normal.3f6e1548bd5175a8c342.woff +0 -0
- package/frontend/build/static/media/roboto-cyrillic-700-normal.4fdfc29a10e7d4b7c527.woff2 +0 -0
- package/frontend/build/static/media/roboto-cyrillic-ext-300-normal.795dbc8140e3fef82983.woff +0 -0
- package/frontend/build/static/media/roboto-cyrillic-ext-300-normal.80947a31d23c70204b47.woff2 +0 -0
- package/frontend/build/static/media/roboto-cyrillic-ext-400-normal.135d076fa32aa0b4d105.woff +0 -0
- package/frontend/build/static/media/roboto-cyrillic-ext-400-normal.5cec61a21cc20180fbe1.woff2 +0 -0
- package/frontend/build/static/media/roboto-cyrillic-ext-500-normal.6de16332fda843a3dc3d.woff2 +0 -0
- package/frontend/build/static/media/roboto-cyrillic-ext-500-normal.c0a0638f90b31d6454ba.woff +0 -0
- package/frontend/build/static/media/roboto-cyrillic-ext-700-normal.4750292c47fa2bc6ac1a.woff2 +0 -0
- package/frontend/build/static/media/roboto-cyrillic-ext-700-normal.ca247189fc12d00de361.woff +0 -0
- package/frontend/build/static/media/roboto-greek-300-normal.285f3e6261d8eb20417d.woff2 +0 -0
- package/frontend/build/static/media/roboto-greek-300-normal.889beddda1c9bd9f97df.woff +0 -0
- package/frontend/build/static/media/roboto-greek-400-normal.160a791a8e4f46bca3cc.woff +0 -0
- package/frontend/build/static/media/roboto-greek-400-normal.2c32b1315be61477013a.woff2 +0 -0
- package/frontend/build/static/media/roboto-greek-500-normal.60810e07c7b0273013aa.woff +0 -0
- package/frontend/build/static/media/roboto-greek-500-normal.f95e757c5483310f9c11.woff2 +0 -0
- package/frontend/build/static/media/roboto-greek-700-normal.77dd370f2001e184ba0d.woff2 +0 -0
- package/frontend/build/static/media/roboto-greek-700-normal.df87b053fae3d7ad5f7a.woff +0 -0
- package/frontend/build/static/media/roboto-greek-ext-300-normal.b590dbe5c639944366d1.woff +0 -0
- package/frontend/build/static/media/roboto-greek-ext-300-normal.d6049cb54aa6fbe14c42.woff2 +0 -0
- package/frontend/build/static/media/roboto-greek-ext-400-normal.16eb83b4a3b1ea994243.woff +0 -0
- package/frontend/build/static/media/roboto-greek-ext-400-normal.1df4abad55796d11a0c8.woff2 +0 -0
- package/frontend/build/static/media/roboto-greek-ext-500-normal.4a96ba31abcce0f5d52b.woff2 +0 -0
- package/frontend/build/static/media/roboto-greek-ext-500-normal.fd28d9c008bf3af1bed7.woff +0 -0
- package/frontend/build/static/media/roboto-greek-ext-700-normal.2dd6febad11502dec6a6.woff2 +0 -0
- package/frontend/build/static/media/roboto-greek-ext-700-normal.4abdc9fff4507f17d726.woff +0 -0
- package/frontend/build/static/media/roboto-latin-300-normal.b850f1ff581ea232fac9.woff2 +0 -0
- package/frontend/build/static/media/roboto-latin-300-normal.c4bc0593c9954d79cb3a.woff +0 -0
- package/frontend/build/static/media/roboto-latin-400-normal.047a7839f69b209db815.woff +0 -0
- package/frontend/build/static/media/roboto-latin-400-normal.297d48e1b5a10c0831a9.woff2 +0 -0
- package/frontend/build/static/media/roboto-latin-500-normal.68d40d6d01c6f85d24ba.woff +0 -0
- package/frontend/build/static/media/roboto-latin-500-normal.7077203b1982951ecf76.woff2 +0 -0
- package/frontend/build/static/media/roboto-latin-700-normal.4535474e1cf8598695ad.woff2 +0 -0
- package/frontend/build/static/media/roboto-latin-700-normal.9f6a16a7770c87b2042b.woff +0 -0
- package/frontend/build/static/media/roboto-latin-ext-300-normal.14982a9e4857a93b6dce.woff +0 -0
- package/frontend/build/static/media/roboto-latin-ext-300-normal.97cbc447d4a8d41a9543.woff2 +0 -0
- package/frontend/build/static/media/roboto-latin-ext-400-normal.27da5b36b6d3a16f53f4.woff +0 -0
- package/frontend/build/static/media/roboto-latin-ext-400-normal.2eeae187764baf05867d.woff2 +0 -0
- package/frontend/build/static/media/roboto-latin-ext-500-normal.06c30711d588145a4541.woff +0 -0
- package/frontend/build/static/media/roboto-latin-ext-500-normal.9a18d7bb9ff7a6af7b32.woff2 +0 -0
- package/frontend/build/static/media/roboto-latin-ext-700-normal.18841836e391d39e83a8.woff2 +0 -0
- package/frontend/build/static/media/roboto-latin-ext-700-normal.3c5bcdd0e69c4c3ffafe.woff +0 -0
- package/frontend/build/static/media/roboto-vietnamese-300-normal.c96b16e5c05c7b7c3e89.woff2 +0 -0
- package/frontend/build/static/media/roboto-vietnamese-300-normal.f5e7cea32756dfe7af40.woff +0 -0
- package/frontend/build/static/media/roboto-vietnamese-400-normal.0dc97c66f9b542d6fa17.woff +0 -0
- package/frontend/build/static/media/roboto-vietnamese-400-normal.d3f8e26d6c27de8102b6.woff2 +0 -0
- package/frontend/build/static/media/roboto-vietnamese-500-normal.090fabef926bdc0e9b9f.woff2 +0 -0
- package/frontend/build/static/media/roboto-vietnamese-500-normal.23b7b8a2524d2d4b637b.woff +0 -0
- package/frontend/build/static/media/roboto-vietnamese-700-normal.0a79a9fabfc32e33f360.woff2 +0 -0
- package/frontend/build/static/media/roboto-vietnamese-700-normal.35ed0597568ff6f19c16.woff +0 -0
- package/npm-shrinkwrap.json +120 -39
- package/package.json +8 -3
- package/dist/matterbridgeController.d.ts +0 -24
- package/dist/matterbridgeController.d.ts.map +0 -1
- package/dist/matterbridgeController.js +0 -386
- package/dist/matterbridgeController.js.map +0 -1
- package/frontend/build/static/css/main.1cf003ae.css +0 -2
- package/frontend/build/static/css/main.1cf003ae.css.map +0 -1
- package/frontend/build/static/js/main.045d08f7.js +0 -3
- package/frontend/build/static/js/main.045d08f7.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,7 +10,7 @@ The Home Assistant Community Add-ons and plugins are not verified to work with M
|
|
|
10
10
|
|
|
11
11
|
If you want to run Matterbridge in Home Assistant please use the official add-on https://github.com/Luligu/matterbridge-home-assistant-addon that also has Ingress and side panel.
|
|
12
12
|
|
|
13
|
-
### New Apple firmware v. 18.
|
|
13
|
+
### New Apple firmware v. 18.x
|
|
14
14
|
|
|
15
15
|
Please read this: https://github.com/Luligu/matterbridge/discussions/135
|
|
16
16
|
|
|
@@ -20,6 +20,58 @@ Tamer (https://github.com/tammeryousef1006) has created the Matterbridge Discord
|
|
|
20
20
|
|
|
21
21
|
Feel free to join (the link is now permanent)!
|
|
22
22
|
|
|
23
|
+
## [1.6.2] - 2024-11-25
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- [matter.js]: Almost completed the phase 2 of migration to edge (matter.js new API).
|
|
28
|
+
- [nginx]: Added the route /matterbridge/ to be used with nginx proxy server https://github.com/Luligu/matterbridge/blob/dev/README-NGINX.md.
|
|
29
|
+
- [config]: Config and schema are loaded before loading the plugin to allow to configure the plugin even when it throws error on load.
|
|
30
|
+
- [config]: Added version to the config.
|
|
31
|
+
- [frontend]: Added badge "edge" when running in edge mode.
|
|
32
|
+
- [matterbridge]: Added addTagList method.
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- [matter.js]: Update to matter.js 0.11.2.
|
|
37
|
+
- [matter.js]: Update to matter.js 0.11.3.
|
|
38
|
+
- [matter.js]: Update to matter.js 0.11.4.
|
|
39
|
+
- [matter.js]: Update to matter.js 0.11.5.
|
|
40
|
+
- [matter.js]: Update to the new matter.js packages @matter/main and @mater/nodejs.
|
|
41
|
+
- [PluginManager]: On first load the plugin type is AnyPlatform.
|
|
42
|
+
- [package]: Update dependencies.
|
|
43
|
+
- [frontend]: Update package dependencies.
|
|
44
|
+
- [frontend]: Update QRCode package and QRCode level to M.
|
|
45
|
+
- [frontend]: Added font roboto.
|
|
46
|
+
- [matterbridge]: Removed BasicInformationCluster from Aggregator.
|
|
47
|
+
- [matterbridge]: Added minLevel, maxLevel and onLevel to LevelControlCluster utility methods.
|
|
48
|
+
|
|
49
|
+
### Fixed
|
|
50
|
+
|
|
51
|
+
- [energySensor]: Fixed wrong types on ElectricalEnergyMeasurementCluster ElectricalPowerMeasurementCluster.
|
|
52
|
+
|
|
53
|
+
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
54
|
+
<img src="./yellow-button.png" alt="Buy me a coffee" width="120">
|
|
55
|
+
</a>
|
|
56
|
+
|
|
57
|
+
## [1.6.1] - 2024-11-02
|
|
58
|
+
|
|
59
|
+
### Added
|
|
60
|
+
|
|
61
|
+
- [matterbridge]: Added automatic recovery for matterbridge node storage when it gets corrupted for a power outage or hardware failure. Unattended setups can automatically recover restoring the previous automatic backup.
|
|
62
|
+
- [matterbridge]: Added automatic recovery for matter storage when it gets corrupted for a power outage or hardware failure. Unattended setups can automatically recover restoring the previous automatic backup.
|
|
63
|
+
- [matterbridge]: Added parameter "-norestore" to avoid to restore automatically. In this case you need to manually restore the storages from a full backup made from the frontend.
|
|
64
|
+
|
|
65
|
+
### Changed
|
|
66
|
+
|
|
67
|
+
- [loggers]: Logging on file keeps the logger level of the logger (matterbridge and matter logs).
|
|
68
|
+
- [matterbridge]: Added more api to WebSocket for the Matterbridge cockpit dashboard (Shelly gateway).
|
|
69
|
+
- [package]: Update dependencies.
|
|
70
|
+
|
|
71
|
+
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
72
|
+
<img src="./yellow-button.png" alt="Buy me a coffee" width="120">
|
|
73
|
+
</a>
|
|
74
|
+
|
|
23
75
|
## [1.6.0] - 2024-10-28
|
|
24
76
|
|
|
25
77
|
### Added
|
package/README-DEV.md
CHANGED
package/README-NGINX.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
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 to use NGINX
|
|
16
|
+
|
|
17
|
+
## Run matterbridge with nginx
|
|
18
|
+
|
|
19
|
+
### Create the nginx configuration file
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
sudo nano /etc/nginx/sites-available/matterbridge
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
paste this configuration and change the port to listen and the server_name using yours:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
server {
|
|
29
|
+
listen 8099;
|
|
30
|
+
server_name ubuntu.local;
|
|
31
|
+
|
|
32
|
+
location /matterbridge/ {
|
|
33
|
+
# Redirect to Matterbridge frontend
|
|
34
|
+
proxy_pass http://localhost:8283/;
|
|
35
|
+
proxy_set_header Host $host;
|
|
36
|
+
proxy_set_header X-Real-IP $remote_addr;
|
|
37
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
38
|
+
proxy_set_header X-Forwarded-Proto $scheme;
|
|
39
|
+
|
|
40
|
+
# WebSocket support
|
|
41
|
+
proxy_http_version 1.1;
|
|
42
|
+
proxy_set_header Upgrade $http_upgrade;
|
|
43
|
+
proxy_set_header Connection "upgrade";
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
add matterbridge to enabled sites
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
sudo ln -s /etc/nginx/sites-available/matterbridge /etc/nginx/sites-enabled/
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Restart nginx and test the configuration
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
sudo systemctl restart nginx
|
|
58
|
+
sudo nginx -t
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Use matterbridge with nginx
|
|
62
|
+
|
|
63
|
+
http://ubuntu.local:8099/matterbridge/
|
package/README.md
CHANGED
|
@@ -138,6 +138,10 @@ Config editor:
|
|
|
138
138
|
|
|
139
139
|
[Podman configurations](https://github.com/Luligu/matterbridge/blob/main/README-PODMAN.md)
|
|
140
140
|
|
|
141
|
+
### Run matterbridge with nginx
|
|
142
|
+
|
|
143
|
+
[Nginx configurations](https://github.com/Luligu/matterbridge/blob/main/README-NGINX.md)
|
|
144
|
+
|
|
141
145
|
### Run matterbridge as an home assistant add-on with the official add-on
|
|
142
146
|
|
|
143
147
|
[Home assistant add-on configurations](https://github.com/Luligu/matterbridge-home-assistant-addon)
|
|
@@ -380,6 +384,8 @@ The HomePods, being a WiFi devices, sometimes pruduce message trasmission errors
|
|
|
380
384
|
|
|
381
385
|
All issues have been solved from the version 17.5 of the HomePod/AppleTV. Now they are stable.
|
|
382
386
|
|
|
387
|
+
If you have more then one Apple TV or Home Pod, you can herve better results setting to disabled "Automatic Selection" in "Home Setting", "Home Hubs & Bridges". When "Automatic selection" is disabled, select your Apple Tv if you have one or any of your Home Pod. In this way you should not have anymore more then one session for fabric.
|
|
388
|
+
|
|
383
389
|
## Home Assistant
|
|
384
390
|
|
|
385
391
|
So far is the only controller supporting some Matter 1.2 and 1.3 device type:
|
|
@@ -409,6 +415,8 @@ Other supported cluster:
|
|
|
409
415
|
|
|
410
416
|
If you face a problem pairing to Google Home from Ios app the solution is there https://github.com/Luligu/matterbridge/issues/61.
|
|
411
417
|
|
|
418
|
+
If you face a problem changing the brightness check this for the explanation: https://github.com/Luligu/matterbridge-zigbee2mqtt/issues/80
|
|
419
|
+
|
|
412
420
|
No other issues reported so far.
|
|
413
421
|
|
|
414
422
|
## Alexa
|
package/dist/cli.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @date 2023-12-29
|
|
8
8
|
* @version 1.0.11
|
|
9
9
|
*
|
|
10
|
-
* Copyright 2023, 2024 Luca Liguori.
|
|
10
|
+
* Copyright 2023, 2024, 2025 Luca Liguori.
|
|
11
11
|
*
|
|
12
12
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
13
13
|
* you may not use this file except in compliance with the License.
|
package/dist/cli.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @date 2023-12-29
|
|
8
8
|
* @version 1.0.11
|
|
9
9
|
*
|
|
10
|
-
* Copyright 2023, 2024 Luca Liguori.
|
|
10
|
+
* Copyright 2023, 2024, 2025 Luca Liguori.
|
|
11
11
|
*
|
|
12
12
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
13
13
|
* you may not use this file except in compliance with the License.
|
|
@@ -22,19 +22,22 @@
|
|
|
22
22
|
* limitations under the License. *
|
|
23
23
|
*/
|
|
24
24
|
/* eslint-disable no-console */
|
|
25
|
-
// import wtf from 'wtfnode';
|
|
26
25
|
import { Matterbridge } from './matterbridge.js';
|
|
26
|
+
import { MatterbridgeEdge } from './matterbridgeEdge.js';
|
|
27
27
|
let instance;
|
|
28
28
|
const cli = '\u001B[32m';
|
|
29
29
|
const er = '\u001B[38;5;9m';
|
|
30
30
|
const rs = '\u001B[40;0m';
|
|
31
31
|
async function main() {
|
|
32
32
|
if (process.argv.includes('-debug'))
|
|
33
|
-
console.log(cli +
|
|
34
|
-
|
|
33
|
+
console.log(cli + `CLI: ${process.argv.includes('-edge') ? 'MatterbridgeEdge' : 'Matterbridge'}.loadInstance() called` + rs);
|
|
34
|
+
if (process.argv.includes('-edge'))
|
|
35
|
+
instance = await MatterbridgeEdge.loadInstance(true);
|
|
36
|
+
else
|
|
37
|
+
instance = await Matterbridge.loadInstance(true);
|
|
35
38
|
registerHandlers();
|
|
36
39
|
if (process.argv.includes('-debug'))
|
|
37
|
-
console.log(cli +
|
|
40
|
+
console.log(cli + `CLI: ${process.argv.includes('-edge') ? 'MatterbridgeEdge' : 'Matterbridge'}.loadInstance() exited` + rs);
|
|
38
41
|
}
|
|
39
42
|
function registerHandlers() {
|
|
40
43
|
if (instance)
|
|
@@ -47,22 +50,29 @@ function registerHandlers() {
|
|
|
47
50
|
async function shutdown() {
|
|
48
51
|
if (process.argv.includes('-debug'))
|
|
49
52
|
console.log(cli + 'CLI: received shutdown event, exiting...' + rs);
|
|
50
|
-
// wtf.dump();
|
|
51
53
|
process.exit(0);
|
|
52
54
|
}
|
|
53
55
|
async function restart() {
|
|
54
56
|
if (process.argv.includes('-debug'))
|
|
55
57
|
console.log(cli + 'CLI: received restart event, loading...' + rs);
|
|
56
|
-
|
|
58
|
+
if (process.argv.includes('-edge'))
|
|
59
|
+
instance = await MatterbridgeEdge.loadInstance(true);
|
|
60
|
+
else
|
|
61
|
+
instance = await Matterbridge.loadInstance(true);
|
|
57
62
|
registerHandlers();
|
|
58
63
|
}
|
|
59
64
|
async function update() {
|
|
60
65
|
if (process.argv.includes('-debug'))
|
|
61
66
|
console.log(cli + 'CLI: received update event, updating...' + rs);
|
|
62
|
-
|
|
67
|
+
// TODO: Implement update logic outside of matterbridge
|
|
68
|
+
if (process.argv.includes('-edge'))
|
|
69
|
+
instance = await MatterbridgeEdge.loadInstance();
|
|
70
|
+
else
|
|
71
|
+
instance = await Matterbridge.loadInstance(true);
|
|
63
72
|
registerHandlers();
|
|
64
73
|
}
|
|
65
74
|
process.title = 'matterbridge';
|
|
75
|
+
// Run the main function
|
|
66
76
|
main().catch((error) => {
|
|
67
77
|
console.error(er + `CLI: Matterbridge.loadInstance() failed with error: ${error}` + rs);
|
|
68
78
|
});
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,+BAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,+BAA+B;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,IAAI,QAAqD,CAAC;AAC1D,MAAM,GAAG,GAAG,YAAY,CAAC;AACzB,MAAM,EAAE,GAAG,gBAAgB,CAAC;AAC5B,MAAM,EAAE,GAAG,cAAc,CAAC;AAE1B,KAAK,UAAU,IAAI;IACjB,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,QAAQ,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,cAAc,wBAAwB,GAAG,EAAE,CAAC,CAAC;IAClK,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;QAAE,QAAQ,GAAG,MAAM,gBAAgB,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;;QACpF,QAAQ,GAAG,MAAM,YAAY,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IACtD,gBAAgB,EAAE,CAAC;IACnB,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,QAAQ,OAAO,CAAC,IAAI,CAAC,QA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G,yCAAyC,GAAG,EAAE,CAAC,CAAC;IACvG,uDAAuD;IACvD,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;QAAE,QAAQ,GAAG,MAAM,gBAAgB,CAAC,YAAY,EAAE,CAAC;;QAChF,QAAQ,GAAG,MAAM,YAAY,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IACtD,gBAAgB,EAAE,CAAC;AACrB,CAAC;AAED,OAAO,CAAC,KAAK,GAAG,cAAc,CAAC;AAE/B,wBAAwB;AACxB,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,EAAE,GAAG,uDAAuD,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;AAC1F,CAAC,CAAC,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @date 2024-05-07
|
|
7
7
|
* @version 1.0.1
|
|
8
8
|
*
|
|
9
|
-
* Copyright 2024 Luca Liguori.
|
|
9
|
+
* Copyright 2024, 2025, 2026 Luca Liguori.
|
|
10
10
|
*
|
|
11
11
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
12
12
|
* you may not use this file except in compliance with the License.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @date 2024-05-07
|
|
7
7
|
* @version 1.0.1
|
|
8
8
|
*
|
|
9
|
-
* Copyright 2024 Luca Liguori.
|
|
9
|
+
* Copyright 2024, 2025, 2026 Luca Liguori.
|
|
10
10
|
*
|
|
11
11
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
12
12
|
* you may not use this file except in compliance with the License.
|
package/dist/deviceManager.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @date 2024-07-26
|
|
7
7
|
* @version 1.0.8
|
|
8
8
|
*
|
|
9
|
-
* Copyright 2024, 2025 Luca Liguori.
|
|
9
|
+
* Copyright 2024, 2025, 2026 Luca Liguori.
|
|
10
10
|
*
|
|
11
11
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
12
12
|
* you may not use this file except in compliance with the License.
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
* limitations under the License. *
|
|
22
22
|
*/
|
|
23
23
|
import { LogLevel } from 'node-ansi-logger';
|
|
24
|
-
import { Matterbridge } from './matterbridge.js';
|
|
25
24
|
import { NodeStorage } from 'node-persist-manager';
|
|
25
|
+
import { Matterbridge } from './matterbridge.js';
|
|
26
26
|
import { MatterbridgeDevice } from './matterbridgeDevice.js';
|
|
27
27
|
export declare class DeviceManager {
|
|
28
28
|
private readonly _devices;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceManager.d.ts","sourceRoot":"","sources":["../src/deviceManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,
|
|
1
|
+
{"version":3,"file":"deviceManager.d.ts","sourceRoot":"","sources":["../src/deviceManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAwB,QAAQ,EAAmB,MAAM,kBAAkB,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGnD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAyC;IAClE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;IAC5C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAc;IAC1C,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAa;gBAErB,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW;IAOhE,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAI9B,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS;IAIrD,GAAG,CAAC,MAAM,EAAE,kBAAkB,GAAG,kBAAkB;IAOnD,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO;IAM3C,KAAK,IAAI,IAAI;IAIb,KAAK,IAAI,kBAAkB,EAAE;IAI7B,CAAC,MAAM,CAAC,QAAQ,CAAC;IAIX,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAYrF,IAAI,QAAQ,IAAI,QAAQ,CAEvB;IAED,IAAI,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAE9B;CAgCF"}
|
package/dist/deviceManager.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @date 2024-07-26
|
|
7
7
|
* @version 1.0.8
|
|
8
8
|
*
|
|
9
|
-
* Copyright 2024, 2025 Luca Liguori.
|
|
9
|
+
* Copyright 2024, 2025, 2026 Luca Liguori.
|
|
10
10
|
*
|
|
11
11
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
12
12
|
* you may not use this file except in compliance with the License.
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* See the License for the specific language governing permissions and
|
|
21
21
|
* limitations under the License. *
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
// NodeStorage and AnsiLogger modules
|
|
24
24
|
import { AnsiLogger, BLUE, er } from 'node-ansi-logger';
|
|
25
25
|
import { dev } from './matterbridgeTypes.js';
|
|
26
26
|
export class DeviceManager {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceManager.js","sourceRoot":"","sources":["../src/deviceManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,
|
|
1
|
+
{"version":3,"file":"deviceManager.js","sourceRoot":"","sources":["../src/deviceManager.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AC,OAAO,CAAC,QAAuD;QACnE,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;YACpE,IAAI,CAAC;gBACH,MAAM,QAAQ,CAAC,MAAM,CAAC,CAAC;YACzB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,mCAAmC,GAAG,GAAG,MAAM,CAAC,UAAU,GAAG,EAAE,iBAAiB,IAAI,GAAG,MAAM,CAAC,YAAY,GAAG,EAAE,cAAc,IAAI,GAAG,MAAM,CAAC,QAAQ,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;gBACnL,eAAe;YACjB,CAAC;QACH,CAAC,CAAC,CAAC;QACH,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC;IAC3B,CAAC;IAED,IAAI,QAAQ,CAAC,QAAkB;QAC7B,IAAI,CAAC,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC/B,CAAC;CAgCF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @date 2023-12-29
|
|
7
7
|
* @version 1.0.6
|
|
8
8
|
*
|
|
9
|
-
* Copyright 2023, 2024 Luca Liguori.
|
|
9
|
+
* Copyright 2023, 2024, 2025 Luca Liguori.
|
|
10
10
|
*
|
|
11
11
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
12
12
|
* you may not use this file except in compliance with the License.
|
|
@@ -20,18 +20,18 @@
|
|
|
20
20
|
* See the License for the specific language governing permissions and
|
|
21
21
|
* limitations under the License. *
|
|
22
22
|
*/
|
|
23
|
-
|
|
24
|
-
export * from '@
|
|
25
|
-
export * from '@
|
|
26
|
-
export
|
|
27
|
-
export * from '@project-chip/matter
|
|
28
|
-
export * from '@project-chip/matter
|
|
29
|
-
export * from '@project-chip/matter-node.js/schema';
|
|
30
|
-
export * from '@project-chip/matter-node.js/tlv';
|
|
23
|
+
export { Identity, AtLeastOne } from '@matter/main';
|
|
24
|
+
export * from '@matter/main/clusters';
|
|
25
|
+
export * from '@matter/main/types';
|
|
26
|
+
export { SemanticNamespace, ClosureTag, CompassDirectionTag, CompassLocationTag, DirectionTag, ElectricalMeasurementTag, LaundryTag, LevelTag, LocationTag, NumberTag, PositionTag, PowerSourceTag, RefrigeratorTag, RoomAirConditionerTag, SwitchesTag, } from '@matter/node';
|
|
27
|
+
export * from '@project-chip/matter.js/device';
|
|
28
|
+
export * from '@project-chip/matter.js/cluster';
|
|
31
29
|
export * from './matterbridge.js';
|
|
30
|
+
export * from './matterbridgeTypes.js';
|
|
32
31
|
export * from './matterbridgeDevice.js';
|
|
32
|
+
export * from './matterbridgeEndpoint.js';
|
|
33
|
+
export * from './matterbridgeDeviceTypes.js';
|
|
33
34
|
export * from './matterbridgePlatform.js';
|
|
34
35
|
export * from './matterbridgeAccessoryPlatform.js';
|
|
35
36
|
export * from './matterbridgeDynamicPlatform.js';
|
|
36
|
-
export * from './matterbridgeTypes.js';
|
|
37
37
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAMH,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACpD,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,wBAAwB,EACxB,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,WAAW,EACX,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,WAAW,GACZ,MAAM,cAAc,CAAC;AAGtB,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAWhD,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @date 2023-12-29
|
|
7
7
|
* @version 1.0.6
|
|
8
8
|
*
|
|
9
|
-
* Copyright 2023, 2024 Luca Liguori.
|
|
9
|
+
* Copyright 2023, 2024, 2025 Luca Liguori.
|
|
10
10
|
*
|
|
11
11
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
12
12
|
* you may not use this file except in compliance with the License.
|
|
@@ -20,21 +20,31 @@
|
|
|
20
20
|
* See the License for the specific language governing permissions and
|
|
21
21
|
* limitations under the License. *
|
|
22
22
|
*/
|
|
23
|
-
import '@project-chip/matter-node.js';
|
|
24
23
|
import { Matterbridge } from './matterbridge.js';
|
|
25
|
-
|
|
26
|
-
export * from '@
|
|
27
|
-
export * from '@
|
|
28
|
-
export
|
|
29
|
-
|
|
30
|
-
export * from '@project-chip/matter
|
|
31
|
-
export * from '@project-chip/matter
|
|
24
|
+
import { MatterbridgeEdge } from './matterbridgeEdge.js';
|
|
25
|
+
export * from '@matter/main/clusters';
|
|
26
|
+
export * from '@matter/main/types';
|
|
27
|
+
export { SemanticNamespace, ClosureTag, CompassDirectionTag, CompassLocationTag, DirectionTag, ElectricalMeasurementTag, LaundryTag, LevelTag, LocationTag, NumberTag, PositionTag, PowerSourceTag, RefrigeratorTag, RoomAirConditionerTag, SwitchesTag, } from '@matter/node';
|
|
28
|
+
// @project-chip
|
|
29
|
+
export * from '@project-chip/matter.js/device';
|
|
30
|
+
export * from '@project-chip/matter.js/cluster';
|
|
31
|
+
/*
|
|
32
|
+
export * from '@project-chip/matter.js/cluster';
|
|
33
|
+
export * from '@project-chip/matter.js/log';
|
|
34
|
+
export * from '@project-chip/matter.js/datatype';
|
|
35
|
+
export * from '@project-chip/matter.js/util';
|
|
36
|
+
export * from '@project-chip/matter.js/schema';
|
|
37
|
+
export * from '@project-chip/matter.js/tlv';
|
|
38
|
+
*/
|
|
39
|
+
// Matterbridge
|
|
32
40
|
export * from './matterbridge.js';
|
|
41
|
+
export * from './matterbridgeTypes.js';
|
|
33
42
|
export * from './matterbridgeDevice.js';
|
|
43
|
+
export * from './matterbridgeEndpoint.js';
|
|
44
|
+
export * from './matterbridgeDeviceTypes.js';
|
|
34
45
|
export * from './matterbridgePlatform.js';
|
|
35
46
|
export * from './matterbridgeAccessoryPlatform.js';
|
|
36
47
|
export * from './matterbridgeDynamicPlatform.js';
|
|
37
|
-
export * from './matterbridgeTypes.js';
|
|
38
48
|
const cli = '\u001B[32m';
|
|
39
49
|
const er = '\u001B[38;5;9m';
|
|
40
50
|
const rs = '\u001B[40;0m';
|
|
@@ -42,7 +52,10 @@ async function main() {
|
|
|
42
52
|
// eslint-disable-next-line no-console
|
|
43
53
|
if (process.argv.includes('-debug'))
|
|
44
54
|
console.log(cli + 'MAIN: Matterbridge.loadInstance() called' + rs);
|
|
45
|
-
|
|
55
|
+
if (process.argv.includes('-edge'))
|
|
56
|
+
await MatterbridgeEdge.loadInstance();
|
|
57
|
+
else
|
|
58
|
+
await Matterbridge.loadInstance();
|
|
46
59
|
// eslint-disable-next-line no-console
|
|
47
60
|
if (process.argv.includes('-debug'))
|
|
48
61
|
console.log(cli + 'MAIN: Matterbridge.loadInstance() exited' + rs);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIzD,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,OAAO,EACL,iBAAiB,EACjB,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,wBAAwB,EACxB,UAAU,EACV,QAAQ,EACR,WAAW,EACX,SAAS,EACT,WAAW,EACX,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,WAAW,GACZ,MAAM,cAAc,CAAC;AAEtB,gBAAgB;AAChB,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD;;;;;;;EAOE;AAEF,eAAe;AACf,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AAEjD,MAAM,GAAG,GAAG,YAAY,CAAC;AACzB,MAAM,EAAE,GAAG,gBAAgB,CAAC;AAC5B,MAAM,EAAE,GAAG,cAAc,CAAC;AAE1B,KAAK,UAAU,IAAI;IACjB,sCAAsC;IACtC,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,0CAA0C,GAAG,EAAE,CAAC,CAAC;IACxG,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;QAAE,MAAM,gBAAgB,CAAC,YAAY,EAAE,CAAC;;QACrE,MAAM,YAAY,CAAC,YAAY,EAAE,CAAC;IACvC,sCAAsC;IACtC,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,0CAA0C,GAAG,EAAE,CAAC,CAAC;AAC1G,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,sCAAsC;IACtC,OAAO,CAAC,KAAK,CAAC,EAAE,GAAG,wDAAwD,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;AAC3F,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/matter/export.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/matter/export.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC"}
|
package/dist/matterbridge.d.ts
CHANGED
|
@@ -25,13 +25,14 @@ import WebSocket from 'ws';
|
|
|
25
25
|
import { NodeStorageManager, NodeStorage } from 'node-persist-manager';
|
|
26
26
|
import { AnsiLogger } from 'node-ansi-logger';
|
|
27
27
|
import { MatterbridgeDevice } from './matterbridgeDevice.js';
|
|
28
|
-
import { BaseRegisteredPlugin, MatterbridgeInformation, SanitizedExposedFabricInformation, SanitizedSessionInformation, SystemInformation } from './matterbridgeTypes.js';
|
|
28
|
+
import { BaseRegisteredPlugin, MatterbridgeInformation, SanitizedExposedFabricInformation, SanitizedSessionInformation, SessionInformation, SystemInformation } from './matterbridgeTypes.js';
|
|
29
29
|
import { PluginManager } from './pluginManager.js';
|
|
30
30
|
import { DeviceManager } from './deviceManager.js';
|
|
31
|
-
import {
|
|
32
|
-
import { DeviceTypeId } from '@
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
31
|
+
import { MatterbridgeEndpoint } from './matterbridgeEndpoint.js';
|
|
32
|
+
import { DeviceTypeId, VendorId, StorageContext, StorageManager } from '@matter/main';
|
|
33
|
+
import { ExposedFabricInformation } from '@matter/main/protocol';
|
|
34
|
+
import { CommissioningController, CommissioningServer, MatterServer } from '@project-chip/matter.js';
|
|
35
|
+
import { Aggregator } from '@project-chip/matter.js/device';
|
|
35
36
|
/**
|
|
36
37
|
* Represents the Matterbridge application.
|
|
37
38
|
*/
|
|
@@ -54,6 +55,7 @@ export declare class Matterbridge extends EventEmitter {
|
|
|
54
55
|
bridgeMode: 'bridge' | 'childbridge' | 'controller' | '';
|
|
55
56
|
restartMode: 'service' | 'docker' | '';
|
|
56
57
|
profile: string | undefined;
|
|
58
|
+
edge: boolean;
|
|
57
59
|
log: AnsiLogger;
|
|
58
60
|
protected matterbrideLoggerFile: string;
|
|
59
61
|
protected matterLoggerFile: string;
|
|
@@ -72,6 +74,8 @@ export declare class Matterbridge extends EventEmitter {
|
|
|
72
74
|
private reachabilityTimeout;
|
|
73
75
|
private sigintHandler;
|
|
74
76
|
private sigtermHandler;
|
|
77
|
+
private exceptionHandler;
|
|
78
|
+
private rejectionHandler;
|
|
75
79
|
private expressApp;
|
|
76
80
|
private httpServer;
|
|
77
81
|
private httpsServer;
|
|
@@ -89,6 +93,8 @@ export declare class Matterbridge extends EventEmitter {
|
|
|
89
93
|
protected matterAggregator: Aggregator | undefined;
|
|
90
94
|
protected commissioningServer: CommissioningServer | undefined;
|
|
91
95
|
protected commissioningController: CommissioningController | undefined;
|
|
96
|
+
protected aggregatorVendorId: VendorId;
|
|
97
|
+
protected aggregatorProductId: number;
|
|
92
98
|
protected static instance: Matterbridge | undefined;
|
|
93
99
|
protected constructor();
|
|
94
100
|
matterbridgeMessageHandler: (client: WebSocket, message: WebSocket.RawData) => Promise<void>;
|
|
@@ -136,14 +142,14 @@ export declare class Matterbridge extends EventEmitter {
|
|
|
136
142
|
*/
|
|
137
143
|
private startPlugins;
|
|
138
144
|
/**
|
|
139
|
-
* Registers the
|
|
145
|
+
* Registers the process handlers for uncaughtException, unhandledRejection, SIGINT and SIGTERM.
|
|
140
146
|
* When either of these signals are received, the cleanup method is called with an appropriate message.
|
|
141
147
|
*/
|
|
142
|
-
private
|
|
148
|
+
private registerProcessHandlers;
|
|
143
149
|
/**
|
|
144
|
-
* Deregisters the SIGINT and SIGTERM signal handlers.
|
|
150
|
+
* Deregisters the process uncaughtException, unhandledRejection, SIGINT and SIGTERM signal handlers.
|
|
145
151
|
*/
|
|
146
|
-
private
|
|
152
|
+
private deregisterProcesslHandlers;
|
|
147
153
|
/**
|
|
148
154
|
* Logs the node and system information.
|
|
149
155
|
*/
|
|
@@ -193,15 +199,15 @@ export declare class Matterbridge extends EventEmitter {
|
|
|
193
199
|
/**
|
|
194
200
|
* Update matterbridge and cleanup.
|
|
195
201
|
*/
|
|
196
|
-
|
|
202
|
+
protected updateProcess(): Promise<void>;
|
|
197
203
|
/**
|
|
198
204
|
* Restarts the process by spawning a new process and exiting the current process.
|
|
199
205
|
*/
|
|
200
|
-
|
|
206
|
+
protected restartProcess(): Promise<void>;
|
|
201
207
|
/**
|
|
202
208
|
* Shut down the process by exiting the current process.
|
|
203
209
|
*/
|
|
204
|
-
|
|
210
|
+
protected shutdownProcess(): Promise<void>;
|
|
205
211
|
/**
|
|
206
212
|
* Shut down the process and reset.
|
|
207
213
|
*/
|
|
@@ -221,6 +227,9 @@ export declare class Matterbridge extends EventEmitter {
|
|
|
221
227
|
* @returns A promise that resolves when the cleanup is completed.
|
|
222
228
|
*/
|
|
223
229
|
protected cleanup(message: string, restart?: boolean): Promise<void>;
|
|
230
|
+
addBridgedEndpoint(pluginName: string, device: MatterbridgeEndpoint): Promise<void>;
|
|
231
|
+
removeBridgedEndpoint(pluginName: string, device: MatterbridgeEndpoint): Promise<void>;
|
|
232
|
+
removeAllBridgedEndpoints(pluginName: string): Promise<void>;
|
|
224
233
|
/**
|
|
225
234
|
* Adds a bridged device to the Matterbridge.
|
|
226
235
|
* @param pluginName - The name of the plugin.
|
|
@@ -277,6 +286,13 @@ export declare class Matterbridge extends EventEmitter {
|
|
|
277
286
|
* @param backupName - The name of the backup file to be created.
|
|
278
287
|
*/
|
|
279
288
|
protected backupMatterStorage(storageName: string, backupName: string): Promise<void>;
|
|
289
|
+
/**
|
|
290
|
+
* Restore the specified matter JSON storage file.
|
|
291
|
+
*
|
|
292
|
+
* @param backupName - The name of the backup file to restore from.
|
|
293
|
+
* @param storageName - The name of the JSON storage file to restored.
|
|
294
|
+
*/
|
|
295
|
+
protected restoreMatterStorage(backupName: string, storageName: string): Promise<void>;
|
|
280
296
|
/**
|
|
281
297
|
* Stops the matter storage.
|
|
282
298
|
* @returns {Promise<void>} A promise that resolves when the storage is stopped.
|
|
@@ -353,14 +369,14 @@ export declare class Matterbridge extends EventEmitter {
|
|
|
353
369
|
* @param fabricInfo - The array of exposed fabric information objects.
|
|
354
370
|
* @returns An array of sanitized exposed fabric information objects.
|
|
355
371
|
*/
|
|
356
|
-
|
|
372
|
+
protected sanitizeFabricInformations(fabricInfo: ExposedFabricInformation[]): SanitizedExposedFabricInformation[];
|
|
357
373
|
/**
|
|
358
374
|
* Sanitizes the session information by converting bigint properties to string.
|
|
359
375
|
*
|
|
360
376
|
* @param sessionInfo - The array of session information objects.
|
|
361
377
|
* @returns An array of sanitized session information objects.
|
|
362
378
|
*/
|
|
363
|
-
|
|
379
|
+
protected sanitizeSessionInformation(sessionInfo: SessionInformation[]): SanitizedSessionInformation[];
|
|
364
380
|
/**
|
|
365
381
|
* Sets the reachability of a commissioning server and trigger.
|
|
366
382
|
*
|
|
@@ -391,9 +407,9 @@ export declare class Matterbridge extends EventEmitter {
|
|
|
391
407
|
* Spawns a child process with the given command and arguments.
|
|
392
408
|
* @param {string} command - The command to execute.
|
|
393
409
|
* @param {string[]} args - The arguments to pass to the command (default: []).
|
|
394
|
-
* @returns {Promise<
|
|
410
|
+
* @returns {Promise<boolean>} A promise that resolves when the child process exits successfully, or rejects if there is an error.
|
|
395
411
|
*/
|
|
396
|
-
|
|
412
|
+
protected spawnCommand(command: string, args?: string[]): Promise<boolean>;
|
|
397
413
|
/**
|
|
398
414
|
* Sends a WebSocket message to all connected clients.
|
|
399
415
|
*
|