matterbridge 3.4.3-dev-20251209-e6cb85f → 3.4.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 (324) hide show
  1. package/README.md +2 -3
  2. package/dist/broadcastServer.d.ts +144 -0
  3. package/dist/broadcastServer.d.ts.map +1 -0
  4. package/dist/broadcastServer.js +119 -0
  5. package/dist/broadcastServer.js.map +1 -0
  6. package/dist/broadcastServerTypes.d.ts +841 -0
  7. package/dist/broadcastServerTypes.d.ts.map +1 -0
  8. package/dist/broadcastServerTypes.js +24 -0
  9. package/dist/broadcastServerTypes.js.map +1 -0
  10. package/dist/cli.d.ts +30 -0
  11. package/dist/cli.d.ts.map +1 -0
  12. package/dist/cli.js +97 -1
  13. package/dist/cli.js.map +1 -0
  14. package/dist/cliEmitter.d.ts +50 -0
  15. package/dist/cliEmitter.d.ts.map +1 -0
  16. package/dist/cliEmitter.js +37 -0
  17. package/dist/cliEmitter.js.map +1 -0
  18. package/dist/cliHistory.d.ts +48 -0
  19. package/dist/cliHistory.d.ts.map +1 -0
  20. package/dist/cliHistory.js +38 -0
  21. package/dist/cliHistory.js.map +1 -0
  22. package/dist/clusters/export.d.ts +2 -0
  23. package/dist/clusters/export.d.ts.map +1 -0
  24. package/dist/clusters/export.js +2 -0
  25. package/dist/clusters/export.js.map +1 -0
  26. package/dist/deviceManager.d.ts +135 -0
  27. package/dist/deviceManager.d.ts.map +1 -0
  28. package/dist/deviceManager.js +113 -1
  29. package/dist/deviceManager.js.map +1 -0
  30. package/dist/devices/airConditioner.d.ts +98 -0
  31. package/dist/devices/airConditioner.d.ts.map +1 -0
  32. package/dist/devices/airConditioner.js +57 -0
  33. package/dist/devices/airConditioner.js.map +1 -0
  34. package/dist/devices/batteryStorage.d.ts +48 -0
  35. package/dist/devices/batteryStorage.d.ts.map +1 -0
  36. package/dist/devices/batteryStorage.js +48 -1
  37. package/dist/devices/batteryStorage.js.map +1 -0
  38. package/dist/devices/cooktop.d.ts +61 -0
  39. package/dist/devices/cooktop.d.ts.map +1 -0
  40. package/dist/devices/cooktop.js +56 -0
  41. package/dist/devices/cooktop.js.map +1 -0
  42. package/dist/devices/dishwasher.d.ts +71 -0
  43. package/dist/devices/dishwasher.d.ts.map +1 -0
  44. package/dist/devices/dishwasher.js +57 -0
  45. package/dist/devices/dishwasher.js.map +1 -0
  46. package/dist/devices/evse.d.ts +76 -0
  47. package/dist/devices/evse.d.ts.map +1 -0
  48. package/dist/devices/evse.js +74 -10
  49. package/dist/devices/evse.js.map +1 -0
  50. package/dist/devices/export.d.ts +17 -0
  51. package/dist/devices/export.d.ts.map +1 -0
  52. package/dist/devices/export.js +5 -0
  53. package/dist/devices/export.js.map +1 -0
  54. package/dist/devices/extractorHood.d.ts +46 -0
  55. package/dist/devices/extractorHood.d.ts.map +1 -0
  56. package/dist/devices/extractorHood.js +43 -0
  57. package/dist/devices/extractorHood.js.map +1 -0
  58. package/dist/devices/heatPump.d.ts +47 -0
  59. package/dist/devices/heatPump.d.ts.map +1 -0
  60. package/dist/devices/heatPump.js +50 -2
  61. package/dist/devices/heatPump.js.map +1 -0
  62. package/dist/devices/laundryDryer.d.ts +67 -0
  63. package/dist/devices/laundryDryer.d.ts.map +1 -0
  64. package/dist/devices/laundryDryer.js +62 -3
  65. package/dist/devices/laundryDryer.js.map +1 -0
  66. package/dist/devices/laundryWasher.d.ts +81 -0
  67. package/dist/devices/laundryWasher.d.ts.map +1 -0
  68. package/dist/devices/laundryWasher.js +70 -4
  69. package/dist/devices/laundryWasher.js.map +1 -0
  70. package/dist/devices/microwaveOven.d.ts +168 -0
  71. package/dist/devices/microwaveOven.d.ts.map +1 -0
  72. package/dist/devices/microwaveOven.js +88 -5
  73. package/dist/devices/microwaveOven.js.map +1 -0
  74. package/dist/devices/oven.d.ts +105 -0
  75. package/dist/devices/oven.d.ts.map +1 -0
  76. package/dist/devices/oven.js +85 -0
  77. package/dist/devices/oven.js.map +1 -0
  78. package/dist/devices/refrigerator.d.ts +118 -0
  79. package/dist/devices/refrigerator.d.ts.map +1 -0
  80. package/dist/devices/refrigerator.js +102 -0
  81. package/dist/devices/refrigerator.js.map +1 -0
  82. package/dist/devices/roboticVacuumCleaner.d.ts +112 -0
  83. package/dist/devices/roboticVacuumCleaner.d.ts.map +1 -0
  84. package/dist/devices/roboticVacuumCleaner.js +100 -9
  85. package/dist/devices/roboticVacuumCleaner.js.map +1 -0
  86. package/dist/devices/solarPower.d.ts +40 -0
  87. package/dist/devices/solarPower.d.ts.map +1 -0
  88. package/dist/devices/solarPower.js +38 -0
  89. package/dist/devices/solarPower.js.map +1 -0
  90. package/dist/devices/speaker.d.ts +87 -0
  91. package/dist/devices/speaker.d.ts.map +1 -0
  92. package/dist/devices/speaker.js +84 -0
  93. package/dist/devices/speaker.js.map +1 -0
  94. package/dist/devices/temperatureControl.d.ts +166 -0
  95. package/dist/devices/temperatureControl.d.ts.map +1 -0
  96. package/dist/devices/temperatureControl.js +24 -3
  97. package/dist/devices/temperatureControl.js.map +1 -0
  98. package/dist/devices/waterHeater.d.ts +111 -0
  99. package/dist/devices/waterHeater.d.ts.map +1 -0
  100. package/dist/devices/waterHeater.js +82 -2
  101. package/dist/devices/waterHeater.js.map +1 -0
  102. package/dist/dgram/coap.d.ts +205 -0
  103. package/dist/dgram/coap.d.ts.map +1 -0
  104. package/dist/dgram/coap.js +126 -13
  105. package/dist/dgram/coap.js.map +1 -0
  106. package/dist/dgram/dgram.d.ts +141 -0
  107. package/dist/dgram/dgram.d.ts.map +1 -0
  108. package/dist/dgram/dgram.js +114 -2
  109. package/dist/dgram/dgram.js.map +1 -0
  110. package/dist/dgram/mb_coap.d.ts +24 -0
  111. package/dist/dgram/mb_coap.d.ts.map +1 -0
  112. package/dist/dgram/mb_coap.js +41 -3
  113. package/dist/dgram/mb_coap.js.map +1 -0
  114. package/dist/dgram/mb_mdns.d.ts +24 -0
  115. package/dist/dgram/mb_mdns.d.ts.map +1 -0
  116. package/dist/dgram/mb_mdns.js +80 -15
  117. package/dist/dgram/mb_mdns.js.map +1 -0
  118. package/dist/dgram/mdns.d.ts +290 -0
  119. package/dist/dgram/mdns.d.ts.map +1 -0
  120. package/dist/dgram/mdns.js +299 -137
  121. package/dist/dgram/mdns.js.map +1 -0
  122. package/dist/dgram/multicast.d.ts +67 -0
  123. package/dist/dgram/multicast.d.ts.map +1 -0
  124. package/dist/dgram/multicast.js +62 -1
  125. package/dist/dgram/multicast.js.map +1 -0
  126. package/dist/dgram/unicast.d.ts +56 -0
  127. package/dist/dgram/unicast.d.ts.map +1 -0
  128. package/dist/dgram/unicast.js +54 -0
  129. package/dist/dgram/unicast.js.map +1 -0
  130. package/dist/frontend.d.ts +238 -0
  131. package/dist/frontend.d.ts.map +1 -0
  132. package/dist/frontend.js +455 -35
  133. package/dist/frontend.js.map +1 -0
  134. package/dist/frontendTypes.d.ts +529 -0
  135. package/dist/frontendTypes.d.ts.map +1 -0
  136. package/dist/frontendTypes.js +45 -0
  137. package/dist/frontendTypes.js.map +1 -0
  138. package/dist/helpers.d.ts +48 -0
  139. package/dist/helpers.d.ts.map +1 -0
  140. package/dist/helpers.js +53 -0
  141. package/dist/helpers.js.map +1 -0
  142. package/dist/index.d.ts +34 -0
  143. package/dist/index.d.ts.map +1 -0
  144. package/dist/index.js +25 -0
  145. package/dist/index.js.map +1 -0
  146. package/dist/jestutils/export.d.ts +2 -0
  147. package/dist/jestutils/export.d.ts.map +1 -0
  148. package/dist/jestutils/export.js +1 -0
  149. package/dist/jestutils/export.js.map +1 -0
  150. package/dist/jestutils/jestHelpers.d.ts +345 -0
  151. package/dist/jestutils/jestHelpers.d.ts.map +1 -0
  152. package/dist/jestutils/jestHelpers.js +371 -14
  153. package/dist/jestutils/jestHelpers.js.map +1 -0
  154. package/dist/logger/export.d.ts +2 -0
  155. package/dist/logger/export.d.ts.map +1 -0
  156. package/dist/logger/export.js +1 -0
  157. package/dist/logger/export.js.map +1 -0
  158. package/dist/matter/behaviors.d.ts +2 -0
  159. package/dist/matter/behaviors.d.ts.map +1 -0
  160. package/dist/matter/behaviors.js +2 -0
  161. package/dist/matter/behaviors.js.map +1 -0
  162. package/dist/matter/clusters.d.ts +2 -0
  163. package/dist/matter/clusters.d.ts.map +1 -0
  164. package/dist/matter/clusters.js +2 -0
  165. package/dist/matter/clusters.js.map +1 -0
  166. package/dist/matter/devices.d.ts +2 -0
  167. package/dist/matter/devices.d.ts.map +1 -0
  168. package/dist/matter/devices.js +2 -0
  169. package/dist/matter/devices.js.map +1 -0
  170. package/dist/matter/endpoints.d.ts +2 -0
  171. package/dist/matter/endpoints.d.ts.map +1 -0
  172. package/dist/matter/endpoints.js +2 -0
  173. package/dist/matter/endpoints.js.map +1 -0
  174. package/dist/matter/export.d.ts +5 -0
  175. package/dist/matter/export.d.ts.map +1 -0
  176. package/dist/matter/export.js +3 -0
  177. package/dist/matter/export.js.map +1 -0
  178. package/dist/matter/types.d.ts +3 -0
  179. package/dist/matter/types.d.ts.map +1 -0
  180. package/dist/matter/types.js +3 -0
  181. package/dist/matter/types.js.map +1 -0
  182. package/dist/matterNode.d.ts +342 -0
  183. package/dist/matterNode.d.ts.map +1 -0
  184. package/dist/matterNode.js +369 -8
  185. package/dist/matterNode.js.map +1 -0
  186. package/dist/matterbridge.d.ts +492 -0
  187. package/dist/matterbridge.d.ts.map +1 -0
  188. package/dist/matterbridge.js +811 -46
  189. package/dist/matterbridge.js.map +1 -0
  190. package/dist/matterbridgeAccessoryPlatform.d.ts +41 -0
  191. package/dist/matterbridgeAccessoryPlatform.d.ts.map +1 -0
  192. package/dist/matterbridgeAccessoryPlatform.js +38 -0
  193. package/dist/matterbridgeAccessoryPlatform.js.map +1 -0
  194. package/dist/matterbridgeBehaviors.d.ts +2404 -0
  195. package/dist/matterbridgeBehaviors.d.ts.map +1 -0
  196. package/dist/matterbridgeBehaviors.js +68 -5
  197. package/dist/matterbridgeBehaviors.js.map +1 -0
  198. package/dist/matterbridgeDeviceTypes.d.ts +698 -0
  199. package/dist/matterbridgeDeviceTypes.d.ts.map +1 -0
  200. package/dist/matterbridgeDeviceTypes.js +635 -14
  201. package/dist/matterbridgeDeviceTypes.js.map +1 -0
  202. package/dist/matterbridgeDynamicPlatform.d.ts +41 -0
  203. package/dist/matterbridgeDynamicPlatform.d.ts.map +1 -0
  204. package/dist/matterbridgeDynamicPlatform.js +38 -0
  205. package/dist/matterbridgeDynamicPlatform.js.map +1 -0
  206. package/dist/matterbridgeEndpoint.d.ts +1507 -0
  207. package/dist/matterbridgeEndpoint.d.ts.map +1 -0
  208. package/dist/matterbridgeEndpoint.js +1444 -53
  209. package/dist/matterbridgeEndpoint.js.map +1 -0
  210. package/dist/matterbridgeEndpointHelpers.d.ts +787 -0
  211. package/dist/matterbridgeEndpointHelpers.d.ts.map +1 -0
  212. package/dist/matterbridgeEndpointHelpers.js +483 -20
  213. package/dist/matterbridgeEndpointHelpers.js.map +1 -0
  214. package/dist/matterbridgeEndpointTypes.d.ts +166 -0
  215. package/dist/matterbridgeEndpointTypes.d.ts.map +1 -0
  216. package/dist/matterbridgeEndpointTypes.js +25 -0
  217. package/dist/matterbridgeEndpointTypes.js.map +1 -0
  218. package/dist/matterbridgePlatform.d.ts +539 -0
  219. package/dist/matterbridgePlatform.d.ts.map +1 -0
  220. package/dist/matterbridgePlatform.js +451 -1
  221. package/dist/matterbridgePlatform.js.map +1 -0
  222. package/dist/matterbridgeTypes.d.ts +251 -0
  223. package/dist/matterbridgeTypes.d.ts.map +1 -0
  224. package/dist/matterbridgeTypes.js +26 -0
  225. package/dist/matterbridgeTypes.js.map +1 -0
  226. package/dist/pluginManager.d.ts +372 -0
  227. package/dist/pluginManager.d.ts.map +1 -0
  228. package/dist/pluginManager.js +341 -5
  229. package/dist/pluginManager.js.map +1 -0
  230. package/dist/shelly.d.ts +181 -0
  231. package/dist/shelly.d.ts.map +1 -0
  232. package/dist/shelly.js +178 -7
  233. package/dist/shelly.js.map +1 -0
  234. package/dist/storage/export.d.ts +2 -0
  235. package/dist/storage/export.d.ts.map +1 -0
  236. package/dist/storage/export.js +1 -0
  237. package/dist/storage/export.js.map +1 -0
  238. package/dist/update.d.ts +84 -0
  239. package/dist/update.d.ts.map +1 -0
  240. package/dist/update.js +93 -1
  241. package/dist/update.js.map +1 -0
  242. package/dist/utils/colorUtils.d.ts +101 -0
  243. package/dist/utils/colorUtils.d.ts.map +1 -0
  244. package/dist/utils/colorUtils.js +97 -2
  245. package/dist/utils/colorUtils.js.map +1 -0
  246. package/dist/utils/commandLine.d.ts +66 -0
  247. package/dist/utils/commandLine.d.ts.map +1 -0
  248. package/dist/utils/commandLine.js +60 -0
  249. package/dist/utils/commandLine.js.map +1 -0
  250. package/dist/utils/copyDirectory.d.ts +35 -0
  251. package/dist/utils/copyDirectory.d.ts.map +1 -0
  252. package/dist/utils/copyDirectory.js +37 -0
  253. package/dist/utils/copyDirectory.js.map +1 -0
  254. package/dist/utils/createDirectory.d.ts +34 -0
  255. package/dist/utils/createDirectory.d.ts.map +1 -0
  256. package/dist/utils/createDirectory.js +33 -0
  257. package/dist/utils/createDirectory.js.map +1 -0
  258. package/dist/utils/createZip.d.ts +39 -0
  259. package/dist/utils/createZip.d.ts.map +1 -0
  260. package/dist/utils/createZip.js +47 -2
  261. package/dist/utils/createZip.js.map +1 -0
  262. package/dist/utils/deepCopy.d.ts +32 -0
  263. package/dist/utils/deepCopy.d.ts.map +1 -0
  264. package/dist/utils/deepCopy.js +39 -0
  265. package/dist/utils/deepCopy.js.map +1 -0
  266. package/dist/utils/deepEqual.d.ts +54 -0
  267. package/dist/utils/deepEqual.d.ts.map +1 -0
  268. package/dist/utils/deepEqual.js +72 -1
  269. package/dist/utils/deepEqual.js.map +1 -0
  270. package/dist/utils/error.d.ts +45 -0
  271. package/dist/utils/error.d.ts.map +1 -0
  272. package/dist/utils/error.js +42 -0
  273. package/dist/utils/error.js.map +1 -0
  274. package/dist/utils/export.d.ts +13 -0
  275. package/dist/utils/export.d.ts.map +1 -0
  276. package/dist/utils/export.js +1 -0
  277. package/dist/utils/export.js.map +1 -0
  278. package/dist/utils/format.d.ts +53 -0
  279. package/dist/utils/format.d.ts.map +1 -0
  280. package/dist/utils/format.js +49 -0
  281. package/dist/utils/format.js.map +1 -0
  282. package/dist/utils/hex.d.ts +89 -0
  283. package/dist/utils/hex.d.ts.map +1 -0
  284. package/dist/utils/hex.js +124 -0
  285. package/dist/utils/hex.js.map +1 -0
  286. package/dist/utils/inspector.d.ts +87 -0
  287. package/dist/utils/inspector.d.ts.map +1 -0
  288. package/dist/utils/inspector.js +69 -1
  289. package/dist/utils/inspector.js.map +1 -0
  290. package/dist/utils/isvalid.d.ts +103 -0
  291. package/dist/utils/isvalid.d.ts.map +1 -0
  292. package/dist/utils/isvalid.js +101 -0
  293. package/dist/utils/isvalid.js.map +1 -0
  294. package/dist/utils/network.d.ts +111 -0
  295. package/dist/utils/network.d.ts.map +1 -0
  296. package/dist/utils/network.js +96 -5
  297. package/dist/utils/network.js.map +1 -0
  298. package/dist/utils/spawn.d.ts +33 -0
  299. package/dist/utils/spawn.d.ts.map +1 -0
  300. package/dist/utils/spawn.js +71 -1
  301. package/dist/utils/spawn.js.map +1 -0
  302. package/dist/utils/tracker.d.ts +108 -0
  303. package/dist/utils/tracker.d.ts.map +1 -0
  304. package/dist/utils/tracker.js +64 -1
  305. package/dist/utils/tracker.js.map +1 -0
  306. package/dist/utils/wait.d.ts +54 -0
  307. package/dist/utils/wait.d.ts.map +1 -0
  308. package/dist/utils/wait.js +60 -8
  309. package/dist/utils/wait.js.map +1 -0
  310. package/dist/workerGlobalPrefix.d.ts +25 -0
  311. package/dist/workerGlobalPrefix.d.ts.map +1 -0
  312. package/dist/workerGlobalPrefix.js +37 -5
  313. package/dist/workerGlobalPrefix.js.map +1 -0
  314. package/dist/workerTypes.d.ts +52 -0
  315. package/dist/workerTypes.d.ts.map +1 -0
  316. package/dist/workerTypes.js +24 -0
  317. package/dist/workerTypes.js.map +1 -0
  318. package/dist/workers.d.ts +69 -0
  319. package/dist/workers.d.ts.map +1 -0
  320. package/dist/workers.js +68 -4
  321. package/dist/workers.js.map +1 -0
  322. package/npm-shrinkwrap.json +2 -2
  323. package/package.json +2 -1
  324. package/scripts/data_model.mjs +2058 -0
