homebridge 2.0.0-beta.44 → 2.0.0-beta.46

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 (321) hide show
  1. package/dist/api.d.ts +3 -365
  2. package/dist/api.d.ts.map +1 -1
  3. package/dist/api.js +13 -85
  4. package/dist/api.js.map +1 -1
  5. package/dist/bridgeService.d.ts +0 -25
  6. package/dist/bridgeService.d.ts.map +1 -1
  7. package/dist/bridgeService.js +32 -85
  8. package/dist/bridgeService.js.map +1 -1
  9. package/dist/childBridgeFork.d.ts +12 -15
  10. package/dist/childBridgeFork.d.ts.map +1 -1
  11. package/dist/childBridgeFork.js +152 -83
  12. package/dist/childBridgeFork.js.map +1 -1
  13. package/dist/childBridgeService.d.ts +21 -105
  14. package/dist/childBridgeService.d.ts.map +1 -1
  15. package/dist/childBridgeService.js +57 -134
  16. package/dist/childBridgeService.js.map +1 -1
  17. package/dist/cli.js +0 -2
  18. package/dist/cli.js.map +1 -1
  19. package/dist/externalPortService.d.ts +0 -21
  20. package/dist/externalPortService.d.ts.map +1 -1
  21. package/dist/externalPortService.js +0 -28
  22. package/dist/externalPortService.js.map +1 -1
  23. package/dist/index.d.ts +0 -112
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +0 -44
  26. package/dist/index.js.map +1 -1
  27. package/dist/ipcService.d.ts +23 -15
  28. package/dist/ipcService.d.ts.map +1 -1
  29. package/dist/ipcService.js +6 -12
  30. package/dist/ipcService.js.map +1 -1
  31. package/dist/logger.d.ts +0 -46
  32. package/dist/logger.d.ts.map +1 -1
  33. package/dist/logger.js +13 -57
  34. package/dist/logger.js.map +1 -1
  35. package/dist/matter/BaseMatterManager.d.ts +19 -0
  36. package/dist/matter/BaseMatterManager.d.ts.map +1 -0
  37. package/dist/matter/BaseMatterManager.js +170 -0
  38. package/dist/matter/BaseMatterManager.js.map +1 -0
  39. package/dist/matter/ChildBridgeMatterManager.d.ts +7 -69
  40. package/dist/matter/ChildBridgeMatterManager.d.ts.map +1 -1
  41. package/dist/matter/ChildBridgeMatterManager.js +51 -234
  42. package/dist/matter/ChildBridgeMatterManager.js.map +1 -1
  43. package/dist/matter/ClusterCommandMapper.d.ts +5 -0
  44. package/dist/matter/ClusterCommandMapper.d.ts.map +1 -0
  45. package/dist/matter/ClusterCommandMapper.js +203 -0
  46. package/dist/matter/ClusterCommandMapper.js.map +1 -0
  47. package/dist/matter/ExternalMatterAccessoryPublisher.d.ts +0 -27
  48. package/dist/matter/ExternalMatterAccessoryPublisher.d.ts.map +1 -1
  49. package/dist/matter/ExternalMatterAccessoryPublisher.js +3 -28
  50. package/dist/matter/ExternalMatterAccessoryPublisher.js.map +1 -1
  51. package/dist/matter/MatterAPIImpl.d.ts +0 -68
  52. package/dist/matter/MatterAPIImpl.d.ts.map +1 -1
  53. package/dist/matter/MatterAPIImpl.js +7 -107
  54. package/dist/matter/MatterAPIImpl.js.map +1 -1
  55. package/dist/matter/MatterBridgeManager.d.ts +9 -60
  56. package/dist/matter/MatterBridgeManager.d.ts.map +1 -1
  57. package/dist/matter/MatterBridgeManager.js +140 -216
  58. package/dist/matter/MatterBridgeManager.js.map +1 -1
  59. package/dist/matter/MatterConfigCollector.d.ts +1 -20
  60. package/dist/matter/MatterConfigCollector.d.ts.map +1 -1
  61. package/dist/matter/MatterConfigCollector.js +15 -28
  62. package/dist/matter/MatterConfigCollector.js.map +1 -1
  63. package/dist/matter/accessoryCache.d.ts +0 -48
  64. package/dist/matter/accessoryCache.d.ts.map +1 -1
  65. package/dist/matter/accessoryCache.js +1 -60
  66. package/dist/matter/accessoryCache.js.map +1 -1
  67. package/dist/matter/behaviors/AirQualityBehavior.d.ts +0 -42
  68. package/dist/matter/behaviors/AirQualityBehavior.d.ts.map +1 -1
  69. package/dist/matter/behaviors/AirQualityBehavior.js +0 -44
  70. package/dist/matter/behaviors/AirQualityBehavior.js.map +1 -1
  71. package/dist/matter/behaviors/BehaviorRegistry.d.ts +4 -42
  72. package/dist/matter/behaviors/BehaviorRegistry.d.ts.map +1 -1
  73. package/dist/matter/behaviors/BehaviorRegistry.js +12 -42
  74. package/dist/matter/behaviors/BehaviorRegistry.js.map +1 -1
  75. package/dist/matter/behaviors/ColorControlBehavior.d.ts +0 -49
  76. package/dist/matter/behaviors/ColorControlBehavior.d.ts.map +1 -1
  77. package/dist/matter/behaviors/ColorControlBehavior.js +0 -90
  78. package/dist/matter/behaviors/ColorControlBehavior.js.map +1 -1
  79. package/dist/matter/behaviors/ConcentrationMeasurementBehavior.d.ts +0 -91
  80. package/dist/matter/behaviors/ConcentrationMeasurementBehavior.d.ts.map +1 -1
  81. package/dist/matter/behaviors/ConcentrationMeasurementBehavior.js +0 -96
  82. package/dist/matter/behaviors/ConcentrationMeasurementBehavior.js.map +1 -1
  83. package/dist/matter/behaviors/DoorLockBehavior.d.ts +0 -11
  84. package/dist/matter/behaviors/DoorLockBehavior.d.ts.map +1 -1
  85. package/dist/matter/behaviors/DoorLockBehavior.js +0 -25
  86. package/dist/matter/behaviors/DoorLockBehavior.js.map +1 -1
  87. package/dist/matter/behaviors/FanControlBehavior.d.ts +0 -11
  88. package/dist/matter/behaviors/FanControlBehavior.d.ts.map +1 -1
  89. package/dist/matter/behaviors/FanControlBehavior.js +0 -25
  90. package/dist/matter/behaviors/FanControlBehavior.js.map +1 -1
  91. package/dist/matter/behaviors/IdentifyBehavior.d.ts +0 -11
  92. package/dist/matter/behaviors/IdentifyBehavior.d.ts.map +1 -1
  93. package/dist/matter/behaviors/IdentifyBehavior.js +0 -17
  94. package/dist/matter/behaviors/IdentifyBehavior.js.map +1 -1
  95. package/dist/matter/behaviors/LevelControlBehavior.d.ts +0 -20
  96. package/dist/matter/behaviors/LevelControlBehavior.d.ts.map +1 -1
  97. package/dist/matter/behaviors/LevelControlBehavior.js +0 -52
  98. package/dist/matter/behaviors/LevelControlBehavior.js.map +1 -1
  99. package/dist/matter/behaviors/OnOffBehavior.d.ts +0 -17
  100. package/dist/matter/behaviors/OnOffBehavior.d.ts.map +1 -1
  101. package/dist/matter/behaviors/OnOffBehavior.js +0 -38
  102. package/dist/matter/behaviors/OnOffBehavior.js.map +1 -1
  103. package/dist/matter/behaviors/RvcCleanModeBehavior.d.ts +0 -11
  104. package/dist/matter/behaviors/RvcCleanModeBehavior.d.ts.map +1 -1
  105. package/dist/matter/behaviors/RvcCleanModeBehavior.js +0 -17
  106. package/dist/matter/behaviors/RvcCleanModeBehavior.js.map +1 -1
  107. package/dist/matter/behaviors/RvcOperationalStateBehavior.d.ts +0 -11
  108. package/dist/matter/behaviors/RvcOperationalStateBehavior.d.ts.map +1 -1
  109. package/dist/matter/behaviors/RvcOperationalStateBehavior.js +0 -29
  110. package/dist/matter/behaviors/RvcOperationalStateBehavior.js.map +1 -1
  111. package/dist/matter/behaviors/RvcRunModeBehavior.d.ts +0 -11
  112. package/dist/matter/behaviors/RvcRunModeBehavior.d.ts.map +1 -1
  113. package/dist/matter/behaviors/RvcRunModeBehavior.js +0 -17
  114. package/dist/matter/behaviors/RvcRunModeBehavior.js.map +1 -1
  115. package/dist/matter/behaviors/ServiceAreaBehavior.d.ts +0 -11
  116. package/dist/matter/behaviors/ServiceAreaBehavior.d.ts.map +1 -1
  117. package/dist/matter/behaviors/ServiceAreaBehavior.js +0 -23
  118. package/dist/matter/behaviors/ServiceAreaBehavior.js.map +1 -1
  119. package/dist/matter/behaviors/ThermostatBehavior.d.ts +0 -11
  120. package/dist/matter/behaviors/ThermostatBehavior.d.ts.map +1 -1
  121. package/dist/matter/behaviors/ThermostatBehavior.js +0 -39
  122. package/dist/matter/behaviors/ThermostatBehavior.js.map +1 -1
  123. package/dist/matter/behaviors/WindowCoveringBehavior.d.ts +0 -17
  124. package/dist/matter/behaviors/WindowCoveringBehavior.d.ts.map +1 -1
  125. package/dist/matter/behaviors/WindowCoveringBehavior.js +0 -56
  126. package/dist/matter/behaviors/WindowCoveringBehavior.js.map +1 -1
  127. package/dist/matter/behaviors/index.d.ts +0 -5
  128. package/dist/matter/behaviors/index.d.ts.map +1 -1
  129. package/dist/matter/behaviors/index.js +0 -5
  130. package/dist/matter/behaviors/index.js.map +1 -1
  131. package/dist/matter/configValidator.d.ts +0 -55
  132. package/dist/matter/configValidator.d.ts.map +1 -1
  133. package/dist/matter/configValidator.js +1 -68
  134. package/dist/matter/configValidator.js.map +1 -1
  135. package/dist/matter/errorHandler.d.ts +0 -22
  136. package/dist/matter/errorHandler.d.ts.map +1 -1
  137. package/dist/matter/errorHandler.js +0 -32
  138. package/dist/matter/errorHandler.js.map +1 -1
  139. package/dist/matter/errors.d.ts +0 -132
  140. package/dist/matter/errors.d.ts.map +1 -1
  141. package/dist/matter/errors.js +0 -132
  142. package/dist/matter/errors.js.map +1 -1
  143. package/dist/matter/index.d.ts +0 -30
  144. package/dist/matter/index.d.ts.map +1 -1
  145. package/dist/matter/index.js +0 -13
  146. package/dist/matter/index.js.map +1 -1
  147. package/dist/matter/logFormatter.d.ts +0 -17
  148. package/dist/matter/logFormatter.d.ts.map +1 -1
  149. package/dist/matter/logFormatter.js +5 -63
  150. package/dist/matter/logFormatter.js.map +1 -1
  151. package/dist/matter/server.d.ts +12 -236
  152. package/dist/matter/server.d.ts.map +1 -1
  153. package/dist/matter/server.js +177 -488
  154. package/dist/matter/server.js.map +1 -1
  155. package/dist/matter/serverHelpers.d.ts +0 -56
  156. package/dist/matter/serverHelpers.d.ts.map +1 -1
  157. package/dist/matter/serverHelpers.js +1 -66
  158. package/dist/matter/serverHelpers.js.map +1 -1
  159. package/dist/matter/sharedTypes.d.ts +0 -83
  160. package/dist/matter/sharedTypes.d.ts.map +1 -1
  161. package/dist/matter/sharedTypes.js +0 -26
  162. package/dist/matter/sharedTypes.js.map +1 -1
  163. package/dist/matter/storage.d.ts +0 -90
  164. package/dist/matter/storage.d.ts.map +1 -1
  165. package/dist/matter/storage.js +2 -130
  166. package/dist/matter/storage.js.map +1 -1
  167. package/dist/matter/typeHelpers.d.ts +0 -30
  168. package/dist/matter/typeHelpers.d.ts.map +1 -1
  169. package/dist/matter/typeHelpers.js +0 -24
  170. package/dist/matter/typeHelpers.js.map +1 -1
  171. package/dist/matter/types.d.ts +0 -273
  172. package/dist/matter/types.d.ts.map +1 -1
  173. package/dist/matter/types.js +0 -83
  174. package/dist/matter/types.js.map +1 -1
  175. package/dist/platformAccessory.d.ts +0 -15
  176. package/dist/platformAccessory.d.ts.map +1 -1
  177. package/dist/platformAccessory.js +6 -32
  178. package/dist/platformAccessory.js.map +1 -1
  179. package/dist/plugin.d.ts +0 -3
  180. package/dist/plugin.d.ts.map +1 -1
  181. package/dist/plugin.js +6 -29
  182. package/dist/plugin.js.map +1 -1
  183. package/dist/pluginManager.d.ts +0 -22
  184. package/dist/pluginManager.d.ts.map +1 -1
  185. package/dist/pluginManager.js +18 -41
  186. package/dist/pluginManager.js.map +1 -1
  187. package/dist/server.d.ts +9 -29
  188. package/dist/server.d.ts.map +1 -1
  189. package/dist/server.js +308 -157
  190. package/dist/server.js.map +1 -1
  191. package/dist/user.d.ts +0 -3
  192. package/dist/user.d.ts.map +1 -1
  193. package/dist/user.js +2 -5
  194. package/dist/user.js.map +1 -1
  195. package/dist/util/mac.js +0 -1
  196. package/dist/util/mac.js.map +1 -1
  197. package/package.json +4 -4
  198. package/dist/api.spec.d.ts +0 -2
  199. package/dist/api.spec.d.ts.map +0 -1
  200. package/dist/api.spec.js +0 -413
  201. package/dist/api.spec.js.map +0 -1
  202. package/dist/logger.spec.d.ts +0 -2
  203. package/dist/logger.spec.d.ts.map +0 -1
  204. package/dist/logger.spec.js +0 -95
  205. package/dist/logger.spec.js.map +0 -1
  206. package/dist/matter/ExternalMatterAccessoryPublisher.spec.d.ts +0 -2
  207. package/dist/matter/ExternalMatterAccessoryPublisher.spec.d.ts.map +0 -1
  208. package/dist/matter/ExternalMatterAccessoryPublisher.spec.js +0 -293
  209. package/dist/matter/ExternalMatterAccessoryPublisher.spec.js.map +0 -1
  210. package/dist/matter/accessoryCache.spec.d.ts +0 -2
  211. package/dist/matter/accessoryCache.spec.d.ts.map +0 -1
  212. package/dist/matter/accessoryCache.spec.js +0 -452
  213. package/dist/matter/accessoryCache.spec.js.map +0 -1
  214. package/dist/matter/behaviors/AirQualityBehavior.spec.d.ts +0 -5
  215. package/dist/matter/behaviors/AirQualityBehavior.spec.d.ts.map +0 -1
  216. package/dist/matter/behaviors/AirQualityBehavior.spec.js +0 -46
  217. package/dist/matter/behaviors/AirQualityBehavior.spec.js.map +0 -1
  218. package/dist/matter/behaviors/BehaviorRegistry.spec.d.ts +0 -2
  219. package/dist/matter/behaviors/BehaviorRegistry.spec.d.ts.map +0 -1
  220. package/dist/matter/behaviors/BehaviorRegistry.spec.js +0 -307
  221. package/dist/matter/behaviors/BehaviorRegistry.spec.js.map +0 -1
  222. package/dist/matter/behaviors/ColorControlBehavior.spec.d.ts +0 -2
  223. package/dist/matter/behaviors/ColorControlBehavior.spec.d.ts.map +0 -1
  224. package/dist/matter/behaviors/ColorControlBehavior.spec.js +0 -29
  225. package/dist/matter/behaviors/ColorControlBehavior.spec.js.map +0 -1
  226. package/dist/matter/behaviors/ConcentrationMeasurementBehavior.spec.d.ts +0 -5
  227. package/dist/matter/behaviors/ConcentrationMeasurementBehavior.spec.d.ts.map +0 -1
  228. package/dist/matter/behaviors/ConcentrationMeasurementBehavior.spec.js +0 -95
  229. package/dist/matter/behaviors/ConcentrationMeasurementBehavior.spec.js.map +0 -1
  230. package/dist/matter/behaviors/DoorLockBehavior.spec.d.ts +0 -2
  231. package/dist/matter/behaviors/DoorLockBehavior.spec.d.ts.map +0 -1
  232. package/dist/matter/behaviors/DoorLockBehavior.spec.js +0 -120
  233. package/dist/matter/behaviors/DoorLockBehavior.spec.js.map +0 -1
  234. package/dist/matter/behaviors/FanControlBehavior.spec.d.ts +0 -2
  235. package/dist/matter/behaviors/FanControlBehavior.spec.d.ts.map +0 -1
  236. package/dist/matter/behaviors/FanControlBehavior.spec.js +0 -23
  237. package/dist/matter/behaviors/FanControlBehavior.spec.js.map +0 -1
  238. package/dist/matter/behaviors/IdentifyBehavior.spec.d.ts +0 -2
  239. package/dist/matter/behaviors/IdentifyBehavior.spec.d.ts.map +0 -1
  240. package/dist/matter/behaviors/IdentifyBehavior.spec.js +0 -64
  241. package/dist/matter/behaviors/IdentifyBehavior.spec.js.map +0 -1
  242. package/dist/matter/behaviors/LevelControlBehavior.spec.d.ts +0 -2
  243. package/dist/matter/behaviors/LevelControlBehavior.spec.d.ts.map +0 -1
  244. package/dist/matter/behaviors/LevelControlBehavior.spec.js +0 -145
  245. package/dist/matter/behaviors/LevelControlBehavior.spec.js.map +0 -1
  246. package/dist/matter/behaviors/OnOffBehavior.spec.d.ts +0 -2
  247. package/dist/matter/behaviors/OnOffBehavior.spec.d.ts.map +0 -1
  248. package/dist/matter/behaviors/OnOffBehavior.spec.js +0 -128
  249. package/dist/matter/behaviors/OnOffBehavior.spec.js.map +0 -1
  250. package/dist/matter/behaviors/RvcCleanModeBehavior.spec.d.ts +0 -2
  251. package/dist/matter/behaviors/RvcCleanModeBehavior.spec.d.ts.map +0 -1
  252. package/dist/matter/behaviors/RvcCleanModeBehavior.spec.js +0 -57
  253. package/dist/matter/behaviors/RvcCleanModeBehavior.spec.js.map +0 -1
  254. package/dist/matter/behaviors/RvcOperationalStateBehavior.spec.d.ts +0 -2
  255. package/dist/matter/behaviors/RvcOperationalStateBehavior.spec.d.ts.map +0 -1
  256. package/dist/matter/behaviors/RvcOperationalStateBehavior.spec.js +0 -55
  257. package/dist/matter/behaviors/RvcOperationalStateBehavior.spec.js.map +0 -1
  258. package/dist/matter/behaviors/RvcRunModeBehavior.spec.d.ts +0 -2
  259. package/dist/matter/behaviors/RvcRunModeBehavior.spec.d.ts.map +0 -1
  260. package/dist/matter/behaviors/RvcRunModeBehavior.spec.js +0 -57
  261. package/dist/matter/behaviors/RvcRunModeBehavior.spec.js.map +0 -1
  262. package/dist/matter/behaviors/ServiceAreaBehavior.spec.d.ts +0 -2
  263. package/dist/matter/behaviors/ServiceAreaBehavior.spec.d.ts.map +0 -1
  264. package/dist/matter/behaviors/ServiceAreaBehavior.spec.js +0 -53
  265. package/dist/matter/behaviors/ServiceAreaBehavior.spec.js.map +0 -1
  266. package/dist/matter/behaviors/ThermostatBehavior.spec.d.ts +0 -2
  267. package/dist/matter/behaviors/ThermostatBehavior.spec.d.ts.map +0 -1
  268. package/dist/matter/behaviors/ThermostatBehavior.spec.js +0 -23
  269. package/dist/matter/behaviors/ThermostatBehavior.spec.js.map +0 -1
  270. package/dist/matter/behaviors/WindowCoveringBehavior.spec.d.ts +0 -2
  271. package/dist/matter/behaviors/WindowCoveringBehavior.spec.d.ts.map +0 -1
  272. package/dist/matter/behaviors/WindowCoveringBehavior.spec.js +0 -27
  273. package/dist/matter/behaviors/WindowCoveringBehavior.spec.js.map +0 -1
  274. package/dist/matter/configValidator.spec.d.ts +0 -2
  275. package/dist/matter/configValidator.spec.d.ts.map +0 -1
  276. package/dist/matter/configValidator.spec.js +0 -390
  277. package/dist/matter/configValidator.spec.js.map +0 -1
  278. package/dist/matter/errorHandler.spec.d.ts +0 -2
  279. package/dist/matter/errorHandler.spec.d.ts.map +0 -1
  280. package/dist/matter/errorHandler.spec.js +0 -159
  281. package/dist/matter/errorHandler.spec.js.map +0 -1
  282. package/dist/matter/logFormatter.spec.d.ts +0 -2
  283. package/dist/matter/logFormatter.spec.d.ts.map +0 -1
  284. package/dist/matter/logFormatter.spec.js +0 -252
  285. package/dist/matter/logFormatter.spec.js.map +0 -1
  286. package/dist/matter/serverHelpers.spec.d.ts +0 -2
  287. package/dist/matter/serverHelpers.spec.d.ts.map +0 -1
  288. package/dist/matter/serverHelpers.spec.js +0 -527
  289. package/dist/matter/serverHelpers.spec.js.map +0 -1
  290. package/dist/matter/storage.spec.d.ts +0 -2
  291. package/dist/matter/storage.spec.d.ts.map +0 -1
  292. package/dist/matter/storage.spec.js +0 -570
  293. package/dist/matter/storage.spec.js.map +0 -1
  294. package/dist/matter/typeHelpers.spec.d.ts +0 -2
  295. package/dist/matter/typeHelpers.spec.d.ts.map +0 -1
  296. package/dist/matter/typeHelpers.spec.js +0 -127
  297. package/dist/matter/typeHelpers.spec.js.map +0 -1
  298. package/dist/platformAccessory.spec.d.ts +0 -2
  299. package/dist/platformAccessory.spec.d.ts.map +0 -1
  300. package/dist/platformAccessory.spec.js +0 -126
  301. package/dist/platformAccessory.spec.js.map +0 -1
  302. package/dist/pluginManager.spec.d.ts +0 -2
  303. package/dist/pluginManager.spec.d.ts.map +0 -1
  304. package/dist/pluginManager.spec.js +0 -43
  305. package/dist/pluginManager.spec.js.map +0 -1
  306. package/dist/server.spec.d.ts +0 -2
  307. package/dist/server.spec.d.ts.map +0 -1
  308. package/dist/server.spec.js +0 -57
  309. package/dist/server.spec.js.map +0 -1
  310. package/dist/user.spec.d.ts +0 -2
  311. package/dist/user.spec.d.ts.map +0 -1
  312. package/dist/user.spec.js +0 -31
  313. package/dist/user.spec.js.map +0 -1
  314. package/dist/util/mac.spec.d.ts +0 -2
  315. package/dist/util/mac.spec.d.ts.map +0 -1
  316. package/dist/util/mac.spec.js +0 -36
  317. package/dist/util/mac.spec.js.map +0 -1
  318. package/dist/version.spec.d.ts +0 -2
  319. package/dist/version.spec.d.ts.map +0 -1
  320. package/dist/version.spec.js +0 -20
  321. package/dist/version.spec.js.map +0 -1
