matterbridge 1.5.3 → 1.5.5

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.
Files changed (115) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README-DEV.md +13 -4
  3. package/README.md +32 -11
  4. package/dist/cluster/export.d.ts +1 -21
  5. package/dist/cluster/export.d.ts.map +1 -1
  6. package/dist/cluster/export.js +2 -21
  7. package/dist/cluster/export.js.map +1 -1
  8. package/dist/matterbridge.js +20 -20
  9. package/dist/matterbridge.js.map +1 -1
  10. package/dist/matterbridgeDevice.d.ts +105 -210
  11. package/dist/matterbridgeDevice.d.ts.map +1 -1
  12. package/dist/matterbridgeDevice.js +31 -48
  13. package/dist/matterbridgeDevice.js.map +1 -1
  14. package/dist/matterbridgePlatform.d.ts +6 -0
  15. package/dist/matterbridgePlatform.d.ts.map +1 -1
  16. package/dist/matterbridgePlatform.js +26 -0
  17. package/dist/matterbridgePlatform.js.map +1 -1
  18. package/dist/pluginManager.d.ts.map +1 -1
  19. package/dist/pluginManager.js +72 -5
  20. package/dist/pluginManager.js.map +1 -1
  21. package/frontend/build/asset-manifest.json +3 -3
  22. package/frontend/build/index.html +1 -1
  23. package/frontend/build/static/js/{main.6725e5ab.js → main.f86befcf.js} +3 -3
  24. package/frontend/build/static/js/{main.6725e5ab.js.map → main.f86befcf.js.map} +1 -1
  25. package/npm-shrinkwrap.json +7334 -0
  26. package/package.json +13 -12
  27. package/dist/cluster/AirQualityCluster.d.ts +0 -188
  28. package/dist/cluster/AirQualityCluster.d.ts.map +0 -1
  29. package/dist/cluster/AirQualityCluster.js +0 -98
  30. package/dist/cluster/AirQualityCluster.js.map +0 -1
  31. package/dist/cluster/CarbonDioxideConcentrationMeasurementCluster.d.ts +0 -396
  32. package/dist/cluster/CarbonDioxideConcentrationMeasurementCluster.d.ts.map +0 -1
  33. package/dist/cluster/CarbonDioxideConcentrationMeasurementCluster.js +0 -30
  34. package/dist/cluster/CarbonDioxideConcentrationMeasurementCluster.js.map +0 -1
  35. package/dist/cluster/CarbonMonoxideConcentrationMeasurementCluster.d.ts +0 -396
  36. package/dist/cluster/CarbonMonoxideConcentrationMeasurementCluster.d.ts.map +0 -1
  37. package/dist/cluster/CarbonMonoxideConcentrationMeasurementCluster.js +0 -30
  38. package/dist/cluster/CarbonMonoxideConcentrationMeasurementCluster.js.map +0 -1
  39. package/dist/cluster/ConcentrationMeasurementCluster.d.ts +0 -524
  40. package/dist/cluster/ConcentrationMeasurementCluster.d.ts.map +0 -1
  41. package/dist/cluster/ConcentrationMeasurementCluster.js +0 -282
  42. package/dist/cluster/ConcentrationMeasurementCluster.js.map +0 -1
  43. package/dist/cluster/DeviceEnergyManagementCluster.d.ts +0 -7851
  44. package/dist/cluster/DeviceEnergyManagementCluster.d.ts.map +0 -1
  45. package/dist/cluster/DeviceEnergyManagementCluster.js +0 -1634
  46. package/dist/cluster/DeviceEnergyManagementCluster.js.map +0 -1
  47. package/dist/cluster/DeviceEnergyManagementModeCluster.d.ts +0 -68
  48. package/dist/cluster/DeviceEnergyManagementModeCluster.d.ts.map +0 -1
  49. package/dist/cluster/DeviceEnergyManagementModeCluster.js +0 -49
  50. package/dist/cluster/DeviceEnergyManagementModeCluster.js.map +0 -1
  51. package/dist/cluster/ElectricalEnergyMeasurementCluster.d.ts +0 -4978
  52. package/dist/cluster/ElectricalEnergyMeasurementCluster.d.ts.map +0 -1
  53. package/dist/cluster/ElectricalEnergyMeasurementCluster.js +0 -510
  54. package/dist/cluster/ElectricalEnergyMeasurementCluster.js.map +0 -1
  55. package/dist/cluster/ElectricalPowerMeasurementCluster.d.ts +0 -3250
  56. package/dist/cluster/ElectricalPowerMeasurementCluster.d.ts.map +0 -1
  57. package/dist/cluster/ElectricalPowerMeasurementCluster.js +0 -675
  58. package/dist/cluster/ElectricalPowerMeasurementCluster.js.map +0 -1
  59. package/dist/cluster/FormaldehydeConcentrationMeasurementCluster.d.ts +0 -396
  60. package/dist/cluster/FormaldehydeConcentrationMeasurementCluster.d.ts.map +0 -1
  61. package/dist/cluster/FormaldehydeConcentrationMeasurementCluster.js +0 -30
  62. package/dist/cluster/FormaldehydeConcentrationMeasurementCluster.js.map +0 -1
  63. package/dist/cluster/MeasurementAccuracy.d.ts +0 -63
  64. package/dist/cluster/MeasurementAccuracy.d.ts.map +0 -1
  65. package/dist/cluster/MeasurementAccuracy.js +0 -47
  66. package/dist/cluster/MeasurementAccuracy.js.map +0 -1
  67. package/dist/cluster/MeasurementAccuracyRange.d.ts +0 -134
  68. package/dist/cluster/MeasurementAccuracyRange.d.ts.map +0 -1
  69. package/dist/cluster/MeasurementAccuracyRange.js +0 -103
  70. package/dist/cluster/MeasurementAccuracyRange.js.map +0 -1
  71. package/dist/cluster/MeasurementType.d.ts +0 -68
  72. package/dist/cluster/MeasurementType.d.ts.map +0 -1
  73. package/dist/cluster/MeasurementType.js +0 -69
  74. package/dist/cluster/MeasurementType.js.map +0 -1
  75. package/dist/cluster/NitrogenDioxideConcentrationMeasurementCluster.d.ts +0 -396
  76. package/dist/cluster/NitrogenDioxideConcentrationMeasurementCluster.d.ts.map +0 -1
  77. package/dist/cluster/NitrogenDioxideConcentrationMeasurementCluster.js +0 -34
  78. package/dist/cluster/NitrogenDioxideConcentrationMeasurementCluster.js.map +0 -1
  79. package/dist/cluster/OzoneConcentrationMeasurementCluster.d.ts +0 -395
  80. package/dist/cluster/OzoneConcentrationMeasurementCluster.d.ts.map +0 -1
  81. package/dist/cluster/OzoneConcentrationMeasurementCluster.js +0 -29
  82. package/dist/cluster/OzoneConcentrationMeasurementCluster.js.map +0 -1
  83. package/dist/cluster/Pm10ConcentrationMeasurementCluster.d.ts +0 -395
  84. package/dist/cluster/Pm10ConcentrationMeasurementCluster.d.ts.map +0 -1
  85. package/dist/cluster/Pm10ConcentrationMeasurementCluster.js +0 -29
  86. package/dist/cluster/Pm10ConcentrationMeasurementCluster.js.map +0 -1
  87. package/dist/cluster/Pm1ConcentrationMeasurementCluster.d.ts +0 -395
  88. package/dist/cluster/Pm1ConcentrationMeasurementCluster.d.ts.map +0 -1
  89. package/dist/cluster/Pm1ConcentrationMeasurementCluster.js +0 -29
  90. package/dist/cluster/Pm1ConcentrationMeasurementCluster.js.map +0 -1
  91. package/dist/cluster/Pm25ConcentrationMeasurementCluster.d.ts +0 -395
  92. package/dist/cluster/Pm25ConcentrationMeasurementCluster.d.ts.map +0 -1
  93. package/dist/cluster/Pm25ConcentrationMeasurementCluster.js +0 -29
  94. package/dist/cluster/Pm25ConcentrationMeasurementCluster.js.map +0 -1
  95. package/dist/cluster/PowerTopologyCluster.d.ts +0 -345
  96. package/dist/cluster/PowerTopologyCluster.d.ts.map +0 -1
  97. package/dist/cluster/PowerTopologyCluster.js +0 -138
  98. package/dist/cluster/PowerTopologyCluster.js.map +0 -1
  99. package/dist/cluster/RadonConcentrationMeasurementCluster.d.ts +0 -395
  100. package/dist/cluster/RadonConcentrationMeasurementCluster.d.ts.map +0 -1
  101. package/dist/cluster/RadonConcentrationMeasurementCluster.js +0 -29
  102. package/dist/cluster/RadonConcentrationMeasurementCluster.js.map +0 -1
  103. package/dist/cluster/ScenesCluster.d.ts +0 -1249
  104. package/dist/cluster/ScenesCluster.d.ts.map +0 -1
  105. package/dist/cluster/ScenesCluster.js +0 -436
  106. package/dist/cluster/ScenesCluster.js.map +0 -1
  107. package/dist/cluster/SmokeCoAlarmCluster.d.ts +0 -1575
  108. package/dist/cluster/SmokeCoAlarmCluster.d.ts.map +0 -1
  109. package/dist/cluster/SmokeCoAlarmCluster.js +0 -603
  110. package/dist/cluster/SmokeCoAlarmCluster.js.map +0 -1
  111. package/dist/cluster/TvocCluster.d.ts +0 -465
  112. package/dist/cluster/TvocCluster.d.ts.map +0 -1
  113. package/dist/cluster/TvocCluster.js +0 -197
  114. package/dist/cluster/TvocCluster.js.map +0 -1
  115. /package/frontend/build/static/js/{main.6725e5ab.js.LICENSE.txt → main.f86befcf.js.LICENSE.txt} +0 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,35 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  If you like this project and find it useful, please consider giving it a star on GitHub at https://github.com/Luligu/matterbridge and sponsoring it.
