homebridge-loxone-proxy 1.13.0 → 2.0.0-beta.10

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 (350) hide show
  1. package/ARCHITECTURE.md +60 -0
  2. package/README.md +75 -28
  3. package/config.schema.json +33 -48
  4. package/dist/AccessoryNameRegistry.d.ts +8 -0
  5. package/dist/AccessoryNameRegistry.d.ts.map +1 -0
  6. package/dist/AccessoryNameRegistry.js +53 -0
  7. package/dist/AccessoryNameRegistry.js.map +1 -0
  8. package/dist/LoxoneConfig.d.ts +18 -0
  9. package/dist/LoxoneConfig.d.ts.map +1 -0
  10. package/dist/LoxoneConfig.js +39 -0
  11. package/dist/LoxoneConfig.js.map +1 -0
  12. package/dist/LoxonePlatform.d.ts +7 -16
  13. package/dist/LoxonePlatform.d.ts.map +1 -1
  14. package/dist/LoxonePlatform.js +17 -140
  15. package/dist/LoxonePlatform.js.map +1 -1
  16. package/dist/binding/BindingEngine.d.ts +6 -0
  17. package/dist/binding/BindingEngine.d.ts.map +1 -0
  18. package/dist/binding/BindingEngine.js +44 -0
  19. package/dist/binding/BindingEngine.js.map +1 -0
  20. package/dist/binding/CharacteristicBinding.d.ts +10 -0
  21. package/dist/binding/CharacteristicBinding.d.ts.map +1 -0
  22. package/dist/binding/CharacteristicBinding.js +3 -0
  23. package/dist/binding/CharacteristicBinding.js.map +1 -0
  24. package/dist/binding/ControlBinders.d.ts +24 -0
  25. package/dist/binding/ControlBinders.d.ts.map +1 -0
  26. package/dist/binding/ControlBinders.js +295 -0
  27. package/dist/binding/ControlBinders.js.map +1 -0
  28. package/dist/binding/LoxoneBindingCoordinator.d.ts +34 -0
  29. package/dist/binding/LoxoneBindingCoordinator.d.ts.map +1 -0
  30. package/dist/binding/LoxoneBindingCoordinator.js +301 -0
  31. package/dist/binding/LoxoneBindingCoordinator.js.map +1 -0
  32. package/dist/binding/RoomBridgePublisher.d.ts +21 -0
  33. package/dist/binding/RoomBridgePublisher.d.ts.map +1 -0
  34. package/dist/binding/RoomBridgePublisher.js +156 -0
  35. package/dist/binding/RoomBridgePublisher.js.map +1 -0
  36. package/dist/binding/ServiceResolver.d.ts +12 -0
  37. package/dist/binding/ServiceResolver.d.ts.map +1 -0
  38. package/dist/binding/ServiceResolver.js +102 -0
  39. package/dist/binding/ServiceResolver.js.map +1 -0
  40. package/dist/binding/binders/colorBinder.d.ts +5 -0
  41. package/dist/binding/binders/colorBinder.d.ts.map +1 -0
  42. package/dist/binding/binders/colorBinder.js +107 -0
  43. package/dist/binding/binders/colorBinder.js.map +1 -0
  44. package/dist/binding/binders/intercomBinder.d.ts +5 -0
  45. package/dist/binding/binders/intercomBinder.d.ts.map +1 -0
  46. package/dist/binding/binders/intercomBinder.js +220 -0
  47. package/dist/binding/binders/intercomBinder.js.map +1 -0
  48. package/dist/binding/binders/irrigationBinder.d.ts +5 -0
  49. package/dist/binding/binders/irrigationBinder.d.ts.map +1 -0
  50. package/dist/binding/binders/irrigationBinder.js +89 -0
  51. package/dist/binding/binders/irrigationBinder.js.map +1 -0
  52. package/dist/binding/binders/nfcCodeTouchBinder.d.ts +6 -0
  53. package/dist/binding/binders/nfcCodeTouchBinder.d.ts.map +1 -0
  54. package/dist/binding/binders/nfcCodeTouchBinder.js +52 -0
  55. package/dist/binding/binders/nfcCodeTouchBinder.js.map +1 -0
  56. package/dist/binding/colorMath.d.ts +13 -0
  57. package/dist/binding/colorMath.d.ts.map +1 -0
  58. package/dist/binding/colorMath.js +55 -0
  59. package/dist/binding/colorMath.js.map +1 -0
  60. package/dist/binding/hapError.d.ts +3 -0
  61. package/dist/binding/hapError.d.ts.map +1 -0
  62. package/dist/binding/hapError.js +12 -0
  63. package/dist/binding/hapError.js.map +1 -0
  64. package/dist/binding/tables/alarmBindings.d.ts +4 -0
  65. package/dist/binding/tables/alarmBindings.d.ts.map +1 -0
  66. package/dist/binding/tables/alarmBindings.js +35 -0
  67. package/dist/binding/tables/alarmBindings.js.map +1 -0
  68. package/dist/binding/tables/contactBindings.d.ts +4 -0
  69. package/dist/binding/tables/contactBindings.d.ts.map +1 -0
  70. package/dist/binding/tables/contactBindings.js +16 -0
  71. package/dist/binding/tables/contactBindings.js.map +1 -0
  72. package/dist/binding/tables/coveringBindings.d.ts +6 -0
  73. package/dist/binding/tables/coveringBindings.d.ts.map +1 -0
  74. package/dist/binding/tables/coveringBindings.js +88 -0
  75. package/dist/binding/tables/coveringBindings.js.map +1 -0
  76. package/dist/binding/tables/fanBindings.d.ts +7 -0
  77. package/dist/binding/tables/fanBindings.d.ts.map +1 -0
  78. package/dist/binding/tables/fanBindings.js +40 -0
  79. package/dist/binding/tables/fanBindings.js.map +1 -0
  80. package/dist/binding/tables/lightingBindings.d.ts +4 -0
  81. package/dist/binding/tables/lightingBindings.d.ts.map +1 -0
  82. package/dist/binding/tables/lightingBindings.js +18 -0
  83. package/dist/binding/tables/lightingBindings.js.map +1 -0
  84. package/dist/binding/tables/moodBindings.d.ts +4 -0
  85. package/dist/binding/tables/moodBindings.d.ts.map +1 -0
  86. package/dist/binding/tables/moodBindings.js +14 -0
  87. package/dist/binding/tables/moodBindings.js.map +1 -0
  88. package/dist/binding/tables/pushbuttonBindings.d.ts +4 -0
  89. package/dist/binding/tables/pushbuttonBindings.d.ts.map +1 -0
  90. package/dist/binding/tables/pushbuttonBindings.js +12 -0
  91. package/dist/binding/tables/pushbuttonBindings.js.map +1 -0
  92. package/dist/binding/tables/radioBindings.d.ts +4 -0
  93. package/dist/binding/tables/radioBindings.d.ts.map +1 -0
  94. package/dist/binding/tables/radioBindings.js +19 -0
  95. package/dist/binding/tables/radioBindings.js.map +1 -0
  96. package/dist/binding/tables/sensorBindings.d.ts +10 -0
  97. package/dist/binding/tables/sensorBindings.d.ts.map +1 -0
  98. package/dist/binding/tables/sensorBindings.js +25 -0
  99. package/dist/binding/tables/sensorBindings.js.map +1 -0
  100. package/dist/binding/tables/smokeAlarmBindings.d.ts +4 -0
  101. package/dist/binding/tables/smokeAlarmBindings.d.ts.map +1 -0
  102. package/dist/binding/tables/smokeAlarmBindings.js +22 -0
  103. package/dist/binding/tables/smokeAlarmBindings.js.map +1 -0
  104. package/dist/binding/tables/switchBindings.d.ts +5 -0
  105. package/dist/binding/tables/switchBindings.d.ts.map +1 -0
  106. package/dist/binding/tables/switchBindings.js +36 -0
  107. package/dist/binding/tables/switchBindings.js.map +1 -0
  108. package/dist/binding/tables/thermostatBindings.d.ts +4 -0
  109. package/dist/binding/tables/thermostatBindings.d.ts.map +1 -0
  110. package/dist/binding/tables/thermostatBindings.js +48 -0
  111. package/dist/binding/tables/thermostatBindings.js.map +1 -0
  112. package/dist/homekit/hksv/FfmpegStreamingProcess.d.ts +2 -3
  113. package/dist/homekit/hksv/FfmpegStreamingProcess.d.ts.map +1 -1
  114. package/dist/homekit/hksv/FfmpegStreamingProcess.js +1 -1
  115. package/dist/homekit/hksv/FfmpegStreamingProcess.js.map +1 -1
  116. package/dist/homekit/hksv/LoxoneTalkback.d.ts +0 -21
  117. package/dist/homekit/hksv/LoxoneTalkback.d.ts.map +1 -1
  118. package/dist/homekit/hksv/LoxoneTalkback.js +36 -345
  119. package/dist/homekit/hksv/LoxoneTalkback.js.map +1 -1
  120. package/dist/homekit/hksv/Prebuffer.d.ts +2 -4
  121. package/dist/homekit/hksv/Prebuffer.d.ts.map +1 -1
  122. package/dist/homekit/hksv/Prebuffer.js +26 -4
  123. package/dist/homekit/hksv/Prebuffer.js.map +1 -1
  124. package/dist/homekit/hksv/RecordingDelegate.d.ts +8 -6
  125. package/dist/homekit/hksv/RecordingDelegate.d.ts.map +1 -1
  126. package/dist/homekit/hksv/RecordingDelegate.js +126 -19
  127. package/dist/homekit/hksv/RecordingDelegate.js.map +1 -1
  128. package/dist/homekit/hksv/StreamingDelegate.d.ts +3 -4
  129. package/dist/homekit/hksv/StreamingDelegate.d.ts.map +1 -1
  130. package/dist/homekit/hksv/StreamingDelegate.js +70 -78
  131. package/dist/homekit/hksv/StreamingDelegate.js.map +1 -1
  132. package/dist/homekit/hksv/ffmpegArgs.d.ts +3 -0
  133. package/dist/homekit/hksv/ffmpegArgs.d.ts.map +1 -0
  134. package/dist/homekit/hksv/ffmpegArgs.js +22 -0
  135. package/dist/homekit/hksv/ffmpegArgs.js.map +1 -0
  136. package/dist/homekit/hksv/rsa.d.ts +3 -0
  137. package/dist/homekit/hksv/rsa.d.ts.map +1 -0
  138. package/dist/homekit/hksv/rsa.js +144 -0
  139. package/dist/homekit/hksv/rsa.js.map +1 -0
  140. package/dist/homekit/hksv/sdp.d.ts +12 -0
  141. package/dist/homekit/hksv/sdp.d.ts.map +1 -0
  142. package/dist/homekit/hksv/sdp.js +167 -0
  143. package/dist/homekit/hksv/sdp.js.map +1 -0
  144. package/dist/homekit/services/Camera.d.ts +0 -2
  145. package/dist/homekit/services/Camera.d.ts.map +1 -1
  146. package/dist/homekit/services/Camera.js +1 -2
  147. package/dist/homekit/services/Camera.js.map +1 -1
  148. package/dist/homekit/services/CameraMotionSensor.d.ts +4 -2
  149. package/dist/homekit/services/CameraMotionSensor.d.ts.map +1 -1
  150. package/dist/homekit/services/CameraMotionSensor.js +8 -12
  151. package/dist/homekit/services/CameraMotionSensor.js.map +1 -1
  152. package/dist/homekit/services/Doorbell.d.ts +8 -12
  153. package/dist/homekit/services/Doorbell.d.ts.map +1 -1
  154. package/dist/homekit/services/Doorbell.js +13 -27
  155. package/dist/homekit/services/Doorbell.js.map +1 -1
  156. package/dist/index.d.ts.map +1 -1
  157. package/homebridge-ui/public/index.html +898 -0
  158. package/homebridge-ui/server.js +132 -0
  159. package/package.json +12 -15
  160. package/test/binding.test.js +661 -0
  161. package/test/customUi.test.js +25 -0
  162. package/test/support.test.js +137 -0
  163. package/dist/LoxoneAccessory.d.ts +0 -29
  164. package/dist/LoxoneAccessory.d.ts.map +0 -1
  165. package/dist/LoxoneAccessory.js +0 -87
  166. package/dist/LoxoneAccessory.js.map +0 -1
  167. package/dist/homekit/services/BaseService.d.ts +0 -18
  168. package/dist/homekit/services/BaseService.d.ts.map +0 -1
  169. package/dist/homekit/services/BaseService.js +0 -28
  170. package/dist/homekit/services/BaseService.js.map +0 -1
  171. package/dist/homekit/services/ColorLightBulb.d.ts +0 -28
  172. package/dist/homekit/services/ColorLightBulb.d.ts.map +0 -1
  173. package/dist/homekit/services/ColorLightBulb.js +0 -194
  174. package/dist/homekit/services/ColorLightBulb.js.map +0 -1
  175. package/dist/homekit/services/ContactSensor.d.ts +0 -14
  176. package/dist/homekit/services/ContactSensor.d.ts.map +0 -1
  177. package/dist/homekit/services/ContactSensor.js +0 -38
  178. package/dist/homekit/services/ContactSensor.js.map +0 -1
  179. package/dist/homekit/services/Fanv2.d.ts +0 -16
  180. package/dist/homekit/services/Fanv2.d.ts.map +0 -1
  181. package/dist/homekit/services/Fanv2.js +0 -49
  182. package/dist/homekit/services/Fanv2.js.map +0 -1
  183. package/dist/homekit/services/GarageDoorOpener.d.ts +0 -20
  184. package/dist/homekit/services/GarageDoorOpener.d.ts.map +0 -1
  185. package/dist/homekit/services/GarageDoorOpener.js +0 -69
  186. package/dist/homekit/services/GarageDoorOpener.js.map +0 -1
  187. package/dist/homekit/services/HumiditySensor.d.ts +0 -12
  188. package/dist/homekit/services/HumiditySensor.d.ts.map +0 -1
  189. package/dist/homekit/services/HumiditySensor.js +0 -32
  190. package/dist/homekit/services/HumiditySensor.js.map +0 -1
  191. package/dist/homekit/services/IrrigationSystem.d.ts +0 -14
  192. package/dist/homekit/services/IrrigationSystem.d.ts.map +0 -1
  193. package/dist/homekit/services/IrrigationSystem.js +0 -71
  194. package/dist/homekit/services/IrrigationSystem.js.map +0 -1
  195. package/dist/homekit/services/LeakSensor.d.ts +0 -12
  196. package/dist/homekit/services/LeakSensor.d.ts.map +0 -1
  197. package/dist/homekit/services/LeakSensor.js +0 -30
  198. package/dist/homekit/services/LeakSensor.js.map +0 -1
  199. package/dist/homekit/services/LightBulb.d.ts +0 -15
  200. package/dist/homekit/services/LightBulb.d.ts.map +0 -1
  201. package/dist/homekit/services/LightBulb.js +0 -33
  202. package/dist/homekit/services/LightBulb.js.map +0 -1
  203. package/dist/homekit/services/LightSensor.d.ts +0 -12
  204. package/dist/homekit/services/LightSensor.d.ts.map +0 -1
  205. package/dist/homekit/services/LightSensor.js +0 -32
  206. package/dist/homekit/services/LightSensor.js.map +0 -1
  207. package/dist/homekit/services/LockMechanism.d.ts +0 -15
  208. package/dist/homekit/services/LockMechanism.d.ts.map +0 -1
  209. package/dist/homekit/services/LockMechanism.js +0 -58
  210. package/dist/homekit/services/LockMechanism.js.map +0 -1
  211. package/dist/homekit/services/MotionSensor.d.ts +0 -15
  212. package/dist/homekit/services/MotionSensor.d.ts.map +0 -1
  213. package/dist/homekit/services/MotionSensor.js +0 -34
  214. package/dist/homekit/services/MotionSensor.js.map +0 -1
  215. package/dist/homekit/services/OccupancySensor.d.ts +0 -12
  216. package/dist/homekit/services/OccupancySensor.d.ts.map +0 -1
  217. package/dist/homekit/services/OccupancySensor.js +0 -32
  218. package/dist/homekit/services/OccupancySensor.js.map +0 -1
  219. package/dist/homekit/services/Outlet.d.ts +0 -5
  220. package/dist/homekit/services/Outlet.d.ts.map +0 -1
  221. package/dist/homekit/services/Outlet.js +0 -11
  222. package/dist/homekit/services/Outlet.js.map +0 -1
  223. package/dist/homekit/services/SecuritySystem.d.ts +0 -20
  224. package/dist/homekit/services/SecuritySystem.d.ts.map +0 -1
  225. package/dist/homekit/services/SecuritySystem.js +0 -83
  226. package/dist/homekit/services/SecuritySystem.js.map +0 -1
  227. package/dist/homekit/services/SmokeSensor.d.ts +0 -12
  228. package/dist/homekit/services/SmokeSensor.d.ts.map +0 -1
  229. package/dist/homekit/services/SmokeSensor.js +0 -30
  230. package/dist/homekit/services/SmokeSensor.js.map +0 -1
  231. package/dist/homekit/services/Switch.d.ts +0 -15
  232. package/dist/homekit/services/Switch.d.ts.map +0 -1
  233. package/dist/homekit/services/Switch.js +0 -54
  234. package/dist/homekit/services/Switch.js.map +0 -1
  235. package/dist/homekit/services/TemperatureSensor.d.ts +0 -12
  236. package/dist/homekit/services/TemperatureSensor.d.ts.map +0 -1
  237. package/dist/homekit/services/TemperatureSensor.js +0 -32
  238. package/dist/homekit/services/TemperatureSensor.js.map +0 -1
  239. package/dist/homekit/services/Thermostat.d.ts +0 -25
  240. package/dist/homekit/services/Thermostat.d.ts.map +0 -1
  241. package/dist/homekit/services/Thermostat.js +0 -104
  242. package/dist/homekit/services/Thermostat.js.map +0 -1
  243. package/dist/homekit/services/Valve.d.ts +0 -27
  244. package/dist/homekit/services/Valve.d.ts.map +0 -1
  245. package/dist/homekit/services/Valve.js +0 -114
  246. package/dist/homekit/services/Valve.js.map +0 -1
  247. package/dist/homekit/services/Window.d.ts +0 -18
  248. package/dist/homekit/services/Window.d.ts.map +0 -1
  249. package/dist/homekit/services/Window.js +0 -79
  250. package/dist/homekit/services/Window.js.map +0 -1
  251. package/dist/homekit/services/WindowCovering.d.ts +0 -25
  252. package/dist/homekit/services/WindowCovering.d.ts.map +0 -1
  253. package/dist/homekit/services/WindowCovering.js +0 -102
  254. package/dist/homekit/services/WindowCovering.js.map +0 -1
  255. package/dist/loxone/LoxoneHandler.d.ts +0 -30
  256. package/dist/loxone/LoxoneHandler.d.ts.map +0 -1
  257. package/dist/loxone/LoxoneHandler.js +0 -217
  258. package/dist/loxone/LoxoneHandler.js.map +0 -1
  259. package/dist/loxone/items/Alarm.d.ts +0 -5
  260. package/dist/loxone/items/Alarm.d.ts.map +0 -1
  261. package/dist/loxone/items/Alarm.js +0 -17
  262. package/dist/loxone/items/Alarm.js.map +0 -1
  263. package/dist/loxone/items/ColorPickerV2.d.ts +0 -5
  264. package/dist/loxone/items/ColorPickerV2.d.ts.map +0 -1
  265. package/dist/loxone/items/ColorPickerV2.js +0 -15
  266. package/dist/loxone/items/ColorPickerV2.js.map +0 -1
  267. package/dist/loxone/items/Contact.d.ts +0 -5
  268. package/dist/loxone/items/Contact.d.ts.map +0 -1
  269. package/dist/loxone/items/Contact.js +0 -15
  270. package/dist/loxone/items/Contact.js.map +0 -1
  271. package/dist/loxone/items/Dimmer.d.ts +0 -5
  272. package/dist/loxone/items/Dimmer.d.ts.map +0 -1
  273. package/dist/loxone/items/Dimmer.js +0 -15
  274. package/dist/loxone/items/Dimmer.js.map +0 -1
  275. package/dist/loxone/items/EIBDimmer.d.ts +0 -4
  276. package/dist/loxone/items/EIBDimmer.d.ts.map +0 -1
  277. package/dist/loxone/items/EIBDimmer.js +0 -8
  278. package/dist/loxone/items/EIBDimmer.js.map +0 -1
  279. package/dist/loxone/items/Gate.d.ts +0 -5
  280. package/dist/loxone/items/Gate.d.ts.map +0 -1
  281. package/dist/loxone/items/Gate.js +0 -16
  282. package/dist/loxone/items/Gate.js.map +0 -1
  283. package/dist/loxone/items/IRoomControllerV2.d.ts +0 -6
  284. package/dist/loxone/items/IRoomControllerV2.d.ts.map +0 -1
  285. package/dist/loxone/items/IRoomControllerV2.js +0 -21
  286. package/dist/loxone/items/IRoomControllerV2.js.map +0 -1
  287. package/dist/loxone/items/InfoOnlyAnalog.d.ts +0 -8
  288. package/dist/loxone/items/InfoOnlyAnalog.d.ts.map +0 -1
  289. package/dist/loxone/items/InfoOnlyAnalog.js +0 -58
  290. package/dist/loxone/items/InfoOnlyAnalog.js.map +0 -1
  291. package/dist/loxone/items/InfoOnlyDigital.d.ts +0 -10
  292. package/dist/loxone/items/InfoOnlyDigital.d.ts.map +0 -1
  293. package/dist/loxone/items/InfoOnlyDigital.js +0 -41
  294. package/dist/loxone/items/InfoOnlyDigital.js.map +0 -1
  295. package/dist/loxone/items/Intercom.d.ts +0 -13
  296. package/dist/loxone/items/Intercom.d.ts.map +0 -1
  297. package/dist/loxone/items/Intercom.js +0 -163
  298. package/dist/loxone/items/Intercom.js.map +0 -1
  299. package/dist/loxone/items/IntercomV2.d.ts +0 -10
  300. package/dist/loxone/items/IntercomV2.d.ts.map +0 -1
  301. package/dist/loxone/items/IntercomV2.js +0 -126
  302. package/dist/loxone/items/IntercomV2.js.map +0 -1
  303. package/dist/loxone/items/Irrigation.d.ts +0 -5
  304. package/dist/loxone/items/Irrigation.d.ts.map +0 -1
  305. package/dist/loxone/items/Irrigation.js +0 -17
  306. package/dist/loxone/items/Irrigation.js.map +0 -1
  307. package/dist/loxone/items/Jalousie.d.ts +0 -5
  308. package/dist/loxone/items/Jalousie.d.ts.map +0 -1
  309. package/dist/loxone/items/Jalousie.js +0 -18
  310. package/dist/loxone/items/Jalousie.js.map +0 -1
  311. package/dist/loxone/items/LightControllerV2.d.ts +0 -10
  312. package/dist/loxone/items/LightControllerV2.d.ts.map +0 -1
  313. package/dist/loxone/items/LightControllerV2.js +0 -95
  314. package/dist/loxone/items/LightControllerV2.js.map +0 -1
  315. package/dist/loxone/items/NfcCodeTouch.d.ts +0 -6
  316. package/dist/loxone/items/NfcCodeTouch.d.ts.map +0 -1
  317. package/dist/loxone/items/NfcCodeTouch.js +0 -23
  318. package/dist/loxone/items/NfcCodeTouch.js.map +0 -1
  319. package/dist/loxone/items/PresenceDetector.d.ts +0 -6
  320. package/dist/loxone/items/PresenceDetector.d.ts.map +0 -1
  321. package/dist/loxone/items/PresenceDetector.js +0 -19
  322. package/dist/loxone/items/PresenceDetector.js.map +0 -1
  323. package/dist/loxone/items/Pushbutton.d.ts +0 -4
  324. package/dist/loxone/items/Pushbutton.d.ts.map +0 -1
  325. package/dist/loxone/items/Pushbutton.js +0 -8
  326. package/dist/loxone/items/Pushbutton.js.map +0 -1
  327. package/dist/loxone/items/Radio.d.ts +0 -13
  328. package/dist/loxone/items/Radio.d.ts.map +0 -1
  329. package/dist/loxone/items/Radio.js +0 -56
  330. package/dist/loxone/items/Radio.js.map +0 -1
  331. package/dist/loxone/items/Switch.d.ts +0 -6
  332. package/dist/loxone/items/Switch.d.ts.map +0 -1
  333. package/dist/loxone/items/Switch.js +0 -48
  334. package/dist/loxone/items/Switch.js.map +0 -1
  335. package/dist/loxone/items/UpDownDigital.d.ts +0 -11
  336. package/dist/loxone/items/UpDownDigital.d.ts.map +0 -1
  337. package/dist/loxone/items/UpDownDigital.js +0 -19
  338. package/dist/loxone/items/UpDownDigital.js.map +0 -1
  339. package/dist/loxone/items/Ventilation.d.ts +0 -5
  340. package/dist/loxone/items/Ventilation.d.ts.map +0 -1
  341. package/dist/loxone/items/Ventilation.js +0 -16
  342. package/dist/loxone/items/Ventilation.js.map +0 -1
  343. package/dist/loxone/items/Window.d.ts +0 -5
  344. package/dist/loxone/items/Window.d.ts.map +0 -1
  345. package/dist/loxone/items/Window.js +0 -17
  346. package/dist/loxone/items/Window.js.map +0 -1
  347. package/dist/loxone/items/WindowMonitor.d.ts +0 -6
  348. package/dist/loxone/items/WindowMonitor.d.ts.map +0 -1
  349. package/dist/loxone/items/WindowMonitor.js +0 -25
  350. package/dist/loxone/items/WindowMonitor.js.map +0 -1