@@ -1,63 +1,14 @@
1
- /**
2
- * ColorControl Cluster Behavior
3
- *
4
- * Handles color control commands for RGB lights and color temperature lights
5
- */
6
1
  import type { ColorControl } from '@matter/main/clusters';
7
2
  import type { BehaviorRegistry } from './BehaviorRegistry.js';
8
3
  import { ColorControlServer } from '@matter/main/behaviors/color-control';
9
- /**
10
- * Custom ColorControl Server that calls plugin handlers
11
- *
12
- * ColorControl handles color changes for lights (hue, saturation, XY color, color temperature).
13
- * Plugin developers can override these *Logic methods to handle color changes in their hardware.
14
- *
15
- * Features (Xy, ColorTemperature, HueSaturation) are added by the device type, not this behavior.
16
- * This ensures each device only gets the features it needs.
17
- */
18
4
  export declare class HomebridgeColorControlServer extends ColorControlServer {
19
5
  private static registry;
20
- /**
21
- * Set the behavior registry (called once during server initialization)
22
- */
23
6
  static setRegistry(registry: BehaviorRegistry): void;
24
- /**
25
- * Called when color temperature is changed
26
- * @param colorTemperatureMireds - Target color temperature in mireds (micro reciprocal degrees)
27
- * @param transitionTime - Transition time in seconds (0 = as fast as possible)
28
- */
29
7
  moveToColorTemperatureLogic(colorTemperatureMireds: number, transitionTime: number): Promise<void>;
30
- /**
31
- * Called when hue and saturation are changed together
32
- * @param hue - Target hue value (0-254 for normal hue, 0-65535 for enhanced hue)
33
- * @param saturation - Target saturation value (0-254)
34
- * @param transitionTime - Transition time in seconds (0 = as fast as possible)
35
- */
36
8
  moveToHueAndSaturationLogic(hue: number, saturation: number, transitionTime: number): Promise<void>;
37
- /**
38
- * Called when XY color coordinates are changed
39
- * @param targetX - Target X value (0-65535 representing 0.0-1.0 in CIE color space)
40
- * @param targetY - Target Y value (0-65535 representing 0.0-1.0 in CIE color space)
41
- * @param transitionTime - Transition time in seconds (0 = as fast as possible)
42
- */
43
9
  moveToColorLogic(targetX: number, targetY: number, transitionTime: number): Promise<void>;
44
- /**
45
- * Called when hue is changed individually
46
- * @param targetHue - Target hue value
47
- * @param direction - Direction to move (shortest, longest, up, down)
48
- * @param transitionTime - Transition time in seconds
49
- * @param isEnhancedHue - Whether this is enhanced hue (16-bit) or normal hue (8-bit)
50
- */
51
10
  moveToHueLogic(targetHue: number, direction: ColorControl.Direction, transitionTime: number, isEnhancedHue?: boolean): Promise<void>;
52
- /**
53
- * Called when saturation is changed individually
54
- * @param targetSaturation - Target saturation value (0-254)
55
- * @param transitionTime - Transition time in seconds
56
- */
57
11
  moveToSaturationLogic(targetSaturation: number, transitionTime: number): Promise<void>;
58
- /**
59
- * Called when all color movement should be stopped
60
- */
61
12
  stopAllColorMovement(): Promise<void>;
62
13
  }
