@fastybird/smart-panel-backend 1.1.0-alpha.0 → 1.1.0-alpha.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 (315) hide show
  1. package/dist/app.module.js +14 -0
  2. package/dist/app.module.js.map +1 -1
  3. package/dist/common/filters/conflict-exception.filter.d.ts +6 -0
  4. package/dist/common/filters/conflict-exception.filter.js +59 -0
  5. package/dist/common/filters/conflict-exception.filter.js.map +1 -0
  6. package/dist/common/filters/global-error.filter.js +1 -4
  7. package/dist/common/filters/global-error.filter.js.map +1 -1
  8. package/dist/common/filters/global-filters.d.ts +3 -0
  9. package/dist/common/filters/global-filters.js +22 -0
  10. package/dist/common/filters/global-filters.js.map +1 -0
  11. package/dist/common/filters/unprocessable-entity-exception.filter.d.ts +1 -0
  12. package/dist/common/filters/unprocessable-entity-exception.filter.js +15 -3
  13. package/dist/common/filters/unprocessable-entity-exception.filter.js.map +1 -1
  14. package/dist/common/utils/transform.utils.js +3 -0
  15. package/dist/common/utils/transform.utils.js.map +1 -1
  16. package/dist/main.js +2 -7
  17. package/dist/main.js.map +1 -1
  18. package/dist/modules/devices/controllers/channels.properties.controller.js +16 -4
  19. package/dist/modules/devices/controllers/channels.properties.controller.js.map +1 -1
  20. package/dist/modules/devices/controllers/devices.channels.properties.controller.js +16 -4
  21. package/dist/modules/devices/controllers/devices.channels.properties.controller.js.map +1 -1
  22. package/dist/modules/devices/devices.module.js +12 -0
  23. package/dist/modules/devices/devices.module.js.map +1 -1
  24. package/dist/modules/devices/services/channels.properties.service.d.ts +27 -3
  25. package/dist/modules/devices/services/channels.properties.service.js +304 -28
  26. package/dist/modules/devices/services/channels.properties.service.js.map +1 -1
  27. package/dist/modules/devices/services/channels.service.js +42 -38
  28. package/dist/modules/devices/services/channels.service.js.map +1 -1
  29. package/dist/modules/devices/services/command-latency-trace-collector.service.d.ts +101 -0
  30. package/dist/modules/devices/services/command-latency-trace-collector.service.js +451 -0
  31. package/dist/modules/devices/services/command-latency-trace-collector.service.js.map +1 -0
  32. package/dist/modules/devices/services/device-structure-lock.service.d.ts +10 -2
  33. package/dist/modules/devices/services/device-structure-lock.service.js +86 -7
  34. package/dist/modules/devices/services/device-structure-lock.service.js.map +1 -1
  35. package/dist/modules/devices/services/devices.service.js +37 -33
  36. package/dist/modules/devices/services/devices.service.js.map +1 -1
  37. package/dist/modules/devices/services/module-reset.service.d.ts +3 -1
  38. package/dist/modules/devices/services/module-reset.service.js +21 -16
  39. package/dist/modules/devices/services/module-reset.service.js.map +1 -1
  40. package/dist/modules/devices/services/property-command-dispatch.service.d.ts +45 -0
  41. package/dist/modules/devices/services/property-command-dispatch.service.js +227 -0
  42. package/dist/modules/devices/services/property-command-dispatch.service.js.map +1 -0
  43. package/dist/modules/devices/services/property-command-window.service.d.ts +71 -0
  44. package/dist/modules/devices/services/property-command-window.service.js +204 -0
  45. package/dist/modules/devices/services/property-command-window.service.js.map +1 -0
  46. package/dist/modules/devices/services/property-command.service.d.ts +28 -3
  47. package/dist/modules/devices/services/property-command.service.js +171 -10
  48. package/dist/modules/devices/services/property-command.service.js.map +1 -1
  49. package/dist/modules/devices/services/property-state-coordinator.service.d.ts +4 -0
  50. package/dist/modules/devices/services/property-state-coordinator.service.js +35 -0
  51. package/dist/modules/devices/services/property-state-coordinator.service.js.map +1 -0
  52. package/dist/modules/devices/services/property-value.service.d.ts +1 -0
  53. package/dist/modules/devices/services/property-value.service.js +4 -0
  54. package/dist/modules/devices/services/property-value.service.js.map +1 -1
  55. package/dist/modules/mcp/oauth/mcp-oauth-provider.factory.js.map +1 -1
  56. package/dist/modules/platform/services/platform.service.d.ts +13 -4
  57. package/dist/modules/platform/services/platform.service.js +57 -35
  58. package/dist/modules/platform/services/platform.service.js.map +1 -1
  59. package/dist/modules/remote-access/dto/update-config.dto.js +5 -0
  60. package/dist/modules/remote-access/dto/update-config.dto.js.map +1 -1
  61. package/dist/modules/remote-access/services/remote-access-proxy-contribution.service.js +4 -0
  62. package/dist/modules/remote-access/services/remote-access-proxy-contribution.service.js.map +1 -1
  63. package/dist/modules/remote-access/services/remote-access-status.service.d.ts +5 -1
  64. package/dist/modules/remote-access/services/remote-access-status.service.js +38 -4
  65. package/dist/modules/remote-access/services/remote-access-status.service.js.map +1 -1
  66. package/dist/modules/remote-access/services/remote-access-url.service.js +4 -0
  67. package/dist/modules/remote-access/services/remote-access-url.service.js.map +1 -1
  68. package/dist/modules/remote-access/validators/is-remote-access-url.validator.js +5 -2
  69. package/dist/modules/remote-access/validators/is-remote-access-url.validator.js.map +1 -1
  70. package/dist/modules/system/commands/command.utils.d.ts +2 -0
  71. package/dist/modules/system/commands/command.utils.js +14 -0
  72. package/dist/modules/system/commands/command.utils.js.map +1 -1
  73. package/dist/modules/system/commands/update-check.command.js +2 -3
  74. package/dist/modules/system/commands/update-check.command.js.map +1 -1
  75. package/dist/modules/system/commands/update-panel.command.js +2 -2
  76. package/dist/modules/system/commands/update-panel.command.js.map +1 -1
  77. package/dist/modules/system/commands/update-server.command.d.ts +1 -0
  78. package/dist/modules/system/commands/update-server.command.js +36 -11
  79. package/dist/modules/system/commands/update-server.command.js.map +1 -1
  80. package/dist/modules/system/dto/update-config.dto.d.ts +2 -1
  81. package/dist/modules/system/dto/update-config.dto.js +15 -0
  82. package/dist/modules/system/dto/update-config.dto.js.map +1 -1
  83. package/dist/modules/system/models/config.model.d.ts +2 -1
  84. package/dist/modules/system/models/config.model.js +13 -0
  85. package/dist/modules/system/models/config.model.js.map +1 -1
  86. package/dist/modules/system/services/privileged-worker.service.d.ts +10 -0
  87. package/dist/modules/system/services/privileged-worker.service.js +137 -11
  88. package/dist/modules/system/services/privileged-worker.service.js.map +1 -1
  89. package/dist/modules/system/services/update.service.d.ts +11 -1
  90. package/dist/modules/system/services/update.service.js +97 -35
  91. package/dist/modules/system/services/update.service.js.map +1 -1
  92. package/dist/modules/system/system.constants.d.ts +6 -0
  93. package/dist/modules/system/system.constants.js +8 -1
  94. package/dist/modules/system/system.constants.js.map +1 -1
  95. package/dist/modules/websocket/gateway/websocket.gateway.d.ts +7 -1
  96. package/dist/modules/websocket/gateway/websocket.gateway.js +67 -9
  97. package/dist/modules/websocket/gateway/websocket.gateway.js.map +1 -1
  98. package/dist/modules/websocket/services/command-acknowledgement-trace.service.d.ts +143 -0
  99. package/dist/modules/websocket/services/command-acknowledgement-trace.service.js +523 -0
  100. package/dist/modules/websocket/services/command-acknowledgement-trace.service.js.map +1 -0
  101. package/dist/modules/websocket/websocket.module.js +9 -1
  102. package/dist/modules/websocket/websocket.module.js.map +1 -1
  103. package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js +2 -1
  104. package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js.map +1 -1
  105. package/dist/plugins/devices-home-assistant/services/state-changed.event.service.js +2 -3
  106. package/dist/plugins/devices-home-assistant/services/state-changed.event.service.js.map +1 -1
  107. package/dist/plugins/devices-homekit/controllers/homekit-bridge.controller.d.ts +14 -0
  108. package/dist/plugins/devices-homekit/controllers/homekit-bridge.controller.js +125 -0
  109. package/dist/plugins/devices-homekit/controllers/homekit-bridge.controller.js.map +1 -0
  110. package/dist/plugins/devices-homekit/devices-homekit.constants.d.ts +16 -0
  111. package/dist/plugins/devices-homekit/devices-homekit.constants.js +57 -0
  112. package/dist/plugins/devices-homekit/devices-homekit.constants.js.map +1 -0
  113. package/dist/plugins/devices-homekit/devices-homekit.exceptions.d.ts +12 -0
  114. package/dist/plugins/devices-homekit/devices-homekit.exceptions.js +32 -0
  115. package/dist/plugins/devices-homekit/devices-homekit.exceptions.js.map +1 -0
  116. package/dist/plugins/devices-homekit/devices-homekit.openapi.d.ts +6 -0
  117. package/dist/plugins/devices-homekit/devices-homekit.openapi.js +19 -0
  118. package/dist/plugins/devices-homekit/devices-homekit.openapi.js.map +1 -0
  119. package/dist/plugins/devices-homekit/devices-homekit.plugin.d.ts +24 -0
  120. package/dist/plugins/devices-homekit/devices-homekit.plugin.js +183 -0
  121. package/dist/plugins/devices-homekit/devices-homekit.plugin.js.map +1 -0
  122. package/dist/plugins/devices-homekit/dto/bridge-map.dto.d.ts +6 -0
  123. package/dist/plugins/devices-homekit/dto/bridge-map.dto.js +50 -0
  124. package/dist/plugins/devices-homekit/dto/bridge-map.dto.js.map +1 -0
  125. package/dist/plugins/devices-homekit/dto/update-config.dto.d.ts +11 -0
  126. package/dist/plugins/devices-homekit/dto/update-config.dto.js +138 -0
  127. package/dist/plugins/devices-homekit/dto/update-config.dto.js.map +1 -0
  128. package/dist/plugins/devices-homekit/listeners/homekit-event.listener.d.ts +8 -0
  129. package/dist/plugins/devices-homekit/listeners/homekit-event.listener.js +77 -0
  130. package/dist/plugins/devices-homekit/listeners/homekit-event.listener.js.map +1 -0
  131. package/dist/plugins/devices-homekit/mappers/base.mapper.d.ts +15 -0
  132. package/dist/plugins/devices-homekit/mappers/base.mapper.js +97 -0
  133. package/dist/plugins/devices-homekit/mappers/base.mapper.js.map +1 -0
  134. package/dist/plugins/devices-homekit/mappers/battery.mapper.d.ts +6 -0
  135. package/dist/plugins/devices-homekit/mappers/battery.mapper.js +130 -0
  136. package/dist/plugins/devices-homekit/mappers/battery.mapper.js.map +1 -0
  137. package/dist/plugins/devices-homekit/mappers/homekit-mapper.interface.d.ts +36 -0
  138. package/dist/plugins/devices-homekit/mappers/homekit-mapper.interface.js +3 -0
  139. package/dist/plugins/devices-homekit/mappers/homekit-mapper.interface.js.map +1 -0
  140. package/dist/plugins/devices-homekit/mappers/lightbulb.mapper.d.ts +9 -0
  141. package/dist/plugins/devices-homekit/mappers/lightbulb.mapper.js +115 -0
  142. package/dist/plugins/devices-homekit/mappers/lightbulb.mapper.js.map +1 -0
  143. package/dist/plugins/devices-homekit/mappers/lock.mapper.d.ts +10 -0
  144. package/dist/plugins/devices-homekit/mappers/lock.mapper.js +59 -0
  145. package/dist/plugins/devices-homekit/mappers/lock.mapper.js.map +1 -0
  146. package/dist/plugins/devices-homekit/mappers/outlet.mapper.d.ts +9 -0
  147. package/dist/plugins/devices-homekit/mappers/outlet.mapper.js +44 -0
  148. package/dist/plugins/devices-homekit/mappers/outlet.mapper.js.map +1 -0
  149. package/dist/plugins/devices-homekit/mappers/sensor.mapper.d.ts +10 -0
  150. package/dist/plugins/devices-homekit/mappers/sensor.mapper.js +168 -0
  151. package/dist/plugins/devices-homekit/mappers/sensor.mapper.js.map +1 -0
  152. package/dist/plugins/devices-homekit/mappers/switch.mapper.d.ts +9 -0
  153. package/dist/plugins/devices-homekit/mappers/switch.mapper.js +35 -0
  154. package/dist/plugins/devices-homekit/mappers/switch.mapper.js.map +1 -0
  155. package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.d.ts +50 -0
  156. package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.js +441 -0
  157. package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.js.map +1 -0
  158. package/dist/plugins/devices-homekit/mappers/thermostat.mapper.d.ts +11 -0
  159. package/dist/plugins/devices-homekit/mappers/thermostat.mapper.js +97 -0
  160. package/dist/plugins/devices-homekit/mappers/thermostat.mapper.js.map +1 -0
  161. package/dist/plugins/devices-homekit/mappers/window-covering.mapper.d.ts +10 -0
  162. package/dist/plugins/devices-homekit/mappers/window-covering.mapper.js +94 -0
  163. package/dist/plugins/devices-homekit/mappers/window-covering.mapper.js.map +1 -0
  164. package/dist/plugins/devices-homekit/models/bridge-candidate.model.d.ts +15 -0
  165. package/dist/plugins/devices-homekit/models/bridge-candidate.model.js +150 -0
  166. package/dist/plugins/devices-homekit/models/bridge-candidate.model.js.map +1 -0
  167. package/dist/plugins/devices-homekit/models/bridge-status.model.d.ts +16 -0
  168. package/dist/plugins/devices-homekit/models/bridge-status.model.js +156 -0
  169. package/dist/plugins/devices-homekit/models/bridge-status.model.js.map +1 -0
  170. package/dist/plugins/devices-homekit/models/config.model.d.ts +12 -0
  171. package/dist/plugins/devices-homekit/models/config.model.js +134 -0
  172. package/dist/plugins/devices-homekit/models/config.model.js.map +1 -0
  173. package/dist/plugins/devices-homekit/services/homekit-actions.service.d.ts +14 -0
  174. package/dist/plugins/devices-homekit/services/homekit-actions.service.js +92 -0
  175. package/dist/plugins/devices-homekit/services/homekit-actions.service.js.map +1 -0
  176. package/dist/plugins/devices-homekit/services/homekit-bridge.service.d.ts +43 -0
  177. package/dist/plugins/devices-homekit/services/homekit-bridge.service.js +497 -0
  178. package/dist/plugins/devices-homekit/services/homekit-bridge.service.js.map +1 -0
  179. package/dist/plugins/devices-homekit/services/homekit-command.dispatcher.d.ts +11 -0
  180. package/dist/plugins/devices-homekit/services/homekit-command.dispatcher.js +68 -0
  181. package/dist/plugins/devices-homekit/services/homekit-command.dispatcher.js.map +1 -0
  182. package/dist/plugins/devices-homekit/services/homekit-mapper-registry.service.d.ts +34 -0
  183. package/dist/plugins/devices-homekit/services/homekit-mapper-registry.service.js +179 -0
  184. package/dist/plugins/devices-homekit/services/homekit-mapper-registry.service.js.map +1 -0
  185. package/dist/plugins/devices-homekit/services/homekit-wizard.service.d.ts +15 -0
  186. package/dist/plugins/devices-homekit/services/homekit-wizard.service.js +75 -0
  187. package/dist/plugins/devices-homekit/services/homekit-wizard.service.js.map +1 -0
  188. package/dist/plugins/devices-homekit/validators/is-not-forbidden-homekit-pin.validator.d.ts +2 -0
  189. package/dist/plugins/devices-homekit/validators/is-not-forbidden-homekit-pin.validator.js +30 -0
  190. package/dist/plugins/devices-homekit/validators/is-not-forbidden-homekit-pin.validator.js.map +1 -0
  191. package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.d.ts +18 -1
  192. package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.js +338 -119
  193. package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.js.map +1 -1
  194. package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.d.ts +13 -1
  195. package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js +109 -10
  196. package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js.map +1 -1
  197. package/dist/plugins/devices-shelly-ng/devices-shelly-ng.constants.js +8 -11
  198. package/dist/plugins/devices-shelly-ng/devices-shelly-ng.constants.js.map +1 -1
  199. package/dist/plugins/devices-shelly-ng/mappings/mapping-loader.service.js +4 -0
  200. package/dist/plugins/devices-shelly-ng/mappings/mapping-loader.service.js.map +1 -1
  201. package/dist/plugins/devices-shelly-ng/services/device-manager.service.js +5 -0
  202. package/dist/plugins/devices-shelly-ng/services/device-manager.service.js.map +1 -1
  203. package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.d.ts +9 -1
  204. package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js +59 -24
  205. package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js.map +1 -1
  206. package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.d.ts +0 -1
  207. package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js +5 -12
  208. package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js.map +1 -1
  209. package/dist/plugins/devices-shelly-ng/utils/transform.utils.d.ts +2 -0
  210. package/dist/plugins/devices-shelly-ng/utils/transform.utils.js +14 -1
  211. package/dist/plugins/devices-shelly-ng/utils/transform.utils.js.map +1 -1
  212. package/dist/plugins/remote-access-cloudflare-tunnel/controllers/setup.controller.d.ts +17 -0
  213. package/dist/plugins/remote-access-cloudflare-tunnel/controllers/setup.controller.js +147 -0
  214. package/dist/plugins/remote-access-cloudflare-tunnel/controllers/setup.controller.js.map +1 -0
  215. package/dist/plugins/remote-access-cloudflare-tunnel/controllers/status.controller.d.ts +15 -0
  216. package/dist/plugins/remote-access-cloudflare-tunnel/controllers/status.controller.js +98 -0
  217. package/dist/plugins/remote-access-cloudflare-tunnel/controllers/status.controller.js.map +1 -0
  218. package/dist/plugins/remote-access-cloudflare-tunnel/dto/update-config.dto.d.ts +9 -0
  219. package/dist/plugins/remote-access-cloudflare-tunnel/dto/update-config.dto.js +94 -0
  220. package/dist/plugins/remote-access-cloudflare-tunnel/dto/update-config.dto.js.map +1 -0
  221. package/dist/plugins/remote-access-cloudflare-tunnel/models/config.model.d.ts +9 -0
  222. package/dist/plugins/remote-access-cloudflare-tunnel/models/config.model.js +92 -0
  223. package/dist/plugins/remote-access-cloudflare-tunnel/models/config.model.js.map +1 -0
  224. package/dist/plugins/remote-access-cloudflare-tunnel/models/install.model.d.ts +7 -0
  225. package/dist/plugins/remote-access-cloudflare-tunnel/models/install.model.js +48 -0
  226. package/dist/plugins/remote-access-cloudflare-tunnel/models/install.model.js.map +1 -0
  227. package/dist/plugins/remote-access-cloudflare-tunnel/models/status.model.d.ts +42 -0
  228. package/dist/plugins/remote-access-cloudflare-tunnel/models/status.model.js +352 -0
  229. package/dist/plugins/remote-access-cloudflare-tunnel/models/status.model.js.map +1 -0
  230. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.constants.d.ts +24 -0
  231. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.constants.js +27 -0
  232. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.constants.js.map +1 -0
  233. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.exceptions.d.ts +8 -0
  234. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.exceptions.js +19 -0
  235. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.exceptions.js.map +1 -0
  236. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.openapi.d.ts +4 -0
  237. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.openapi.js +20 -0
  238. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.openapi.js.map +1 -0
  239. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.plugin.d.ts +21 -0
  240. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.plugin.js +135 -0
  241. package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.plugin.js.map +1 -0
  242. package/dist/plugins/remote-access-cloudflare-tunnel/scripts/cloudflared-setup.sh +185 -0
  243. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-managed.service.d.ts +82 -0
  244. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-managed.service.js +507 -0
  245. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-managed.service.js.map +1 -0
  246. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-provider.service.d.ts +10 -0
  247. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-provider.service.js +37 -0
  248. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-provider.service.js.map +1 -0
  249. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-setup.service.d.ts +38 -0
  250. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-setup.service.js +147 -0
  251. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-setup.service.js.map +1 -0
  252. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-cli.service.d.ts +15 -0
  253. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-cli.service.js +67 -0
  254. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-cli.service.js.map +1 -0
  255. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-metrics.service.d.ts +8 -0
  256. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-metrics.service.js +46 -0
  257. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-metrics.service.js.map +1 -0
  258. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-process.service.d.ts +27 -0
  259. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-process.service.js +139 -0
  260. package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-process.service.js.map +1 -0
  261. package/dist/plugins/remote-access-tailscale/controllers/setup.controller.d.ts +1 -0
  262. package/dist/plugins/remote-access-tailscale/controllers/setup.controller.js +26 -10
  263. package/dist/plugins/remote-access-tailscale/controllers/setup.controller.js.map +1 -1
  264. package/dist/plugins/remote-access-tailscale/controllers/status.controller.d.ts +6 -1
  265. package/dist/plugins/remote-access-tailscale/controllers/status.controller.js +28 -3
  266. package/dist/plugins/remote-access-tailscale/controllers/status.controller.js.map +1 -1
  267. package/dist/plugins/remote-access-tailscale/models/status.model.d.ts +19 -0
  268. package/dist/plugins/remote-access-tailscale/models/status.model.js +158 -1
  269. package/dist/plugins/remote-access-tailscale/models/status.model.js.map +1 -1
  270. package/dist/plugins/remote-access-tailscale/remote-access-tailscale.constants.d.ts +2 -0
  271. package/dist/plugins/remote-access-tailscale/remote-access-tailscale.constants.js +3 -1
  272. package/dist/plugins/remote-access-tailscale/remote-access-tailscale.constants.js.map +1 -1
  273. package/dist/plugins/remote-access-tailscale/remote-access-tailscale.exceptions.d.ts +13 -0
  274. package/dist/plugins/remote-access-tailscale/remote-access-tailscale.exceptions.js +27 -0
  275. package/dist/plugins/remote-access-tailscale/remote-access-tailscale.exceptions.js.map +1 -0
  276. package/dist/plugins/remote-access-tailscale/remote-access-tailscale.openapi.d.ts +2 -2
  277. package/dist/plugins/remote-access-tailscale/remote-access-tailscale.openapi.js +2 -0
  278. package/dist/plugins/remote-access-tailscale/remote-access-tailscale.openapi.js.map +1 -1
  279. package/dist/plugins/remote-access-tailscale/remote-access-tailscale.plugin.js +1 -1
  280. package/dist/plugins/remote-access-tailscale/scripts/tailscale-setup.sh +61 -0
  281. package/dist/plugins/remote-access-tailscale/services/tailscale-cli.service.d.ts +9 -0
  282. package/dist/plugins/remote-access-tailscale/services/tailscale-cli.service.js +12 -0
  283. package/dist/plugins/remote-access-tailscale/services/tailscale-cli.service.js.map +1 -1
  284. package/dist/plugins/remote-access-tailscale/services/tailscale-login.service.d.ts +1 -0
  285. package/dist/plugins/remote-access-tailscale/services/tailscale-login.service.js +27 -2
  286. package/dist/plugins/remote-access-tailscale/services/tailscale-login.service.js.map +1 -1
  287. package/dist/plugins/remote-access-tailscale/services/tailscale-node-managed.service.d.ts +30 -1
  288. package/dist/plugins/remote-access-tailscale/services/tailscale-node-managed.service.js +300 -30
  289. package/dist/plugins/remote-access-tailscale/services/tailscale-node-managed.service.js.map +1 -1
  290. package/dist/plugins/remote-access-tailscale/services/tailscale-serve.service.d.ts +8 -3
  291. package/dist/plugins/remote-access-tailscale/services/tailscale-serve.service.js +39 -12
  292. package/dist/plugins/remote-access-tailscale/services/tailscale-serve.service.js.map +1 -1
  293. package/dist/plugins/remote-access-tailscale/services/tailscale-setup.service.d.ts +14 -5
  294. package/dist/plugins/remote-access-tailscale/services/tailscale-setup.service.js +51 -16
  295. package/dist/plugins/remote-access-tailscale/services/tailscale-setup.service.js.map +1 -1
  296. package/dist/plugins/scenes-local/platforms/local-scene.platform.d.ts +3 -1
  297. package/dist/plugins/scenes-local/platforms/local-scene.platform.js +12 -7
  298. package/dist/plugins/scenes-local/platforms/local-scene.platform.js.map +1 -1
  299. package/dist/plugins/spaces-home-control/services/climate-intent.service.d.ts +3 -1
  300. package/dist/plugins/spaces-home-control/services/climate-intent.service.js +6 -3
  301. package/dist/plugins/spaces-home-control/services/climate-intent.service.js.map +1 -1
  302. package/dist/plugins/spaces-home-control/services/covers-intent.service.d.ts +3 -1
  303. package/dist/plugins/spaces-home-control/services/covers-intent.service.js +6 -3
  304. package/dist/plugins/spaces-home-control/services/covers-intent.service.js.map +1 -1
  305. package/dist/plugins/spaces-home-control/services/lighting-intent.service.d.ts +3 -1
  306. package/dist/plugins/spaces-home-control/services/lighting-intent.service.js +7 -4
  307. package/dist/plugins/spaces-home-control/services/lighting-intent.service.js.map +1 -1
  308. package/dist/plugins/spaces-home-control/services/space-media-activity.service.d.ts +3 -1
  309. package/dist/plugins/spaces-home-control/services/space-media-activity.service.js +11 -5
  310. package/dist/plugins/spaces-home-control/services/space-media-activity.service.js.map +1 -1
  311. package/dist/plugins/spaces-home-control/services/space-undo-history.service.d.ts +3 -1
  312. package/dist/plugins/spaces-home-control/services/space-undo-history.service.js +8 -5
  313. package/dist/plugins/spaces-home-control/services/space-undo-history.service.js.map +1 -1
  314. package/dist/tsconfig.build.tsbuildinfo +1 -1
  315. package/package.json +5 -2
