homebridge-loxone-proxy 1.13.0-beta.9 → 2.0.0-beta.1

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 (199) hide show
  1. package/ARCHITECTURE.md +61 -0
  2. package/README.md +39 -2
  3. package/dist/AccessoryNameRegistry.d.ts +8 -0
  4. package/dist/AccessoryNameRegistry.d.ts.map +1 -0
  5. package/dist/AccessoryNameRegistry.js +47 -0
  6. package/dist/AccessoryNameRegistry.js.map +1 -0
  7. package/dist/LoxoneAccessory.d.ts +12 -14
  8. package/dist/LoxoneAccessory.d.ts.map +1 -1
  9. package/dist/LoxoneAccessory.js +55 -41
  10. package/dist/LoxoneAccessory.js.map +1 -1
  11. package/dist/LoxoneConfig.d.ts +19 -0
  12. package/dist/LoxoneConfig.d.ts.map +1 -0
  13. package/dist/LoxoneConfig.js +49 -0
  14. package/dist/LoxoneConfig.js.map +1 -0
  15. package/dist/LoxonePlatform.d.ts +11 -5
  16. package/dist/LoxonePlatform.d.ts.map +1 -1
  17. package/dist/LoxonePlatform.js +21 -115
  18. package/dist/LoxonePlatform.js.map +1 -1
  19. package/dist/homekit/HomeKitServiceAdapter.d.ts +8 -0
  20. package/dist/homekit/HomeKitServiceAdapter.d.ts.map +1 -0
  21. package/dist/homekit/HomeKitServiceAdapter.js +8 -0
  22. package/dist/homekit/HomeKitServiceAdapter.js.map +1 -0
  23. package/dist/homekit/HomeKitServiceFactory.d.ts +8 -0
  24. package/dist/homekit/HomeKitServiceFactory.d.ts.map +1 -0
  25. package/dist/homekit/HomeKitServiceFactory.js +79 -0
  26. package/dist/homekit/HomeKitServiceFactory.js.map +1 -0
  27. package/dist/homekit/hksv/LoxoneTalkback.js +2 -2
  28. package/dist/homekit/hksv/LoxoneTalkback.js.map +1 -1
  29. package/dist/homekit/hksv/StreamingDelegate.d.ts.map +1 -1
  30. package/dist/homekit/hksv/StreamingDelegate.js +17 -4
  31. package/dist/homekit/hksv/StreamingDelegate.js.map +1 -1
  32. package/dist/homekit/services/BaseService.d.ts +5 -2
  33. package/dist/homekit/services/BaseService.d.ts.map +1 -1
  34. package/dist/homekit/services/BaseService.js +11 -2
  35. package/dist/homekit/services/BaseService.js.map +1 -1
  36. package/dist/homekit/services/ColorLightBulb.d.ts +2 -0
  37. package/dist/homekit/services/ColorLightBulb.d.ts.map +1 -1
  38. package/dist/homekit/services/ColorLightBulb.js +27 -17
  39. package/dist/homekit/services/ColorLightBulb.js.map +1 -1
  40. package/dist/homekit/services/GarageDoorOpener.d.ts.map +1 -1
  41. package/dist/homekit/services/GarageDoorOpener.js +1 -2
  42. package/dist/homekit/services/GarageDoorOpener.js.map +1 -1
  43. package/dist/homekit/services/IrrigationSystem.d.ts +0 -1
  44. package/dist/homekit/services/IrrigationSystem.d.ts.map +1 -1
  45. package/dist/homekit/services/IrrigationSystem.js +1 -5
  46. package/dist/homekit/services/IrrigationSystem.js.map +1 -1
  47. package/dist/homekit/services/LightBulb.js +1 -1
  48. package/dist/homekit/services/LightBulb.js.map +1 -1
  49. package/dist/homekit/services/LockMechanism.d.ts.map +1 -1
  50. package/dist/homekit/services/LockMechanism.js +1 -5
  51. package/dist/homekit/services/LockMechanism.js.map +1 -1
  52. package/dist/homekit/services/SecuritySystem.d.ts.map +1 -1
  53. package/dist/homekit/services/SecuritySystem.js +1 -12
  54. package/dist/homekit/services/SecuritySystem.js.map +1 -1
  55. package/dist/homekit/services/Switch.d.ts.map +1 -1
  56. package/dist/homekit/services/Switch.js +1 -9
  57. package/dist/homekit/services/Switch.js.map +1 -1
  58. package/dist/homekit/services/Thermostat.d.ts.map +1 -1
  59. package/dist/homekit/services/Thermostat.js +1 -6
  60. package/dist/homekit/services/Thermostat.js.map +1 -1
  61. package/dist/homekit/services/Valve.d.ts +3 -3
  62. package/dist/homekit/services/Valve.d.ts.map +1 -1
  63. package/dist/homekit/services/Valve.js +5 -5
  64. package/dist/homekit/services/Valve.js.map +1 -1
  65. package/dist/homekit/services/Window.d.ts.map +1 -1
  66. package/dist/homekit/services/Window.js +1 -2
  67. package/dist/homekit/services/Window.js.map +1 -1
  68. package/dist/homekit/services/WindowCovering.d.ts.map +1 -1
  69. package/dist/homekit/services/WindowCovering.js +2 -4
  70. package/dist/homekit/services/WindowCovering.js.map +1 -1
  71. package/dist/loxone/LoxoneCommandBus.d.ts +13 -0
  72. package/dist/loxone/LoxoneCommandBus.d.ts.map +1 -0
  73. package/dist/loxone/LoxoneCommandBus.js +19 -0
  74. package/dist/loxone/LoxoneCommandBus.js.map +1 -0
  75. package/dist/loxone/LoxoneControlMapper.d.ts +14 -0
  76. package/dist/loxone/LoxoneControlMapper.d.ts.map +1 -0
  77. package/dist/loxone/LoxoneControlMapper.js +60 -0
  78. package/dist/loxone/LoxoneControlMapper.js.map +1 -0
  79. package/dist/loxone/LoxoneHandler.d.ts +35 -24
  80. package/dist/loxone/LoxoneHandler.d.ts.map +1 -1
  81. package/dist/loxone/LoxoneHandler.js +137 -175
  82. package/dist/loxone/LoxoneHandler.js.map +1 -1
  83. package/dist/loxone/LoxoneItemRegistry.d.ts +3 -0
  84. package/dist/loxone/LoxoneItemRegistry.d.ts.map +1 -0
  85. package/dist/loxone/LoxoneItemRegistry.js +56 -0
  86. package/dist/loxone/LoxoneItemRegistry.js.map +1 -0
  87. package/dist/loxone/LoxoneStateRouter.d.ts +18 -0
  88. package/dist/loxone/LoxoneStateRouter.d.ts.map +1 -0
  89. package/dist/loxone/LoxoneStateRouter.js +52 -0
  90. package/dist/loxone/LoxoneStateRouter.js.map +1 -0
  91. package/dist/loxone/LoxoneTransport.d.ts +40 -0
  92. package/dist/loxone/LoxoneTransport.d.ts.map +1 -0
  93. package/dist/loxone/LoxoneTransport.js +3 -0
  94. package/dist/loxone/LoxoneTransport.js.map +1 -0
  95. package/dist/loxone/LoxoneTsApiTransport.d.ts +59 -0
  96. package/dist/loxone/LoxoneTsApiTransport.d.ts.map +1 -0
  97. package/dist/loxone/LoxoneTsApiTransport.js +93 -0
  98. package/dist/loxone/LoxoneTsApiTransport.js.map +1 -0
  99. package/dist/loxone/LoxoneTypes.d.ts +19 -0
  100. package/dist/loxone/LoxoneTypes.d.ts.map +1 -0
  101. package/dist/loxone/LoxoneTypes.js +3 -0
  102. package/dist/loxone/LoxoneTypes.js.map +1 -0
  103. package/dist/loxone/items/Alarm.d.ts +2 -1
  104. package/dist/loxone/items/Alarm.d.ts.map +1 -1
  105. package/dist/loxone/items/Alarm.js +23 -5
  106. package/dist/loxone/items/Alarm.js.map +1 -1
  107. package/dist/loxone/items/ColorPickerV2.d.ts +2 -1
  108. package/dist/loxone/items/ColorPickerV2.d.ts.map +1 -1
  109. package/dist/loxone/items/ColorPickerV2.js +23 -5
  110. package/dist/loxone/items/ColorPickerV2.js.map +1 -1
  111. package/dist/loxone/items/Contact.d.ts +2 -1
  112. package/dist/loxone/items/Contact.d.ts.map +1 -1
  113. package/dist/loxone/items/Contact.js +3 -5
  114. package/dist/loxone/items/Contact.js.map +1 -1
  115. package/dist/loxone/items/Dimmer.d.ts +2 -1
  116. package/dist/loxone/items/Dimmer.d.ts.map +1 -1
  117. package/dist/loxone/items/Dimmer.js +10 -5
  118. package/dist/loxone/items/Dimmer.js.map +1 -1
  119. package/dist/loxone/items/Gate.d.ts +2 -1
  120. package/dist/loxone/items/Gate.d.ts.map +1 -1
  121. package/dist/loxone/items/Gate.js +9 -5
  122. package/dist/loxone/items/Gate.js.map +1 -1
  123. package/dist/loxone/items/IRoomControllerV2.d.ts +2 -1
  124. package/dist/loxone/items/IRoomControllerV2.d.ts.map +1 -1
  125. package/dist/loxone/items/IRoomControllerV2.js +16 -5
  126. package/dist/loxone/items/IRoomControllerV2.js.map +1 -1
  127. package/dist/loxone/items/InfoOnlyAnalog.d.ts +3 -2
  128. package/dist/loxone/items/InfoOnlyAnalog.d.ts.map +1 -1
  129. package/dist/loxone/items/InfoOnlyAnalog.js +11 -18
  130. package/dist/loxone/items/InfoOnlyAnalog.js.map +1 -1
  131. package/dist/loxone/items/InfoOnlyDigital.d.ts +3 -5
  132. package/dist/loxone/items/InfoOnlyDigital.d.ts.map +1 -1
  133. package/dist/loxone/items/InfoOnlyDigital.js +8 -17
  134. package/dist/loxone/items/InfoOnlyDigital.js.map +1 -1
  135. package/dist/loxone/items/Intercom.d.ts +5 -2
  136. package/dist/loxone/items/Intercom.d.ts.map +1 -1
  137. package/dist/loxone/items/Intercom.js +44 -24
  138. package/dist/loxone/items/Intercom.js.map +1 -1
  139. package/dist/loxone/items/IntercomV2.d.ts.map +1 -1
  140. package/dist/loxone/items/IntercomV2.js +13 -3
  141. package/dist/loxone/items/IntercomV2.js.map +1 -1
  142. package/dist/loxone/items/Irrigation.d.ts +3 -1
  143. package/dist/loxone/items/Irrigation.d.ts.map +1 -1
  144. package/dist/loxone/items/Irrigation.js +19 -6
  145. package/dist/loxone/items/Irrigation.js.map +1 -1
  146. package/dist/loxone/items/Jalousie.d.ts +2 -1
  147. package/dist/loxone/items/Jalousie.d.ts.map +1 -1
  148. package/dist/loxone/items/Jalousie.js +10 -5
  149. package/dist/loxone/items/Jalousie.js.map +1 -1
  150. package/dist/loxone/items/LightControllerV2.d.ts +7 -4
  151. package/dist/loxone/items/LightControllerV2.d.ts.map +1 -1
  152. package/dist/loxone/items/LightControllerV2.js +50 -29
  153. package/dist/loxone/items/LightControllerV2.js.map +1 -1
  154. package/dist/loxone/items/NfcCodeTouch.d.ts +2 -2
  155. package/dist/loxone/items/NfcCodeTouch.d.ts.map +1 -1
  156. package/dist/loxone/items/NfcCodeTouch.js +4 -11
  157. package/dist/loxone/items/NfcCodeTouch.js.map +1 -1
  158. package/dist/loxone/items/PresenceDetector.d.ts +2 -1
  159. package/dist/loxone/items/PresenceDetector.d.ts.map +1 -1
  160. package/dist/loxone/items/PresenceDetector.js +3 -5
  161. package/dist/loxone/items/PresenceDetector.js.map +1 -1
  162. package/dist/loxone/items/Radio.d.ts +5 -9
  163. package/dist/loxone/items/Radio.d.ts.map +1 -1
  164. package/dist/loxone/items/Radio.js +40 -22
  165. package/dist/loxone/items/Radio.js.map +1 -1
  166. package/dist/loxone/items/Switch.d.ts +2 -1
  167. package/dist/loxone/items/Switch.d.ts.map +1 -1
  168. package/dist/loxone/items/Switch.js +28 -19
  169. package/dist/loxone/items/Switch.js.map +1 -1
  170. package/dist/loxone/items/UpDownDigital.d.ts +2 -1
  171. package/dist/loxone/items/UpDownDigital.d.ts.map +1 -1
  172. package/dist/loxone/items/UpDownDigital.js +11 -7
  173. package/dist/loxone/items/UpDownDigital.js.map +1 -1
  174. package/dist/loxone/items/Ventilation.d.ts +2 -1
  175. package/dist/loxone/items/Ventilation.d.ts.map +1 -1
  176. package/dist/loxone/items/Ventilation.js +3 -5
  177. package/dist/loxone/items/Ventilation.js.map +1 -1
  178. package/dist/loxone/items/Window.d.ts +2 -1
  179. package/dist/loxone/items/Window.d.ts.map +1 -1
  180. package/dist/loxone/items/Window.js +9 -5
  181. package/dist/loxone/items/Window.js.map +1 -1
  182. package/dist/loxone/items/WindowMonitor.d.ts +1 -0
  183. package/dist/loxone/items/WindowMonitor.d.ts.map +1 -1
  184. package/dist/loxone/items/WindowMonitor.js +3 -1
  185. package/dist/loxone/items/WindowMonitor.js.map +1 -1
  186. package/dist/platform/AccessoryPlan.d.ts +35 -0
  187. package/dist/platform/AccessoryPlan.d.ts.map +1 -0
  188. package/dist/platform/AccessoryPlan.js +3 -0
  189. package/dist/platform/AccessoryPlan.js.map +1 -0
  190. package/dist/platform/AccessoryReconciler.d.ts +13 -0
  191. package/dist/platform/AccessoryReconciler.d.ts.map +1 -0
  192. package/dist/platform/AccessoryReconciler.js +53 -0
  193. package/dist/platform/AccessoryReconciler.js.map +1 -0
  194. package/package.json +7 -11
  195. package/test/architecture.test.js +591 -0
  196. package/test/fixtures/structure-file.basic.json +146 -0
  197. package/test/fixtures/structure-file.climate-window.json +152 -0
  198. package/test/fixtures/structure-file.large-filter.json +144 -0
  199. package/test/fixtures/structure-file.lighting.json +131 -0