6
6
 
7
+ ### Home Assistant Community Add-ons
8
+
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
+
11
+ ## [1.5.5] - 2024-09-09
12
+
13
+ ### Changed
14
+
15
+ - [matterbridge]: Changed startMatterInterval from 30 to 60 seconds.
16
+ - [package]: Update matter-node.js to 0.10.1.
17
+ - [package]: Update matter-history to 1.1.11.
18
+ - [package]: Update dependencies.
19
+
20
+ <a href="https://www.buymeacoffee.com/luligugithub">
21
+ <img src="./yellow-button.png" alt="Buy me a coffee" width="120">
22
+ </a>
23
+
24
+ ## [1.5.4] - 2024-09-05
25
+
26
+ ### Changed
27
+
28
+ - [package]: Update dependencies.
29
+ - [package]: Final update to matter-node.js 0.10.0.
30
+ - [package]: Removed all local matter 1.3 clusters now present in matter.js.
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
+
7
36
  ## [1.5.3] - 2024-09-04
8
37
 
9
38
  ### Added
package/README-DEV.md CHANGED
@@ -16,10 +16,10 @@
16
16
 
17
17
  ## Guidelines on imports/exports
18
18
 
19
- Matterbridge export from:
19
+ Matterbridge exports from:
20
20
 