@@ -0,0 +1,60 @@
1
+ # Architecture
2
+
3
+ This plugin has one product boundary: Loxone <-> HomeKit. The architecture is optimized for that bridge and should stay boring, explicit, and testable.
4
+
5
+ ## Layers
6
+
7
+ | Layer | Module(s) | Owns | Must not own |
8
+ | --- | --- | --- | --- |
9
+ | Platform | `LoxonePlatform`, `index.ts` | Homebridge lifecycle, the accessory cache list, the name registry, exposing HAP `Service`/`Characteristic`. | Loxone protocol details or item semantics. |
10
+ | Loxone transport | [`loxone-ts-client`](https://www.npmjs.com/package/loxone-ts-client) (external dependency) | All Miniserver communication: websocket, token auth, Structure File parsing, encrypted commands, state subscriptions, and the typed room/control model. | HomeKit concepts. |
11
+ | Binding coordinator | `LoxoneBindingCoordinator` | Connection orchestration, per-room control discovery, accessory planning, reconciliation (create/update/restore/remove), routing accessories to the main or a per-room bridge, room/type filtering, central-room handling. | HAP characteristic specifics — it delegates those. |
12
+ | Control routing | `ControlBinders` (`CONTROL_BINDERS`, `COMPOSITE_BINDERS`) | Mapping each Loxone control `type` to a `PlannedAccessory` (which HomeKit service(s) and which bindings). | Talking to the Miniserver. |
13
+ | Binding tables | `binding/tables/*Bindings.ts` | Declarative characteristic ⇄ state/command bindings per control family (lighting, covering, fan, sensor, thermostat, alarm, radio, switch, pushbutton, mood, contact, smoke). | Imperative service construction. |
14
+ | Binding engine | `BindingEngine.bindCharacteristics`, `CharacteristicBinding`, `ServiceResolver` | Applying a binding: wiring a HAP characteristic to a control's Loxone state (`handle.onState`) and command (`handle.send`). | Inventing command strings or reaching past the typed handle. |
15
+ | Complex binders | `binding/binders/*` | Imperative wiring for controls that are not a simple table: `intercom` (+ HKSV), `nfcCodeTouch`, `irrigation`, `color`. | Generic command/state rules where a table suffices. |
16
+ | Per-room publishing | `RoomBridgePublisher` | One HAP `Bridge` per room, deterministic pairing identity, and the manifest the config UI reads. | Loxone semantics. |
17
+ | Naming | `AccessoryNameRegistry` | Clean, unique, HAP-safe, UUID-stable accessory names. | — |
18
+ | Media | `homekit/hksv/*`, `homekit/services/*` | Camera streaming, HKSV recording + prebuffer, doorbell, motion, WebRTC talkback. | Generic command/state routing. |
19
+
20
+ ## Command And State Rules
21
+
22
+ - A control's HomeKit shape, its Loxone state UUIDs, and its commands live in the declarative binding tables (or in a binder, for complex controls).
23
+ - Bindings reach the Miniserver only through the typed `ControlHandle` from `loxone-ts-client`: read state via `handle.state(...)` / `handle.onState(...)`, send via `handle.send(...)`.
24
+ - The plugin has no hand-rolled command bus or state router; the library's typed handles own subscription and dispatch. Do not re-implement that layer.
25
+ - Binders and tables must not reach into the raw `loxone-ts-client` client/transport directly — go through the control handle.
26
+ - HomeKit service code must not talk to the transport directly.
27
+
28
+ ## Transport Boundary
29
+
30
+ `loxone-ts-client` is a separately published, independently versioned npm package. It owns every Loxone protocol concern and exposes typed control handles, a room view, and Miniserver discovery. This plugin depends on it and adds only the HomeKit binding layer, which keeps the boundary clean:
31
+
32
+ - tests can run without a Miniserver;
33
+ - the binding coordinator stays independent of concrete protocol event shapes;
34
+ - transport behavior can evolve in `loxone-ts-client` without leaking into HomeKit mapping code.
35
+
36
+ ## Intercom & Media Boundary
37
+
38
+ Intercom and IntercomV2 are intentionally a separate bounded context. They include HKSV, WebRTC signaling, prebuffering, talkback, camera streams, and Miniserver token use — flows that are not the same as normal command/state accessories. They live in `homekit/hksv/*` and `homekit/services/*`, wired up by `binding/binders/intercomBinder.ts`.
39
+
40
+ The command/state architecture still plans the regular Doorbell/Camera/MotionSensor accessory where useful, but the media and signaling code stays isolated from the generic binding tables and the `ControlHandle` command/state rules.
41
+
42
+ ## Release Rules
43
+
44
+ Versioning is owned by semantic-release. Use conventional commits:
45
+
46
+ | Commit | Release |
47
+ | --- | --- |
48
+ | `fix: ...` | patch |
49
+ | `feat: ...` | minor |
50
+ | `refactor!: ...` plus `BREAKING CHANGE: ...` footer | major |
51
+
52
+ Example of a breaking footer:
53
+
54
+ ```text
55
+ refactor!: rebuild on a declarative binding engine over loxone-ts-client
56
+
57
+ BREAKING CHANGE: requires Node.js 22 and replaces lxcommunicator with loxone-ts-client.
58
+ ```
59
+
60
+ The `beta` branch publishes prereleases. The `master` branch publishes stable releases.
package/README.md CHANGED
@@ -8,8 +8,33 @@
8
8
 
9
9
  Homebridge Dynamic Platform Plugin which exposes a Loxone System to Homekit.
10
10
 
11
- The plugin uses Loxone [Lxcommunicator](https://github.com/Loxone/lxcommunicator) to setup a websocket connection to a Loxone miniserver.
12
- It retrieves the loxone [Structure-File](https://www.loxone.com/wp-content/uploads/datasheets/StructureFile.pdf) and tries to map all items to HomeKit accessories. The websocket connection allows for realtime 2 way updates between Loxone and HomeKit.
11
+ The plugin uses [`loxone-ts-client`](https://www.npmjs.com/package/loxone-ts-client) to set up and maintain the connection to a Loxone Miniserver.
12
+ It retrieves the Loxone [Structure-File](https://www.loxone.com/wp-content/uploads/datasheets/StructureFile.pdf) and maps supported controls to HomeKit accessories. The connection allows realtime two-way updates between Loxone and HomeKit.
13
+
14
+ # Requirements
15
+
16
+ | Requirement | Version |
17
+ | --- | --- |
18
+ | Node.js | 22 or newer |
19
+ | Homebridge | 1.7.0 or newer, including Homebridge 2 beta |
20
+
21
+ # Architecture
22
+
23
+ This plugin is intentionally focused on one integration path: Loxone <-> HomeKit. The current architecture keeps that path explicit:
24
+
25
+ | Layer | Responsibility |
26
+ | --- | --- |
27
+ | Loxone communication | Connects to the Miniserver through `loxone-ts-client`, loads the Structure File, subscribes to state updates, and sends commands. |
28
+ | Control mapping | Normalizes Loxone rooms, categories, controls, states, and command bindings into plugin-owned types. |
29
+ | Accessory planning | Converts each supported Loxone control into a declarative HomeKit accessory plan. |
30
+ | HomeKit reconciliation | Creates, updates, restores, and removes Homebridge platform accessories from those plans. |
31
+ | Services | Bind HomeKit characteristics to Loxone state IDs and command IDs. |
32
+
33
+ Commands and states are kept separate on purpose. Item implementations describe what HomeKit should expose, which Loxone state UUIDs feed it, and which Loxone command should be executed for each HomeKit action. Runtime code then routes state updates and command execution through shared infrastructure instead of letting each item talk to the Miniserver directly.
34
+
35
+ The Loxone transport is also explicit. All Miniserver communication (websocket, token authentication, Structure File parsing, encrypted commands, state subscriptions) lives in the standalone [`loxone-ts-client`](https://www.npmjs.com/package/loxone-ts-client) package. This plugin depends on it and adds only the HomeKit binding layer on top, so the ownership boundary between "talking to Loxone" and "exposing it to HomeKit" stays clear.
36
+
37
+ The detailed architecture rules and release commit conventions are documented in [ARCHITECTURE.md](ARCHITECTURE.md).
13
38
 
14
39
  # Mapped Items
15
40
  The following list displays all supported itemtypes supported by this plugin.
@@ -46,49 +71,71 @@ For the plugin to recognize the items, the item needs to be visible in the user
46
71
  <img width="408" alt="useinuserinterface" src="https://github.com/rudyberends/homebridge-loxone-proxy/assets/75836217/b422015b-4a5d-411e-b98c-42ef86cf8d58">
47
72
 
48
73
  # Configuration
49
- Configuration of the plugin can be done using the Homebridge UI without having to manually edit the Homebridge config.json file.
50
74
 
51
- ## Required Settings
52
- At a minimum, the plugin requires these settings to connect to the miniserver.
75
+ The plugin ships a **custom configuration UI** for the Homebridge UI — there is no need to edit `config.json` by hand. Open the plugin settings in Homebridge and you get a tabbed interface:
76
+
77
+ - **Connection** — Miniserver host, port, credentials and TLS. The plugin can auto-discover Miniservers on your network, so you can pick one instead of typing the IP.
78
+ - **Room filter** — per-room control over what is exposed and how (see [Per-room bridges](#per-room-bridges)).
79
+ - **Control types** — exclude whole item types from being mapped.
80
+ - **Options** — general behaviour (mood switches, ventilation override, …).
81
+ - **Mappings** — aliases for items that need manual mapping.
82
+ - **HomeKit Secure Video** — enable HKSV and two-way audio.
83
+
84
+ ## Connection
85
+ At a minimum the plugin needs these to connect to the Miniserver:
53
86
 
54
87
  | Parameter | Note |
55
88
  | --- | --- |
56
- | `host` | IP of your loxone miniserver |
57
- | `port` | optional, port of your miniserver (default: 80) |
58
- | `username` | loxone username |
59
- | `password` | loxone password |
60
- | `TLS` | use a secure connection |
89
+ | `host` | IP/hostname of your Loxone Miniserver (without `http://`) |
90
+ | `port` | Miniserver port (default: 80) |
91
+ | `username` | Loxone username |
92
+ | `password` | Loxone password |
93
+ | `TLS` | Use a secure (TLS) connection |
94
+
95
+ If you create a dedicated Loxone user for the plugin, you can filter items by only granting that user rights to the items you want to expose to HomeKit.
61
96
 
62
- If you create a dedicated user for the plugin, you can filter items by only assigning rights to items you want to expose to HomeBridge.
97
+ ## Control types (exclusions)
98
+ To stop whole item types from being mapped, exclude them on the **Control types** tab (stored as the `Exclusions` list). Matching is case-sensitive; the item type names are listed in the [Mapped Items](#mapped-items) table.
63
99
 
64
- ## Filters
65
- Filters allow you to select what to expose to HomeKit.
100
+ ## Room filter & per-room bridges
101
+ The **Room filter** tab lists every Loxone room and lets you choose, per room:
66
102
 
67
- ### Moodswitches
68
- When enabled, all LightControllerV2 moods are mapped to a homekit switch. All Switches from the same LightController will be grouped together. In homeKit this works as a radio switch, so only one switch (mood) can be active at the same time. Mixing moods is not possible.
103
+ - **Expose** — whether the room's controls are mapped to HomeKit at all.
104
+ - **Own bridge** — publish that room as its own HomeKit bridge (see below).
69
105
 
70
- ### Exclusions
71
- To exclude Itemtypes from being mapped, add them to the Exclusions section in the config as a comma-separated list. Matching is case-sensitive — the case of the item type names is considered when comparing entries.
106
+ Central functions (Loxone's *central* room type, e.g. "Woning"/"Home") are always kept on the main bridge — they aren't a physical room. The legacy `roomfilter` inclusion/exclusion list is still honored for older configs.
72
107
 
73
- <img width="748" alt="filters" src="https://github.com/rudyberends/homebridge-loxone-proxy/assets/75836217/c61daa1b-83aa-467b-a258-8b648a6f575e">
108
+ ### Per-room bridges
109
+ HomeKit's biggest quirk with a single bridge is that **all** of that bridge's accessories land in whichever HomeKit room you assign the bridge to — Loxone's room layout is lost. To fix that, you can give a room its **own HomeKit bridge** straight from this plugin (no separate child-bridge process is needed). Each room bridge:
74
110
 
75
- The itemtype name can be found in the "mapped items" table.
111
+ - Is named after the room (e.g. "Woonkamer").
112
+ - Has its own pairing code, shown inline in the Room filter tab.
113
+ - Keeps its pairing across restarts (its identity is derived from the room name).
76
114
 
77
- ### Room Filter
78
- The roomfilter List can fuction as a filter for certain rooms. Add room names in lowercase (matching is performed against lowercase names). Use a comma-seperated list for multiple rooms. Depending on the roomfilter Type, this serves as an inclusion, or exclusion list.
115
+ **Pairing workflow** — this is what makes the room assignment stick: in the Home app, first open the **target room**, then tap **Add Accessory → More options…**, pick the room's bridge and enter the code shown in the UI. HomeKit drops the freshly-paired accessories into the room you had open.
79
116
 
80
- ## Manual mapping
81
- Some items cannot be mapped automatically and require a naming convention to be recognized. For example, giving all Brightness sensors the convention "MH0'XX'" in Loxone Config
117
+ ## Mood switches
118
+ Set on the Options tab. **Grouped** (default) puts all moods of a LightControllerV2 as switches in one Moods accessory per light controller. **Separate** gives every mood its own Switch accessory, so each mood can be placed on its own (e.g. in Control Center). **Disabled** exposes no moods. In HomeKit this behaves like a radio group: only one mood can be active at a time, and mixing moods is not possible.
119
+
120
+ ## Manual mapping (aliases)
121
+ Some items cannot be classified automatically and need a naming convention. For example, give all Brightness sensors the convention `MH0'XX'` in Loxone Config
82
122
 
83
123
  <img width="408" alt="mapping2" src="https://github.com/rudyberends/homebridge-loxone-proxy/assets/75836217/4fd61eaf-4080-41aa-bdc0-363b5ca0fcb1">
84
124
 
85
- and then setting the alias "MH0" in the plugin will result in all InfoOnlyAnalog items with "MH0" in the name being recognized as LightSensors.
125
+ and set the alias `MH0` on the **Mappings** tab; every InfoOnlyAnalog item whose name starts with `MH0` is then exposed as a LightSensor.
126
+
127
+ <img width="748" alt="alias example" src="https://github.com/rudyberends/homebridge-loxone-proxy/assets/75836217/4ed2ce2b-4003-41bb-930c-f9eee7df517a">
128
+
129
+ Items that require an alias are listed in the [Mapped Items](#mapped-items) table.
130
+
131
+ **NOTE:** When the "description" field is set in Loxone Config, that field is exposed to the plugin instead of the "name" field. For the mapping to work, the description field must be empty or contain the correct convention.
86
132
 
87
- <img width="748" alt="filters" src="https://github.com/rudyberends/homebridge-loxone-proxy/assets/75836217/4ed2ce2b-4003-41bb-930c-f9eee7df517a">
133
+ # HomeKit Secure Video & Intercom
134
+ Loxone `Intercom` and `IntercomV2` controls are exposed as a Doorbell + Camera (and, for IntercomV2, a motion sensor). Enable **HomeKit Secure Video** on the HKSV tab (`enableHKSV`) to add motion/doorbell-triggered recording with a rolling prebuffer, so the seconds *before* an event are captured too. Recordings follow the resolution, frame rate and bitrate HomeKit negotiates.
88
135
 
89
- Items that require an alias are listed in the "mapped items" table.
136
+ **Intercom V2 credentials.** The plugin opens the IntercomV2 video stream with the Miniserver `username`/`password` from the plugin config. That account needs enough rights in Loxone Config to access the intercom; otherwise the stream and snapshots fail with `401 Unauthorized`.
90
137
 
91
- **NOTE:** When the "description" field is set in Loxone Config, then this field is exposed to the plugin instead of the "name" field. For the mapping to work, the description field needst to be empty, or it needs to contain the correct convention.
138
+ **Two-way audio (experimental).** Enable *Two-Way Audio* under Advanced. Loxone Intercom V2 uses automatic WebRTC talkback, so no extra configuration is needed. For non-Loxone cameras you can supply FFmpeg return-audio output args (`TwoWayAudioOutputArgs`) using the `{camera_host}`, `{stream_url}`, `{audio_host}`, `{audio_user}` and `{audio_pass}` placeholders.
92
139
 
93
140
  # Limitations
94
- Apple does not allow more than 150 items per bridge. This plugin will not map more than 150 items, but if you have other plugins activated, you might still hit this limit. To prevent this you can run this plugin as a child bridge. Another way to solve it is to use a dedicated loxone user for the plugin and only expose the items that you want to use in HomeKit.
141
+ Apple does not allow more than 150 accessories per bridge. This plugin will not map more than 150 items on a single bridge, but if you have other plugins active you might still hit the limit. Ways to stay under it: split rooms onto their [own bridges](#per-room-bridges), run this plugin as a child bridge, or use a dedicated Loxone user and only expose the items you actually want in HomeKit.
@@ -2,6 +2,7 @@
2
2
  "pluginAlias": "LoxonePlatform",
3
3
  "pluginType": "platform",
4
4
  "singular": true,
5
+ "customUi": true,
5
6
  "headerDisplay": "Homebridge Proxy which exposes a Loxone System to Homekit",
6
7
  "footerDisplay": "For setup information, bug reports and feature requests please visit the [Plugin Homepage](https://github.com/rudyberends/homebridge-loxone-proxy).",
7
8
  "schema": {
@@ -37,11 +38,14 @@
37
38
  "title": "Options",
38
39
  "properties": {
39
40
  "MoodSwitches": {
41
+ "title": "Mood switches",
42
+ "description": "How LightControllerV2 moods appear in HomeKit: grouped as switches in one Moods accessory per light controller, or as a separate accessory per mood.",
40
43
  "type": "string",
41
44
  "default": "enabled",
42
- "enum": [
43
- "enabled",
44
- "disabled"
45
+ "oneOf": [
46
+ { "title": "Grouped (one Moods accessory per light controller)", "enum": ["enabled"] },
47
+ { "title": "Separate accessory per mood", "enum": ["separate"] },
48
+ { "title": "Disabled", "enum": ["disabled"] }
45
49
  ]
46
50
  }
47
51
  }
@@ -51,6 +55,7 @@
51
55
  "title": "Advanced",
52
56
  "properties": {
53
57
  "NfcCodeTouchMapping": {
58
+ "title": "NFC Code Touch mapping",
54
59
  "type": "string",
55
60
  "default": "DoorBell",
56
61
  "enum": [
@@ -69,6 +74,12 @@
69
74
  "description": "Adjust motion detection baseline when cameras prepend variable JPEG metadata.",
70
75
  "default": 623
71
76
  },
77
+ "VentilationManualSeconds": {
78
+ "type": "integer",
79
+ "title": "Ventilation manual-override duration (seconds)",
80
+ "description": "How long a manual fan speed set from HomeKit runs before the Loxone Ventilation block returns to automatic.",
81
+ "default": 3600
82
+ },
72
83
  "EnableTwoWayAudio": {
73
84
  "type": "boolean",
74
85
  "title": "Enable Two-Way Audio (experimental)",
@@ -86,6 +97,11 @@
86
97
  "type": "string",
87
98
  "title": "Excluded ItemTypes"
88
99
  },
100
+ "rooms": {
101
+ "type": "object",
102
+ "title": "Per-room settings",
103
+ "description": "Managed by the Room filter tab in the custom UI: which rooms are exposed to HomeKit and which get their own bridge."
104
+ },
89
105
  "roomfilter": {
90
106
  "type": "object",
91
107
  "title": "Room Filter",
@@ -169,49 +185,18 @@
169
185
  "layout": [
170
186
  {
171
187
  "type": "fieldset",
172
- "title": "Required Settings",
173
- "items": [
174
- {
175
- "type": "flex",
176
- "flex-flow": "row wrap",
177
- "items": ["host", "port"]
178
- },
179
- {
180
- "type": "flex",
181
- "flex-flow": "row wrap",
182
- "items": [
183
- "username",
184
- {
185
- "key": "password",
186
- "type": "password"
187
- }
188
- ]
189
- },
190
- {
191
- "type": "flex",
192
- "flex-flow": "row wrap",
193
- "items": ["TLS"]
194
- }
195
- ]
196
- },
197
- {
198
- "type": "fieldset",
199
- "title": "Filters",
200
- "description": "Select what to expose to HomeKit.",
201
- "expandable": true,
202
- "expanded": false,
188
+ "title": "Options",
189
+ "description": "General plugin behaviour.",
203
190
  "items": [
204
191
  "options.MoodSwitches",
205
- "Exclusions",
206
- "roomfilter.type",
207
- "roomfilter.list"
192
+ "Advanced.VentilationManualSeconds"
208
193
  ]
209
194
  },
210
195
  {
211
196
  "type": "fieldset",
212
197
  "expandable": true,
213
198
  "title": "SwitchItem Mappings",
214
- "description": "Map Switch items using an Alias",
199
+ "description": "Optional. Switches are already classified from their Loxone category/icon (e.g. lights → Lightbulb). Use an alias only to override that — typically to expose a generic switch as an Outlet or Lock. Matches on the item name.",
215
200
  "items": [
216
201
  "switchAlias.Outlet",
217
202
  "switchAlias.Lock",
@@ -222,7 +207,7 @@
222
207
  "type": "fieldset",
223
208
  "expandable": true,
224
209
  "title": "InfoOnlyAnalog Mappings",
225
- "description": "Map InfoOnlyAnalog items using an Alias",
210
+ "description": "Rarely needed. Analog sensors are auto-classified from their unit (°C → temperature, lux → light, % → humidity). Use an alias only to force a sensor with an ambiguous unit to a specific type.",
226
211
  "items": [
227
212
  "InfoOnlyAnalogAlias.Brightness",
228
213
  "InfoOnlyAnalogAlias.Humidity",
@@ -233,7 +218,7 @@
233
218
  "type": "fieldset",
234
219
  "expandable": true,
235
220
  "title": "InfoOnlyDigital Mappings",
236
- "description": "Map InfoOnlyDigital items using an Alias",
221
+ "description": "Required to expose digital sensors — they are not auto-classified, so a name alias is the only way to surface them as Motion, Smoke or Leak.",
237
222
  "items": [
238
223
  "InfoOnlyDigitalAlias.Motion",
239
224
  "InfoOnlyDigitalAlias.Smoke",
@@ -245,22 +230,22 @@
245
230
  "type": "fieldset",
246
231
  "expandable": true,
247
232
  "title": "HomeKit Secure Video (HKSV)",
248
- "description": "Enable or disable HKSV recording features. Requires iCloud+ and a compatible HomeKit Hub.",
233
+ "description": "HomeKit Secure Video, camera motion detection and two-way audio. HKSV recording requires iCloud+ and a compatible HomeKit Hub.",
249
234
  "items": [
250
235
  "enableHKSV",
251
- "Advanced.MotionTriggersDoorbell"
236
+ "Advanced.MotionTriggersDoorbell",
237
+ "Advanced.JpegHeaderSize",
238
+ "Advanced.EnableTwoWayAudio",
239
+ "Advanced.TwoWayAudioOutputArgs"
252
240
  ]
253
241
  },
254
242
  {
255
243
  "type": "fieldset",
256
244
  "expandable": true,
257
- "title": "Advanced",
258
- "description": "",
245
+ "title": "NFC Code Touch",
246
+ "description": "How an NFC Code Touch appears in HomeKit — as a doorbell or a motion sensor.",
259
247
  "items": [
260
- "Advanced.NfcCodeTouchMapping",
261
- "Advanced.JpegHeaderSize",
262
- "Advanced.EnableTwoWayAudio",
263
- "Advanced.TwoWayAudioOutputArgs"
248
+ "Advanced.NfcCodeTouchMapping"
264
249
  ]
265
250
  }
266
251
  ]
@@ -0,0 +1,8 @@
1
+ export declare function sanitizeName(value: string): string;
2
+ export declare class AccessoryNameRegistry {
3
+ private readonly usedNames;
4
+ private readonly accessoryNameMap;
5
+ generate(room: string, base: string, uuid?: string, isSubItem?: boolean, prefixRoom?: boolean): string;
6
+ private clean;
7
+ }
8
+ //# sourceMappingURL=AccessoryNameRegistry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccessoryNameRegistry.d.ts","sourceRoot":"","sources":["../src/AccessoryNameRegistry.ts"],"names":[],"mappings":"AAOA,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMlD;AAOD,qBAAa,qBAAqB;IAChC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqB;IAC/C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA6B;IAE9D,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,SAAS,UAAQ,EAAE,UAAU,UAAO,GAAG,MAAM;IA6CjG,OAAO,CAAC,KAAK;CAGd"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccessoryNameRegistry = void 0;
4
+ exports.sanitizeName = sanitizeName;
5
+ function sanitizeName(value) {
6
+ return value
7
+ .replace(/\((.*?)\)/g, '$1')
8
+ .replace(/[^\p{L}\p{N}\s']/gu, '')
9
+ .replace(/\s+/g, ' ')
10
+ .trim();
11
+ }
12
+ class AccessoryNameRegistry {
13
+ constructor() {
14
+ this.usedNames = new Set();
15
+ this.accessoryNameMap = new Map();
16
+ }
17
+ generate(room, base, uuid, isSubItem = false, prefixRoom = true) {
18
+ const cleanRoom = this.clean(room || 'Unknown');
19
+ const cleanBase = this.clean(base || 'Unnamed');
20
+ if (!prefixRoom) {
21
+ const lead = cleanRoom.toLowerCase() + ' ';
22
+ return cleanBase.toLowerCase().startsWith(lead)
23
+ ? cleanBase.slice(cleanRoom.length).trim() || cleanBase
24
+ : cleanBase;
25
+ }
26
+ const alreadyPrefixed = cleanBase.toLowerCase().startsWith(cleanRoom.toLowerCase()) ||
27
+ cleanBase.toLowerCase().startsWith(cleanRoom.toLowerCase() + ' ');
28
+ const baseName = alreadyPrefixed
29
+ ? cleanBase
30
+ : `${cleanRoom} ${cleanBase}`;
31
+ if (isSubItem) {
32
+ return baseName;
33
+ }
34
+ if (uuid && this.accessoryNameMap.has(uuid)) {
35
+ return this.accessoryNameMap.get(uuid);
36
+ }
37
+ let finalName = baseName;
38
+ let counter = 1;
39
+ while (this.usedNames.has(finalName)) {
40
+ finalName = `${baseName} ${counter++}`;
41
+ }
42
+ this.usedNames.add(finalName);
43
+ if (uuid) {
44
+ this.accessoryNameMap.set(uuid, finalName);
45
+ }
46
+ return finalName;
47
+ }
48
+ clean(value) {
49
+ return sanitizeName(value);
50
+ }
51
+ }
52
+ exports.AccessoryNameRegistry = AccessoryNameRegistry;
53
+ //# sourceMappingURL=AccessoryNameRegistry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccessoryNameRegistry.js","sourceRoot":"","sources":["../src/AccessoryNameRegistry.ts"],"names":[],"mappings":";;;AAOA,oCAMC;AAND,SAAgB,YAAY,CAAC,KAAa;IACxC,OAAO,KAAK;SACT,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC;SAC3B,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC;SACjC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;SACpB,IAAI,EAAE,CAAC;AACZ,CAAC;AAOD,MAAa,qBAAqB;IAAlC;QACmB,cAAS,GAAG,IAAI,GAAG,EAAU,CAAC;QAC9B,qBAAgB,GAAG,IAAI,GAAG,EAAkB,CAAC;IAkDhE,CAAC;IAhDC,QAAQ,CAAC,IAAY,EAAE,IAAY,EAAE,IAAa,EAAE,SAAS,GAAG,KAAK,EAAE,UAAU,GAAG,IAAI;QACtF,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,SAAS,CAAC,CAAC;QAChD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,SAAS,CAAC,CAAC;QAIhD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,GAAG,SAAS,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC;YAC3C,OAAO,SAAS,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;gBAC7C,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,IAAI,SAAS;gBACvD,CAAC,CAAC,SAAS,CAAC;QAChB,CAAC;QAED,MAAM,eAAe,GACnB,SAAS,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;YAC3D,SAAS,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,CAAC;QAEpE,MAAM,QAAQ,GAAG,eAAe;YAC9B,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,GAAG,SAAS,IAAI,SAAS,EAAE,CAAC;QAEhC,IAAI,SAAS,EAAE,CAAC;YACd,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,IAAI,IAAI,IAAI,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAC5C,OAAO,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC;QAC1C,CAAC;QAED,IAAI,SAAS,GAAG,QAAQ,CAAC;QACzB,IAAI,OAAO,GAAG,CAAC,CAAC;QAEhB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;YACrC,SAAS,GAAG,GAAG,QAAQ,IAAI,OAAO,EAAE,EAAE,CAAC;QACzC,CAAC;QAED,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAE9B,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QAC7C,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAEO,KAAK,CAAC,KAAa;QACzB,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC;CACF;AApDD,sDAoDC"}
@@ -0,0 +1,18 @@
1
+ import { PlatformConfig } from 'homebridge';
2
+ export type RoomFilterType = 'inclusion' | 'exclusion';
3
+ export interface NormalizedLoxoneConfig {
4
+ excludedTypes: string[];
5
+ roomFilter: {
6
+ type: RoomFilterType;
7
+ rooms: string[];
8
+ };
9
+ }
10
+ export interface LoxoneConnectionConfig {
11
+ host?: unknown;
12
+ port?: unknown;
13
+ username?: unknown;
14
+ password?: unknown;
15
+ }
16
+ export declare function normalizeLoxoneConfig(config: PlatformConfig): NormalizedLoxoneConfig;
17
+ export declare function validateLoxoneConnectionConfig(config: LoxoneConnectionConfig): string[];
18
+ //# sourceMappingURL=LoxoneConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoxoneConfig.d.ts","sourceRoot":"","sources":["../src/LoxoneConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,WAAW,CAAC;AAEvD,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,EAAE;QACV,IAAI,EAAE,cAAc,CAAC;QACrB,KAAK,EAAE,MAAM,EAAE,CAAC;KACjB,CAAC;CACH;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,GAAG,sBAAsB,CAQpF;AAED,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,sBAAsB,GAAG,MAAM,EAAE,CAuBvF"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.normalizeLoxoneConfig = normalizeLoxoneConfig;
4
+ exports.validateLoxoneConnectionConfig = validateLoxoneConnectionConfig;
5
+ function normalizeLoxoneConfig(config) {
6
+ return {
7
+ excludedTypes: parseList(config.Exclusions),
8
+ roomFilter: {
9
+ type: config.roomfilter?.type === 'inclusion' ? 'inclusion' : 'exclusion',
10
+ rooms: parseList(config.roomfilter?.list).map(room => room.toLowerCase()),
11
+ },
12
+ };
13
+ }
14
+ function validateLoxoneConnectionConfig(config) {
15
+ const errors = [];
16
+ if (!isNonEmptyString(config.host)) {
17
+ errors.push('host is required');
18
+ }
19
+ if (!isNonEmptyString(config.username)) {
20
+ errors.push('username is required');
21
+ }
22
+ if (!isNonEmptyString(config.password)) {
23
+ errors.push('password is required');
24
+ }
25
+ if (config.port !== undefined && config.port !== null && config.port !== '') {
26
+ const port = Number(config.port);
27
+ if (!Number.isInteger(port) || port < 1 || port > 65535) {
28
+ errors.push('port must be a number between 1 and 65535');
29
+ }
30
+ }
31
+ return errors;
32
+ }
33
+ function parseList(value) {
34
+ return value?.split(',').map(item => item.trim()).filter(Boolean) ?? [];
35
+ }
36
+ function isNonEmptyString(value) {
37
+ return typeof value === 'string' && value.trim().length > 0;
38
+ }
39
+ //# sourceMappingURL=LoxoneConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoxoneConfig.js","sourceRoot":"","sources":["../src/LoxoneConfig.ts"],"names":[],"mappings":";;AAmBA,sDAQC;AAED,wEAuBC;AAjCD,SAAgB,qBAAqB,CAAC,MAAsB;IAC1D,OAAO;QACL,aAAa,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC;QAC3C,UAAU,EAAE;YACV,IAAI,EAAE,MAAM,CAAC,UAAU,EAAE,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW;YACzE,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;SAC1E;KACF,CAAC;AACJ,CAAC;AAED,SAAgB,8BAA8B,CAAC,MAA8B;IAC3E,MAAM,MAAM,GAAa,EAAE,CAAC;IAE5B,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;QACnC,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IAClC,CAAC;IAED,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;QACvC,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;IACtC,CAAC;IAED,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;QACvC,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;IACtC,CAAC;IAED,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,KAAK,IAAI,IAAI,MAAM,CAAC,IAAI,KAAK,EAAE,EAAE,CAAC;QAC5E,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,IAAI,GAAG,KAAK,EAAE,CAAC;YACxD,MAAM,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,SAAS,CAAC,KAAc;IAC/B,OAAO,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;AAC1E,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AAC9D,CAAC"}
@@ -1,26 +1,17 @@
1
- import { API, DynamicPlatformPlugin, Logger, PlatformAccessory, PlatformConfig, Service, Characteristic } from 'homebridge';
2
- import { StructureFile, Controls, MSInfo, Control } from './loxone/StructureFile';
1
+ import { API, Characteristic, DynamicPlatformPlugin, Logger, PlatformAccessory, PlatformConfig, Service } from 'homebridge';
3
2
  export declare class LoxonePlatform implements DynamicPlatformPlugin {
4
3
  readonly log: Logger;
5
4
  readonly config: PlatformConfig;
6
5
  readonly api: API;
7
- LoxoneHandler: any;
8
- AccessoryCount: number;
9
- msInfo: MSInfo;
10
- LoxoneItems: Controls;
11
6
  readonly Service: typeof Service;
12
7
  readonly Characteristic: typeof Characteristic;
13
8
  readonly accessories: PlatformAccessory[];
14
- mappedAccessories: Set<string>;
15
- private usedNames;
16
- private accessoryNameMap;
9
+ private readonly nameRegistry;
10
+ private readonly bindingCoordinator;
17
11
  constructor(log: Logger, config: PlatformConfig, api: API);
18
- LoxoneInit(): Promise<void>;
19
- waitForLoxoneConfig(): Promise<void>;
20
- parseLoxoneConfig(config: StructureFile): void;
21
- mapLoxoneItems(items: Control[]): Promise<void>;
22
- removeUnmappedAccessories(): void;
23
- configureAccessory(acc: PlatformAccessory): void;
24
- generateUniqueName(room: string, base: string, uuid?: string, isSubItem?: boolean): string;
12
+ configureAccessory(accessory: PlatformAccessory): void;
13
+ generateUniqueName(room: string, base: string, uuid?: string, isSubItem?: boolean, prefixRoom?: boolean): string;
14
+ getCommunicationToken(): string | undefined;
15
+ getTemperatureDisplayUnit(): number;
25
16
  }
26
17
  //# sourceMappingURL=LoxonePlatform.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoxonePlatform.d.ts","sourceRoot":"","sources":["../src/LoxonePlatform.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,EACH,qBAAqB,EACrB,MAAM,EACN,iBAAiB,EACjB,cAAc,EACd,OAAO,EACP,cAAc,EACf,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,aAAa,EACb,QAAQ,EACR,MAAM,EACN,OAAO,EAGR,MAAM,wBAAwB,CAAC;AAQhC,qBAAa,cAAe,YAAW,qBAAqB;aAmBxC,GAAG,EAAE,MAAM;aACX,MAAM,EAAE,cAAc;aACtB,GAAG,EAAE,GAAG;IApBnB,aAAa,MAAC;IACd,cAAc,SAAK;IACnB,MAAM,EAAE,MAAM,CAAgB;IAC9B,WAAW,EAAE,QAAQ,CAAkB;IAE9C,SAAgB,OAAO,EAAE,OAAO,OAAO,CAAwB;IAC/D,SAAgB,cAAc,EAAE,OAAO,cAAc,CAA+B;IAEpF,SAAgB,WAAW,EAAE,iBAAiB,EAAE,CAAM;IAC/C,iBAAiB,cAAqB;IAG7C,OAAO,CAAC,SAAS,CAAqB;IAGtC,OAAO,CAAC,gBAAgB,CAAkC;gBAGxC,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,GAAG;IAUpB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAejC,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IAcpC,iBAAiB,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;IAwBxC,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAyCrD,yBAAyB,IAAI,IAAI;IAcjC,kBAAkB,CAAC,GAAG,EAAE,iBAAiB,GAAG,IAAI;IAQhD,kBAAkB,CAChB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,MAAM,EACb,SAAS,UAAQ,GAChB,MAAM;CAiDV"}
1
+ {"version":3,"file":"LoxonePlatform.d.ts","sourceRoot":"","sources":["../src/LoxonePlatform.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,GAAG,EAEH,cAAc,EACd,qBAAqB,EACrB,MAAM,EACN,iBAAiB,EACjB,cAAc,EACd,OAAO,EACR,MAAM,YAAY,CAAC;AAWpB,qBAAa,cAAe,YAAW,qBAAqB;aAUxC,GAAG,EAAE,MAAM;aACX,MAAM,EAAE,cAAc;aACtB,GAAG,EAAE,GAAG;IAX1B,SAAgB,OAAO,EAAE,OAAO,OAAO,CAAwB;IAC/D,SAAgB,cAAc,EAAE,OAAO,cAAc,CAA+B;IAEpF,SAAgB,WAAW,EAAE,iBAAiB,EAAE,CAAM;IAEtD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAwB;IACrD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAA2B;gBAG5C,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,GAAG;IAgB1B,kBAAkB,CAAC,SAAS,EAAE,iBAAiB,GAAG,IAAI;IAMtD,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,SAAS,UAAQ,EAAE,UAAU,UAAO,GAAG,MAAM;IAK3G,qBAAqB,IAAI,MAAM,GAAG,SAAS;IAK3C,yBAAyB,IAAI,MAAM;CAGpC"}