@@ -0,0 +1,61 @@
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 | Owns | Must not own |
8
+ | --- | --- | --- |
9
+ | `LoxoneTransport` | The plugin-owned communication contract. | HomeKit concepts or item mapping. |
10
+ | `LoxoneTsApiTransport` | Adapting `@rudyberends/loxone-ts-api` to `LoxoneTransport`. | Loxone item semantics or HomeKit behavior. |
11
+ | `LoxoneHandler` | Connection orchestration, Structure File loading, command dispatch, state callback cache. | Concrete `loxone-ts-api` client details. |
12
+ | `LoxoneControlMapper` | Structure File normalization, room/category metadata, filtering. | Creating HomeKit services directly. |
13
+ | Item classes | Declarative accessory/service plans, command bindings, state bindings. | Sending commands directly to Loxone. |
14
+ | `LoxoneCommandBus` | Executing resolved command bindings. | Inventing command strings. |
15
+ | `LoxoneStateRouter` | Routing Loxone state UUID updates to accessories. | Parsing HomeKit service behavior. |
16
+ | HomeKit services | Binding characteristics to command IDs and state IDs. | Talking to Loxone transport directly. |
17
+ | `AccessoryReconciler` | Homebridge accessory cache reconciliation. | Loxone command/state semantics. |
18
+
19
+ ## Command And State Rules
20
+
21
+ - Loxone command strings belong in item plans.
22
+ - HomeKit services refer to command IDs, not raw Loxone command strings.
23
+ - Loxone state UUIDs belong in item state bindings.
24
+ - Runtime command execution goes through `LoxoneCommandBus`.
25
+ - Runtime state updates go through `LoxoneStateRouter`.
26
+ - Item classes must not call `LoxoneHandler.sendCommand()` directly.
27
+ - HomeKit service classes must not call `LoxoneHandler` or `LoxoneTransport` directly.
28
+
29
+ ## Transport Boundary
30
+
31
+ `@rudyberends/loxone-ts-api` is maintained together with this plugin, so the adapter is intentionally thin. The boundary still matters because it gives the plugin a stable internal contract:
32
+
33
+ - tests can run without a Miniserver;
34
+ - `LoxoneHandler` stays independent from concrete client event shapes;
35
+ - transport behavior can evolve in `loxone-ts-api` without leaking into HomeKit mapping code.
36
+
37
+ ## Intercom Boundary
38
+
39
+ Intercom and IntercomV2 are intentionally treated as a separate bounded context. They include HKSV, signaling, prebuffering, talkback, camera streams, and token use. Those flows are not the same as normal command/state accessories.
40
+
41
+ The command/state architecture should keep supporting regular Intercom accessory planning where useful, but Intercom-specific media and signaling code should remain isolated from the generic command bus and state router rules.
42
+
43
+ ## Release Rules
44
+
45
+ Versioning is owned by semantic-release. Use conventional commits:
46
+
47
+ | Commit | Release |
48
+ | --- | --- |
49
+ | `fix: ...` | patch |
50
+ | `feat: ...` | minor |
51
+ | `refactor!: ...` plus `BREAKING CHANGE: ...` footer | major |
52
+
53
+ For breaking beta refactors, prefer:
54
+
55
+ ```text
56
+ refactor!: migrate Loxone communication to loxone-ts-api
57
+
58
+ BREAKING CHANGE: requires Node.js 20 and replaces lxcommunicator with @rudyberends/loxone-ts-api.
59
+ ```
60
+
61
+ The `beta` branch publishes prereleases. The `master` branch publishes stable releases.
package/README.md CHANGED
@@ -8,8 +8,45 @@
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 [`@rudyberends/loxone-ts-api`](https://www.npmjs.com/package/@rudyberends/loxone-ts-api) 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 | 20 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 `@rudyberends/loxone-ts-api`, 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. The plugin depends on a small internal transport contract, while the concrete implementation lives in the `@rudyberends/loxone-ts-api` adapter. Because that package is maintained together with this plugin, the adapter is intentionally thin: it keeps ownership boundaries clear without duplicating Loxone communication logic.
36
+
37
+ The detailed architecture rules and release commit conventions are documented in [ARCHITECTURE.md](ARCHITECTURE.md).
38
+
39
+ # Breaking Changes
40
+
41
+ The refactor that migrates communication from `lxcommunicator` to `@rudyberends/loxone-ts-api` is intended for a breaking beta release. Existing Homebridge configuration values are kept where possible, but the runtime requirement is now Node.js 20 or newer.
42
+
43
+ Before publishing the beta:
44
+
45
+ - Bump the plugin with a breaking version number.
46
+ - Publish and verify `@rudyberends/loxone-ts-api` before publishing this plugin.
47
+ - Run `npm run lint`, `npm test`, and a real Homebridge smoke test against a Miniserver.
48
+ - Call out Node.js 20+ in the release notes.
49
+ - Tell beta users that Homebridge cached accessories may need review if names, rooms, or exposed controls changed.
13
50
 
14
51
  # Mapped Items
15
52
  The following list displays all supported itemtypes supported by this plugin.
@@ -0,0 +1,8 @@
1
+ export declare class AccessoryNameRegistry {
2
+ private usedNames;
3
+ private accessoryNameMap;
4
+ reset(): void;
5
+ generate(room: string, base: string, uuid?: string, isSubItem?: 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":"AAGA,qBAAa,qBAAqB;IAChC,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CAAC,gBAAgB,CAA6B;IAErD,KAAK,IAAI,IAAI;IAKb,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,SAAS,UAAQ,GAAG,MAAM;IAoC9E,OAAO,CAAC,KAAK;CAOd"}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccessoryNameRegistry = void 0;
4
+ class AccessoryNameRegistry {
5
+ constructor() {
6
+ this.usedNames = new Set();
7
+ this.accessoryNameMap = new Map();
8
+ }
9
+ reset() {
10
+ this.usedNames.clear();
11
+ this.accessoryNameMap.clear();
12
+ }
13
+ generate(room, base, uuid, isSubItem = false) {
14
+ const cleanRoom = this.clean(room || 'Unknown');
15
+ const cleanBase = this.clean(base || 'Unnamed');
16
+ const alreadyPrefixed = cleanBase.toLowerCase().startsWith(cleanRoom.toLowerCase()) ||
17
+ cleanBase.toLowerCase().startsWith(cleanRoom.toLowerCase() + ' ');
18
+ const baseName = alreadyPrefixed
19
+ ? cleanBase
20
+ : `${cleanRoom} ${cleanBase}`;
21
+ if (isSubItem) {
22
+ return baseName;
23
+ }
24
+ if (uuid && this.accessoryNameMap.has(uuid)) {
25
+ return this.accessoryNameMap.get(uuid);
26
+ }
27
+ let finalName = baseName;
28
+ let counter = 1;
29
+ while (this.usedNames.has(finalName)) {
30
+ finalName = `${baseName} ${counter++}`;
31
+ }
32
+ this.usedNames.add(finalName);
33
+ if (uuid) {
34
+ this.accessoryNameMap.set(uuid, finalName);
35
+ }
36
+ return finalName;
37
+ }
38
+ clean(value) {
39
+ return value
40
+ .replace(/\((.*?)\)/g, '$1')
41
+ .replace(/[^\p{L}\p{N}\s']/gu, '')
42
+ .replace(/\s+/g, ' ')
43
+ .trim();
44
+ }
45
+ }
46
+ exports.AccessoryNameRegistry = AccessoryNameRegistry;
47
+ //# sourceMappingURL=AccessoryNameRegistry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccessoryNameRegistry.js","sourceRoot":"","sources":["../src/AccessoryNameRegistry.ts"],"names":[],"mappings":";;;AAGA,MAAa,qBAAqB;IAAlC;QACU,cAAS,GAAG,IAAI,GAAG,EAAU,CAAC;QAC9B,qBAAgB,GAAG,IAAI,GAAG,EAAkB,CAAC;IAkDvD,CAAC;IAhDC,KAAK;QACH,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;QACvB,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;IAChC,CAAC;IAED,QAAQ,CAAC,IAAY,EAAE,IAAY,EAAE,IAAa,EAAE,SAAS,GAAG,KAAK;QACnE,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;QAEhD,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;YACb,OAAO,QAAQ,CAAC;SACjB;QAED,IAAI,IAAI,IAAI,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YAC3C,OAAO,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC;SACzC;QAED,IAAI,SAAS,GAAG,QAAQ,CAAC;QACzB,IAAI,OAAO,GAAG,CAAC,CAAC;QAEhB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;YACpC,SAAS,GAAG,GAAG,QAAQ,IAAI,OAAO,EAAE,EAAE,CAAC;SACxC;QAED,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAE9B,IAAI,IAAI,EAAE;YACR,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;SAC5C;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IAEO,KAAK,CAAC,KAAa;QACzB,OAAO,KAAK;aACT,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC;aAC3B,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC;aACjC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;aACpB,IAAI,EAAE,CAAC;IACZ,CAAC;CACF;AApDD,sDAoDC"}
@@ -1,29 +1,27 @@
1
1
  import { PlatformAccessory } from 'homebridge';
2
2
  import { LoxonePlatform } from './LoxonePlatform';
3
3
  import { Control } from './loxone/StructureFile';
4
+ import { LoxoneItemStates, LoxoneUpdateMessage } from './loxone/LoxoneTypes';
5
+ import { HomeKitServiceAdapter } from './homekit/HomeKitServiceAdapter';
6
+ import { AccessoryPlan, ServicePlan } from './platform/AccessoryPlan';
4
7
  export declare class LoxoneAccessory {
5
8
  readonly platform: LoxonePlatform;
6
9
  readonly device: Control;
7
10
  Accessory: PlatformAccessory | undefined;
8
- Service: Record<string, unknown>;
9
- ItemStates: Record<string, {
10
- service: string;
11
- state: string;
12
- }>;
11
+ Service: Record<string, HomeKitServiceAdapter>;
12
+ ItemStates: LoxoneItemStates;
13
13
  constructor(platform: LoxonePlatform, device: Control);
14
14
  protected isSupported(): boolean;
15
+ protected beforeSetup(): void;
15
16
  private setupAccessory;
16
- private getOrCreateAccessory;
17
+ protected createAccessoryPlan(uuid: string): AccessoryPlan;
18
+ private createBaseAccessoryPlan;
19
+ protected createSingleServicePlan(uuid: string, service: ServicePlan, stateBindings: LoxoneItemStates): AccessoryPlan;
20
+ private configurePlannedServices;
21
+ protected afterSetup(): void;
17
22
  protected configureServices(accessory: PlatformAccessory): void;
18
- protected handleLoxoneCommand(value: string): void;
19
23
  private setupListeners;
20
- private callBack;
21
- protected callBackHandler(message: {
22
- uuid: string;
23
- state: string;
24
- service: string;
25
- value: string | number;
26
- }): void;
24
+ callBackHandler(message: LoxoneUpdateMessage): void;
27
25
  protected matchAlias(deviceName: string, alias: string): boolean;
28
26
  }
29
27
  //# sourceMappingURL=LoxoneAccessory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoxoneAccessory.d.ts","sourceRoot":"","sources":["../src/LoxoneAccessory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAOjD,qBAAa,eAAe;IAKd,QAAQ,CAAC,QAAQ,EAAE,cAAc;IAAE,QAAQ,CAAC,MAAM,EAAE,OAAO;IAJvE,SAAS,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACzC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAM;IACtC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAM;gBAE/C,QAAQ,EAAE,cAAc,EAAW,MAAM,EAAE,OAAO;IAgBvE,SAAS,CAAC,WAAW,IAAI,OAA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AO;IAkBvE,SAAS,CAAC,WAAW,IAAI,OAAO;IAIhC,SAAS,CAAC,WAAW,IAAI,IAAI;IAI7B,OAAO,CAAC,cAAc;IAkBtB,SAAS,CAAC,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa;IAI1D,OAAO,CAAC,uBAAuB;IAsB/B,SAAS,CAAC,uBAAuB,CAC/B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,WAAW,EACpB,aAAa,EAAE,gBAAgB,GAC9B,aAAa;IAQhB,OAAO,CAAC,wBAAwB;IAUhC,SAAS,CAAC,UAAU,IAAI,IAAI;IAM5B,SAAS,CAAC,iBAAiB,CAAC,SAAS,EAAE,iBAAiB,GAAG,IAAI;IAI/D,OAAO,CAAC,cAAc;IAIf,eAAe,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI;IAW1D,SAAS,CAAC,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;CAIjE"}
@@ -1,24 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LoxoneAccessory = void 0;
4
+ const HomeKitServiceAdapter_1 = require("./homekit/HomeKitServiceAdapter");
5
+ const HomeKitServiceFactory_1 = require("./homekit/HomeKitServiceFactory");
4
6
  class LoxoneAccessory {
5
7
  constructor(platform, device) {
6
8
  this.platform = platform;
7
9
  this.device = device;
8
10
  this.Service = {};
9
11
  this.ItemStates = {};
10
- this.callBack = (message) => {
11
- if (message.uuid) {
12
- const itemState = this.ItemStates[message.uuid];
13
- message.service = itemState.service;
14
- message.state = itemState.state;
15
- this.callBackHandler(message);
16
- }
17
- };
18
12
  if (this.platform.AccessoryCount >= 149) {
19
13
  this.platform.log.info(`[${device.type}Item] Max HomeKit Accessories limit reached. Item not mapped: ${device.name}`);
20
14
  return;
21
15
  }
16
+ this.beforeSetup();
22
17
  if (!this.isSupported()) {
23
18
  this.platform.log.debug(`[${device.type}Item] Skipping unsupported item: ${device.name}`);
24
19
  return;
@@ -28,55 +23,74 @@ class LoxoneAccessory {
28
23
  isSupported() {
29
24
  return true;
30
25
  }
26
+ beforeSetup() {
27
+ }
31
28
  setupAccessory() {
32
29
  const uuid = this.platform.api.hap.uuid.generate(this.device.uuidAction);
33
- this.Accessory = this.getOrCreateAccessory(uuid);
34
- this.Accessory.context.device = this.device;
35
- this.Accessory.context.mapped = true;
36
- this.configureServices(this.Accessory);
30
+ const plan = this.createAccessoryPlan(uuid);
31
+ this.ItemStates = plan.stateBindings;
32
+ this.Accessory = this.platform.accessoryReconciler.reconcile(plan);
33
+ if (plan.services.length > 0) {
34
+ this.configurePlannedServices(plan);
35
+ }
36
+ else {
37
+ this.configureServices(this.Accessory);
38
+ }
37
39
  this.setupListeners();
38
- this.platform.mappedAccessories.add(this.Accessory.UUID);
40
+ this.afterSetup();
39
41
  this.platform.AccessoryCount++;
40
42
  }
41
- getOrCreateAccessory(uuid) {
43
+ createAccessoryPlan(uuid) {
44
+ return this.createBaseAccessoryPlan(uuid);
45
+ }
46
+ createBaseAccessoryPlan(uuid) {
42
47
  var _a, _b;
43
- let accessory = this.platform.accessories.find((acc) => acc.UUID === uuid);
44
48
  const baseName = (_a = this.device.name) !== null && _a !== void 0 ? _a : 'Unnamed';
45
49
  const roomName = (_b = this.device.room) !== null && _b !== void 0 ? _b : 'Unknown';
46
- if (!accessory) {
47
- const uniqueName = this.platform.generateUniqueName(roomName, baseName, uuid);
48
- accessory = new this.platform.api.platformAccessory(uniqueName, uuid);
49
- this.platform.api.registerPlatformAccessories('homebridge-loxone-proxy', 'LoxonePlatform', [accessory]);
50
- this.platform.log.debug(`[${this.device.type}Item] Adding new accessory: ${uniqueName} (original: ${this.device.name})`);
51
- }
52
- else {
53
- this.platform.log.debug(`[${this.device.type}Item] Restoring accessory from cache: ${accessory.displayName} (original: ${this.device.name})`);
54
- }
55
- const accessoryInfoService = accessory.getService(this.platform.Service.AccessoryInformation);
56
- if (accessoryInfoService) {
57
- accessoryInfoService
58
- .setCharacteristic(this.platform.Characteristic.Manufacturer, 'Loxone')
59
- .setCharacteristic(this.platform.Characteristic.Model, this.device.room)
60
- .setCharacteristic(this.platform.Characteristic.SerialNumber, this.device.uuidAction)
61
- .setCharacteristic(this.platform.Characteristic.Name, accessory.displayName);
50
+ const displayName = this.platform.generateUniqueName(roomName, baseName, uuid);
51
+ return {
52
+ id: uuid,
53
+ displayName,
54
+ room: roomName,
55
+ source: {
56
+ type: this.device.type,
57
+ uuidAction: this.device.uuidAction,
58
+ originalName: baseName,
59
+ },
60
+ context: {
61
+ device: this.device,
62
+ },
63
+ services: [],
64
+ stateBindings: this.ItemStates,
65
+ };
66
+ }
67
+ createSingleServicePlan(uuid, service, stateBindings) {
68
+ return {
69
+ ...this.createBaseAccessoryPlan(uuid),
70
+ services: [service],
71
+ stateBindings,
72
+ };
73
+ }
74
+ configurePlannedServices(plan) {
75
+ for (const servicePlan of plan.services) {
76
+ this.Service[servicePlan.id] = (0, HomeKitServiceFactory_1.buildHomeKitService)(this.platform, this.Accessory, servicePlan);
62
77
  }
63
- return accessory;
64
78
  }
65
- configureServices(accessory) {
79
+ afterSetup() {
66
80
  }
67
- handleLoxoneCommand(value) {
68
- this.platform.log.info(`[${this.device.name}][handleLoxoneCommand] Function Not Implemented`);
81
+ configureServices(accessory) {
69
82
  }
70
83
  setupListeners() {
71
- this.platform.log.debug(`[${this.device.name}] Registering Listeners for ${this.device.type}Item`);
72
- for (const state in this.ItemStates) {
73
- this.platform.LoxoneHandler.registerListenerForUUID(state, this.callBack.bind(this));
74
- }
84
+ this.platform.stateRouter.bind(this, this.ItemStates);
75
85
  }
76
86
  callBackHandler(message) {
77
87
  this.platform.log.debug(`[${this.device.name}] Callback service: ${message.service}`);
78
- const updateService = new Function('message', `return this.Service["${message.service}"].updateService(message);`);
79
- updateService.call(this, message);
88
+ const service = this.Service[message.service];
89
+ if (!service) {
90
+ this.platform.log.warn(`[${this.device.name}] No HomeKit service registered for ${message.service}`);
91
+ return;
92
+ }
93
+ (0, HomeKitServiceAdapter_1.dispatchHomeKitUpdate)(service, message);
80
94
  }
81
95
  matchAlias(deviceName, alias) {
82
96
  const aliasRegex = alias.trim().replace(/%/g, '.*').replace(/\s+/g, '\\s*');
@@ -1 +1 @@
1
- {"version":3,"file":"LoxoneAccessory.js","sourceRoot":"","sources":["../src/LoxoneAccessory.ts"],"names":[],"mappings":";;;AASA,MAAa,eAAe;IAK1B,YAAqB,QAAwB,EAAW,MAAe;QAAlD,aAAQ,GAAR,QAAQ,CAAgB;QAAW,WAAM,GAAN,MAAM,CAAS;QAHvE,YAAO,GAA4B,EAAE,CAAC;QACtC,eAAU,GAAuD,EAAE,CAAC;QA6F5D,aAAQ,GAAG,CAAC,OAKnB,EAAQ,EAAE;YACT,IAAI,OAAO,CAAC,IAAI,EAAE;gBAChB,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;gBAChD,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;gBACpC,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC;gBAChC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;aAC/B;QACH,CAAC,CAAC;QAtGA,IAAI,IAAI,CAAC,QAAQ,CAAC,cAAc,IAAI,GAAG,EAAE;YACvC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CACpB,IAAI,MAAM,CAAC,IAAI,iEAAiE,MAAM,CAAC,IAAI,EAAE,CAC9F,CAAC;YACF,OAAO;SACR;QAED,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE;YACvB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,IAAI,oCAAoC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;YAC1F,OAAO;SACR;QAED,IAAI,CAAC,cAAc,EAAE,CAAC;IACxB,CAAC;IAES,WA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B,EAChD,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,SAAU,EACf,WAAW,CACZ,CAAC;SACH;IACH,CAAC;IAES,UAAU;IAEpB,CAAC;IAIS,iBAAiB,CAAC,SAA4B;IAExD,CAAC;IAEO,cAAc;QACpB,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IACxD,CAAC;IAEM,eAAe,CAAC,OAA4B;QACjD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,uBAAuB,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;QACtF,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC9C,IAAI,CAAC,OAAO,EAAE;YACZ,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,uCAAuC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;YACrG,OAAO;SACR;QAED,IAAA,6CAAqB,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;IAES,UAAU,CAAC,UAAkB,EAAE,KAAa;QACpD,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC5E,OAAO,IAAI,MAAM,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC;IAC7D,CAAC;CACF;AA9HD,0CA8HC"}
@@ -0,0 +1,19 @@
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
+ export declare function assertValidLoxoneConnectionConfig(config: LoxoneConnectionConfig): void;
19
+ //# 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;AAED,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,sBAAsB,GAAG,IAAI,CAKtF"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.assertValidLoxoneConnectionConfig = exports.validateLoxoneConnectionConfig = exports.normalizeLoxoneConfig = void 0;
4
+ function normalizeLoxoneConfig(config) {
5
+ var _a, _b;
6
+ return {
7
+ excludedTypes: parseList(config.Exclusions),
8
+ roomFilter: {
9
+ type: ((_a = config.roomfilter) === null || _a === void 0 ? void 0 : _a.type) === 'inclusion' ? 'inclusion' : 'exclusion',
10
+ rooms: parseList((_b = config.roomfilter) === null || _b === void 0 ? void 0 : _b.list).map(room => room.toLowerCase()),
11
+ },
12
+ };
13
+ }
14
+ exports.normalizeLoxoneConfig = normalizeLoxoneConfig;
15
+ function validateLoxoneConnectionConfig(config) {
16
+ const errors = [];
17
+ if (!isNonEmptyString(config.host)) {
18
+ errors.push('host is required');
19
+ }
20
+ if (!isNonEmptyString(config.username)) {
21
+ errors.push('username is required');
22
+ }
23
+ if (!isNonEmptyString(config.password)) {
24
+ errors.push('password is required');
25
+ }
26
+ if (config.port !== undefined && config.port !== null && config.port !== '') {
27
+ const port = Number(config.port);
28
+ if (!Number.isInteger(port) || port < 1 || port > 65535) {
29
+ errors.push('port must be a number between 1 and 65535');
30
+ }
31
+ }
32
+ return errors;
33
+ }
34
+ exports.validateLoxoneConnectionConfig = validateLoxoneConnectionConfig;
35
+ function assertValidLoxoneConnectionConfig(config) {
36
+ const errors = validateLoxoneConnectionConfig(config);
37
+ if (errors.length > 0) {
38
+ throw new Error(`Invalid Loxone configuration: ${errors.join(', ')}`);
39
+ }
40
+ }
41
+ exports.assertValidLoxoneConnectionConfig = assertValidLoxoneConnectionConfig;
42
+ function parseList(value) {
43
+ var _a;
44
+ return (_a = value === null || value === void 0 ? void 0 : value.split(',').map(item => item.trim()).filter(Boolean)) !== null && _a !== void 0 ? _a : [];
45
+ }
46
+ function isNonEmptyString(value) {
47
+ return typeof value === 'string' && value.trim().length > 0;
48
+ }
49
+ //# sourceMappingURL=LoxoneConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoxoneConfig.js","sourceRoot":"","sources":["../src/LoxoneConfig.ts"],"names":[],"mappings":";;;AAmBA,SAAgB,qBAAqB,CAAC,MAAs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C;AAED,SAAgB,iCAAiC,CAAC,MAA8B;IAC9E,MAAM,MAAM,GAAG,8BAA8B,CAAC,MAAM,CAAC,CAAC;IACtD,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;QACrB,MAAM,IAAI,KAAK,CAAC,iCAAiC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;KACvE;AACH,CAAC;AALD,8EAKC;AAED,SAAS,SAAS,CAAC,KAAc;;IAC/B,OAAO,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,mCAAI,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,24 +1,30 @@
1
1
  import { API, DynamicPlatformPlugin, Logger, PlatformAccessory, PlatformConfig, Service, Characteristic } from 'homebridge';
2
2
  import { StructureFile, Controls, MSInfo, Control } from './loxone/StructureFile';
3
+ import LoxoneHandler from './loxone/LoxoneHandler';
4
+ import { AccessoryReconciler } from './platform/AccessoryReconciler';
5
+ import { LoxoneCommandBus } from './loxone/LoxoneCommandBus';
6
+ import { LoxoneStateRouter } from './loxone/LoxoneStateRouter';
3
7
  export declare class LoxonePlatform implements DynamicPlatformPlugin {
4
8
  readonly log: Logger;
5
9
  readonly config: PlatformConfig;
6
10
  readonly api: API;
7
- LoxoneHandler: any;
11
+ LoxoneHandler: LoxoneHandler;
8
12
  AccessoryCount: number;
9
13
  msInfo: MSInfo;
10
14
  LoxoneItems: Controls;
11
15
  readonly Service: typeof Service;
12
16
  readonly Characteristic: typeof Characteristic;
13
17
  readonly accessories: PlatformAccessory[];
14
- mappedAccessories: Set<string>;
15
- private usedNames;
16
- private accessoryNameMap;
18
+ readonly accessoryReconciler: AccessoryReconciler;
19
+ readonly commandBus: LoxoneCommandBus;
20
+ readonly stateRouter: LoxoneStateRouter;
21
+ private readonly nameRegistry;
22
+ private readonly controlMapper;
17
23
  constructor(log: Logger, config: PlatformConfig, api: API);
18
24
  LoxoneInit(): Promise<void>;
19
25
  waitForLoxoneConfig(): Promise<void>;
20
26
  parseLoxoneConfig(config: StructureFile): void;
21
- mapLoxoneItems(items: Control[]): Promise<void>;
27
+ mapLoxoneItems(items: Control[]): void;
22
28
  removeUnmappedAccessories(): void;
23
29
  configureAccessory(acc: PlatformAccessory): void;
24
30
  generateUniqueName(room: string, base: string, uuid?: string, isSubItem?: boolean): string;
@@ -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,M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