@@ -0,0 +1,168 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SensorMapper = void 0;
4
+ const hap_nodejs_1 = require("@homebridge/hap-nodejs");
5
+ const devices_constants_1 = require("../../../modules/devices/devices.constants");
6
+ const base_mapper_1 = require("./base.mapper");
7
+ const SENSOR_CHANNEL_CATEGORIES = [
8
+ devices_constants_1.ChannelCategory.TEMPERATURE,
9
+ devices_constants_1.ChannelCategory.HUMIDITY,
10
+ devices_constants_1.ChannelCategory.MOTION,
11
+ devices_constants_1.ChannelCategory.CONTACT,
12
+ devices_constants_1.ChannelCategory.OCCUPANCY,
13
+ devices_constants_1.ChannelCategory.ILLUMINANCE,
14
+ devices_constants_1.ChannelCategory.LEAK,
15
+ devices_constants_1.ChannelCategory.SMOKE,
16
+ ];
17
+ class SensorMapper extends base_mapper_1.BaseHomeKitMapper {
18
+ canMap(device) {
19
+ return (this.hasValidSensorChannel(device, devices_constants_1.ChannelCategory.TEMPERATURE, devices_constants_1.PropertyCategory.TEMPERATURE) ||
20
+ this.hasValidSensorChannel(device, devices_constants_1.ChannelCategory.HUMIDITY, devices_constants_1.PropertyCategory.HUMIDITY) ||
21
+ this.hasValidSensorChannel(device, devices_constants_1.ChannelCategory.MOTION, devices_constants_1.PropertyCategory.DETECTED) ||
22
+ this.hasValidSensorChannel(device, devices_constants_1.ChannelCategory.CONTACT, devices_constants_1.PropertyCategory.DETECTED) ||
23
+ this.hasValidSensorChannel(device, devices_constants_1.ChannelCategory.OCCUPANCY, devices_constants_1.PropertyCategory.DETECTED) ||
24
+ this.hasValidSensorChannel(device, devices_constants_1.ChannelCategory.ILLUMINANCE, devices_constants_1.PropertyCategory.ILLUMINANCE) ||
25
+ this.hasValidSensorChannel(device, devices_constants_1.ChannelCategory.LEAK, devices_constants_1.PropertyCategory.DETECTED) ||
26
+ this.hasValidSensorChannel(device, devices_constants_1.ChannelCategory.SMOKE, devices_constants_1.PropertyCategory.DETECTED));
27
+ }
28
+ hasValidSensorChannel(device, channelCategory, propertyCategory) {
29
+ const channels = this.findChannels(device, channelCategory);
30
+ return channels.some((ch) => !!this.findProperty(ch, propertyCategory));
31
+ }
32
+ getSuggestedServiceType(device) {
33
+ for (const category of SENSOR_CHANNEL_CATEGORIES) {
34
+ if (this.findChannel(device, category)) {
35
+ return `sensor_${category}`;
36
+ }
37
+ }
38
+ return 'sensor';
39
+ }
40
+ buildAccessory(device, context) {
41
+ const accessory = this.createBaseAccessory(device, 10);
42
+ let addedService = false;
43
+ const tempChannels = this.findChannels(device, devices_constants_1.ChannelCategory.TEMPERATURE).filter((ch) => !!this.findProperty(ch, devices_constants_1.PropertyCategory.TEMPERATURE));
44
+ for (const tempChannel of tempChannels) {
45
+ const tempProp = this.findProperty(tempChannel, devices_constants_1.PropertyCategory.TEMPERATURE);
46
+ const serviceName = tempChannels.length === 1
47
+ ? `${device.name} Temperature`
48
+ : `${device.name} Temperature ${tempChannel.name || tempChannel.id}`;
49
+ const tempService = accessory.addService(hap_nodejs_1.Service.TemperatureSensor, serviceName, tempChannel.id);
50
+ const tempChar = tempService.getCharacteristic(hap_nodejs_1.Characteristic.CurrentTemperature);
51
+ this.bindCharacteristic(context, device, tempChannel, tempProp, tempChar, (val) => {
52
+ const unwrapped = this.unwrapValue(val);
53
+ const num = Number(unwrapped);
54
+ return isNaN(num) ? 0 : num;
55
+ });
56
+ addedService = true;
57
+ }
58
+ const humChannels = this.findChannels(device, devices_constants_1.ChannelCategory.HUMIDITY).filter((ch) => !!this.findProperty(ch, devices_constants_1.PropertyCategory.HUMIDITY));
59
+ for (const humChannel of humChannels) {
60
+ const humProp = this.findProperty(humChannel, devices_constants_1.PropertyCategory.HUMIDITY);
61
+ const serviceName = humChannels.length === 1
62
+ ? `${device.name} Humidity`
63
+ : `${device.name} Humidity ${humChannel.name || humChannel.id}`;
64
+ const humService = accessory.addService(hap_nodejs_1.Service.HumiditySensor, serviceName, humChannel.id);
65
+ const humChar = humService.getCharacteristic(hap_nodejs_1.Characteristic.CurrentRelativeHumidity);
66
+ this.bindCharacteristic(context, device, humChannel, humProp, humChar, (val) => {
67
+ const unwrapped = this.unwrapValue(val);
68
+ const num = Number(unwrapped);
69
+ return isNaN(num) ? 0 : Math.min(100, Math.max(0, num));
70
+ });
71
+ addedService = true;
72
+ }
73
+ const motionChannels = this.findChannels(device, devices_constants_1.ChannelCategory.MOTION).filter((ch) => !!this.findProperty(ch, devices_constants_1.PropertyCategory.DETECTED));
74
+ for (const motionChannel of motionChannels) {
75
+ const motionProp = this.findProperty(motionChannel, devices_constants_1.PropertyCategory.DETECTED);
76
+ const serviceName = motionChannels.length === 1
77
+ ? `${device.name} Motion`
78
+ : `${device.name} Motion ${motionChannel.name || motionChannel.id}`;
79
+ const motionService = accessory.addService(hap_nodejs_1.Service.MotionSensor, serviceName, motionChannel.id);
80
+ const motionChar = motionService.getCharacteristic(hap_nodejs_1.Characteristic.MotionDetected);
81
+ this.bindCharacteristic(context, device, motionChannel, motionProp, motionChar, (val) => {
82
+ const unwrapped = this.unwrapValue(val);
83
+ return Boolean(unwrapped === true || unwrapped === 'true' || unwrapped === 1);
84
+ });
85
+ addedService = true;
86
+ }
87
+ const contactChannels = this.findChannels(device, devices_constants_1.ChannelCategory.CONTACT).filter((ch) => !!this.findProperty(ch, devices_constants_1.PropertyCategory.DETECTED));
88
+ for (const contactChannel of contactChannels) {
89
+ const contactProp = this.findProperty(contactChannel, devices_constants_1.PropertyCategory.DETECTED);
90
+ const serviceName = contactChannels.length === 1
91
+ ? `${device.name} Contact`
92
+ : `${device.name} Contact ${contactChannel.name || contactChannel.id}`;
93
+ const contactService = accessory.addService(hap_nodejs_1.Service.ContactSensor, serviceName, contactChannel.id);
94
+ const contactChar = contactService.getCharacteristic(hap_nodejs_1.Characteristic.ContactSensorState);
95
+ this.bindCharacteristic(context, device, contactChannel, contactProp, contactChar, (val) => {
96
+ const unwrapped = this.unwrapValue(val);
97
+ const isOpen = Boolean(unwrapped === true || unwrapped === 'true' || unwrapped === 1 || unwrapped === 'open');
98
+ return isOpen
99
+ ? hap_nodejs_1.Characteristic.ContactSensorState.CONTACT_NOT_DETECTED
100
+ : hap_nodejs_1.Characteristic.ContactSensorState.CONTACT_DETECTED;
101
+ });
102
+ addedService = true;
103
+ }
104
+ const occChannels = this.findChannels(device, devices_constants_1.ChannelCategory.OCCUPANCY).filter((ch) => !!this.findProperty(ch, devices_constants_1.PropertyCategory.DETECTED));
105
+ for (const occChannel of occChannels) {
106
+ const occProp = this.findProperty(occChannel, devices_constants_1.PropertyCategory.DETECTED);
107
+ const serviceName = occChannels.length === 1
108
+ ? `${device.name} Occupancy`
109
+ : `${device.name} Occupancy ${occChannel.name || occChannel.id}`;
110
+ const occService = accessory.addService(hap_nodejs_1.Service.OccupancySensor, serviceName, occChannel.id);
111
+ const occChar = occService.getCharacteristic(hap_nodejs_1.Characteristic.OccupancyDetected);
112
+ this.bindCharacteristic(context, device, occChannel, occProp, occChar, (val) => {
113
+ const unwrapped = this.unwrapValue(val);
114
+ const isOcc = Boolean(unwrapped === true || unwrapped === 'true' || unwrapped === 1);
115
+ return isOcc
116
+ ? hap_nodejs_1.Characteristic.OccupancyDetected.OCCUPANCY_DETECTED
117
+ : hap_nodejs_1.Characteristic.OccupancyDetected.OCCUPANCY_NOT_DETECTED;
118
+ });
119
+ addedService = true;
120
+ }
121
+ const lightChannels = this.findChannels(device, devices_constants_1.ChannelCategory.ILLUMINANCE).filter((ch) => !!this.findProperty(ch, devices_constants_1.PropertyCategory.ILLUMINANCE));
122
+ for (const lightChannel of lightChannels) {
123
+ const lightProp = this.findProperty(lightChannel, devices_constants_1.PropertyCategory.ILLUMINANCE);
124
+ const serviceName = lightChannels.length === 1
125
+ ? `${device.name} Light Level`
126
+ : `${device.name} Light Level ${lightChannel.name || lightChannel.id}`;
127
+ const lightService = accessory.addService(hap_nodejs_1.Service.LightSensor, serviceName, lightChannel.id);
128
+ const lightChar = lightService.getCharacteristic(hap_nodejs_1.Characteristic.CurrentAmbientLightLevel);
129
+ this.bindCharacteristic(context, device, lightChannel, lightProp, lightChar, (val) => {
130
+ const unwrapped = this.unwrapValue(val);
131
+ const num = Number(unwrapped);
132
+ return isNaN(num) || num <= 0 ? 0.0001 : num;
133
+ });
134
+ addedService = true;
135
+ }
136
+ const leakChannels = this.findChannels(device, devices_constants_1.ChannelCategory.LEAK).filter((ch) => !!this.findProperty(ch, devices_constants_1.PropertyCategory.DETECTED));
137
+ for (const leakChannel of leakChannels) {
138
+ const leakProp = this.findProperty(leakChannel, devices_constants_1.PropertyCategory.DETECTED);
139
+ const serviceName = leakChannels.length === 1 ? `${device.name} Leak` : `${device.name} Leak ${leakChannel.name || leakChannel.id}`;
140
+ const leakService = accessory.addService(hap_nodejs_1.Service.LeakSensor, serviceName, leakChannel.id);
141
+ const leakChar = leakService.getCharacteristic(hap_nodejs_1.Characteristic.LeakDetected);
142
+ this.bindCharacteristic(context, device, leakChannel, leakProp, leakChar, (val) => {
143
+ const unwrapped = this.unwrapValue(val);
144
+ const isLeak = Boolean(unwrapped === true || unwrapped === 'true' || unwrapped === 1);
145
+ return isLeak ? hap_nodejs_1.Characteristic.LeakDetected.LEAK_DETECTED : hap_nodejs_1.Characteristic.LeakDetected.LEAK_NOT_DETECTED;
146
+ });
147
+ addedService = true;
148
+ }
149
+ const smokeChannels = this.findChannels(device, devices_constants_1.ChannelCategory.SMOKE).filter((ch) => !!this.findProperty(ch, devices_constants_1.PropertyCategory.DETECTED));
150
+ for (const smokeChannel of smokeChannels) {
151
+ const smokeProp = this.findProperty(smokeChannel, devices_constants_1.PropertyCategory.DETECTED);
152
+ const serviceName = smokeChannels.length === 1
153
+ ? `${device.name} Smoke`
154
+ : `${device.name} Smoke ${smokeChannel.name || smokeChannel.id}`;
155
+ const smokeService = accessory.addService(hap_nodejs_1.Service.SmokeSensor, serviceName, smokeChannel.id);
156
+ const smokeChar = smokeService.getCharacteristic(hap_nodejs_1.Characteristic.SmokeDetected);
157
+ this.bindCharacteristic(context, device, smokeChannel, smokeProp, smokeChar, (val) => {
158
+ const unwrapped = this.unwrapValue(val);
159
+ const isSmoke = Boolean(unwrapped === true || unwrapped === 'true' || unwrapped === 1);
160
+ return isSmoke ? hap_nodejs_1.Characteristic.SmokeDetected.SMOKE_DETECTED : hap_nodejs_1.Characteristic.SmokeDetected.SMOKE_NOT_DETECTED;
161
+ });
162
+ addedService = true;
163
+ }
164
+ return addedService ? accessory : null;
165
+ }
166
+ }
167
+ exports.SensorMapper = SensorMapper;
168
+ //# sourceMappingURL=sensor.mapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sensor.mapper.js","sourceRoot":"","sources":["../../../../src/plugins/devices-homekit/mappers/sensor.mapper.ts"],"names":[],"mappings":";;;AAAA,uDAAwF;AAExF,kFAA+F;AAG/F,+CAAkD;AAGlD,MAAM,yBAAyB,GAAG;IACjC,mCAAe,CAAC,WAAW;IAC3B,mCAAe,CAAC,QAAQ;IACxB,mCAAe,CAAC,MAAM;IACtB,mCAAe,CAAC,OAAO;IACvB,mCAAe,CAAC,SAAS;IACzB,mCAAe,CAAC,WAAW;IAC3B,mCAAe,CAAC,IAAI;IACpB,mCAAe,CAAC,KAAK;CACrB,CAAC;AAEF,MAAa,YAAa,SAAQ,+BAAiB;IAClD,MAAM,CAAC,MAAoB;QAC1B,OAAO,CACN,IAAI,CAAC,qBAAqB,CAAC,MAAM,EAAE,mCAAe,CAAC,WAAW,EAAE,oCAAgB,CAAC,WAAW,CAAC;YAC7F,IAAI,CAAC,qBAAqB,CAAC,MAAM,EAAE,mCAAe,CAAC,QAAQ,EAAE,oCAAg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AAC,aAAa,CAAC,kBAAkB,CAAC;YAChH,CAAC,CAAC,CAAC;YACH,YAAY,GAAG,IAAI,CAAC;QACrB,CAAC;QAED,OAAO,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;IACxC,CAAC;CACD;AAvMD,oCAuMC"}
@@ -0,0 +1,9 @@
1
+ import { Accessory } from '@homebridge/hap-nodejs';
2
+ import { DeviceEntity } from '../../../modules/devices/entities/devices.entity';
3
+ import { BaseHomeKitMapper } from './base.mapper';
4
+ import { HomeKitMapperContext } from './homekit-mapper.interface';
5
+ export declare class SwitchMapper extends BaseHomeKitMapper {
6
+ canMap(device: DeviceEntity): boolean;
7
+ getSuggestedServiceType(_device: DeviceEntity): string;
8
+ buildAccessory(device: DeviceEntity, context: HomeKitMapperContext): Accessory | null;
9
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SwitchMapper = void 0;
4
+ const hap_nodejs_1 = require("@homebridge/hap-nodejs");
5
+ const devices_constants_1 = require("../../../modules/devices/devices.constants");
6
+ const base_mapper_1 = require("./base.mapper");
7
+ class SwitchMapper extends base_mapper_1.BaseHomeKitMapper {
8
+ canMap(device) {
9
+ const switchChannels = this.findChannels(device, devices_constants_1.ChannelCategory.SWITCHER);
10
+ return switchChannels.some((ch) => !!this.findProperty(ch, devices_constants_1.PropertyCategory.ON));
11
+ }
12
+ getSuggestedServiceType(_device) {
13
+ return 'switch';
14
+ }
15
+ buildAccessory(device, context) {
16
+ const switchChannels = this.findChannels(device, devices_constants_1.ChannelCategory.SWITCHER).filter((ch) => !!this.findProperty(ch, devices_constants_1.PropertyCategory.ON));
17
+ if (switchChannels.length === 0) {
18
+ return null;
19
+ }
20
+ const accessory = this.createBaseAccessory(device, 8);
21
+ for (const switchChannel of switchChannels) {
22
+ const serviceName = switchChannels.length === 1 ? device.name : `${device.name} ${switchChannel.name || switchChannel.id}`;
23
+ const service = accessory.addService(hap_nodejs_1.Service.Switch, serviceName, switchChannel.id);
24
+ const onProp = this.findProperty(switchChannel, devices_constants_1.PropertyCategory.ON);
25
+ const onChar = service.getCharacteristic(hap_nodejs_1.Characteristic.On);
26
+ this.bindCharacteristic(context, device, switchChannel, onProp, onChar, (val) => {
27
+ const unwrapped = this.unwrapValue(val);
28
+ return Boolean(unwrapped === true || unwrapped === 'true' || unwrapped === 1 || unwrapped === '1');
29
+ }, (val) => Boolean(val));
30
+ }
31
+ return accessory;
32
+ }
33
+ }
34
+ exports.SwitchMapper = SwitchMapper;
35
+ //# sourceMappingURL=switch.mapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.mapper.js","sourceRoot":"","sources":["../../../../src/plugins/devices-homekit/mappers/switch.mapper.ts"],"names":[],"mappings":";;;AAAA,uDAAwF;AAExF,kFAA+F;AAG/F,+CAAkD;AAGlD,MAAa,YAAa,SAAQ,+BAAiB;IAClD,MAAM,CAAC,MAAoB;QAC1B,MAAM,cAAc,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,mCAAe,CAAC,QAAQ,CAAC,CAAC;QAC3E,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,EAAE,oCAAgB,CAAC,EAAE,CAAC,CAAC,CAAC;IAClF,CAAC;IAED,uBAAuB,CAAC,OAAqB;QAC5C,OAAO,QAAQ,CAAC;IACjB,CAAC;IAED,cAAc,CAAC,MAAoB,EAAE,OAA6B;QACjE,MAAM,cAAc,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,mCAAe,CAAC,QAAQ,CAAC,CAAC,MAAM,CAChF,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,EAAE,oCAAgB,CAAC,EAAE,CAAC,CACpD,CAAC;QACF,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACjC,OAAO,IAAI,CAAC;QACb,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,CAAC,mBAAmB,CAAC,MAAM,IAAoB,CAAC;QAEtE,KAAK,MAAM,aAAa,IAAI,cAAc,EAAE,CAAC;YAC5C,MAAM,WAAW,GAChB,cAAc,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,IAAI,aAAa,CAAC,IAAI,IAAI,aAAa,CAAC,EAAE,EAAE,CAAC;YACxG,MAAM,OAAO,GAAG,SAAS,CAAC,UAAU,CAAC,oBAAO,CAAC,MAAM,EAAE,WAAW,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC;YAEpF,MAAM,MAAM,GAAG,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,oCAAgB,CAAC,EAAE,CAAC,CAAC;YACrE,MAAM,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,2BAAc,CAAC,EAAE,CAAC,CAAC;YAE5D,IAAI,CAAC,kBAAkB,CACtB,OAAO,EACP,MAAM,EACN,aAAa,EACb,MAAM,EACN,MAAM,EACN,CAAC,GAAG,EAAE,EAAE;gBACP,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;gBACxC,OAAO,OAAO,CAAC,SAAS,KAAK,IAAI,IAAI,SAAS,KAAK,MAAM,IAAI,SAAS,KAAK,CAAC,IAAI,SAAS,KAAK,GAAG,CAAC,CAAC;YACpG,CAAC,EACD,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CACrB,CAAC;QACH,CAAC;QAED,OAAO,SAAS,CAAC;IAClB,CAAC;CACD;AA5CD,oCA4CC"}
@@ -0,0 +1,50 @@
1
+ import { Service } from '@homebridge/hap-nodejs';
2
+ import { ChannelEntity, ChannelPropertyEntity, DeviceEntity } from '../../../modules/devices/entities/devices.entity';
3
+ import { HomeKitMapperContext } from './homekit-mapper.interface';
4
+ export interface ThermostatCoordinatorConfig {
5
+ device: DeviceEntity;
6
+ service: Service;
7
+ context: HomeKitMapperContext;
8
+ ambientTempChannel: ChannelEntity;
9
+ ambientTempProperty: ChannelPropertyEntity;
10
+ heaterChannel?: ChannelEntity;
11
+ heaterOnProperty?: ChannelPropertyEntity;
12
+ heaterTempProperty?: ChannelPropertyEntity;
13
+ heaterStatusProperty?: ChannelPropertyEntity;
14
+ coolerChannel?: ChannelEntity;
15
+ coolerOnProperty?: ChannelPropertyEntity;
16
+ coolerTempProperty?: ChannelPropertyEntity;
17
+ coolerStatusProperty?: ChannelPropertyEntity;
18
+ lockedProperty?: ChannelPropertyEntity;
19
+ }
20
+ export declare class ThermostatCoordinator {
21
+ private readonly config;
22
+ private readonly values;
23
+ private readonly revisions;
24
+ private readonly pendingWrites;
25
+ private nextWriteToken;
26
+ private readonly currentHeatingCoolingChar;
27
+ private readonly targetHeatingCoolingChar;
28
+ private readonly currentTempChar;
29
+ private readonly targetTempChar;
30
+ private heatingThresholdChar?;
31
+ private coolingThresholdChar?;
32
+ private lockPhysicalControlsChar?;
33
+ constructor(config: ThermostatCoordinatorConfig);
34
+ private initValues;
35
+ private configureValidValues;
36
+ private isPropertyWritable;
37
+ private setupGettersAndSetters;
38
+ private registerEventListeners;
39
+ private beginPendingWrite;
40
+ private ownsPendingWrite;
41
+ private dispatchPending;
42
+ private dispatchPendingBatch;
43
+ private refreshFresherState;
44
+ private refreshCharacteristics;
45
+ private getLockPhysicalControls;
46
+ private getAmbientTemperature;
47
+ private getTargetTemperature;
48
+ private deriveCurrentHeatingCoolingState;
49
+ private deriveTargetHeatingCoolingState;
50
+ }