homebridge 2.0.0-beta.4 → 2.0.0-beta.40

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 (359) hide show
  1. package/README.md +16 -17
  2. package/bin/homebridge.js +22 -0
  3. package/config-sample.json +3 -3
  4. package/dist/api.d.ts +499 -0
  5. package/dist/api.d.ts.map +1 -0
  6. package/dist/api.js +223 -0
  7. package/dist/api.js.map +1 -0
  8. package/dist/api.spec.d.ts +2 -0
  9. package/dist/api.spec.d.ts.map +1 -0
  10. package/dist/api.spec.js +413 -0
  11. package/dist/api.spec.js.map +1 -0
  12. package/{lib → dist}/bridgeService.d.ts +19 -10
  13. package/dist/bridgeService.d.ts.map +1 -0
  14. package/{lib → dist}/bridgeService.js +85 -117
  15. package/dist/bridgeService.js.map +1 -0
  16. package/{lib → dist}/childBridgeFork.d.ts +11 -5
  17. package/dist/childBridgeFork.d.ts.map +1 -0
  18. package/{lib → dist}/childBridgeFork.js +93 -44
  19. package/dist/childBridgeFork.js.map +1 -0
  20. package/{lib → dist}/childBridgeService.d.ts +37 -7
  21. package/dist/childBridgeService.d.ts.map +1 -0
  22. package/{lib → dist}/childBridgeService.js +127 -69
  23. package/dist/childBridgeService.js.map +1 -0
  24. package/dist/cli.d.ts +3 -0
  25. package/dist/cli.d.ts.map +1 -0
  26. package/dist/cli.js +90 -0
  27. package/dist/cli.js.map +1 -0
  28. package/dist/externalPortService.d.ts +47 -0
  29. package/dist/externalPortService.d.ts.map +1 -0
  30. package/dist/externalPortService.js +105 -0
  31. package/dist/externalPortService.js.map +1 -0
  32. package/dist/index.d.ts +141 -0
  33. package/dist/index.d.ts.map +1 -0
  34. package/dist/index.js +53 -0
  35. package/dist/index.js.map +1 -0
  36. package/dist/ipcService.d.ts +48 -0
  37. package/dist/ipcService.d.ts.map +1 -0
  38. package/{lib → dist}/ipcService.js +12 -14
  39. package/dist/ipcService.js.map +1 -0
  40. package/{lib → dist}/logger.d.ts +12 -6
  41. package/dist/logger.d.ts.map +1 -0
  42. package/{lib → dist}/logger.js +27 -28
  43. package/dist/logger.js.map +1 -0
  44. package/dist/logger.spec.d.ts +2 -0
  45. package/dist/logger.spec.d.ts.map +1 -0
  46. package/dist/logger.spec.js +95 -0
  47. package/dist/logger.spec.js.map +1 -0
  48. package/dist/matter/ChildBridgeMatterManager.d.ts +96 -0
  49. package/dist/matter/ChildBridgeMatterManager.d.ts.map +1 -0
  50. package/dist/matter/ChildBridgeMatterManager.js +399 -0
  51. package/dist/matter/ChildBridgeMatterManager.js.map +1 -0
  52. package/dist/matter/ExternalMatterAccessoryPublisher.d.ts +48 -0
  53. package/dist/matter/ExternalMatterAccessoryPublisher.d.ts.map +1 -0
  54. package/dist/matter/ExternalMatterAccessoryPublisher.js +73 -0
  55. package/dist/matter/ExternalMatterAccessoryPublisher.js.map +1 -0
  56. package/dist/matter/ExternalMatterAccessoryPublisher.spec.d.ts +2 -0
  57. package/dist/matter/ExternalMatterAccessoryPublisher.spec.d.ts.map +1 -0
  58. package/dist/matter/ExternalMatterAccessoryPublisher.spec.js +293 -0
  59. package/dist/matter/ExternalMatterAccessoryPublisher.spec.js.map +1 -0
  60. package/dist/matter/MatterAPIImpl.d.ts +504 -0
  61. package/dist/matter/MatterAPIImpl.d.ts.map +1 -0
  62. package/dist/matter/MatterAPIImpl.js +305 -0
  63. package/dist/matter/MatterAPIImpl.js.map +1 -0
  64. package/dist/matter/MatterBridgeManager.d.ts +87 -0
  65. package/dist/matter/MatterBridgeManager.d.ts.map +1 -0
  66. package/dist/matter/MatterBridgeManager.js +413 -0
  67. package/dist/matter/MatterBridgeManager.js.map +1 -0
  68. package/dist/matter/MatterConfigCollector.d.ts +26 -0
  69. package/dist/matter/MatterConfigCollector.d.ts.map +1 -0
  70. package/dist/matter/MatterConfigCollector.js +78 -0
  71. package/dist/matter/MatterConfigCollector.js.map +1 -0
  72. package/dist/matter/accessoryCache.d.ts +105 -0
  73. package/dist/matter/accessoryCache.d.ts.map +1 -0
  74. package/dist/matter/accessoryCache.js +214 -0
  75. package/dist/matter/accessoryCache.js.map +1 -0
  76. package/dist/matter/accessoryCache.spec.d.ts +2 -0
  77. package/dist/matter/accessoryCache.spec.d.ts.map +1 -0
  78. package/dist/matter/accessoryCache.spec.js +452 -0
  79. package/dist/matter/accessoryCache.spec.js.map +1 -0
  80. package/dist/matter/behaviors/BehaviorRegistry.d.ts +65 -0
  81. package/dist/matter/behaviors/BehaviorRegistry.d.ts.map +1 -0
  82. package/dist/matter/behaviors/BehaviorRegistry.js +139 -0
  83. package/dist/matter/behaviors/BehaviorRegistry.js.map +1 -0
  84. package/dist/matter/behaviors/BehaviorRegistry.spec.d.ts +2 -0
  85. package/dist/matter/behaviors/BehaviorRegistry.spec.d.ts.map +1 -0
  86. package/dist/matter/behaviors/BehaviorRegistry.spec.js +307 -0
  87. package/dist/matter/behaviors/BehaviorRegistry.spec.js.map +1 -0
  88. package/dist/matter/behaviors/ColorControlBehavior.d.ts +63 -0
  89. package/dist/matter/behaviors/ColorControlBehavior.d.ts.map +1 -0
  90. package/dist/matter/behaviors/ColorControlBehavior.js +223 -0
  91. package/dist/matter/behaviors/ColorControlBehavior.js.map +1 -0
  92. package/dist/matter/behaviors/ColorControlBehavior.spec.d.ts +2 -0
  93. package/dist/matter/behaviors/ColorControlBehavior.spec.d.ts.map +1 -0
  94. package/dist/matter/behaviors/ColorControlBehavior.spec.js +29 -0
  95. package/dist/matter/behaviors/ColorControlBehavior.spec.js.map +1 -0
  96. package/dist/matter/behaviors/DoorLockBehavior.d.ts +20 -0
  97. package/dist/matter/behaviors/DoorLockBehavior.d.ts.map +1 -0
  98. package/dist/matter/behaviors/DoorLockBehavior.js +71 -0
  99. package/dist/matter/behaviors/DoorLockBehavior.js.map +1 -0
  100. package/dist/matter/behaviors/DoorLockBehavior.spec.d.ts +2 -0
  101. package/dist/matter/behaviors/DoorLockBehavior.spec.d.ts.map +1 -0
  102. package/dist/matter/behaviors/DoorLockBehavior.spec.js +120 -0
  103. package/dist/matter/behaviors/DoorLockBehavior.spec.js.map +1 -0
  104. package/dist/matter/behaviors/FanControlBehavior.d.ts +20 -0
  105. package/dist/matter/behaviors/FanControlBehavior.d.ts.map +1 -0
  106. package/dist/matter/behaviors/FanControlBehavior.js +71 -0
  107. package/dist/matter/behaviors/FanControlBehavior.js.map +1 -0
  108. package/dist/matter/behaviors/FanControlBehavior.spec.d.ts +2 -0
  109. package/dist/matter/behaviors/FanControlBehavior.spec.d.ts.map +1 -0
  110. package/dist/matter/behaviors/FanControlBehavior.spec.js +23 -0
  111. package/dist/matter/behaviors/FanControlBehavior.spec.js.map +1 -0
  112. package/dist/matter/behaviors/IdentifyBehavior.d.ts +20 -0
  113. package/dist/matter/behaviors/IdentifyBehavior.d.ts.map +1 -0
  114. package/dist/matter/behaviors/IdentifyBehavior.js +41 -0
  115. package/dist/matter/behaviors/IdentifyBehavior.js.map +1 -0
  116. package/dist/matter/behaviors/IdentifyBehavior.spec.d.ts +2 -0
  117. package/dist/matter/behaviors/IdentifyBehavior.spec.d.ts.map +1 -0
  118. package/dist/matter/behaviors/IdentifyBehavior.spec.js +64 -0
  119. package/dist/matter/behaviors/IdentifyBehavior.spec.js.map +1 -0
  120. package/dist/matter/behaviors/LevelControlBehavior.d.ts +33 -0
  121. package/dist/matter/behaviors/LevelControlBehavior.d.ts.map +1 -0
  122. package/dist/matter/behaviors/LevelControlBehavior.js +138 -0
  123. package/dist/matter/behaviors/LevelControlBehavior.js.map +1 -0
  124. package/dist/matter/behaviors/LevelControlBehavior.spec.d.ts +2 -0
  125. package/dist/matter/behaviors/LevelControlBehavior.spec.d.ts.map +1 -0
  126. package/dist/matter/behaviors/LevelControlBehavior.spec.js +145 -0
  127. package/dist/matter/behaviors/LevelControlBehavior.spec.js.map +1 -0
  128. package/dist/matter/behaviors/OnOffBehavior.d.ts +27 -0
  129. package/dist/matter/behaviors/OnOffBehavior.d.ts.map +1 -0
  130. package/dist/matter/behaviors/OnOffBehavior.js +95 -0
  131. package/dist/matter/behaviors/OnOffBehavior.js.map +1 -0
  132. package/dist/matter/behaviors/OnOffBehavior.spec.d.ts +2 -0
  133. package/dist/matter/behaviors/OnOffBehavior.spec.d.ts.map +1 -0
  134. package/dist/matter/behaviors/OnOffBehavior.spec.js +128 -0
  135. package/dist/matter/behaviors/OnOffBehavior.spec.js.map +1 -0
  136. package/dist/matter/behaviors/RvcCleanModeBehavior.d.ts +19 -0
  137. package/dist/matter/behaviors/RvcCleanModeBehavior.d.ts.map +1 -0
  138. package/dist/matter/behaviors/RvcCleanModeBehavior.js +41 -0
  139. package/dist/matter/behaviors/RvcCleanModeBehavior.js.map +1 -0
  140. package/dist/matter/behaviors/RvcCleanModeBehavior.spec.d.ts +2 -0
  141. package/dist/matter/behaviors/RvcCleanModeBehavior.spec.d.ts.map +1 -0
  142. package/dist/matter/behaviors/RvcCleanModeBehavior.spec.js +57 -0
  143. package/dist/matter/behaviors/RvcCleanModeBehavior.spec.js.map +1 -0
  144. package/dist/matter/behaviors/RvcOperationalStateBehavior.d.ts +22 -0
  145. package/dist/matter/behaviors/RvcOperationalStateBehavior.d.ts.map +1 -0
  146. package/dist/matter/behaviors/RvcOperationalStateBehavior.js +86 -0
  147. package/dist/matter/behaviors/RvcOperationalStateBehavior.js.map +1 -0
  148. package/dist/matter/behaviors/RvcOperationalStateBehavior.spec.d.ts +2 -0
  149. package/dist/matter/behaviors/RvcOperationalStateBehavior.spec.d.ts.map +1 -0
  150. package/dist/matter/behaviors/RvcOperationalStateBehavior.spec.js +55 -0
  151. package/dist/matter/behaviors/RvcOperationalStateBehavior.spec.js.map +1 -0
  152. package/dist/matter/behaviors/RvcRunModeBehavior.d.ts +19 -0
  153. package/dist/matter/behaviors/RvcRunModeBehavior.d.ts.map +1 -0
  154. package/dist/matter/behaviors/RvcRunModeBehavior.js +41 -0
  155. package/dist/matter/behaviors/RvcRunModeBehavior.js.map +1 -0
  156. package/dist/matter/behaviors/RvcRunModeBehavior.spec.d.ts +2 -0
  157. package/dist/matter/behaviors/RvcRunModeBehavior.spec.d.ts.map +1 -0
  158. package/dist/matter/behaviors/RvcRunModeBehavior.spec.js +57 -0
  159. package/dist/matter/behaviors/RvcRunModeBehavior.spec.js.map +1 -0
  160. package/dist/matter/behaviors/ServiceAreaBehavior.d.ts +21 -0
  161. package/dist/matter/behaviors/ServiceAreaBehavior.d.ts.map +1 -0
  162. package/dist/matter/behaviors/ServiceAreaBehavior.js +61 -0
  163. package/dist/matter/behaviors/ServiceAreaBehavior.js.map +1 -0
  164. package/dist/matter/behaviors/ServiceAreaBehavior.spec.d.ts +2 -0
  165. package/dist/matter/behaviors/ServiceAreaBehavior.spec.d.ts.map +1 -0
  166. package/dist/matter/behaviors/ServiceAreaBehavior.spec.js +53 -0
  167. package/dist/matter/behaviors/ServiceAreaBehavior.spec.js.map +1 -0
  168. package/dist/matter/behaviors/ThermostatBehavior.d.ts +22 -0
  169. package/dist/matter/behaviors/ThermostatBehavior.d.ts.map +1 -0
  170. package/dist/matter/behaviors/ThermostatBehavior.js +127 -0
  171. package/dist/matter/behaviors/ThermostatBehavior.js.map +1 -0
  172. package/dist/matter/behaviors/ThermostatBehavior.spec.d.ts +2 -0
  173. package/dist/matter/behaviors/ThermostatBehavior.spec.d.ts.map +1 -0
  174. package/dist/matter/behaviors/ThermostatBehavior.spec.js +23 -0
  175. package/dist/matter/behaviors/ThermostatBehavior.spec.js.map +1 -0
  176. package/dist/matter/behaviors/WindowCoveringBehavior.d.ts +31 -0
  177. package/dist/matter/behaviors/WindowCoveringBehavior.d.ts.map +1 -0
  178. package/dist/matter/behaviors/WindowCoveringBehavior.js +158 -0
  179. package/dist/matter/behaviors/WindowCoveringBehavior.js.map +1 -0
  180. package/dist/matter/behaviors/WindowCoveringBehavior.spec.d.ts +2 -0
  181. package/dist/matter/behaviors/WindowCoveringBehavior.spec.d.ts.map +1 -0
  182. package/dist/matter/behaviors/WindowCoveringBehavior.spec.js +27 -0
  183. package/dist/matter/behaviors/WindowCoveringBehavior.spec.js.map +1 -0
  184. package/dist/matter/behaviors/index.d.ts +20 -0
  185. package/dist/matter/behaviors/index.d.ts.map +1 -0
  186. package/dist/matter/behaviors/index.js +21 -0
  187. package/dist/matter/behaviors/index.js.map +1 -0
  188. package/dist/matter/configValidator.d.ts +81 -0
  189. package/dist/matter/configValidator.d.ts.map +1 -0
  190. package/dist/matter/configValidator.js +240 -0
  191. package/dist/matter/configValidator.js.map +1 -0
  192. package/dist/matter/configValidator.spec.d.ts +2 -0
  193. package/dist/matter/configValidator.spec.d.ts.map +1 -0
  194. package/dist/matter/configValidator.spec.js +390 -0
  195. package/dist/matter/configValidator.spec.js.map +1 -0
  196. package/dist/matter/errorHandler.d.ts +33 -0
  197. package/dist/matter/errorHandler.d.ts.map +1 -0
  198. package/dist/matter/errorHandler.js +113 -0
  199. package/dist/matter/errorHandler.js.map +1 -0
  200. package/dist/matter/errorHandler.spec.d.ts +2 -0
  201. package/dist/matter/errorHandler.spec.d.ts.map +1 -0
  202. package/dist/matter/errorHandler.spec.js +159 -0
  203. package/dist/matter/errorHandler.spec.js.map +1 -0
  204. package/dist/matter/errors.d.ts +178 -0
  205. package/dist/matter/errors.d.ts.map +1 -0
  206. package/dist/matter/errors.js +200 -0
  207. package/dist/matter/errors.js.map +1 -0
  208. package/dist/matter/index.d.ts +127 -0
  209. package/dist/matter/index.d.ts.map +1 -0
  210. package/dist/matter/index.js +23 -0
  211. package/dist/matter/index.js.map +1 -0
  212. package/dist/matter/logFormatter.d.ts +19 -0
  213. package/dist/matter/logFormatter.d.ts.map +1 -0
  214. package/dist/matter/logFormatter.js +158 -0
  215. package/dist/matter/logFormatter.js.map +1 -0
  216. package/dist/matter/logFormatter.spec.d.ts +2 -0
  217. package/dist/matter/logFormatter.spec.d.ts.map +1 -0
  218. package/dist/matter/logFormatter.spec.js +252 -0
  219. package/dist/matter/logFormatter.spec.js.map +1 -0
  220. package/dist/matter/server.d.ts +336 -0
  221. package/dist/matter/server.d.ts.map +1 -0
  222. package/dist/matter/server.js +1810 -0
  223. package/dist/matter/server.js.map +1 -0
  224. package/dist/matter/serverHelpers.d.ts +81 -0
  225. package/dist/matter/serverHelpers.d.ts.map +1 -0
  226. package/dist/matter/serverHelpers.js +326 -0
  227. package/dist/matter/serverHelpers.js.map +1 -0
  228. package/dist/matter/serverHelpers.spec.d.ts +2 -0
  229. package/dist/matter/serverHelpers.spec.d.ts.map +1 -0
  230. package/dist/matter/serverHelpers.spec.js +521 -0
  231. package/dist/matter/serverHelpers.spec.js.map +1 -0
  232. package/dist/matter/sharedTypes.d.ts +164 -0
  233. package/dist/matter/sharedTypes.d.ts.map +1 -0
  234. package/dist/matter/sharedTypes.js +46 -0
  235. package/dist/matter/sharedTypes.js.map +1 -0
  236. package/dist/matter/storage.d.ts +135 -0
  237. package/dist/matter/storage.d.ts.map +1 -0
  238. package/dist/matter/storage.js +424 -0
  239. package/dist/matter/storage.js.map +1 -0
  240. package/dist/matter/storage.spec.d.ts +2 -0
  241. package/dist/matter/storage.spec.d.ts.map +1 -0
  242. package/dist/matter/storage.spec.js +570 -0
  243. package/dist/matter/storage.spec.js.map +1 -0
  244. package/dist/matter/typeHelpers.d.ts +45 -0
  245. package/dist/matter/typeHelpers.d.ts.map +1 -0
  246. package/dist/matter/typeHelpers.js +57 -0
  247. package/dist/matter/typeHelpers.js.map +1 -0
  248. package/dist/matter/typeHelpers.spec.d.ts +2 -0
  249. package/dist/matter/typeHelpers.spec.d.ts.map +1 -0
  250. package/dist/matter/typeHelpers.spec.js +127 -0
  251. package/dist/matter/typeHelpers.spec.js.map +1 -0
  252. package/dist/matter/types.d.ts +826 -0
  253. package/dist/matter/types.d.ts.map +1 -0
  254. package/dist/matter/types.js +204 -0
  255. package/dist/matter/types.js.map +1 -0
  256. package/{lib → dist}/platformAccessory.d.ts +8 -6
  257. package/dist/platformAccessory.d.ts.map +1 -0
  258. package/{lib → dist}/platformAccessory.js +19 -16
  259. package/dist/platformAccessory.js.map +1 -0
  260. package/dist/platformAccessory.spec.d.ts +2 -0
  261. package/dist/platformAccessory.spec.d.ts.map +1 -0
  262. package/dist/platformAccessory.spec.js +126 -0
  263. package/dist/platformAccessory.spec.js.map +1 -0
  264. package/{lib → dist}/plugin.d.ts +2 -3
  265. package/dist/plugin.d.ts.map +1 -0
  266. package/{lib → dist}/plugin.js +39 -51
  267. package/dist/plugin.js.map +1 -0
  268. package/{lib → dist}/pluginManager.d.ts +3 -3
  269. package/dist/pluginManager.d.ts.map +1 -0
  270. package/{lib → dist}/pluginManager.js +76 -81
  271. package/dist/pluginManager.js.map +1 -0
  272. package/dist/pluginManager.spec.d.ts +2 -0
  273. package/dist/pluginManager.spec.d.ts.map +1 -0
  274. package/dist/pluginManager.spec.js +43 -0
  275. package/dist/pluginManager.spec.js.map +1 -0
  276. package/{lib → dist}/server.d.ts +14 -1
  277. package/dist/server.d.ts.map +1 -0
  278. package/{lib → dist}/server.js +193 -123
  279. package/dist/server.js.map +1 -0
  280. package/dist/server.spec.d.ts +2 -0
  281. package/dist/server.spec.d.ts.map +1 -0
  282. package/dist/server.spec.js +57 -0
  283. package/dist/server.spec.js.map +1 -0
  284. package/{lib → dist}/storageService.d.ts.map +1 -1
  285. package/dist/storageService.js +41 -0
  286. package/dist/storageService.js.map +1 -0
  287. package/{lib → dist}/user.d.ts +1 -0
  288. package/dist/user.d.ts.map +1 -0
  289. package/dist/user.js +32 -0
  290. package/dist/user.js.map +1 -0
  291. package/dist/user.spec.d.ts +2 -0
  292. package/dist/user.spec.d.ts.map +1 -0
  293. package/dist/user.spec.js +31 -0
  294. package/dist/user.spec.js.map +1 -0
  295. package/{lib → dist}/util/mac.d.ts +1 -0
  296. package/dist/util/mac.d.ts.map +1 -0
  297. package/dist/util/mac.js +14 -0
  298. package/dist/util/mac.js.map +1 -0
  299. package/dist/util/mac.spec.d.ts +2 -0
  300. package/dist/util/mac.spec.d.ts.map +1 -0
  301. package/dist/util/mac.spec.js +36 -0
  302. package/dist/util/mac.spec.js.map +1 -0
  303. package/dist/version.d.ts.map +1 -0
  304. package/dist/version.js +16 -0
  305. package/dist/version.js.map +1 -0
  306. package/dist/version.spec.d.ts +2 -0
  307. package/dist/version.spec.d.ts.map +1 -0
  308. package/dist/version.spec.js +20 -0
  309. package/dist/version.spec.js.map +1 -0
  310. package/package.json +49 -50
  311. package/bin/homebridge +0 -17
  312. package/lib/api.d.ts +0 -210
  313. package/lib/api.d.ts.map +0 -1
  314. package/lib/api.js +0 -155
  315. package/lib/api.js.map +0 -1
  316. package/lib/bridgeService.d.ts.map +0 -1
  317. package/lib/bridgeService.js.map +0 -1
  318. package/lib/childBridgeFork.d.ts.map +0 -1
  319. package/lib/childBridgeFork.js.map +0 -1
  320. package/lib/childBridgeService.d.ts.map +0 -1
  321. package/lib/childBridgeService.js.map +0 -1
  322. package/lib/cli.d.ts +0 -4
  323. package/lib/cli.d.ts.map +0 -1
  324. package/lib/cli.js +0 -111
  325. package/lib/cli.js.map +0 -1
  326. package/lib/externalPortService.d.ts +0 -33
  327. package/lib/externalPortService.d.ts.map +0 -1
  328. package/lib/externalPortService.js +0 -64
  329. package/lib/externalPortService.js.map +0 -1
  330. package/lib/index.d.ts +0 -76
  331. package/lib/index.d.ts.map +0 -1
  332. package/lib/index.js +0 -72
  333. package/lib/index.js.map +0 -1
  334. package/lib/ipcService.d.ts +0 -33
  335. package/lib/ipcService.d.ts.map +0 -1
  336. package/lib/ipcService.js.map +0 -1
  337. package/lib/logger.d.ts.map +0 -1
  338. package/lib/logger.js.map +0 -1
  339. package/lib/platformAccessory.d.ts.map +0 -1
  340. package/lib/platformAccessory.js.map +0 -1
  341. package/lib/plugin.d.ts.map +0 -1
  342. package/lib/plugin.js.map +0 -1
  343. package/lib/pluginManager.d.ts.map +0 -1
  344. package/lib/pluginManager.js.map +0 -1
  345. package/lib/server.d.ts.map +0 -1
  346. package/lib/server.js.map +0 -1
  347. package/lib/storageService.js +0 -70
  348. package/lib/storageService.js.map +0 -1
  349. package/lib/user.d.ts.map +0 -1
  350. package/lib/user.js +0 -36
  351. package/lib/user.js.map +0 -1
  352. package/lib/util/mac.d.ts.map +0 -1
  353. package/lib/util/mac.js +0 -20
  354. package/lib/util/mac.js.map +0 -1
  355. package/lib/version.d.ts.map +0 -1
  356. package/lib/version.js +0 -21
  357. package/lib/version.js.map +0 -1
  358. /package/{lib → dist}/storageService.d.ts +0 -0
  359. /package/{lib → dist}/version.d.ts +0 -0
