matterbridge 2.1.4-dev.2 → 2.1.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.
Files changed (112) hide show
  1. package/CHANGELOG.md +4 -1
  2. package/README-DOCKER.md +11 -7
  3. package/dist/cli.d.ts +25 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +26 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/cluster/export.d.ts +2 -0
  8. package/dist/cluster/export.d.ts.map +1 -0
  9. package/dist/cluster/export.js +2 -0
  10. package/dist/cluster/export.js.map +1 -0
  11. package/dist/defaultConfigSchema.d.ts +27 -0
  12. package/dist/defaultConfigSchema.d.ts.map +1 -0
  13. package/dist/defaultConfigSchema.js +23 -0
  14. package/dist/defaultConfigSchema.js.map +1 -0
  15. package/dist/deviceManager.d.ts +114 -0
  16. package/dist/deviceManager.d.ts.map +1 -0
  17. package/dist/deviceManager.js +94 -1
  18. package/dist/deviceManager.js.map +1 -0
  19. package/dist/frontend.d.ts +110 -0
  20. package/dist/frontend.d.ts.map +1 -0
  21. package/dist/frontend.js +232 -23
  22. package/dist/frontend.js.map +1 -0
  23. package/dist/index.d.ts +35 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +28 -0
  26. package/dist/index.js.map +1 -0
  27. package/dist/logger/export.d.ts +2 -0
  28. package/dist/logger/export.d.ts.map +1 -0
  29. package/dist/logger/export.js +1 -0
  30. package/dist/logger/export.js.map +1 -0
  31. package/dist/matter/behaviors.d.ts +2 -0
  32. package/dist/matter/behaviors.d.ts.map +1 -0
  33. package/dist/matter/behaviors.js +2 -0
  34. package/dist/matter/behaviors.js.map +1 -0
  35. package/dist/matter/clusters.d.ts +2 -0
  36. package/dist/matter/clusters.d.ts.map +1 -0
  37. package/dist/matter/clusters.js +2 -0
  38. package/dist/matter/clusters.js.map +1 -0
  39. package/dist/matter/devices.d.ts +2 -0
  40. package/dist/matter/devices.d.ts.map +1 -0
  41. package/dist/matter/devices.js +2 -0
  42. package/dist/matter/devices.js.map +1 -0
  43. package/dist/matter/endpoints.d.ts +2 -0
  44. package/dist/matter/endpoints.d.ts.map +1 -0
  45. package/dist/matter/endpoints.js +2 -0
  46. package/dist/matter/endpoints.js.map +1 -0
  47. package/dist/matter/export.d.ts +5 -0
  48. package/dist/matter/export.d.ts.map +1 -0
  49. package/dist/matter/export.js +2 -0
  50. package/dist/matter/export.js.map +1 -0
  51. package/dist/matter/types.d.ts +3 -0
  52. package/dist/matter/types.d.ts.map +1 -0
  53. package/dist/matter/types.js +2 -0
  54. package/dist/matter/types.js.map +1 -0
  55. package/dist/matterbridge.d.ts +409 -0
  56. package/dist/matterbridge.d.ts.map +1 -0
  57. package/dist/matterbridge.js +749 -39
  58. package/dist/matterbridge.js.map +1 -0
  59. package/dist/matterbridgeAccessoryPlatform.d.ts +39 -0
  60. package/dist/matterbridgeAccessoryPlatform.d.ts.map +1 -0
  61. package/dist/matterbridgeAccessoryPlatform.js +33 -0
  62. package/dist/matterbridgeAccessoryPlatform.js.map +1 -0
  63. package/dist/matterbridgeBehaviors.d.ts +1056 -0
  64. package/dist/matterbridgeBehaviors.d.ts.map +1 -0
  65. package/dist/matterbridgeBehaviors.js +32 -1
  66. package/dist/matterbridgeBehaviors.js.map +1 -0
  67. package/dist/matterbridgeDeviceTypes.d.ts +177 -0
  68. package/dist/matterbridgeDeviceTypes.d.ts.map +1 -0
  69. package/dist/matterbridgeDeviceTypes.js +112 -11
  70. package/dist/matterbridgeDeviceTypes.js.map +1 -0
  71. package/dist/matterbridgeDynamicPlatform.d.ts +39 -0
  72. package/dist/matterbridgeDynamicPlatform.d.ts.map +1 -0
  73. package/dist/matterbridgeDynamicPlatform.js +33 -0
  74. package/dist/matterbridgeDynamicPlatform.js.map +1 -0
  75. package/dist/matterbridgeEndpoint.d.ts +834 -0
  76. package/dist/matterbridgeEndpoint.d.ts.map +1 -0
  77. package/dist/matterbridgeEndpoint.js +691 -6
  78. package/dist/matterbridgeEndpoint.js.map +1 -0
  79. package/dist/matterbridgeEndpointHelpers.d.ts +2264 -0
  80. package/dist/matterbridgeEndpointHelpers.d.ts.map +1 -0
  81. package/dist/matterbridgeEndpointHelpers.js +105 -9
  82. package/dist/matterbridgeEndpointHelpers.js.map +1 -0
  83. package/dist/matterbridgePlatform.d.ts +159 -0
  84. package/dist/matterbridgePlatform.d.ts.map +1 -0
  85. package/dist/matterbridgePlatform.js +122 -7
  86. package/dist/matterbridgePlatform.js.map +1 -0
  87. package/dist/matterbridgeTypes.d.ts +167 -0
  88. package/dist/matterbridgeTypes.d.ts.map +1 -0
  89. package/dist/matterbridgeTypes.js +24 -0
  90. package/dist/matterbridgeTypes.js.map +1 -0
  91. package/dist/pluginManager.d.ts +236 -0
  92. package/dist/pluginManager.d.ts.map +1 -0
  93. package/dist/pluginManager.js +230 -3
  94. package/dist/pluginManager.js.map +1 -0
  95. package/dist/storage/export.d.ts +2 -0
  96. package/dist/storage/export.d.ts.map +1 -0
  97. package/dist/storage/export.js +1 -0
  98. package/dist/storage/export.js.map +1 -0
  99. package/dist/utils/colorUtils.d.ts +61 -0
  100. package/dist/utils/colorUtils.d.ts.map +1 -0
  101. package/dist/utils/colorUtils.js +205 -2
  102. package/dist/utils/colorUtils.js.map +1 -0
  103. package/dist/utils/export.d.ts +3 -0
  104. package/dist/utils/export.d.ts.map +1 -0
  105. package/dist/utils/export.js +1 -0
  106. package/dist/utils/export.js.map +1 -0
  107. package/dist/utils/utils.d.ts +231 -0
  108. package/dist/utils/utils.d.ts.map +1 -0
  109. package/dist/utils/utils.js +307 -9
  110. package/dist/utils/utils.js.map +1 -0
  111. package/npm-shrinkwrap.json +2 -2
  112. package/package.json +2 -1