21
21
  "matterbridge"
22
- - Matterbridge and MatterbridgeDevice class.
22
+ - Matterbridge and all Matterbridge related classes.
23
23
  - All relevant matter-node.js or matter.js clusters, classes and functions.
24
24
 
25
25
  "matterbridge/cluster"
@@ -38,12 +38,21 @@ Matterbridge export from:
38
38
  - NodeStorage classes.
39
39
 
40
40
  # **********
41
- A plugin will never ever install and import from matter-node.js or matter.js directly cause this leads to a second instance of matter.js that causes instability and unpredictable errors like "The only instance is Enpoint".
41
+ 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
+ # **********
43
+ A plugin must never install Matterbridge (neither as dependencies nor as devDependencies). Matterbridge must be linked to the plugin:
44
+ ```json
45
+ "scripts": {
46
+ '''
47
+ "install": "node link-matterbridge-script.js",
48
+ '''
49
+ }
50
+ ```
42
51
  # **********
43
52
 
44
53
  In the next releases I will remove the duplicated exports so please update your plugins.
45
54
 
46
- I will also add some error messages when a plugin has wrong imports.
55
+ I added some error messages when a plugin has wrong imports or configurations and the plugin will be disabled to prevent instability and crashes.
47
56
 
48
57
  ## Guidelines on the migration to matter.js V8
