matterbridge 1.7.3 → 2.0.0-edge.3

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 (102) hide show
  1. package/CHANGELOG.md +30 -1
  2. package/dist/cli.js +3 -39
  3. package/dist/cluster/export.js +0 -2
  4. package/dist/defaultConfigSchema.js +0 -23
  5. package/dist/deviceManager.js +1 -26
  6. package/dist/frontend.js +1199 -0
  7. package/dist/index.js +1 -36
  8. package/dist/logger/export.js +0 -1
  9. package/dist/matter/export.js +0 -5
  10. package/dist/matterbridge.js +521 -2681
  11. package/dist/matterbridgeAccessoryPlatform.js +0 -33
  12. package/dist/matterbridgeBehaviors.js +23 -31
  13. package/dist/matterbridgeDeviceTypes.js +11 -82
  14. package/dist/matterbridgeDynamicPlatform.js +0 -33
  15. package/dist/matterbridgeEndpoint.js +45 -1145
  16. package/dist/matterbridgePlatform.js +14 -145
  17. package/dist/matterbridgeTypes.js +3 -24
  18. package/dist/pluginManager.js +5 -247
  19. package/dist/storage/export.js +0 -1
  20. package/dist/utils/colorUtils.js +2 -205
  21. package/dist/utils/export.js +0 -1
  22. package/dist/utils/utils.js +7 -252
  23. package/frontend/build/asset-manifest.json +3 -3
  24. package/frontend/build/index.html +1 -1
  25. package/frontend/build/static/js/{main.6bbd1772.js → main.6df4ebe4.js} +3 -3
  26. package/frontend/build/static/js/main.6df4ebe4.js.map +1 -0
  27. package/npm-shrinkwrap.json +9 -9
  28. package/package.json +2 -3
  29. package/dist/cli.d.ts +0 -25
  30. package/dist/cli.d.ts.map +0 -1
  31. package/dist/cli.js.map +0 -1
  32. package/dist/cluster/export.d.ts +0 -2
  33. package/dist/cluster/export.d.ts.map +0 -1
  34. package/dist/cluster/export.js.map +0 -1
  35. package/dist/defaultConfigSchema.d.ts +0 -27
  36. package/dist/defaultConfigSchema.d.ts.map +0 -1
  37. package/dist/defaultConfigSchema.js.map +0 -1
  38. package/dist/deviceManager.d.ts +0 -46
  39. package/dist/deviceManager.d.ts.map +0 -1
  40. package/dist/deviceManager.js.map +0 -1
  41. package/dist/index.d.ts +0 -40
  42. package/dist/index.d.ts.map +0 -1
  43. package/dist/index.js.map +0 -1
  44. package/dist/logger/export.d.ts +0 -2
  45. package/dist/logger/export.d.ts.map +0 -1
  46. package/dist/logger/export.js.map +0 -1
  47. package/dist/matter/export.d.ts +0 -11
  48. package/dist/matter/export.d.ts.map +0 -1
  49. package/dist/matter/export.js.map +0 -1
  50. package/dist/matterbridge.d.ts +0 -483
  51. package/dist/matterbridge.d.ts.map +0 -1
  52. package/dist/matterbridge.js.map +0 -1
  53. package/dist/matterbridgeAccessoryPlatform.d.ts +0 -39
  54. package/dist/matterbridgeAccessoryPlatform.d.ts.map +0 -1
  55. package/dist/matterbridgeAccessoryPlatform.js.map +0 -1
  56. package/dist/matterbridgeBehaviors.d.ts +0 -942
  57. package/dist/matterbridgeBehaviors.d.ts.map +0 -1
  58. package/dist/matterbridgeBehaviors.js.map +0 -1
  59. package/dist/matterbridgeDevice.d.ts +0 -7077
  60. package/dist/matterbridgeDevice.d.ts.map +0 -1
  61. package/dist/matterbridgeDevice.js +0 -2736
  62. package/dist/matterbridgeDevice.js.map +0 -1
  63. package/dist/matterbridgeDeviceTypes.d.ts +0 -109
  64. package/dist/matterbridgeDeviceTypes.d.ts.map +0 -1
  65. package/dist/matterbridgeDeviceTypes.js.map +0 -1
  66. package/dist/matterbridgeDynamicPlatform.d.ts +0 -39
  67. package/dist/matterbridgeDynamicPlatform.d.ts.map +0 -1
  68. package/dist/matterbridgeDynamicPlatform.js.map +0 -1
  69. package/dist/matterbridgeEdge.d.ts +0 -91
  70. package/dist/matterbridgeEdge.d.ts.map +0 -1
  71. package/dist/matterbridgeEdge.js +0 -1077
  72. package/dist/matterbridgeEdge.js.map +0 -1
  73. package/dist/matterbridgeEndpoint.d.ts +0 -10156
  74. package/dist/matterbridgeEndpoint.d.ts.map +0 -1
  75. package/dist/matterbridgeEndpoint.js.map +0 -1
  76. package/dist/matterbridgePlatform.d.ts +0 -168
  77. package/dist/matterbridgePlatform.d.ts.map +0 -1
  78. package/dist/matterbridgePlatform.js.map +0 -1
  79. package/dist/matterbridgeTypes.d.ts +0 -172
  80. package/dist/matterbridgeTypes.d.ts.map +0 -1
  81. package/dist/matterbridgeTypes.js.map +0 -1
  82. package/dist/matterbridgeWebsocket.d.ts +0 -49
  83. package/dist/matterbridgeWebsocket.d.ts.map +0 -1
  84. package/dist/matterbridgeWebsocket.js +0 -325
  85. package/dist/matterbridgeWebsocket.js.map +0 -1
  86. package/dist/pluginManager.d.ts +0 -238
  87. package/dist/pluginManager.d.ts.map +0 -1
  88. package/dist/pluginManager.js.map +0 -1
  89. package/dist/storage/export.d.ts +0 -2
  90. package/dist/storage/export.d.ts.map +0 -1
  91. package/dist/storage/export.js.map +0 -1
  92. package/dist/utils/colorUtils.d.ts +0 -61
  93. package/dist/utils/colorUtils.d.ts.map +0 -1
  94. package/dist/utils/colorUtils.js.map +0 -1
  95. package/dist/utils/export.d.ts +0 -3
  96. package/dist/utils/export.d.ts.map +0 -1
  97. package/dist/utils/export.js.map +0 -1
  98. package/dist/utils/utils.d.ts +0 -221
  99. package/dist/utils/utils.d.ts.map +0 -1
  100. package/dist/utils/utils.js.map +0 -1
  101. package/frontend/build/static/js/main.6bbd1772.js.map +0 -1
  102. /package/frontend/build/static/js/{main.6bbd1772.js.LICENSE.txt → main.6df4ebe4.js.LICENSE.txt} +0 -0