package/CHANGELOG.md CHANGED
@@ -25,13 +25,15 @@ You need to update all plugins you use and Matterbridge in the same moment.
25
25
 
26
26
  I suggest to first update all plugins without restarting and then to update Matterbridge so when it restarts, all versions will be the latest.
27
27
 
28
+ If you use docker, all plugins are already installed in the image so you just need to pull the new image.
29
+
28
30
  Compatibility list:
29
31
  matterbridge-shelly v. 1.1.5
30
32
  matterbridge-zigbee2mqtt v. 2.4.4
31
33
  matterbridge-somfy-tahoma v. 1.2.3
32
34
  matterbridge-hass v. 0.0.8
33
35
 
34
- ## [2.1.4] - 2025-02-06
36
+ ## [2.1.4] - 2025-02-07
35
37
 
36
38
  ### Added
37
39
 
@@ -42,6 +44,7 @@ matterbridge-hass v. 0.0.8
42
44
  ### Changed
43
45
 
44
46
  - [package]: Update matter.js to 0.12.3.
47
+ - [matter.js]: Since matter.js storage cannot properly encode non latin names, they are encoded before passing them to matter.js.
45
48
 
46
49
  <a href="https://www.buymeacoffee.com/luligugithub">
47
50
  <img src="./yellow-button.png" alt="Buy me a coffee" width="120">
package/README-DOCKER.md CHANGED
@@ -48,11 +48,13 @@ The container must have full access to the host network (needed for mdns).
48
48
 
