matterbridge 1.5.2 → 1.5.4
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 +31 -2
- package/README-DEV.md +4 -2
- package/dist/cluster/export.d.ts +1 -22
- package/dist/cluster/export.d.ts.map +1 -1
- package/dist/cluster/export.js +2 -22
- package/dist/cluster/export.js.map +1 -1
- package/dist/index.d.ts +3 -25
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -32
- package/dist/index.js.map +1 -1
- package/dist/matterbridge.d.ts +3 -1
- package/dist/matterbridge.d.ts.map +1 -1
- package/dist/matterbridge.js +127 -20
- package/dist/matterbridge.js.map +1 -1
- package/dist/matterbridgeDevice.d.ts +4608 -2298
- package/dist/matterbridgeDevice.d.ts.map +1 -1
- package/dist/matterbridgeDevice.js +170 -582
- package/dist/matterbridgeDevice.js.map +1 -1
- package/dist/matterbridgeTypes.d.ts +3 -0
- package/dist/matterbridgeTypes.d.ts.map +1 -1
- package/dist/pluginManager.d.ts.map +1 -1
- package/dist/pluginManager.js +20 -4
- package/dist/pluginManager.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.cfcfbb06.js → main.f86befcf.js} +3 -3
- package/frontend/build/static/js/main.f86befcf.js.map +1 -0
- package/package.json +13 -8
- package/dist/cluster/AirQualityCluster.d.ts +0 -188
- package/dist/cluster/AirQualityCluster.d.ts.map +0 -1
- package/dist/cluster/AirQualityCluster.js +0 -98
- package/dist/cluster/AirQualityCluster.js.map +0 -1
- package/dist/cluster/BooleanStateConfigurationCluster.d.ts +0 -2200
- package/dist/cluster/BooleanStateConfigurationCluster.d.ts.map +0 -1
- package/dist/cluster/BooleanStateConfigurationCluster.js +0 -388
- package/dist/cluster/BooleanStateConfigurationCluster.js.map +0 -1
- package/dist/cluster/BridgedDeviceBasicInformationCluster.d.ts +0 -223
- package/dist/cluster/BridgedDeviceBasicInformationCluster.d.ts.map +0 -1
- package/dist/cluster/BridgedDeviceBasicInformationCluster.js +0 -177
- package/dist/cluster/BridgedDeviceBasicInformationCluster.js.map +0 -1
- package/dist/cluster/CarbonDioxideConcentrationMeasurementCluster.d.ts +0 -396
- package/dist/cluster/CarbonDioxideConcentrationMeasurementCluster.d.ts.map +0 -1
- package/dist/cluster/CarbonDioxideConcentrationMeasurementCluster.js +0 -30
- package/dist/cluster/CarbonDioxideConcentrationMeasurementCluster.js.map +0 -1
- package/dist/cluster/CarbonMonoxideConcentrationMeasurementCluster.d.ts +0 -396
- package/dist/cluster/CarbonMonoxideConcentrationMeasurementCluster.d.ts.map +0 -1
- package/dist/cluster/CarbonMonoxideConcentrationMeasurementCluster.js +0 -30
- package/dist/cluster/CarbonMonoxideConcentrationMeasurementCluster.js.map +0 -1
- package/dist/cluster/ConcentrationMeasurementCluster.d.ts +0 -524
- package/dist/cluster/ConcentrationMeasurementCluster.d.ts.map +0 -1
- package/dist/cluster/ConcentrationMeasurementCluster.js +0 -282
- package/dist/cluster/ConcentrationMeasurementCluster.js.map +0 -1
- package/dist/cluster/DeviceEnergyManagementCluster.d.ts +0 -7851
- package/dist/cluster/DeviceEnergyManagementCluster.d.ts.map +0 -1
- package/dist/cluster/DeviceEnergyManagementCluster.js +0 -1634
- package/dist/cluster/DeviceEnergyManagementCluster.js.map +0 -1
- package/dist/cluster/DeviceEnergyManagementModeCluster.d.ts +0 -68
- package/dist/cluster/DeviceEnergyManagementModeCluster.d.ts.map +0 -1
- package/dist/cluster/DeviceEnergyManagementModeCluster.js +0 -49
- package/dist/cluster/DeviceEnergyManagementModeCluster.js.map +0 -1
- package/dist/cluster/ElectricalEnergyMeasurementCluster.d.ts +0 -4978
- package/dist/cluster/ElectricalEnergyMeasurementCluster.d.ts.map +0 -1
- package/dist/cluster/ElectricalEnergyMeasurementCluster.js +0 -510
- package/dist/cluster/ElectricalEnergyMeasurementCluster.js.map +0 -1
- package/dist/cluster/ElectricalPowerMeasurementCluster.d.ts +0 -3250
- package/dist/cluster/ElectricalPowerMeasurementCluster.d.ts.map +0 -1
- package/dist/cluster/ElectricalPowerMeasurementCluster.js +0 -675
- package/dist/cluster/ElectricalPowerMeasurementCluster.js.map +0 -1
- package/dist/cluster/FanControlCluster.d.ts +0 -1583
- package/dist/cluster/FanControlCluster.d.ts.map +0 -1
- package/dist/cluster/FanControlCluster.js +0 -492
- package/dist/cluster/FanControlCluster.js.map +0 -1
- package/dist/cluster/FormaldehydeConcentrationMeasurementCluster.d.ts +0 -396
- package/dist/cluster/FormaldehydeConcentrationMeasurementCluster.d.ts.map +0 -1
- package/dist/cluster/FormaldehydeConcentrationMeasurementCluster.js +0 -30
- package/dist/cluster/FormaldehydeConcentrationMeasurementCluster.js.map +0 -1
- package/dist/cluster/MeasurementAccuracy.d.ts +0 -63
- package/dist/cluster/MeasurementAccuracy.d.ts.map +0 -1
- package/dist/cluster/MeasurementAccuracy.js +0 -47
- package/dist/cluster/MeasurementAccuracy.js.map +0 -1
- package/dist/cluster/MeasurementAccuracyRange.d.ts +0 -134
- package/dist/cluster/MeasurementAccuracyRange.d.ts.map +0 -1
- package/dist/cluster/MeasurementAccuracyRange.js +0 -103
- package/dist/cluster/MeasurementAccuracyRange.js.map +0 -1
- package/dist/cluster/MeasurementType.d.ts +0 -68
- package/dist/cluster/MeasurementType.d.ts.map +0 -1
- package/dist/cluster/MeasurementType.js +0 -69
- package/dist/cluster/MeasurementType.js.map +0 -1
- package/dist/cluster/NitrogenDioxideConcentrationMeasurementCluster.d.ts +0 -396
- package/dist/cluster/NitrogenDioxideConcentrationMeasurementCluster.d.ts.map +0 -1
- package/dist/cluster/NitrogenDioxideConcentrationMeasurementCluster.js +0 -34
- package/dist/cluster/NitrogenDioxideConcentrationMeasurementCluster.js.map +0 -1
- package/dist/cluster/OzoneConcentrationMeasurementCluster.d.ts +0 -395
- package/dist/cluster/OzoneConcentrationMeasurementCluster.d.ts.map +0 -1
- package/dist/cluster/OzoneConcentrationMeasurementCluster.js +0 -29
- package/dist/cluster/OzoneConcentrationMeasurementCluster.js.map +0 -1
- package/dist/cluster/Pm10ConcentrationMeasurementCluster.d.ts +0 -395
- package/dist/cluster/Pm10ConcentrationMeasurementCluster.d.ts.map +0 -1
- package/dist/cluster/Pm10ConcentrationMeasurementCluster.js +0 -29
- package/dist/cluster/Pm10ConcentrationMeasurementCluster.js.map +0 -1
- package/dist/cluster/Pm1ConcentrationMeasurementCluster.d.ts +0 -395
- package/dist/cluster/Pm1ConcentrationMeasurementCluster.d.ts.map +0 -1
- package/dist/cluster/Pm1ConcentrationMeasurementCluster.js +0 -29
- package/dist/cluster/Pm1ConcentrationMeasurementCluster.js.map +0 -1
- package/dist/cluster/Pm25ConcentrationMeasurementCluster.d.ts +0 -395
- package/dist/cluster/Pm25ConcentrationMeasurementCluster.d.ts.map +0 -1
- package/dist/cluster/Pm25ConcentrationMeasurementCluster.js +0 -29
- package/dist/cluster/Pm25ConcentrationMeasurementCluster.js.map +0 -1
- package/dist/cluster/PowerTopologyCluster.d.ts +0 -345
- package/dist/cluster/PowerTopologyCluster.d.ts.map +0 -1
- package/dist/cluster/PowerTopologyCluster.js +0 -138
- package/dist/cluster/PowerTopologyCluster.js.map +0 -1
- package/dist/cluster/RadonConcentrationMeasurementCluster.d.ts +0 -395
- package/dist/cluster/RadonConcentrationMeasurementCluster.d.ts.map +0 -1
- package/dist/cluster/RadonConcentrationMeasurementCluster.js +0 -29
- package/dist/cluster/RadonConcentrationMeasurementCluster.js.map +0 -1
- package/dist/cluster/SmokeCoAlarmCluster.d.ts +0 -1575
- package/dist/cluster/SmokeCoAlarmCluster.d.ts.map +0 -1
- package/dist/cluster/SmokeCoAlarmCluster.js +0 -603
- package/dist/cluster/SmokeCoAlarmCluster.js.map +0 -1
- package/dist/cluster/TvocCluster.d.ts +0 -465
- package/dist/cluster/TvocCluster.d.ts.map +0 -1
- package/dist/cluster/TvocCluster.js +0 -197
- package/dist/cluster/TvocCluster.js.map +0 -1
- package/frontend/build/static/js/main.cfcfbb06.js.map +0 -1
- /package/frontend/build/static/js/{main.cfcfbb06.js.LICENSE.txt → main.f86befcf.js.LICENSE.txt} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,37 @@ 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
|
+
## [1.5.4] - 2024-09-05
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- [package]: Update dependencies.
|
|
12
|
+
- [package]: Final update to matter-node.js 0.10.0.
|
|
13
|
+
- [package]: Removed all local matter 1.3 clusters now present in matter.js.
|
|
14
|
+
|
|
15
|
+
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
16
|
+
<img src="./yellow-button.png" alt="Buy me a coffee" width="120">
|
|
17
|
+
</a>
|
|
18
|
+
|
|
19
|
+
## [1.5.3] - 2024-09-04
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
- [frontend]: Added mattermdnsinterface, matteripv4address and matteripv6address to the matter settings. If no parameters are added, Matterbridge will use the settings from the frontend that are saved. The default is all interfaces. If you are facing issues with pairing, I suggest to try first to put the interfaceName (e.g eth0, WiFi) in the MdnsInterface field. When nothing is selected, NodeJs will choose the interface but sometimes the choice is not correct at all.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- [package]: Update dependencies.
|
|
28
|
+
- [package]: Update matter-node.js to 0.10.0 and removed the Scene cluster to follow matter.js.
|
|
29
|
+
- [package]: Update matter-history to 1.1.8.
|
|
30
|
+
- [package]: Removed long deprecated exports.
|
|
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
|
+
|
|
36
|
+
## [1.5.2] - 2024-08-30
|
|
37
|
+
|
|
7
38
|
### Breaking Changes
|
|
8
39
|
|
|
9
40
|
- [-bridge -childbridge]: You don't need anymore to add the parmeter -bridge or -childbridge on the command line or systemctl configuration or docker command: the default is bridge mode and if no parameter is added, Matterbridge uses the settings from the frontend that are saved.
|
|
@@ -16,8 +47,6 @@ If you like this project and find it useful, please consider giving it a star on
|
|
|
16
47
|
|
|
17
48
|
- please read this [Development guide lines](https://github.com/Luligu/matterbridge/blob/main/README-DEV.md)
|
|
18
49
|
|
|
19
|
-
## [1.5.2] - 2024-08-30
|
|
20
|
-
|
|
21
50
|
### Added
|
|
22
51
|
|
|
23
52
|
- [frontend]: Added a confirmation message for removing and disabling plugins.
|
package/README-DEV.md
CHANGED
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
|
|
17
17
|
## Guidelines on imports/exports
|
|
18
18
|
|
|
19
|
-
Matterbridge
|
|
19
|
+
Matterbridge exports from:
|
|
20
20
|
|
|
21
21
|
"matterbridge"
|
|
22
|
-
- Matterbridge and
|
|
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"
|
|
@@ -40,6 +40,8 @@ Matterbridge export from:
|
|
|
40
40
|
# **********
|
|
41
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".
|
|
42
42
|
# **********
|
|
43
|
+
A plugin will never ever install matterbridge (not dependencies and not devDependencies). Matterbridge must be linked to the plugin.
|
|
44
|
+
# **********
|
|
43
45
|
|
|
44
46
|
In the next releases I will remove the duplicated exports so please update your plugins.
|
|
45
47
|
|
package/dist/cluster/export.d.ts
CHANGED
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export * from './BooleanStateConfigurationCluster.js';
|
|
3
|
-
export * from './CarbonDioxideConcentrationMeasurementCluster.js';
|
|
4
|
-
export * from './CarbonMonoxideConcentrationMeasurementCluster.js';
|
|
5
|
-
export * from './ConcentrationMeasurementCluster.js';
|
|
6
|
-
export * from './DeviceEnergyManagementCluster.js';
|
|
7
|
-
export * from './DeviceEnergyManagementModeCluster.js';
|
|
8
|
-
export * from './ElectricalEnergyMeasurementCluster.js';
|
|
9
|
-
export * from './ElectricalPowerMeasurementCluster.js';
|
|
10
|
-
export * from './FormaldehydeConcentrationMeasurementCluster.js';
|
|
11
|
-
export * from './MeasurementAccuracy.js';
|
|
12
|
-
export * from './MeasurementAccuracyRange.js';
|
|
13
|
-
export * from './MeasurementType.js';
|
|
14
|
-
export * from './NitrogenDioxideConcentrationMeasurementCluster.js';
|
|
15
|
-
export * from './OzoneConcentrationMeasurementCluster.js';
|
|
16
|
-
export * from './Pm10ConcentrationMeasurementCluster.js';
|
|
17
|
-
export * from './Pm1ConcentrationMeasurementCluster.js';
|
|
18
|
-
export * from './Pm25ConcentrationMeasurementCluster.js';
|
|
19
|
-
export * from './PowerTopologyCluster.js';
|
|
20
|
-
export * from './RadonConcentrationMeasurementCluster.js';
|
|
21
|
-
export * from './SmokeCoAlarmCluster.js';
|
|
22
|
-
export * from './TvocCluster.js';
|
|
1
|
+
export {};
|
|
23
2
|
//# sourceMappingURL=export.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/cluster/export.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/cluster/export.ts"],"names":[],"mappings":""}
|
package/dist/cluster/export.js
CHANGED
|
@@ -1,23 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
export * from './CarbonDioxideConcentrationMeasurementCluster.js';
|
|
4
|
-
export * from './CarbonMonoxideConcentrationMeasurementCluster.js';
|
|
5
|
-
export * from './ConcentrationMeasurementCluster.js';
|
|
6
|
-
export * from './DeviceEnergyManagementCluster.js';
|
|
7
|
-
export * from './DeviceEnergyManagementModeCluster.js';
|
|
8
|
-
export * from './ElectricalEnergyMeasurementCluster.js';
|
|
9
|
-
export * from './ElectricalPowerMeasurementCluster.js';
|
|
10
|
-
export * from './FormaldehydeConcentrationMeasurementCluster.js';
|
|
11
|
-
export * from './MeasurementAccuracy.js';
|
|
12
|
-
export * from './MeasurementAccuracyRange.js';
|
|
13
|
-
export * from './MeasurementType.js';
|
|
14
|
-
export * from './NitrogenDioxideConcentrationMeasurementCluster.js';
|
|
15
|
-
export * from './OzoneConcentrationMeasurementCluster.js';
|
|
16
|
-
export * from './Pm10ConcentrationMeasurementCluster.js';
|
|
17
|
-
export * from './Pm1ConcentrationMeasurementCluster.js';
|
|
18
|
-
export * from './Pm25ConcentrationMeasurementCluster.js';
|
|
19
|
-
export * from './PowerTopologyCluster.js';
|
|
20
|
-
export * from './RadonConcentrationMeasurementCluster.js';
|
|
21
|
-
export * from './SmokeCoAlarmCluster.js';
|
|
22
|
-
export * from './TvocCluster.js';
|
|
1
|
+
export {};
|
|
2
|
+
// Nothing to export
|
|
23
3
|
//# sourceMappingURL=export.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/cluster/export.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/cluster/export.ts"],"names":[],"mappings":";AAAA,oBAAoB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -25,35 +25,13 @@ export * from '@project-chip/matter-node.js/device';
|
|
|
25
25
|
export * from '@project-chip/matter-node.js/cluster';
|
|
26
26
|
export * from '@project-chip/matter-node.js/log';
|
|
27
27
|
export * from '@project-chip/matter-node.js/datatype';
|
|
28
|
-
export * from '@project-chip/matter.js/util';
|
|
29
|
-
export * from '@project-chip/matter.js/schema';
|
|
30
|
-
export * from '@project-chip/matter.js/tlv';
|
|
28
|
+
export * from '@project-chip/matter-node.js/util';
|
|
29
|
+
export * from '@project-chip/matter-node.js/schema';
|
|
30
|
+
export * from '@project-chip/matter-node.js/tlv';
|
|
31
31
|
export * from './matterbridge.js';
|
|
32
32
|
export * from './matterbridgeDevice.js';
|
|
33
33
|
export * from './matterbridgePlatform.js';
|
|
34
34
|
export * from './matterbridgeAccessoryPlatform.js';
|
|
35
35
|
export * from './matterbridgeDynamicPlatform.js';
|
|
36
36
|
export * from './matterbridgeTypes.js';
|
|
37
|
-
export * from './cluster/AirQualityCluster.js';
|
|
38
|
-
export * from './cluster/BooleanStateConfigurationCluster.js';
|
|
39
|
-
export * from './cluster/CarbonDioxideConcentrationMeasurementCluster.js';
|
|
40
|
-
export * from './cluster/CarbonMonoxideConcentrationMeasurementCluster.js';
|
|
41
|
-
export * from './cluster/ConcentrationMeasurementCluster.js';
|
|
42
|
-
export * from './cluster/DeviceEnergyManagementCluster.js';
|
|
43
|
-
export * from './cluster/DeviceEnergyManagementModeCluster.js';
|
|
44
|
-
export * from './cluster/ElectricalEnergyMeasurementCluster.js';
|
|
45
|
-
export * from './cluster/ElectricalPowerMeasurementCluster.js';
|
|
46
|
-
export * from './cluster/FormaldehydeConcentrationMeasurementCluster.js';
|
|
47
|
-
export * from './cluster/MeasurementAccuracy.js';
|
|
48
|
-
export * from './cluster/MeasurementAccuracyRange.js';
|
|
49
|
-
export * from './cluster/MeasurementType.js';
|
|
50
|
-
export * from './cluster/NitrogenDioxideConcentrationMeasurementCluster.js';
|
|
51
|
-
export * from './cluster/OzoneConcentrationMeasurementCluster.js';
|
|
52
|
-
export * from './cluster/Pm10ConcentrationMeasurementCluster.js';
|
|
53
|
-
export * from './cluster/Pm1ConcentrationMeasurementCluster.js';
|
|
54
|
-
export * from './cluster/Pm25ConcentrationMeasurementCluster.js';
|
|
55
|
-
export * from './cluster/PowerTopologyCluster.js';
|
|
56
|
-
export * from './cluster/RadonConcentrationMeasurementCluster.js';
|
|
57
|
-
export * from './cluster/SmokeCoAlarmCluster.js';
|
|
58
|
-
export * from './cluster/TvocCluster.js';
|
|
59
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;AAEH,OAAO,8BAA8B,CAAC;AAItC,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,8BAA8B,CAAC;AAItC,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC;AAEjD,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,wBAAwB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -26,44 +26,15 @@ export * from '@project-chip/matter-node.js/device';
|
|
|
26
26
|
export * from '@project-chip/matter-node.js/cluster';
|
|
27
27
|
export * from '@project-chip/matter-node.js/log';
|
|
28
28
|
export * from '@project-chip/matter-node.js/datatype';
|
|
29
|
-
export * from '@project-chip/matter.js/util';
|
|
30
|
-
export * from '@project-chip/matter.js/schema';
|
|
31
|
-
export * from '@project-chip/matter.js/tlv';
|
|
29
|
+
export * from '@project-chip/matter-node.js/util';
|
|
30
|
+
export * from '@project-chip/matter-node.js/schema';
|
|
31
|
+
export * from '@project-chip/matter-node.js/tlv';
|
|
32
32
|
export * from './matterbridge.js';
|
|
33
33
|
export * from './matterbridgeDevice.js';
|
|
34
34
|
export * from './matterbridgePlatform.js';
|
|
35
35
|
export * from './matterbridgeAccessoryPlatform.js';
|
|
36
36
|
export * from './matterbridgeDynamicPlatform.js';
|
|
37
37
|
export * from './matterbridgeTypes.js';
|
|
38
|
-
// TODO Remove in august 2024
|
|
39
|
-
/*
|
|
40
|
-
export * from 'matter-history';
|
|
41
|
-
export * from './utils/utils.js';
|
|
42
|
-
export * from './utils/colorUtils.js';
|
|
43
|
-
*/
|
|
44
|
-
// TODO Refactor all plugins to import from matterbridge/cluster and remove in september 2024
|
|
45
|
-
export * from './cluster/AirQualityCluster.js';
|
|
46
|
-
export * from './cluster/BooleanStateConfigurationCluster.js';
|
|
47
|
-
export * from './cluster/CarbonDioxideConcentrationMeasurementCluster.js';
|
|
48
|
-
export * from './cluster/CarbonMonoxideConcentrationMeasurementCluster.js';
|
|
49
|
-
export * from './cluster/ConcentrationMeasurementCluster.js';
|
|
50
|
-
export * from './cluster/DeviceEnergyManagementCluster.js';
|
|
51
|
-
export * from './cluster/DeviceEnergyManagementModeCluster.js';
|
|
52
|
-
export * from './cluster/ElectricalEnergyMeasurementCluster.js';
|
|
53
|
-
export * from './cluster/ElectricalPowerMeasurementCluster.js';
|
|
54
|
-
export * from './cluster/FormaldehydeConcentrationMeasurementCluster.js';
|
|
55
|
-
export * from './cluster/MeasurementAccuracy.js';
|
|
56
|
-
export * from './cluster/MeasurementAccuracyRange.js';
|
|
57
|
-
export * from './cluster/MeasurementType.js';
|
|
58
|
-
export * from './cluster/NitrogenDioxideConcentrationMeasurementCluster.js';
|
|
59
|
-
export * from './cluster/OzoneConcentrationMeasurementCluster.js';
|
|
60
|
-
export * from './cluster/Pm10ConcentrationMeasurementCluster.js';
|
|
61
|
-
export * from './cluster/Pm1ConcentrationMeasurementCluster.js';
|
|
62
|
-
export * from './cluster/Pm25ConcentrationMeasurementCluster.js';
|
|
63
|
-
export * from './cluster/PowerTopologyCluster.js';
|
|
64
|
-
export * from './cluster/RadonConcentrationMeasurementCluster.js';
|
|
65
|
-
export * from './cluster/SmokeCoAlarmCluster.js';
|
|
66
|
-
export * from './cluster/TvocCluster.js';
|
|
67
38
|
const cli = '\u001B[32m';
|
|
68
39
|
const er = '\u001B[38;5;9m';
|
|
69
40
|
const rs = '\u001B[40;0m';
|
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,8BAA8B,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,8BAA8B,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uCAAuC,CAAC;AACtD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC;AAEjD,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,wBAAwB,CAAC;AAEvC,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,MAAM,YAAY,CAAC,YAAY,EAAE,CAAC;IAClC,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"}
|
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: SanitizedSessionInformation
|
|
43
|
+
matterbridgeSessionInformations: Map<string, SanitizedSessionInformation>;
|
|
44
44
|
matterbridgePaired: boolean;
|
|
45
45
|
matterbridgeConnected: boolean;
|
|
46
46
|
bridgeMode: 'bridge' | 'childbridge' | 'controller' | '';
|
|
@@ -72,6 +72,8 @@ export declare class Matterbridge extends EventEmitter {
|
|
|
72
72
|
private httpsServer;
|
|
73
73
|
private webSocketServer;
|
|
74
74
|
private mdnsInterface;
|
|
75
|
+
private ipv4address;
|
|
76
|
+
private ipv6address;
|
|
75
77
|
private port;
|
|
76
78
|
private passcode?;
|
|
77
79
|
private discriminator?;
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"matterbridge.d.ts","sourceRoot":"","sources":["../src/matterbridge.ts"],"names":[],"mappings":"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"}
|
package/dist/matterbridge.js
CHANGED
|
@@ -36,13 +36,12 @@ import { NodeStorageManager } from 'node-persist-manager';
|
|
|
36
36
|
import { AnsiLogger, UNDERLINE, UNDERLINEOFF, YELLOW, db, debugStringify, stringify, BRIGHT, RESET, er, nf, rs, wr, RED, GREEN, zb, hk, or, idn, BLUE, CYAN, nt } from 'node-ansi-logger';
|
|
37
37
|
// Matterbridge
|
|
38
38
|
import { MatterbridgeDevice } from './matterbridgeDevice.js';
|
|
39
|
-
import { BridgedDeviceBasicInformation, BridgedDeviceBasicInformationCluster } from './cluster/BridgedDeviceBasicInformationCluster.js';
|
|
40
39
|
import { logInterfaces, wait, waiter, createZip } from './utils/utils.js';
|
|
41
40
|
import { PluginManager } from './pluginManager.js';
|
|
42
41
|
import { DeviceManager } from './deviceManager.js';
|
|
43
42
|
// @project-chip/matter-node.js
|
|
44
43
|
import { CommissioningController, CommissioningServer, MatterServer } from '@project-chip/matter-node.js';
|
|
45
|
-
import { BasicInformationCluster, ClusterServer, FixedLabelCluster, GeneralCommissioning, PowerSourceCluster, SwitchCluster, ThreadNetworkDiagnosticsCluster, getClusterNameById } from '@project-chip/matter-node.js/cluster';
|
|
44
|
+
import { BasicInformationCluster, BridgedDeviceBasicInformation, BridgedDeviceBasicInformationCluster, ClusterServer, FixedLabelCluster, GeneralCommissioning, PowerSourceCluster, SwitchCluster, ThreadNetworkDiagnosticsCluster, getClusterNameById, } from '@project-chip/matter-node.js/cluster';
|
|
46
45
|
import { DeviceTypeId, VendorId } from '@project-chip/matter-node.js/datatype';
|
|
47
46
|
import { Aggregator, DeviceTypes, NodeStateInformation } from '@project-chip/matter-node.js/device';
|
|
48
47
|
import { Format, Level, Logger } from '@project-chip/matter-node.js/log';
|
|
@@ -50,6 +49,7 @@ import { ManualPairingCodeCodec, QrCodeSchema } from '@project-chip/matter-node.
|
|
|
50
49
|
import { StorageBackendDisk, StorageBackendJsonFile, StorageManager } from '@project-chip/matter-node.js/storage';
|
|
51
50
|
import { getParameter, getIntParameter, hasParameter } from '@project-chip/matter-node.js/util';
|
|
52
51
|
import { CryptoNode } from '@project-chip/matter-node.js/crypto';
|
|
52
|
+
import { Specification } from '@project-chip/matter-node.js/model';
|
|
53
53
|
// Default colors
|
|
54
54
|
const plg = '\u001B[38;5;33m';
|
|
55
55
|
const dev = '\u001B[38;5;79m';
|
|
@@ -94,6 +94,9 @@ export class Matterbridge extends EventEmitter {
|
|
|
94
94
|
fileLogger: false,
|
|
95
95
|
matterLoggerLevel: Level.INFO,
|
|
96
96
|
matterFileLogger: false,
|
|
97
|
+
mattermdnsinterface: undefined,
|
|
98
|
+
matteripv4address: undefined,
|
|
99
|
+
matteripv6address: undefined,
|
|
97
100
|
restartRequired: false,
|
|
98
101
|
refreshRequired: false,
|
|
99
102
|
};
|
|
@@ -107,7 +110,8 @@ export class Matterbridge extends EventEmitter {
|
|
|
107
110
|
matterbridgeQrPairingCode = undefined;
|
|
108
111
|
matterbridgeManualPairingCode = undefined;
|
|
109
112
|
matterbridgeFabricInformations = [];
|
|
110
|
-
matterbridgeSessionInformations = [];
|
|
113
|
+
// public matterbridgeSessionInformations: SanitizedSessionInformation[] = [];
|
|
114
|
+
matterbridgeSessionInformations = new Map();
|
|
111
115
|
matterbridgePaired = false;
|
|
112
116
|
matterbridgeConnected = false;
|
|
113
117
|
bridgeMode = '';
|
|
@@ -142,6 +146,8 @@ export class Matterbridge extends EventEmitter {
|
|
|
142
146
|
webSocketServer;
|
|
143
147
|
// Matter
|
|
144
148
|
mdnsInterface; // matter server mdnsInterface: e.g. 'eth0' or 'wlan0' or 'WiFi'
|
|
149
|
+
ipv4address; // matter commissioning server listeningAddressIpv4
|
|
150
|
+
ipv6address; // matter commissioning server listeningAddressIpv6
|
|
145
151
|
port = 5540; // first commissioning server port
|
|
146
152
|
passcode; // first commissioning server passcode
|
|
147
153
|
discriminator; // first commissioning server discriminator
|
|
@@ -201,8 +207,6 @@ export class Matterbridge extends EventEmitter {
|
|
|
201
207
|
* @returns A Promise that resolves when the initialization is complete.
|
|
202
208
|
*/
|
|
203
209
|
async initialize() {
|
|
204
|
-
// Set the interface to use for the matter server mdnsInterface
|
|
205
|
-
this.mdnsInterface = getParameter('mdnsinterface');
|
|
206
210
|
// Set the first port to use for the commissioning server (will be incremented in childbridge mode)
|
|
207
211
|
this.port = getIntParameter('port') ?? 5540;
|
|
208
212
|
// Set the first passcode to use for the commissioning server (will be incremented in childbridge mode)
|
|
@@ -301,6 +305,33 @@ export class Matterbridge extends EventEmitter {
|
|
|
301
305
|
});
|
|
302
306
|
}
|
|
303
307
|
this.log.debug(`Matter logLevel: ${Logger.defaultLogLevel} fileLoger: ${this.matterbridgeInformation.matterFileLogger}.`);
|
|
308
|
+
// Set the interface to use for the matter server mdnsInterface
|
|
309
|
+
if (hasParameter('mdnsinterface')) {
|
|
310
|
+
this.mdnsInterface = getParameter('mdnsinterface');
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
this.mdnsInterface = await this.nodeContext?.get('mattermdnsinterface', undefined);
|
|
314
|
+
if (this.mdnsInterface === '')
|
|
315
|
+
this.mdnsInterface = undefined;
|
|
316
|
+
}
|
|
317
|
+
// Set the listeningAddressIpv4 for the matter commissioning server
|
|
318
|
+
if (hasParameter('ipv4address')) {
|
|
319
|
+
this.ipv4address = getParameter('ipv4address');
|
|
320
|
+
}
|
|
321
|
+
else {
|
|
322
|
+
this.ipv4address = await this.nodeContext?.get('matteripv4address', undefined);
|
|
323
|
+
if (this.ipv4address === '')
|
|
324
|
+
this.ipv4address = undefined;
|
|
325
|
+
}
|
|
326
|
+
// Set the listeningAddressIpv6 for the matter commissioning server
|
|
327
|
+
if (hasParameter('ipv6address')) {
|
|
328
|
+
this.ipv6address = getParameter('ipv6address');
|
|
329
|
+
}
|
|
330
|
+
else {
|
|
331
|
+
this.ipv6address = await this.nodeContext?.get('matteripv6address', undefined);
|
|
332
|
+
if (this.ipv6address === '')
|
|
333
|
+
this.ipv6address = undefined;
|
|
334
|
+
}
|
|
304
335
|
// Initialize PluginManager
|
|
305
336
|
this.plugins = new PluginManager(this);
|
|
306
337
|
await this.plugins.loadFromStorage();
|
|
@@ -1607,7 +1638,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1607
1638
|
};
|
|
1608
1639
|
this.log.info('Commissioning with options:', options);
|
|
1609
1640
|
const nodeId = await this.commissioningController.commissionNode(options);
|
|
1610
|
-
this.log.info(`Commissioning successfully done with nodeId: ${nodeId
|
|
1641
|
+
this.log.info(`Commissioning successfully done with nodeId: ${nodeId}`);
|
|
1611
1642
|
this.log.info('ActiveSessionInformation:', this.commissioningController.getActiveSessionInformation());
|
|
1612
1643
|
} // (hasParameter('pairingcode'))
|
|
1613
1644
|
if (hasParameter('unpairall')) {
|
|
@@ -1816,7 +1847,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1816
1847
|
}
|
|
1817
1848
|
}
|
|
1818
1849
|
const matterServer = new MatterServer(storageManager, { mdnsInterface: this.mdnsInterface });
|
|
1819
|
-
this.log.debug(
|
|
1850
|
+
this.log.debug(`Created matter server with mdnsInterface: ${this.mdnsInterface ?? 'all available interfaces'}`);
|
|
1820
1851
|
return matterServer;
|
|
1821
1852
|
}
|
|
1822
1853
|
/**
|
|
@@ -1880,6 +1911,8 @@ export class Matterbridge extends EventEmitter {
|
|
|
1880
1911
|
hardwareVersionString: await context.get('hardwareVersionString', '1.0.0'),
|
|
1881
1912
|
reachable: true,
|
|
1882
1913
|
capabilityMinima: { caseSessionsPerFabric: 3, subscriptionsPerFabric: 3 },
|
|
1914
|
+
specificationVersion: Specification.SPECIFICATION_VERSION,
|
|
1915
|
+
maxPathsPerInvoke: 1,
|
|
1883
1916
|
}, {}, {
|
|
1884
1917
|
startUp: true,
|
|
1885
1918
|
shutDown: true,
|
|
@@ -1914,10 +1947,40 @@ export class Matterbridge extends EventEmitter {
|
|
|
1914
1947
|
this.log.debug(`Creating matter commissioning server for plugin ${plg}${pluginName}${db} with softwareVersion ${softwareVersion} softwareVersionString ${softwareVersionString}`);
|
|
1915
1948
|
this.log.debug(`Creating matter commissioning server for plugin ${plg}${pluginName}${db} with hardwareVersion ${hardwareVersion} hardwareVersionString ${hardwareVersionString}`);
|
|
1916
1949
|
this.log.debug(`Creating matter commissioning server for plugin ${plg}${pluginName}${db} with nodeLabel '${productName}' port ${this.port} passcode ${this.passcode} discriminator ${this.discriminator}`);
|
|
1950
|
+
// Validate ipv4address
|
|
1951
|
+
if (this.ipv4address) {
|
|
1952
|
+
const networkInterfaces = os.networkInterfaces();
|
|
1953
|
+
const availableAddresses = Object.values(networkInterfaces)
|
|
1954
|
+
.flat()
|
|
1955
|
+
.filter((iface) => iface !== undefined && iface.family === 'IPv4' && !iface.internal)
|
|
1956
|
+
.map((iface) => iface.address);
|
|
1957
|
+
if (!availableAddresses.includes(this.ipv4address)) {
|
|
1958
|
+
this.log.error(`Invalid ipv4address: ${this.ipv4address}. Available addresses are: ${availableAddresses.join(', ')}. Using all available addresses.`);
|
|
1959
|
+
this.mdnsInterface = undefined;
|
|
1960
|
+
}
|
|
1961
|
+
else {
|
|
1962
|
+
this.log.info(`Using ipv4address '${this.ipv4address}' for the Matter commissioning server.`);
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1965
|
+
// Validate ipv6address
|
|
1966
|
+
if (this.ipv6address) {
|
|
1967
|
+
const networkInterfaces = os.networkInterfaces();
|
|
1968
|
+
const availableAddresses = Object.values(networkInterfaces)
|
|
1969
|
+
.flat()
|
|
1970
|
+
.filter((iface) => iface !== undefined && iface.family === 'IPv6' && !iface.internal)
|
|
1971
|
+
.map((iface) => iface.address);
|
|
1972
|
+
if (!availableAddresses.includes(this.ipv6address)) {
|
|
1973
|
+
this.log.error(`Invalid ipv6address: ${this.ipv6address}. Available addresses are: ${availableAddresses.join(', ')}. Using all available addresses.`);
|
|
1974
|
+
this.mdnsInterface = undefined;
|
|
1975
|
+
}
|
|
1976
|
+
else {
|
|
1977
|
+
this.log.info(`Using ipv6address '${this.ipv6address}' for the Matter commissioning server.`);
|
|
1978
|
+
}
|
|
1979
|
+
}
|
|
1917
1980
|
const commissioningServer = new CommissioningServer({
|
|
1918
1981
|
port: this.port++,
|
|
1919
|
-
listeningAddressIpv4:
|
|
1920
|
-
listeningAddressIpv6:
|
|
1982
|
+
listeningAddressIpv4: this.ipv4address,
|
|
1983
|
+
listeningAddressIpv6: this.ipv6address,
|
|
1921
1984
|
passcode: this.passcode,
|
|
1922
1985
|
discriminator: this.discriminator,
|
|
1923
1986
|
deviceName,
|
|
@@ -1951,7 +2014,10 @@ export class Matterbridge extends EventEmitter {
|
|
|
1951
2014
|
if (this.bridgeMode === 'bridge') {
|
|
1952
2015
|
this.matterbridgePaired = true;
|
|
1953
2016
|
this.matterbridgeConnected = true;
|
|
1954
|
-
this.matterbridgeSessionInformations = this.sanitizeSessionInformation(sessionInformations);
|
|
2017
|
+
// this.matterbridgeSessionInformations = this.sanitizeSessionInformation(sessionInformations);
|
|
2018
|
+
sessionInformations.forEach((session) => {
|
|
2019
|
+
this.matterbridgeSessionInformations.set(session.name, this.sanitizeSessionInformation([session])[0]);
|
|
2020
|
+
});
|
|
1955
2021
|
}
|
|
1956
2022
|
if (this.bridgeMode === 'childbridge') {
|
|
1957
2023
|
const plugin = this.plugins.get(pluginName);
|
|
@@ -2001,7 +2067,8 @@ export class Matterbridge extends EventEmitter {
|
|
|
2001
2067
|
if (pluginName === 'Matterbridge') {
|
|
2002
2068
|
await this.matterbridgeContext?.clearAll();
|
|
2003
2069
|
this.matterbridgeFabricInformations = [];
|
|
2004
|
-
this.matterbridgeSessionInformations = [];
|
|
2070
|
+
// this.matterbridgeSessionInformations = [];
|
|
2071
|
+
this.matterbridgeSessionInformations.clear();
|
|
2005
2072
|
this.matterbridgePaired = false;
|
|
2006
2073
|
this.matterbridgeConnected = false;
|
|
2007
2074
|
}
|
|
@@ -2154,7 +2221,8 @@ export class Matterbridge extends EventEmitter {
|
|
|
2154
2221
|
this.matterbridgeQrPairingCode = qrPairingCode;
|
|
2155
2222
|
this.matterbridgeManualPairingCode = manualPairingCode;
|
|
2156
2223
|
this.matterbridgeFabricInformations = [];
|
|
2157
|
-
this.matterbridgeSessionInformations = [];
|
|
2224
|
+
// this.matterbridgeSessionInformations = [];
|
|
2225
|
+
this.matterbridgeSessionInformations.clear();
|
|
2158
2226
|
this.matterbridgePaired = false;
|
|
2159
2227
|
this.matterbridgeConnected = false;
|
|
2160
2228
|
}
|
|
@@ -2180,7 +2248,8 @@ export class Matterbridge extends EventEmitter {
|
|
|
2180
2248
|
});
|
|
2181
2249
|
if (pluginName === 'Matterbridge') {
|
|
2182
2250
|
this.matterbridgeFabricInformations = this.sanitizeFabricInformations(fabricInfo);
|
|
2183
|
-
this.matterbridgeSessionInformations = [];
|
|
2251
|
+
// this.matterbridgeSessionInformations = [];
|
|
2252
|
+
this.matterbridgeSessionInformations.clear();
|
|
2184
2253
|
this.matterbridgePaired = true;
|
|
2185
2254
|
}
|
|
2186
2255
|
if (pluginName !== 'Matterbridge') {
|
|
@@ -2406,7 +2475,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
2406
2475
|
this.wssSendMessage('spawn', this.log.now(), 'Matterbridge:spawn', `child process closed with code ${code} and signal ${signal}`);
|
|
2407
2476
|
if (code === 0) {
|
|
2408
2477
|
if (cmdLine.startsWith('npm install -g'))
|
|
2409
|
-
this.log.notice(`${cmdLine.replace('npm install -g ', '')} installed correctly`);
|
|
2478
|
+
this.log.notice(`${cmdLine.replace('npm install -g ', '').replace('--verbose', '')} installed correctly`);
|
|
2410
2479
|
this.log.debug(`Child process "${cmdLine}" closed with code ${code} and signal ${signal}`);
|
|
2411
2480
|
resolve();
|
|
2412
2481
|
}
|
|
@@ -2510,7 +2579,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
2510
2579
|
if (this.systemInformation.ipv4Address !== '')
|
|
2511
2580
|
this.log.info(`The frontend http server is listening on ${UNDERLINE}http://${this.systemInformation.ipv4Address}:${port}${UNDERLINEOFF}${rs}`);
|
|
2512
2581
|
if (this.systemInformation.ipv6Address !== '')
|
|
2513
|
-
this.log.
|
|
2582
|
+
this.log.info(`The frontend http server is listening on ${UNDERLINE}http://[${this.systemInformation.ipv6Address}]:${port}${UNDERLINEOFF}${rs}`);
|
|
2514
2583
|
});
|
|
2515
2584
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2516
2585
|
this.httpServer.on('error', (error) => {
|
|
@@ -2563,7 +2632,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
2563
2632
|
if (this.systemInformation.ipv4Address !== '')
|
|
2564
2633
|
this.log.info(`The frontend https server is listening on ${UNDERLINE}https://${this.systemInformation.ipv4Address}:${port}${UNDERLINEOFF}${rs}`);
|
|
2565
2634
|
if (this.systemInformation.ipv6Address !== '')
|
|
2566
|
-
this.log.
|
|
2635
|
+
this.log.info(`The frontend https server is listening on ${UNDERLINE}https://[${this.systemInformation.ipv6Address}]:${port}${UNDERLINEOFF}${rs}`);
|
|
2567
2636
|
});
|
|
2568
2637
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2569
2638
|
this.httpsServer.on('error', (error) => {
|
|
@@ -2648,12 +2717,17 @@ export class Matterbridge extends EventEmitter {
|
|
|
2648
2717
|
this.matterbridgeInformation.restartMode = this.restartMode;
|
|
2649
2718
|
this.matterbridgeInformation.loggerLevel = this.log.logLevel;
|
|
2650
2719
|
this.matterbridgeInformation.matterLoggerLevel = Logger.defaultLogLevel;
|
|
2720
|
+
this.matterbridgeInformation.mattermdnsinterface = (await this.nodeContext?.get('mattermdnsinterface', '')) || '';
|
|
2721
|
+
this.matterbridgeInformation.matteripv4address = (await this.nodeContext?.get('matteripv4address', '')) || '';
|
|
2722
|
+
this.matterbridgeInformation.matteripv6address = (await this.nodeContext?.get('matteripv6address', '')) || '';
|
|
2651
2723
|
this.matterbridgeInformation.matterbridgePaired = this.matterbridgePaired;
|
|
2652
2724
|
this.matterbridgeInformation.matterbridgeConnected = this.matterbridgeConnected;
|
|
2653
2725
|
this.matterbridgeInformation.matterbridgeQrPairingCode = this.matterbridgeQrPairingCode;
|
|
2654
2726
|
this.matterbridgeInformation.matterbridgeManualPairingCode = this.matterbridgeManualPairingCode;
|
|
2655
2727
|
this.matterbridgeInformation.matterbridgeFabricInformations = this.matterbridgeFabricInformations;
|
|
2656
|
-
this.matterbridgeInformation.matterbridgeSessionInformations = this.matterbridgeSessionInformations;
|
|
2728
|
+
// this.matterbridgeInformation.matterbridgeSessionInformations = this.matterbridgeSessionInformations;
|
|
2729
|
+
this.matterbridgeInformation.matterbridgeSessionInformations = Array.from(this.matterbridgeSessionInformations.values());
|
|
2730
|
+
// console.log('this.matterbridgeSessionInformations:', this.matterbridgeSessionInformations);
|
|
2657
2731
|
if (this.profile)
|
|
2658
2732
|
this.matterbridgeInformation.profile = this.profile;
|
|
2659
2733
|
// const response = { wssHost, ssl: hasParameter('ssl'), qrPairingCode, manualPairingCode, systemInformation: this.systemInformation, matterbridgeInformation: this.matterbridgeInformation };
|
|
@@ -2941,7 +3015,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
2941
3015
|
}
|
|
2942
3016
|
// Handle the command setmbloglevel from Settings
|
|
2943
3017
|
if (command === 'setmjloglevel') {
|
|
2944
|
-
this.log.debug('Matter.js log level
|
|
3018
|
+
this.log.debug('Matter.js log level:', param);
|
|
2945
3019
|
if (param === 'Debug') {
|
|
2946
3020
|
Logger.defaultLogLevel = Level.DEBUG;
|
|
2947
3021
|
}
|
|
@@ -2964,6 +3038,33 @@ export class Matterbridge extends EventEmitter {
|
|
|
2964
3038
|
res.json({ message: 'Command received' });
|
|
2965
3039
|
return;
|
|
2966
3040
|
}
|
|
3041
|
+
// Handle the command setmdnsinterface from Settings
|
|
3042
|
+
if (command === 'setmdnsinterface') {
|
|
3043
|
+
param = param.slice(1, -1); // Remove the first and last characters *mdns*
|
|
3044
|
+
this.matterbridgeInformation.mattermdnsinterface = param;
|
|
3045
|
+
this.log.debug('Matter.js mdns interface:', param === '' ? 'All interfaces' : param);
|
|
3046
|
+
await this.nodeContext?.set('mattermdnsinterface', param);
|
|
3047
|
+
res.json({ message: 'Command received' });
|
|
3048
|
+
return;
|
|
3049
|
+
}
|
|
3050
|
+
// Handle the command setipv4address from Settings
|
|
3051
|
+
if (command === 'setipv4address') {
|
|
3052
|
+
param = param.slice(1, -1); // Remove the first and last characters *ip*
|
|
3053
|
+
this.matterbridgeInformation.matteripv4address = param;
|
|
3054
|
+
this.log.debug('Matter.js ipv4 address:', param === '' ? 'All ipv4 addresses' : param);
|
|
3055
|
+
await this.nodeContext?.set('matteripv4address', param);
|
|
3056
|
+
res.json({ message: 'Command received' });
|
|
3057
|
+
return;
|
|
3058
|
+
}
|
|
3059
|
+
// Handle the command setipv6address from Settings
|
|
3060
|
+
if (command === 'setipv6address') {
|
|
3061
|
+
param = param.slice(1, -1); // Remove the first and last characters *ip*
|
|
3062
|
+
this.matterbridgeInformation.matteripv6address = param;
|
|
3063
|
+
this.log.debug('Matter.js ipv6 address:', param === '' ? 'All ipv6 addresses' : param);
|
|
3064
|
+
await this.nodeContext?.set('matteripv6address', param);
|
|
3065
|
+
res.json({ message: 'Command received' });
|
|
3066
|
+
return;
|
|
3067
|
+
}
|
|
2967
3068
|
// Handle the command setmbloglevel from Settings
|
|
2968
3069
|
if (command === 'setmblogfile') {
|
|
2969
3070
|
this.log.debug('Matterbridge file log:', param);
|
|
@@ -3038,7 +3139,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
3038
3139
|
if (command === 'update') {
|
|
3039
3140
|
this.log.info('Updating matterbridge...');
|
|
3040
3141
|
try {
|
|
3041
|
-
await this.spawnCommand('npm', ['install', '-g', 'matterbridge']);
|
|
3142
|
+
await this.spawnCommand('npm', ['install', '-g', 'matterbridge', '--verbose']);
|
|
3042
3143
|
this.log.info('Matterbridge has been updated. Full restart required.');
|
|
3043
3144
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3044
3145
|
}
|
|
@@ -3073,7 +3174,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
3073
3174
|
param = param.replace(/\*/g, '\\');
|
|
3074
3175
|
this.log.info(`Installing plugin ${plg}${param}${nf}...`);
|
|
3075
3176
|
try {
|
|
3076
|
-
await this.spawnCommand('npm', ['install', '-g', param]);
|
|
3177
|
+
await this.spawnCommand('npm', ['install', '-g', param, '--verbose']);
|
|
3077
3178
|
this.log.info(`Plugin ${plg}${param}${nf} installed. Full restart required.`);
|
|
3078
3179
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3079
3180
|
}
|
|
@@ -3190,6 +3291,8 @@ export class Matterbridge extends EventEmitter {
|
|
|
3190
3291
|
attributes += `Temperature: ${clusterServer.attributes.localTemperature.getLocal() / 100}°C `;
|
|
3191
3292
|
if (clusterServer.name === 'LevelControl')
|
|
3192
3293
|
attributes += `Level: ${clusterServer.getCurrentLevelAttribute()}% `;
|
|
3294
|
+
if (clusterServer.name === 'ColorControl' && clusterServer.isAttributeSupportedByName('currentX'))
|
|
3295
|
+
attributes += `X: ${Math.round(clusterServer.getCurrentXAttribute())} Y: ${Math.round(clusterServer.getCurrentYAttribute())} `;
|
|
3193
3296
|
if (clusterServer.name === 'ColorControl' && clusterServer.isAttributeSupportedByName('currentHue'))
|
|
3194
3297
|
attributes += `Hue: ${Math.round(clusterServer.getCurrentHueAttribute())} Saturation: ${Math.round(clusterServer.getCurrentSaturationAttribute())}% `;
|
|
3195
3298
|
if (clusterServer.name === 'ColorControl' && clusterServer.isAttributeSupportedByName('colorTemperatureMireds'))
|
|
@@ -3198,6 +3301,10 @@ export class Matterbridge extends EventEmitter {
|
|
|
3198
3301
|
attributes += `Contact: ${clusterServer.getStateValueAttribute()} `;
|
|
3199
3302
|
if (clusterServer.name === 'BooleanStateConfiguration' && clusterServer.isAttributeSupportedByName('alarmsActive'))
|
|
3200
3303
|
attributes += `Active alarms: ${stringify(clusterServer.getAlarmsActiveAttribute())} `;
|
|
3304
|
+
if (clusterServer.name === 'SmokeCoAlarm' && clusterServer.isAttributeSupportedByName('smokeState'))
|
|
3305
|
+
attributes += `Smoke: ${clusterServer.getSmokeStateAttribute()} `;
|
|
3306
|
+
if (clusterServer.name === 'SmokeCoAlarm' && clusterServer.isAttributeSupportedByName('coState'))
|
|
3307
|
+
attributes += `Co: ${clusterServer.getCoStateAttribute()} `;
|
|
3201
3308
|
if (clusterServer.name === 'FanControl')
|
|
3202
3309
|
attributes += `Mode: ${clusterServer.getFanModeAttribute()} Speed: ${clusterServer.getPercentCurrentAttribute()} `;
|
|
3203
3310
|
if (clusterServer.name === 'FanControl' && clusterServer.isAttributeSupportedByName('speedCurrent'))
|