@@ -0,0 +1,787 @@
1
+ /**
2
+ * This file contains the helpers for the class MatterbridgeEndpoint.
3
+ *
4
+ * @file matterbridgeEndpointHelpers.ts
5
+ * @author Luca Liguori
6
+ * @created 2024-10-01
7
+ * @version 2.1.0
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
+ import { AnsiLogger } from 'node-ansi-logger';
25
+ import { ActionContext, Behavior, Endpoint } from '@matter/node';
26
+ import { ClusterId } from '@matter/types/datatype';
27
+ import { ClusterType } from '@matter/types/cluster';
28
+ import { PowerSource } from '@matter/types/clusters/power-source';
29
+ import { OperationalState } from '@matter/types/clusters/operational-state';
30
+ import { DeviceEnergyManagement } from '@matter/types/clusters/device-energy-management';
31
+ import { DeviceEnergyManagementMode } from '@matter/types/clusters/device-energy-management-mode';
32
+ import { MatterbridgeEndpoint } from './matterbridgeEndpoint.js';
33
+ import { MatterbridgeEndpointCommands } from './matterbridgeEndpointTypes.js';
34
+ /**
35
+ * Capitalizes the first letter of a string.
36
+ *
37
+ * @param {string} name - The string to capitalize.
38
+ * @returns {string} The string with the first letter capitalized.
39
+ */
40
+ export declare function capitalizeFirstLetter(name: string): string;
41
+ /**
42
+ * Lowercases the first letter of a string.
43
+ *
44
+ * @param {string} name - The string to lowercase the first letter of.
45
+ * @returns {string} The string with the first letter lowercased.
46
+ */
47
+ export declare function lowercaseFirstLetter(name: string): string;
48
+ /**
49
+ * Checks if the device name contains non-Latin characters.
50
+ *
51
+ * @param {string} deviceName - The name of the device to check.
52
+ * @returns {boolean} Returns true if the device name contains non-Latin characters, false otherwise.
53
+ */
54
+ export declare function checkNotLatinCharacters(deviceName: string): boolean;
55
+ /**
56
+ * Generates a unique ID based on the device name.
57
+ *
58
+ * @param {string} deviceName - The name of the device to generate a unique ID for.
59
+ * @returns {string} A unique ID generated from the device name using MD5 hashing.
60
+ */
61
+ export declare function generateUniqueId(deviceName: string): string;
62
+ /**
63
+ * Generates a unique ID based on four parameters.
64
+ *
65
+ * @param {string} param1 - The first parameter.
66
+ * @param {string} param2 - The second parameter.
67
+ * @param {string} param3 - The third parameter.
68
+ * @param {string} param4 - The fourth parameter.
69
+ * @returns {string} A unique ID generated from the concatenation of the parameters using MD5 hashing.
70
+ */
71
+ export declare function createUniqueId(param1: string, param2: string, param3: string, param4: string): string;
72
+ /**
73
+ * Retrieves the features for a specific behavior.
74
+ *
75
+ * @param {Endpoint} endpoint - The endpoint to retrieve the features from.
76
+ * @param {Behavior.Type | ClusterType | ClusterId | string} cluster - The cluster to retrieve the features for.
77
+ *
78
+ * @returns {Record<string, boolean | undefined>} The features for the specified behavior.
79
+ *
80
+ * @remarks Use with:
81
+ * ```typescript
82
+ * expect(featuresFor(device, 'powerSource').wired).toBe(true);
83
+ * ```
84
+ */
85
+ export declare function featuresFor(endpoint: MatterbridgeEndpoint, cluster: Behavior.Type | ClusterType | ClusterId | string): Record<string, boolean | undefined>;
86
+ /**
87
+ * Maps a list of ClusterId to Behavior.Type for server clusters.
88
+ *
89
+ * @param {ClusterId[]} clusterServerList - The list of ClusterId to map.
90
+ * @returns {Behavior.Type[]} An array of Behavior.Type corresponding to the ClusterId in the server list.
91
+ */
92
+ export declare function getBehaviourTypesFromClusterServerIds(clusterServerList: ClusterId[]): Behavior.Type[];
93
+ /**
94
+ * Maps a list of ClusterId to Behavior.Type for client clusters.
95
+ *
96
+ * @param {ClusterId[]} clusterClientList - The list of ClusterId to map.
97
+ * @returns {Behavior.Type[]} An array of Behavior.Type corresponding to the ClusterId in the client list.
98
+ */
99
+ export declare function getBehaviourTypesFromClusterClientIds(clusterClientList: ClusterId[]): Behavior.Type[];
100
+ /**
101
+ * Maps a ClusterId to a Behavior.Type for server clusters.
102
+ *
103
+ * @param {ClusterId} clusterId - The ClusterId to map.
104
+ * @returns {Behavior.Type} The corresponding Behavior.Type for the given ClusterId.
105
+ */
106
+ export declare function getBehaviourTypeFromClusterServerId(clusterId: ClusterId): Behavior.Type;
107
+ /**
108
+ * Maps a ClusterId to a Behavior.Type for client clusters.
109
+ *
110
+ * @param {ClusterId} _clusterId - The ClusterId to map.
111
+ */
112
+ export declare function getBehaviourTypeFromClusterClientId(_clusterId: ClusterId): void;
113
+ /**
114
+ * Retrieves the Behavior.Type for a given cluster from the endpoint's supported behaviors.
115
+ *
116
+ * @param {MatterbridgeEndpoint} endpoint - The endpoint to retrieve the behavior from.
117
+ * @param {Behavior.Type | ClusterType | ClusterId | string} cluster - The cluster to retrieve the behavior for.
118
+ * @returns {Behavior.Type | undefined} The Behavior.Type for the given cluster, or undefined if not found.
119
+ */
120
+ export declare function getBehavior(endpoint: MatterbridgeEndpoint, cluster: Behavior.Type | ClusterType | ClusterId | string): Behavior.Type | undefined;
121
+ /**
122
+ * Invokes a command on the specified behavior of the endpoint. Used ONLY in Jest tests.
123
+ *
124
+ * @param {MatterbridgeEndpoint} endpoint - The endpoint to invoke the command on.
125
+ * @param {Behavior.Type | ClusterType | ClusterId | string} cluster - The cluster to invoke the command on.
126
+ * @param {keyof MatterbridgeEndpointCommands} command - The command to invoke.
127
+ * @param {Record<string, boolean | number | bigint | string | object | null>} [params] - The parameters to pass to the command.
128
+ *
129
+ * @returns {Promise<boolean>} A promise that resolves to true if the command was invoked successfully, false otherwise.
130
+ *
131
+ * @deprecated Used ONLY in Jest tests.
132
+ */
133
+ export declare function invokeBehaviorCommand(endpoint: MatterbridgeEndpoint, cluster: Behavior.Type | ClusterType | ClusterId | string, command: keyof MatterbridgeEndpointCommands, params?: Record<string, boolean | number | bigint | string | object | null>): Promise<boolean>;
134
+ /**
135
+ * Invokes the subscription handler on the specified cluster and attribute of the endpoint. Used ONLY in Jest tests.
136
+ *
137
+ * @param {MatterbridgeEndpoint} endpoint - The endpoint to invoke the subscription handler on.
138
+ * @param {Behavior.Type | ClusterType | ClusterId | string} cluster - The cluster to invoke the subscription handler on.
139
+ * @param {string} attribute - The attribute to invoke the subscription handler on.
140
+ * @param {unknown} newValue - The new value of the attribute.
141
+ * @param {unknown} oldValue - The old value of the attribute.
142
+ *
143
+ * @returns {Promise<boolean>} A promise that resolves to true if the subscription handler was invoked successfully, false otherwise.
144
+ *
145
+ * @deprecated Used ONLY in Jest tests.
146
+ */
147
+ export declare function invokeSubscribeHandler(endpoint: MatterbridgeEndpoint, cluster: Behavior.Type | ClusterType | ClusterId | string, attribute: string, newValue: unknown, oldValue: unknown): Promise<boolean>;
148
+ /**
149
+ * Adds required cluster servers to the specified endpoint based on the device types.
150
+ *
151
+ * @param {MatterbridgeEndpoint} endpoint - The endpoint to add the required cluster servers to.
152
+ * @returns {void}
153
+ */
154
+ export declare function addRequiredClusterServers(endpoint: MatterbridgeEndpoint): void;
155
+ /**
156
+ * Adds optional cluster servers to the specified endpoint based on the device types.
157
+ *
158
+ * @param {MatterbridgeEndpoint} endpoint - The endpoint to add the optional cluster servers to.
159
+ * @returns {void}
160
+ */
161
+ export declare function addOptionalClusterServers(endpoint: MatterbridgeEndpoint): void;
162
+ /**
163
+ * Adds cluster servers to the specified endpoint based on the provided server list.
164
+ *
165
+ * @param {MatterbridgeEndpoint} endpoint - The endpoint to add the cluster servers to.
166
+ * @param {ClusterId[]} serverList - The list of cluster IDs to add.
167
+ */
168
+ export declare function addClusterServers(endpoint: MatterbridgeEndpoint, serverList: ClusterId[]): void;
169
+ /**
170
+ * Adds a fixed label to the FixedLabel cluster. The FixedLabel cluster is created if it does not exist.
171
+ *
172
+ * @param {MatterbridgeEndpoint} endpoint - The endpoint to add the cluster servers to.
173
+ * @param {string} label - The label to add. Max 16 characters.
174
+ * @param {string} value - The value of the label. Max 16 characters.
175
+ */
176
+ export declare function addFixedLabel(endpoint: MatterbridgeEndpoint, label: string, value: string): Promise<void>;
177
+ /**
178
+ * Adds a user label to the UserLabel cluster. The UserLabel cluster is created if it does not exist.
179
+ *
180
+ * @param {MatterbridgeEndpoint} endpoint - The endpoint to add the cluster servers to.
181
+ * @param {string} label - The label to add. Max 16 characters.
182
+ * @param {string} value - The value of the label. Max 16 characters.
183
+ */
184
+ export declare function addUserLabel(endpoint: MatterbridgeEndpoint, label: string, value: string): Promise<void>;
185
+ /**
186
+ * Returns the options for a given behavior type.
187
+ *
188
+ * @param {T} type - The behavior type.
189
+ * @param {Behavior.Options<T>} options - The options for the behavior type.
190
+ * @returns {Behavior.Options<T>} The options for the behavior type.
191
+ */
192
+ export declare function optionsFor<T extends Behavior.Type>(type: T, options: Behavior.Options<T>): Behavior.Options<T>;
193
+ /**
194
+ * Retrieves the cluster ID.
195
+ *
196
+ * @param {Endpoint} endpoint - The endpoint to retrieve the cluster ID from.
197
+ * @param {ClusterId} cluster - The ID of the cluster.
198
+ * @returns {number | undefined} The ID of the cluster.
199
+ */
200
+ export declare function getClusterId(endpoint: Endpoint, cluster: string): number | undefined;
201
+ /**
202
+ * Retrieves the ID of an attribute from a cluster behavior.
203
+ *
204
+ * @param {Endpoint} endpoint - The endpoint to retrieve the attribute ID from.
205
+ * @param {string} cluster - The name of the cluster.
206
+ * @param {string} attribute - The name of the attribute.
207
+ * @returns {number | undefined} The ID of the attribute, or undefined if not found.
208
+ */
209
+ export declare function getAttributeId(endpoint: Endpoint, cluster: string, attribute: string): number | undefined;
210
+ /**
211
+ * Retrieves the value of the provided attribute from the given cluster.
212
+ *
213
+ * @param {MatterbridgeEndpoint} endpoint - The endpoint to retrieve the attribute from.
214
+ * @param {Behavior.Type | ClusterType | ClusterId | string} cluster - The cluster to retrieve the attribute from.
215
+ * @param {string} attribute - The name of the attribute to retrieve.
216
+ * @param {AnsiLogger} [log] - (Optional) The logger to use for logging the retrieve. Errors are logged to the endpoint logger.
217
+ * @returns {any} The value of the attribute, or undefined if the attribute is not found.
218
+ */
219
+ export declare function getAttribute(endpoint: MatterbridgeEndpoint, cluster: Behavior.Type | ClusterType | ClusterId | string, attribute: string, log?: AnsiLogger): any;
220
+ /**
221
+ * Sets the value of an attribute on a cluster server.
222
+ *
223
+ * @param {MatterbridgeEndpoint} endpoint - The endpoint to set the attribute on.
224
+ * @param {Behavior.Type | ClusterType | ClusterId | string} cluster - The cluster to set the attribute on.
225
+ * @param {string} attribute - The name of the attribute.
226
+ * @param {boolean | number | bigint | string | object | null} value - The value to set for the attribute.
227
+ * @param {AnsiLogger} [log] - (Optional) The logger to use for logging the set. Errors are logged to the endpoint logger.
228
+ * @returns {Promise<boolean>} - A promise that resolves to a boolean indicating whether the attribute was successfully set.
229
+ */
230
+ export declare function setAttribute(endpoint: MatterbridgeEndpoint, cluster: Behavior.Type | ClusterType | ClusterId | string, attribute: string, value: boolean | number | bigint | string | object | null, log?: AnsiLogger): Promise<boolean>;
231
+ /**
232
+ * Sets the value of an attribute on a cluster server.
233
+ *
234
+ * @param {MatterbridgeEndpoint} endpoint - The endpoint to update the attribute on.
235
+ * @param {Behavior.Type | ClusterType | ClusterId | string} cluster - The cluster to update the attribute on.
236
+ * @param {string} attribute - The name of the attribute.
237
+ * @param {boolean | number | bigint | string | object | null} value - The value to set for the attribute.
238
+ * @param {AnsiLogger} [log] - (Optional) The logger to use for logging the update. Errors are logged to the endpoint logger.
239
+ * @returns {Promise<boolean>} - A promise that resolves to a boolean indicating whether the attribute was successfully set.
240
+ */
241
+ export declare function updateAttribute(endpoint: MatterbridgeEndpoint, cluster: Behavior.Type | ClusterType | ClusterId | string, attribute: string, value: boolean | number | bigint | string | object | null, log?: AnsiLogger): Promise<boolean>;
242
+ /**
243
+ * Subscribes to the provided attribute on a cluster.
244
+ *
245
+ * @param {MatterbridgeEndpoint} endpoint - The endpoint to subscribe the attribute to.
246
+ * @param {Behavior.Type | ClusterType | ClusterId | string} cluster - The cluster to subscribe the attribute to.
247
+ * @param {string} attribute - The name of the attribute to subscribe to.
248
+ * @param {(newValue: any, oldValue: any, context: ActionContext) => void} listener - A callback function that will be called when the attribute value changes. When context.offline === true then the change is locally generated and not from the controller.
249
+ * @param {AnsiLogger} [log] - Optional logger for logging errors and information.
250
+ * @returns {boolean} - A boolean indicating whether the subscription was successful.
251
+ *
252
+ * @remarks The listener function (cannot be async) will receive three parameters:
253
+ * - `newValue`: The new value of the attribute.
254
+ * - `oldValue`: The old value of the attribute.
255
+ * - `context`: The action context, which includes information about the action that triggered the change. When context.offline === true then the change is locally generated and not from the controller.
256
+ */
257
+ export declare function subscribeAttribute(endpoint: MatterbridgeEndpoint, cluster: Behavior.Type | ClusterType | ClusterId | string, attribute: string, listener: (newValue: any, oldValue: any, context: ActionContext) => void, log?: AnsiLogger): Promise<boolean>;
258
+ /**
259
+ * Triggers an event on the specified cluster.
260
+ *
261
+ * @param {MatterbridgeEndpoint} endpoint - The endpoint to trigger the event on.
262
+ * @param {Behavior.Type | ClusterType | ClusterId | string} cluster - The ID of the cluster.
263
+ * @param {string} event - The name of the event to trigger.
264
+ * @param {Record<string, boolean | number | bigint | string | object | undefined | null>} payload - The payload to pass to the event.
265
+ * @param {AnsiLogger} [log] - Optional logger for logging information.
266
+ *
267
+ * @returns {Promise<boolean>} - A promise that resolves to a boolean indicating whether the event was successfully triggered.
268
+ */
269
+ export declare function triggerEvent(endpoint: MatterbridgeEndpoint, cluster: Behavior.Type | ClusterType | ClusterId | string, event: string, payload: Record<string, boolean | number | bigint | string | object | undefined | null>, log?: AnsiLogger): Promise<boolean>;
270
+ /** Utility Cluster Helpers */
271
+ /**
272
+ * Get the default power source wired cluster server options.
273
+ *
274
+ * @param {PowerSource.WiredCurrentType} wiredCurrentType - The type of wired current (default: PowerSource.WiredCurrentType.Ac)
275
+ * @returns {Behavior.Options<PowerSourceClusterServer>} The options for the power source wired cluster server.
276
+ *
277
+ * @remarks
278
+ * - order: The order of the power source is a persisted attribute that indicates the order in which the power sources are used.
279
+ * - description: The description of the power source is a fixed attribute that describes the power source type.
280
+ * - wiredCurrentType: The type of wired current is a fixed attribute that indicates the type of wired current used by the power source (AC or DC).
281
+ */
282
+ export declare function getDefaultPowerSourceWiredClusterServer(wiredCurrentType?: PowerSource.WiredCurrentType): Partial<{
283
+ status: number;
284
+ order: number;
285
+ endpointList: number[];
286
+ wiredAssessedInputVoltage?: number | null | undefined;
287
+ wiredAssessedInputFrequency?: number | null | undefined;
288
+ wiredAssessedCurrent?: number | null | undefined;
289
+ wiredPresent?: boolean | undefined;
290
+ activeWiredFaults?: number[] | undefined;
291
+ description: string;
292
+ wiredCurrentType: number;
293
+ wiredNominalVoltage?: number | undefined;
294
+ wiredMaximumCurrent?: number | undefined;
295
+ }>;
296
+ /**
297
+ * Get the default power source battery cluster server options.
298
+ *
299
+ * @param {null | number} batPercentRemaining - The remaining battery percentage (default: null). The attribute is in the range 0-200.
300
+ * @param {PowerSource.BatChargeLevel} batChargeLevel - The battery charge level (default: PowerSource.BatChargeLevel.Ok).
301
+ * @param {null | number} batVoltage - The battery voltage (default: null).
302
+ * @param {PowerSource.BatReplaceability} batReplaceability - The replaceability of the battery (default: PowerSource.BatReplaceability.Unspecified).
303
+ * @returns {Behavior.Options<PowerSourceClusterServer>} The options for the power source replaceable battery cluster server.
304
+ *
305
+ * @remarks
306
+ * - order: The order of the power source is a persisted attribute that indicates the order in which the power sources are used.
307
+ * - description: The description of the power source is a fixed attribute that describes the power source type.
308
+ * - batReplaceability: The replaceability of the battery is a fixed attribute that indicates whether the battery is user-replaceable or not.
309
+ */
310
+ export declare function getDefaultPowerSourceBatteryClusterServer(batPercentRemaining?: null | number, batChargeLevel?: PowerSource.BatChargeLevel, batVoltage?: null | number, batReplaceability?: PowerSource.BatReplaceability): Partial<{
311
+ status: number;
312
+ order: number;
313
+ endpointList: number[];
314
+ batChargeLevel: number;
315
+ batReplacementNeeded: boolean;
316
+ batVoltage?: number | null | undefined;
317
+ batPercentRemaining?: number | null | undefined;
318
+ batTimeRemaining?: number | null | undefined;
319
+ batPresent?: boolean | undefined;
320
+ activeBatFaults?: number[] | undefined;
321
+ description: string;
322
+ batReplaceability: number;
323
+ }>;
324
+ /**
325
+ * Get the default power source replaceable battery cluster server options.
326
+ *
327
+ * @param {number} batPercentRemaining - The remaining battery percentage (default: 100). The attribute is in the range 0-200.
328
+ * @param {PowerSource.BatChargeLevel} batChargeLevel - The battery charge level (default: PowerSource.BatChargeLevel.Ok).
329
+ * @param {number} batVoltage - The battery voltage (default: 1500).
330
+ * @param {string} batReplacementDescription - The description of the battery replacement (default: 'Battery type').
331
+ * @param {number} batQuantity - The quantity of the battery (default: 1).
332
+ * @param {PowerSource.BatReplaceability} batReplaceability - The replaceability of the battery (default: PowerSource.BatReplaceability.UserReplaceable).
333
+ * @returns {Behavior.Options<PowerSourceClusterServer>} The options for the power source replaceable battery cluster server.
334
+ *
335
+ * @remarks
336
+ * - order: The order of the power source is a persisted attribute that indicates the order in which the power sources are used.
337
+ * - description: The description of the power source is a fixed attribute that describes the power source type.
338
+ * - batReplaceability: The replaceability of the battery is a fixed attribute that indicates whether the battery is user-replaceable or not.
339
+ * - batReplacementDescription: The description of the battery replacement is a fixed attribute that describes the battery type.
340
+ * - batQuantity: The quantity of the battery is a fixed attribute that indicates how many batteries are present in the device.
341
+ */
342
+ export declare function getDefaultPowerSourceReplaceableBatteryClusterServer(batPercentRemaining?: number, batChargeLevel?: PowerSource.BatChargeLevel, batVoltage?: number, batReplacementDescription?: string, batQuantity?: number, batReplaceability?: PowerSource.BatReplaceability): Partial<{
343
+ status: number;
344
+ order: number;
345
+ endpointList: number[];
346
+ batChargeLevel: number;
347
+ batReplacementNeeded: boolean;
348
+ batVoltage?: number | null | undefined;
349
+ batPercentRemaining?: number | null | undefined;
350
+ batTimeRemaining?: number | null | undefined;
351
+ batPresent?: boolean | undefined;
352
+ activeBatFaults?: number[] | undefined;
353
+ description: string;
354
+ batReplaceability: number;
355
+ batReplacementDescription: string;
356
+ batQuantity: number;
357
+ batCommonDesignation?: number | undefined;
358
+ batAnsiDesignation?: string | undefined;
359
+ batIecDesignation?: string | undefined;
360
+ batApprovedChemistry?: number | undefined;
361
+ batCapacity?: number | undefined;
362
+ }>;
363
+ /**
364
+ * Creates a default power source rechargeable battery cluster server.
365
+ *
366
+ * @param {number} [batPercentRemaining] - The remaining battery percentage (default: 100). The attribute is in the range 0-200.
367
+ * @param {PowerSource.BatChargeLevel} [batChargeLevel] - The battery charge level (default: PowerSource.BatChargeLevel.Ok).
368
+ * @param {number} [batVoltage] - The battery voltage in mV (default: 1500).
369
+ * @param {PowerSource.BatReplaceability} [batReplaceability] - The replaceability of the battery (default: PowerSource.BatReplaceability.Unspecified).
370
+ * @returns {Behavior.Options<PowerSourceClusterServer>} The options for the power source rechargeable battery cluster server.
371
+ *
372
+ * @remarks
373
+ * - order: The order of the power source is a persisted attribute that indicates the order in which the power sources are used.
374
+ * - description: The description of the power source is a fixed attribute that describes the power source type.
375
+ * - batReplaceability: The replaceability of the battery is a fixed attribute that indicates whether the battery is user-replaceable or not.
376
+ */
377
+ export declare function getDefaultPowerSourceRechargeableBatteryClusterServer(batPercentRemaining?: number, batChargeLevel?: PowerSource.BatChargeLevel, batVoltage?: number, batReplaceability?: PowerSource.BatReplaceability): Partial<{
378
+ status: number;
379
+ order: number;
380
+ endpointList: number[];
381
+ batChargeLevel: number;
382
+ batReplacementNeeded: boolean;
383
+ batChargeState: number;
384
+ batFunctionalWhileCharging: boolean;
385
+ batVoltage?: number | null | undefined;
386
+ batPercentRemaining?: number | null | undefined;
387
+ batTimeRemaining?: number | null | undefined;
388
+ batPresent?: boolean | undefined;
389
+ activeBatFaults?: number[] | undefined;
390
+ batTimeToFullCharge?: number | null | undefined;
391
+ batChargingCurrent?: number | null | undefined;
392
+ activeBatChargeFaults?: number[] | undefined;
393
+ description: string;
394
+ batReplaceability: number;
395
+ batCapacity?: number | undefined;
396
+ }>;
397
+ /**
398
+ * Get the default Electrical Energy Measurement Cluster Server options with features ImportedEnergy, ExportedEnergy, and CumulativeEnergy.
399
+ *
400
+ * @param {number} energyImported - The total consumption value in mW/h.
401
+ * @param {number} energyExported - The total production value in mW/h.
402
+ * @returns {Behavior.Options<ElectricalEnergyMeasurementServer>} - The default options for the Electrical Energy Measurement Cluster Server.
403
+ */
404
+ export declare function getDefaultElectricalEnergyMeasurementClusterServer(energyImported?: number | bigint | null, energyExported?: number | bigint | null): Partial<{
405
+ cumulativeEnergyImported: {
406
+ energy: number | bigint;
407
+ startTimestamp?: number | undefined;
408
+ endTimestamp?: number | undefined;
409
+ startSystime?: number | bigint | undefined;
410
+ endSystime?: number | bigint | undefined;
411
+ } | null;
412
+ cumulativeEnergyExported: {
413
+ energy: number | bigint;
414
+ startTimestamp?: number | undefined;
415
+ endTimestamp?: number | undefined;
416
+ startSystime?: number | bigint | undefined;
417
+ endSystime?: number | bigint | undefined;
418
+ } | null;
419
+ cumulativeEnergyReset?: {
420
+ importedResetTimestamp?: number | null | undefined;
421
+ exportedResetTimestamp?: number | null | undefined;
422
+ importedResetSystime?: number | bigint | null | undefined;
423
+ exportedResetSystime?: number | bigint | null | undefined;
424
+ } | null | undefined;
425
+ accuracy: {
426
+ measurementType: number;
427
+ measured: boolean;
428
+ minMeasuredValue: number | bigint;
429
+ maxMeasuredValue: number | bigint;
430
+ accuracyRanges: {
431
+ rangeMin: number | bigint;
432
+ rangeMax: number | bigint;
433
+ percentMax?: number | undefined;
434
+ percentMin?: number | undefined;
435
+ percentTypical?: number | undefined;
436
+ fixedMax?: number | bigint | undefined;
437
+ fixedMin?: number | bigint | undefined;
438
+ fixedTypical?: number | bigint | undefined;
439
+ }[];
440
+ };
441
+ }>;
442
+ /**
443
+ * Get the default Electrical Power Measurement Cluster Server options with features AlternatingCurrent.
444
+ *
445
+ * @param {number} voltage - The voltage value in millivolts.
446
+ * @param {number} current - The current value in milliamperes.
447
+ * @param {number} power - The power value in milliwatts.
448
+ * @param {number} frequency - The frequency value in millihertz.
449
+ * @returns {Behavior.Options<ElectricalPowerMeasurementServer>} - The default options for the Electrical Power Measurement Cluster Server.
450
+ */
451
+ export declare function getDefaultElectricalPowerMeasurementClusterServer(voltage?: number | bigint | null, current?: number | bigint | null, power?: number | bigint | null, frequency?: number | bigint | null): Partial<{
452
+ powerMode: number;
453
+ activePower: number | bigint | null;
454
+ ranges?: {
455
+ measurementType: number;
456
+ min: number | bigint;
457
+ max: number | bigint;
458
+ startTimestamp?: number | undefined;
459
+ endTimestamp?: number | undefined;
460
+ minTimestamp?: number | undefined;
461
+ maxTimestamp?: number | undefined;
462
+ startSystime?: number | bigint | undefined;
463
+ endSystime?: number | bigint | undefined;
464
+ minSystime?: number | bigint | undefined;
465
+ maxSystime?: number | bigint | undefined;
466
+ }[] | undefined;
467
+ voltage?: number | bigint | null | undefined;
468
+ activeCurrent?: number | bigint | null | undefined;
469
+ frequency?: number | bigint | null | undefined;
470
+ reactiveCurrent?: number | bigint | null | undefined;
471
+ apparentCurrent?: number | bigint | null | undefined;
472
+ reactivePower?: number | bigint | null | undefined;
473
+ apparentPower?: number | bigint | null | undefined;
474
+ rmsVoltage?: number | bigint | null | undefined;
475
+ rmsCurrent?: number | bigint | null | undefined;
476
+ rmsPower?: number | bigint | null | undefined;
477
+ powerFactor?: number | bigint | null | undefined;
478
+ numberOfMeasurementTypes: number;
479
+ accuracy: {
480
+ measurementType: number;
481
+ measured: boolean;
482
+ minMeasuredValue: number | bigint;
483
+ maxMeasuredValue: number | bigint;
484
+ accuracyRanges: {
485
+ rangeMin: number | bigint;
486
+ rangeMax: number | bigint;
487
+ percentMax?: number | undefined;
488
+ percentMin?: number | undefined;
489
+ percentTypical?: number | undefined;
490
+ fixedMax?: number | bigint | undefined;
491
+ fixedMin?: number | bigint | undefined;
492
+ fixedTypical?: number | bigint | undefined;
493
+ }[];
494
+ }[];
495
+ }>;
496
+ /**
497
+ * Get the default Electrical Apparent Power Measurement Cluster Server with features AlternatingCurrent.
498
+ *
499
+ * @param {number} voltage - The voltage value in millivolts.
500
+ * @param {number} apparentCurrent - The current value in milliamperes.
501
+ * @param {number} apparentPower - The apparent power value in millivoltamperes.
502
+ * @param {number} frequency - The frequency value in millihertz.
503
+ * @returns {Behavior.Options<ElectricalPowerMeasurementServer>} - The default options for the Electrical Apparent Power Measurement Cluster Server.
504
+ */
505
+ export declare function getApparentElectricalPowerMeasurementClusterServer(voltage?: number | bigint | null, apparentCurrent?: number | bigint | null, apparentPower?: number | bigint | null, frequency?: number | bigint | null): Partial<{
506
+ powerMode: number;
507
+ activePower: number | bigint | null;
508
+ ranges?: {
509
+ measurementType: number;
510
+ min: number | bigint;
511
+ max: number | bigint;
512
+ startTimestamp?: number | undefined;
513
+ endTimestamp?: number | undefined;
514
+ minTimestamp?: number | undefined;
515
+ maxTimestamp?: number | undefined;
516
+ startSystime?: number | bigint | undefined;
517
+ endSystime?: number | bigint | undefined;
518
+ minSystime?: number | bigint | undefined;
519
+ maxSystime?: number | bigint | undefined;
520
+ }[] | undefined;
521
+ voltage?: number | bigint | null | undefined;
522
+ activeCurrent?: number | bigint | null | undefined;
523
+ frequency?: number | bigint | null | undefined;
524
+ reactiveCurrent?: number | bigint | null | undefined;
525
+ apparentCurrent?: number | bigint | null | undefined;
526
+ reactivePower?: number | bigint | null | undefined;
527
+ apparentPower?: number | bigint | null | undefined;
528
+ rmsVoltage?: number | bigint | null | undefined;
529
+ rmsCurrent?: number | bigint | null | undefined;
530
+ rmsPower?: number | bigint | null | undefined;
531
+ powerFactor?: number | bigint | null | undefined;
532
+ numberOfMeasurementTypes: number;
533
+ accuracy: {
534
+ measurementType: number;
535
+ measured: boolean;
536
+ minMeasuredValue: number | bigint;
537
+ maxMeasuredValue: number | bigint;
538
+ accuracyRanges: {
539
+ rangeMin: number | bigint;
540
+ rangeMax: number | bigint;
541
+ percentMax?: number | undefined;
542
+ percentMin?: number | undefined;
543
+ percentTypical?: number | undefined;
544
+ fixedMax?: number | bigint | undefined;
545
+ fixedMin?: number | bigint | undefined;
546
+ fixedTypical?: number | bigint | undefined;
547
+ }[];
548
+ }[];
549
+ }>;
550
+ /**
551
+ * Get the default Device Energy Management Cluster Server with feature PowerForecastReporting and with the specified ESA type, ESA canGenerate, ESA state, and power limits.
552
+ *
553
+ * @param {DeviceEnergyManagement.EsaType} [esaType] - The ESA type. Defaults to `DeviceEnergyManagement.EsaType.Other`.
554
+ * @param {boolean} [esaCanGenerate] - Indicates if the ESA can generate energy. Defaults to `false`.
555
+ * @param {DeviceEnergyManagement.EsaState} [esaState] - The ESA state. Defaults to `DeviceEnergyManagement.EsaState.Online`.
556
+ * @param {number} [absMinPower] - Indicate the minimum electrical power in mw that the ESA can consume when switched on. Defaults to `0` if not provided.
557
+ * @param {number} [absMaxPower] - Indicate the maximum electrical power in mw that the ESA can consume when switched on. Defaults to `0` if not provided.
558
+ * @returns {Behavior.Options<DeviceEnergyManagementClusterServer>} - The default options for the Device Energy Management Cluster Server.
559
+ *
560
+ * @remarks
561
+ * - The forecast attribute is set to null, indicating that there is no forecast currently available.
562
+ * - The ESA type and canGenerate attributes are fixed and cannot be changed after creation.
563
+ * - The ESA state is set to Online by default.
564
+ * - The absolute minimum and maximum power attributes are set to 0 by default.
565
+ * - For example, a battery storage inverter that can charge its battery at a maximum power of 2000W and can
566
+ * discharge the battery at a maximum power of 3000W, would have a absMinPower: -3000W, absMaxPower: 2000W.
567
+ */
568
+ export declare function getDefaultDeviceEnergyManagementClusterServer(esaType?: DeviceEnergyManagement.EsaType, esaCanGenerate?: boolean, esaState?: DeviceEnergyManagement.EsaState, absMinPower?: number, absMaxPower?: number): Partial<{
569
+ powerAdjustmentCapability: {
570
+ powerAdjustCapability: {
571
+ minPower: number | bigint;
572
+ maxPower: number | bigint;
573
+ minDuration: number;
574
+ maxDuration: number;
575
+ }[] | null;
576
+ cause: number;
577
+ } | null;
578
+ forecast: {
579
+ forecastId: number;
580
+ activeSlotNumber: number | null;
581
+ startTime: number;
582
+ endTime: number;
583
+ isPausable: boolean;
584
+ slots: {
585
+ minDuration: number;
586
+ maxDuration: number;
587
+ defaultDuration: number;
588
+ elapsedSlotTime: number;
589
+ remainingSlotTime: number;
590
+ minPower?: number | bigint | undefined;
591
+ maxPower?: number | bigint | undefined;
592
+ slotIsPausable?: boolean | undefined;
593
+ minPauseDuration?: number | undefined;
594
+ maxPauseDuration?: number | undefined;
595
+ manufacturerEsaState?: number | undefined;
596
+ nominalPower?: number | bigint | undefined;
597
+ nominalEnergy?: number | bigint | undefined;
598
+ costs?: {
599
+ value: number;
600
+ costType: number;
601
+ decimalPoints: number;
602
+ currency?: number | undefined;
603
+ }[] | undefined;
604
+ minPowerAdjustment?: number | bigint | undefined;
605
+ maxPowerAdjustment?: number | bigint | undefined;
606
+ minDurationAdjustment?: number | undefined;
607
+ maxDurationAdjustment?: number | undefined;
608
+ }[];
609
+ forecastUpdateReason: number;
610
+ earliestStartTime?: number | null | undefined;
611
+ latestEndTime?: number | undefined;
612
+ } | null;
613
+ optOutState: number;
614
+ esaState: number;
615
+ absMinPower: number | bigint;
616
+ absMaxPower: number | bigint;
617
+ esaType: number;
618
+ esaCanGenerate: boolean;
619
+ }>;
620
+ /**
621
+ * Get the default EnergyManagementMode Cluster Server.
622
+ *
623
+ * @param {number} [currentMode] - The current mode of the EnergyManagementMode cluster. Defaults to mode 1 (DeviceEnergyManagementMode.ModeTag.NoOptimization).
624
+ * @param {EnergyManagementMode.ModeOption[]} [supportedModes] - The supported modes for the DeviceEnergyManagementMode cluster. The attribute is fixed and defaults to a predefined set of cluster modes.
625
+ * @returns {Behavior.Options<DeviceEnergyManagementModeClusterServer>} - The default options for the Device Energy Management Mode cluster server.
626
+ *
627
+ * @remarks
628
+ * A few examples of Device Energy Management modes and their mode tags are provided below.
629
+ * - For the "No Energy Management (Forecast reporting only)" mode, tags: 0x4000 (NoOptimization).
630
+ * - For the "Device Energy Management" mode, tags: 0x4001 (DeviceOptimization).
631
+ * - For the "Home Energy Management" mode, tags: 0x4001 (DeviceOptimization), 0x4002 (LocalOptimization).
632
+ * - For the "Grid Energy Management" mode, tags: 0x4003 (GridOptimization).
633
+ * - For the "Full Energy Management" mode, tags: 0x4001 (DeviceOptimization), 0x4002 (LocalOptimization), 0x4003 (GridOptimization).
634
+ */
635
+ export declare function getDefaultDeviceEnergyManagementModeClusterServer(currentMode?: number, supportedModes?: DeviceEnergyManagementMode.ModeOption[]): Partial<{
636
+ currentMode: number;
637
+ supportedModes: {
638
+ mode: number;
639
+ label: string;
640
+ modeTags: {
641
+ value: number;
642
+ mfgCode?: number | undefined;
643
+ }[];
644
+ }[];
645
+ }>;
646
+ /** Application Cluster Helpers */
647
+ /**
648
+ * Get the default OperationalState Cluster Server.
649
+ *
650
+ * @param {OperationalState.OperationalStateEnum} operationalState - The initial operational state id.
651
+ * @returns {Behavior.Options<MatterbridgeOperationalStateServer>} - The default options for the OperationalState cluster server.
652
+ *
653
+ * @remarks
654
+ * This method adds a cluster server with a default operational state configuration:
655
+ * - { operationalStateId: OperationalState.OperationalStateEnum.Stopped, operationalStateLabel: 'Stopped' },
656
+ * - { operationalStateId: OperationalState.OperationalStateEnum.Running, operationalStateLabel: 'Running' },
657
+ * - { operationalStateId: OperationalState.OperationalStateEnum.Paused, operationalStateLabel: 'Paused' },
658
+ * - { operationalStateId: OperationalState.OperationalStateEnum.Error, operationalStateLabel: 'Error' },
659
+ */
660
+ export declare function getDefaultOperationalStateClusterServer(operationalState?: OperationalState.OperationalStateEnum): Partial<{
661
+ phaseList: string[] | null;
662
+ currentPhase: number | null;
663
+ operationalStateList: {
664
+ operationalStateId: number;
665
+ operationalStateLabel?: string | undefined;
666
+ }[];
667
+ operationalState: number;
668
+ operationalError: {
669
+ errorStateId: number;
670
+ errorStateLabel?: string | undefined;
671
+ errorStateDetails?: string | undefined;
672
+ };
673
+ countdownTime?: number | null | undefined;
674
+ }>;
675
+ /**
676
+ * Get the default TemperatureMeasurement cluster server options.
677
+ *
678
+ * @param {number | null} measuredValue - The measured value of the temperature x 100.
679
+ * @param {number | null} minMeasuredValue - The minimum measured value of the temperature x 100.
680
+ * @param {number | null} maxMeasuredValue - The maximum measured value of the temperature x 100.
681
+ * @returns {Behavior.Options<MatterbridgeTemperatureMeasurementServer>} - The default options for the TemperatureMeasurement cluster server.
682
+ */
683
+ export declare function getDefaultTemperatureMeasurementClusterServer(measuredValue?: number | null, minMeasuredValue?: number | null, maxMeasuredValue?: number | null): Partial<{
684
+ measuredValue: number | null;
685
+ minMeasuredValue: number | null;
686
+ maxMeasuredValue: number | null;
687
+ tolerance?: number | undefined;
688
+ }>;
689
+ /**
690
+ * Get the default RelativeHumidityMeasurement cluster server options.
691
+ *
692
+ * @param {number | null} measuredValue - The measured value of the relative humidity x 100.
693
+ * @param {number | null} minMeasuredValue - The minimum measured value of the relative humidity x 100.
694
+ * @param {number | null} maxMeasuredValue - The maximum measured value of the relative humidity x 100.
695
+ * @returns {Behavior.Options<MatterbridgeRelativeHumidityMeasurementServer>} - The default options for the RelativeHumidityMeasurement cluster server.
696
+ */
697
+ export declare function getDefaultRelativeHumidityMeasurementClusterServer(measuredValue?: number | null, minMeasuredValue?: number | null, maxMeasuredValue?: number | null): Partial<{
698
+ measuredValue: number | null;
699
+ minMeasuredValue: number | null;
700
+ maxMeasuredValue: number | null;
701
+ tolerance?: number | undefined;
702
+ }>;
703
+ /**
704
+ * Get the default PressureMeasurement cluster server options.
705
+ *
706
+ * @param {number | null} measuredValue - The measured value for the pressure in kPa x 10.
707
+ * @param {number | null} minMeasuredValue - The minimum measured value for the pressure in kPa x 10.
708
+ * @param {number | null} maxMeasuredValue - The maximum measured value for the pressure in kPa x 10.
709
+ * @returns {Behavior.Options<MatterbridgePressureMeasurementServer>} - The default options for the PressureMeasurement cluster server.
710
+ */
711
+ export declare function getDefaultPressureMeasurementClusterServer(measuredValue?: number | null, minMeasuredValue?: number | null, maxMeasuredValue?: number | null): Partial<{
712
+ measuredValue: number | null;
713
+ minMeasuredValue: number | null;
714
+ maxMeasuredValue: number | null;
715
+ tolerance?: number | undefined;
716
+ }>;
717
+ /**
718
+ * Get the default IlluminanceMeasurement cluster server options.
719
+ *
720
+ * @param {number | null} measuredValue - The measured value of illuminance.
721
+ * @param {number | null} minMeasuredValue - The minimum measured value of illuminance.
722
+ * @param {number | null} maxMeasuredValue - The maximum measured value of illuminance.
723
+ * @returns {Behavior.Options<MatterbridgeIlluminanceMeasurementServer>} - The default options for the IlluminanceMeasurement cluster server.
724
+ *
725
+ * @remarks The default value for the illuminance measurement is null.
726
+ * This attribute SHALL indicate the illuminance in Lux (symbol lx) as follows:
727
+ * • MeasuredValue = 10,000 x log10(illuminance) + 1,
728
+ * where 1 lx <= illuminance <= 3.576 Mlx, corresponding to a MeasuredValue in the range 1 to 0xFFFE.
729
+ * • 0 indicates a value of illuminance that is too low to be measured
730
+ * • null indicates that the illuminance measurement is invalid.
731
+ */
732
+ export declare function getDefaultIlluminanceMeasurementClusterServer(measuredValue?: number | null, minMeasuredValue?: number | null, maxMeasuredValue?: number | null): Partial<{
733
+ measuredValue: number | null;
734
+ minMeasuredValue: number | null;
735
+ maxMeasuredValue: number | null;
736
+ tolerance?: number | undefined;
737
+ lightSensorType?: number | null | undefined;
738
+ }>;
739
+ /**
740
+ * Get the default FlowMeasurement cluster server options.
741
+ *
742
+ * @param {number | null} measuredValue - The measured value of the flow in 10 x m3/h.
743
+ * @param {number | null} minMeasuredValue - The minimum measured value of the flow in 10 x m3/h.
744
+ * @param {number | null} maxMeasuredValue - The maximum measured value of the flow in 10 x m3/h.
745
+ * @returns {Behavior.Options<MatterbridgeFlowMeasurementServer>} - The default options for the FlowMeasurement cluster server.
746
+ */
747
+ export declare function getDefaultFlowMeasurementClusterServer(measuredValue?: number | null, minMeasuredValue?: number | null, maxMeasuredValue?: number | null): Partial<{
748
+ measuredValue: number | null;
749
+ minMeasuredValue: number | null;
750
+ maxMeasuredValue: number | null;
751
+ tolerance?: number | undefined;
752
+ }>;
753
+ /**
754
+ * Get the default OccupancySensing cluster server options.
755
+ *
756
+ * @param {boolean} occupied - A boolean indicating whether the occupancy is occupied or not. Default is false.
757
+ * @param {number} holdTime - The hold time in seconds. Default is 30.
758
+ * @param {number} holdTimeMin - The minimum hold time in seconds. Default is 1.
759
+ * @param {number} holdTimeMax - The maximum hold time in seconds. Default is 300.
760
+ * @returns {Behavior.Options<MatterbridgeOccupancySensingServer>} - The default options for the OccupancySensing cluster server.
761
+ *
762
+ * @remarks The default value for the occupancy sensor type is PIR.
763
+ * Servers SHALL set these attributes for backward compatibility with clients implementing a cluster revision <= 4 as
764
+ * described in OccupancySensorType and OccupancySensorTypeBitmap Attributes.
765
+ * This replaces the 9 legacy attributes PIROccupiedToUnoccupiedDelay through PhysicalContactUnoccupiedToOccupiedThreshold.
766
+ */
767
+ export declare function getDefaultOccupancySensingClusterServer(occupied?: boolean, holdTime?: number, holdTimeMin?: number, holdTimeMax?: number): Partial<{
768
+ occupancy: {
769
+ occupied?: boolean | undefined;
770
+ };
771
+ holdTime?: number | undefined;
772
+ pirOccupiedToUnoccupiedDelay?: number | undefined;
773
+ pirUnoccupiedToOccupiedDelay?: number | undefined;
774
+ pirUnoccupiedToOccupiedThreshold?: number | undefined;
775
+ occupancySensorType: number;
776
+ occupancySensorTypeBitmap: {
777
+ pir?: boolean | undefined;
778
+ ultrasonic?: boolean | undefined;
779
+ physicalContact?: boolean | undefined;
780
+ };
781
+ holdTimeLimits?: {
782
+ holdTimeMin: number;
783
+ holdTimeMax: number;
784
+ holdTimeDefault: number;
785
+ } | undefined;
786
+ }>;
787
+ //# sourceMappingURL=matterbridgeEndpointHelpers.d.ts.map