@fastybird/smart-panel-backend 1.1.0-alpha.6 → 1.1.0-alpha.61
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.
- package/dist/app.module.js +2 -1
- package/dist/app.module.js.map +1 -1
- package/dist/common/utils/cancellable-exec.utils.d.ts +5 -0
- package/dist/common/utils/cancellable-exec.utils.js +34 -0
- package/dist/common/utils/cancellable-exec.utils.js.map +1 -0
- package/dist/common/utils/remote-access-observation.utils.d.ts +11 -0
- package/dist/common/utils/remote-access-observation.utils.js +89 -0
- package/dist/common/utils/remote-access-observation.utils.js.map +1 -0
- package/dist/dataSource.js +1 -0
- package/dist/dataSource.js.map +1 -1
- package/dist/migrations/1000000000026-AddHardwareInputCategories.d.ts +7 -0
- package/dist/migrations/1000000000026-AddHardwareInputCategories.js +364 -0
- package/dist/migrations/1000000000026-AddHardwareInputCategories.js.map +1 -0
- package/dist/modules/auth/auth.module.js +4 -0
- package/dist/modules/auth/auth.module.js.map +1 -1
- package/dist/modules/auth/guards/auth.guard.js +8 -21
- package/dist/modules/auth/guards/auth.guard.js.map +1 -1
- package/dist/modules/auth/services/token-metadata.service.d.ts +42 -0
- package/dist/modules/auth/services/token-metadata.service.js +202 -0
- package/dist/modules/auth/services/token-metadata.service.js.map +1 -0
- package/dist/modules/auth/services/token-usage.service.d.ts +22 -0
- package/dist/modules/auth/services/token-usage.service.js +93 -0
- package/dist/modules/auth/services/token-usage.service.js.map +1 -0
- package/dist/modules/auth/services/tokens.service.d.ts +10 -3
- package/dist/modules/auth/services/tokens.service.js +26 -10
- package/dist/modules/auth/services/tokens.service.js.map +1 -1
- package/dist/modules/devices/controllers/channels.controller.d.ts +5 -1
- package/dist/modules/devices/controllers/channels.controller.js +34 -2
- package/dist/modules/devices/controllers/channels.controller.js.map +1 -1
- package/dist/modules/devices/controllers/channels.properties.controller.js +5 -0
- package/dist/modules/devices/controllers/channels.properties.controller.js.map +1 -1
- package/dist/modules/devices/controllers/devices.channels.controller.d.ts +5 -1
- package/dist/modules/devices/controllers/devices.channels.controller.js +38 -2
- package/dist/modules/devices/controllers/devices.channels.controller.js.map +1 -1
- package/dist/modules/devices/controllers/devices.channels.properties.controller.js +5 -0
- package/dist/modules/devices/controllers/devices.channels.properties.controller.js.map +1 -1
- package/dist/modules/devices/devices.constants.d.ts +6 -0
- package/dist/modules/devices/devices.constants.js +6 -0
- package/dist/modules/devices/devices.constants.js.map +1 -1
- package/dist/modules/devices/devices.module.js +18 -0
- package/dist/modules/devices/devices.module.js.map +1 -1
- package/dist/modules/devices/devices.openapi.d.ts +3 -1
- package/dist/modules/devices/devices.openapi.js +7 -0
- package/dist/modules/devices/devices.openapi.js.map +1 -1
- package/dist/modules/devices/dto/channel-input-occurrence.dto.d.ts +10 -0
- package/dist/modules/devices/dto/channel-input-occurrence.dto.js +99 -0
- package/dist/modules/devices/dto/channel-input-occurrence.dto.js.map +1 -0
- package/dist/modules/devices/dto/property-command.dto.js +2 -8
- package/dist/modules/devices/dto/property-command.dto.js.map +1 -1
- package/dist/modules/devices/models/channel-input-capabilities.model.d.ts +20 -0
- package/dist/modules/devices/models/channel-input-capabilities.model.js +111 -0
- package/dist/modules/devices/models/channel-input-capabilities.model.js.map +1 -0
- package/dist/modules/devices/models/channel-input-occurrence.model.d.ts +22 -0
- package/dist/modules/devices/models/channel-input-occurrence.model.js +154 -0
- package/dist/modules/devices/models/channel-input-occurrence.model.js.map +1 -0
- package/dist/modules/devices/services/channel-input-deduplication.service.d.ts +17 -0
- package/dist/modules/devices/services/channel-input-deduplication.service.js +88 -0
- package/dist/modules/devices/services/channel-input-deduplication.service.js.map +1 -0
- package/dist/modules/devices/services/channel-input-occurrences.service.d.ts +21 -0
- package/dist/modules/devices/services/channel-input-occurrences.service.js +163 -0
- package/dist/modules/devices/services/channel-input-occurrences.service.js.map +1 -0
- package/dist/modules/devices/services/channels.properties.service.d.ts +10 -1
- package/dist/modules/devices/services/channels.properties.service.js +108 -44
- package/dist/modules/devices/services/channels.properties.service.js.map +1 -1
- package/dist/modules/devices/services/channels.service.d.ts +1 -0
- package/dist/modules/devices/services/channels.service.js +10 -0
- package/dist/modules/devices/services/channels.service.js.map +1 -1
- package/dist/modules/devices/services/command-latency-trace-collector.service.d.ts +101 -0
- package/dist/modules/devices/services/command-latency-trace-collector.service.js +451 -0
- package/dist/modules/devices/services/command-latency-trace-collector.service.js.map +1 -0
- package/dist/modules/devices/services/device-command-graph.service.d.ts +18 -0
- package/dist/modules/devices/services/device-command-graph.service.js +92 -0
- package/dist/modules/devices/services/device-command-graph.service.js.map +1 -0
- package/dist/modules/devices/services/devices.service.d.ts +2 -0
- package/dist/modules/devices/services/devices.service.js +41 -31
- package/dist/modules/devices/services/devices.service.js.map +1 -1
- package/dist/modules/devices/services/platform.registry.service.d.ts +2 -2
- package/dist/modules/devices/services/platform.registry.service.js.map +1 -1
- package/dist/modules/devices/services/property-command-dispatch.service.d.ts +7 -3
- package/dist/modules/devices/services/property-command-dispatch.service.js +38 -25
- package/dist/modules/devices/services/property-command-dispatch.service.js.map +1 -1
- package/dist/modules/devices/services/property-command-window.service.d.ts +2 -1
- package/dist/modules/devices/services/property-command-window.service.js +6 -0
- package/dist/modules/devices/services/property-command-window.service.js.map +1 -1
- package/dist/modules/devices/services/property-command.service.d.ts +9 -5
- package/dist/modules/devices/services/property-command.service.js +54 -21
- package/dist/modules/devices/services/property-command.service.js.map +1 -1
- package/dist/modules/devices/services/property-metadata.service.d.ts +38 -0
- package/dist/modules/devices/services/property-metadata.service.js +210 -0
- package/dist/modules/devices/services/property-metadata.service.js.map +1 -0
- package/dist/modules/devices/services/property-value-lock.service.d.ts +4 -1
- package/dist/modules/devices/services/property-value-lock.service.js +16 -2
- package/dist/modules/devices/services/property-value-lock.service.js.map +1 -1
- package/dist/modules/devices/services/property-value.service.d.ts +2 -0
- package/dist/modules/devices/services/property-value.service.js +25 -5
- package/dist/modules/devices/services/property-value.service.js.map +1 -1
- package/dist/modules/devices/utils/device-graph-query.utils.d.ts +3 -0
- package/dist/modules/devices/utils/device-graph-query.utils.js +23 -0
- package/dist/modules/devices/utils/device-graph-query.utils.js.map +1 -0
- package/dist/modules/devices/utils/schema.utils.js +1 -1
- package/dist/modules/devices/utils/schema.utils.js.map +1 -1
- package/dist/modules/devices/validators/channel-exists-constraint.validator.d.ts +1 -3
- package/dist/modules/devices/validators/channel-exists-constraint.validator.js +3 -14
- package/dist/modules/devices/validators/channel-exists-constraint.validator.js.map +1 -1
- package/dist/modules/devices/validators/channel-property-exists-constraint.validator.d.ts +1 -3
- package/dist/modules/devices/validators/channel-property-exists-constraint.validator.js +3 -14
- package/dist/modules/devices/validators/channel-property-exists-constraint.validator.js.map +1 -1
- package/dist/modules/devices/validators/device-exists-constraint.validator.js +1 -2
- package/dist/modules/devices/validators/device-exists-constraint.validator.js.map +1 -1
- package/dist/modules/devices/validators/property-command-target-constraint.validator.d.ts +9 -0
- package/dist/modules/devices/validators/property-command-target-constraint.validator.js +58 -0
- package/dist/modules/devices/validators/property-command-target-constraint.validator.js.map +1 -0
- package/dist/modules/mdns/services/mdns.service.js +3 -1
- package/dist/modules/mdns/services/mdns.service.js.map +1 -1
- package/dist/modules/platform/platforms/abstract.platform.d.ts +2 -1
- package/dist/modules/platform/platforms/abstract.platform.js +2 -1
- package/dist/modules/platform/platforms/abstract.platform.js.map +1 -1
- package/dist/modules/platform/platforms/raspberry.platform.js +5 -10
- package/dist/modules/platform/platforms/raspberry.platform.js.map +1 -1
- package/dist/modules/platform/utils/linux-network-interface.utils.d.ts +3 -0
- package/dist/modules/platform/utils/linux-network-interface.utils.js +48 -0
- package/dist/modules/platform/utils/linux-network-interface.utils.js.map +1 -0
- package/dist/modules/remote-access/controllers/remote-access.controller.js +11 -6
- package/dist/modules/remote-access/controllers/remote-access.controller.js.map +1 -1
- package/dist/modules/remote-access/models/provider.model.d.ts +3 -0
- package/dist/modules/remote-access/models/provider.model.js +23 -0
- package/dist/modules/remote-access/models/provider.model.js.map +1 -1
- package/dist/modules/remote-access/models/status.model.d.ts +2 -0
- package/dist/modules/remote-access/models/status.model.js +18 -1
- package/dist/modules/remote-access/models/status.model.js.map +1 -1
- package/dist/modules/remote-access/models/urls.model.d.ts +2 -0
- package/dist/modules/remote-access/models/urls.model.js +17 -0
- package/dist/modules/remote-access/models/urls.model.js.map +1 -1
- package/dist/modules/remote-access/platforms/remote-access-provider.platform.d.ts +18 -1
- package/dist/modules/remote-access/remote-access.constants.d.ts +2 -1
- package/dist/modules/remote-access/remote-access.constants.js +2 -1
- package/dist/modules/remote-access/remote-access.constants.js.map +1 -1
- package/dist/modules/remote-access/services/remote-access-proxy-contribution.service.d.ts +1 -0
- package/dist/modules/remote-access/services/remote-access-proxy-contribution.service.js +4 -1
- package/dist/modules/remote-access/services/remote-access-proxy-contribution.service.js.map +1 -1
- package/dist/modules/remote-access/services/remote-access-status.service.d.ts +40 -8
- package/dist/modules/remote-access/services/remote-access-status.service.js +314 -65
- package/dist/modules/remote-access/services/remote-access-status.service.js.map +1 -1
- package/dist/modules/remote-access/services/remote-access-url.service.d.ts +2 -2
- package/dist/modules/remote-access/services/remote-access-url.service.js +4 -2
- package/dist/modules/remote-access/services/remote-access-url.service.js.map +1 -1
- package/dist/modules/spaces/services/module-reset.service.d.ts +5 -1
- package/dist/modules/spaces/services/module-reset.service.js +10 -2
- package/dist/modules/spaces/services/module-reset.service.js.map +1 -1
- package/dist/modules/spaces/services/space-activity.service.d.ts +14 -0
- package/dist/modules/spaces/services/space-activity.service.js +56 -0
- package/dist/modules/spaces/services/space-activity.service.js.map +1 -0
- package/dist/modules/spaces/spaces.module.js +5 -0
- package/dist/modules/spaces/spaces.module.js.map +1 -1
- package/dist/modules/spaces/subscribers/space-activity.subscriber.d.ts +17 -0
- package/dist/modules/spaces/subscribers/space-activity.subscriber.js +89 -0
- package/dist/modules/spaces/subscribers/space-activity.subscriber.js.map +1 -0
- package/dist/modules/storage/services/storage-write-buffer.d.ts +17 -0
- package/dist/modules/storage/services/storage-write-buffer.js +67 -0
- package/dist/modules/storage/services/storage-write-buffer.js.map +1 -0
- package/dist/modules/storage/services/storage.service.d.ts +9 -2
- package/dist/modules/storage/services/storage.service.js +54 -1
- package/dist/modules/storage/services/storage.service.js.map +1 -1
- package/dist/modules/system/scripts/update-worker.sh +1168 -61
- package/dist/modules/system/services/privileged-worker.service.d.ts +10 -0
- package/dist/modules/system/services/privileged-worker.service.js +241 -32
- package/dist/modules/system/services/privileged-worker.service.js.map +1 -1
- package/dist/modules/system/services/system.service.d.ts +2 -0
- package/dist/modules/system/services/system.service.js +22 -1
- package/dist/modules/system/services/system.service.js.map +1 -1
- package/dist/modules/system/services/update-executor.service.d.ts +20 -2
- package/dist/modules/system/services/update-executor.service.js +272 -26
- package/dist/modules/system/services/update-executor.service.js.map +1 -1
- package/dist/modules/websocket/gateway/websocket.gateway.d.ts +4 -1
- package/dist/modules/websocket/gateway/websocket.gateway.js +29 -5
- package/dist/modules/websocket/gateway/websocket.gateway.js.map +1 -1
- package/dist/modules/websocket/services/command-acknowledgement-trace.service.d.ts +143 -0
- package/dist/modules/websocket/services/command-acknowledgement-trace.service.js +523 -0
- package/dist/modules/websocket/services/command-acknowledgement-trace.service.js.map +1 -0
- package/dist/modules/websocket/services/ws-auth.service.js +12 -35
- package/dist/modules/websocket/services/ws-auth.service.js.map +1 -1
- package/dist/modules/websocket/websocket.module.js +9 -1
- package/dist/modules/websocket/websocket.module.js.map +1 -1
- package/dist/plugins/devices-home-assistant/devices-home-assistant.openapi.d.ts +2 -2
- package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.d.ts +6 -1
- package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.js +16 -1
- package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.js.map +1 -1
- package/dist/plugins/devices-home-assistant/dto/mapping-preview.dto.d.ts +1 -0
- package/dist/plugins/devices-home-assistant/dto/mapping-preview.dto.js +11 -0
- package/dist/plugins/devices-home-assistant/dto/mapping-preview.dto.js.map +1 -1
- package/dist/plugins/devices-home-assistant/mappers/button.entity.mapper.service.d.ts +19 -0
- package/dist/plugins/devices-home-assistant/mappers/button.entity.mapper.service.js +51 -0
- package/dist/plugins/devices-home-assistant/mappers/button.entity.mapper.service.js.map +1 -0
- package/dist/plugins/devices-home-assistant/mappings/definitions/entity-mappings.yaml +56 -7
- package/dist/plugins/devices-home-assistant/models/mapping-preview.model.d.ts +1 -0
- package/dist/plugins/devices-home-assistant/models/mapping-preview.model.js +11 -0
- package/dist/plugins/devices-home-assistant/models/mapping-preview.model.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/device-adoption.service.js +17 -0
- package/dist/plugins/devices-home-assistant/services/device-adoption.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/ha-mdns-discoverer.service.js +3 -1
- package/dist/plugins/devices-home-assistant/services/ha-mdns-discoverer.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/home-assistant-raw-event.service.d.ts +27 -0
- package/dist/plugins/devices-home-assistant/services/home-assistant-raw-event.service.js +271 -0
- package/dist/plugins/devices-home-assistant/services/home-assistant-raw-event.service.js.map +1 -0
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.d.ts +2 -2
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js +33 -14
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/mapping-preview.service.js +24 -4
- package/dist/plugins/devices-home-assistant/services/mapping-preview.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/state-changed.event.service.d.ts +4 -1
- package/dist/plugins/devices-home-assistant/services/state-changed.event.service.js +82 -2
- package/dist/plugins/devices-home-assistant/services/state-changed.event.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/wizard.service.js +1 -0
- package/dist/plugins/devices-home-assistant/services/wizard.service.js.map +1 -1
- package/dist/plugins/devices-home-assistant/utils/ha-event.utils.d.ts +2 -0
- package/dist/plugins/devices-home-assistant/utils/ha-event.utils.js +50 -0
- package/dist/plugins/devices-home-assistant/utils/ha-event.utils.js.map +1 -0
- package/dist/plugins/devices-homekit/listeners/homekit-event.listener.d.ts +4 -1
- package/dist/plugins/devices-homekit/listeners/homekit-event.listener.js +34 -4
- package/dist/plugins/devices-homekit/listeners/homekit-event.listener.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/base.mapper.js +3 -2
- package/dist/plugins/devices-homekit/mappers/base.mapper.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/button.mapper.d.ts +15 -0
- package/dist/plugins/devices-homekit/mappers/button.mapper.js +143 -0
- package/dist/plugins/devices-homekit/mappers/button.mapper.js.map +1 -0
- package/dist/plugins/devices-homekit/mappers/characteristic-write.d.ts +2 -0
- package/dist/plugins/devices-homekit/mappers/characteristic-write.js +17 -0
- package/dist/plugins/devices-homekit/mappers/characteristic-write.js.map +1 -0
- package/dist/plugins/devices-homekit/mappers/homekit-mapper.interface.d.ts +9 -1
- package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.js +13 -12
- package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.js.map +1 -1
- package/dist/plugins/devices-homekit/services/homekit-bridge.service.js +2 -0
- package/dist/plugins/devices-homekit/services/homekit-bridge.service.js.map +1 -1
- package/dist/plugins/devices-homekit/services/homekit-mapper-registry.service.d.ts +5 -1
- package/dist/plugins/devices-homekit/services/homekit-mapper-registry.service.js +42 -0
- package/dist/plugins/devices-homekit/services/homekit-mapper-registry.service.js.map +1 -1
- package/dist/plugins/devices-homekit/utils/ciao-receive-guard.d.ts +1 -0
- package/dist/plugins/devices-homekit/utils/ciao-receive-guard.js +36 -0
- package/dist/plugins/devices-homekit/utils/ciao-receive-guard.js.map +1 -0
- package/dist/plugins/devices-homey/mappings/definitions/channels.yaml +50 -0
- package/dist/plugins/devices-homey/mappings/definitions/devices.yaml +18 -0
- package/dist/plugins/devices-homey/mappings/definitions/properties.yaml +55 -0
- package/dist/plugins/devices-homey/mappings/device-support.js +10 -0
- package/dist/plugins/devices-homey/mappings/device-support.js.map +1 -1
- package/dist/plugins/devices-homey/mappings/mapping-loader.service.d.ts +1 -0
- package/dist/plugins/devices-homey/mappings/mapping-loader.service.js +66 -8
- package/dist/plugins/devices-homey/mappings/mapping-loader.service.js.map +1 -1
- package/dist/plugins/devices-homey/models/inventory.model.d.ts +2 -1
- package/dist/plugins/devices-homey/models/inventory.model.js +1 -0
- package/dist/plugins/devices-homey/models/inventory.model.js.map +1 -1
- package/dist/plugins/devices-homey/models/mapping-preview.model.d.ts +1 -0
- package/dist/plugins/devices-homey/models/mapping-preview.model.js +1 -0
- package/dist/plugins/devices-homey/models/mapping-preview.model.js.map +1 -1
- package/dist/plugins/devices-homey/services/homey-mapping-preview.service.js +7 -0
- package/dist/plugins/devices-homey/services/homey-mapping-preview.service.js.map +1 -1
- package/dist/plugins/devices-homey/services/homey-synchronizer.service.d.ts +3 -1
- package/dist/plugins/devices-homey/services/homey-synchronizer.service.js +37 -6
- package/dist/plugins/devices-homey/services/homey-synchronizer.service.js.map +1 -1
- package/dist/plugins/devices-reterminal/services/reterminal-button.service.d.ts +7 -3
- package/dist/plugins/devices-reterminal/services/reterminal-button.service.js +63 -17
- package/dist/plugins/devices-reterminal/services/reterminal-button.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.d.ts +25 -3
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.js +607 -48
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.d.ts +6 -0
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js +51 -2
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.constants.js +3 -2
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.constants.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.plugin.js +2 -0
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.plugin.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/mappings/definitions/inputs.yaml +80 -0
- package/dist/plugins/devices-shelly-ng/mappings/mapping-loader.service.js +7 -1
- package/dist/plugins/devices-shelly-ng/mappings/mapping-loader.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/mappings/mapping.types.d.ts +6 -3
- package/dist/plugins/devices-shelly-ng/mappings/schema/mapping-schema.json +5 -0
- package/dist/plugins/devices-shelly-ng/services/device-manager.service.js +153 -8
- package/dist/plugins/devices-shelly-ng/services/device-manager.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/poll-placement-diagnostics.service.d.ts +51 -0
- package/dist/plugins/devices-shelly-ng/services/poll-placement-diagnostics.service.js +549 -0
- package/dist/plugins/devices-shelly-ng/services/poll-placement-diagnostics.service.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.d.ts +6 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js +84 -14
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-rpc-client.service.js +3 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-rpc-client.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.d.ts +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js +13 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.constants.d.ts +2 -0
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.constants.js +66 -4
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.constants.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.plugin.js +2 -0
- package/dist/plugins/devices-shelly-v1/devices-shelly-v1.plugin.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/platforms/shelly-v1.device.platform.js +7 -0
- package/dist/plugins/devices-shelly-v1/platforms/shelly-v1.device.platform.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/services/device-mapper.service.d.ts +3 -1
- package/dist/plugins/devices-shelly-v1/services/device-mapper.service.js +20 -2
- package/dist/plugins/devices-shelly-v1/services/device-mapper.service.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/services/shelly-v1-input-tracker.service.d.ts +16 -0
- package/dist/plugins/devices-shelly-v1/services/shelly-v1-input-tracker.service.js +107 -0
- package/dist/plugins/devices-shelly-v1/services/shelly-v1-input-tracker.service.js.map +1 -0
- package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.d.ts +7 -1
- package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.js +98 -3
- package/dist/plugins/devices-shelly-v1/services/shelly-v1.service.js.map +1 -1
- package/dist/plugins/devices-third-party/controllers/third-party-inputs.controller.d.ts +17 -0
- package/dist/plugins/devices-third-party/controllers/third-party-inputs.controller.js +205 -0
- package/dist/plugins/devices-third-party/controllers/third-party-inputs.controller.js.map +1 -0
- package/dist/plugins/devices-third-party/devices-third-party.openapi.d.ts +1 -1
- package/dist/plugins/devices-third-party/devices-third-party.plugin.js +2 -1
- package/dist/plugins/devices-third-party/devices-third-party.plugin.js.map +1 -1
- package/dist/plugins/devices-third-party/dto/report-input-occurrence-response.dto.d.ts +5 -0
- package/dist/plugins/devices-third-party/dto/report-input-occurrence-response.dto.js +50 -0
- package/dist/plugins/devices-third-party/dto/report-input-occurrence-response.dto.js.map +1 -0
- package/dist/plugins/devices-third-party/dto/report-input-occurrence.dto.d.ts +8 -0
- package/dist/plugins/devices-third-party/dto/report-input-occurrence.dto.js +81 -0
- package/dist/plugins/devices-third-party/dto/report-input-occurrence.dto.js.map +1 -0
- package/dist/plugins/devices-third-party/platforms/third-party-device.platform.js +19 -4
- package/dist/plugins/devices-third-party/platforms/third-party-device.platform.js.map +1 -1
- package/dist/plugins/devices-virtual/listeners/virtual-projection.listener.d.ts +2 -0
- package/dist/plugins/devices-virtual/listeners/virtual-projection.listener.js +57 -0
- package/dist/plugins/devices-virtual/listeners/virtual-projection.listener.js.map +1 -1
- package/dist/plugins/devices-virtual/platforms/virtual-device.platform.d.ts +3 -8
- package/dist/plugins/devices-virtual/platforms/virtual-device.platform.js +6 -31
- package/dist/plugins/devices-virtual/platforms/virtual-device.platform.js.map +1 -1
- package/dist/plugins/devices-wled/services/wled-mdns-discoverer.service.js +3 -1
- package/dist/plugins/devices-wled/services/wled-mdns-discoverer.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.constants.d.ts +3 -0
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.constants.js +41 -5
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.constants.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/interfaces/zigbee2mqtt.interface.d.ts +7 -1
- package/dist/plugins/devices-zigbee2mqtt/mappings/config-driven.converter.js +16 -15
- package/dist/plugins/devices-zigbee2mqtt/mappings/config-driven.converter.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/mappings/definitions/remotes.yaml +505 -74
- package/dist/plugins/devices-zigbee2mqtt/mappings/schema/mapping-schema.json +3 -3
- package/dist/plugins/devices-zigbee2mqtt/mappings/transformers/transformer.types.d.ts +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.d.ts +8 -2
- package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.js +6 -5
- package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/device-adoption.service.js +18 -11
- package/dist/plugins/devices-zigbee2mqtt/services/device-adoption.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/device-mapper.service.d.ts +9 -3
- package/dist/plugins/devices-zigbee2mqtt/services/device-mapper.service.js +166 -3
- package/dist/plugins/devices-zigbee2mqtt/services/device-mapper.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/mqtt-client-adapter.service.js +5 -2
- package/dist/plugins/devices-zigbee2mqtt/services/mqtt-client-adapter.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.d.ts +1 -0
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.js +44 -4
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.js.map +1 -1
- package/dist/plugins/influx-v1/services/influx-v1-managed.service.js +2 -2
- package/dist/plugins/influx-v1/services/influx-v1-managed.service.js.map +1 -1
- package/dist/plugins/influx-v2/services/influx-v2-managed.service.js +2 -2
- package/dist/plugins/influx-v2/services/influx-v2-managed.service.js.map +1 -1
- package/dist/plugins/memory-storage/services/memory-storage-managed.service.js +2 -2
- package/dist/plugins/memory-storage/services/memory-storage-managed.service.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/setup.controller.d.ts +6 -4
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/setup.controller.js +28 -16
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/setup.controller.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/status.controller.d.ts +4 -6
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/status.controller.js +18 -17
- package/dist/plugins/remote-access-cloudflare-tunnel/controllers/status.controller.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/models/status.model.d.ts +2 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/status.model.js +17 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/models/status.model.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.constants.d.ts +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.constants.js +2 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.constants.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.plugin.js +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/remote-access-cloudflare-tunnel.plugin.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/scripts/cloudflared-setup.sh +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-managed.service.d.ts +21 -2
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-managed.service.js +132 -56
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-managed.service.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-provider.service.d.ts +13 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-provider.service.js +8 -2
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-provider.service.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-setup.service.js +1 -0
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflare-tunnel-setup.service.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-cli.service.d.ts +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-cli.service.js +12 -24
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-cli.service.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-metrics.service.d.ts +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-metrics.service.js +5 -2
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-metrics.service.js.map +1 -1
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-process.service.d.ts +4 -3
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-process.service.js +109 -49
- package/dist/plugins/remote-access-cloudflare-tunnel/services/cloudflared-process.service.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/controllers/setup.controller.d.ts +11 -6
- package/dist/plugins/remote-access-tailscale/controllers/setup.controller.js +115 -25
- package/dist/plugins/remote-access-tailscale/controllers/setup.controller.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/controllers/status.controller.d.ts +6 -5
- package/dist/plugins/remote-access-tailscale/controllers/status.controller.js +26 -16
- package/dist/plugins/remote-access-tailscale/controllers/status.controller.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/models/status.model.d.ts +16 -0
- package/dist/plugins/remote-access-tailscale/models/status.model.js +100 -1
- package/dist/plugins/remote-access-tailscale/models/status.model.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.constants.d.ts +3 -0
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.constants.js +4 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.constants.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.exceptions.d.ts +17 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.exceptions.js +33 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.exceptions.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.openapi.d.ts +2 -2
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.openapi.js +1 -0
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.openapi.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.plugin.js +3 -1
- package/dist/plugins/remote-access-tailscale/remote-access-tailscale.plugin.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/scripts/tailscale-setup.sh +37 -4
- package/dist/plugins/remote-access-tailscale/services/tailscale-cli.service.d.ts +9 -4
- package/dist/plugins/remote-access-tailscale/services/tailscale-cli.service.js +63 -15
- package/dist/plugins/remote-access-tailscale/services/tailscale-cli.service.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-login.service.d.ts +8 -3
- package/dist/plugins/remote-access-tailscale/services/tailscale-login.service.js +175 -151
- package/dist/plugins/remote-access-tailscale/services/tailscale-login.service.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-node-managed.service.d.ts +55 -7
- package/dist/plugins/remote-access-tailscale/services/tailscale-node-managed.service.js +551 -109
- package/dist/plugins/remote-access-tailscale/services/tailscale-node-managed.service.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-operation-coordinator.service.d.ts +33 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-operation-coordinator.service.js +167 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-operation-coordinator.service.js.map +1 -0
- package/dist/plugins/remote-access-tailscale/services/tailscale-provider.service.d.ts +13 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-provider.service.js +8 -2
- package/dist/plugins/remote-access-tailscale/services/tailscale-provider.service.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-serve.service.d.ts +1 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-serve.service.js +7 -6
- package/dist/plugins/remote-access-tailscale/services/tailscale-serve.service.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/services/tailscale-setup.service.d.ts +1 -3
- package/dist/plugins/remote-access-tailscale/services/tailscale-setup.service.js +11 -11
- package/dist/plugins/remote-access-tailscale/services/tailscale-setup.service.js.map +1 -1
- package/dist/plugins/remote-access-tailscale/utils/tailscale-control.utils.d.ts +5 -0
- package/dist/plugins/remote-access-tailscale/utils/tailscale-control.utils.js +36 -0
- package/dist/plugins/remote-access-tailscale/utils/tailscale-control.utils.js.map +1 -0
- package/dist/plugins/simulator/controllers/simulator.controller.d.ts +8 -2
- package/dist/plugins/simulator/controllers/simulator.controller.js +102 -2
- package/dist/plugins/simulator/controllers/simulator.controller.js.map +1 -1
- package/dist/plugins/simulator/dto/simulate-occurrence.dto.d.ts +12 -0
- package/dist/plugins/simulator/dto/simulate-occurrence.dto.js +122 -0
- package/dist/plugins/simulator/dto/simulate-occurrence.dto.js.map +1 -0
- package/dist/plugins/simulator/models/simulator-response.model.d.ts +12 -0
- package/dist/plugins/simulator/models/simulator-response.model.js +84 -1
- package/dist/plugins/simulator/models/simulator-response.model.js.map +1 -1
- package/dist/plugins/simulator/scenarios/definitions/small-apartment.yaml +78 -0
- package/dist/plugins/simulator/services/scenario-executor.service.js +3 -1
- package/dist/plugins/simulator/services/scenario-executor.service.js.map +1 -1
- package/dist/plugins/simulator/services/simulation.service.js +10 -1
- package/dist/plugins/simulator/services/simulation.service.js.map +1 -1
- package/dist/plugins/simulator/simulator.openapi.d.ts +3 -2
- package/dist/plugins/simulator/simulator.openapi.js +5 -0
- package/dist/plugins/simulator/simulator.openapi.js.map +1 -1
- package/dist/plugins/simulator/simulators/device-simulator.interface.d.ts +2 -0
- package/dist/plugins/simulator/simulators/device-simulator.interface.js +83 -0
- package/dist/plugins/simulator/simulators/device-simulator.interface.js.map +1 -1
- package/dist/plugins/simulator/simulators/index.d.ts +1 -0
- package/dist/plugins/simulator/simulators/index.js +1 -0
- package/dist/plugins/simulator/simulators/index.js.map +1 -1
- package/dist/plugins/simulator/simulators/input-controller.simulator.d.ts +10 -0
- package/dist/plugins/simulator/simulators/input-controller.simulator.js +57 -0
- package/dist/plugins/simulator/simulators/input-controller.simulator.js.map +1 -0
- package/dist/plugins/simulator/simulators/lighting.simulator.js +1 -0
- package/dist/plugins/simulator/simulators/lighting.simulator.js.map +1 -1
- package/dist/plugins/spaces-home-control/listeners/space-activity.listener.d.ts +6 -7
- package/dist/plugins/spaces-home-control/listeners/space-activity.listener.js +19 -44
- package/dist/plugins/spaces-home-control/listeners/space-activity.listener.js.map +1 -1
- package/dist/plugins/spaces-home-control/listeners/space-climate-state.listener.d.ts +4 -4
- package/dist/plugins/spaces-home-control/listeners/space-climate-state.listener.js +9 -22
- package/dist/plugins/spaces-home-control/listeners/space-climate-state.listener.js.map +1 -1
- package/dist/plugins/spaces-home-control/listeners/space-lighting-state.listener.d.ts +4 -4
- package/dist/plugins/spaces-home-control/listeners/space-lighting-state.listener.js +9 -22
- package/dist/plugins/spaces-home-control/listeners/space-lighting-state.listener.js.map +1 -1
- package/dist/plugins/spaces-home-control/listeners/space-sensor-state.listener.d.ts +4 -4
- package/dist/plugins/spaces-home-control/listeners/space-sensor-state.listener.js +9 -22
- package/dist/plugins/spaces-home-control/listeners/space-sensor-state.listener.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-climate-state.service.d.ts +3 -5
- package/dist/plugins/spaces-home-control/services/space-climate-state.service.js +9 -12
- package/dist/plugins/spaces-home-control/services/space-climate-state.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-lighting-state.service.d.ts +3 -5
- package/dist/plugins/spaces-home-control/services/space-lighting-state.service.js +7 -10
- package/dist/plugins/spaces-home-control/services/space-lighting-state.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-sensor-state.service.d.ts +3 -5
- package/dist/plugins/spaces-home-control/services/space-sensor-state.service.js +7 -10
- package/dist/plugins/spaces-home-control/services/space-sensor-state.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-state-read.service.d.ts +47 -0
- package/dist/plugins/spaces-home-control/services/space-state-read.service.js +262 -0
- package/dist/plugins/spaces-home-control/services/space-state-read.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.plugin.js +4 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.plugin.js.map +1 -1
- package/dist/spec/channels.d.ts +51 -1
- package/dist/spec/channels.js +64 -1
- package/dist/spec/channels.js.map +1 -1
- package/dist/spec/devices.d.ts +155 -2
- package/dist/spec/devices.js +161 -2
- package/dist/spec/devices.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SpaceStateReadService = exports.spaceStateMetadataCapacity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const common_1 = require("@nestjs/common");
|
|
15
|
+
const config_1 = require("@nestjs/config");
|
|
16
|
+
const config_utils_1 = require("../../../common/utils/config.utils");
|
|
17
|
+
const device_zone_entity_1 = require("../../../modules/devices/entities/device-zone.entity");
|
|
18
|
+
const devices_entity_1 = require("../../../modules/devices/entities/devices.entity");
|
|
19
|
+
const device_command_graph_service_1 = require("../../../modules/devices/services/device-command-graph.service");
|
|
20
|
+
const property_metadata_service_1 = require("../../../modules/devices/services/property-metadata.service");
|
|
21
|
+
const space_role_entity_1 = require("../../../modules/spaces/entities/space-role.entity");
|
|
22
|
+
const space_entity_1 = require("../../../modules/spaces/entities/space.entity");
|
|
23
|
+
const spaces_constants_1 = require("../../../modules/spaces/spaces.constants");
|
|
24
|
+
const spaces_exceptions_1 = require("../../../modules/spaces/spaces.exceptions");
|
|
25
|
+
const space_climate_role_entity_1 = require("../entities/space-climate-role.entity");
|
|
26
|
+
const space_lighting_role_entity_1 = require("../entities/space-lighting-role.entity");
|
|
27
|
+
const space_sensor_role_entity_1 = require("../entities/space-sensor-role.entity");
|
|
28
|
+
exports.spaceStateMetadataCapacity = 256;
|
|
29
|
+
let SpaceStateReadService = class SpaceStateReadService {
|
|
30
|
+
constructor(dataSource, metadata, graphs, config) {
|
|
31
|
+
this.dataSource = dataSource;
|
|
32
|
+
this.metadata = metadata;
|
|
33
|
+
this.graphs = graphs;
|
|
34
|
+
this.configurations = new Map();
|
|
35
|
+
this.loading = new Map();
|
|
36
|
+
this.dirtyTransactions = new Set();
|
|
37
|
+
this.generation = 0;
|
|
38
|
+
this.stopped = false;
|
|
39
|
+
this.enabled = !(0, config_utils_1.getEnvValue)(config, 'FB_PROPERTY_VALUE_LOCKS_ENABLED', false);
|
|
40
|
+
this.catalogGeneration = metadata.getGeneration();
|
|
41
|
+
dataSource.subscribers.push(this);
|
|
42
|
+
}
|
|
43
|
+
async findOne(spaceId) {
|
|
44
|
+
const configuration = await this.readConfiguration(spaceId);
|
|
45
|
+
return configuration ? { ...configuration.space } : null;
|
|
46
|
+
}
|
|
47
|
+
async findDevicesBySpace(spaceId) {
|
|
48
|
+
while (true) {
|
|
49
|
+
const generation = this.currentGeneration();
|
|
50
|
+
const configuration = await this.requiredConfiguration(spaceId);
|
|
51
|
+
const devices = await Promise.all(configuration.deviceIds.map((id) => this.graphs.findOne(id)));
|
|
52
|
+
if (generation !== this.currentGeneration())
|
|
53
|
+
continue;
|
|
54
|
+
return devices.filter((device) => device !== null && !device.hidden);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
async getLightingRoleMap(spaceId) {
|
|
58
|
+
const configuration = await this.requiredConfiguration(spaceId);
|
|
59
|
+
return new Map(configuration.lighting.map((role) => [
|
|
60
|
+
`${role.deviceId}:${role.channelId}`,
|
|
61
|
+
Object.assign(new space_lighting_role_entity_1.SpaceLightingRoleEntity(), structuredClone(role)),
|
|
62
|
+
]));
|
|
63
|
+
}
|
|
64
|
+
async getClimateRoleMap(spaceId) {
|
|
65
|
+
const configuration = await this.requiredConfiguration(spaceId);
|
|
66
|
+
return new Map(configuration.climate.map((role) => [
|
|
67
|
+
role.channelId ? `${role.deviceId}:${role.channelId}` : role.deviceId,
|
|
68
|
+
Object.assign(new space_climate_role_entity_1.SpaceClimateRoleEntity(), structuredClone(role)),
|
|
69
|
+
]));
|
|
70
|
+
}
|
|
71
|
+
async getSensorRoleMap(spaceId) {
|
|
72
|
+
const configuration = await this.requiredConfiguration(spaceId);
|
|
73
|
+
return new Map(configuration.sensor.map((role) => [
|
|
74
|
+
`${role.deviceId}:${role.channelId}`,
|
|
75
|
+
Object.assign(new space_sensor_role_entity_1.SpaceSensorRoleEntity(), structuredClone(role)),
|
|
76
|
+
]));
|
|
77
|
+
}
|
|
78
|
+
async requiredConfiguration(spaceId) {
|
|
79
|
+
const configuration = await this.readConfiguration(spaceId);
|
|
80
|
+
if (!configuration)
|
|
81
|
+
throw new spaces_exceptions_1.SpacesNotFoundException('Requested space does not exist');
|
|
82
|
+
return configuration;
|
|
83
|
+
}
|
|
84
|
+
async readConfiguration(spaceId) {
|
|
85
|
+
while (true) {
|
|
86
|
+
const generation = this.currentGeneration();
|
|
87
|
+
if (!this.enabled || this.stopped || this.dirtyTransactions.size > 0)
|
|
88
|
+
return this.query(spaceId);
|
|
89
|
+
const cached = this.configurations.get(spaceId);
|
|
90
|
+
if (cached) {
|
|
91
|
+
this.configurations.delete(spaceId);
|
|
92
|
+
this.configurations.set(spaceId, cached);
|
|
93
|
+
return cached;
|
|
94
|
+
}
|
|
95
|
+
let pending = this.loading.get(spaceId);
|
|
96
|
+
if (!pending || pending.generation !== generation) {
|
|
97
|
+
if (!pending && this.loading.size >= exports.spaceStateMetadataCapacity)
|
|
98
|
+
return this.query(spaceId);
|
|
99
|
+
pending = { generation, promise: this.query(spaceId) };
|
|
100
|
+
this.loading.set(spaceId, pending);
|
|
101
|
+
}
|
|
102
|
+
try {
|
|
103
|
+
const configuration = await pending.promise;
|
|
104
|
+
if (generation !== this.currentGeneration())
|
|
105
|
+
continue;
|
|
106
|
+
if (configuration && !this.stopped && this.dirtyTransactions.size === 0) {
|
|
107
|
+
if (!this.configurations.has(spaceId) && this.configurations.size >= exports.spaceStateMetadataCapacity) {
|
|
108
|
+
const oldest = this.configurations.keys().next().value;
|
|
109
|
+
if (typeof oldest === 'string')
|
|
110
|
+
this.configurations.delete(oldest);
|
|
111
|
+
}
|
|
112
|
+
this.configurations.set(spaceId, configuration);
|
|
113
|
+
}
|
|
114
|
+
return configuration;
|
|
115
|
+
}
|
|
116
|
+
finally {
|
|
117
|
+
if (this.loading.get(spaceId) === pending)
|
|
118
|
+
this.loading.delete(spaceId);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
async query(spaceId) {
|
|
123
|
+
const space = await this.dataSource
|
|
124
|
+
.getRepository(space_entity_1.SpaceEntity)
|
|
125
|
+
.createQueryBuilder('space')
|
|
126
|
+
.callListeners(false)
|
|
127
|
+
.where('space.id = :spaceId', { spaceId })
|
|
128
|
+
.getOne();
|
|
129
|
+
if (!space)
|
|
130
|
+
return null;
|
|
131
|
+
const members = space.type === spaces_constants_1.SpaceType.ROOM
|
|
132
|
+
? await this.dataSource
|
|
133
|
+
.getRepository(devices_entity_1.DeviceEntity)
|
|
134
|
+
.createQueryBuilder('device')
|
|
135
|
+
.select('device.id', 'id')
|
|
136
|
+
.where('device.roomId = :spaceId', { spaceId })
|
|
137
|
+
.andWhere('device.hidden = :hidden', { hidden: false })
|
|
138
|
+
.orderBy('device.name', 'ASC')
|
|
139
|
+
.getRawMany()
|
|
140
|
+
: await this.dataSource
|
|
141
|
+
.getRepository(device_zone_entity_1.DeviceZoneEntity)
|
|
142
|
+
.createQueryBuilder('membership')
|
|
143
|
+
.innerJoin('membership.device', 'device')
|
|
144
|
+
.select('device.id', 'id')
|
|
145
|
+
.where('membership.zoneId = :spaceId', { spaceId })
|
|
146
|
+
.andWhere('device.hidden = :hidden', { hidden: false })
|
|
147
|
+
.getRawMany();
|
|
148
|
+
const [lighting, climate, sensor] = await Promise.all([
|
|
149
|
+
this.dataSource
|
|
150
|
+
.getRepository(space_lighting_role_entity_1.SpaceLightingRoleEntity)
|
|
151
|
+
.createQueryBuilder('role')
|
|
152
|
+
.callListeners(false)
|
|
153
|
+
.where('role.spaceId = :spaceId', { spaceId })
|
|
154
|
+
.orderBy('role.role', 'ASC')
|
|
155
|
+
.addOrderBy('role.priority', 'ASC')
|
|
156
|
+
.getMany(),
|
|
157
|
+
this.dataSource
|
|
158
|
+
.getRepository(space_climate_role_entity_1.SpaceClimateRoleEntity)
|
|
159
|
+
.createQueryBuilder('role')
|
|
160
|
+
.callListeners(false)
|
|
161
|
+
.where('role.spaceId = :spaceId', { spaceId })
|
|
162
|
+
.orderBy('role.role', 'ASC')
|
|
163
|
+
.addOrderBy('role.priority', 'ASC')
|
|
164
|
+
.getMany(),
|
|
165
|
+
this.dataSource
|
|
166
|
+
.getRepository(space_sensor_role_entity_1.SpaceSensorRoleEntity)
|
|
167
|
+
.createQueryBuilder('role')
|
|
168
|
+
.callListeners(false)
|
|
169
|
+
.where('role.spaceId = :spaceId', { spaceId })
|
|
170
|
+
.orderBy('role.role', 'ASC')
|
|
171
|
+
.addOrderBy('role.priority', 'ASC')
|
|
172
|
+
.getMany(),
|
|
173
|
+
]);
|
|
174
|
+
return {
|
|
175
|
+
space: { id: space.id, type: space.type },
|
|
176
|
+
deviceIds: members.map(({ id }) => id),
|
|
177
|
+
lighting,
|
|
178
|
+
climate,
|
|
179
|
+
sensor,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
invalidate() {
|
|
183
|
+
this.generation++;
|
|
184
|
+
this.configurations.clear();
|
|
185
|
+
}
|
|
186
|
+
currentGeneration() {
|
|
187
|
+
for (const runner of this.dirtyTransactions) {
|
|
188
|
+
if (runner.isReleased || !runner.isTransactionActive) {
|
|
189
|
+
this.dirtyTransactions.delete(runner);
|
|
190
|
+
this.invalidate();
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
const generation = this.metadata.getGeneration();
|
|
194
|
+
if (generation !== this.catalogGeneration) {
|
|
195
|
+
this.catalogGeneration = generation;
|
|
196
|
+
this.invalidate();
|
|
197
|
+
}
|
|
198
|
+
return this.generation;
|
|
199
|
+
}
|
|
200
|
+
beforeInsert(event) {
|
|
201
|
+
this.mutation(event);
|
|
202
|
+
}
|
|
203
|
+
afterInsert(event) {
|
|
204
|
+
this.mutation(event);
|
|
205
|
+
}
|
|
206
|
+
beforeUpdate(event) {
|
|
207
|
+
this.mutation(event);
|
|
208
|
+
}
|
|
209
|
+
afterUpdate(event) {
|
|
210
|
+
this.mutation(event);
|
|
211
|
+
}
|
|
212
|
+
beforeRemove(event) {
|
|
213
|
+
this.mutation(event);
|
|
214
|
+
}
|
|
215
|
+
afterRemove(event) {
|
|
216
|
+
this.mutation(event);
|
|
217
|
+
}
|
|
218
|
+
afterTransactionCommit(event) {
|
|
219
|
+
this.settled(event.queryRunner);
|
|
220
|
+
}
|
|
221
|
+
afterTransactionRollback(event) {
|
|
222
|
+
this.settled(event.queryRunner);
|
|
223
|
+
}
|
|
224
|
+
mutation(event) {
|
|
225
|
+
if (event.metadata.target !== space_role_entity_1.SpaceRoleEntity &&
|
|
226
|
+
!event.metadata.inheritanceTree.some((type) => type === space_entity_1.SpaceEntity ||
|
|
227
|
+
type === space_lighting_role_entity_1.SpaceLightingRoleEntity ||
|
|
228
|
+
type === space_climate_role_entity_1.SpaceClimateRoleEntity ||
|
|
229
|
+
type === space_sensor_role_entity_1.SpaceSensorRoleEntity ||
|
|
230
|
+
type === devices_entity_1.DeviceEntity ||
|
|
231
|
+
type === devices_entity_1.ChannelEntity ||
|
|
232
|
+
type === device_zone_entity_1.DeviceZoneEntity))
|
|
233
|
+
return;
|
|
234
|
+
if (event.queryRunner.isTransactionActive)
|
|
235
|
+
this.dirtyTransactions.add(event.queryRunner);
|
|
236
|
+
this.invalidate();
|
|
237
|
+
}
|
|
238
|
+
settled(runner) {
|
|
239
|
+
if (!this.dirtyTransactions.has(runner))
|
|
240
|
+
return;
|
|
241
|
+
this.invalidate();
|
|
242
|
+
if (!runner.isTransactionActive)
|
|
243
|
+
this.dirtyTransactions.delete(runner);
|
|
244
|
+
}
|
|
245
|
+
onModuleDestroy() {
|
|
246
|
+
this.stopped = true;
|
|
247
|
+
const index = this.dataSource.subscribers.indexOf(this);
|
|
248
|
+
if (index >= 0)
|
|
249
|
+
this.dataSource.subscribers.splice(index, 1);
|
|
250
|
+
this.invalidate();
|
|
251
|
+
this.dirtyTransactions.clear();
|
|
252
|
+
}
|
|
253
|
+
};
|
|
254
|
+
exports.SpaceStateReadService = SpaceStateReadService;
|
|
255
|
+
exports.SpaceStateReadService = SpaceStateReadService = __decorate([
|
|
256
|
+
(0, common_1.Injectable)(),
|
|
257
|
+
__metadata("design:paramtypes", [typeorm_1.DataSource,
|
|
258
|
+
property_metadata_service_1.PropertyMetadataService,
|
|
259
|
+
device_command_graph_service_1.DeviceCommandGraphService,
|
|
260
|
+
config_1.ConfigService])
|
|
261
|
+
], SpaceStateReadService);
|
|
262
|
+
//# sourceMappingURL=space-state-read.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"space-state-read.service.js","sourceRoot":"","sources":["../../../../src/plugins/spaces-home-control/services/space-state-read.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCASiB;AAEjB,2CAA6D;AAC7D,2CAA+C;AAE/C,qEAAiE;AACjE,6FAAwF;AACxF,qFAA+F;AAC/F,iHAA2G;AAC3G,2GAAsG;AACtG,0FAAqF;AACrF,gFAA4E;AAC5E,+EAAqE;AACrE,iFAAoF;AACpF,qFAA+E;AAC/E,uFAAiF;AACjF,mFAA6E;AAEhE,QAAA,0BAA0B,GAAG,GAAG,CAAC;AAcvC,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IASjC,YACkB,UAAsB,EACtB,QAAiC,EACjC,MAAiC,EAClD,MAAqB;QAHJ,eAAU,GAAV,UAAU,CAAY;QACtB,aAAQ,GAAR,QAAQ,CAAyB;QACjC,WAAM,GAAN,MAAM,CAA2B;QAVlC,mBAAc,GAAG,IAAI,GAAG,EAA8B,CAAC;QACvD,YAAO,GAAG,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CAC1B;YAED,OAAO;QACR,IAAI,KAAK,CAAC,WAAW,CAAC,mBAAmB;YAAE,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACzF,IAAI,CAAC,UAAU,EAAE,CAAC;IACnB,CAAC;IAEO,OAAO,CAAC,MAAmB;QAClC,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC;YAAE,OAAO;QAChD,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,IAAI,CAAC,MAAM,CAAC,mBAAmB;YAAE,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACxE,CAAC;IAED,eAAe;QACd,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACxD,IAAI,KAAK,IAAI,CAAC;YAAE,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAC7D,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC;IAChC,CAAC;CACD,CAAA;AAxPY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;qCAWkB,oBAAU;QACZ,mDAAuB;QACzB,wDAAyB;QAC1C,sBAAa;GAbV,qBAAqB,CAwPjC"}
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.SpacesHomeControlPlugin = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
|
+
const config_1 = require("@nestjs/config");
|
|
14
15
|
const typeorm_1 = require("@nestjs/typeorm");
|
|
15
16
|
const plugins_type_mapper_service_1 = require("../../modules/config/services/plugins-type-mapper.service");
|
|
16
17
|
const devices_module_1 = require("../../modules/devices/devices.module");
|
|
@@ -75,6 +76,7 @@ const space_media_activity_binding_service_1 = require("./services/space-media-a
|
|
|
75
76
|
const space_media_activity_service_1 = require("./services/space-media-activity.service");
|
|
76
77
|
const space_sensor_role_service_1 = require("./services/space-sensor-role.service");
|
|
77
78
|
const space_sensor_state_service_1 = require("./services/space-sensor-state.service");
|
|
79
|
+
const space_state_read_service_1 = require("./services/space-state-read.service");
|
|
78
80
|
const space_suggestion_heartbeat_service_1 = require("./services/space-suggestion-heartbeat.service");
|
|
79
81
|
const space_suggestion_service_1 = require("./services/space-suggestion.service");
|
|
80
82
|
const space_undo_history_service_1 = require("./services/space-undo-history.service");
|
|
@@ -240,6 +242,7 @@ exports.SpacesHomeControlPlugin = SpacesHomeControlPlugin = __decorate([
|
|
|
240
242
|
(0, common_1.Global)(),
|
|
241
243
|
(0, common_1.Module)({
|
|
242
244
|
imports: [
|
|
245
|
+
config_1.ConfigModule,
|
|
243
246
|
typeorm_1.TypeOrmModule.forFeature([
|
|
244
247
|
space_entity_1.SpaceEntity,
|
|
245
248
|
room_space_entity_1.RoomSpaceEntity,
|
|
@@ -281,6 +284,7 @@ exports.SpacesHomeControlPlugin = SpacesHomeControlPlugin = __decorate([
|
|
|
281
284
|
space_covers_role_service_1.SpaceCoversRoleService,
|
|
282
285
|
space_lighting_role_service_1.SpaceLightingRoleService,
|
|
283
286
|
space_sensor_role_service_1.SpaceSensorRoleService,
|
|
287
|
+
space_state_read_service_1.SpaceStateReadService,
|
|
284
288
|
space_climate_state_service_1.SpaceClimateStateService,
|
|
285
289
|
space_covers_state_service_1.SpaceCoversStateService,
|
|
286
290
|
space_lighting_state_service_1.SpaceLightingStateService,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spaces-home-control.plugin.js","sourceRoot":"","sources":["../../../src/plugins/spaces-home-control/spaces-home-control.plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA8D;AAC9D,6CAAgD;AAEhD,2GAAqG;AACrG,yEAAqE;AACrE,kFAA4F;AAC5F,4EAAwE;AACxE,yIAAiI;AACjI,kFAA8E;AAC9E,6FAAyF;AACzF,uHAAiH;AACjH,yEAAqE;AACrE,sEAA+D;AAC/D,6FAAwF;AACxF,gFAA2E;AAC3E,gFAA2E;AAC3E,6EAAyE;AACzE,mHAA4G;AAC5G,yGAAmG;AACnG,4EAAiF;AACjF,sEAAkE;AAClE,0FAA4E;AAC5E,kHAA6G;AAC7G,oHAA8G;AAC9G,yEAAqE;AACrE,gHAA0G;AAC1G,mEAA+D;AAC/D,+EAA2E;AAE3E,uFAAgF;AAChF,+DAAiF;AACjF,uFAAgF;AAChF,oEAA+D;AAC/D,sGAA+F;AAC/F,oFAA8E;AAC9E,kFAA4E;AAC5E,sFAAgF;AAChF,wGAAiG;AACjG,kFAA4E;AAC5E,oEAA+D;AAC/D,iFAA4E;AAC5E,2FAAqF;AACrF,6FAAuF;AACvF,yFAAmF;AACnF,yFAAoF;AACpF,wDAAqE;AACrE,8EAAyE;AACzE,4EAAuE;AACvE,8FAAwF;AACxF,gGAAyF;AACzF,wFAAkF;AAClF,gFAA2E;AAC3E,kFAA6E;AAC7E,sFAAgF;AAChF,wFAAkF;AAClF,8FAAwF;AACxF,oFAA8E;AAC9E,sFAAgF;AAChF,oFAA8E;AAC9E,0EAAqE;AACrE,wFAAkF;AAClF,0FAAoF;AACpF,wFAAkF;AAClF,0GAAmG;AACnG,0FAAoF;AACpF,oFAA8E;AAC9E,sFAAgF;AAChF,sGAAgG;AAChG,kFAA6E;AAC7E,sFAAgF;AAChF,4EAAuE;AACvE,mFAIyC;AACzC,+EAAgG;AAChG,iCAAiD;
|
|
1
|
+
{"version":3,"file":"spaces-home-control.plugin.js","sourceRoot":"","sources":["../../../src/plugins/spaces-home-control/spaces-home-control.plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA8D;AAC9D,2CAAkE;AAClE,6CA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AwB;YACxB,kDAAsB;YACtB,gDAAqB;YAErB,sDAAwB;YACxB,oDAAuB;YACvB,wDAAyB;YACzB,oDAAuB;YAEvB,4DAA2B;YAC3B,iDAAsB;YACtB,uEAAgC;YAChC,wDAAyB;YAEzB,4DAA2B;YAC3B,sDAAwB;YACxB,oEAA+B;YAC/B,iDAAsB;YACtB,oDAAuB;YACvB,2CAAmB;SACnB;QACD,WAAW,EAAE,EAAE;QACf,OAAO,EAAE;YACR,sDAAwB;YACxB,8BAAuB;YACvB,6CAAoB;YACpB,2CAAmB;YACnB,+CAAqB;YACrB,kDAAsB;YACtB,yCAAkB;YAClB,oDAAuB;YACvB,kDAAsB;YACtB,sDAAwB;YACxB,kDAAsB;YACtB,sDAAwB;YACxB,oDAAuB;YACvB,wDAAyB;YACzB,oDAAuB;YACvB,4DAA2B;YAC3B,iDAAsB;YACtB,uEAAgC;YAChC,wDAAyB;YACzB,4DAA2B;YAC3B,sDAAwB;YACxB,oEAA+B;YAC/B,iDAAsB;YACtB,oDAAuB;SACvB;KACD,CAAC;qCAG+B,sDAAwB;QACrB,8DAA4B;QACtB,6DAA4B;QAChC,sCAAiB;QACb,8DAA4B;QACpB,gFAAoC;QACtC,6DAA2B;QACtC,oDAAuB;QACnB,6DAA2B;QACnC,2CAAmB;QACnB,2CAAmB;QACX,4DAA2B;QAC9B,sDAAwB;QACjB,oEAA+B;GAf/D,uBAAuB,CAyMnC"}
|
package/dist/spec/channels.d.ts
CHANGED
|
@@ -2584,7 +2584,7 @@ export declare const channelsSchema: {
|
|
|
2584
2584
|
readonly permissions: readonly ["ev"];
|
|
2585
2585
|
readonly data_type: "enum";
|
|
2586
2586
|
readonly unit: any;
|
|
2587
|
-
readonly format: readonly ["press", "long_press", "double_press"];
|
|
2587
|
+
readonly format: readonly ["press", "long_press", "double_press", "triple_press", "down", "up"];
|
|
2588
2588
|
};
|
|
2589
2589
|
readonly detected: {
|
|
2590
2590
|
readonly category: "detected";
|
|
@@ -2604,6 +2604,56 @@ export declare const channelsSchema: {
|
|
|
2604
2604
|
};
|
|
2605
2605
|
};
|
|
2606
2606
|
};
|
|
2607
|
+
readonly binary_input: {
|
|
2608
|
+
readonly category: "binary_input";
|
|
2609
|
+
readonly properties: {
|
|
2610
|
+
readonly state: {
|
|
2611
|
+
readonly category: "state";
|
|
2612
|
+
readonly required: true;
|
|
2613
|
+
readonly permissions: readonly ["ro"];
|
|
2614
|
+
readonly data_type: "bool";
|
|
2615
|
+
readonly unit: any;
|
|
2616
|
+
readonly format: any;
|
|
2617
|
+
};
|
|
2618
|
+
readonly active: {
|
|
2619
|
+
readonly category: "active";
|
|
2620
|
+
readonly required: false;
|
|
2621
|
+
readonly permissions: readonly ["ro"];
|
|
2622
|
+
readonly data_type: "bool";
|
|
2623
|
+
readonly unit: any;
|
|
2624
|
+
readonly format: any;
|
|
2625
|
+
};
|
|
2626
|
+
};
|
|
2627
|
+
};
|
|
2628
|
+
readonly analog_input: {
|
|
2629
|
+
readonly category: "analog_input";
|
|
2630
|
+
readonly properties: {
|
|
2631
|
+
readonly value: {
|
|
2632
|
+
readonly category: "value";
|
|
2633
|
+
readonly required: true;
|
|
2634
|
+
readonly permissions: readonly ["ro"];
|
|
2635
|
+
readonly data_type: "float";
|
|
2636
|
+
readonly unit: any;
|
|
2637
|
+
readonly format: any;
|
|
2638
|
+
};
|
|
2639
|
+
readonly unit: {
|
|
2640
|
+
readonly category: "unit";
|
|
2641
|
+
readonly required: false;
|
|
2642
|
+
readonly permissions: readonly ["ro"];
|
|
2643
|
+
readonly data_type: "string";
|
|
2644
|
+
readonly unit: any;
|
|
2645
|
+
readonly format: any;
|
|
2646
|
+
};
|
|
2647
|
+
readonly active: {
|
|
2648
|
+
readonly category: "active";
|
|
2649
|
+
readonly required: false;
|
|
2650
|
+
readonly permissions: readonly ["ro"];
|
|
2651
|
+
readonly data_type: "bool";
|
|
2652
|
+
readonly unit: any;
|
|
2653
|
+
readonly format: any;
|
|
2654
|
+
};
|
|
2655
|
+
};
|
|
2656
|
+
};
|
|
2607
2657
|
readonly indicator: {
|
|
2608
2658
|
readonly category: "indicator";
|
|
2609
2659
|
readonly properties: {
|
package/dist/spec/channels.js
CHANGED
|
@@ -3896,7 +3896,10 @@ exports.channelsSchema = {
|
|
|
3896
3896
|
"format": [
|
|
3897
3897
|
"press",
|
|
3898
3898
|
"long_press",
|
|
3899
|
-
"double_press"
|
|
3899
|
+
"double_press",
|
|
3900
|
+
"triple_press",
|
|
3901
|
+
"down",
|
|
3902
|
+
"up"
|
|
3900
3903
|
]
|
|
3901
3904
|
},
|
|
3902
3905
|
"detected": {
|
|
@@ -3921,6 +3924,66 @@ exports.channelsSchema = {
|
|
|
3921
3924
|
}
|
|
3922
3925
|
}
|
|
3923
3926
|
},
|
|
3927
|
+
"binary_input": {
|
|
3928
|
+
"category": "binary_input",
|
|
3929
|
+
"properties": {
|
|
3930
|
+
"state": {
|
|
3931
|
+
"category": "state",
|
|
3932
|
+
"required": true,
|
|
3933
|
+
"permissions": [
|
|
3934
|
+
"ro"
|
|
3935
|
+
],
|
|
3936
|
+
"data_type": "bool",
|
|
3937
|
+
"unit": null,
|
|
3938
|
+
"format": null
|
|
3939
|
+
},
|
|
3940
|
+
"active": {
|
|
3941
|
+
"category": "active",
|
|
3942
|
+
"required": false,
|
|
3943
|
+
"permissions": [
|
|
3944
|
+
"ro"
|
|
3945
|
+
],
|
|
3946
|
+
"data_type": "bool",
|
|
3947
|
+
"unit": null,
|
|
3948
|
+
"format": null
|
|
3949
|
+
}
|
|
3950
|
+
}
|
|
3951
|
+
},
|
|
3952
|
+
"analog_input": {
|
|
3953
|
+
"category": "analog_input",
|
|
3954
|
+
"properties": {
|
|
3955
|
+
"value": {
|
|
3956
|
+
"category": "value",
|
|
3957
|
+
"required": true,
|
|
3958
|
+
"permissions": [
|
|
3959
|
+
"ro"
|
|
3960
|
+
],
|
|
3961
|
+
"data_type": "float",
|
|
3962
|
+
"unit": null,
|
|
3963
|
+
"format": null
|
|
3964
|
+
},
|
|
3965
|
+
"unit": {
|
|
3966
|
+
"category": "unit",
|
|
3967
|
+
"required": false,
|
|
3968
|
+
"permissions": [
|
|
3969
|
+
"ro"
|
|
3970
|
+
],
|
|
3971
|
+
"data_type": "string",
|
|
3972
|
+
"unit": null,
|
|
3973
|
+
"format": null
|
|
3974
|
+
},
|
|
3975
|
+
"active": {
|
|
3976
|
+
"category": "active",
|
|
3977
|
+
"required": false,
|
|
3978
|
+
"permissions": [
|
|
3979
|
+
"ro"
|
|
3980
|
+
],
|
|
3981
|
+
"data_type": "bool",
|
|
3982
|
+
"unit": null,
|
|
3983
|
+
"format": null
|
|
3984
|
+
}
|
|
3985
|
+
}
|
|
3986
|
+
},
|
|
3924
3987
|
"indicator": {
|
|
3925
3988
|
"category": "indicator",
|
|
3926
3989
|
"properties": {
|