63
14
  //# sourceMappingURL=ColorControlBehavior.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ColorControlBehavior.d.ts","sourceRoot":"","sources":["../../../src/matter/behaviors/ColorControlBehavior.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAA;AAKzE;;;;;;;;GAQG;AACH,qBAAa,4BAA6B,SAAQ,kBAAkB;IAClE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAkB;IAEzC;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAIpD;;;;OAIG;IACY,2BAA2B,CAAC,sBAAsB,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAoCjH;;;;;OAKG;IACY,2BAA2B,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAuClH;;;;;OAKG;IACY,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAuCxG;;;;;;OAMG;IACY,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,CAAC,SAAS,EAAE,cAAc,EAAE,MAAM,EAAE,aAAa,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAsCjJ;;;;OAIG;IACY,qBAAqB,CAAC,gBAAgB,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAoCrG;;OAEG;IACY,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC;CA0BrD"}
1
+ {"version":3,"file":"ColorControlBehavior.d.ts","sourceRoot":"","sources":["../../../src/matter/behaviors/ColorControlBehavior.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAA;AAczE,qBAAa,4BAA6B,SAAQ,kBAAkB;IAClE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAkB;IAKzC,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IASrC,2BAA2B,CAAC,sBAAsB,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA0ClG,2BAA2B,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA6CnG,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA8CzF,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,CAAC,SAAS,EAAE,cAAc,EAAE,MAAM,EAAE,aAAa,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IA2ClI,qBAAqB,CAAC,gBAAgB,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAuCtF,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC;CA0BrD"}
@@ -1,41 +1,16 @@
1
- /**
2
- * ColorControl Cluster Behavior
3
- *
4
- * Handles color control commands for RGB lights and color temperature lights
5
- */
6
1
  import { ColorControlServer } from '@matter/main/behaviors/color-control';
7
2
  import { Status, StatusResponseError } from '@matter/main/types';
8
3
  import { MatterStatus } from '../errors.js';
9
- /**
10
- * Custom ColorControl Server that calls plugin handlers
11
- *
12
- * ColorControl handles color changes for lights (hue, saturation, XY color, color temperature).
13
- * Plugin developers can override these *Logic methods to handle color changes in their hardware.
14
- *
15
- * Features (Xy, ColorTemperature, HueSaturation) are added by the device type, not this behavior.
16
- * This ensures each device only gets the features it needs.
17
- */
18
4
  export class HomebridgeColorControlServer extends ColorControlServer {
19
5
  static registry;
20
- /**
21
- * Set the behavior registry (called once during server initialization)
22
- */
23
6
  static setRegistry(registry) {
24
7
  this.registry = registry;
25
8
  }
26
- /**
27
- * Called when color temperature is changed
28
- * @param colorTemperatureMireds - Target color temperature in mireds (micro reciprocal degrees)
29
- * @param transitionTime - Transition time in seconds (0 = as fast as possible)
30
- */
31
9
  async moveToColorTemperatureLogic(colorTemperatureMireds, transitionTime) {
32
10
  const endpointId = this.endpoint.id;
33
11
  try {
34
- // Execute user handler
35
12
  await HomebridgeColorControlServer.registry.executeHandler(endpointId, 'colorControl', 'moveToColorTemperatureLogic', { colorTemperatureMireds, transitionTime });
36
- // Only reached if handler succeeded - update Matter state
37
13
  await super.moveToColorTemperatureLogic(colorTemperatureMireds, transitionTime);
38
- // Sync color temperature to cache
39
14
  const currentState = this.state;
40
15
  if (currentState.colorTemperatureMireds !== undefined) {
41
16
  HomebridgeColorControlServer.registry.syncStateToCache(endpointId, 'colorControl', {
@@ -44,31 +19,18 @@ export class HomebridgeColorControlServer extends ColorControlServer {
44
19
  }
45
20
  }
46
21
  catch (error) {
47
- // If user handler already threw a StatusResponseError, propagate it as-is
48
- // This sends a proper Matter protocol error response to the controller
49
22
  if (MatterStatus.isMatterProtocolError(error)) {
50
23
  throw error;
51
24
  }
52
- // For other errors, wrap in appropriate StatusResponseError
53
- // This prevents the endpoint from crashing and keeps the device online
54
25
  const message = error instanceof Error ? error.message : String(error);
55
26
  throw new StatusResponseError(`Failed to set color temperature: ${message}`, Status.Failure);
56
27
  }
57
28
  }
58
- /**
59
- * Called when hue and saturation are changed together
60
- * @param hue - Target hue value (0-254 for normal hue, 0-65535 for enhanced hue)
61
- * @param saturation - Target saturation value (0-254)
62
- * @param transitionTime - Transition time in seconds (0 = as fast as possible)
63
- */
64
29
  async moveToHueAndSaturationLogic(hue, saturation, transitionTime) {
65
30
  const endpointId = this.endpoint.id;
66
31
  try {
67
- // Execute user handler
68
32
  await HomebridgeColorControlServer.registry.executeHandler(endpointId, 'colorControl', 'moveToHueAndSaturationLogic', { hue, saturation, transitionTime });
69
- // Only reached if handler succeeded - update Matter state
70
33
  await super.moveToHueAndSaturationLogic(hue, saturation, transitionTime);
71
- // Sync hue and saturation to cache
72
34
  const currentState = this.state;
73
35
  const stateUpdate = {};
74
36
  if (currentState.currentHue !== undefined) {
@@ -80,31 +42,18 @@ export class HomebridgeColorControlServer extends ColorControlServer {
80
42
  HomebridgeColorControlServer.registry.syncStateToCache(endpointId, 'colorControl', stateUpdate);
81
43
  }
82
44
  catch (error) {
83
- // If user handler already threw a StatusResponseError, propagate it as-is
84
- // This sends a proper Matter protocol error response to the controller
85
45
  if (MatterStatus.isMatterProtocolError(error)) {
86
46
  throw error;
87
47
  }
88
- // For other errors, wrap in appropriate StatusResponseError
89
- // This prevents the endpoint from crashing and keeps the device online
90
48
  const message = error instanceof Error ? error.message : String(error);
91
49
  throw new StatusResponseError(`Failed to set hue and saturation: ${message}`, Status.Failure);
92
50
  }
93
51
  }
94
- /**
95
- * Called when XY color coordinates are changed
96
- * @param targetX - Target X value (0-65535 representing 0.0-1.0 in CIE color space)
97
- * @param targetY - Target Y value (0-65535 representing 0.0-1.0 in CIE color space)
98
- * @param transitionTime - Transition time in seconds (0 = as fast as possible)
99
- */
100
52
  async moveToColorLogic(targetX, targetY, transitionTime) {
101
53
  const endpointId = this.endpoint.id;
102
54
  try {
103
- // Execute user handler
104
55
  await HomebridgeColorControlServer.registry.executeHandler(endpointId, 'colorControl', 'moveToColorLogic', { targetX, targetY, transitionTime });
105
- // Only reached if handler succeeded - update Matter state
106
56
  await super.moveToColorLogic(targetX, targetY, transitionTime);
107
- // Sync XY color to cache
108
57
  const currentState = this.state;
109
58
  const stateUpdate = {};
110
59
  if (currentState.currentX !== undefined) {
@@ -116,32 +65,18 @@ export class HomebridgeColorControlServer extends ColorControlServer {
116
65
  HomebridgeColorControlServer.registry.syncStateToCache(endpointId, 'colorControl', stateUpdate);
117
66
  }
118
67
  catch (error) {
119
- // If user handler already threw a StatusResponseError, propagate it as-is
120
- // This sends a proper Matter protocol error response to the controller
121
68
  if (MatterStatus.isMatterProtocolError(error)) {
122
69
  throw error;
123
70
  }
124
- // For other errors, wrap in appropriate StatusResponseError
125
- // This prevents the endpoint from crashing and keeps the device online
126
71
  const message = error instanceof Error ? error.message : String(error);
127
72
  throw new StatusResponseError(`Failed to set XY color: ${message}`, Status.Failure);
128
73
  }
129
74
  }
130
- /**
131
- * Called when hue is changed individually
132
- * @param targetHue - Target hue value
133
- * @param direction - Direction to move (shortest, longest, up, down)
134
- * @param transitionTime - Transition time in seconds
135
- * @param isEnhancedHue - Whether this is enhanced hue (16-bit) or normal hue (8-bit)
136
- */
137
75
  async moveToHueLogic(targetHue, direction, transitionTime, isEnhancedHue = false) {
138
76
  const endpointId = this.endpoint.id;
139
77
  try {
140
- // Execute user handler
141
78
  await HomebridgeColorControlServer.registry.executeHandler(endpointId, 'colorControl', 'moveToHueLogic', { targetHue, direction, transitionTime, isEnhancedHue });
142
- // Only reached if handler succeeded - update Matter state
143
79
  await super.moveToHueLogic(targetHue, direction, transitionTime, isEnhancedHue);
144
- // Sync hue to cache
145
80
  const currentState = this.state;
146
81
  const stateUpdate = {};
147
82
  if (isEnhancedHue && currentState.enhancedCurrentHue !== undefined) {
@@ -153,30 +88,18 @@ export class HomebridgeColorControlServer extends ColorControlServer {
153
88
  HomebridgeColorControlServer.registry.syncStateToCache(endpointId, 'colorControl', stateUpdate);
154
89
  }
155
90
  catch (error) {
156
- // If user handler already threw a StatusResponseError, propagate it as-is
157
- // This sends a proper Matter protocol error response to the controller
158
91
  if (MatterStatus.isMatterProtocolError(error)) {
159
92
  throw error;
160
93
  }
161
- // For other errors, wrap in appropriate StatusResponseError
162
- // This prevents the endpoint from crashing and keeps the device online
163
94
  const message = error instanceof Error ? error.message : String(error);
164
95
  throw new StatusResponseError(`Failed to set hue: ${message}`, Status.Failure);
165
96
  }
166
97
  }
167
- /**
168
- * Called when saturation is changed individually
169
- * @param targetSaturation - Target saturation value (0-254)
170
- * @param transitionTime - Transition time in seconds
171
- */
172
98
  async moveToSaturationLogic(targetSaturation, transitionTime) {
173
99
  const endpointId = this.endpoint.id;
174
100
  try {
175
- // Execute user handler
176
101
  await HomebridgeColorControlServer.registry.executeHandler(endpointId, 'colorControl', 'moveToSaturationLogic', { targetSaturation, transitionTime });
177
- // Only reached if handler succeeded - update Matter state
178
102
  await super.moveToSaturationLogic(targetSaturation, transitionTime);
179
- // Sync saturation to cache
180
103
  const currentState = this.state;
181
104
  if (currentState.currentSaturation !== undefined) {
182
105
  HomebridgeColorControlServer.registry.syncStateToCache(endpointId, 'colorControl', {
@@ -185,36 +108,23 @@ export class HomebridgeColorControlServer extends ColorControlServer {
185
108
  }
186
109
  }
187
110
  catch (error) {
188
- // If user handler already threw a StatusResponseError, propagate it as-is
189
- // This sends a proper Matter protocol error response to the controller
190
111
  if (MatterStatus.isMatterProtocolError(error)) {
191
112
  throw error;
192
113
  }
193
- // For other errors, wrap in appropriate StatusResponseError
194
- // This prevents the endpoint from crashing and keeps the device online
195
114
  const message = error instanceof Error ? error.message : String(error);
196
115
  throw new StatusResponseError(`Failed to set saturation: ${message}`, Status.Failure);
197
116
  }
198
117
  }
199
- /**
200
- * Called when all color movement should be stopped
201
- */
202
118
  async stopAllColorMovement() {
203
119
  const endpointId = this.endpoint.id;
204
120
  try {
205
- // Execute user handler
206
121
  await HomebridgeColorControlServer.registry.executeHandler(endpointId, 'colorControl', 'stopAllColorMovement');
207
- // Only reached if handler succeeded - update Matter state
208
122
  await super.stopAllColorMovement();
209
123
  }
210
124
  catch (error) {
211
- // If user handler already threw a StatusResponseError, propagate it as-is
212
- // This sends a proper Matter protocol error response to the controller
213
125
  if (MatterStatus.isMatterProtocolError(error)) {
214
126
  throw error;
215
127
  }
216
- // For other errors, wrap in appropriate StatusResponseError
217
- // This prevents the endpoint from crashing and keeps the device online
218
128
  const message = error instanceof Error ? error.message : String(error);
219
129
  throw new StatusResponseError(`Failed to stop color movement: ${message}`, Status.Failure);
220
130
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ColorControlBehavior.js","sourceRoot":"","sources":["../../../src/matter/behaviors/ColorControlBehavior.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAA;AACzE,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAEhE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE3C;;;;;;;;GAQG;AACH,MAAM,OAAO,4BAA6B,SAAQ,kBAAkB;IAC1D,MAAM,CAAC,QAAQ,CAAkB;IAEzC;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,QAA0B;QAC3C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;IAED;;;;OAIG;IACM,KAAK,CAAC,2BAA2B,CAAC,sBAA8B,EAAE,cAAsB;QAC/F,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAA;QAEnC,IAAI,CAAC;YACH,uBAAuB;YACvB,MAAM,4BAA4B,CAAC,QAAQ,CAAC,cAAc,CACxD,UAAU,EACV,cAAc,EACd,6BAA6B,EAC7B,EAAE,sBAAsB,EAAE,cAAc,EAAE,CAC3C,CAAA;YAED,0DAA0D;YAC1D,MAAM,KAAK,CAAC,2BAA2B,CAAC,sBAAsB,EAAE,cAAc,CAAC,CAAA;YAE/E,kCAAkC;YAClC,MAAM,YAAY,GAAG,IAAI,CAAC,KAAY,CAAA;YACtC,IAAI,YAAY,CAAC,sBAAsB,KAAK,SAAS,EAAE,CAAC;gB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B;QACjC,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAA;QAEnC,IAAI,CAAC;YAEH,MAAM,4BAA4B,CAAC,QAAQ,CAAC,cAAc,CACxD,UAAU,EACV,cAAc,EACd,sBAAsB,CACvB,CAAA;YAGD,MAAM,KAAK,CAAC,oBAAoB,EAAE,CAAA;QACpC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAGf,IAAI,YAAY,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC9C,MAAM,KAAK,CAAA;YACb,CAAC;YAID,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;YACtE,MAAM,IAAI,mBAAmB,CAAC,kCAAkC,OAAO,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,CAAA;QAC5F,CAAC;IACH,CAAC;CACF"}
@@ -1,120 +1,29 @@
1
- /**
2
- * Concentration Measurement Cluster Behavior
3
- *
4
- * Handles concentration measurement readings for various pollutants and gases.
5
- * This cluster is primarily read-only, exposing concentration measurements to Matter controllers.
6
- *
7
- * Supported measurement types:
8
- * - PM2.5: Fine particulate matter density
9
- * - PM10: Coarse particulate matter density
10
- * - Ozone (O3): Ozone concentration
11
- * - NO2: Nitrogen dioxide concentration
12
- * - CO: Carbon monoxide level
13
- *
14
- * Example usage:
15
- * ```typescript
16
- * const accessory: MatterAccessory = {
17
- * uuid: 'air-quality-sensor-1',
18
- * displayName: 'Living Room Air Quality',
19
- * deviceType: api.matter.deviceTypes.AirQualitySensor,
20
- * serialNumber: 'AQ-12345',
21
- * manufacturer: 'Acme',
22
- * model: 'AQ-100',
23
- * clusters: {
24
- * pm25ConcentrationMeasurement: {
25
- * measuredValue: 12.5, // PM2.5 concentration in µg/m³
26
- * minMeasuredValue: 0,
27
- * maxMeasuredValue: 1000,
28
- * measurementUnit: 0, // 0 = µg/m³
29
- * },
30
- * pm10ConcentrationMeasurement: {
31
- * measuredValue: 25.0, // PM10 concentration in µg/m³
32
- * minMeasuredValue: 0,
33
- * maxMeasuredValue: 1000,
34
- * measurementUnit: 0,
35
- * },
36
- * ozoneConcentrationMeasurement: {
37
- * measuredValue: 0.05, // Ozone concentration in ppm
38
- * minMeasuredValue: 0,
39
- * maxMeasuredValue: 1,
40
- * measurementUnit: 1, // 1 = ppm
41
- * },
42
- * nitrogenDioxideConcentrationMeasurement: {
43
- * measuredValue: 0.02, // NO2 concentration in ppm
44
- * minMeasuredValue: 0,
45
- * maxMeasuredValue: 1,
46
- * measurementUnit: 1,
47
- * },
48
- * carbonMonoxideConcentrationMeasurement: {
49
- * measuredValue: 3.0, // CO concentration in ppm
50
- * minMeasuredValue: 0,
51
- * maxMeasuredValue: 100,
52
- * measurementUnit: 1,
53
- * }
54
- * }
55
- * }
56
- *
57
- * // Update concentration readings
58
- * await api.matter.updateClusterState(accessory.uuid, 'pm25ConcentrationMeasurement', { measuredValue: 15.3 })
59
- * await api.matter.updateClusterState(accessory.uuid, 'carbonMonoxideConcentrationMeasurement', { measuredValue: 2.5 })
60
- * ```
61
- */
62
1
  import type { BehaviorRegistry } from './BehaviorRegistry.js';
63
2
  import { CarbonMonoxideConcentrationMeasurementServer } from '@matter/node/behaviors/carbon-monoxide-concentration-measurement';
64
3
  import { NitrogenDioxideConcentrationMeasurementServer } from '@matter/node/behaviors/nitrogen-dioxide-concentration-measurement';
65
4
  import { OzoneConcentrationMeasurementServer } from '@matter/node/behaviors/ozone-concentration-measurement';
66
5
  import { Pm10ConcentrationMeasurementServer } from '@matter/node/behaviors/pm10-concentration-measurement';
67
6
  import { Pm25ConcentrationMeasurementServer } from '@matter/node/behaviors/pm25-concentration-measurement';
68
- /**
69
- * Custom PM2.5 Concentration Measurement Server
70
- *
71
- * Measures fine particulate matter (particles with diameter ≤ 2.5 micrometers)
72
- * This is a read-only cluster - plugins update state via the Matter API
73
- */
74
7
  export declare class HomebridgePm25ConcentrationMeasurementServer extends Pm25ConcentrationMeasurementServer {
75
8
  private static registry;
76
9
  static setRegistry(registry: BehaviorRegistry): void;
77
10
  initialize(): void;
78
11
  }
79
- /**
80
- * Custom PM10 Concentration Measurement Server
81
- *
82
- * Measures coarse particulate matter (particles with diameter ≤ 10 micrometers)
83
- * This is a read-only cluster - plugins update state via the Matter API
84
- */
85
12
  export declare class HomebridgePm10ConcentrationMeasurementServer extends Pm10ConcentrationMeasurementServer {
86
13
  private static registry;
87
14
  static setRegistry(registry: BehaviorRegistry): void;
88
15
  initialize(): void;
89
16
  }
90
- /**
91
- * Custom Ozone Concentration Measurement Server
92
- *
93
- * Measures ozone (O3) concentration
94
- * This is a read-only cluster - plugins update state via the Matter API
95
- */
96
17
  export declare class HomebridgeOzoneConcentrationMeasurementServer extends OzoneConcentrationMeasurementServer {
97
18
  private static registry;
98
19
  static setRegistry(registry: BehaviorRegistry): void;
99
20
  initialize(): void;
100
21
  }
101
- /**
102
- * Custom Nitrogen Dioxide Concentration Measurement Server
103
- *
104
- * Measures nitrogen dioxide (NO2) concentration
105
- * This is a read-only cluster - plugins update state via the Matter API
106
- */
107
22
  export declare class HomebridgeNitrogenDioxideConcentrationMeasurementServer extends NitrogenDioxideConcentrationMeasurementServer {
108
23
  private static registry;
109
24
  static setRegistry(registry: BehaviorRegistry): void;
110
25
  initialize(): void;
111
26
  }
112
- /**
113
- * Custom Carbon Monoxide Concentration Measurement Server
114
- *
115
- * Measures carbon monoxide (CO) concentration
116
- * This is a read-only cluster - plugins update state via the Matter API
117
- */
118
27
  export declare class HomebridgeCarbonMonoxideConcentrationMeasurementServer extends CarbonMonoxideConcentrationMeasurementServer {
119
28
  private static registry;
120
29
  static setRegistry(registry: BehaviorRegistry): void;
@@ -1 +1 @@
1
- {"version":3,"file":"ConcentrationMeasurementBehavior.d.ts","sourceRoot":"","sources":["../../../src/matter/behaviors/ConcentrationMeasurementBehavior.ts"],"names":[],"mappings":"AAAA;;;;;;;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C,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAI3C,UAAU,IAAI,IAAI;CAI5B;AAQD,qBAAa,sDAAuD,SAAQ,4CAA4C;IACtH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAkB;IAEzC,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAI3C,UAAU,IAAI,IAAI;CAI5B"}
@@ -1,75 +1,8 @@
1
- /**
2
- * Concentration Measurement Cluster Behavior
3
- *
4
- * Handles concentration measurement readings for various pollutants and gases.
5
- * This cluster is primarily read-only, exposing concentration measurements to Matter controllers.
6
- *
7
- * Supported measurement types:
8
- * - PM2.5: Fine particulate matter density
9
- * - PM10: Coarse particulate matter density
10
- * - Ozone (O3): Ozone concentration
11
- * - NO2: Nitrogen dioxide concentration
12
- * - CO: Carbon monoxide level
13
- *
14
- * Example usage:
15
- * ```typescript
16
- * const accessory: MatterAccessory = {
17
- * uuid: 'air-quality-sensor-1',
18
- * displayName: 'Living Room Air Quality',
19
- * deviceType: api.matter.deviceTypes.AirQualitySensor,
20
- * serialNumber: 'AQ-12345',
21
- * manufacturer: 'Acme',
22
- * model: 'AQ-100',
23
- * clusters: {
24
- * pm25ConcentrationMeasurement: {
25
- * measuredValue: 12.5, // PM2.5 concentration in µg/m³
26
- * minMeasuredValue: 0,
27
- * maxMeasuredValue: 1000,
28
- * measurementUnit: 0, // 0 = µg/m³
29
- * },
30
- * pm10ConcentrationMeasurement: {
31
- * measuredValue: 25.0, // PM10 concentration in µg/m³
32
- * minMeasuredValue: 0,
33
- * maxMeasuredValue: 1000,
34
- * measurementUnit: 0,
35
- * },
36
- * ozoneConcentrationMeasurement: {
37
- * measuredValue: 0.05, // Ozone concentration in ppm
38
- * minMeasuredValue: 0,
39
- * maxMeasuredValue: 1,
40
- * measurementUnit: 1, // 1 = ppm
41
- * },
42
- * nitrogenDioxideConcentrationMeasurement: {
43
- * measuredValue: 0.02, // NO2 concentration in ppm
44
- * minMeasuredValue: 0,
45
- * maxMeasuredValue: 1,
46
- * measurementUnit: 1,
47
- * },
48
- * carbonMonoxideConcentrationMeasurement: {
49
- * measuredValue: 3.0, // CO concentration in ppm
50
- * minMeasuredValue: 0,
51
- * maxMeasuredValue: 100,
52
- * measurementUnit: 1,
53
- * }
54
- * }
55
- * }
56
- *
57
- * // Update concentration readings
58
- * await api.matter.updateClusterState(accessory.uuid, 'pm25ConcentrationMeasurement', { measuredValue: 15.3 })
59
- * await api.matter.updateClusterState(accessory.uuid, 'carbonMonoxideConcentrationMeasurement', { measuredValue: 2.5 })
60
- * ```
61
- */
62
1
  import { CarbonMonoxideConcentrationMeasurementServer } from '@matter/node/behaviors/carbon-monoxide-concentration-measurement';
63
2
  import { NitrogenDioxideConcentrationMeasurementServer } from '@matter/node/behaviors/nitrogen-dioxide-concentration-measurement';
64
3
  import { OzoneConcentrationMeasurementServer } from '@matter/node/behaviors/ozone-concentration-measurement';
65
4
  import { Pm10ConcentrationMeasurementServer } from '@matter/node/behaviors/pm10-concentration-measurement';
66
5
  import { Pm25ConcentrationMeasurementServer } from '@matter/node/behaviors/pm25-concentration-measurement';
67
- /**
68
- * Custom PM2.5 Concentration Measurement Server
69
- *
70
- * Measures fine particulate matter (particles with diameter ≤ 2.5 micrometers)
71
- * This is a read-only cluster - plugins update state via the Matter API
72
- */
73
6
  export class HomebridgePm25ConcentrationMeasurementServer extends Pm25ConcentrationMeasurementServer {
74
7
  static registry;
75
8
  static setRegistry(registry) {
@@ -77,15 +10,8 @@ export class HomebridgePm25ConcentrationMeasurementServer extends Pm25Concentrat
77
10
  }
78
11
  initialize() {
79
12
  super.initialize();
80
- // Read-only cluster, no command handlers needed
81
13
  }
82
14
  }
83
- /**
84
- * Custom PM10 Concentration Measurement Server
85
- *
86
- * Measures coarse particulate matter (particles with diameter ≤ 10 micrometers)
87
- * This is a read-only cluster - plugins update state via the Matter API
88
- */
89
15
  export class HomebridgePm10ConcentrationMeasurementServer extends Pm10ConcentrationMeasurementServer {
90
16
  static registry;
91
17
  static setRegistry(registry) {
@@ -93,15 +19,8 @@ export class HomebridgePm10ConcentrationMeasurementServer extends Pm10Concentrat
93
19
  }
94
20
  initialize() {
95
21
  super.initialize();
96
- // Read-only cluster, no command handlers needed
97
22
  }
98
23
  }
99
- /**
100
- * Custom Ozone Concentration Measurement Server
101
- *
102
- * Measures ozone (O3) concentration
103
- * This is a read-only cluster - plugins update state via the Matter API
104
- */
105
24
  export class HomebridgeOzoneConcentrationMeasurementServer extends OzoneConcentrationMeasurementServer {
106
25
  static registry;
107
26
  static setRegistry(registry) {
@@ -109,15 +28,8 @@ export class HomebridgeOzoneConcentrationMeasurementServer extends OzoneConcentr
109
28
  }
110
29
  initialize() {
111
30
  super.initialize();
112
- // Read-only cluster, no command handlers needed
113
31
  }
114
32
  }
115
- /**
116
- * Custom Nitrogen Dioxide Concentration Measurement Server
117
- *
118
- * Measures nitrogen dioxide (NO2) concentration
119
- * This is a read-only cluster - plugins update state via the Matter API
120
- */
121
33
  export class HomebridgeNitrogenDioxideConcentrationMeasurementServer extends NitrogenDioxideConcentrationMeasurementServer {
122
34
  static registry;
123
35
  static setRegistry(registry) {
@@ -125,15 +37,8 @@ export class HomebridgeNitrogenDioxideConcentrationMeasurementServer extends Nit
125
37
  }
126
38
  initialize() {
127
39
  super.initialize();
128
- // Read-only cluster, no command handlers needed
129
40
  }
130
41
  }
131
- /**
132
- * Custom Carbon Monoxide Concentration Measurement Server
133
- *
134
- * Measures carbon monoxide (CO) concentration
135
- * This is a read-only cluster - plugins update state via the Matter API
136
- */
137
42
  export class HomebridgeCarbonMonoxideConcentrationMeasurementServer extends CarbonMonoxideConcentrationMeasurementServer {
138
43
  static registry;
139
44
  static setRegistry(registry) {
@@ -141,7 +46,6 @@ export class HomebridgeCarbonMonoxideConcentrationMeasurementServer extends Carb
141
46
  }
142
47
  initialize() {
143
48
  super.initialize();
144
- // Read-only cluster, no command handlers needed
145
49
  }
146
50
  }
147
51
  //# sourceMappingURL=ConcentrationMeasurementBehavior.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConcentrationMeasurementBehavior.js","sourceRoot":"","sources":["../../../src/matter/behaviors/ConcentrationMeasurementBehavior.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAIH,OAAO,EAAE,4CAA4C,EAAE,MAAM,kEAAkE,CAAA;AAC/H,OAAO,EAAE,6CAA6C,EAAE,MAAM,mEAAmE,CAAA;AACjI,OAAO,EAAE,mCAAmC,EAAE,MAAM,wDAAwD,CAAA;AAC5G,OAAO,EAAE,kCAAkC,EAAE,MAAM,uDAAuD,CAAA;AAC1G,OAAO,EAAE,kCAAkC,EAAE,MAAM,uDAAuD,CAAA;AAE1G;;;;;GAKG;AACH,MAAM,OAAO,4CAA6C,SAAQ,kCAAkC;IAC1F,MAAM,CAAC,QAAQ,CAAkB;IAEzC,MAAM,CAAC,WAAW,CAAC,QAA0B;QAC3C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;IAEQ,UAAU;QACjB,KAAK,CAAC,UAAU,EAAE,CAAA;QAClB,gDAAgD;IAClD,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,OAAO,4CAA6C,SAAQ,kCAAkC;IAC1F,MAAM,CAAC,QAAQ,CAAkB;IAEzC,MAAM,CAAC,WAAW,CAAC,QAA0B;QAC3C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;IAEQ,UAAU;QACjB,KAAK,CAAC,UAAU,EAAE,CAAA;QAClB,gDAAgD;IAClD,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,OAAO,6CAA8C,SAAQ,mCAAmC;IAC5F,MAAM,CAAC,QAAQ,CAAkB;IAEzC,MAAM,CAAC,WAAW,CAAC,QAA0B;QAC3C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;IAEQ,UAAU;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AAM,OAAO,4CAA6C,SAAQ,kCAAkC;IAC1F,MAAM,CAAC,QAAQ,CAAkB;IAEzC,MAAM,CAAC,WAAW,CAAC,QAA0B;QAC3C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;IAEQ,UAAU;QACjB,KAAK,CAAC,UAAU,EAAE,CAAA;IAEpB,CAAC;CACF;AAQD,MAAM,OAAO,6CAA8C,SAAQ,mCAAmC;IAC5F,MAAM,CAAC,QAAQ,CAAkB;IAEzC,MAAM,CAAC,WAAW,CAAC,QAA0B;QAC3C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;IAEQ,UAAU;QACjB,KAAK,CAAC,UAAU,EAAE,CAAA;IAEpB,CAAC;CACF;AAQD,MAAM,OAAO,uDAAwD,SAAQ,6CAA6C;IAChH,MAAM,CAAC,QAAQ,CAAkB;IAEzC,MAAM,CAAC,WAAW,CAAC,QAA0B;QAC3C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;IAEQ,UAAU;QACjB,KAAK,CAAC,UAAU,EAAE,CAAA;IAEpB,CAAC;CACF;AAQD,MAAM,OAAO,sDAAuD,SAAQ,4CAA4C;IAC9G,MAAM,CAAC,QAAQ,CAAkB;IAEzC,MAAM,CAAC,WAAW,CAAC,QAA0B;QAC3C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;IAC1B,CAAC;IAEQ,UAAU;QACjB,KAAK,CAAC,UAAU,EAAE,CAAA;IAEpB,CAAC;CACF"}
@@ -1,18 +1,7 @@
1
- /**
2
- * DoorLock Cluster Behavior
3
- *
4
- * Handles door lock commands for smart locks
5
- */
6
1
  import type { BehaviorRegistry } from './BehaviorRegistry.js';
7
2
  import { DoorLockServer } from '@matter/main/behaviors/door-lock';
8
- /**
9
- * Custom DoorLock Server that calls plugin handlers
10
- */
11
3
  export declare class HomebridgeDoorLockServer extends DoorLockServer {
12
4
  private static registry;
13
- /**
14
- * Set the behavior registry (called once during server initialization)
15
- */
16
5
  static setRegistry(registry: BehaviorRegistry): void;
17
6
  lockDoor(): Promise<void>;
18
7
  unlockDoor(): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"DoorLockBehavior.d.ts","sourceRoot":"","sources":["../../../src/matter/behaviors/DoorLockBehavior.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AAKjE;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,cAAc;IAC1D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAkB;IAEzC;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAIrC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IA6BzB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CA4B3C"}
1
+ {"version":3,"file":"DoorLockBehavior.d.ts","sourceRoot":"","sources":["../../../src/matter/behaviors/DoorLockBehavior.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AAQjE,qBAAa,wBAAyB,SAAQ,cAAc;IAC1D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAkB;IAKzC,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAIrC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IA6BzB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CA4B3C"}