package/CHANGELOG.md CHANGED
@@ -15,11 +15,40 @@ Tamer (https://github.com/tammeryousef1006) has created the Matterbridge Discord
15
15
 
16
16
  ### Breaking Changes
17
17
 
18
- Matterbridge edge is now released. The default mode is still the normal mode to allow the storage conversion. See https://github.com/Luligu/matterbridge/blob/dev/README-EDGE.md to manually switch to edge mode after the conversion is done.
18
+ Starting from v. 2.0.0 Matterbridge is running only in mode edge (no parameter needed).
19
+ The legacy old api have been completely removed.
19
20
 
20
21
  The frontend has a new dark and light mode. The dark mode is now the default mode.
21
22
  It is possible to change the mode (Classic, Dark or Light) in Settings, Matterbridge settings.
22
23
 
24
+ ## [2.0.0-edge.3] - 2025-01-16
25
+
26
+ ### Added
27
+
28
+ - [behavior]: Added MatterbridgeValveConfigurationAndControlServer behavior with open close command.
29
+
30
+ ### Changed
31
+
32
+ - [legacy]: Removed MatterbridgeDevice and MatterbridgeEdge classes.
33
+ - [factoryreset]: Now it deletes also the backup files and backup directories.
34
+ - [mattebridge]: Restyled the Matterbridge class and created the Frontend class that manages the frontend express and websocket api calls.
35
+ - [frontend]: Frontend v.2.3.12.
36
+ - [iconView]: Improved render for energySensor adding voltage, current and power.
37
+ - [iconView]: Improved render for PowerSource adding battery voltage.
38
+ - [jest]: Refactor all tests for edge.
39
+ - [frontend]: WebSocketProvider added a startTimeout of 300 sec. to start ping.
40
+ - [frontend]: WebSocketProvider changed pingIntervalSeconds to 60 sec. and offlineTimeoutSeconds to 50 sec.
41
+ - [frontend]: Search on select is no more case sensitive.
42
+ - [package]: Update dependencies.
43
+
44
+ ### Fixed
45
+
46
+ - [sessions]: Fixed the case when Active session was not reporting correctly.
47
+
48
+ <a href="https://www.buymeacoffee.com/luligugithub">
49
+ <img src="./yellow-button.png" alt="Buy me a coffee" width="120">
50
+ </a>
51
+
23
52
  ## [1.7.3] - 2025-01-11
24
53
 
25
54
  ### Added
package/dist/cli.js CHANGED
@@ -1,29 +1,5 @@
1
1
  #!/usr/bin/env node
2
- /**
3
- * This file contains the CLI entry point of Matterbridge.
4
- *
5
- * @file cli.ts
6
- * @author Luca Liguori
7
- * @date 2023-12-29
8
- * @version 1.0.11
9
- *
10
- * Copyright 2023, 2024, 2025 Luca Liguori.
11
- *
12
- * Licensed under the Apache License, Version 2.0 (the "License");
13
- * you may not use this file except in compliance with the License.
14
- * You may obtain a copy of the License at
15
- *
16
- * http://www.apache.org/licenses/LICENSE-2.0
17
- *
18
- * Unless required by applicable law or agreed to in writing, software
19
- * distributed under the License is distributed on an "AS IS" BASIS,
20
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
- * See the License for the specific language governing permissions and
22
- * limitations under the License. *
23
- */
24
- /* eslint-disable no-console */
25
2
  import { Matterbridge } from './matterbridge.js';
26
- import { MatterbridgeEdge } from './matterbridgeEdge.js';
27
3
  let instance;
28
4
  const cli = '\u001B[32m';
29
5
  const er = '\u001B[38;5;9m';
@@ -31,10 +7,7 @@ const rs = '\u001B[40;0m';
31
7
  async function main() {
32
8
  if (process.argv.includes('-debug'))
33
9
  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);
10
+ instance = await Matterbridge.loadInstance(true);
38
11
  registerHandlers();
39
12
  if (process.argv.includes('-debug'))
40
13
  console.log(cli + `CLI: ${process.argv.includes('-edge') ? 'MatterbridgeEdge' : 'Matterbridge'}.loadInstance() exited` + rs);
@@ -55,25 +28,16 @@ async function shutdown() {
55
28
  async function restart() {
56
29
  if (process.argv.includes('-debug'))
57
30
  console.log(cli + 'CLI: received restart event, loading...' + rs);
58
- if (process.argv.includes('-edge'))
59
- instance = await MatterbridgeEdge.loadInstance(true);
60
- else
61
- instance = await Matterbridge.loadInstance(true);
31
+ instance = await Matterbridge.loadInstance(true);
62
32
  registerHandlers();
63
33
  }
64
34
  async function update() {
65
35
  if (process.argv.includes('-debug'))
66
36
  console.log(cli + 'CLI: received update event, updating...' + rs);
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);
37
+ instance = await Matterbridge.loadInstance(true);
72
38
  registerHandlers();
73
39
  }
74
40
  process.title = 'matterbridge';
75
- // Run the main function
76
41
  main().catch((error) => {
77
42
  console.error(er + `CLI: Matterbridge.loadInstance() failed with error: ${error}` + rs);
78
43
  });
79
- //# sourceMappingURL=cli.js.map
@@ -1,3 +1 @@
1
1
  export {};
2
- // Nothing to export right now
3
- //# sourceMappingURL=export.js.map
@@ -1,25 +1,3 @@
1
- /**
2
- * This file contains the default config for the plugins.
3
- *
4
- * @file defaultConfigSchema.ts
5
- * @author Luca Liguori
6
- * @date 2024-05-07
7
- * @version 1.0.1
8
- *
9
- * Copyright 2024, 2025, 2026 Luca Liguori.
10
- *
11
- * Licensed under the Apache License, Version 2.0 (the "License");
12
- * you may not use this file except in compliance with the License.
13
- * You may obtain a copy of the License at
14
- *
15
- * http://www.apache.org/licenses/LICENSE-2.0
16
- *
17
- * Unless required by applicable law or agreed to in writing, software
18
- * distributed under the License is distributed on an "AS IS" BASIS,
19
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
- * See the License for the specific language governing permissions and
21
- * limitations under the License. *
22
- */
23
1
  export const zigbee2mqtt_config = {
24
2
  name: 'matterbridge-zigbee2mqtt',
25
3
  type: 'DynamicPlatform',
@@ -85,4 +63,3 @@ export const shelly_config = {
85
63
  debugWs: false,
86
64
  unregisterOnShutdown: false,
87
65
  };
88
- //# sourceMappingURL=defaultConfigSchema.js.map
@@ -1,26 +1,3 @@
1
- /**
2
- * This file contains the DeviceManager class.
3
- *
4
- * @file devices.ts
5
- * @author Luca Liguori
6
- * @date 2024-07-26
7
- * @version 1.0.8
8
- *
9
- * Copyright 2024, 2025, 2026 Luca Liguori.
10
- *
11
- * Licensed under the Apache License, Version 2.0 (the "License");
12
- * you may not use this file except in compliance with the License.
13
- * You may obtain a copy of the License at
14
- *
15
- * http://www.apache.org/licenses/LICENSE-2.0
16
- *
17
- * Unless required by applicable law or agreed to in writing, software
18
- * distributed under the License is distributed on an "AS IS" BASIS,
19
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
- * See the License for the specific language governing permissions and
21
- * limitations under the License. *
22
- */
23
- // NodeStorage and AnsiLogger modules
24
1
  import { AnsiLogger, BLUE, er } from 'node-ansi-logger';
25
2
  import { dev } from './matterbridgeTypes.js';
26
3
  export class DeviceManager {
@@ -31,7 +8,7 @@ export class DeviceManager {
31
8
  constructor(matterbridge, nodeContext) {
32
9
  this.matterbridge = matterbridge;
33
10
  this.nodeContext = nodeContext;
34
- this.log = new AnsiLogger({ logName: 'DeviceManager', logTimestampFormat: 4 /* TimestampFormat.TIME_MILLIS */, logLevel: matterbridge.log.logLevel });
11
+ this.log = new AnsiLogger({ logName: 'DeviceManager', logTimestampFormat: 4, logLevel: matterbridge.log.logLevel });
35
12
  this.log.debug('Matterbridge device manager starting...');
36
13
  }
37
14
  get length() {
@@ -77,7 +54,6 @@ export class DeviceManager {
77
54
  }
78
55
  catch (error) {
79
56
  this.log.error(`Error processing forEach device ${dev}${device.deviceName}${er} serialNumber ${BLUE}${device.serialNumber}${er} uniqueId: ${BLUE}${device.uniqueId}${er}:`, error);
80
- // throw error;
81
57
  }
82
58
  });
83
59
  await Promise.all(tasks);
@@ -89,4 +65,3 @@ export class DeviceManager {
89
65
  this.log.logLevel = logLevel;
90
66
  }
91
67
  }
92
- //# sourceMappingURL=deviceManager.js.map