matterbridge 3.5.2 → 3.5.3-dev-20260202-e19e9b6

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 (280) hide show
  1. package/CHANGELOG.md +30 -1
  2. package/README-DOCKER.md +2 -2
  3. package/README.md +14 -9
  4. package/dist/broadcastServer.d.ts +0 -115
  5. package/dist/broadcastServer.js +0 -117
  6. package/dist/broadcastServerTypes.d.ts +0 -43
  7. package/dist/broadcastServerTypes.js +0 -24
  8. package/dist/checkUpdates.d.ts +0 -75
  9. package/dist/checkUpdates.js +1 -91
  10. package/dist/cli.d.ts +0 -24
  11. package/dist/cli.js +1 -97
  12. package/dist/cliEmitter.d.ts +0 -36
  13. package/dist/cliEmitter.js +0 -37
  14. package/dist/cliHistory.d.ts +0 -42
  15. package/dist/cliHistory.js +0 -38
  16. package/dist/clusters/export.d.ts +0 -1
  17. package/dist/clusters/export.js +0 -2
  18. package/dist/deviceManager.d.ts +0 -108
  19. package/dist/deviceManager.js +1 -114
  20. package/dist/devices/airConditioner.d.ts +0 -75
  21. package/dist/devices/airConditioner.js +0 -57
  22. package/dist/devices/basicVideoPlayer.d.ts +0 -58
  23. package/dist/devices/basicVideoPlayer.js +1 -56
  24. package/dist/devices/batteryStorage.d.ts +0 -43
  25. package/dist/devices/batteryStorage.js +1 -48
  26. package/dist/devices/castingVideoPlayer.d.ts +0 -63
  27. package/dist/devices/castingVideoPlayer.js +2 -65
  28. package/dist/devices/cooktop.d.ts +0 -55
  29. package/dist/devices/cooktop.js +0 -56
  30. package/dist/devices/dishwasher.d.ts +0 -55
  31. package/dist/devices/dishwasher.js +0 -57
  32. package/dist/devices/evse.d.ts +0 -57
  33. package/dist/devices/evse.js +10 -74
  34. package/dist/devices/export.d.ts +0 -1
  35. package/dist/devices/export.js +0 -5
  36. package/dist/devices/extractorHood.d.ts +0 -41
  37. package/dist/devices/extractorHood.js +0 -43
  38. package/dist/devices/heatPump.d.ts +0 -43
  39. package/dist/devices/heatPump.js +2 -50
  40. package/dist/devices/laundryDryer.d.ts +0 -58
  41. package/dist/devices/laundryDryer.js +3 -62
  42. package/dist/devices/laundryWasher.d.ts +0 -64
  43. package/dist/devices/laundryWasher.js +4 -70
  44. package/dist/devices/microwaveOven.d.ts +1 -77
  45. package/dist/devices/microwaveOven.js +5 -88
  46. package/dist/devices/oven.d.ts +0 -82
  47. package/dist/devices/oven.js +0 -85
  48. package/dist/devices/refrigerator.d.ts +0 -100
  49. package/dist/devices/refrigerator.js +0 -102
  50. package/dist/devices/roboticVacuumCleaner.d.ts +0 -83
  51. package/dist/devices/roboticVacuumCleaner.js +9 -100
  52. package/dist/devices/solarPower.d.ts +0 -36
  53. package/dist/devices/solarPower.js +0 -38
  54. package/dist/devices/speaker.d.ts +0 -79
  55. package/dist/devices/speaker.js +0 -84
  56. package/dist/devices/temperatureControl.d.ts +0 -21
  57. package/dist/devices/temperatureControl.js +3 -24
  58. package/dist/devices/waterHeater.d.ts +0 -74
  59. package/dist/devices/waterHeater.js +2 -82
  60. package/dist/dgram/export.d.ts +0 -1
  61. package/dist/dgram/export.js +0 -1
  62. package/dist/frontend.d.ts +0 -187
  63. package/dist/frontend.js +37 -498
  64. package/dist/frontendTypes.d.ts +0 -57
  65. package/dist/frontendTypes.js +0 -45
  66. package/dist/helpers.d.ts +0 -43
  67. package/dist/helpers.js +0 -54
  68. package/dist/index.d.ts +0 -23
  69. package/dist/index.js +0 -25
  70. package/dist/jestutils/export.d.ts +0 -1
  71. package/dist/jestutils/export.js +0 -1
  72. package/dist/jestutils/jestHelpers.d.ts +0 -255
  73. package/dist/jestutils/jestHelpers.js +15 -371
  74. package/dist/logger/export.d.ts +0 -1
  75. package/dist/logger/export.js +0 -1
  76. package/dist/matter/behaviors.d.ts +0 -1
  77. package/dist/matter/behaviors.js +0 -2
  78. package/dist/matter/clusters.d.ts +0 -1
  79. package/dist/matter/clusters.js +0 -2
  80. package/dist/matter/devices.d.ts +0 -1
  81. package/dist/matter/devices.js +0 -2
  82. package/dist/matter/endpoints.d.ts +0 -1
  83. package/dist/matter/endpoints.js +0 -2
  84. package/dist/matter/export.d.ts +0 -1
  85. package/dist/matter/export.js +0 -2
  86. package/dist/matter/types.d.ts +0 -1
  87. package/dist/matter/types.js +0 -2
  88. package/dist/matterNode.d.ts +0 -258
  89. package/dist/matterNode.js +8 -359
  90. package/dist/matterbridge.d.ts +0 -373
  91. package/dist/matterbridge.js +46 -854
  92. package/dist/matterbridgeAccessoryPlatform.d.ts +0 -42
  93. package/dist/matterbridgeAccessoryPlatform.js +0 -50
  94. package/dist/matterbridgeBehaviors.d.ts +0 -24
  95. package/dist/matterbridgeBehaviors.js +5 -65
  96. package/dist/matterbridgeDeviceTypes.d.ts +0 -649
  97. package/dist/matterbridgeDeviceTypes.js +6 -673
  98. package/dist/matterbridgeDynamicPlatform.d.ts +0 -42
  99. package/dist/matterbridgeDynamicPlatform.js +0 -50
  100. package/dist/matterbridgeEndpoint.d.ts +0 -1369
  101. package/dist/matterbridgeEndpoint.js +54 -1507
  102. package/dist/matterbridgeEndpointHelpers.d.ts +0 -425
  103. package/dist/matterbridgeEndpointHelpers.js +20 -482
  104. package/dist/matterbridgeEndpointTypes.d.ts +0 -70
  105. package/dist/matterbridgeEndpointTypes.js +0 -25
  106. package/dist/matterbridgePlatform.d.ts +0 -434
  107. package/dist/matterbridgePlatform.js +1 -472
  108. package/dist/matterbridgePlatformTypes.d.ts +0 -29
  109. package/dist/matterbridgePlatformTypes.js +0 -24
  110. package/dist/matterbridgeTypes.d.ts +0 -46
  111. package/dist/matterbridgeTypes.js +0 -26
  112. package/dist/mb_coap.d.ts +0 -23
  113. package/dist/mb_coap.js +3 -41
  114. package/dist/mb_health.d.ts +0 -67
  115. package/dist/mb_health.js +0 -70
  116. package/dist/mb_mdns.d.ts +0 -23
  117. package/dist/mb_mdns.js +36 -94
  118. package/dist/pluginManager.d.ts +0 -305
  119. package/dist/pluginManager.js +5 -342
  120. package/dist/shelly.d.ts +0 -157
  121. package/dist/shelly.js +7 -178
  122. package/dist/spawn.d.ts +0 -32
  123. package/dist/spawn.js +1 -71
  124. package/dist/storage/export.d.ts +0 -1
  125. package/dist/storage/export.js +0 -1
  126. package/dist/utils/export.d.ts +0 -1
  127. package/dist/utils/export.js +0 -1
  128. package/dist/worker.d.ts +0 -61
  129. package/dist/worker.js +4 -65
  130. package/dist/workerCheckUpdates.d.ts +0 -24
  131. package/dist/workerCheckUpdates.js +5 -36
  132. package/dist/workerGlobalPrefix.d.ts +0 -24
  133. package/dist/workerGlobalPrefix.js +5 -36
  134. package/dist/workerTypes.d.ts +0 -25
  135. package/dist/workerTypes.js +0 -24
  136. package/frontend/build/assets/index.js +4 -4
  137. package/frontend/build/assets/vendor_emotion.js +1 -1
  138. package/frontend/build/assets/vendor_lodash.js +1 -1
  139. package/frontend/build/assets/vendor_mdi.js +1 -1
  140. package/frontend/build/assets/vendor_mui.js +22 -22
  141. package/frontend/build/assets/vendor_node_modules.js +20 -20
  142. package/frontend/build/assets/vendor_notistack.js +2 -2
  143. package/frontend/build/assets/vendor_qrcode.js +1 -1
  144. package/frontend/build/assets/vendor_rjsf.js +8 -8
  145. package/frontend/build/index.html +1 -1
  146. package/frontend/package.json +48 -47
  147. package/npm-shrinkwrap.json +77 -47
  148. package/package.json +7 -7
  149. package/dist/broadcastServer.d.ts.map +0 -1
  150. package/dist/broadcastServer.js.map +0 -1
  151. package/dist/broadcastServerTypes.d.ts.map +0 -1
  152. package/dist/broadcastServerTypes.js.map +0 -1
  153. package/dist/checkUpdates.d.ts.map +0 -1
  154. package/dist/checkUpdates.js.map +0 -1
  155. package/dist/cli.d.ts.map +0 -1
  156. package/dist/cli.js.map +0 -1
  157. package/dist/cliEmitter.d.ts.map +0 -1
  158. package/dist/cliEmitter.js.map +0 -1
  159. package/dist/cliHistory.d.ts.map +0 -1
  160. package/dist/cliHistory.js.map +0 -1
  161. package/dist/clusters/export.d.ts.map +0 -1
  162. package/dist/clusters/export.js.map +0 -1
  163. package/dist/deviceManager.d.ts.map +0 -1
  164. package/dist/deviceManager.js.map +0 -1
  165. package/dist/devices/airConditioner.d.ts.map +0 -1
  166. package/dist/devices/airConditioner.js.map +0 -1
  167. package/dist/devices/basicVideoPlayer.d.ts.map +0 -1
  168. package/dist/devices/basicVideoPlayer.js.map +0 -1
  169. package/dist/devices/batteryStorage.d.ts.map +0 -1
  170. package/dist/devices/batteryStorage.js.map +0 -1
  171. package/dist/devices/castingVideoPlayer.d.ts.map +0 -1
  172. package/dist/devices/castingVideoPlayer.js.map +0 -1
  173. package/dist/devices/cooktop.d.ts.map +0 -1
  174. package/dist/devices/cooktop.js.map +0 -1
  175. package/dist/devices/dishwasher.d.ts.map +0 -1
  176. package/dist/devices/dishwasher.js.map +0 -1
  177. package/dist/devices/evse.d.ts.map +0 -1
  178. package/dist/devices/evse.js.map +0 -1
  179. package/dist/devices/export.d.ts.map +0 -1
  180. package/dist/devices/export.js.map +0 -1
  181. package/dist/devices/extractorHood.d.ts.map +0 -1
  182. package/dist/devices/extractorHood.js.map +0 -1
  183. package/dist/devices/heatPump.d.ts.map +0 -1
  184. package/dist/devices/heatPump.js.map +0 -1
  185. package/dist/devices/laundryDryer.d.ts.map +0 -1
  186. package/dist/devices/laundryDryer.js.map +0 -1
  187. package/dist/devices/laundryWasher.d.ts.map +0 -1
  188. package/dist/devices/laundryWasher.js.map +0 -1
  189. package/dist/devices/microwaveOven.d.ts.map +0 -1
  190. package/dist/devices/microwaveOven.js.map +0 -1
  191. package/dist/devices/oven.d.ts.map +0 -1
  192. package/dist/devices/oven.js.map +0 -1
  193. package/dist/devices/refrigerator.d.ts.map +0 -1
  194. package/dist/devices/refrigerator.js.map +0 -1
  195. package/dist/devices/roboticVacuumCleaner.d.ts.map +0 -1
  196. package/dist/devices/roboticVacuumCleaner.js.map +0 -1
  197. package/dist/devices/solarPower.d.ts.map +0 -1
  198. package/dist/devices/solarPower.js.map +0 -1
  199. package/dist/devices/speaker.d.ts.map +0 -1
  200. package/dist/devices/speaker.js.map +0 -1
  201. package/dist/devices/temperatureControl.d.ts.map +0 -1
  202. package/dist/devices/temperatureControl.js.map +0 -1
  203. package/dist/devices/waterHeater.d.ts.map +0 -1
  204. package/dist/devices/waterHeater.js.map +0 -1
  205. package/dist/dgram/export.d.ts.map +0 -1
  206. package/dist/dgram/export.js.map +0 -1
  207. package/dist/frontend.d.ts.map +0 -1
  208. package/dist/frontend.js.map +0 -1
  209. package/dist/frontendTypes.d.ts.map +0 -1
  210. package/dist/frontendTypes.js.map +0 -1
  211. package/dist/helpers.d.ts.map +0 -1
  212. package/dist/helpers.js.map +0 -1
  213. package/dist/index.d.ts.map +0 -1
  214. package/dist/index.js.map +0 -1
  215. package/dist/jestutils/export.d.ts.map +0 -1
  216. package/dist/jestutils/export.js.map +0 -1
  217. package/dist/jestutils/jestHelpers.d.ts.map +0 -1
  218. package/dist/jestutils/jestHelpers.js.map +0 -1
  219. package/dist/logger/export.d.ts.map +0 -1
  220. package/dist/logger/export.js.map +0 -1
  221. package/dist/matter/behaviors.d.ts.map +0 -1
  222. package/dist/matter/behaviors.js.map +0 -1
  223. package/dist/matter/clusters.d.ts.map +0 -1
  224. package/dist/matter/clusters.js.map +0 -1
  225. package/dist/matter/devices.d.ts.map +0 -1
  226. package/dist/matter/devices.js.map +0 -1
  227. package/dist/matter/endpoints.d.ts.map +0 -1
  228. package/dist/matter/endpoints.js.map +0 -1
  229. package/dist/matter/export.d.ts.map +0 -1
  230. package/dist/matter/export.js.map +0 -1
  231. package/dist/matter/types.d.ts.map +0 -1
  232. package/dist/matter/types.js.map +0 -1
  233. package/dist/matterNode.d.ts.map +0 -1
  234. package/dist/matterNode.js.map +0 -1
  235. package/dist/matterbridge.d.ts.map +0 -1
  236. package/dist/matterbridge.js.map +0 -1
  237. package/dist/matterbridgeAccessoryPlatform.d.ts.map +0 -1
  238. package/dist/matterbridgeAccessoryPlatform.js.map +0 -1
  239. package/dist/matterbridgeBehaviors.d.ts.map +0 -1
  240. package/dist/matterbridgeBehaviors.js.map +0 -1
  241. package/dist/matterbridgeDeviceTypes.d.ts.map +0 -1
  242. package/dist/matterbridgeDeviceTypes.js.map +0 -1
  243. package/dist/matterbridgeDynamicPlatform.d.ts.map +0 -1
  244. package/dist/matterbridgeDynamicPlatform.js.map +0 -1
  245. package/dist/matterbridgeEndpoint.d.ts.map +0 -1
  246. package/dist/matterbridgeEndpoint.js.map +0 -1
  247. package/dist/matterbridgeEndpointHelpers.d.ts.map +0 -1
  248. package/dist/matterbridgeEndpointHelpers.js.map +0 -1
  249. package/dist/matterbridgeEndpointTypes.d.ts.map +0 -1
  250. package/dist/matterbridgeEndpointTypes.js.map +0 -1
  251. package/dist/matterbridgePlatform.d.ts.map +0 -1
  252. package/dist/matterbridgePlatform.js.map +0 -1
  253. package/dist/matterbridgePlatformTypes.d.ts.map +0 -1
  254. package/dist/matterbridgePlatformTypes.js.map +0 -1
  255. package/dist/matterbridgeTypes.d.ts.map +0 -1
  256. package/dist/matterbridgeTypes.js.map +0 -1
  257. package/dist/mb_coap.d.ts.map +0 -1
  258. package/dist/mb_coap.js.map +0 -1
  259. package/dist/mb_health.d.ts.map +0 -1
  260. package/dist/mb_health.js.map +0 -1
  261. package/dist/mb_mdns.d.ts.map +0 -1
  262. package/dist/mb_mdns.js.map +0 -1
  263. package/dist/pluginManager.d.ts.map +0 -1
  264. package/dist/pluginManager.js.map +0 -1
  265. package/dist/shelly.d.ts.map +0 -1
  266. package/dist/shelly.js.map +0 -1
  267. package/dist/spawn.d.ts.map +0 -1
  268. package/dist/spawn.js.map +0 -1
  269. package/dist/storage/export.d.ts.map +0 -1
  270. package/dist/storage/export.js.map +0 -1
  271. package/dist/utils/export.d.ts.map +0 -1
  272. package/dist/utils/export.js.map +0 -1
  273. package/dist/worker.d.ts.map +0 -1
  274. package/dist/worker.js.map +0 -1
  275. package/dist/workerCheckUpdates.d.ts.map +0 -1
  276. package/dist/workerCheckUpdates.js.map +0 -1
  277. package/dist/workerGlobalPrefix.d.ts.map +0 -1
  278. package/dist/workerGlobalPrefix.js.map +0 -1
  279. package/dist/workerTypes.d.ts.map +0 -1
  280. package/dist/workerTypes.js.map +0 -1