49
58
 
package/README.md CHANGED
@@ -132,6 +132,10 @@ Config editor:
132
132
 
133
133
  [Advanced configurations](https://github.com/Luligu/matterbridge/blob/main/README-DOCKER.md)
134
134
 
135
+ ### Home Assistant Community Add-ons
136
+
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.
138
+
135
139
  ## Development
136
140
 
137
141
  [Development](https://github.com/Luligu/matterbridge/blob/main/README-DEV.md)
@@ -201,14 +205,29 @@ An Accessory platform plugin only exposes one device.
201
205
 
202
206
  This an example of a dynamic platform plugin.
203
207
 
204
- It exposes a switch with onOff, a light with onOff-levelControl-colorControl, an outlet with onOff and a WindoweCovering device.
208
+ It exposes:
209
+ - a switch with onOff cluster
210
+ - a light with onOff
211
+ - a light with onOff and levelControl (dimmer)
212
+ - a light with onOff, levelControl and colorControl (with XY, HS and CT) clusters
213
+ - a light with onOff, levelControl and colorControl (with HS only) clusters
214
+ - a light with onOff, levelControl and colorControl (with XY only) clusters
215
+ - a light with onOff, levelControl and colorControl (with CT only) clusters
216
+ - an outlet (plug) with onOff cluster
217
+ - a cover with windowCovering cluster
218
+ - a lock with doorLock cluster
219
+ - a thermo with thermostat cluster and 3 sub endpoints with flowMeasurement cluster, temperatureMeasurement cluster
220
+ and relativeHumidityMeasurement cluster (to show how to create a composed device with sub endpoints)
221
+ - a fan with FanControl cluster
222
+ - a rainSensor device
223
+ - a waterFreezeDetector device
224
+ - a waterLeakDetector device
225
+ - a smokeCoAlarm device
205
226
 
206
227
  All these virtual devices continuously change state and position. The plugin also shows how to use all the command handlers (you can control all the devices).
207
228
 
208
229
  A Dynamic platform plugin exposes as many devices as you need (the limit for the Home app is 150 accessories for bridge).
209
230
 
210
- Matterbridge can run as many plugins as you want.
211
-
212
231
  [See the plugin homepage here](https://github.com/Luligu/matterbridge-example-dynamic-platform)
213
232
 
214
233
  ### Example plugins to show the usage of history in matter
@@ -231,7 +250,6 @@ The Eve app only shows the history when the plugins run like an AccessoryPlatfor
231
250
 
232
251
  Just open the frontend on the link provided in the log, select a plugin and click install.
233
252
 
234
-
235
253
  ## How to install and add a plugin manually from a terminal (from npm)
236
254
 
237
255
  To install i.e. https://github.com/Luligu/matterbridge-zigbee2mqtt
@@ -314,15 +332,18 @@ All issues have been solved from the version 17.5 of the HomePod/AppleTV. Now th
314
332
 
315
333
  So far is the only controller supporting some Matter 1.2 and 1.3 device type:
316
334
 
317
- - air quality sensor (Matter 1.2)
318
-
319
- Also supports (probably only like BooleanState cluster):
335
+ - airQualitySensor code 0x002c (Matter 1.2)
336
+ - waterFreezeDetector code 0x0041 (Matter 1.3 with only BooleanState cluster)
337
+ - waterLeakDetector code 0x0043 (Matter 1.3 with only BooleanState cluster)
338
+ - rainSensor code 0x0044 (Matter 1.3 with only BooleanState cluster)
339
+ - deviceEnergyManagement code 0x050d (Matter 1.3 with only DeviceEnergyManagementMode cluster)
320
340
 
321
- - waterFreezeDetector (Matter 1.3)
322
- - waterLeakDetector (Matter 1.3)
323
- - rainSensor (Matter 1.3)
341
+ Electrical measurements:
342
+ - electrical measurements from EveHistoryCluster (used in Matterbridge plugins)
343
+ - electricalSensor code 0x0510 with clusters: ElectricalPowerMeasurement and ElectricalEnergyMeasurement (still in dev but fully working!)
324
344
 
325
- HA also support electrical measurements from EveHistoryCluster (used in Matterbridge plugins)
345
+ Other supported cluster:
346
+ - ModeSelect
326
347
 
327
348
  ## Home Assistant issues (Matter Server for HA is still in Beta)
328
349
 
@@ -1,22 +1,2 @@
1
- export * from './AirQualityCluster.js';
2
- export * from './CarbonDioxideConcentrationMeasurementCluster.js';
3
- export * from './CarbonMonoxideConcentrationMeasurementCluster.js';
4
- export * from './ConcentrationMeasurementCluster.js';
5
- export * from './DeviceEnergyManagementCluster.js';
6
- export * from './DeviceEnergyManagementModeCluster.js';
7
- export * from './ElectricalEnergyMeasurementCluster.js';
8
- export * from './ElectricalPowerMeasurementCluster.js';
9
- export * from './FormaldehydeConcentrationMeasurementCluster.js';
10
- export * from './MeasurementAccuracy.js';
11
- export * from './MeasurementAccuracyRange.js';
12
- export * from './MeasurementType.js';
13
- export * from './NitrogenDioxideConcentrationMeasurementCluster.js';
14
- export * from './OzoneConcentrationMeasurementCluster.js';
15
- export * from './Pm10ConcentrationMeasurementCluster.js';
16
- export * from './Pm1ConcentrationMeasurementCluster.js';
17
- export * from './Pm25ConcentrationMeasurementCluster.js';
18
- export * from './PowerTopologyCluster.js';
19
- export * from './RadonConcentrationMeasurementCluster.js';
20
- export * from './SmokeCoAlarmCluster.js';
21
- export * from './TvocCluster.js';
1
+ export {};
22
2
  //# sourceMappingURL=export.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/cluster/export.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,mDAAmD,CAAC;AAClE,cAAc,oDAAoD,CAAC;AACnE,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,kDAAkD,CAAC;AACjE,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,qDAAqD,CAAC;AACpE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0CAA0C,CAAC;AACzD,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/cluster/export.ts"],"names":[],"mappings":""}
@@ -1,22 +1,3 @@
1
- export * from './AirQualityCluster.js';
2
- export * from './CarbonDioxideConcentrationMeasurementCluster.js';
3
- export * from './CarbonMonoxideConcentrationMeasurementCluster.js';
4
- export * from './ConcentrationMeasurementCluster.js';
5
- export * from './DeviceEnergyManagementCluster.js';
6
- export * from './DeviceEnergyManagementModeCluster.js';
7
- export * from './ElectricalEnergyMeasurementCluster.js';
8
- export * from './ElectricalPowerMeasurementCluster.js';
9
- export * from './FormaldehydeConcentrationMeasurementCluster.js';
10
- export * from './MeasurementAccuracy.js';
11
- export * from './MeasurementAccuracyRange.js';
12
- export * from './MeasurementType.js';
13
- export * from './NitrogenDioxideConcentrationMeasurementCluster.js';
14
- export * from './OzoneConcentrationMeasurementCluster.js';
15
- export * from './Pm10ConcentrationMeasurementCluster.js';
16
- export * from './Pm1ConcentrationMeasurementCluster.js';
17
- export * from './Pm25ConcentrationMeasurementCluster.js';
18
- export * from './PowerTopologyCluster.js';
19
- export * from './RadonConcentrationMeasurementCluster.js';
20
- export * from './SmokeCoAlarmCluster.js';
21
- export * from './TvocCluster.js';
1
+ export {};
2
+ // Nothing to export
22
3
  //# sourceMappingURL=export.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/cluster/export.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,mDAAmD,CAAC;AAClE,cAAc,oDAAoD,CAAC;AACnE,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,kDAAkD,CAAC;AACjE,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,qDAAqD,CAAC;AACpE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0CAA0C,CAAC;AACzD,cAAc,yCAAyC,CAAC;AACxD,cAAc,0CAA0C,CAAC;AACzD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/cluster/export.ts"],"names":[],"mappings":";AAAA,oBAAoB"}
@@ -219,7 +219,7 @@ export class Matterbridge extends EventEmitter {
219
219
  if (hasParameter('docker'))
220
220
  this.restartMode = 'docker';
221
221
  // Set the matterbridge directory
222
- this.homeDirectory = os.homedir();
222
+ this.homeDirectory = getParameter('homedir') ?? os.homedir();
223
223
  this.matterbridgeDirectory = path.join(this.homeDirectory, '.matterbridge');
224
224
  // Initialize nodeStorage and nodeContext
225
225
  // this.log.debug(`Creating node storage manager: ${CYAN}${this.nodeStorageName}${db}`);
@@ -411,8 +411,8 @@ export class Matterbridge extends EventEmitter {
411
411
  - list: list the registered plugins
412
412
  - loginterfaces: log the network interfaces (usefull for finding the name of the interface to use with -mdnsinterface option)
413
413
  - logstorage: log the node storage
414
- - sudo: force the use of sudo to install or update packages
415
- - nosudo: force not to use sudo to install or update packages
414
+ - sudo: force the use of sudo to install or update packages if the internal logic fails
415
+ - nosudo: force not to use sudo to install or update packages if the internal logic fails
416
416
  - ssl: enable SSL for the frontend and WebSockerServer (certificates in .matterbridge/certs directory cert.pem, key.pem and ca.pem (optional))
417
417
  - add [plugin path]: register the plugin from the given absolute or relative path
418
418
  - add [plugin name]: register the globally installed plugin with the given name
@@ -600,7 +600,7 @@ export class Matterbridge extends EventEmitter {
600
600
  plugin.schemaJson = await this.plugins.loadSchema(plugin);
601
601
  // Check if the plugin is available
602
602
  if (!(await this.plugins.resolve(plugin.path))) {
603
- this.log.error(`Plugin ${plg}${plugin.name}${er} not found. Disabling it.`);
603
+ this.log.error(`Plugin ${plg}${plugin.name}${er} not found or not validated. Disabling it.`);
604
604
  plugin.enabled = false;
605
605
  plugin.error = true;
606
606
  continue;
@@ -638,7 +638,7 @@ export class Matterbridge extends EventEmitter {
638
638
  plugin.schemaJson = await this.plugins.loadSchema(plugin);
639
639
  // Check if the plugin is available
640
640
  if (!(await this.plugins.resolve(plugin.path))) {
641
- this.log.error(`Plugin ${plg}${plugin.name}${er} not found. Disabling it.`);
641
+ this.log.error(`Plugin ${plg}${plugin.name}${er} not found or not validated. Disabling it.`);
642
642
  plugin.enabled = false;
643
643
  plugin.error = true;
644
644
  continue;
@@ -756,7 +756,7 @@ export class Matterbridge extends EventEmitter {
756
756
  this.log.debug(`- Free Memory: ${this.systemInformation.freeMemory}`);
757
757
  this.log.debug(`- System Uptime: ${this.systemInformation.systemUptime}`);
758
758
  // Home directory
759
- this.homeDirectory = os.homedir();
759
+ this.homeDirectory = getParameter('homedir') ?? os.homedir();
760
760
  this.matterbridgeInformation.homeDirectory = this.homeDirectory;
761
761
  this.log.debug(`Home Directory: ${this.homeDirectory}`);
762
762
  // Package root directory
@@ -1425,7 +1425,7 @@ export class Matterbridge extends EventEmitter {
1425
1425
  async startBridge() {
1426
1426
  // Plugins are loaded and started by loadPlugin on startup and plugin.loaded and plugin.started are set to true
1427
1427
  // Plugins are configured by a timer when matter server is started and plugin.configured is set to true
1428
- this.log.debug('***Starting startMatterInterval in bridge mode');
1428
+ this.log.debug('Starting startMatterInterval in bridge mode');
1429
1429
  let failCount = 0;
1430
1430
  this.startMatterInterval = setInterval(async () => {
1431
1431
  for (const plugin of this.plugins) {
@@ -1435,16 +1435,16 @@ export class Matterbridge extends EventEmitter {
1435
1435
  if (plugin.error) {
1436
1436
  clearInterval(this.startMatterInterval);
1437
1437
  this.startMatterInterval = undefined;
1438
- this.log.debug('***Cleared startMatterInterval interval for Matterbridge for plugin in error state');
1438
+ this.log.debug('Cleared startMatterInterval interval for Matterbridge for plugin in error state');
1439
1439
  this.log.error(`The plugin ${plg}${plugin.name}${er} is in error state.`);
1440
1440
  this.log.error('The bridge will not start until the problem is solved to prevent the controllers from deleting all registered devices.');
1441
1441
  this.log.error('If you want to start the bridge disable the plugin in error state and restart.');
1442
1442
  return;
1443
1443
  }
1444
1444
  if (!plugin.loaded || !plugin.started) {
1445
- this.log.debug(`***Waiting (failSafeCount=${failCount}/30) in startMatterInterval interval for plugin ${plg}${plugin.name}${db} loaded: ${plugin.loaded} started: ${plugin.started}...`);
1445
+ this.log.debug(`Waiting (failSafeCount=${failCount}/60) in startMatterInterval interval for plugin ${plg}${plugin.name}${db} loaded: ${plugin.loaded} started: ${plugin.started}...`);
1446
1446
  failCount++;
1447
- if (failCount > 30) {
1447
+ if (failCount > 60) {
1448
1448
  this.log.error(`Error waiting for plugin ${plg}${plugin.name}${er} to load and start. Plugin is in error state.`);
1449
1449
  plugin.error = true;
1450
1450
  }
@@ -1453,7 +1453,7 @@ export class Matterbridge extends EventEmitter {
1453
1453
  }
1454
1454
  clearInterval(this.startMatterInterval);
1455
1455
  this.startMatterInterval = undefined;
1456
- this.log.debug('***Cleared startMatterInterval interval for Matterbridge');
1456
+ this.log.debug('Cleared startMatterInterval interval for Matterbridge');
1457
1457
  await this.startMatterServer();
1458
1458
  this.log.notice('Matter server started');
1459
1459
  // Configure the plugins
@@ -1491,7 +1491,7 @@ export class Matterbridge extends EventEmitter {
1491
1491
  // Plugins are loaded and started by loadPlugin on startup and plugin.loaded and plugin.started are set to true
1492
1492
  // addDevice and addBridgedDeevice create the commissionig servers and add the devices to the the commissioning server or to the aggregator
1493
1493
  // Plugins are configured by a timer when matter server is started and plugin.configured is set to true
1494
- this.log.debug('***Starting start matter interval in childbridge mode...');
1494
+ this.log.debug('Starting start matter interval in childbridge mode...');
1495
1495
  let failCount = 0;
1496
1496
  this.startMatterInterval = setInterval(async () => {
1497
1497
  let allStarted = true;
@@ -1502,18 +1502,18 @@ export class Matterbridge extends EventEmitter {
1502
1502
  if (plugin.error) {
1503
1503
  clearInterval(this.startMatterInterval);
1504
1504
  this.startMatterInterval = undefined;
1505
- this.log.debug('***Cleared startMatterInterval interval for Matterbridge for plugin in error state');
1505
+ this.log.debug('Cleared startMatterInterval interval for Matterbridge for plugin in error state');
1506
1506
  this.log.error(`The plugin ${plg}${plugin.name}${er} is in error state.`);
1507
1507
  this.log.error('The bridge will not start until the problem is solved to prevent the controllers from deleting all registered devices.');
1508
1508
  this.log.error('If you want to start the bridge disable the plugin in error state and restart.');
1509
1509
  return;
1510
1510
  }
1511
- this.log.debug(`***Checking plugin ${plg}${plugin.name}${db} to start matter in childbridge mode...`);
1511
+ this.log.debug(`Checking plugin ${plg}${plugin.name}${db} to start matter in childbridge mode...`);
1512
1512
  if (!plugin.loaded || !plugin.started) {
1513
1513
  allStarted = false;
1514
- this.log.debug(`***Waiting (failSafeCount=${failCount}/30) for plugin ${plg}${plugin.name}${db} to load (${plugin.loaded}) and start (${plugin.started}) ...`);
1514
+ this.log.debug(`Waiting (failSafeCount=${failCount}/60) for plugin ${plg}${plugin.name}${db} to load (${plugin.loaded}) and start (${plugin.started}) ...`);
1515
1515
  failCount++;
1516
- if (failCount > 30) {
1516
+ if (failCount > 60) {
1517
1517
  this.log.error(`Error waiting for plugin ${plg}${plugin.name}${er} to load and start. Plugin is in error mode.`);
1518
1518
  plugin.error = true;
1519
1519
  }
@@ -1523,7 +1523,7 @@ export class Matterbridge extends EventEmitter {
1523
1523
  return;
1524
1524
  clearInterval(this.startMatterInterval);
1525
1525
  this.startMatterInterval = undefined;
1526
- this.log.debug('***Cleared startMatterInterval interval in childbridge mode');
1526
+ this.log.debug('Cleared startMatterInterval interval in childbridge mode');
1527
1527
  await this.startMatterServer();
1528
1528
  this.log.notice('Matter server started');
1529
1529
  // Configure the plugins
@@ -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 ', '')} installed correctly`);
2478
+ this.log.notice(`${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
  }
@@ -3139,7 +3139,7 @@ export class Matterbridge extends EventEmitter {
3139
3139
  if (command === 'update') {
3140
3140
  this.log.info('Updating matterbridge...');
3141
3141
  try {
3142
- await this.spawnCommand('npm', ['install', '-g', 'matterbridge']);
3142
+ await this.spawnCommand('npm', ['install', '-g', 'matterbridge', '--verbose']);
3143
3143
  this.log.info('Matterbridge has been updated. Full restart required.');
3144
3144
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
3145
3145
  }
@@ -3174,7 +3174,7 @@ export class Matterbridge extends EventEmitter {
3174
3174
  param = param.replace(/\*/g, '\\');
3175
3175
  this.log.info(`Installing plugin ${plg}${param}${nf}...`);
3176
3176
  try {
3177
- await this.spawnCommand('npm', ['install', '-g', param]);
3177
+ await this.spawnCommand('npm', ['install', '-g', param, '--verbose']);
3178
3178
  this.log.info(`Plugin ${plg}${param}${nf} installed. Full restart required.`);
3179
3179
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
3180
3180
  }