@@ -0,0 +1,826 @@
1
+ /**
2
+ * Matter Types for Homebridge Plugin API
3
+ *
4
+ * This module provides types and interfaces for plugin developers
5
+ * to create Matter-compatible accessories.
6
+ */
7
+ import type { Endpoint, EndpointType } from '@matter/main';
8
+ import { EventEmitter } from 'node:events';
9
+ import * as clusters from '@matter/main/clusters';
10
+ import * as devices from '@matter/main/devices';
11
+ export type { EndpointType };
12
+ /**
13
+ * Handler context information
14
+ * Provides information about which part of a composed device triggered the handler
15
+ */
16
+ export interface MatterHandlerContext {
17
+ /** Parent accessory UUID */
18
+ uuid: string;
19
+ /** Part ID if this handler was triggered from a part, undefined for main accessory */
20
+ partId?: string;
21
+ }
22
+ /**
23
+ * Matter command handler function type
24
+ *
25
+ * Handlers can be synchronous or asynchronous (returning a Promise).
26
+ * The args parameter contains the command arguments passed by Matter.js (optional).
27
+ * The context parameter provides information about which part triggered the handler (for composed devices).
28
+ */
29
+ export type MatterCommandHandler<TArgs = unknown> = (args?: TArgs, context?: MatterHandlerContext) => Promise<void> | void;
30
+ /**
31
+ * Matter cluster handlers interface
32
+ *
33
+ * Maps command names to their handler functions.
34
+ * Each command can have custom argument types.
35
+ */
36
+ export interface MatterClusterHandlers {
37
+ [commandName: string]: MatterCommandHandler<any>;
38
+ }
39
+ /**
40
+ * Matter Accessory Part - Sub-device in a composed accessory
41
+ *
42
+ * Represents a child endpoint in a composed device (e.g., individual outlets in a power strip).
43
+ * Parts are added as child endpoints to the main accessory.
44
+ */
45
+ export interface MatterAccessoryPart {
46
+ /** Unique identifier for this part within the accessory (e.g., 'outlet-1', 'light', 'shade') */
47
+ id: string;
48
+ /** Display name for this part (optional, defaults to parent's name + part id) */
49
+ displayName?: string;
50
+ /** Matter device type for this part */
51
+ deviceType: EndpointType;
52
+ /**
53
+ * Initial cluster states for this part
54
+ * Same format as `MatterAccessory.clusters`
55
+ */
56
+ clusters: {
57
+ [clusterName: string]: {
58
+ [attributeName: string]: unknown;
59
+ };
60
+ };
61
+ /**
62
+ * Handlers for this part's commands
63
+ * Handlers receive context.partId to identify which part was triggered
64
+ */
65
+ handlers?: {
66
+ [clusterName: string]: MatterClusterHandlers;
67
+ };
68
+ }
69
+ /**
70
+ * Matter Accessory - Plugin API Interface
71
+ *
72
+ * This is the main interface that plugin developers use to register
73
+ * Matter accessories with Homebridge.
74
+ *
75
+ * For composed devices (devices with multiple subcomponents), use the `parts` array
76
+ * to define child endpoints. Each part appears as a separate device in the Home app.
77
+ */
78
+ export interface MatterAccessory<T = Record<string, unknown>> {
79
+ /** Unique identifier for this accessory (must be unique across all accessories) */
80
+ uuid: string;
81
+ /** Display name for the accessory */
82
+ displayName: string;
83
+ /** Matter device type (e.g., OnOffLightDevice, DimmableLightDevice, etc.) */
84
+ deviceType: EndpointType;
85
+ /** Serial number for the device */
86
+ serialNumber: string;
87
+ /** Manufacturer name */
88
+ manufacturer: string;
89
+ /** Model name/identifier */
90
+ model: string;
91
+ /** Firmware revision (optional) */
92
+ firmwareRevision?: string;
93
+ /** Hardware revision (optional) */
94
+ hardwareRevision?: string;
95
+ /** Software version (optional) */
96
+ softwareVersion?: string;
97
+ /**
98
+ * Plugin developer storage - persists across restarts
99
+ * This is a way for plugin developers to store custom data with their accessory
100
+ * Similar to `PlatformAccessory.context` for HAP accessories
101
+ */
102
+ context?: T;
103
+ /**
104
+ * Initial cluster states
105
+ * Key is the cluster name, value is an object of attribute name -> value
106
+ *
107
+ * Example:
108
+ * {
109
+ * onOff: { onOff: true },
110
+ * levelControl: { currentLevel: 127, minLevel: 1, maxLevel: 254 }
111
+ * }
112
+ *
113
+ * Note: If using `parts`, this is optional (main accessory may only be a container)
114
+ */
115
+ clusters?: {
116
+ [clusterName: string]: {
117
+ [attributeName: string]: unknown;
118
+ };
119
+ };
120
+ /**
121
+ * Handlers for Matter commands (Home app → Device)
122
+ *
123
+ * These handlers are called when a user controls the accessory via the Home app.
124
+ * Use handlers to send commands to your actual device (cloud API, local network, etc.).
125
+ */
126
+ handlers?: {
127
+ [clusterName: string]: MatterClusterHandlers;
128
+ };
129
+ /**
130
+ * Optional: Get current state handler
131
+ * Called when a Matter controller reads an attribute
132
+ * If not provided, the last set value is returned
133
+ */
134
+ getState?: (cluster: string, attribute: string) => Promise<any> | any;
135
+ /**
136
+ * Optional: Array of child endpoints (parts) for composed devices
137
+ *
138
+ * Use this to create devices with multiple independent subcomponents, such as:
139
+ * - Power strip with multiple outlets
140
+ * - Window covering with shade + light
141
+ * - Multi-zone thermostat or speaker system
142
+ *
143
+ * Each part appears as a separate device in the Home app and can be controlled independently.
144
+ *
145
+ * Example:
146
+ * ```typescript
147
+ * parts: [
148
+ * {
149
+ * id: 'outlet-1',
150
+ * displayName: 'Outlet 1',
151
+ * deviceType: api.matter.deviceTypes.OnOffOutlet,
152
+ * clusters: { onOff: { onOff: false } },
153
+ * handlers: {
154
+ * onOff: {
155
+ * on: async (args, context) => {
156
+ * console.log(`Part ${context.partId} turned on`)
157
+ * await controlOutlet(1, true)
158
+ * }
159
+ * }
160
+ * }
161
+ * },
162
+ * // ... more outlets
163
+ * ]
164
+ * ```
165
+ */
166
+ parts?: MatterAccessoryPart[];
167
+ /**
168
+ * Event emitter for accessory lifecycle events.
169
+ *
170
+ * **Only available for external accessories** published via `api.matter.publishExternalAccessories()`.
171
+ * This property is `undefined` for accessories registered via `api.matter.registerPlatformAccessories()`.
172
+ *
173
+ * The event emitter is created automatically when the accessory is published and allows
174
+ * plugins to listen for the 'ready' event (fired when the Matter server starts).
175
+ *
176
+ * **HAP Equivalent:** Similar to accessing events on `PlatformAccessory._associatedHAPAccessory`
177
+ *
178
+ * @example
179
+ * ```typescript
180
+ * const accessory: MatterAccessory = { ... };
181
+ * api.matter.publishExternalAccessories('plugin', [accessory]);
182
+ *
183
+ * // Listen for when the accessory is ready on the network
184
+ * accessory._eventEmitter?.on(MatterAccessoryEventTypes.READY, (port) => {
185
+ * console.log(`Accessory ready on port ${port}`);
186
+ * // Safe to start device integration, polling, webhooks, etc.
187
+ * });
188
+ *
189
+ * // Listen for commissioning events
190
+ * accessory._eventEmitter?.on(MatterAccessoryEventTypes.COMMISSIONED, () => {
191
+ * console.log('Accessory paired with a controller');
192
+ * });
193
+ * ```
194
+ *
195
+ * @see MatterAccessoryEventTypes for available events
196
+ */
197
+ _eventEmitter?: MatterAccessoryEventEmitter;
198
+ }
199
+ /**
200
+ * Matter Configuration (for bridge or child bridge)
201
+ */
202
+ export interface MatterConfig extends Record<string, unknown> {
203
+ /** Port for Matter server (optional, will auto-assign if not specified) */
204
+ port?: number;
205
+ /** Name for the Matter bridge (optional) */
206
+ name?: string;
207
+ }
208
+ /**
209
+ * Matter Server Events
210
+ *
211
+ * Currently empty - all events removed as they were unused.
212
+ * Status information is queried on-demand rather than pushed via events.
213
+ */
214
+ export interface MatterServerEvents {
215
+ 'commissioning-status-changed': (commissioned: boolean, fabricCount: number) => void;
216
+ }
217
+ /**
218
+ * Matter Accessory Event Types
219
+ *
220
+ * Events that can be emitted by Matter accessories during their lifecycle.
221
+ *
222
+ * @example
223
+ * ```typescript
224
+ * Listen for when a Matter accessory is ready
225
+ * const accessory: MatterAccessory = { ... };
226
+ * api.matter.publishExternalAccessories('plugin-name', [accessory]);
227
+ *
228
+ * const internal = accessory as any;
229
+ * internal._eventEmitter?.on(MatterAccessoryEventTypes.READY, (port: number) => {
230
+ * console.log(`Accessory ready on port ${port}`);
231
+ * });
232
+ * ```
233
+ *
234
+ * @group Matter Accessory
235
+ */
236
+ export declare enum MatterAccessoryEventTypes {
237
+ /**
238
+ * Emitted when the Matter server is ready and the accessory is available on the network.
239
+ * This is the main event to listen for to know when an external accessory is ready.
240
+ *
241
+ * **HAP Equivalent:** `AccessoryEventTypes.ADVERTISED`
242
+ *
243
+ * @param port - The port number the Matter server is listening on
244
+ */
245
+ READY = "ready"
246
+ }
247
+ /**
248
+ * Matter Accessory Event Emitter Interface
249
+ *
250
+ * Defines the typed event emitter interface for Matter accessories.
251
+ * This interface extends Node's EventEmitter to provide type-safe event handling
252
+ * for Matter accessory lifecycle events.
253
+ *
254
+ * **Usage Pattern:**
255
+ * ```typescript
256
+ * const accessory: MatterAccessory = { ... };
257
+ * api.matter.publishExternalAccessories('plugin-name', [accessory]);
258
+ *
259
+ * Access the event emitter (note: created during registration)
260
+ * const internal = accessory as InternalMatterAccessory;
261
+ * internal._eventEmitter?.on(MatterAccessoryEventTypes.READY, (port: number) => {
262
+ * console.log(`Accessory ready on port ${port}`);
263
+ * });
264
+ * ```
265
+ *
266
+ * @group Matter Accessory
267
+ */
268
+ export interface MatterAccessoryEventEmitter extends EventEmitter {
269
+ /** Register listener for 'ready' event (fired when accessory is available on network) */
270
+ on: (event: 'ready', listener: (port: number) => void) => this;
271
+ /** Emit 'ready' event */
272
+ emit: (event: 'ready', port: number) => boolean;
273
+ }
274
+ /**
275
+ * Internal representation of a part endpoint
276
+ */
277
+ export interface InternalMatterAccessoryPart extends MatterAccessoryPart {
278
+ /** Matter.js endpoint instance for this part */
279
+ endpoint?: Endpoint;
280
+ }
281
+ /**
282
+ * Internal Matter accessory representation
283
+ * (Used internally by MatterServer)
284
+ *
285
+ * @internal
286
+ */
287
+ export interface InternalMatterAccessory extends MatterAccessory {
288
+ /** Plugin identifier (set when registered) */
289
+ _associatedPlugin?: string;
290
+ /** Platform name (set when registered) */
291
+ _associatedPlatform?: string;
292
+ /** Matter.js endpoint instance */
293
+ endpoint?: Endpoint;
294
+ /** Whether this accessory is currently registered */
295
+ registered: boolean;
296
+ /** Internal part endpoints (if using parts) */
297
+ _parts?: InternalMatterAccessoryPart[];
298
+ }
299
+ /**
300
+ * Matter error type enum (for error handler categorization)
301
+ */
302
+ export declare enum MatterErrorType {
303
+ INITIALIZATION = "INITIALIZATION",
304
+ NETWORK = "NETWORK",
305
+ COMMISSIONING = "COMMISSIONING",
306
+ DEVICE_SYNC = "DEVICE_SYNC",
307
+ SERVER = "SERVER",
308
+ STORAGE = "STORAGE",
309
+ CONFIGURATION = "CONFIGURATION",
310
+ DEVICE_ERROR = "DEVICE_ERROR",
311
+ UNKNOWN = "UNKNOWN"
312
+ }
313
+ /**
314
+ * Matter error details interface
315
+ */
316
+ export interface MatterErrorDetails {
317
+ type?: MatterErrorType;
318
+ recoverable?: boolean;
319
+ code?: string;
320
+ context?: string;
321
+ originalError?: Error;
322
+ }
323
+ /**
324
+ * Matter error types
325
+ */
326
+ export declare class MatterError extends Error {
327
+ readonly code: string;
328
+ readonly details?: MatterErrorDetails | undefined;
329
+ readonly type: MatterErrorType;
330
+ readonly timestamp: Date;
331
+ readonly recoverable: boolean;
332
+ constructor(message: string, code: string, details?: MatterErrorDetails | undefined);
333
+ }
334
+ export declare class MatterCommissioningError extends MatterError {
335
+ constructor(message: string, details?: MatterErrorDetails);
336
+ }
337
+ export declare class MatterStorageError extends MatterError {
338
+ constructor(message: string, details?: MatterErrorDetails);
339
+ }
340
+ export declare class MatterDeviceError extends MatterError {
341
+ constructor(message: string, details?: MatterErrorDetails);
342
+ }
343
+ export declare class MatterNetworkError extends MatterError {
344
+ constructor(message: string, details?: MatterErrorDetails);
345
+ }
346
+ export { clusters };
347
+ export { devices };
348
+ /**
349
+ * Friendly device type names for the Plugin API
350
+ * Maps simplified names to actual Matter.js device types
351
+ */
352
+ export declare const deviceTypes: {
353
+ readonly OnOffLight: devices.OnOffLightDevice;
354
+ readonly DimmableLight: devices.DimmableLightDevice;
355
+ readonly ColorTemperatureLight: devices.ColorTemperatureLightDevice;
356
+ readonly ExtendedColorLight: devices.ExtendedColorLightDevice;
357
+ readonly OnOffSwitch: devices.OnOffLightSwitchDevice;
358
+ readonly OnOffOutlet: devices.OnOffPlugInUnitDevice;
359
+ readonly DimmableOutlet: devices.DimmablePlugInUnitDevice;
360
+ readonly TemperatureSensor: devices.TemperatureSensorDevice;
361
+ readonly HumiditySensor: devices.HumiditySensorDevice;
362
+ readonly LightSensor: devices.LightSensorDevice;
363
+ readonly MotionSensor: devices.OccupancySensorDevice;
364
+ readonly ContactSensor: devices.ContactSensorDevice;
365
+ readonly LeakSensor: devices.WaterLeakDetectorDevice;
366
+ readonly SmokeSensor: devices.SmokeCoAlarmDevice;
367
+ readonly Thermostat: import("@matter/main").MutableEndpoint.With<EndpointType.For<{
368
+ readonly name: "Thermostat";
369
+ readonly deviceType: 769;
370
+ readonly deviceRevision: 4;
371
+ readonly requirements: typeof devices.ThermostatRequirements;
372
+ readonly behaviors: {
373
+ readonly identify: typeof import("@matter/node/behaviors").IdentifyServer;
374
+ };
375
+ }>, import("@matter/main").SupportedBehaviors.With<{
376
+ readonly identify: typeof import("@matter/node/behaviors").IdentifyServer;
377
+ }, readonly [import("@matter/main").ClusterBehavior.Type<import("@matter/types").ClusterComposer.WithFeatures<import("@matter/types").ClusterType.Of<{
378
+ readonly id: 513;
379
+ readonly name: "Thermostat";
380
+ readonly revision: 9;
381
+ readonly features: {
382
+ readonly heating: import("@matter/types").BitFlag;
383
+ readonly cooling: import("@matter/types").BitFlag;
384
+ readonly occupancy: import("@matter/types").BitFlag;
385
+ readonly scheduleConfiguration: import("@matter/types").BitFlag;
386
+ readonly setback: import("@matter/types").BitFlag;
387
+ readonly autoMode: import("@matter/types").BitFlag;
388
+ readonly localTemperatureNotExposed: import("@matter/types").BitFlag;
389
+ readonly matterScheduleConfiguration: import("@matter/types").BitFlag;
390
+ readonly presets: import("@matter/types").BitFlag;
391
+ };
392
+ readonly attributes: {
393
+ readonly localTemperature: import("@matter/types").Attribute<number | null, any>;
394
+ readonly outdoorTemperature: import("@matter/types").OptionalAttribute<number | null, any>;
395
+ readonly hvacSystemTypeConfiguration: import("@matter/types").OptionalWritableAttribute<import("@matter/types").TypeFromPartialBitSchema<{
396
+ coolingStage: import("@matter/types").BitField;
397
+ heatingStage: import("@matter/types").BitField;
398
+ heatingIsHeatPump: import("@matter/types").BitFlag;
399
+ heatingUsesFuel: import("@matter/types").BitFlag;
400
+ }>, any>;
401
+ readonly remoteSensing: import("@matter/types").OptionalWritableAttribute<import("@matter/types").TypeFromPartialBitSchema<{
402
+ localTemperature: import("@matter/types").BitFlag;
403
+ outdoorTemperature: import("@matter/types").BitFlag;
404
+ occupancy: import("@matter/types").BitFlag;
405
+ }>, any>;
406
+ readonly controlSequenceOfOperation: import("@matter/types").WritableAttribute<clusters.Thermostat.ControlSequenceOfOperation, any>;
407
+ readonly systemMode: import("@matter/types").WritableAttribute<clusters.Thermostat.SystemMode, any>;
408
+ readonly temperatureSetpointHold: import("@matter/types").OptionalWritableAttribute<clusters.Thermostat.TemperatureSetpointHold, any>;
409
+ readonly temperatureSetpointHoldDuration: import("@matter/types").OptionalWritableAttribute<number | null, any>;
410
+ readonly thermostatProgrammingOperationMode: import("@matter/types").OptionalWritableAttribute<import("@matter/types").TypeFromPartialBitSchema<{
411
+ scheduleActive: import("@matter/types").BitFlag;
412
+ autoRecovery: import("@matter/types").BitFlag;
413
+ economy: import("@matter/types").BitFlag;
414
+ }>, any>;
415
+ readonly thermostatRunningState: import("@matter/types").OptionalAttribute<import("@matter/types").TypeFromPartialBitSchema<{
416
+ heat: import("@matter/types").BitFlag;
417
+ cool: import("@matter/types").BitFlag;
418
+ fan: import("@matter/types").BitFlag;
419
+ heatStage2: import("@matter/types").BitFlag;
420
+ coolStage2: import("@matter/types").BitFlag;
421
+ fanStage2: import("@matter/types").BitFlag;
422
+ fanStage3: import("@matter/types").BitFlag;
423
+ }>, any>;
424
+ readonly setpointChangeSource: import("@matter/types").OptionalAttribute<clusters.Thermostat.SetpointChangeSource, any>;
425
+ readonly setpointChangeAmount: import("@matter/types").OptionalAttribute<number | null, any>;
426
+ readonly setpointChangeSourceTimestamp: import("@matter/types").OptionalAttribute<number, any>;
427
+ readonly emergencyHeatDelta: import("@matter/types").OptionalWritableAttribute<number, any>;
428
+ readonly acType: import("@matter/types").OptionalWritableAttribute<clusters.Thermostat.AcType, any>;
429
+ readonly acCapacity: import("@matter/types").OptionalWritableAttribute<number, any>;
430
+ readonly acRefrigerantType: import("@matter/types").OptionalWritableAttribute<clusters.Thermostat.AcRefrigerantType, any>;
431
+ readonly acCompressorType: import("@matter/types").OptionalWritableAttribute<clusters.Thermostat.AcCompressorType, any>;
432
+ readonly acErrorCode: import("@matter/types").OptionalWritableAttribute<import("@matter/types").TypeFromPartialBitSchema<{
433
+ compressorFail: import("@matter/types").BitFlag;
434
+ roomSensorFail: import("@matter/types").BitFlag;
435
+ outdoorSensorFail: import("@matter/types").BitFlag;
436
+ coilSensorFail: import("@matter/types").BitFlag;
437
+ fanFail: import("@matter/types").BitFlag;
438
+ }>, any>;
439
+ readonly acLouverPosition: import("@matter/types").OptionalWritableAttribute<clusters.Thermostat.AcLouverPosition, any>;
440
+ readonly acCoilTemperature: import("@matter/types").OptionalAttribute<number | null, any>;
441
+ readonly acCapacityFormat: import("@matter/types").OptionalWritableAttribute<clusters.Thermostat.AcCapacityFormat, any>;
442
+ readonly setpointHoldExpiryTimestamp: import("@matter/types").OptionalAttribute<number | null, any>;
443
+ };
444
+ readonly commands: {
445
+ readonly setpointRaiseLower: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
446
+ mode: import("@matter/types").FieldType<clusters.Thermostat.SetpointRaiseLowerMode>;
447
+ amount: import("@matter/types").FieldType<number>;
448
+ }>, void, any>;
449
+ readonly atomicRequest: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
450
+ requestType: import("@matter/types").FieldType<clusters.Thermostat.RequestType>;
451
+ attributeRequests: import("@matter/types").FieldType<import("@matter/main").AttributeId[]>;
452
+ timeout: import("@matter/types").OptionalFieldType<number>;
453
+ }>, import("@matter/types").TypeFromFields<{
454
+ statusCode: import("@matter/types").FieldType<import("@matter/types").Status>;
455
+ attributeStatus: import("@matter/types").FieldType<import("@matter/types").TypeFromFields<{
456
+ attributeId: import("@matter/types").FieldType<import("@matter/main").AttributeId>;
457
+ statusCode: import("@matter/types").FieldType<import("@matter/types").Status>;
458
+ }>[]>;
459
+ timeout: import("@matter/types").OptionalFieldType<number>;
460
+ }>, any>;
461
+ };
462
+ readonly extensions: readonly [{
463
+ readonly flags: {
464
+ readonly occupancy: true;
465
+ };
466
+ readonly component: {
467
+ readonly attributes: {
468
+ readonly occupancy: import("@matter/types").Attribute<import("@matter/types").TypeFromPartialBitSchema<{
469
+ occupied: import("@matter/types").BitFlag;
470
+ }>, any>;
471
+ };
472
+ };
473
+ }, {
474
+ readonly flags: {
475
+ readonly heating: true;
476
+ };
477
+ readonly component: {
478
+ readonly attributes: {
479
+ readonly absMinHeatSetpointLimit: import("@matter/types").OptionalFixedAttribute<number, any>;
480
+ readonly absMaxHeatSetpointLimit: import("@matter/types").OptionalFixedAttribute<number, any>;
481
+ readonly piHeatingDemand: import("@matter/types").OptionalAttribute<number, any>;
482
+ readonly occupiedHeatingSetpoint: import("@matter/types").WritableAttribute<number, any>;
483
+ readonly minHeatSetpointLimit: import("@matter/types").OptionalWritableAttribute<number, any>;
484
+ readonly maxHeatSetpointLimit: import("@matter/types").OptionalWritableAttribute<number, any>;
485
+ };
486
+ };
487
+ }, {
488
+ readonly flags: {
489
+ readonly cooling: true;
490
+ };
491
+ readonly component: {
492
+ readonly attributes: {
493
+ readonly absMinCoolSetpointLimit: import("@matter/types").OptionalFixedAttribute<number, any>;
494
+ readonly absMaxCoolSetpointLimit: import("@matter/types").OptionalFixedAttribute<number, any>;
495
+ readonly piCoolingDemand: import("@matter/types").OptionalAttribute<number, any>;
496
+ readonly occupiedCoolingSetpoint: import("@matter/types").WritableAttribute<number, any>;
497
+ readonly minCoolSetpointLimit: import("@matter/types").OptionalWritableAttribute<number, any>;
498
+ readonly maxCoolSetpointLimit: import("@matter/types").OptionalWritableAttribute<number, any>;
499
+ };
500
+ };
501
+ }, {
502
+ readonly flags: {
503
+ readonly localTemperatureNotExposed: false;
504
+ };
505
+ readonly component: {
506
+ readonly attributes: {
507
+ readonly localTemperatureCalibration: import("@matter/types").OptionalWritableAttribute<number, any>;
508
+ };
509
+ };
510
+ }, {
511
+ readonly flags: {
512
+ readonly cooling: true;
513
+ readonly occupancy: true;
514
+ };
515
+ readonly component: {
516
+ readonly attributes: {
517
+ readonly unoccupiedCoolingSetpoint: import("@matter/types").WritableAttribute<number, any>;
518
+ };
519
+ };
520
+ }, {
521
+ readonly flags: {
522
+ readonly heating: true;
523
+ readonly occupancy: true;
524
+ };
525
+ readonly component: {
526
+ readonly attributes: {
527
+ readonly unoccupiedHeatingSetpoint: import("@matter/types").WritableAttribute<number, any>;
528
+ };
529
+ };
530
+ }, {
531
+ readonly flags: {
532
+ readonly autoMode: true;
533
+ };
534
+ readonly component: {
535
+ readonly attributes: {
536
+ readonly minSetpointDeadBand: import("@matter/types").WritableAttribute<number, any>;
537
+ readonly thermostatRunningMode: import("@matter/types").OptionalAttribute<clusters.Thermostat.ThermostatRunningMode, any>;
538
+ };
539
+ };
540
+ }, {
541
+ readonly flags: {
542
+ readonly scheduleConfiguration: true;
543
+ };
544
+ readonly component: {
545
+ readonly attributes: {
546
+ readonly startOfWeek: import("@matter/types").FixedAttribute<clusters.Thermostat.StartOfWeek, any>;
547
+ readonly numberOfWeeklyTransitions: import("@matter/types").FixedAttribute<number, any>;
548
+ readonly numberOfDailyTransitions: import("@matter/types").FixedAttribute<number, any>;
549
+ };
550
+ readonly commands: {
551
+ readonly setWeeklySchedule: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
552
+ numberOfTransitionsForSequence: import("@matter/types").FieldType<number>;
553
+ dayOfWeekForSequence: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
554
+ sunday: import("@matter/types").BitFlag;
555
+ monday: import("@matter/types").BitFlag;
556
+ tuesday: import("@matter/types").BitFlag;
557
+ wednesday: import("@matter/types").BitFlag;
558
+ thursday: import("@matter/types").BitFlag;
559
+ friday: import("@matter/types").BitFlag;
560
+ saturday: import("@matter/types").BitFlag;
561
+ away: import("@matter/types").BitFlag;
562
+ }>>;
563
+ modeForSequence: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
564
+ heatSetpointPresent: import("@matter/types").BitFlag;
565
+ coolSetpointPresent: import("@matter/types").BitFlag;
566
+ }>>;
567
+ transitions: import("@matter/types").FieldType<import("@matter/types").TypeFromFields<{
568
+ transitionTime: import("@matter/types").FieldType<number>;
569
+ heatSetpoint: import("@matter/types").FieldType<number | null>;
570
+ coolSetpoint: import("@matter/types").FieldType<number | null>;
571
+ }>[]>;
572
+ }>, void, any>;
573
+ readonly getWeeklySchedule: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
574
+ daysToReturn: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
575
+ sunday: import("@matter/types").BitFlag;
576
+ monday: import("@matter/types").BitFlag;
577
+ tuesday: import("@matter/types").BitFlag;
578
+ wednesday: import("@matter/types").BitFlag;
579
+ thursday: import("@matter/types").BitFlag;
580
+ friday: import("@matter/types").BitFlag;
581
+ saturday: import("@matter/types").BitFlag;
582
+ away: import("@matter/types").BitFlag;
583
+ }>>;
584
+ modeToReturn: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
585
+ heatSetpointPresent: import("@matter/types").BitFlag;
586
+ coolSetpointPresent: import("@matter/types").BitFlag;
587
+ }>>;
588
+ }>, import("@matter/types").TypeFromFields<{
589
+ numberOfTransitionsForSequence: import("@matter/types").FieldType<number>;
590
+ dayOfWeekForSequence: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
591
+ sunday: import("@matter/types").BitFlag;
592
+ monday: import("@matter/types").BitFlag;
593
+ tuesday: import("@matter/types").BitFlag;
594
+ wednesday: import("@matter/types").BitFlag;
595
+ thursday: import("@matter/types").BitFlag;
596
+ friday: import("@matter/types").BitFlag;
597
+ saturday: import("@matter/types").BitFlag;
598
+ away: import("@matter/types").BitFlag;
599
+ }>>;
600
+ modeForSequence: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
601
+ heatSetpointPresent: import("@matter/types").BitFlag;
602
+ coolSetpointPresent: import("@matter/types").BitFlag;
603
+ }>>;
604
+ transitions: import("@matter/types").FieldType<import("@matter/types").TypeFromFields<{
605
+ transitionTime: import("@matter/types").FieldType<number>;
606
+ heatSetpoint: import("@matter/types").FieldType<number | null>;
607
+ coolSetpoint: import("@matter/types").FieldType<number | null>;
608
+ }>[]>;
609
+ }>, any>;
610
+ readonly clearWeeklySchedule: import("@matter/types").Command<void, void, any>;
611
+ };
612
+ };
613
+ }, {
614
+ readonly flags: {
615
+ readonly setback: true;
616
+ };
617
+ readonly component: {
618
+ readonly attributes: {
619
+ readonly occupiedSetback: import("@matter/types").WritableAttribute<number | null, any>;
620
+ readonly occupiedSetbackMin: import("@matter/types").FixedAttribute<number | null, any>;
621
+ readonly occupiedSetbackMax: import("@matter/types").FixedAttribute<number | null, any>;
622
+ };
623
+ };
624
+ }, {
625
+ readonly flags: {
626
+ readonly setback: true;
627
+ readonly occupancy: true;
628
+ };
629
+ readonly component: {
630
+ readonly attributes: {
631
+ readonly unoccupiedSetback: import("@matter/types").WritableAttribute<number | null, any>;
632
+ readonly unoccupiedSetbackMin: import("@matter/types").FixedAttribute<number | null, any>;
633
+ readonly unoccupiedSetbackMax: import("@matter/types").FixedAttribute<number | null, any>;
634
+ };
635
+ };
636
+ }, {
637
+ readonly flags: {
638
+ readonly presets: true;
639
+ };
640
+ readonly component: {
641
+ readonly attributes: {
642
+ readonly presetTypes: import("@matter/types").FixedAttribute<import("@matter/types").TypeFromFields<{
643
+ presetScenario: import("@matter/types").FieldType<clusters.Thermostat.PresetScenario>;
644
+ numberOfPresets: import("@matter/types").FieldType<number>;
645
+ presetTypeFeatures: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
646
+ automatic: import("@matter/types").BitFlag;
647
+ supportsNames: import("@matter/types").BitFlag;
648
+ }>>;
649
+ }>[], any>;
650
+ readonly numberOfPresets: import("@matter/types").FixedAttribute<number, any>;
651
+ readonly activePresetHandle: import("@matter/types").Attribute<AllowSharedBufferSource | null, any>;
652
+ readonly presets: import("@matter/types").WritableAttribute<import("@matter/types").TypeFromFields<{
653
+ presetHandle: import("@matter/types").FieldType<AllowSharedBufferSource | null>;
654
+ presetScenario: import("@matter/types").FieldType<clusters.Thermostat.PresetScenario>;
655
+ name: import("@matter/types").OptionalFieldType<string | null>;
656
+ coolingSetpoint: import("@matter/types").OptionalFieldType<number>;
657
+ heatingSetpoint: import("@matter/types").OptionalFieldType<number>;
658
+ builtIn: import("@matter/types").FieldType<boolean | null>;
659
+ }>[], any>;
660
+ };
661
+ readonly commands: {
662
+ readonly setActivePresetRequest: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
663
+ presetHandle: import("@matter/types").FieldType<AllowSharedBufferSource | null>;
664
+ }>, void, any>;
665
+ };
666
+ };
667
+ }, {
668
+ readonly flags: {
669
+ readonly matterScheduleConfiguration: true;
670
+ };
671
+ readonly component: {
672
+ readonly attributes: {
673
+ readonly scheduleTypes: import("@matter/types").FixedAttribute<import("@matter/types").TypeFromFields<{
674
+ systemMode: import("@matter/types").FieldType<clusters.Thermostat.SystemMode>;
675
+ numberOfSchedules: import("@matter/types").FieldType<number>;
676
+ scheduleTypeFeatures: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
677
+ supportsPresets: import("@matter/types").BitFlag;
678
+ supportsSetpoints: import("@matter/types").BitFlag;
679
+ supportsNames: import("@matter/types").BitFlag;
680
+ supportsOff: import("@matter/types").BitFlag;
681
+ }>>;
682
+ }>[], any>;
683
+ readonly numberOfSchedules: import("@matter/types").FixedAttribute<number, any>;
684
+ readonly numberOfScheduleTransitions: import("@matter/types").FixedAttribute<number, any>;
685
+ readonly numberOfScheduleTransitionPerDay: import("@matter/types").FixedAttribute<number | null, any>;
686
+ readonly activeScheduleHandle: import("@matter/types").Attribute<AllowSharedBufferSource | null, any>;
687
+ readonly schedules: import("@matter/types").WritableAttribute<import("@matter/types").TypeFromFields<{
688
+ scheduleHandle: import("@matter/types").FieldType<AllowSharedBufferSource | null>;
689
+ systemMode: import("@matter/types").FieldType<clusters.Thermostat.SystemMode>;
690
+ name: import("@matter/types").OptionalFieldType<string>;
691
+ presetHandle: import("@matter/types").OptionalFieldType<AllowSharedBufferSource>;
692
+ transitions: import("@matter/types").FieldType<import("@matter/types").TypeFromFields<{
693
+ dayOfWeek: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
694
+ sunday: import("@matter/types").BitFlag;
695
+ monday: import("@matter/types").BitFlag;
696
+ tuesday: import("@matter/types").BitFlag;
697
+ wednesday: import("@matter/types").BitFlag;
698
+ thursday: import("@matter/types").BitFlag;
699
+ friday: import("@matter/types").BitFlag;
700
+ saturday: import("@matter/types").BitFlag;
701
+ away: import("@matter/types").BitFlag;
702
+ }>>;
703
+ transitionTime: import("@matter/types").FieldType<number>;
704
+ presetHandle: import("@matter/types").OptionalFieldType<AllowSharedBufferSource>;
705
+ systemMode: import("@matter/types").OptionalFieldType<clusters.Thermostat.SystemMode>;
706
+ coolingSetpoint: import("@matter/types").OptionalFieldType<number>;
707
+ heatingSetpoint: import("@matter/types").OptionalFieldType<number>;
708
+ }>[]>;
709
+ builtIn: import("@matter/types").FieldType<boolean | null>;
710
+ }>[], any>;
711
+ };
712
+ readonly commands: {
713
+ readonly setActiveScheduleRequest: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
714
+ scheduleHandle: import("@matter/types").FieldType<AllowSharedBufferSource>;
715
+ }>, void, any>;
716
+ };
717
+ };
718
+ }, {
719
+ readonly flags: {
720
+ readonly autoMode: true;
721
+ readonly heating: false;
722
+ };
723
+ readonly component: false;
724
+ }, {
725
+ readonly flags: {
726
+ readonly autoMode: true;
727
+ readonly cooling: false;
728
+ };
729
+ readonly component: false;
730
+ }, {
731
+ readonly flags: {
732
+ readonly heating: false;
733
+ readonly cooling: false;
734
+ };
735
+ readonly component: false;
736
+ }];
737
+ }>, readonly ["Heating", "Cooling"]>, typeof import("@matter/node/behaviors").ThermostatServer, import("@matter/node/behaviors").ThermostatInterface>]>>;
738
+ readonly Fan: devices.FanDevice;
739
+ readonly DoorLock: devices.DoorLockDevice;
740
+ readonly WindowCovering: devices.WindowCoveringDevice;
741
+ readonly RoboticVacuumCleaner: devices.RoboticVacuumCleanerDevice;
742
+ readonly GenericSwitch: devices.GenericSwitchDevice;
743
+ readonly Pump: devices.PumpDevice;
744
+ readonly RoomAirConditioner: devices.RoomAirConditionerDevice;
745
+ };
746
+ /**
747
+ * Matter Cluster Names
748
+ * Commonly used cluster names for type safety and autocomplete
749
+ * Use these with api.updateMatterAccessoryState() and api.getAccessoryState()
750
+ *
751
+ * @example
752
+ * ```typescript
753
+ * With autocomplete and type safety:
754
+ * api.updateMatterAccessoryState(uuid, api.matterClusterNames.OnOff, { onOff: true })
755
+ * api.getAccessoryState(uuid, api.matterClusterNames.LevelControl)
756
+ * ```
757
+ */
758
+ export declare const clusterNames: {
759
+ readonly OnOff: "onOff";
760
+ readonly LevelControl: "levelControl";
761
+ readonly ColorControl: "colorControl";
762
+ readonly DoorLock: "doorLock";
763
+ readonly WindowCovering: "windowCovering";
764
+ readonly Thermostat: "thermostat";
765
+ readonly FanControl: "fanControl";
766
+ readonly TemperatureMeasurement: "temperatureMeasurement";
767
+ readonly RelativeHumidityMeasurement: "relativeHumidityMeasurement";
768
+ readonly IlluminanceMeasurement: "illuminanceMeasurement";
769
+ readonly OccupancySensing: "occupancySensing";
770
+ readonly BooleanState: "booleanState";
771
+ readonly SmokeCoAlarm: "smokeCoAlarm";
772
+ readonly RvcRunMode: "rvcRunMode";
773
+ readonly RvcOperationalState: "rvcOperationalState";
774
+ readonly RvcCleanMode: "rvcCleanMode";
775
+ readonly ServiceArea: "serviceArea";
776
+ readonly PumpConfigurationAndControl: "pumpConfigurationAndControl";
777
+ readonly Identify: "identify";
778
+ readonly BasicInformation: "basicInformation";
779
+ readonly BridgedDeviceBasicInformation: "bridgedDeviceBasicInformation";
780
+ };
781
+ /**
782
+ * Type for Matter cluster names
783
+ * Provides type safety for cluster name strings
784
+ */
785
+ export type MatterClusterName = typeof clusterNames[keyof typeof clusterNames];
786
+ /**
787
+ * Type-safe accessory map for MatterServer
788
+ */
789
+ export type MatterAccessoryMap = Map<string, InternalMatterAccessory>;
790
+ /**
791
+ * Check if endpoint has state property (runtime check)
792
+ */
793
+ export declare function hasEndpointState(endpoint: Endpoint): boolean;
794
+ /**
795
+ * Safely update endpoint state
796
+ * Uses the Endpoint's set method to update cluster attributes
797
+ */
798
+ export declare function updateEndpointState(endpoint: Endpoint, cluster: string, attributes: Record<string, unknown>): Promise<void>;
799
+ /**
800
+ * Device type with behaviors (internal Matter.js structure)
801
+ */
802
+ export interface DeviceTypeWithBehaviors extends EndpointType {
803
+ with: (...behaviors: any[]) => DeviceTypeWithBehaviors;
804
+ }
805
+ /**
806
+ * WindowCovering cluster with dynamic attributes
807
+ */
808
+ export interface WindowCoveringCluster {
809
+ type?: number;
810
+ configStatus?: {
811
+ liftPositionAware?: boolean;
812
+ tiltPositionAware?: boolean;
813
+ liftEncoderControlled?: boolean;
814
+ tiltEncoderControlled?: boolean;
815
+ };
816
+ targetPositionLiftPercent100ths?: number;
817
+ currentPositionLiftPercent100ths?: number;
818
+ targetPositionTiltPercent100ths?: number;
819
+ currentPositionTiltPercent100ths?: number;
820
+ operationalStatus?: number;
821
+ }
822
+ /**
823
+ * Type-safe cluster access for WindowCovering
824
+ */
825
+ export declare function getWindowCoveringCluster(accessory: MatterAccessory): WindowCoveringCluster | undefined;
826
+ //# sourceMappingURL=types.d.ts.map