@@ -1,31 +1,6 @@
1
- /**
2
- * This file contains the types for MatterbridgePlatform.
3
- *
4
- * @file matterbridgePlatformTypes.ts
5
- * @author Luca Liguori
6
- * @created 2024-03-21
7
- * @version 1.6.1
8
- * @license Apache-2.0
9
- *
10
- * Copyright 2024, 2025, 2026 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
1
  import type { VendorId } from '@matter/main/types';
25
2
  import type { SystemInformation } from './matterbridgeTypes.js';
26
- /** Platform configuration value type. */
27
3
  export type PlatformConfigValue = string | number | boolean | bigint | object | undefined | null;
28
- /** Platform configuration type. */
29
4
  export type PlatformConfig = {
30
5
  name: string;
31
6
  type: string;
@@ -33,11 +8,8 @@ export type PlatformConfig = {
33
8
  debug: boolean;
34
9
  unregisterOnShutdown: boolean;
35
10
  } & Record<string, PlatformConfigValue>;
36
- /** Platform schema value type. */
37
11
  export type PlatformSchemaValue = string | number | boolean | bigint | object | undefined | null;
38
- /** Platform schema type. */
39
12
  export type PlatformSchema = Record<string, PlatformSchemaValue>;
40
- /** A type representing a subset of readonly properties of Matterbridge for platform use. */
41
13
  export type PlatformMatterbridge = {
42
14
  readonly systemInformation: Readonly<Pick<SystemInformation, 'interfaceName' | 'macAddress' | 'ipv4Address' | 'ipv6Address' | 'nodeVersion' | 'hostname' | 'user' | 'osType' | 'osRelease' | 'osPlatform' | 'osArch' | 'totalMemory' | 'freeMemory' | 'systemUptime' | 'processUptime' | 'cpuUsage' | 'processCpuUsage' | 'rss' | 'heapTotal' | 'heapUsed'>>;
43
15
  readonly rootDirectory: string;
@@ -58,4 +30,3 @@ export type PlatformMatterbridge = {
58
30
  readonly aggregatorProductId: number;
59
31
  readonly aggregatorProductName: string;
60
32
  };
61
- //# sourceMappingURL=matterbridgePlatformTypes.d.ts.map
@@ -1,25 +1 @@
1
- /**
2
- * This file contains the types for MatterbridgePlatform.
3
- *
4
- * @file matterbridgePlatformTypes.ts
5
- * @author Luca Liguori
6
- * @created 2024-03-21
7
- * @version 1.6.1
8
- * @license Apache-2.0
9
- *
10
- * Copyright 2024, 2025, 2026 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
1
  export {};
25
- //# sourceMappingURL=matterbridgePlatformTypes.js.map
@@ -1,26 +1,3 @@
1
- /**
2
- * This file contains the types for Matterbridge.
3
- *
4
- * @file matterbridgeTypes.ts
5
- * @author Luca Liguori
6
- * @created 2024-07-12
7
- * @version 1.0.3
8
- * @license Apache-2.0
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
1
  import type { NodeStorage } from 'node-persist-manager';
25
2
  import type { LogLevel } from 'node-ansi-logger';
26
3
  import type { ServerNode, Endpoint as EndpointNode } from '@matter/node';
@@ -42,14 +19,9 @@ export declare const MATTER_STORAGE_NAME = "matterstorage";
42
19
  export declare const MATTERBRIDGE_DIAGNOSTIC_FILE = "diagnostic.log";
43
20
  export declare const MATTERBRIDGE_HISTORY_FILE = "history.html";
44
21
  export type MaybePromise<T> = T | Promise<T>;
45
- /**
46
- * A type representing a read-only subset of the Matterbridge properties.
47
- */
48
22
  export type SharedMatterbridge = Readonly<Pick<Matterbridge, 'systemInformation' | 'rootDirectory' | 'homeDirectory' | 'matterbridgeDirectory' | 'matterbridgePluginDirectory' | 'matterbridgeCertDirectory' | 'globalModulesDirectory' | 'matterbridgeVersion' | 'matterbridgeLatestVersion' | 'matterbridgeDevVersion' | 'frontendVersion' | 'bridgeMode' | 'restartMode' | 'virtualMode' | 'profile' | 'logLevel' | 'fileLogger' | 'matterLogLevel' | 'matterFileLogger' | 'mdnsInterface' | 'ipv4Address' | 'ipv6Address' | 'port' | 'discriminator' | 'passcode' | 'shellySysUpdate' | 'shellyMainUpdate'>>;
49
23
  export type PluginName = string;
50
- /** Define an interface for matterbridge */
51
24
  export interface Plugin extends ApiPlugin {
52
- /** Node storage context created in the directory 'storage' in matterbridgeDirectory with the plugin name */
53
25
  nodeContext?: NodeStorage;
54
26
  storageContext?: StorageContext;
55
27
  serverNode?: ServerNode<ServerNode.RootEndpoint>;
@@ -58,7 +30,6 @@ export interface Plugin extends ApiPlugin {
58
30
  platform?: MatterbridgePlatform;
59
31
  reachabilityTimeout?: NodeJS.Timeout;
60
32
  }
61
- /** Define an interface for the frontend */
62
33
  export interface ApiPlugin extends StoragePlugin {
63
34
  latestVersion?: string;
64
35
  devVersion?: string;
@@ -71,7 +42,6 @@ export interface ApiPlugin extends StoragePlugin {
71
42
  loaded?: boolean;
72
43
  started?: boolean;
73
44
  configured?: boolean;
74
- /** Signal that the config has changed and a restart is required */
75
45
  restartRequired?: boolean;
76
46
  registeredDevices?: number;
77
47
  configJson?: PlatformConfig;
@@ -80,7 +50,6 @@ export interface ApiPlugin extends StoragePlugin {
80
50
  hasBlackList?: boolean;
81
51
  matter?: ApiMatter;
82
52
  }
83
- /** Define an interface for storing the plugin information */
84
53
  export interface StoragePlugin {
85
54
  name: string;
86
55
  path: string;
@@ -90,7 +59,6 @@ export interface StoragePlugin {
90
59
  author: string;
91
60
  enabled: boolean;
92
61
  }
93
- /** Define an interface for the system information */
94
62
  export interface SystemInformation {
95
63
  interfaceName: string;
96
64
  macAddress: string;
@@ -113,7 +81,6 @@ export interface SystemInformation {
113
81
  heapTotal: string;
114
82
  heapUsed: string;
115
83
  }
116
- /** Define an interface for the matterbridge information */
117
84
  export interface MatterbridgeInformation {
118
85
  rootDirectory: string;
119
86
  homeDirectory: string;
@@ -147,7 +114,6 @@ export interface MatterbridgeInformation {
147
114
  fixedRestartRequired: boolean;
148
115
  updateRequired: boolean;
149
116
  }
150
- /** Define an interface for sanitized exposed fabric information suitable for API responses */
151
117
  export interface SanitizedExposedFabricInformation {
152
118
  fabricIndex: FabricIndex;
153
119
  fabricId: string;
@@ -157,7 +123,6 @@ export interface SanitizedExposedFabricInformation {
157
123
  rootVendorName: string;
158
124
  label: string;
159
125
  }
160
- /** Define an interface for sanitized session information suitable for API responses */
161
126
  export interface SanitizedSession {
162
127
  name: string;
163
128
  nodeId: string;
@@ -168,7 +133,6 @@ export interface SanitizedSession {
168
133
  lastActiveTimestamp: string;
169
134
  numberOfActiveSubscriptions: number;
170
135
  }
171
- /** Define an interface for API device information */
172
136
  export interface ApiDevice {
173
137
  pluginName: string;
174
138
  type: string;
@@ -184,7 +148,6 @@ export interface ApiDevice {
184
148
  cluster: string;
185
149
  matter?: ApiMatter;
186
150
  }
187
- /** Define an interface for base device information */
188
151
  export interface BaseDevice {
189
152
  mode: 'server' | 'matter' | undefined;
190
153
  plugin: string | undefined;
@@ -208,7 +171,6 @@ export interface BaseDevice {
208
171
  number: EndpointNumber | undefined;
209
172
  id: string | undefined;
210
173
  }
211
- /** Define an interface for API matter information */
212
174
  export interface ApiMatter {
213
175
  id: string;
214
176
  online: boolean;
@@ -222,25 +184,18 @@ export interface ApiMatter {
222
184
  manualPairingCode: string;
223
185
  serialNumber: string | undefined;
224
186
  }
225
- /** Define an interface for API clusters information */
226
187
  export interface ApiClusters {
227
188
  plugin: string;
228
189
  deviceName: string;
229
190
  serialNumber: string;
230
- /** Endpoint number */
231
191
  number: EndpointNumber;
232
- /** Endpoint id */
233
192
  id: string;
234
193
  deviceTypes: number[];
235
194
  clusters: Cluster[];
236
195
  }
237
- /** Define an interface for Cluster information in ApiClusters */
238
196
  export interface Cluster {
239
- /** Endpoint number > string */
240
197
  endpoint: string;
241
- /** Endpoint number */
242
198
  number: EndpointNumber;
243
- /** Endpoint id or main for the device root endpoint */
244
199
  id: string;
245
200
  deviceTypes: number[];
246
201
  clusterName: string;
@@ -250,4 +205,3 @@ export interface Cluster {
250
205
  attributeValue: string;
251
206
  attributeLocalValue: unknown;
252
207
  }
253
- //# sourceMappingURL=matterbridgeTypes.d.ts.map
@@ -1,35 +1,9 @@
1
- /**
2
- * This file contains the types for Matterbridge.
3
- *
4
- * @file matterbridgeTypes.ts
5
- * @author Luca Liguori
6
- * @created 2024-07-12
7
- * @version 1.0.3
8
- * @license Apache-2.0
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
- // Default colors
25
1
  export const plg = '\u001B[38;5;33m';
26
2
  export const dev = '\u001B[38;5;79m';
27
3
  export const typ = '\u001B[38;5;207m';
28
- // Default names
29
4
  export const MATTERBRIDGE_LOGGER_FILE = 'matterbridge.log';
30
5
  export const MATTER_LOGGER_FILE = 'matter.log';
31
6
  export const NODE_STORAGE_DIR = 'storage';
32
7
  export const MATTER_STORAGE_NAME = 'matterstorage';
33
8
  export const MATTERBRIDGE_DIAGNOSTIC_FILE = 'diagnostic.log';
34
9
  export const MATTERBRIDGE_HISTORY_FILE = 'history.html';
35
- //# sourceMappingURL=matterbridgeTypes.js.map
package/dist/mb_coap.d.ts CHANGED
@@ -1,24 +1 @@
1
- /**
2
- * @description This file contains the bin mb_coap for the class Coap.
3
- * @file src/dgram/mb_coap.ts
4
- * @author Luca Liguori
5
- * @created 2025-07-22
6
- * @version 1.0.0
7
- * @license Apache-2.0
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
1
  export {};
24
- //# sourceMappingURL=mb_coap.d.ts.map
package/dist/mb_coap.js CHANGED
@@ -1,64 +1,27 @@
1
- /**
2
- * @description This file contains the bin mb_coap for the class Coap.
3
- * @file src/dgram/mb_coap.ts
4
- * @author Luca Liguori
5
- * @created 2025-07-22
6
- * @version 1.0.0
7
- * @license Apache-2.0
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
- // Net imports
24
1
  import { COAP_MULTICAST_IPV4_ADDRESS, COAP_MULTICAST_IPV6_ADDRESS, COAP_MULTICAST_PORT, Coap, COAP_OPTION_URI_PATH } from '@matterbridge/dgram';
25
- // istanbul ignore next
26
2
  {
27
3
  const coapIpv4 = new Coap('CoAP Server udp4', COAP_MULTICAST_IPV4_ADDRESS, COAP_MULTICAST_PORT, 'udp4', true);
28
4
  const coapIpv6 = new Coap('CoAP Server udp6', COAP_MULTICAST_IPV6_ADDRESS, COAP_MULTICAST_PORT, 'udp6', true);
29
5
  coapIpv4.listNetworkInterfaces();
30
- /**
31
- * Cleanup and log device information before exiting.
32
- */
33
6
  function cleanupAndLogAndExit() {
34
7
  if (process.argv.includes('--coap-udp4'))
35
8
  coapIpv4.stop();
36
9
  if (process.argv.includes('--coap-udp6'))
37
10
  coapIpv6.stop();
38
- // eslint-disable-next-line n/no-process-exit
39
11
  process.exit(0);
40
12
  }
41
- /**
42
- * Queries mDNS services over UDP IPv4 and sends a response for a specific service instance.
43
- * This function sends a query for Shelly, HTTP, and services, and responds with the appropriate PTR records.
44
- */
45
13
  const requestUdp4 = () => {
46
14
  coapIpv4.sendRequest(32000, [
47
15
  { number: COAP_OPTION_URI_PATH, value: Buffer.from('cit') },
48
16
  { number: COAP_OPTION_URI_PATH, value: Buffer.from('d') },
49
17
  ], {}, undefined, COAP_MULTICAST_IPV4_ADDRESS, COAP_MULTICAST_PORT);
50
18
  };
51
- /**
52
- * Queries mDNS services over UDP IPv4 and sends a response for a specific service instance.
53
- * This function sends a query for Shelly, HTTP, and services, and responds with the appropriate PTR records.
54
- */
55
19
  const requestUdp6 = () => {
56
20
  coapIpv6.sendRequest(32000, [
57
21
  { number: COAP_OPTION_URI_PATH, value: Buffer.from('cit') },
58
22
  { number: COAP_OPTION_URI_PATH, value: Buffer.from('d') },
59
23
  ], {}, undefined, COAP_MULTICAST_IPV6_ADDRESS, COAP_MULTICAST_PORT);
60
24
  };
61
- // Handle Ctrl+C (SIGINT) to stop and log devices
62
25
  process.on('SIGINT', () => {
63
26
  cleanupAndLogAndExit();
64
27
  });
@@ -66,7 +29,7 @@ import { COAP_MULTICAST_IPV4_ADDRESS, COAP_MULTICAST_IPV6_ADDRESS, COAP_MULTICAS
66
29
  coapIpv4.on('ready', (address) => {
67
30
  coapIpv4.log.info(`coapIpv4 server ready on ${address.family} ${address.address}:${address.port}`);
68
31
  if (!process.argv.includes('--coap-request'))
69
- return; // Skip querying if --coap-request is not specified
32
+ return;
70
33
  requestUdp4();
71
34
  setInterval(() => {
72
35
  requestUdp4();
@@ -76,7 +39,7 @@ import { COAP_MULTICAST_IPV4_ADDRESS, COAP_MULTICAST_IPV6_ADDRESS, COAP_MULTICAS
76
39
  coapIpv6.on('ready', (address) => {
77
40
  coapIpv6.log.info(`coapIpv6 server ready on ${address.family} ${address.address}:${address.port}`);
78
41
  if (!process.argv.includes('--coap-request'))
79
- return; // Skip querying if --coap-request is not specified
42
+ return;
80
43
  requestUdp6();
81
44
  setInterval(() => {
82
45
  requestUdp6();
@@ -84,6 +47,5 @@ import { COAP_MULTICAST_IPV4_ADDRESS, COAP_MULTICAST_IPV6_ADDRESS, COAP_MULTICAS
84
47
  });
85
48
  setTimeout(() => {
86
49
  cleanupAndLogAndExit();
87
- }, 600000); // 10 minutes timeout to exit if no activity
50
+ }, 600000);
88
51
  }
89
- //# sourceMappingURL=mb_coap.js.map
@@ -1,77 +1,10 @@
1
- /**
2
- * @description This file contains the bin mb_health to check the Matterbridge health endpoint.
3
- * @file src/mb_health.ts
4
- * @author Luca Liguori
5
- * @created 2026-01-28
6
- * @version 1.0.0
7
- * @license Apache-2.0
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
- /**
24
- * Checks the Matterbridge health endpoint.
25
- *
26
- * @param {string} url The URL to fetch.
27
- * @param {number} timeoutMs The timeout in milliseconds.
28
- * @returns {Promise<boolean>} True if the endpoint responds with a 2xx status code.
29
- */
30
1
  export declare function checkHealth(url: string, timeoutMs: number): Promise<boolean>;
31
- /**
32
- * Fetches the health endpoint response.
33
- *
34
- * @param {string} url The URL to fetch.
35
- * @param {number} timeoutMs The timeout in milliseconds.
36
- * @returns {Promise<{ ok: boolean; statusCode: number; body: string; json?: unknown }>} The response details.
37
- */
38
2
  export declare function fetchHealth(url: string, timeoutMs: number): Promise<{
39
3
  ok: boolean;
40
4
  statusCode: number;
41
5
  body: string;
42
6
  json?: unknown;
43
7
  }>;
44
- /**
45
- * Returns the exit code for the health check.
46
- *
47
- * @param {string} url The URL to fetch.
48
- * @param {number} timeoutMs The timeout in milliseconds.
49
- * @returns {Promise<number>} Exit code (0 if ok, 1 otherwise).
50
- */
51
8
  export declare function mbHealthExitCode(url: string, timeoutMs: number): Promise<number>;
52
- /**
53
- * CLI runner for mb_health.
54
- *
55
- * @param {string} url The URL to fetch.
56
- * @param {number} timeoutMs The timeout in milliseconds.
57
- * @param {(code: number) => never | void} exitFn Exit function (defaults to process.exit).
58
- * @returns {Promise<void>} Resolves when done.
59
- */
60
9
  export declare function mbHealthCli(url: string, timeoutMs: number, exitFn?: (code: number) => never | void): Promise<void>;
61
- /**
62
- * Default CLI entrypoint for `mb_health`.
63
- *
64
- * @param {(code: number) => never | void} exitFn Exit function (defaults to process.exit).
65
- * @returns {Promise<void>} Resolves when done.
66
- */
67
10
  export declare function mbHealthMain(exitFn?: (code: number) => never | void): Promise<void>;
68
- /**
69
- * Docker HEALTHCHECK usage:
70
- *
71
- * ```dockerfile
72
- * # After installing the matterbridge package globally (so the `mb_health` bin is on PATH)
73
- * HEALTHCHECK --interval=60s --timeout=10s --start-period=60s --retries=5 \
74
- * CMD mb_health || exit 1
75
- * ```
76
- */
77
- //# sourceMappingURL=mb_health.d.ts.map
package/dist/mb_health.js CHANGED
@@ -1,46 +1,10 @@
1
- /**
2
- * @description This file contains the bin mb_health to check the Matterbridge health endpoint.
3
- * @file src/mb_health.ts
4
- * @author Luca Liguori
5
- * @created 2026-01-28
6
- * @version 1.0.0
7
- * @license Apache-2.0
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
1
  import http from 'node:http';
24
2
  import https from 'node:https';
25
- /**
26
- * Checks the Matterbridge health endpoint.
27
- *
28
- * @param {string} url The URL to fetch.
29
- * @param {number} timeoutMs The timeout in milliseconds.
30
- * @returns {Promise<boolean>} True if the endpoint responds with a 2xx status code.
31
- */
32
3
  export function checkHealth(url, timeoutMs) {
33
4
  return fetchHealth(url, timeoutMs)
34
5
  .then(({ ok }) => ok)
35
6
  .catch(() => false);
36
7
  }
37
- /**
38
- * Fetches the health endpoint response.
39
- *
40
- * @param {string} url The URL to fetch.
41
- * @param {number} timeoutMs The timeout in milliseconds.
42
- * @returns {Promise<{ ok: boolean; statusCode: number; body: string; json?: unknown }>} The response details.
43
- */
44
8
  export function fetchHealth(url, timeoutMs) {
45
9
  return new Promise((resolve) => {
46
10
  const parsedUrl = new URL(url);
@@ -86,13 +50,6 @@ export function fetchHealth(url, timeoutMs) {
86
50
  request.end();
87
51
  });
88
52
  }
89
- /**
90
- * Returns the exit code for the health check.
91
- *
92
- * @param {string} url The URL to fetch.
93
- * @param {number} timeoutMs The timeout in milliseconds.
94
- * @returns {Promise<number>} Exit code (0 if ok, 1 otherwise).
95
- */
96
53
  export async function mbHealthExitCode(url, timeoutMs) {
97
54
  try {
98
55
  const { ok } = await fetchHealth(url, timeoutMs);
@@ -102,46 +59,19 @@ export async function mbHealthExitCode(url, timeoutMs) {
102
59
  return 1;
103
60
  }
104
61
  }
105
- /**
106
- * CLI runner for mb_health.
107
- *
108
- * @param {string} url The URL to fetch.
109
- * @param {number} timeoutMs The timeout in milliseconds.
110
- * @param {(code: number) => never | void} exitFn Exit function (defaults to process.exit).
111
- * @returns {Promise<void>} Resolves when done.
112
- */
113
62
  export async function mbHealthCli(url, timeoutMs, exitFn = process.exit) {
114
63
  const { ok, statusCode, body, json } = await fetchHealth(url, timeoutMs);
115
64
  if (json !== undefined) {
116
- // eslint-disable-next-line no-console
117
65
  console.log(JSON.stringify(json, null, 2));
118
66
  }
119
67
  else if (body) {
120
- // eslint-disable-next-line no-console
121
68
  console.log(body);
122
69
  }
123
70
  else {
124
- // eslint-disable-next-line no-console
125
71
  console.log(JSON.stringify({ ok, statusCode }, null, 2));
126
72
  }
127
73
  exitFn(ok ? 0 : 1);
128
74
  }
129
- /**
130
- * Default CLI entrypoint for `mb_health`.
131
- *
132
- * @param {(code: number) => never | void} exitFn Exit function (defaults to process.exit).
133
- * @returns {Promise<void>} Resolves when done.
134
- */
135
75
  export async function mbHealthMain(exitFn = process.exit) {
136
76
  await mbHealthCli('http://localhost:8283/health', 5000, exitFn);
137
77
  }
138
- /**
139
- * Docker HEALTHCHECK usage:
140
- *
141
- * ```dockerfile
142
- * # After installing the matterbridge package globally (so the `mb_health` bin is on PATH)
143
- * HEALTHCHECK --interval=60s --timeout=10s --start-period=60s --retries=5 \
144
- * CMD mb_health || exit 1
145
- * ```
146
- */
147
- //# sourceMappingURL=mb_health.js.map
package/dist/mb_mdns.d.ts CHANGED
@@ -1,24 +1 @@
1
- /**
2
- * @description This file contains the bin mb_mdns for the class Mdns.
3
- * @file src/dgram/mb_mdns.ts
4
- * @author Luca Liguori
5
- * @created 2025-07-22
6
- * @version 1.0.0
7
- * @license Apache-2.0
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
1
  export {};
24
- //# sourceMappingURL=mb_mdns.d.ts.map