49
49
  ```
50
50
  sudo docker run --name matterbridge \
51
- -v ${HOME}/Matterbridge:/root/Matterbridge \
52
- -v ${HOME}/.matterbridge:/root/.matterbridge \
51
+ -v /home/<USER>/Matterbridge:/root/Matterbridge \
52
+ -v /home/<USER>/.matterbridge:/root/.matterbridge \
53
53
  --network host --restart always -d luligu/matterbridge:latest
54
54
  ```
55
55
 
56
+ Replace USER with your user name (i.e. ubuntu or pi).
57
+
56
58
  You may need to adapt the script to your setup.
57
59
 
58
60
  ### Run with docker compose
@@ -63,14 +65,16 @@ The docker-compose.yml file is available in the docker directory of the package
63
65
  services:
64
66
  matterbridge:
65
67
  container_name: matterbridge
66
- image: luligu/matterbridge:latest # Matterbridge image with the latest tag
67
- network_mode: host # Ensures the Matter mdns works
68
- restart: always # Ensures the container always restarts automatically
68
+ image: luligu/matterbridge:latest # Matterbridge image with the tag latest
69
+ network_mode: host # Ensures the Matter mdns works
70
+ restart: always # Ensures the container always restarts automatically
69
71
  volumes:
70
- - "${HOME}/Matterbridge:/root/Matterbridge" # Mounts the Matterbridge plugin directory
71
- - "${HOME}/.matterbridge:/root/.matterbridge" # Mounts the Matterbridge storage directory
72
+ - "/home/<USER>/Matterbridge:/root/Matterbridge" # Mounts the Matterbridge plugin directory
73
+ - "/home/<USER>/.matterbridge:/root/.matterbridge" # Mounts the Matterbridge storage directory
72
74
  ```
73
75
 
76
+ Replace USER with your user name (i.e. ubuntu or pi).
77
+
74
78
  copy it in the home directory or edit the existing one to add the matterbridge service.
75
79
 
76
80
  Then start docker compose with:
package/dist/cli.d.ts ADDED
@@ -0,0 +1,25 @@
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
+ export {};
25
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;GAqBG"}
package/dist/cli.js CHANGED
@@ -1,4 +1,27 @@
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 */
2
25
  import { Matterbridge } from './matterbridge.js';
3
26
  let instance;
4
27
  const cli = '\u001B[32m';
@@ -34,10 +57,13 @@ async function restart() {
34
57
  async function update() {
35
58
  if (process.argv.includes('-debug'))
36
59
  console.log(cli + 'CLI: received update event, updating...' + rs);
60
+ // TODO: Implement update logic outside of matterbridge
37
61
  instance = await Matterbridge.loadInstance(true);
38
62
  registerHandlers();
39
63
  }
40
64
  process.title = 'matterbridge';
65
+ // Run the main function
41
66
  main().catch((error) => {
42
67
  console.error(er + `CLI: Matterbridge.loadInstance() failed with error: ${error}` + rs);
43
68
  });
69
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
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;AAEjD,IAAI,QAAkC,CAAC;AACvC,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,CAA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MAAM;IACnB,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,yCAAyC,GAAG,EAAE,CAAC,CAAC;IACvG,uDAAuD;IACvD,QAAQ,GAAG,MAAM,YAAY,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IACjD,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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/cluster/export.ts"],"names":[],"mappings":""}
@@ -1 +1,3 @@
1
1
  export {};
2
+ // Nothing to export right now
3
+ //# sourceMappingURL=export.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/cluster/export.ts"],"names":[],"mappings":";AAAA,8BAA8B"}
@@ -0,0 +1,27 @@
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
+ import { PlatformConfig } from './matterbridgePlatform.js';
24
+ export declare const zigbee2mqtt_config: PlatformConfig;
25
+ export declare const somfytahoma_config: PlatformConfig;
26
+ export declare const shelly_config: PlatformConfig;
27
+ //# sourceMappingURL=defaultConfigSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaultConfigSchema.d.ts","sourceRoot":"","sources":["../src/defaultConfigSchema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,eAAO,MAAM,kBAAkB,EAAE,cAiBhC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,cAWhC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,cAkC3B,CAAC"}
@@ -1,3 +1,25 @@
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
+ */
1
23
  export const zigbee2mqtt_config = {
2
24
  name: 'matterbridge-zigbee2mqtt',
3
25
  type: 'DynamicPlatform',
@@ -63,3 +85,4 @@ export const shelly_config = {
63
85
  debugWs: false,
64
86
  unregisterOnShutdown: false,
65
87
  };
88
+ //# sourceMappingURL=defaultConfigSchema.js.map
@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AAgB,EAAE,WAAW;IAC7B,cAAc,EAAE,EAAE;IAClB,gBAAgB,EAAE,UAAU;IAC5B,SAAS,EAAE,EAAE;IACb,SAAS,EAAE,EAAE;IACb,eAAe,EAAE,EAAE;IACnB,qBAAqB,EAAE,EAAE;IACzB,WAAW,EAAE,EAAE;IACf,QAAQ,EAAE,EAAE;IACZ,kBAAkB,EAAE,IAAI;IACxB,qBAAqB,EAAE,IAAI;IAC3B,oBAAoB,EAAE,KAAK;IAC3B,oBAAoB,EAAE,KAAK;IAC3B,iBAAiB,EAAE,IAAI;IACvB,aAAa,EAAE,CAAC;IAChB,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,KAAK;IACZ,SAAS,EAAE,KAAK;IAChB,SAAS,EAAE,KAAK;IAChB,OAAO,EAAE,KAAK;IACd,oBAAoB,EAAE,KAAK;CAC5B,CAAC"}
@@ -0,0 +1,114 @@
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.9
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
+ import { LogLevel } from './logger/export.js';
24
+ import { NodeStorage } from './storage/export.js';
25
+ import { Matterbridge } from './matterbridge.js';
26
+ import { MatterbridgeEndpoint } from './matterbridgeEndpoint.js';
27
+ /**
28
+ * Manages Matterbridge devices.
29
+ */
30
+ export declare class DeviceManager {
31
+ private readonly _devices;
32
+ private readonly matterbridge;
33
+ private readonly nodeContext;
34
+ private readonly log;
35
+ /**
36
+ * Creates an instance of DeviceManager.
37
+ *
38
+ * @param {Matterbridge} matterbridge - The Matterbridge instance.
39
+ * @param {NodeStorage} nodeContext - The node storage context.
40
+ */
41
+ constructor(matterbridge: Matterbridge, nodeContext: NodeStorage);
42
+ /**
43
+ * Gets the number of devices.
44
+ *
45
+ * @returns {number} The number of devices.
46
+ */
47
+ get length(): number;
48
+ /**
49
+ * Gets the number of devices.
50
+ *
51
+ * @returns {number} The number of devices.
52
+ */
53
+ get size(): number;
54
+ /**
55
+ * Checks if a device with the specified unique ID exists.
56
+ *
57
+ * @param {string} uniqueId - The unique ID of the device.
58
+ * @returns {boolean} True if the device exists, false otherwise.
59
+ */
60
+ has(uniqueId: string): boolean;
61
+ /**
62
+ * Gets a device by its unique ID.
63
+ *
64
+ * @param {string} uniqueId - The unique ID of the device.
65
+ * @returns {MatterbridgeEndpoint | undefined} The device, or undefined if not found.
66
+ */
67
+ get(uniqueId: string): MatterbridgeEndpoint | undefined;
68
+ /**
69
+ * Adds a device to the manager.
70
+ *
71
+ * @param {MatterbridgeEndpoint} device - The device to add.
72
+ * @returns {MatterbridgeEndpoint} The added device.
73
+ * @throws {Error} If the device does not have a unique ID.
74
+ */
75
+ set(device: MatterbridgeEndpoint): MatterbridgeEndpoint;
76
+ /**
77
+ * Removes a device from the manager.
78
+ *
79
+ * @param {MatterbridgeEndpoint} device - The device to remove.
80
+ * @returns {boolean} True if the device was removed, false otherwise.
81
+ * @throws {Error} If the device does not have a unique ID.
82
+ */
83
+ remove(device: MatterbridgeEndpoint): boolean;
84
+ /**
85
+ * Clears all devices from the manager.
86
+ */
87
+ clear(): void;
88
+ /**
89
+ * Gets an array of all devices.
90
+ *
91
+ * @returns {MatterbridgeEndpoint[]} An array of all devices.
92
+ */
93
+ array(): MatterbridgeEndpoint[];
94
+ /**
95
+ * Iterates over all devices.
96
+ *
97
+ * @returns {IterableIterator<MatterbridgeEndpoint>} An iterator for the devices.
98
+ */
99
+ [Symbol.iterator](): MapIterator<MatterbridgeEndpoint>;
100
+ /**
101
+ * Asynchronously iterates over each device and calls the provided callback function.
102
+ *
103
+ * @param {Function} callback - The callback function to call with each device.
104
+ * @returns {Promise<void>} A promise that resolves when all callbacks have been called.
105
+ */
106
+ forEach(callback: (device: MatterbridgeEndpoint) => Promise<void>): Promise<void>;
107
+ /**
108
+ * Sets the log level.
109
+ *
110
+ * @param {LogLevel} logLevel - The log level to set.
111
+ */
112
+ set logLevel(logLevel: LogLevel);
113
+ }
114
+ //# sourceMappingURL=deviceManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deviceManager.d.ts","sourceRoot":"","sources":["../src/deviceManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAwB,QAAQ,EAAmB,MAAM,oBAAoB,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGlD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAGjE;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA2C;IACpE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;IAC5C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAc;IAC1C,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAa;IAEjC;;;;;OAKG;gBACS,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW;IAOhE;;;;OAIG;IACH,IAAI,MAAM,IAAI,MAAM,CAEnB;IAED;;;;OAIG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;;;;OAKG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAI9B;;;;;OAKG;IACH,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,oBAAoB,GAAG,SAAS;IAIvD;;;;;;OAMG;IACH,GAAG,CAAC,MAAM,EAAE,oBAAoB,GAAG,oBAAoB;IAOvD;;;;;;OAMG;IACH,MAAM,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO;IAM7C;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;;;OAIG;IACH,KAAK,IAAI,oBAAoB,EAAE;IAI/B;;;;OAIG;IACH,CAAC,MAAM,CAAC,QAAQ,CAAC;IAIjB;;;;;OAKG;IACG,OAAO,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAavF;;;;OAIG;IACH,IAAI,QAAQ,CAAC,QAAQ,EAAE,QAAQ,EAE9B;CACF"}
@@ -1,28 +1,89 @@
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.9
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
1
24
  import { AnsiLogger, BLUE, er } from './logger/export.js';
2
25
  import { dev } from './matterbridgeTypes.js';
26
+ /**
27
+ * Manages Matterbridge devices.
28
+ */
3
29
  export class DeviceManager {
4
30
  _devices = new Map();
5
31
  matterbridge;
6
32
  nodeContext;
7
33
  log;
34
+ /**
35
+ * Creates an instance of DeviceManager.
36
+ *
37
+ * @param {Matterbridge} matterbridge - The Matterbridge instance.
38
+ * @param {NodeStorage} nodeContext - The node storage context.
39
+ */
8
40
  constructor(matterbridge, nodeContext) {
9
41
  this.matterbridge = matterbridge;
10
42
  this.nodeContext = nodeContext;
11
- this.log = new AnsiLogger({ logName: 'DeviceManager', logTimestampFormat: 4, logLevel: matterbridge.log.logLevel });
43
+ this.log = new AnsiLogger({ logName: 'DeviceManager', logTimestampFormat: 4 /* TimestampFormat.TIME_MILLIS */, logLevel: matterbridge.log.logLevel });
12
44
  this.log.debug('Matterbridge device manager starting...');
13
45
  }
46
+ /**
47
+ * Gets the number of devices.
48
+ *
49
+ * @returns {number} The number of devices.
50
+ */
14
51
  get length() {
15
52
  return this._devices.size;
16
53
  }
54
+ /**
55
+ * Gets the number of devices.
56
+ *
57
+ * @returns {number} The number of devices.
58
+ */
17
59
  get size() {
18
60
  return this._devices.size;
19
61
  }
62
+ /**
63
+ * Checks if a device with the specified unique ID exists.
64
+ *
65
+ * @param {string} uniqueId - The unique ID of the device.
66
+ * @returns {boolean} True if the device exists, false otherwise.
67
+ */
20
68
  has(uniqueId) {
21
69
  return this._devices.has(uniqueId);
22
70
  }
71
+ /**
72
+ * Gets a device by its unique ID.
73
+ *
74
+ * @param {string} uniqueId - The unique ID of the device.
75
+ * @returns {MatterbridgeEndpoint | undefined} The device, or undefined if not found.
76
+ */
23
77
  get(uniqueId) {
24
78
  return this._devices.get(uniqueId);
25
79
  }
80
+ /**
81
+ * Adds a device to the manager.
82
+ *
83
+ * @param {MatterbridgeEndpoint} device - The device to add.
84
+ * @returns {MatterbridgeEndpoint} The added device.
85
+ * @throws {Error} If the device does not have a unique ID.
86
+ */
26
87
  set(device) {
27
88
  if (!device.uniqueId)
28
89
  throw new Error(`The device ${dev}${device.deviceName}${er} has not been initialized: uniqueId is required`);
@@ -31,6 +92,13 @@ export class DeviceManager {
31
92
  this._devices.set(device.uniqueId, device);
32
93
  return device;
33
94
  }
95
+ /**
96
+ * Removes a device from the manager.
97
+ *
98
+ * @param {MatterbridgeEndpoint} device - The device to remove.
99
+ * @returns {boolean} True if the device was removed, false otherwise.
100
+ * @throws {Error} If the device does not have a unique ID.
101
+ */
34
102
  remove(device) {
35
103
  if (!device.uniqueId)
36
104
  throw new Error(`The device ${dev}${device.deviceName}${er} has not been initialized: uniqueId is required`);
@@ -38,15 +106,34 @@ export class DeviceManager {
38
106
  this.log.error(`The device ${dev}${device.deviceName}${er} with uniqueId ${BLUE}${device.uniqueId}${er} serialNumber ${BLUE}${device.serialNumber}${er} is not registered in the device manager`);
39
107
  return this._devices.delete(device.uniqueId);
40
108
  }
109
+ /**
110
+ * Clears all devices from the manager.
111
+ */
41
112
  clear() {
42
113
  this._devices.clear();
43
114
  }
115
+ /**
116
+ * Gets an array of all devices.
117
+ *
118
+ * @returns {MatterbridgeEndpoint[]} An array of all devices.
119
+ */
44
120
  array() {
45
121
  return Array.from(this._devices.values());
46
122
  }
123
+ /**
124
+ * Iterates over all devices.
125
+ *
126
+ * @returns {IterableIterator<MatterbridgeEndpoint>} An iterator for the devices.
127
+ */
47
128
  [Symbol.iterator]() {
48
129
  return this._devices.values();
49
130
  }
131
+ /**
132
+ * Asynchronously iterates over each device and calls the provided callback function.
133
+ *
134
+ * @param {Function} callback - The callback function to call with each device.
135
+ * @returns {Promise<void>} A promise that resolves when all callbacks have been called.
136
+ */
50
137
  async forEach(callback) {
51
138
  if (this.size === 0)
52
139
  return;
@@ -60,7 +147,13 @@ export class DeviceManager {
60
147
  });
61
148
  await Promise.all(tasks);
62
149
  }
150
+ /**
151
+ * Sets the log level.
152
+ *
153
+ * @param {LogLevel} logLevel - The log level to set.
154
+ */
63
155
  set logLevel(logLevel) {
64
156
  this.log.logLevel = logLevel;
65
157
  }
66
158
  }
159
+ //# sourceMappingURL=deviceManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deviceManager.js","sourceRoot":"","sources":["../src/deviceManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,qCAAqC;AACr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Q,CAAC;QACf,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;IAChC,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,OAAO,CAAC,QAAyD;QACrE,IAAI,IAAI,CAAC,IAAI,KAAK,CAAC;YAAE,OAAO;QAE5B,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;YACrL,CAAC;QACH,CAAC,CAAC,CAAC;QACH,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IAED;;;;OAIG;IACH,IAAI,QAAQ,CAAC,QAAkB;QAC7B,IAAI,CAAC,GAAG,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC/B,CAAC;CACF"}
@@ -0,0 +1,110 @@
1
+ /**
2
+ * This file contains the class Frontend.
3
+ *
4
+ * @file frontend.ts
5
+ * @author Luca Liguori
6
+ * @date 2025-01-13
7
+ * @version 1.0.1
8
+ *
9
+ * Copyright 2025, 2026, 2027 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
+ import { LogLevel } from './logger/export.js';
24
+ import { Matterbridge } from './matterbridge.js';
25
+ /**
26
+ * Websocket message ID for logging.
27
+ * @constant {number}
28
+ */
29
+ export declare const WS_ID_LOG = 0;
30
+ /**
31
+ * Websocket message ID indicating a refresh is needed.
32
+ * @constant {number}
33
+ */
34
+ export declare const WS_ID_REFRESH_NEEDED = 1;
35
+ /**
36
+ * Websocket message ID indicating a restart is needed.
37
+ * @constant {number}
38
+ */
39
+ export declare const WS_ID_RESTART_NEEDED = 2;
40
+ /**
41
+ * Initializes the frontend of Matterbridge.
42
+ *
43
+ * @param port The port number to run the frontend server on. Default is 8283.
44
+ */
45
+ export declare class Frontend {
46
+ private matterbridge;
47
+ private log;
48
+ private port;
49
+ private initializeError;
50
+ private expressApp;
51
+ private httpServer;
52
+ private httpsServer;
53
+ private webSocketServer;
54
+ private prevCpus;
55
+ private memoryData;
56
+ private memoryInterval?;
57
+ private memoryTimeout?;
58
+ constructor(matterbridge: Matterbridge);
59
+ set logLevel(logLevel: LogLevel);
60
+ start(port?: number): Promise<void>;
61
+ stop(): Promise<void>;
62
+ private formatMemoryUsage;
63
+ private startCpuMemoryDump;
64
+ private stopCpuMemoryDump;
65
+ /**
66
+ * Retrieves the api settings data.
67
+ * @returns {Promise<object>} A promise that resolve in the api settings object.
68
+ */
69
+ private getApiSettings;
70
+ /**
71
+ * Retrieves the cluster text description from a given device.
72
+ * @param {MatterbridgeDevice} device - The MatterbridgeDevice object.
73
+ * @returns {string} The attributes description of the cluster servers in the device.
74
+ */
75
+ private getClusterTextFromDevice;
76
+ /**
77
+ * Retrieves the base registered plugins sanitized for res.json().
78
+ * @returns {BaseRegisteredPlugin[]} An array of BaseRegisteredPlugin.
79
+ */
80
+ private getBaseRegisteredPlugins;
81
+ /**
82
+ * Handles incoming websocket messages for the Matterbridge.
83
+ *
84
+ * @param {Matterbridge} this - The Matterbridge instance.
85
+ * @param {WebSocket} client - The websocket client that sent the message.
86
+ * @param {WebSocket.RawData} message - The raw data of the message received from the client.
87
+ * @returns {Promise<void>} A promise that resolves when the message has been handled.
88
+ */
89
+ private wsMessageHandler;
90
+ /**
91
+ * Sends a WebSocket message to all connected clients. The function is called by AnsiLogger.setGlobalCallback.
92
+ *
93
+ * @param {string} level - The logger level of the message: debug info notice warn error fatal...
94
+ * @param {string} time - The time string of the message
95
+ * @param {string} name - The logger name of the message
96
+ * @param {string} message - The content of the message.
97
+ */
98
+ wssSendMessage(level: string, time: string, name: string, message: string): void;
99
+ /**
100
+ * Sends a need to refresh WebSocket message to all connected clients.
101
+ *
102
+ */
103
+ wssSendRefreshRequired(): void;
104
+ /**
105
+ * Sends a need to restart WebSocket message to all connected clients.
106
+ *
107
+ */
108
+ wssSendRestartRequired(): void;
109
+ }
110
+ //# sourceMappingURL=frontend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frontend.d.ts","sourceRoot":"","sources":["../src/frontend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAeH,OAAO,EAA4C,QAAQ,EAA2E,MAAM,oBAAoB,CAAC;AAKjK,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD;;;GAGG;AACH,eAAO,MAAM,SAAS,IAAI,CAAC;AAE3B;;;GAGG;AACH,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC;;;GAGG;AACH,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC;;;;GAIG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,GAAG,CAAa;IACxB,OAAO,CAAC,IAAI,CAAQ;IACpB,OAAO,CAAC,eAAe,CAAS;IAEhC,OAAO,CAAC,UAAU,CAA8B;IAChD,OAAO,CAAC,UAAU,CAAyB;IAC3C,OAAO,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