@fastybird/smart-panel-backend 1.1.0-alpha.63 → 1.1.0-alpha.65
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.d.ts +3 -1
- package/dist/app.module.js +5 -1
- package/dist/app.module.js.map +1 -1
- package/dist/cli.js +1 -0
- package/dist/cli.js.map +1 -1
- package/dist/common/database/sqlite-data-source.d.ts +37 -0
- package/dist/common/database/sqlite-data-source.js +2131 -0
- package/dist/common/database/sqlite-data-source.js.map +1 -0
- package/dist/dataSource.d.ts +3 -1
- package/dist/dataSource.js +3 -3
- package/dist/dataSource.js.map +1 -1
- package/dist/main.js +1 -0
- package/dist/main.js.map +1 -1
- package/dist/migrations/1000000000002-AddTokenLastUsedAt.js +1 -0
- package/dist/migrations/1000000000002-AddTokenLastUsedAt.js.map +1 -1
- package/dist/migrations/1000000000027-AddVirtualProducerBindings.d.ts +7 -0
- package/dist/migrations/1000000000027-AddVirtualProducerBindings.js +87 -0
- package/dist/migrations/1000000000027-AddVirtualProducerBindings.js.map +1 -0
- package/dist/migrations/1000000000028-AddShellySampleSources.d.ts +6 -0
- package/dist/migrations/1000000000028-AddShellySampleSources.js +29 -0
- package/dist/migrations/1000000000028-AddShellySampleSources.js.map +1 -0
- package/dist/migrations/1000000000029-AddVirtualNumericTransforms.d.ts +6 -0
- package/dist/migrations/1000000000029-AddVirtualNumericTransforms.js +31 -0
- package/dist/migrations/1000000000029-AddVirtualNumericTransforms.js.map +1 -0
- package/dist/migrations/1000000000030-AddZigbeeSampleSources.d.ts +6 -0
- package/dist/migrations/1000000000030-AddZigbeeSampleSources.js +33 -0
- package/dist/migrations/1000000000030-AddZigbeeSampleSources.js.map +1 -0
- package/dist/migrations/1000000000031-AddVirtualThermostatClaims.d.ts +6 -0
- package/dist/migrations/1000000000031-AddVirtualThermostatClaims.js +62 -0
- package/dist/migrations/1000000000031-AddVirtualThermostatClaims.js.map +1 -0
- package/dist/migrations/1000000000032-AddVirtualThermostatRuntime.d.ts +6 -0
- package/dist/migrations/1000000000032-AddVirtualThermostatRuntime.js +39 -0
- package/dist/migrations/1000000000032-AddVirtualThermostatRuntime.js.map +1 -0
- package/dist/migrations/1000000000033-AddThermostatInstallationProfiles.d.ts +6 -0
- package/dist/migrations/1000000000033-AddThermostatInstallationProfiles.js +28 -0
- package/dist/migrations/1000000000033-AddThermostatInstallationProfiles.js.map +1 -0
- package/dist/migrations/1000000000034-AddVirtualThermostatRecoveries.d.ts +6 -0
- package/dist/migrations/1000000000034-AddVirtualThermostatRecoveries.js +26 -0
- package/dist/migrations/1000000000034-AddVirtualThermostatRecoveries.js.map +1 -0
- package/dist/migrations/1000000000035-IndexVirtualThermostatCommands.d.ts +6 -0
- package/dist/migrations/1000000000035-IndexVirtualThermostatCommands.js +35 -0
- package/dist/migrations/1000000000035-IndexVirtualThermostatCommands.js.map +1 -0
- package/dist/migrations/1000000000036-AddVirtualAggregatePolicies.d.ts +6 -0
- package/dist/migrations/1000000000036-AddVirtualAggregatePolicies.js +18 -0
- package/dist/migrations/1000000000036-AddVirtualAggregatePolicies.js.map +1 -0
- package/dist/migrations/1000000000037-AddVirtualAggregateProfiles.d.ts +6 -0
- package/dist/migrations/1000000000037-AddVirtualAggregateProfiles.js +16 -0
- package/dist/migrations/1000000000037-AddVirtualAggregateProfiles.js.map +1 -0
- package/dist/migrations/1000000000038-AddShellyCoverOrdering.d.ts +6 -0
- package/dist/migrations/1000000000038-AddShellyCoverOrdering.js +19 -0
- package/dist/migrations/1000000000038-AddShellyCoverOrdering.js.map +1 -0
- package/dist/migrations/1000000000039-AddVirtualThermostatComfort.d.ts +6 -0
- package/dist/migrations/1000000000039-AddVirtualThermostatComfort.js +16 -0
- package/dist/migrations/1000000000039-AddVirtualThermostatComfort.js.map +1 -0
- package/dist/migrations/1000000000040-AddThermostatBranchGroups.d.ts +6 -0
- package/dist/migrations/1000000000040-AddThermostatBranchGroups.js +32 -0
- package/dist/migrations/1000000000040-AddThermostatBranchGroups.js.map +1 -0
- package/dist/migrations/1000000000041-AddThermostatMemberProtection.d.ts +6 -0
- package/dist/migrations/1000000000041-AddThermostatMemberProtection.js +39 -0
- package/dist/migrations/1000000000041-AddThermostatMemberProtection.js.map +1 -0
- package/dist/migrations/1000000000042-AddShellyCoverRecoveries.d.ts +6 -0
- package/dist/migrations/1000000000042-AddShellyCoverRecoveries.js +19 -0
- package/dist/migrations/1000000000042-AddShellyCoverRecoveries.js.map +1 -0
- package/dist/migrations/1000000000044-AddVirtualDewPoint.d.ts +6 -0
- package/dist/migrations/1000000000044-AddVirtualDewPoint.js +36 -0
- package/dist/migrations/1000000000044-AddVirtualDewPoint.js.map +1 -0
- package/dist/migrations/1000000000045-AddThermostatCoolingDependencies.d.ts +6 -0
- package/dist/migrations/1000000000045-AddThermostatCoolingDependencies.js +32 -0
- package/dist/migrations/1000000000045-AddThermostatCoolingDependencies.js.map +1 -0
- package/dist/migrations/1000000000046-AddSpaceActivityModes.d.ts +7 -0
- package/dist/migrations/1000000000046-AddSpaceActivityModes.js +54 -0
- package/dist/migrations/1000000000046-AddSpaceActivityModes.js.map +1 -0
- package/dist/migrations/1000000000047-AddClimateAutomationOwnership.d.ts +6 -0
- package/dist/migrations/1000000000047-AddClimateAutomationOwnership.js +60 -0
- package/dist/migrations/1000000000047-AddClimateAutomationOwnership.js.map +1 -0
- package/dist/migrations/1000000000048-AddThermostatCreationCatalogBirths.d.ts +6 -0
- package/dist/migrations/1000000000048-AddThermostatCreationCatalogBirths.js +208 -0
- package/dist/migrations/1000000000048-AddThermostatCreationCatalogBirths.js.map +1 -0
- package/dist/migrations/1000000000049-FenceClimateAutomationLifecycle.d.ts +6 -0
- package/dist/migrations/1000000000049-FenceClimateAutomationLifecycle.js +40 -0
- package/dist/migrations/1000000000049-FenceClimateAutomationLifecycle.js.map +1 -0
- package/dist/migrations/1000000000050-AddSpaceModeSchedules.d.ts +6 -0
- package/dist/migrations/1000000000050-AddSpaceModeSchedules.js +36 -0
- package/dist/migrations/1000000000050-AddSpaceModeSchedules.js.map +1 -0
- package/dist/migrations/1000000000051-AddSpaceOccupancy.d.ts +6 -0
- package/dist/migrations/1000000000051-AddSpaceOccupancy.js +34 -0
- package/dist/migrations/1000000000051-AddSpaceOccupancy.js.map +1 -0
- package/dist/migrations/1000000000052-AddNativeThermostats.d.ts +6 -0
- package/dist/migrations/1000000000052-AddNativeThermostats.js +39 -0
- package/dist/migrations/1000000000052-AddNativeThermostats.js.map +1 -0
- package/dist/migrations/1000000000053-AddThermostatOverrideClocks.d.ts +6 -0
- package/dist/migrations/1000000000053-AddThermostatOverrideClocks.js +35 -0
- package/dist/migrations/1000000000053-AddThermostatOverrideClocks.js.map +1 -0
- package/dist/modules/buddy/buddy.utils.d.ts +1 -1
- package/dist/modules/buddy/buddy.utils.js +10 -11
- package/dist/modules/buddy/buddy.utils.js.map +1 -1
- package/dist/modules/buddy/services/buddy-context.service.js +2 -1
- package/dist/modules/buddy/services/buddy-context.service.js.map +1 -1
- package/dist/modules/buddy/services/home-context-tool-provider.service.d.ts +1 -1
- package/dist/modules/devices/contracts/climate-automation.contract.d.ts +111 -0
- package/dist/modules/devices/contracts/climate-automation.contract.js +3 -0
- package/dist/modules/devices/contracts/climate-automation.contract.js.map +1 -0
- package/dist/modules/devices/controllers/channels.properties.controller.d.ts +1 -1
- package/dist/modules/devices/controllers/channels.properties.controller.js +11 -4
- package/dist/modules/devices/controllers/channels.properties.controller.js.map +1 -1
- package/dist/modules/devices/controllers/devices.channels.properties.controller.d.ts +1 -1
- package/dist/modules/devices/controllers/devices.channels.properties.controller.js +11 -4
- package/dist/modules/devices/controllers/devices.channels.properties.controller.js.map +1 -1
- package/dist/modules/devices/controllers/property-command.controller.d.ts +9 -0
- package/dist/modules/devices/controllers/property-command.controller.js +88 -0
- package/dist/modules/devices/controllers/property-command.controller.js.map +1 -0
- package/dist/modules/devices/devices.constants.d.ts +4 -0
- package/dist/modules/devices/devices.constants.js +4 -0
- package/dist/modules/devices/devices.constants.js.map +1 -1
- package/dist/modules/devices/devices.module.js +22 -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 +39 -0
- package/dist/modules/devices/devices.openapi.js.map +1 -1
- package/dist/modules/devices/dto/property-command.dto.js +20 -6
- package/dist/modules/devices/dto/property-command.dto.js.map +1 -1
- package/dist/modules/devices/dto/update-device.dto.d.ts +1 -1
- package/dist/modules/devices/dto/update-device.dto.js +4 -3
- package/dist/modules/devices/dto/update-device.dto.js.map +1 -1
- package/dist/modules/devices/entities/climate-automation.entity.d.ts +56 -0
- package/dist/modules/devices/entities/climate-automation.entity.js +231 -0
- package/dist/modules/devices/entities/climate-automation.entity.js.map +1 -0
- package/dist/modules/devices/entities/devices.entity.d.ts +4 -0
- package/dist/modules/devices/entities/devices.entity.js +27 -3
- package/dist/modules/devices/entities/devices.entity.js.map +1 -1
- package/dist/modules/devices/interceptors/property-command-entry.interceptor.d.ts +10 -0
- package/dist/modules/devices/interceptors/property-command-entry.interceptor.js +50 -0
- package/dist/modules/devices/interceptors/property-command-entry.interceptor.js.map +1 -0
- package/dist/modules/devices/models/composite-command.model.d.ts +16 -0
- package/dist/modules/devices/models/composite-command.model.js +99 -0
- package/dist/modules/devices/models/composite-command.model.js.map +1 -0
- package/dist/modules/devices/models/property-command-response.model.d.ts +18 -0
- package/dist/modules/devices/models/property-command-response.model.js +90 -0
- package/dist/modules/devices/models/property-command-response.model.js.map +1 -0
- package/dist/modules/devices/models/property-read-policy.model.d.ts +4 -0
- package/dist/modules/devices/models/property-read-policy.model.js +57 -0
- package/dist/modules/devices/models/property-read-policy.model.js.map +1 -0
- package/dist/modules/devices/models/property-sample.model.d.ts +50 -0
- package/dist/modules/devices/models/property-sample.model.js +3 -0
- package/dist/modules/devices/models/property-sample.model.js.map +1 -0
- package/dist/modules/devices/models/property-value-state.model.d.ts +11 -0
- package/dist/modules/devices/models/property-value-state.model.js +55 -1
- package/dist/modules/devices/models/property-value-state.model.js.map +1 -1
- package/dist/modules/devices/platforms/device.platform.d.ts +43 -0
- package/dist/modules/devices/platforms/native-climate.contract.d.ts +50 -0
- package/dist/modules/devices/platforms/native-climate.contract.js +3 -0
- package/dist/modules/devices/platforms/native-climate.contract.js.map +1 -0
- package/dist/modules/devices/services/channels-type-mapper.service.d.ts +3 -0
- package/dist/modules/devices/services/channels-type-mapper.service.js +21 -1
- package/dist/modules/devices/services/channels-type-mapper.service.js.map +1 -1
- package/dist/modules/devices/services/channels.properties-type-mapper.service.d.ts +7 -2
- package/dist/modules/devices/services/channels.properties-type-mapper.service.js +21 -1
- package/dist/modules/devices/services/channels.properties-type-mapper.service.js.map +1 -1
- package/dist/modules/devices/services/channels.properties.service.d.ts +11 -2
- package/dist/modules/devices/services/channels.properties.service.js +219 -64
- package/dist/modules/devices/services/channels.properties.service.js.map +1 -1
- package/dist/modules/devices/services/channels.service.d.ts +12 -5
- package/dist/modules/devices/services/channels.service.js +148 -55
- package/dist/modules/devices/services/channels.service.js.map +1 -1
- package/dist/modules/devices/services/climate-automation-ledger-lifecycle.d.ts +47 -0
- package/dist/modules/devices/services/climate-automation-ledger-lifecycle.js +242 -0
- package/dist/modules/devices/services/climate-automation-ledger-lifecycle.js.map +1 -0
- package/dist/modules/devices/services/climate-automation-ledger.service.d.ts +68 -0
- package/dist/modules/devices/services/climate-automation-ledger.service.js +1061 -0
- package/dist/modules/devices/services/climate-automation-ledger.service.js.map +1 -0
- package/dist/modules/devices/services/climate-automation-ledger.utils.d.ts +8 -0
- package/dist/modules/devices/services/climate-automation-ledger.utils.js +54 -0
- package/dist/modules/devices/services/climate-automation-ledger.utils.js.map +1 -0
- package/dist/modules/devices/services/climate-automation.registry.service.d.ts +15 -0
- package/dist/modules/devices/services/climate-automation.registry.service.js +71 -0
- package/dist/modules/devices/services/climate-automation.registry.service.js.map +1 -0
- package/dist/modules/devices/services/composite-property-command.registry.service.d.ts +48 -0
- package/dist/modules/devices/services/composite-property-command.registry.service.js +65 -0
- package/dist/modules/devices/services/composite-property-command.registry.service.js.map +1 -0
- package/dist/modules/devices/services/controller-publication-context.d.ts +27 -0
- package/dist/modules/devices/services/controller-publication-context.js +148 -0
- package/dist/modules/devices/services/controller-publication-context.js.map +1 -0
- package/dist/modules/devices/services/cover-action-proof.d.ts +7 -0
- package/dist/modules/devices/services/cover-action-proof.js +142 -0
- package/dist/modules/devices/services/cover-action-proof.js.map +1 -0
- package/dist/modules/devices/services/creation-capture.d.ts +19 -0
- package/dist/modules/devices/services/creation-capture.js +85 -0
- package/dist/modules/devices/services/creation-capture.js.map +1 -0
- package/dist/modules/devices/services/device-command-graph.service.js +1 -1
- package/dist/modules/devices/services/device-command-graph.service.js.map +1 -1
- package/dist/modules/devices/services/device-connection-state.service.d.ts +1 -0
- package/dist/modules/devices/services/device-connection-state.service.js +64 -18
- package/dist/modules/devices/services/device-connection-state.service.js.map +1 -1
- package/dist/modules/devices/services/device-connectivity.service.js +96 -51
- package/dist/modules/devices/services/device-connectivity.service.js.map +1 -1
- package/dist/modules/devices/services/device-contribution.registry.service.d.ts +50 -0
- package/dist/modules/devices/services/device-contribution.registry.service.js +45 -0
- package/dist/modules/devices/services/device-contribution.registry.service.js.map +1 -0
- package/dist/modules/devices/services/device-creation-context.d.ts +57 -0
- package/dist/modules/devices/services/device-creation-context.js +315 -0
- package/dist/modules/devices/services/device-creation-context.js.map +1 -0
- package/dist/modules/devices/services/device-structure-lock.service.d.ts +5 -0
- package/dist/modules/devices/services/device-structure-lock.service.js +64 -12
- package/dist/modules/devices/services/device-structure-lock.service.js.map +1 -1
- package/dist/modules/devices/services/device-validation.service.d.ts +0 -1
- package/dist/modules/devices/services/device-validation.service.js +3 -14
- package/dist/modules/devices/services/device-validation.service.js.map +1 -1
- package/dist/modules/devices/services/device-zones.service.d.ts +3 -1
- package/dist/modules/devices/services/device-zones.service.js +30 -6
- package/dist/modules/devices/services/device-zones.service.js.map +1 -1
- package/dist/modules/devices/services/devices-type-mapper.service.d.ts +3 -0
- package/dist/modules/devices/services/devices-type-mapper.service.js +21 -1
- package/dist/modules/devices/services/devices-type-mapper.service.js.map +1 -1
- package/dist/modules/devices/services/devices.service.d.ts +8 -2
- package/dist/modules/devices/services/devices.service.js +194 -49
- package/dist/modules/devices/services/devices.service.js.map +1 -1
- package/dist/modules/devices/services/platform.registry.service.d.ts +11 -1
- package/dist/modules/devices/services/platform.registry.service.js +42 -5
- package/dist/modules/devices/services/platform.registry.service.js.map +1 -1
- package/dist/modules/devices/services/property-command-admission.registry.service.d.ts +28 -0
- package/dist/modules/devices/services/property-command-admission.registry.service.js +70 -0
- package/dist/modules/devices/services/property-command-admission.registry.service.js.map +1 -0
- package/dist/modules/devices/services/property-command-dispatch.service.d.ts +28 -2
- package/dist/modules/devices/services/property-command-dispatch.service.js +704 -10
- package/dist/modules/devices/services/property-command-dispatch.service.js.map +1 -1
- package/dist/modules/devices/services/property-command-entry-snapshot.d.ts +25 -0
- package/dist/modules/devices/services/property-command-entry-snapshot.js +87 -0
- package/dist/modules/devices/services/property-command-entry-snapshot.js.map +1 -0
- package/dist/modules/devices/services/property-command-window.service.d.ts +22 -0
- package/dist/modules/devices/services/property-command-window.service.js +81 -0
- package/dist/modules/devices/services/property-command-window.service.js.map +1 -1
- package/dist/modules/devices/services/property-command.service.d.ts +24 -3
- package/dist/modules/devices/services/property-command.service.js +180 -18
- package/dist/modules/devices/services/property-command.service.js.map +1 -1
- package/dist/modules/devices/services/property-metadata.service.js +1 -1
- package/dist/modules/devices/services/property-metadata.service.js.map +1 -1
- package/dist/modules/devices/services/property-producer.registry.service.d.ts +98 -0
- package/dist/modules/devices/services/property-producer.registry.service.js +636 -0
- package/dist/modules/devices/services/property-producer.registry.service.js.map +1 -0
- package/dist/modules/devices/services/property-value-source.registry.service.d.ts +18 -0
- package/dist/modules/devices/services/property-value-source.registry.service.js +291 -2
- package/dist/modules/devices/services/property-value-source.registry.service.js.map +1 -1
- package/dist/modules/devices/services/property-value.service.d.ts +40 -3
- package/dist/modules/devices/services/property-value.service.js +744 -193
- package/dist/modules/devices/services/property-value.service.js.map +1 -1
- package/dist/modules/devices/subscribers/channel-property-entity.subscriber.d.ts +5 -0
- package/dist/modules/devices/subscribers/channel-property-entity.subscriber.js +25 -0
- package/dist/modules/devices/subscribers/channel-property-entity.subscriber.js.map +1 -1
- package/dist/modules/devices/utils/property-metadata.utils.d.ts +1 -0
- package/dist/modules/devices/utils/property-metadata.utils.js +10 -0
- package/dist/modules/devices/utils/property-metadata.utils.js.map +1 -1
- package/dist/modules/devices/utils/property-permissions.utils.d.ts +2 -0
- package/dist/modules/devices/utils/property-permissions.utils.js +10 -0
- package/dist/modules/devices/utils/property-permissions.utils.js.map +1 -0
- package/dist/modules/extensions/services/discovered-backend.module.d.ts +6 -0
- package/dist/modules/extensions/services/discovered-backend.module.js +32 -0
- package/dist/modules/extensions/services/discovered-backend.module.js.map +1 -0
- package/dist/modules/extensions/services/extensions-discovery.js +15 -0
- package/dist/modules/extensions/services/extensions-discovery.js.map +1 -1
- package/dist/modules/extensions/services/extensions.service.d.ts +4 -0
- package/dist/modules/extensions/services/extensions.service.js +13 -0
- package/dist/modules/extensions/services/extensions.service.js.map +1 -1
- package/dist/modules/extensions/services/managed-extension-service.interface.d.ts +1 -0
- package/dist/modules/extensions/services/managed-service-manager.service.d.ts +15 -0
- package/dist/modules/extensions/services/managed-service-manager.service.js +242 -72
- package/dist/modules/extensions/services/managed-service-manager.service.js.map +1 -1
- package/dist/modules/home-context/schemas/home-search-input.schemas.d.ts +1 -1
- package/dist/modules/intents/models/intent.model.d.ts +2 -0
- package/dist/modules/intents/models/intent.model.js +14 -0
- package/dist/modules/intents/models/intent.model.js.map +1 -1
- package/dist/modules/intents/services/intents.service.d.ts +2 -1
- package/dist/modules/intents/services/intents.service.js +18 -2
- package/dist/modules/intents/services/intents.service.js.map +1 -1
- package/dist/modules/scenes/listeners/websocket-exchange.listener.js +4 -0
- package/dist/modules/scenes/listeners/websocket-exchange.listener.js.map +1 -1
- package/dist/modules/scenes/models/scenes.model.d.ts +2 -0
- package/dist/modules/scenes/models/scenes.model.js +10 -0
- package/dist/modules/scenes/models/scenes.model.js.map +1 -1
- package/dist/modules/scenes/services/scene-executor.service.d.ts +6 -1
- package/dist/modules/scenes/services/scene-executor.service.js +33 -22
- package/dist/modules/scenes/services/scene-executor.service.js.map +1 -1
- package/dist/modules/security/providers/alarm-security.provider.d.ts +3 -1
- package/dist/modules/security/providers/alarm-security.provider.js +83 -8
- package/dist/modules/security/providers/alarm-security.provider.js.map +1 -1
- package/dist/modules/spaces/services/space-lifecycle-registry.service.d.ts +19 -0
- package/dist/modules/spaces/services/space-lifecycle-registry.service.js +121 -0
- package/dist/modules/spaces/services/space-lifecycle-registry.service.js.map +1 -0
- package/dist/modules/spaces/services/spaces.service.d.ts +5 -1
- package/dist/modules/spaces/services/spaces.service.js +34 -6
- package/dist/modules/spaces/services/spaces.service.js.map +1 -1
- package/dist/modules/spaces/spaces.constants.d.ts +3 -1
- package/dist/modules/spaces/spaces.constants.js +2 -0
- package/dist/modules/spaces/spaces.constants.js.map +1 -1
- package/dist/modules/spaces/spaces.module.js +13 -1
- package/dist/modules/spaces/spaces.module.js.map +1 -1
- package/dist/modules/storage/services/storage.service.d.ts +8 -0
- package/dist/modules/storage/services/storage.service.js +225 -0
- package/dist/modules/storage/services/storage.service.js.map +1 -1
- package/dist/modules/swagger/decorators/api-documentation.decorator.d.ts +1 -0
- package/dist/modules/swagger/decorators/api-documentation.decorator.js +9 -1
- package/dist/modules/swagger/decorators/api-documentation.decorator.js.map +1 -1
- package/dist/modules/swagger/services/swagger-document.service.d.ts +1 -0
- package/dist/modules/swagger/services/swagger-document.service.js +71 -1
- package/dist/modules/swagger/services/swagger-document.service.js.map +1 -1
- package/dist/modules/system/scripts/privileged/helper.py +3 -1
- package/dist/modules/system/services/backup.service.js +3 -5
- package/dist/modules/system/services/backup.service.js.map +1 -1
- package/dist/modules/system/services/update-executor.service.js +4 -6
- package/dist/modules/system/services/update-executor.service.js.map +1 -1
- package/dist/modules/system/services/update.service.js +1 -1
- package/dist/modules/system/services/update.service.js.map +1 -1
- package/dist/modules/system/system.constants.d.ts +2 -0
- package/dist/modules/system/system.constants.js +3 -1
- package/dist/modules/system/system.constants.js.map +1 -1
- package/dist/modules/system/utils/timezone.utils.d.ts +2 -0
- package/dist/modules/system/utils/timezone.utils.js +9 -0
- package/dist/modules/system/utils/timezone.utils.js.map +1 -0
- package/dist/modules/websocket/gateway/websocket.gateway.js +1 -0
- package/dist/modules/websocket/gateway/websocket.gateway.js.map +1 -1
- package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.js +2 -0
- package/dist/plugins/devices-home-assistant/devices-home-assistant.plugin.js.map +1 -1
- package/dist/plugins/devices-home-assistant/dto/update-channel-property.dto.d.ts +3 -3
- package/dist/plugins/devices-home-assistant/dto/update-channel-property.dto.js +3 -3
- package/dist/plugins/devices-home-assistant/dto/update-channel-property.dto.js.map +1 -1
- package/dist/plugins/devices-home-assistant/platforms/home-assistant.device.platform.d.ts +11 -1
- package/dist/plugins/devices-home-assistant/platforms/home-assistant.device.platform.js +82 -2
- package/dist/plugins/devices-home-assistant/platforms/home-assistant.device.platform.js.map +1 -1
- package/dist/plugins/devices-home-assistant/services/home-assistant-native-climate.service.d.ts +22 -0
- package/dist/plugins/devices-home-assistant/services/home-assistant-native-climate.service.js +409 -0
- package/dist/plugins/devices-home-assistant/services/home-assistant-native-climate.service.js.map +1 -0
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.d.ts +14 -0
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js +93 -3
- package/dist/plugins/devices-home-assistant/services/home-assistant.ws.service.js.map +1 -1
- package/dist/plugins/devices-homekit/devices-homekit.plugin.js +28 -2
- package/dist/plugins/devices-homekit/devices-homekit.plugin.js.map +1 -1
- package/dist/plugins/devices-homekit/listeners/homekit-event.listener.d.ts +26 -3
- package/dist/plugins/devices-homekit/listeners/homekit-event.listener.js +183 -5
- package/dist/plugins/devices-homekit/listeners/homekit-event.listener.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/base.mapper.d.ts +2 -1
- package/dist/plugins/devices-homekit/mappers/base.mapper.js +38 -10
- package/dist/plugins/devices-homekit/mappers/base.mapper.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/battery.mapper.js +4 -3
- package/dist/plugins/devices-homekit/mappers/battery.mapper.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/button.mapper.js +21 -2
- package/dist/plugins/devices-homekit/mappers/button.mapper.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/characteristic-get.d.ts +3 -0
- package/dist/plugins/devices-homekit/mappers/characteristic-get.js +10 -0
- package/dist/plugins/devices-homekit/mappers/characteristic-get.js.map +1 -0
- package/dist/plugins/devices-homekit/mappers/characteristic-write.d.ts +1 -1
- package/dist/plugins/devices-homekit/mappers/characteristic-write.js +2 -1
- package/dist/plugins/devices-homekit/mappers/characteristic-write.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/fan.mapper.d.ts +12 -0
- package/dist/plugins/devices-homekit/mappers/fan.mapper.js +126 -0
- package/dist/plugins/devices-homekit/mappers/fan.mapper.js.map +1 -0
- package/dist/plugins/devices-homekit/mappers/homekit-mapper.interface.d.ts +8 -0
- package/dist/plugins/devices-homekit/mappers/outlet.mapper.js +4 -0
- package/dist/plugins/devices-homekit/mappers/outlet.mapper.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/property-read.d.ts +7 -0
- package/dist/plugins/devices-homekit/mappers/property-read.js +64 -0
- package/dist/plugins/devices-homekit/mappers/property-read.js.map +1 -0
- package/dist/plugins/devices-homekit/mappers/semantic-conversion.d.ts +2 -0
- package/dist/plugins/devices-homekit/mappers/semantic-conversion.js +15 -0
- package/dist/plugins/devices-homekit/mappers/semantic-conversion.js.map +1 -0
- package/dist/plugins/devices-homekit/mappers/sensor.mapper.d.ts +3 -0
- package/dist/plugins/devices-homekit/mappers/sensor.mapper.js +63 -11
- package/dist/plugins/devices-homekit/mappers/sensor.mapper.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/service-fault.d.ts +4 -0
- package/dist/plugins/devices-homekit/mappers/service-fault.js +33 -0
- package/dist/plugins/devices-homekit/mappers/service-fault.js.map +1 -0
- package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.d.ts +4 -0
- package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.js +128 -19
- package/dist/plugins/devices-homekit/mappers/thermostat-coordinator.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/thermostat.mapper.js +5 -3
- package/dist/plugins/devices-homekit/mappers/thermostat.mapper.js.map +1 -1
- package/dist/plugins/devices-homekit/mappers/unavailable-characteristic.d.ts +3 -0
- package/dist/plugins/devices-homekit/mappers/unavailable-characteristic.js +18 -0
- package/dist/plugins/devices-homekit/mappers/unavailable-characteristic.js.map +1 -0
- package/dist/plugins/devices-homekit/mappers/window-covering.mapper.js +19 -3
- package/dist/plugins/devices-homekit/mappers/window-covering.mapper.js.map +1 -1
- package/dist/plugins/devices-homekit/services/homekit-bridge.service.d.ts +4 -0
- package/dist/plugins/devices-homekit/services/homekit-bridge.service.js +58 -29
- package/dist/plugins/devices-homekit/services/homekit-bridge.service.js.map +1 -1
- package/dist/plugins/devices-homekit/services/homekit-command.dispatcher.d.ts +2 -0
- package/dist/plugins/devices-homekit/services/homekit-command.dispatcher.js +3 -0
- package/dist/plugins/devices-homekit/services/homekit-command.dispatcher.js.map +1 -1
- package/dist/plugins/devices-homekit/services/homekit-mapper-registry.service.d.ts +30 -2
- package/dist/plugins/devices-homekit/services/homekit-mapper-registry.service.js +126 -2
- package/dist/plugins/devices-homekit/services/homekit-mapper-registry.service.js.map +1 -1
- package/dist/plugins/devices-homekit/services/homekit-mapping-maintenance.d.ts +8 -0
- package/dist/plugins/devices-homekit/services/homekit-mapping-maintenance.js +17 -0
- package/dist/plugins/devices-homekit/services/homekit-mapping-maintenance.js.map +1 -0
- package/dist/plugins/devices-homekit/services/homekit-property-state.service.d.ts +19 -0
- package/dist/plugins/devices-homekit/services/homekit-property-state.service.js +69 -0
- package/dist/plugins/devices-homekit/services/homekit-property-state.service.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/contracts/cover-action.contract.d.ts +13 -0
- package/dist/plugins/devices-shelly-ng/contracts/cover-action.contract.js +60 -0
- package/dist/plugins/devices-shelly-ng/contracts/cover-action.contract.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/contracts/cover-recovery.contract.d.ts +13 -0
- package/dist/plugins/devices-shelly-ng/contracts/cover-recovery.contract.js +3 -0
- package/dist/plugins/devices-shelly-ng/contracts/cover-recovery.contract.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/contracts/guard-script-source.d.ts +1 -0
- package/dist/plugins/devices-shelly-ng/contracts/guard-script-source.js +5 -0
- package/dist/plugins/devices-shelly-ng/contracts/guard-script-source.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/contracts/guard-script.contract.d.ts +21 -0
- package/dist/plugins/devices-shelly-ng/contracts/guard-script.contract.js +47 -0
- package/dist/plugins/devices-shelly-ng/contracts/guard-script.contract.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/contracts/member-guard-script-source.d.ts +2 -0
- package/dist/plugins/devices-shelly-ng/contracts/member-guard-script-source.js +27 -0
- package/dist/plugins/devices-shelly-ng/contracts/member-guard-script-source.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/contracts/native-temperature.contract.d.ts +36 -0
- package/dist/plugins/devices-shelly-ng/contracts/native-temperature.contract.js +200 -0
- package/dist/plugins/devices-shelly-ng/contracts/native-temperature.contract.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/contracts/protective-switch.contract.d.ts +44 -0
- package/dist/plugins/devices-shelly-ng/contracts/protective-switch.contract.js +29 -0
- package/dist/plugins/devices-shelly-ng/contracts/protective-switch.contract.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/controllers/shelly-cover-recovery.controller.d.ts +11 -0
- package/dist/plugins/devices-shelly-ng/controllers/shelly-cover-recovery.controller.js +98 -0
- package/dist/plugins/devices-shelly-ng/controllers/shelly-cover-recovery.controller.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.d.ts +51 -1
- package/dist/plugins/devices-shelly-ng/delegates/delegates-manager.service.js +688 -2
- 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 +46 -1
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js +315 -4
- package/dist/plugins/devices-shelly-ng/delegates/shelly-device.delegate.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.openapi.d.ts +3 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.openapi.js +8 -0
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.openapi.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.plugin.js +16 -1
- package/dist/plugins/devices-shelly-ng/devices-shelly-ng.plugin.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/dto/cover-recovery.dto.d.ts +11 -0
- package/dist/plugins/devices-shelly-ng/dto/cover-recovery.dto.js +77 -0
- package/dist/plugins/devices-shelly-ng/dto/cover-recovery.dto.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/entities/shelly-cover-ordering.entity.d.ts +5 -0
- package/dist/plugins/devices-shelly-ng/entities/shelly-cover-ordering.entity.js +32 -0
- package/dist/plugins/devices-shelly-ng/entities/shelly-cover-ordering.entity.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/entities/shelly-cover-recovery.entity.d.ts +17 -0
- package/dist/plugins/devices-shelly-ng/entities/shelly-cover-recovery.entity.js +80 -0
- package/dist/plugins/devices-shelly-ng/entities/shelly-cover-recovery.entity.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/entities/shelly-sample-source.entity.d.ts +16 -0
- package/dist/plugins/devices-shelly-ng/entities/shelly-sample-source.entity.js +70 -0
- package/dist/plugins/devices-shelly-ng/entities/shelly-sample-source.entity.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/mappings/definitions/covers.yaml +30 -24
- package/dist/plugins/devices-shelly-ng/models/cover-recovery.model.d.ts +21 -0
- package/dist/plugins/devices-shelly-ng/models/cover-recovery.model.js +114 -0
- package/dist/plugins/devices-shelly-ng/models/cover-recovery.model.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/platforms/shelly-ng.device.platform.d.ts +27 -1
- package/dist/plugins/devices-shelly-ng/platforms/shelly-ng.device.platform.js +146 -0
- package/dist/plugins/devices-shelly-ng/platforms/shelly-ng.device.platform.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/authenticated-shelly-script-http.d.ts +16 -0
- package/dist/plugins/devices-shelly-ng/services/authenticated-shelly-script-http.js +154 -0
- package/dist/plugins/devices-shelly-ng/services/authenticated-shelly-script-http.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/device-manager.service.d.ts +4 -1
- package/dist/plugins/devices-shelly-ng/services/device-manager.service.js +113 -4
- package/dist/plugins/devices-shelly-ng/services/device-manager.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/guarded-shelly-http.d.ts +2 -0
- package/dist/plugins/devices-shelly-ng/services/guarded-shelly-http.js +78 -0
- package/dist/plugins/devices-shelly-ng/services/guarded-shelly-http.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/guarded-shelly-rpc.d.ts +9 -0
- package/dist/plugins/devices-shelly-ng/services/guarded-shelly-rpc.js +56 -0
- package/dist/plugins/devices-shelly-ng/services/guarded-shelly-rpc.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-artifact.d.ts +45 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-artifact.js +278 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-artifact.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-lease.contract.d.ts +49 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-lease.contract.js +32 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-lease.contract.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-qualification.d.ts +53 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-qualification.js +91 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-qualification.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-session.d.ts +35 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-session.js +244 -0
- package/dist/plugins/devices-shelly-ng/services/remote-dew-point-session.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-ordering.service.d.ts +9 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-ordering.service.js +50 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-ordering.service.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-recovery-lane.service.d.ts +29 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-recovery-lane.service.js +166 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-recovery-lane.service.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-recovery.service.d.ts +21 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-recovery.service.js +207 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-recovery.service.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-session.d.ts +25 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-session.js +132 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-session.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-telemetry.d.ts +9 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-telemetry.js +63 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-cover-telemetry.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-guard-rpc-session.d.ts +33 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-guard-rpc-session.js +191 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-guard-rpc-session.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.d.ts +3 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js +32 -4
- package/dist/plugins/devices-shelly-ng/services/shelly-ng.service.js.map +1 -1
- package/dist/plugins/devices-shelly-ng/services/shelly-sample-sources.service.d.ts +34 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-sample-sources.service.js +194 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-sample-sources.service.js.map +1 -0
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js +5 -2
- package/dist/plugins/devices-shelly-ng/services/shelly-ws-server.service.js.map +1 -1
- package/dist/plugins/devices-shelly-v1/platforms/shelly-v1.device.platform.d.ts +4 -0
- package/dist/plugins/devices-shelly-v1/platforms/shelly-v1.device.platform.js +3 -0
- package/dist/plugins/devices-shelly-v1/platforms/shelly-v1.device.platform.js.map +1 -1
- package/dist/plugins/devices-virtual/contracts/thermostat-actuation.contract.d.ts +114 -0
- package/dist/plugins/devices-virtual/contracts/thermostat-actuation.contract.js +12 -0
- package/dist/plugins/devices-virtual/contracts/thermostat-actuation.contract.js.map +1 -0
- package/dist/plugins/devices-virtual/contracts/thermostat-command.contract.d.ts +4 -0
- package/dist/plugins/devices-virtual/contracts/thermostat-command.contract.js +3 -0
- package/dist/plugins/devices-virtual/contracts/thermostat-command.contract.js.map +1 -0
- package/dist/plugins/devices-virtual/controllers/native-thermostat.controller.d.ts +15 -0
- package/dist/plugins/devices-virtual/controllers/native-thermostat.controller.js +178 -0
- package/dist/plugins/devices-virtual/controllers/native-thermostat.controller.js.map +1 -0
- package/dist/plugins/devices-virtual/controllers/thermostat-authoring-context.controller.d.ts +11 -0
- package/dist/plugins/devices-virtual/controllers/thermostat-authoring-context.controller.js +92 -0
- package/dist/plugins/devices-virtual/controllers/thermostat-authoring-context.controller.js.map +1 -0
- package/dist/plugins/devices-virtual/controllers/thermostat-installation.controller.d.ts +16 -0
- package/dist/plugins/devices-virtual/controllers/thermostat-installation.controller.js +179 -0
- package/dist/plugins/devices-virtual/controllers/thermostat-installation.controller.js.map +1 -0
- package/dist/plugins/devices-virtual/controllers/virtual-dew-point-config.controller.d.ts +11 -0
- package/dist/plugins/devices-virtual/controllers/virtual-dew-point-config.controller.js +100 -0
- package/dist/plugins/devices-virtual/controllers/virtual-dew-point-config.controller.js.map +1 -0
- package/dist/plugins/devices-virtual/controllers/virtual-measurement-authoring.controller.d.ts +19 -0
- package/dist/plugins/devices-virtual/controllers/virtual-measurement-authoring.controller.js +168 -0
- package/dist/plugins/devices-virtual/controllers/virtual-measurement-authoring.controller.js.map +1 -0
- package/dist/plugins/devices-virtual/controllers/virtual-producer-config.controller.d.ts +28 -0
- package/dist/plugins/devices-virtual/controllers/virtual-producer-config.controller.js +278 -0
- package/dist/plugins/devices-virtual/controllers/virtual-producer-config.controller.js.map +1 -0
- package/dist/plugins/devices-virtual/controllers/virtual-thermostat-authoring.controller.d.ts +12 -0
- package/dist/plugins/devices-virtual/controllers/virtual-thermostat-authoring.controller.js +111 -0
- package/dist/plugins/devices-virtual/controllers/virtual-thermostat-authoring.controller.js.map +1 -0
- package/dist/plugins/devices-virtual/controllers/virtual-thermostat-comfort.controller.d.ts +14 -0
- package/dist/plugins/devices-virtual/controllers/virtual-thermostat-comfort.controller.js +160 -0
- package/dist/plugins/devices-virtual/controllers/virtual-thermostat-comfort.controller.js.map +1 -0
- package/dist/plugins/devices-virtual/controllers/virtual-thermostat-config.controller.d.ts +18 -0
- package/dist/plugins/devices-virtual/controllers/virtual-thermostat-config.controller.js +196 -0
- package/dist/plugins/devices-virtual/controllers/virtual-thermostat-config.controller.js.map +1 -0
- package/dist/plugins/devices-virtual/controllers/virtual-transform-config.controller.d.ts +14 -0
- package/dist/plugins/devices-virtual/controllers/virtual-transform-config.controller.js +128 -0
- package/dist/plugins/devices-virtual/controllers/virtual-transform-config.controller.js.map +1 -0
- package/dist/plugins/devices-virtual/devices-virtual.constants.d.ts +1 -0
- package/dist/plugins/devices-virtual/devices-virtual.constants.js +2 -1
- package/dist/plugins/devices-virtual/devices-virtual.constants.js.map +1 -1
- package/dist/plugins/devices-virtual/devices-virtual.openapi.d.ts +24 -2
- package/dist/plugins/devices-virtual/devices-virtual.openapi.js +95 -0
- package/dist/plugins/devices-virtual/devices-virtual.openapi.js.map +1 -1
- package/dist/plugins/devices-virtual/devices-virtual.plugin.d.ts +7 -1
- package/dist/plugins/devices-virtual/devices-virtual.plugin.js +167 -10
- package/dist/plugins/devices-virtual/devices-virtual.plugin.js.map +1 -1
- package/dist/plugins/devices-virtual/dto/create-device.dto.d.ts +2 -0
- package/dist/plugins/devices-virtual/dto/create-device.dto.js +20 -0
- package/dist/plugins/devices-virtual/dto/create-device.dto.js.map +1 -1
- package/dist/plugins/devices-virtual/dto/dew-point-config.dto.d.ts +14 -0
- package/dist/plugins/devices-virtual/dto/dew-point-config.dto.js +119 -0
- package/dist/plugins/devices-virtual/dto/dew-point-config.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/group-catalog.dto.d.ts +8 -0
- package/dist/plugins/devices-virtual/dto/group-catalog.dto.js +62 -0
- package/dist/plugins/devices-virtual/dto/group-catalog.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/light-group-draft.dto.d.ts +19 -0
- package/dist/plugins/devices-virtual/dto/light-group-draft.dto.js +108 -0
- package/dist/plugins/devices-virtual/dto/light-group-draft.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/measurement-authoring.dto.d.ts +25 -0
- package/dist/plugins/devices-virtual/dto/measurement-authoring.dto.js +157 -0
- package/dist/plugins/devices-virtual/dto/measurement-authoring.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/native-thermostat.dto.d.ts +21 -0
- package/dist/plugins/devices-virtual/dto/native-thermostat.dto.js +122 -0
- package/dist/plugins/devices-virtual/dto/native-thermostat.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/producer-config.dto.d.ts +35 -0
- package/dist/plugins/devices-virtual/dto/producer-config.dto.js +290 -0
- package/dist/plugins/devices-virtual/dto/producer-config.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/thermostat-authoring.dto.d.ts +6 -0
- package/dist/plugins/devices-virtual/dto/thermostat-authoring.dto.js +46 -0
- package/dist/plugins/devices-virtual/dto/thermostat-authoring.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/thermostat-comfort.dto.d.ts +39 -0
- package/dist/plugins/devices-virtual/dto/thermostat-comfort.dto.js +244 -0
- package/dist/plugins/devices-virtual/dto/thermostat-comfort.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/thermostat-config.dto.d.ts +94 -0
- package/dist/plugins/devices-virtual/dto/thermostat-config.dto.js +718 -0
- package/dist/plugins/devices-virtual/dto/thermostat-config.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/thermostat-installation.dto.d.ts +71 -0
- package/dist/plugins/devices-virtual/dto/thermostat-installation.dto.js +410 -0
- package/dist/plugins/devices-virtual/dto/thermostat-installation.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/transform-config.dto.d.ts +71 -0
- package/dist/plugins/devices-virtual/dto/transform-config.dto.js +430 -0
- package/dist/plugins/devices-virtual/dto/transform-config.dto.js.map +1 -0
- package/dist/plugins/devices-virtual/dto/update-device.dto.d.ts +2 -0
- package/dist/plugins/devices-virtual/dto/update-device.dto.js +20 -0
- package/dist/plugins/devices-virtual/dto/update-device.dto.js.map +1 -1
- package/dist/plugins/devices-virtual/entities/devices-virtual.entity.d.ts +13 -1
- package/dist/plugins/devices-virtual/entities/devices-virtual.entity.js +56 -6
- package/dist/plugins/devices-virtual/entities/devices-virtual.entity.js.map +1 -1
- package/dist/plugins/devices-virtual/entities/native-thermostat.entity.d.ts +23 -0
- package/dist/plugins/devices-virtual/entities/native-thermostat.entity.js +103 -0
- package/dist/plugins/devices-virtual/entities/native-thermostat.entity.js.map +1 -0
- package/dist/plugins/devices-virtual/entities/thermostat-cooling-dependency.entity.d.ts +19 -0
- package/dist/plugins/devices-virtual/entities/thermostat-cooling-dependency.entity.js +87 -0
- package/dist/plugins/devices-virtual/entities/thermostat-cooling-dependency.entity.js.map +1 -0
- package/dist/plugins/devices-virtual/entities/thermostat-installation.entity.d.ts +36 -0
- package/dist/plugins/devices-virtual/entities/thermostat-installation.entity.js +125 -0
- package/dist/plugins/devices-virtual/entities/thermostat-installation.entity.js.map +1 -0
- package/dist/plugins/devices-virtual/entities/thermostat-member-protection.entity.d.ts +15 -0
- package/dist/plugins/devices-virtual/entities/thermostat-member-protection.entity.js +70 -0
- package/dist/plugins/devices-virtual/entities/thermostat-member-protection.entity.js.map +1 -0
- package/dist/plugins/devices-virtual/entities/thermostat-override-clock.entity.d.ts +7 -0
- package/dist/plugins/devices-virtual/entities/thermostat-override-clock.entity.js +39 -0
- package/dist/plugins/devices-virtual/entities/thermostat-override-clock.entity.js.map +1 -0
- package/dist/plugins/devices-virtual/entities/virtual-dew-point.entity.d.ts +28 -0
- package/dist/plugins/devices-virtual/entities/virtual-dew-point.entity.js +104 -0
- package/dist/plugins/devices-virtual/entities/virtual-dew-point.entity.js.map +1 -0
- package/dist/plugins/devices-virtual/entities/virtual-producer.entity.d.ts +89 -0
- package/dist/plugins/devices-virtual/entities/virtual-producer.entity.js +281 -0
- package/dist/plugins/devices-virtual/entities/virtual-producer.entity.js.map +1 -0
- package/dist/plugins/devices-virtual/entities/virtual-thermostat-runtime.entity.d.ts +45 -0
- package/dist/plugins/devices-virtual/entities/virtual-thermostat-runtime.entity.js +184 -0
- package/dist/plugins/devices-virtual/entities/virtual-thermostat-runtime.entity.js.map +1 -0
- package/dist/plugins/devices-virtual/entities/virtual-thermostat.entity.d.ts +86 -0
- package/dist/plugins/devices-virtual/entities/virtual-thermostat.entity.js +337 -0
- package/dist/plugins/devices-virtual/entities/virtual-thermostat.entity.js.map +1 -0
- package/dist/plugins/devices-virtual/entities/virtual-transform.entity.d.ts +23 -0
- package/dist/plugins/devices-virtual/entities/virtual-transform.entity.js +101 -0
- package/dist/plugins/devices-virtual/entities/virtual-transform.entity.js.map +1 -0
- package/dist/plugins/devices-virtual/listeners/virtual-device-information.listener.d.ts +5 -0
- package/dist/plugins/devices-virtual/listeners/virtual-device-information.listener.js +65 -22
- package/dist/plugins/devices-virtual/listeners/virtual-device-information.listener.js.map +1 -1
- package/dist/plugins/devices-virtual/listeners/virtual-index-maintenance.listener.d.ts +8 -1
- package/dist/plugins/devices-virtual/listeners/virtual-index-maintenance.listener.js +123 -32
- package/dist/plugins/devices-virtual/listeners/virtual-index-maintenance.listener.js.map +1 -1
- package/dist/plugins/devices-virtual/listeners/virtual-projection.listener.d.ts +3 -0
- package/dist/plugins/devices-virtual/listeners/virtual-projection.listener.js +41 -3
- package/dist/plugins/devices-virtual/listeners/virtual-projection.listener.js.map +1 -1
- package/dist/plugins/devices-virtual/listeners/virtual-status.listener.js +28 -15
- package/dist/plugins/devices-virtual/listeners/virtual-status.listener.js.map +1 -1
- package/dist/plugins/devices-virtual/models/dew-point-response.model.d.ts +38 -0
- package/dist/plugins/devices-virtual/models/dew-point-response.model.js +193 -0
- package/dist/plugins/devices-virtual/models/dew-point-response.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/group-catalog.model.d.ts +26 -0
- package/dist/plugins/devices-virtual/models/group-catalog.model.js +117 -0
- package/dist/plugins/devices-virtual/models/group-catalog.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/light-group-draft.model.d.ts +28 -0
- package/dist/plugins/devices-virtual/models/light-group-draft.model.js +122 -0
- package/dist/plugins/devices-virtual/models/light-group-draft.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/measurement-authoring-response.model.d.ts +26 -0
- package/dist/plugins/devices-virtual/models/measurement-authoring-response.model.js +125 -0
- package/dist/plugins/devices-virtual/models/measurement-authoring-response.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/native-thermostat-response.model.d.ts +84 -0
- package/dist/plugins/devices-virtual/models/native-thermostat-response.model.js +406 -0
- package/dist/plugins/devices-virtual/models/native-thermostat-response.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/numeric-operator.model.d.ts +23 -0
- package/dist/plugins/devices-virtual/models/numeric-operator.model.js +120 -0
- package/dist/plugins/devices-virtual/models/numeric-operator.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/producer-response.model.d.ts +138 -0
- package/dist/plugins/devices-virtual/models/producer-response.model.js +764 -0
- package/dist/plugins/devices-virtual/models/producer-response.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/thermostat-authoring-context.model.d.ts +22 -0
- package/dist/plugins/devices-virtual/models/thermostat-authoring-context.model.js +134 -0
- package/dist/plugins/devices-virtual/models/thermostat-authoring-context.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/thermostat-authoring-response.model.d.ts +18 -0
- package/dist/plugins/devices-virtual/models/thermostat-authoring-response.model.js +87 -0
- package/dist/plugins/devices-virtual/models/thermostat-authoring-response.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/thermostat-comfort-response.model.d.ts +60 -0
- package/dist/plugins/devices-virtual/models/thermostat-comfort-response.model.js +341 -0
- package/dist/plugins/devices-virtual/models/thermostat-comfort-response.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/thermostat-installation-response.model.d.ts +84 -0
- package/dist/plugins/devices-virtual/models/thermostat-installation-response.model.js +440 -0
- package/dist/plugins/devices-virtual/models/thermostat-installation-response.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/thermostat-response.model.d.ts +218 -0
- package/dist/plugins/devices-virtual/models/thermostat-response.model.js +1157 -0
- package/dist/plugins/devices-virtual/models/thermostat-response.model.js.map +1 -0
- package/dist/plugins/devices-virtual/models/transform-response.model.d.ts +73 -0
- package/dist/plugins/devices-virtual/models/transform-response.model.js +386 -0
- package/dist/plugins/devices-virtual/models/transform-response.model.js.map +1 -0
- package/dist/plugins/devices-virtual/platforms/virtual-device.platform.d.ts +5 -1
- package/dist/plugins/devices-virtual/platforms/virtual-device.platform.js +22 -3
- package/dist/plugins/devices-virtual/platforms/virtual-device.platform.js.map +1 -1
- package/dist/plugins/devices-virtual/services/native-thermostat.service.d.ts +72 -0
- package/dist/plugins/devices-virtual/services/native-thermostat.service.js +932 -0
- package/dist/plugins/devices-virtual/services/native-thermostat.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-authoring-context.service.d.ts +14 -0
- package/dist/plugins/devices-virtual/services/thermostat-authoring-context.service.js +147 -0
- package/dist/plugins/devices-virtual/services/thermostat-authoring-context.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-comfort-selection.d.ts +199 -0
- package/dist/plugins/devices-virtual/services/thermostat-comfort-selection.js +1064 -0
- package/dist/plugins/devices-virtual/services/thermostat-comfort-selection.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-controller-mutation.d.ts +75 -0
- package/dist/plugins/devices-virtual/services/thermostat-controller-mutation.js +445 -0
- package/dist/plugins/devices-virtual/services/thermostat-controller-mutation.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-cooling-dependency.service.d.ts +53 -0
- package/dist/plugins/devices-virtual/services/thermostat-cooling-dependency.service.js +267 -0
- package/dist/plugins/devices-virtual/services/thermostat-cooling-dependency.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-creation-catalog.d.ts +56 -0
- package/dist/plugins/devices-virtual/services/thermostat-creation-catalog.js +438 -0
- package/dist/plugins/devices-virtual/services/thermostat-creation-catalog.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-creation-response.d.ts +37 -0
- package/dist/plugins/devices-virtual/services/thermostat-creation-response.js +430 -0
- package/dist/plugins/devices-virtual/services/thermostat-creation-response.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation-artifact.d.ts +13 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation-artifact.js +263 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation-artifact.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation-bindings.service.d.ts +10 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation-bindings.service.js +238 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation-bindings.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation-loader.service.d.ts +41 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation-loader.service.js +350 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation-loader.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation.service.d.ts +40 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation.service.js +263 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation.types.d.ts +72 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation.types.js +13 -0
- package/dist/plugins/devices-virtual/services/thermostat-installation.types.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-member-protection.service.d.ts +45 -0
- package/dist/plugins/devices-virtual/services/thermostat-member-protection.service.js +235 -0
- package/dist/plugins/devices-virtual/services/thermostat-member-protection.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-override-clock.sql.d.ts +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-override-clock.sql.js +16 -0
- package/dist/plugins/devices-virtual/services/thermostat-override-clock.sql.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-protection-source.utils.d.ts +27 -0
- package/dist/plugins/devices-virtual/services/thermostat-protection-source.utils.js +132 -0
- package/dist/plugins/devices-virtual/services/thermostat-protection-source.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/thermostat-remote-cooling-adapter.d.ts +88 -0
- package/dist/plugins/devices-virtual/services/thermostat-remote-cooling-adapter.js +200 -0
- package/dist/plugins/devices-virtual/services/thermostat-remote-cooling-adapter.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-aggregate-evaluator.d.ts +35 -0
- package/dist/plugins/devices-virtual/services/virtual-aggregate-evaluator.js +200 -0
- package/dist/plugins/devices-virtual/services/virtual-aggregate-evaluator.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-aggregate-policy.utils.d.ts +5 -0
- package/dist/plugins/devices-virtual/services/virtual-aggregate-policy.utils.js +18 -0
- package/dist/plugins/devices-virtual/services/virtual-aggregate-policy.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-aggregate-runtime.service.d.ts +48 -0
- package/dist/plugins/devices-virtual/services/virtual-aggregate-runtime.service.js +425 -0
- package/dist/plugins/devices-virtual/services/virtual-aggregate-runtime.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-cooling-policy.utils.d.ts +13 -0
- package/dist/plugins/devices-virtual/services/virtual-cooling-policy.utils.js +38 -0
- package/dist/plugins/devices-virtual/services/virtual-cooling-policy.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-cover-contract.utils.d.ts +7 -0
- package/dist/plugins/devices-virtual/services/virtual-cover-contract.utils.js +41 -0
- package/dist/plugins/devices-virtual/services/virtual-cover-contract.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-cover-readiness.utils.d.ts +16 -0
- package/dist/plugins/devices-virtual/services/virtual-cover-readiness.utils.js +42 -0
- package/dist/plugins/devices-virtual/services/virtual-cover-readiness.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-dependency-graph.service.d.ts +118 -0
- package/dist/plugins/devices-virtual/services/virtual-dependency-graph.service.js +667 -0
- package/dist/plugins/devices-virtual/services/virtual-dependency-graph.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-devices.service.d.ts +8 -4
- package/dist/plugins/devices-virtual/services/virtual-devices.service.js +105 -22
- package/dist/plugins/devices-virtual/services/virtual-devices.service.js.map +1 -1
- package/dist/plugins/devices-virtual/services/virtual-dew-point-config.service.d.ts +28 -0
- package/dist/plugins/devices-virtual/services/virtual-dew-point-config.service.js +193 -0
- package/dist/plugins/devices-virtual/services/virtual-dew-point-config.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-dew-point-contract.utils.d.ts +5 -0
- package/dist/plugins/devices-virtual/services/virtual-dew-point-contract.utils.js +69 -0
- package/dist/plugins/devices-virtual/services/virtual-dew-point-contract.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-dew-point-runtime.service.d.ts +65 -0
- package/dist/plugins/devices-virtual/services/virtual-dew-point-runtime.service.js +524 -0
- package/dist/plugins/devices-virtual/services/virtual-dew-point-runtime.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-dew-point.utils.d.ts +9 -0
- package/dist/plugins/devices-virtual/services/virtual-dew-point.utils.js +25 -0
- package/dist/plugins/devices-virtual/services/virtual-dew-point.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-group-catalog.service.d.ts +10 -0
- package/dist/plugins/devices-virtual/services/virtual-group-catalog.service.js +117 -0
- package/dist/plugins/devices-virtual/services/virtual-group-catalog.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-group-contract.utils.d.ts +4 -0
- package/dist/plugins/devices-virtual/services/virtual-group-contract.utils.js +35 -0
- package/dist/plugins/devices-virtual/services/virtual-group-contract.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-group-field.utils.d.ts +10 -0
- package/dist/plugins/devices-virtual/services/virtual-group-field.utils.js +35 -0
- package/dist/plugins/devices-virtual/services/virtual-group-field.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-group-profile.d.ts +19 -0
- package/dist/plugins/devices-virtual/services/virtual-group-profile.js +137 -0
- package/dist/plugins/devices-virtual/services/virtual-group-profile.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-authoring.service.d.ts +43 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-authoring.service.js +217 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-authoring.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-command.service.d.ts +28 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-command.service.js +262 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-command.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-contribution.service.d.ts +19 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-contribution.service.js +91 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-contribution.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-state.service.d.ts +37 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-state.service.js +346 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group-state.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group.utils.d.ts +46 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group.utils.js +204 -0
- package/dist/plugins/devices-virtual/services/virtual-light-group.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-measurement-authoring.service.d.ts +37 -0
- package/dist/plugins/devices-virtual/services/virtual-measurement-authoring.service.js +270 -0
- package/dist/plugins/devices-virtual/services/virtual-measurement-authoring.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-measurement-contribution.service.d.ts +21 -0
- package/dist/plugins/devices-virtual/services/virtual-measurement-contribution.service.js +166 -0
- package/dist/plugins/devices-virtual/services/virtual-measurement-contribution.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-measurement-metadata.utils.d.ts +3 -0
- package/dist/plugins/devices-virtual/services/virtual-measurement-metadata.utils.js +25 -0
- package/dist/plugins/devices-virtual/services/virtual-measurement-metadata.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-operator-host.service.d.ts +24 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-operator-host.service.js +145 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-operator-host.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-operator.registry.d.ts +18 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-operator.registry.js +86 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-operator.registry.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-profile.utils.d.ts +29 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-profile.utils.js +136 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-profile.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-transform.utils.d.ts +59 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-transform.utils.js +165 -0
- package/dist/plugins/devices-virtual/services/virtual-numeric-transform.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-producer-config.service.d.ts +64 -0
- package/dist/plugins/devices-virtual/services/virtual-producer-config.service.js +694 -0
- package/dist/plugins/devices-virtual/services/virtual-producer-config.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-producer-state.service.d.ts +60 -0
- package/dist/plugins/devices-virtual/services/virtual-producer-state.service.js +484 -0
- package/dist/plugins/devices-virtual/services/virtual-producer-state.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-property-index.service.d.ts +11 -2
- package/dist/plugins/devices-virtual/services/virtual-property-index.service.js +166 -13
- package/dist/plugins/devices-virtual/services/virtual-property-index.service.js.map +1 -1
- package/dist/plugins/devices-virtual/services/virtual-source-eligibility.utils.d.ts +3 -0
- package/dist/plugins/devices-virtual/services/virtual-source-eligibility.utils.js +10 -0
- package/dist/plugins/devices-virtual/services/virtual-source-eligibility.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-authoring.service.d.ts +27 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-authoring.service.js +385 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-authoring.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-automation.service.d.ts +90 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-automation.service.js +1189 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-automation.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-branch.utils.d.ts +5 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-branch.utils.js +29 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-branch.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-claims.service.d.ts +80 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-claims.service.js +489 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-claims.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-comfort.service.d.ts +80 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-comfort.service.js +580 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-comfort.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-comfort.utils.d.ts +58 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-comfort.utils.js +106 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-comfort.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-config.service.d.ts +909 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-config.service.js +1171 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-config.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-contract.utils.d.ts +5 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-contract.utils.js +51 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-contract.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-inputs.service.d.ts +46 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-inputs.service.js +166 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-inputs.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-ownership.sql.d.ts +4 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-ownership.sql.js +59 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-ownership.sql.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-policy.utils.d.ts +45 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-policy.utils.js +149 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-policy.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-runtime-ownership.d.ts +56 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-runtime-ownership.js +680 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-runtime-ownership.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-runtime.service.d.ts +133 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-runtime.service.js +1617 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-runtime.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-transport.service.d.ts +39 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-transport.service.js +561 -0
- package/dist/plugins/devices-virtual/services/virtual-thermostat-transport.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-config.service.d.ts +41 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-config.service.js +209 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-config.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-contract.utils.d.ts +8 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-contract.utils.js +103 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-contract.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-preview.utils.d.ts +3 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-preview.utils.js +18 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-preview.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-resolver.d.ts +15 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-resolver.js +102 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-resolver.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-runtime.service.d.ts +54 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-runtime.service.js +470 -0
- package/dist/plugins/devices-virtual/services/virtual-transform-runtime.service.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-typed-group.utils.d.ts +6 -0
- package/dist/plugins/devices-virtual/services/virtual-typed-group.utils.js +100 -0
- package/dist/plugins/devices-virtual/services/virtual-typed-group.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-value-source.service.d.ts +7 -0
- package/dist/plugins/devices-virtual/services/virtual-value-source.service.js +36 -2
- package/dist/plugins/devices-virtual/services/virtual-value-source.service.js.map +1 -1
- package/dist/plugins/devices-virtual/services/virtual-window-contact.utils.d.ts +17 -0
- package/dist/plugins/devices-virtual/services/virtual-window-contact.utils.js +52 -0
- package/dist/plugins/devices-virtual/services/virtual-window-contact.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/services/virtual-window-trend.utils.d.ts +44 -0
- package/dist/plugins/devices-virtual/services/virtual-window-trend.utils.js +171 -0
- package/dist/plugins/devices-virtual/services/virtual-window-trend.utils.js.map +1 -0
- package/dist/plugins/devices-virtual/subscribers/virtual-thermostat-ownership.subscriber.d.ts +30 -0
- package/dist/plugins/devices-virtual/subscribers/virtual-thermostat-ownership.subscriber.js +195 -0
- package/dist/plugins/devices-virtual/subscribers/virtual-thermostat-ownership.subscriber.js.map +1 -0
- package/dist/plugins/devices-virtual/subscribers/virtual-transform-metadata.subscriber.d.ts +9 -0
- package/dist/plugins/devices-virtual/subscribers/virtual-transform-metadata.subscriber.js +58 -0
- package/dist/plugins/devices-virtual/subscribers/virtual-transform-metadata.subscriber.js.map +1 -0
- package/dist/plugins/devices-virtual/validators/category-allowed-constraint.validator.d.ts +1 -1
- package/dist/plugins/devices-virtual/validators/category-allowed-constraint.validator.js +6 -1
- package/dist/plugins/devices-virtual/validators/category-allowed-constraint.validator.js.map +1 -1
- package/dist/plugins/devices-wled/interfaces/wled.interface.d.ts +7 -0
- package/dist/plugins/devices-wled/interfaces/wled.interface.js.map +1 -1
- package/dist/plugins/devices-wled/platforms/wled.device.platform.d.ts +4 -2
- package/dist/plugins/devices-wled/platforms/wled.device.platform.js +56 -9
- package/dist/plugins/devices-wled/platforms/wled.device.platform.js.map +1 -1
- package/dist/plugins/devices-wled/services/device-mapper.service.d.ts +3 -2
- package/dist/plugins/devices-wled/services/device-mapper.service.js +48 -1
- package/dist/plugins/devices-wled/services/device-mapper.service.js.map +1 -1
- package/dist/plugins/devices-wled/services/wled-client-adapter.service.d.ts +6 -1
- package/dist/plugins/devices-wled/services/wled-client-adapter.service.js +101 -13
- package/dist/plugins/devices-wled/services/wled-client-adapter.service.js.map +1 -1
- package/dist/plugins/devices-wled/services/wled.service.js +5 -2
- package/dist/plugins/devices-wled/services/wled.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/contracts/sample-source.contract.d.ts +38 -0
- package/dist/plugins/devices-zigbee2mqtt/contracts/sample-source.contract.js +95 -0
- package/dist/plugins/devices-zigbee2mqtt/contracts/sample-source.contract.js.map +1 -0
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.plugin.js +11 -1
- package/dist/plugins/devices-zigbee2mqtt/devices-zigbee2mqtt.plugin.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/entities/zigbee-sample-source.entity.d.ts +18 -0
- package/dist/plugins/devices-zigbee2mqtt/entities/zigbee-sample-source.entity.js +79 -0
- package/dist/plugins/devices-zigbee2mqtt/entities/zigbee-sample-source.entity.js.map +1 -0
- package/dist/plugins/devices-zigbee2mqtt/interfaces/zigbee2mqtt.interface.d.ts +11 -0
- package/dist/plugins/devices-zigbee2mqtt/platforms/zigbee2mqtt.device.platform.d.ts +11 -2
- package/dist/plugins/devices-zigbee2mqtt/platforms/zigbee2mqtt.device.platform.js +100 -11
- package/dist/plugins/devices-zigbee2mqtt/platforms/zigbee2mqtt.device.platform.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.d.ts +31 -13
- package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.js +166 -5
- package/dist/plugins/devices-zigbee2mqtt/services/base-client-adapter.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/device-adoption.service.d.ts +1 -0
- package/dist/plugins/devices-zigbee2mqtt/services/device-adoption.service.js +44 -3
- package/dist/plugins/devices-zigbee2mqtt/services/device-adoption.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/device-mapper.service.d.ts +20 -3
- package/dist/plugins/devices-zigbee2mqtt/services/device-mapper.service.js +156 -34
- package/dist/plugins/devices-zigbee2mqtt/services/device-mapper.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/mqtt-client-adapter.service.d.ts +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/mqtt-client-adapter.service.js +14 -1
- package/dist/plugins/devices-zigbee2mqtt/services/mqtt-client-adapter.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/native-climate-adapter.service.d.ts +15 -0
- package/dist/plugins/devices-zigbee2mqtt/services/native-climate-adapter.service.js +249 -0
- package/dist/plugins/devices-zigbee2mqtt/services/native-climate-adapter.service.js.map +1 -0
- package/dist/plugins/devices-zigbee2mqtt/services/websocket-sample-evidence.d.ts +2 -0
- package/dist/plugins/devices-zigbee2mqtt/services/websocket-sample-evidence.js +15 -0
- package/dist/plugins/devices-zigbee2mqtt/services/websocket-sample-evidence.js.map +1 -0
- package/dist/plugins/devices-zigbee2mqtt/services/ws-client-adapter.service.d.ts +7 -1
- package/dist/plugins/devices-zigbee2mqtt/services/ws-client-adapter.service.js +45 -2
- package/dist/plugins/devices-zigbee2mqtt/services/ws-client-adapter.service.js.map +1 -1
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee-sample-sources.service.d.ts +49 -0
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee-sample-sources.service.js +264 -0
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee-sample-sources.service.js.map +1 -0
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.js +2 -0
- package/dist/plugins/devices-zigbee2mqtt/services/zigbee2mqtt.service.js.map +1 -1
- package/dist/plugins/scenes-local/platforms/local-scene.platform.d.ts +6 -3
- package/dist/plugins/scenes-local/platforms/local-scene.platform.js +101 -15
- package/dist/plugins/scenes-local/platforms/local-scene.platform.js.map +1 -1
- package/dist/plugins/spaces-home-control/activity/activity-actor.d.ts +2 -0
- package/dist/plugins/spaces-home-control/activity/activity-actor.js +14 -0
- package/dist/plugins/spaces-home-control/activity/activity-actor.js.map +1 -0
- package/dist/plugins/spaces-home-control/activity/activity-result.utils.d.ts +6 -0
- package/dist/plugins/spaces-home-control/activity/activity-result.utils.js +26 -0
- package/dist/plugins/spaces-home-control/activity/activity-result.utils.js.map +1 -0
- package/dist/plugins/spaces-home-control/activity/space-activity.constants.d.ts +32 -0
- package/dist/plugins/spaces-home-control/activity/space-activity.constants.js +40 -0
- package/dist/plugins/spaces-home-control/activity/space-activity.constants.js.map +1 -0
- package/dist/plugins/spaces-home-control/activity/space-activity.defaults.d.ts +3 -0
- package/dist/plugins/spaces-home-control/activity/space-activity.defaults.js +25 -0
- package/dist/plugins/spaces-home-control/activity/space-activity.defaults.js.map +1 -0
- package/dist/plugins/spaces-home-control/activity/validate-activity-configuration.d.ts +2 -0
- package/dist/plugins/spaces-home-control/activity/validate-activity-configuration.js +37 -0
- package/dist/plugins/spaces-home-control/activity/validate-activity-configuration.js.map +1 -0
- package/dist/plugins/spaces-home-control/controllers/space-mode-schedules.controller.d.ts +12 -0
- package/dist/plugins/spaces-home-control/controllers/space-mode-schedules.controller.js +97 -0
- package/dist/plugins/spaces-home-control/controllers/space-mode-schedules.controller.js.map +1 -0
- package/dist/plugins/spaces-home-control/controllers/space-modes.controller.d.ts +19 -0
- package/dist/plugins/spaces-home-control/controllers/space-modes.controller.js +220 -0
- package/dist/plugins/spaces-home-control/controllers/space-modes.controller.js.map +1 -0
- package/dist/plugins/spaces-home-control/controllers/space-occupancy.controller.d.ts +18 -0
- package/dist/plugins/spaces-home-control/controllers/space-occupancy.controller.js +147 -0
- package/dist/plugins/spaces-home-control/controllers/space-occupancy.controller.js.map +1 -0
- package/dist/plugins/spaces-home-control/controllers/spaces-domain.controller.js +4 -0
- package/dist/plugins/spaces-home-control/controllers/spaces-domain.controller.js.map +1 -1
- package/dist/plugins/spaces-home-control/dto/activity-mode.dto.d.ts +22 -0
- package/dist/plugins/spaces-home-control/dto/activity-mode.dto.js +119 -0
- package/dist/plugins/spaces-home-control/dto/activity-mode.dto.js.map +1 -0
- package/dist/plugins/spaces-home-control/dto/space-mode-schedule.dto.d.ts +18 -0
- package/dist/plugins/spaces-home-control/dto/space-mode-schedule.dto.js +127 -0
- package/dist/plugins/spaces-home-control/dto/space-mode-schedule.dto.js.map +1 -0
- package/dist/plugins/spaces-home-control/dto/space-occupancy.dto.d.ts +13 -0
- package/dist/plugins/spaces-home-control/dto/space-occupancy.dto.js +99 -0
- package/dist/plugins/spaces-home-control/dto/space-occupancy.dto.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-activity-config.entity.d.ts +12 -0
- package/dist/plugins/spaces-home-control/entities/space-activity-config.entity.js +72 -0
- package/dist/plugins/spaces-home-control/entities/space-activity-config.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-activity-state.entity.d.ts +14 -0
- package/dist/plugins/spaces-home-control/entities/space-activity-state.entity.js +105 -0
- package/dist/plugins/spaces-home-control/entities/space-activity-state.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-mode-schedule.entity.d.ts +19 -0
- package/dist/plugins/spaces-home-control/entities/space-mode-schedule.entity.js +110 -0
- package/dist/plugins/spaces-home-control/entities/space-mode-schedule.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/entities/space-occupancy.entity.d.ts +23 -0
- package/dist/plugins/spaces-home-control/entities/space-occupancy.entity.js +135 -0
- package/dist/plugins/spaces-home-control/entities/space-occupancy.entity.js.map +1 -0
- package/dist/plugins/spaces-home-control/listeners/space-climate-state.listener.d.ts +2 -0
- package/dist/plugins/spaces-home-control/listeners/space-climate-state.listener.js +23 -0
- package/dist/plugins/spaces-home-control/listeners/space-climate-state.listener.js.map +1 -1
- package/dist/plugins/spaces-home-control/listeners/websocket-exchange.listener.js +3 -0
- package/dist/plugins/spaces-home-control/listeners/websocket-exchange.listener.js.map +1 -1
- package/dist/plugins/spaces-home-control/models/activity-configuration.model.d.ts +27 -0
- package/dist/plugins/spaces-home-control/models/activity-configuration.model.js +182 -0
- package/dist/plugins/spaces-home-control/models/activity-configuration.model.js.map +1 -0
- package/dist/plugins/spaces-home-control/models/activity-response.model.d.ts +16 -0
- package/dist/plugins/spaces-home-control/models/activity-response.model.js +79 -0
- package/dist/plugins/spaces-home-control/models/activity-response.model.js.map +1 -0
- package/dist/plugins/spaces-home-control/models/activity-result.model.d.ts +6 -0
- package/dist/plugins/spaces-home-control/models/activity-result.model.js +37 -0
- package/dist/plugins/spaces-home-control/models/activity-result.model.js.map +1 -0
- package/dist/plugins/spaces-home-control/models/climate-contribution.model.d.ts +11 -0
- package/dist/plugins/spaces-home-control/models/climate-contribution.model.js +66 -0
- package/dist/plugins/spaces-home-control/models/climate-contribution.model.js.map +1 -0
- package/dist/plugins/spaces-home-control/models/space-mode-schedule-response.model.d.ts +9 -0
- package/dist/plugins/spaces-home-control/models/space-mode-schedule-response.model.js +45 -0
- package/dist/plugins/spaces-home-control/models/space-mode-schedule-response.model.js.map +1 -0
- package/dist/plugins/spaces-home-control/models/space-mode-schedule.model.d.ts +34 -0
- package/dist/plugins/spaces-home-control/models/space-mode-schedule.model.js +170 -0
- package/dist/plugins/spaces-home-control/models/space-mode-schedule.model.js.map +1 -0
- package/dist/plugins/spaces-home-control/models/space-occupancy.model.d.ts +26 -0
- package/dist/plugins/spaces-home-control/models/space-occupancy.model.js +121 -0
- package/dist/plugins/spaces-home-control/models/space-occupancy.model.js.map +1 -0
- package/dist/plugins/spaces-home-control/models/spaces-response.model.d.ts +13 -0
- package/dist/plugins/spaces-home-control/models/spaces-response.model.js +81 -2
- package/dist/plugins/spaces-home-control/models/spaces-response.model.js.map +1 -1
- package/dist/plugins/spaces-home-control/occupancy/occupancy-admission.d.ts +7 -0
- package/dist/plugins/spaces-home-control/occupancy/occupancy-admission.js +57 -0
- package/dist/plugins/spaces-home-control/occupancy/occupancy-admission.js.map +1 -0
- package/dist/plugins/spaces-home-control/occupancy/space-occupancy.types.d.ts +31 -0
- package/dist/plugins/spaces-home-control/occupancy/space-occupancy.types.js +30 -0
- package/dist/plugins/spaces-home-control/occupancy/space-occupancy.types.js.map +1 -0
- package/dist/plugins/spaces-home-control/schedule/schedule-time.d.ts +9 -0
- package/dist/plugins/spaces-home-control/schedule/schedule-time.js +79 -0
- package/dist/plugins/spaces-home-control/schedule/schedule-time.js.map +1 -0
- package/dist/plugins/spaces-home-control/schedule/space-mode-schedule.types.d.ts +28 -0
- package/dist/plugins/spaces-home-control/schedule/space-mode-schedule.types.js +7 -0
- package/dist/plugins/spaces-home-control/schedule/space-mode-schedule.types.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/activity-test-support.d.ts +16 -0
- package/dist/plugins/spaces-home-control/services/activity-test-support.js +34 -0
- package/dist/plugins/spaces-home-control/services/activity-test-support.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/climate-contribution-planner.service.d.ts +15 -0
- package/dist/plugins/spaces-home-control/services/climate-contribution-planner.service.js +97 -0
- package/dist/plugins/spaces-home-control/services/climate-contribution-planner.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/climate-intent.service.d.ts +15 -2
- package/dist/plugins/spaces-home-control/services/climate-intent.service.js +155 -15
- package/dist/plugins/spaces-home-control/services/climate-intent.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/cover-group-intent.port.d.ts +31 -0
- package/dist/plugins/spaces-home-control/services/cover-group-intent.port.js +189 -0
- package/dist/plugins/spaces-home-control/services/cover-group-intent.port.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/covers-intent.service.d.ts +8 -3
- package/dist/plugins/spaces-home-control/services/covers-intent.service.js +139 -65
- package/dist/plugins/spaces-home-control/services/covers-intent.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/lighting-contribution-planner.service.d.ts +16 -0
- package/dist/plugins/spaces-home-control/services/lighting-contribution-planner.service.js +66 -0
- package/dist/plugins/spaces-home-control/services/lighting-contribution-planner.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/lighting-intent.service.d.ts +13 -3
- package/dist/plugins/spaces-home-control/services/lighting-intent.service.js +93 -13
- package/dist/plugins/spaces-home-control/services/lighting-intent.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-activity-config.service.d.ts +25 -0
- package/dist/plugins/spaces-home-control/services/space-activity-config.service.js +144 -0
- package/dist/plugins/spaces-home-control/services/space-activity-config.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/space-activity-domains.service.d.ts +21 -0
- package/dist/plugins/spaces-home-control/services/space-activity-domains.service.js +139 -0
- package/dist/plugins/spaces-home-control/services/space-activity-domains.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/space-climate-automation.port.d.ts +17 -0
- package/dist/plugins/spaces-home-control/services/space-climate-automation.port.js +5 -0
- package/dist/plugins/spaces-home-control/services/space-climate-automation.port.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/space-climate-automation.service.d.ts +63 -0
- package/dist/plugins/spaces-home-control/services/space-climate-automation.service.js +722 -0
- package/dist/plugins/spaces-home-control/services/space-climate-automation.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/space-climate-state.service.d.ts +8 -3
- package/dist/plugins/spaces-home-control/services/space-climate-state.service.js +25 -19
- package/dist/plugins/spaces-home-control/services/space-climate-state.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-covers-state.service.d.ts +16 -2
- package/dist/plugins/spaces-home-control/services/space-covers-state.service.js +102 -18
- package/dist/plugins/spaces-home-control/services/space-covers-state.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-intent-base.service.d.ts +2 -0
- package/dist/plugins/spaces-home-control/services/space-intent-base.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-lighting-state.service.d.ts +4 -1
- package/dist/plugins/spaces-home-control/services/space-lighting-state.service.js +94 -24
- package/dist/plugins/spaces-home-control/services/space-lighting-state.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-media-activity.service.d.ts +8 -2
- package/dist/plugins/spaces-home-control/services/space-media-activity.service.js +79 -13
- package/dist/plugins/spaces-home-control/services/space-media-activity.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/services/space-mode-schedule-config.service.d.ts +24 -0
- package/dist/plugins/spaces-home-control/services/space-mode-schedule-config.service.js +132 -0
- package/dist/plugins/spaces-home-control/services/space-mode-schedule-config.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/space-mode-scheduler.service.d.ts +39 -0
- package/dist/plugins/spaces-home-control/services/space-mode-scheduler.service.js +289 -0
- package/dist/plugins/spaces-home-control/services/space-mode-scheduler.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/space-mode.service.d.ts +34 -0
- package/dist/plugins/spaces-home-control/services/space-mode.service.js +296 -0
- package/dist/plugins/spaces-home-control/services/space-mode.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/space-occupancy-config.service.d.ts +26 -0
- package/dist/plugins/spaces-home-control/services/space-occupancy-config.service.js +134 -0
- package/dist/plugins/spaces-home-control/services/space-occupancy-config.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/space-occupancy-inputs.service.d.ts +21 -0
- package/dist/plugins/spaces-home-control/services/space-occupancy-inputs.service.js +84 -0
- package/dist/plugins/spaces-home-control/services/space-occupancy-inputs.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/space-occupancy.service.d.ts +48 -0
- package/dist/plugins/spaces-home-control/services/space-occupancy.service.js +285 -0
- package/dist/plugins/spaces-home-control/services/space-occupancy.service.js.map +1 -0
- package/dist/plugins/spaces-home-control/services/space-state-read.service.d.ts +5 -1
- package/dist/plugins/spaces-home-control/services/space-state-read.service.js +33 -7
- package/dist/plugins/spaces-home-control/services/space-state-read.service.js.map +1 -1
- package/dist/plugins/spaces-home-control/spaces-home-control.openapi.js +52 -0
- package/dist/plugins/spaces-home-control/spaces-home-control.openapi.js.map +1 -1
- package/dist/plugins/spaces-home-control/spaces-home-control.plugin.d.ts +5 -1
- package/dist/plugins/spaces-home-control/spaces-home-control.plugin.js +57 -2
- package/dist/plugins/spaces-home-control/spaces-home-control.plugin.js.map +1 -1
- package/dist/spec/channels.d.ts +27 -4
- package/dist/spec/channels.js +37 -6
- package/dist/spec/channels.js.map +1 -1
- package/dist/spec/devices.d.ts +20 -0
- package/dist/spec/devices.js +20 -0
- package/dist/spec/devices.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -3
|
@@ -0,0 +1,932 @@
|
|
|
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.NativeThermostatService = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const uuid_1 = require("uuid");
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const event_emitter_1 = require("@nestjs/event-emitter");
|
|
18
|
+
const sqlite_data_source_1 = require("../../../common/database/sqlite-data-source");
|
|
19
|
+
const devices_constants_1 = require("../../../modules/devices/devices.constants");
|
|
20
|
+
const devices_exceptions_1 = require("../../../modules/devices/devices.exceptions");
|
|
21
|
+
const devices_entity_1 = require("../../../modules/devices/entities/devices.entity");
|
|
22
|
+
const device_creation_context_1 = require("../../../modules/devices/services/device-creation-context");
|
|
23
|
+
const device_structure_lock_service_1 = require("../../../modules/devices/services/device-structure-lock.service");
|
|
24
|
+
const devices_service_1 = require("../../../modules/devices/services/devices.service");
|
|
25
|
+
const platform_registry_service_1 = require("../../../modules/devices/services/platform.registry.service");
|
|
26
|
+
const property_command_admission_registry_service_1 = require("../../../modules/devices/services/property-command-admission.registry.service");
|
|
27
|
+
const property_producer_registry_service_1 = require("../../../modules/devices/services/property-producer.registry.service");
|
|
28
|
+
const property_value_service_1 = require("../../../modules/devices/services/property-value.service");
|
|
29
|
+
const schema_utils_1 = require("../../../modules/devices/utils/schema.utils");
|
|
30
|
+
const create_device_dto_1 = require("../dto/create-device.dto");
|
|
31
|
+
const native_thermostat_dto_1 = require("../dto/native-thermostat.dto");
|
|
32
|
+
const devices_virtual_entity_1 = require("../entities/devices-virtual.entity");
|
|
33
|
+
const native_thermostat_entity_1 = require("../entities/native-thermostat.entity");
|
|
34
|
+
const virtual_thermostat_entity_1 = require("../entities/virtual-thermostat.entity");
|
|
35
|
+
const virtual_dependency_graph_service_1 = require("./virtual-dependency-graph.service");
|
|
36
|
+
const fail = (reason) => {
|
|
37
|
+
throw new devices_exceptions_1.DevicesValidationException(reason);
|
|
38
|
+
};
|
|
39
|
+
let NativeThermostatService = class NativeThermostatService {
|
|
40
|
+
constructor(database, lock, graph, devices, platforms, admission, values, producers) {
|
|
41
|
+
this.database = database;
|
|
42
|
+
this.lock = lock;
|
|
43
|
+
this.graph = graph;
|
|
44
|
+
this.devices = devices;
|
|
45
|
+
this.platforms = platforms;
|
|
46
|
+
this.admission = admission;
|
|
47
|
+
this.values = values;
|
|
48
|
+
this.producers = producers;
|
|
49
|
+
this.reservations = [];
|
|
50
|
+
this.ready = false;
|
|
51
|
+
this.destroyed = false;
|
|
52
|
+
this.units = new Map();
|
|
53
|
+
this.epoch = 0;
|
|
54
|
+
this.refreshing = false;
|
|
55
|
+
this.leases = new Map();
|
|
56
|
+
this.generations = new Map();
|
|
57
|
+
this.requestedPublications = new Map();
|
|
58
|
+
this.work = new Set();
|
|
59
|
+
this.observations = new Map();
|
|
60
|
+
this.attempts = new Map();
|
|
61
|
+
this.releaseOwners = new Map();
|
|
62
|
+
this.pendingReleaseAdmissions = new Map();
|
|
63
|
+
this.originalRequests = new Map();
|
|
64
|
+
}
|
|
65
|
+
async onApplicationBootstrap() {
|
|
66
|
+
if (process.env.FB_CLI === 'on' || this.stop !== undefined || this.destroyed)
|
|
67
|
+
return;
|
|
68
|
+
this.stop = this.admission.register({
|
|
69
|
+
capture: () => {
|
|
70
|
+
const epoch = this.epoch;
|
|
71
|
+
return {
|
|
72
|
+
isCurrent: () => this.ready && epoch === this.epoch,
|
|
73
|
+
assertAllowed: (update) => this.assertAllowed(update),
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
requiresGuardedDispatch: (update) => this.requiresGuardedDispatch(update),
|
|
77
|
+
assertAllowed: (update) => this.assertAllowed(update),
|
|
78
|
+
});
|
|
79
|
+
await this.lock.runExclusive(async () => {
|
|
80
|
+
await this.database.manager.update(native_thermostat_entity_1.NativeThermostatRequestEntity, { state: 'pending' }, { state: 'interrupted' });
|
|
81
|
+
const releasing = await this.database.manager.findBy(native_thermostat_entity_1.NativeThermostatEntity, { bindingState: 'releasing' });
|
|
82
|
+
if (releasing.length)
|
|
83
|
+
await this.graph.withStructuralWrite(async (manager) => {
|
|
84
|
+
for (const row of releasing) {
|
|
85
|
+
if (!Number.isSafeInteger(row.revision) || row.revision >= Number.MAX_SAFE_INTEGER)
|
|
86
|
+
fail('Native release recovery revision is invalid.');
|
|
87
|
+
const result = await manager.update(native_thermostat_entity_1.NativeThermostatEntity, { controllerId: row.controllerId, revision: row.revision, bindingState: 'releasing' }, { bindingState: 'released', revision: row.revision + 1 });
|
|
88
|
+
if (result.affected !== 1)
|
|
89
|
+
fail('Native release recovery owner changed.');
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
await this.reload();
|
|
93
|
+
});
|
|
94
|
+
this.timer = setInterval(() => {
|
|
95
|
+
void this.refresh().catch(() => undefined);
|
|
96
|
+
}, 1000);
|
|
97
|
+
this.timer.unref();
|
|
98
|
+
await this.refresh();
|
|
99
|
+
}
|
|
100
|
+
async onModuleDestroy() {
|
|
101
|
+
this.destroyed = true;
|
|
102
|
+
this.units.clear();
|
|
103
|
+
this.ready = false;
|
|
104
|
+
this.epoch++;
|
|
105
|
+
this.stop?.();
|
|
106
|
+
if (this.timer)
|
|
107
|
+
clearInterval(this.timer);
|
|
108
|
+
for (const lease of this.leases.values())
|
|
109
|
+
this.producers.unregister(lease);
|
|
110
|
+
this.leases.clear();
|
|
111
|
+
await Promise.allSettled([...this.work]);
|
|
112
|
+
}
|
|
113
|
+
onCatalogChanged(entity) {
|
|
114
|
+
if (entity.id)
|
|
115
|
+
this.units.delete(entity.id);
|
|
116
|
+
for (const row of this.reservations) {
|
|
117
|
+
if (entity.id !== row.controllerId &&
|
|
118
|
+
entity.id !== row.sourceDeviceId &&
|
|
119
|
+
!row.ownedPropertyIds.includes(entity.id ?? '') &&
|
|
120
|
+
!Object.values(row.propertyIds).includes(entity.id ?? ''))
|
|
121
|
+
continue;
|
|
122
|
+
this.epoch++;
|
|
123
|
+
this.generations.set(row.controllerId, (this.generations.get(row.controllerId) ?? 0) + 1);
|
|
124
|
+
for (const id of Object.values(row.propertyIds)) {
|
|
125
|
+
const lease = this.leases.get(id);
|
|
126
|
+
if (lease)
|
|
127
|
+
this.producers.invalidate(lease, ['native_catalog_changed']);
|
|
128
|
+
this.observations.delete(id);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
reserved(propertyId) {
|
|
133
|
+
return this.reservations.some((row) => row.ownedPropertyIds.includes(propertyId));
|
|
134
|
+
}
|
|
135
|
+
requiresGuardedDispatch(update) {
|
|
136
|
+
if (this.reserved(update.property.id))
|
|
137
|
+
return true;
|
|
138
|
+
const modeOrSetpoint = [devices_constants_1.ChannelCategory.THERMOSTAT, devices_constants_1.ChannelCategory.HEATER, devices_constants_1.ChannelCategory.COOLER].includes(update.channel.category) &&
|
|
139
|
+
[devices_constants_1.PropertyCategory.MODE, devices_constants_1.PropertyCategory.ON, devices_constants_1.PropertyCategory.TEMPERATURE].includes(update.property.category);
|
|
140
|
+
return (modeOrSetpoint &&
|
|
141
|
+
this.reservations.some((row) => row.sourceDeviceId === update.device.id ||
|
|
142
|
+
this.units.get(update.device.id)?.physicalIdentity === row.physicalIdentity));
|
|
143
|
+
}
|
|
144
|
+
async assertAllowed(update) {
|
|
145
|
+
let native = this.units.get(update.device.id);
|
|
146
|
+
if (!native?.isCurrent())
|
|
147
|
+
native = await this.platforms.get(update.device)?.captureNativeClimateUnit?.(update.device);
|
|
148
|
+
const reservedCanonical = native &&
|
|
149
|
+
this.reservations.some((row) => row.physicalIdentity === native.physicalIdentity && native.ownedPropertyIds.includes(update.property.id));
|
|
150
|
+
if (!this.ready || this.requiresGuardedDispatch(update) || reservedCanonical)
|
|
151
|
+
fail('Native thermostat mode/setpoint bundle is reserved; use its controller.');
|
|
152
|
+
}
|
|
153
|
+
async reload() {
|
|
154
|
+
this.reservations = await this.database.manager.find(native_thermostat_entity_1.NativeThermostatEntity, {
|
|
155
|
+
where: { bindingState: (0, typeorm_1.Not)('released') },
|
|
156
|
+
});
|
|
157
|
+
this.ready = !this.destroyed;
|
|
158
|
+
this.epoch++;
|
|
159
|
+
}
|
|
160
|
+
async capture(id, manager = this.database.manager, fresh = false) {
|
|
161
|
+
const device = await manager.findOneBy(devices_entity_1.DeviceEntity, { id });
|
|
162
|
+
if (!device || !device.enabled)
|
|
163
|
+
fail('Native source device is missing or disabled.');
|
|
164
|
+
if (this.destroyed)
|
|
165
|
+
fail('Native runtime is stopped.');
|
|
166
|
+
let unit = fresh ? null : this.units.get(id);
|
|
167
|
+
if (!unit?.isCurrent())
|
|
168
|
+
unit = await this.platforms.get(device)?.captureNativeClimateUnit?.(device);
|
|
169
|
+
if (!unit || !unit.isCurrent())
|
|
170
|
+
fail('Source is not a supported current canonical native climate unit.');
|
|
171
|
+
this.units.set(id, unit);
|
|
172
|
+
return unit;
|
|
173
|
+
}
|
|
174
|
+
conflictsWithBinding(row, unit, controllerId) {
|
|
175
|
+
return (row.bindingState !== 'released' &&
|
|
176
|
+
row.controllerId !== controllerId &&
|
|
177
|
+
(row.physicalIdentity === unit.physicalIdentity ||
|
|
178
|
+
row.sourceDeviceId === unit.deviceId ||
|
|
179
|
+
row.ownedPropertyIds.some((id) => unit.ownedPropertyIds.includes(id))));
|
|
180
|
+
}
|
|
181
|
+
async candidates() {
|
|
182
|
+
return this.lock.runShared(async () => {
|
|
183
|
+
const result = [];
|
|
184
|
+
for (const device of await this.database.manager.find(devices_entity_1.DeviceEntity)) {
|
|
185
|
+
if (!device.enabled)
|
|
186
|
+
continue;
|
|
187
|
+
let unit;
|
|
188
|
+
try {
|
|
189
|
+
unit = await this.capture(device.id);
|
|
190
|
+
}
|
|
191
|
+
catch {
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
result.push({
|
|
195
|
+
device: device.id,
|
|
196
|
+
name: device.name,
|
|
197
|
+
provider: unit.provider,
|
|
198
|
+
physical_identity: unit.physicalIdentity,
|
|
199
|
+
fingerprint: unit.fingerprint,
|
|
200
|
+
capabilities: unit.capabilities,
|
|
201
|
+
reasons: this.reservations.some((row) => this.conflictsWithBinding(row, unit)) ? ['reserved'] : [],
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
return result;
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
async preview(dto) {
|
|
208
|
+
return this.lock.runShared(async () => {
|
|
209
|
+
const unit = await this.capture(dto.sourceDevice);
|
|
210
|
+
await this.assertUnbound(this.database.manager, unit);
|
|
211
|
+
return {
|
|
212
|
+
controller: null,
|
|
213
|
+
binding_state: 'bound',
|
|
214
|
+
control_strategy: 'native_unit',
|
|
215
|
+
revision: 0,
|
|
216
|
+
source_device: unit.deviceId,
|
|
217
|
+
provider: unit.provider,
|
|
218
|
+
physical_identity: unit.physicalIdentity,
|
|
219
|
+
fingerprint: unit.fingerprint,
|
|
220
|
+
requested: {},
|
|
221
|
+
drift: [],
|
|
222
|
+
observed: unit.observe(),
|
|
223
|
+
capabilities: unit.capabilities,
|
|
224
|
+
properties: {},
|
|
225
|
+
latest_request: null,
|
|
226
|
+
};
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
async assertUnbound(manager, unit, controllerId) {
|
|
230
|
+
for (const row of await manager.find(native_thermostat_entity_1.NativeThermostatEntity))
|
|
231
|
+
if (this.conflictsWithBinding(row, unit, controllerId))
|
|
232
|
+
fail('Native unit is already reserved.');
|
|
233
|
+
if (controllerId && (await manager.existsBy(virtual_thermostat_entity_1.VirtualThermostatConfigEntity, { controllerId })))
|
|
234
|
+
fail('Guarded branches and native units are mutually exclusive.');
|
|
235
|
+
}
|
|
236
|
+
async create(dto) {
|
|
237
|
+
return this.lock.runExclusive(async () => {
|
|
238
|
+
const unit = await this.capture(dto.sourceDevice);
|
|
239
|
+
const id = (0, uuid_1.v4)();
|
|
240
|
+
const propertyIds = {};
|
|
241
|
+
await device_creation_context_1.DeviceCreationContext.run((work) => this.graph.withStructuralWrite(work, dto.expectedGraphRevision), 'virtual', async (context) => {
|
|
242
|
+
await this.assertUnbound(context.manager, unit, id);
|
|
243
|
+
(0, sqlite_data_source_1.registerSqliteCommitGuard)(context.manager, () => unit.isCurrent());
|
|
244
|
+
await this.devices.create((0, class_transformer_1.plainToInstance)(create_device_dto_1.CreateVirtualDeviceDto, {
|
|
245
|
+
id,
|
|
246
|
+
type: 'virtual',
|
|
247
|
+
category: devices_constants_1.DeviceCategory.THERMOSTAT,
|
|
248
|
+
mode: devices_virtual_entity_1.VirtualDeviceMode.CLIMATE_CONTROLLER,
|
|
249
|
+
name: dto.name,
|
|
250
|
+
room_id: dto.room,
|
|
251
|
+
}), context);
|
|
252
|
+
const add = async (category, fields) => {
|
|
253
|
+
const channel = await context.manager.save(devices_virtual_entity_1.VirtualChannelEntity, context.manager.create(devices_virtual_entity_1.VirtualChannelEntity, {
|
|
254
|
+
id: (0, uuid_1.v4)(),
|
|
255
|
+
device: { id },
|
|
256
|
+
name: category,
|
|
257
|
+
category,
|
|
258
|
+
}));
|
|
259
|
+
for (const [key, propertyCategory, dataType, writable] of fields) {
|
|
260
|
+
const metadata = (0, schema_utils_1.getPropertyMetadata)(category, propertyCategory);
|
|
261
|
+
const limits = key === 'heating_setpoint'
|
|
262
|
+
? unit.capabilities.heating
|
|
263
|
+
: key === 'cooling_setpoint'
|
|
264
|
+
? unit.capabilities.cooling
|
|
265
|
+
: null;
|
|
266
|
+
propertyIds[key] = (0, uuid_1.v4)();
|
|
267
|
+
await context.manager.save(devices_virtual_entity_1.VirtualChannelPropertyEntity, context.manager.create(devices_virtual_entity_1.VirtualChannelPropertyEntity, {
|
|
268
|
+
id: propertyIds[key],
|
|
269
|
+
channel,
|
|
270
|
+
name: key,
|
|
271
|
+
category: propertyCategory,
|
|
272
|
+
dataType: metadata?.data_type ?? dataType,
|
|
273
|
+
permissions: [writable ? devices_constants_1.PermissionType.READ_WRITE : devices_constants_1.PermissionType.READ_ONLY],
|
|
274
|
+
valueOrigin: devices_virtual_entity_1.VirtualValueOrigin.LOCAL,
|
|
275
|
+
sourcePropertyId: null,
|
|
276
|
+
format: key === 'mode'
|
|
277
|
+
? [...unit.capabilities.modes]
|
|
278
|
+
: limits
|
|
279
|
+
? [limits.minimum, limits.maximum]
|
|
280
|
+
: (metadata?.format ?? null),
|
|
281
|
+
step: limits?.step ?? metadata?.step ?? null,
|
|
282
|
+
}));
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
await add(devices_constants_1.ChannelCategory.THERMOSTAT, [
|
|
286
|
+
['mode', devices_constants_1.PropertyCategory.MODE, devices_constants_1.DataTypeType.ENUM, true],
|
|
287
|
+
['locked', devices_constants_1.PropertyCategory.LOCKED, devices_constants_1.DataTypeType.BOOL, false],
|
|
288
|
+
]);
|
|
289
|
+
await add(devices_constants_1.ChannelCategory.TEMPERATURE, [
|
|
290
|
+
['temperature', devices_constants_1.PropertyCategory.TEMPERATURE, devices_constants_1.DataTypeType.FLOAT, false],
|
|
291
|
+
]);
|
|
292
|
+
for (const [kind, category] of [
|
|
293
|
+
['heating', devices_constants_1.ChannelCategory.HEATER],
|
|
294
|
+
['cooling', devices_constants_1.ChannelCategory.COOLER],
|
|
295
|
+
]) {
|
|
296
|
+
if (!unit.capabilities[kind])
|
|
297
|
+
continue;
|
|
298
|
+
await add(category, [
|
|
299
|
+
[`${kind}_enabled`, devices_constants_1.PropertyCategory.ON, devices_constants_1.DataTypeType.BOOL, true],
|
|
300
|
+
[`${kind}_setpoint`, devices_constants_1.PropertyCategory.TEMPERATURE, devices_constants_1.DataTypeType.FLOAT, true],
|
|
301
|
+
[`${kind}_activity`, devices_constants_1.PropertyCategory.STATUS, devices_constants_1.DataTypeType.BOOL, false],
|
|
302
|
+
]);
|
|
303
|
+
}
|
|
304
|
+
await context.manager.insert(native_thermostat_entity_1.NativeThermostatEntity, {
|
|
305
|
+
controllerId: id,
|
|
306
|
+
sourceDeviceId: unit.deviceId,
|
|
307
|
+
physicalIdentity: unit.physicalIdentity,
|
|
308
|
+
fingerprint: unit.fingerprint,
|
|
309
|
+
provider: unit.provider,
|
|
310
|
+
bindingState: 'bound',
|
|
311
|
+
revision: 1,
|
|
312
|
+
requested: {},
|
|
313
|
+
propertyIds,
|
|
314
|
+
ownedPropertyIds: [...unit.ownedPropertyIds],
|
|
315
|
+
latestRequestId: null,
|
|
316
|
+
});
|
|
317
|
+
return id;
|
|
318
|
+
}, () => this.reload());
|
|
319
|
+
return this.get(id);
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
async get(id) {
|
|
323
|
+
return this.lock.runShared(async () => {
|
|
324
|
+
const row = await this.database.manager.findOneBy(native_thermostat_entity_1.NativeThermostatEntity, { controllerId: id });
|
|
325
|
+
if (!row)
|
|
326
|
+
return null;
|
|
327
|
+
let unit = null;
|
|
328
|
+
if (row.bindingState === 'bound') {
|
|
329
|
+
try {
|
|
330
|
+
unit = await this.capture(row.sourceDeviceId);
|
|
331
|
+
}
|
|
332
|
+
catch {
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
if (unit?.fingerprint !== row.fingerprint || unit?.physicalIdentity !== row.physicalIdentity)
|
|
336
|
+
unit = null;
|
|
337
|
+
const observed = unit?.observe() ?? {
|
|
338
|
+
available: false,
|
|
339
|
+
temperature: null,
|
|
340
|
+
mode: null,
|
|
341
|
+
heatingSetpoint: null,
|
|
342
|
+
coolingSetpoint: null,
|
|
343
|
+
activity: null,
|
|
344
|
+
observedAt: null,
|
|
345
|
+
reasons: ['binding_unavailable'],
|
|
346
|
+
};
|
|
347
|
+
const drift = [];
|
|
348
|
+
if (observed.available) {
|
|
349
|
+
if (row.requested.mode !== undefined && observed.mode !== null && row.requested.mode !== observed.mode)
|
|
350
|
+
drift.push('mode');
|
|
351
|
+
for (const [field, code, range] of [
|
|
352
|
+
['heatingSetpoint', 'heating_setpoint', unit?.capabilities.heating],
|
|
353
|
+
['coolingSetpoint', 'cooling_setpoint', unit?.capabilities.cooling],
|
|
354
|
+
]) {
|
|
355
|
+
const requested = row.requested[field];
|
|
356
|
+
const actual = observed[field];
|
|
357
|
+
if (requested !== undefined &&
|
|
358
|
+
actual !== null &&
|
|
359
|
+
Math.abs(requested - actual) > Math.max((range?.step ?? 0) / 2, 1e-6))
|
|
360
|
+
drift.push(code);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
const latest = row.latestRequestId
|
|
364
|
+
? await this.database.manager.findOneBy(native_thermostat_entity_1.NativeThermostatRequestEntity, { id: row.latestRequestId })
|
|
365
|
+
: null;
|
|
366
|
+
return {
|
|
367
|
+
controller: id,
|
|
368
|
+
binding_state: row.bindingState,
|
|
369
|
+
control_strategy: 'native_unit',
|
|
370
|
+
revision: row.revision,
|
|
371
|
+
source_device: row.sourceDeviceId,
|
|
372
|
+
provider: row.provider,
|
|
373
|
+
physical_identity: row.physicalIdentity,
|
|
374
|
+
fingerprint: row.fingerprint,
|
|
375
|
+
requested: row.requested,
|
|
376
|
+
observed,
|
|
377
|
+
drift,
|
|
378
|
+
capabilities: unit?.capabilities ?? null,
|
|
379
|
+
properties: row.propertyIds,
|
|
380
|
+
latest_request: latest
|
|
381
|
+
? {
|
|
382
|
+
id: latest.id,
|
|
383
|
+
revision: latest.revision,
|
|
384
|
+
state: latest.state,
|
|
385
|
+
request: latest.request,
|
|
386
|
+
operations: latest.operations,
|
|
387
|
+
created_at: latest.createdAt.toISOString(),
|
|
388
|
+
}
|
|
389
|
+
: null,
|
|
390
|
+
};
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
async syncPropertyContracts(manager, row, unit) {
|
|
394
|
+
const contracts = [
|
|
395
|
+
{
|
|
396
|
+
key: 'mode',
|
|
397
|
+
channel: devices_constants_1.ChannelCategory.THERMOSTAT,
|
|
398
|
+
category: devices_constants_1.PropertyCategory.MODE,
|
|
399
|
+
dataType: devices_constants_1.DataTypeType.ENUM,
|
|
400
|
+
format: [...unit.capabilities.modes],
|
|
401
|
+
step: null,
|
|
402
|
+
},
|
|
403
|
+
];
|
|
404
|
+
for (const [branch, channel] of [
|
|
405
|
+
['heating', devices_constants_1.ChannelCategory.HEATER],
|
|
406
|
+
['cooling', devices_constants_1.ChannelCategory.COOLER],
|
|
407
|
+
]) {
|
|
408
|
+
const range = unit.capabilities[branch];
|
|
409
|
+
if (range)
|
|
410
|
+
contracts.push({
|
|
411
|
+
key: `${branch}_setpoint`,
|
|
412
|
+
channel,
|
|
413
|
+
category: devices_constants_1.PropertyCategory.TEMPERATURE,
|
|
414
|
+
dataType: devices_constants_1.DataTypeType.FLOAT,
|
|
415
|
+
format: [range.minimum, range.maximum],
|
|
416
|
+
step: range.step,
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
for (const contract of contracts) {
|
|
420
|
+
const propertyId = row.propertyIds[contract.key];
|
|
421
|
+
if (!propertyId)
|
|
422
|
+
fail('Native controller property changed; repair its original local contract first.');
|
|
423
|
+
const property = await manager.findOne(devices_virtual_entity_1.VirtualChannelPropertyEntity, {
|
|
424
|
+
where: {
|
|
425
|
+
id: propertyId,
|
|
426
|
+
category: contract.category,
|
|
427
|
+
channel: { category: contract.channel, device: { id: row.controllerId } },
|
|
428
|
+
},
|
|
429
|
+
});
|
|
430
|
+
if (!property ||
|
|
431
|
+
property.valueOrigin !== devices_virtual_entity_1.VirtualValueOrigin.LOCAL ||
|
|
432
|
+
property.sourcePropertyId ||
|
|
433
|
+
property.dataType !== contract.dataType)
|
|
434
|
+
fail('Native controller property changed; repair its original local contract first.');
|
|
435
|
+
await manager.update(devices_virtual_entity_1.VirtualChannelPropertyEntity, { id: propertyId }, { format: contract.format, step: contract.step });
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
async update(id, dto) {
|
|
439
|
+
await this.lock.runExclusive(async () => {
|
|
440
|
+
const unit = await this.capture(dto.sourceDevice, this.database.manager, true);
|
|
441
|
+
await this.graph.withStructuralWrite(async (manager) => {
|
|
442
|
+
const row = await manager.findOneByOrFail(native_thermostat_entity_1.NativeThermostatEntity, { controllerId: id });
|
|
443
|
+
if (row.revision !== dto.expectedRevision)
|
|
444
|
+
fail('Native thermostat revision changed.');
|
|
445
|
+
if (row.bindingState !== 'bound' || this.releaseOwners.has(id))
|
|
446
|
+
fail('Native binding is not bound.');
|
|
447
|
+
await this.assertUnbound(manager, unit, id);
|
|
448
|
+
if (!!row.propertyIds.heating_setpoint !== !!unit.capabilities.heating ||
|
|
449
|
+
!!row.propertyIds.cooling_setpoint !== !!unit.capabilities.cooling)
|
|
450
|
+
fail('Changed heating/cooling topology requires a new controller.');
|
|
451
|
+
if (row.sourceDeviceId !== unit.deviceId || row.physicalIdentity !== unit.physicalIdentity)
|
|
452
|
+
fail('Native binding identity is immutable; create another controller to use another physical unit.');
|
|
453
|
+
(0, sqlite_data_source_1.registerSqliteCommitGuard)(manager, () => unit.isCurrent() && !this.releaseOwners.has(id));
|
|
454
|
+
await this.syncPropertyContracts(manager, row, unit);
|
|
455
|
+
await manager.update(native_thermostat_entity_1.NativeThermostatEntity, { controllerId: id, revision: row.revision }, {
|
|
456
|
+
revision: row.revision + 1,
|
|
457
|
+
fingerprint: unit.fingerprint,
|
|
458
|
+
ownedPropertyIds: [...unit.ownedPropertyIds],
|
|
459
|
+
});
|
|
460
|
+
this.generations.set(id, (this.generations.get(id) ?? 0) + 1);
|
|
461
|
+
});
|
|
462
|
+
await this.reload();
|
|
463
|
+
});
|
|
464
|
+
return this.get(id);
|
|
465
|
+
}
|
|
466
|
+
async request(id, dto) {
|
|
467
|
+
dto = Object.freeze({
|
|
468
|
+
requestId: dto.requestId,
|
|
469
|
+
expectedRevision: dto.expectedRevision,
|
|
470
|
+
mode: dto.mode,
|
|
471
|
+
heatingSetpoint: dto.heatingSetpoint,
|
|
472
|
+
coolingSetpoint: dto.coolingSetpoint,
|
|
473
|
+
});
|
|
474
|
+
const intent = JSON.stringify({
|
|
475
|
+
mode: dto.mode,
|
|
476
|
+
heatingSetpoint: dto.heatingSetpoint,
|
|
477
|
+
coolingSetpoint: dto.coolingSetpoint,
|
|
478
|
+
});
|
|
479
|
+
const original = this.originalRequests.get(dto.requestId);
|
|
480
|
+
if (original) {
|
|
481
|
+
if (original.controller !== id || original.intent !== intent)
|
|
482
|
+
fail('Request id was already used for another intent.');
|
|
483
|
+
return original.result;
|
|
484
|
+
}
|
|
485
|
+
let settle;
|
|
486
|
+
const completion = new Promise((resolve) => {
|
|
487
|
+
settle = resolve;
|
|
488
|
+
});
|
|
489
|
+
const group = this.attempts.get(id) ?? new Set();
|
|
490
|
+
this.attempts.set(id, group);
|
|
491
|
+
group.add(completion);
|
|
492
|
+
this.work.add(completion);
|
|
493
|
+
const issued = (async () => {
|
|
494
|
+
try {
|
|
495
|
+
return await this.requestOwned(id, dto);
|
|
496
|
+
}
|
|
497
|
+
finally {
|
|
498
|
+
settle();
|
|
499
|
+
group.delete(completion);
|
|
500
|
+
this.work.delete(completion);
|
|
501
|
+
this.originalRequests.delete(dto.requestId);
|
|
502
|
+
if (!group.size && this.attempts.get(id) === group)
|
|
503
|
+
this.attempts.delete(id);
|
|
504
|
+
}
|
|
505
|
+
})();
|
|
506
|
+
this.originalRequests.set(dto.requestId, { controller: id, intent, result: issued });
|
|
507
|
+
return issued;
|
|
508
|
+
}
|
|
509
|
+
async requestOwned(id, dto) {
|
|
510
|
+
if (!this.ready || this.destroyed)
|
|
511
|
+
fail('Native runtime is not ready.');
|
|
512
|
+
const pendingRelease = this.pendingReleaseAdmissions.get(id);
|
|
513
|
+
if (pendingRelease !== undefined) {
|
|
514
|
+
if (pendingRelease.isOriginalOwner?.())
|
|
515
|
+
fail('Native release admission is still being decided.');
|
|
516
|
+
await pendingRelease.decision;
|
|
517
|
+
}
|
|
518
|
+
if (!this.ready || this.destroyed)
|
|
519
|
+
fail('Native runtime is not ready.');
|
|
520
|
+
if (this.releaseOwners.has(id))
|
|
521
|
+
fail('Native binding is not bound.');
|
|
522
|
+
const request = Object.fromEntries(Object.entries({
|
|
523
|
+
mode: dto.mode,
|
|
524
|
+
heatingSetpoint: dto.heatingSetpoint,
|
|
525
|
+
coolingSetpoint: dto.coolingSetpoint,
|
|
526
|
+
}).filter(([, value]) => value !== undefined));
|
|
527
|
+
let execute;
|
|
528
|
+
let releaseAdmission;
|
|
529
|
+
await this.lock.runExclusive(async () => {
|
|
530
|
+
const pending = this.pendingReleaseAdmissions.get(id);
|
|
531
|
+
if (pending?.isOriginalOwner?.())
|
|
532
|
+
fail('Native release admission is still being decided.');
|
|
533
|
+
releaseAdmission = pending?.decision;
|
|
534
|
+
if (releaseAdmission !== undefined)
|
|
535
|
+
return;
|
|
536
|
+
const previous = await this.database.manager.findOneBy(native_thermostat_entity_1.NativeThermostatRequestEntity, { id: dto.requestId });
|
|
537
|
+
if (previous) {
|
|
538
|
+
if (previous.controllerId !== id || JSON.stringify(previous.request) !== JSON.stringify(request))
|
|
539
|
+
fail('Request id was already used for another intent.');
|
|
540
|
+
return;
|
|
541
|
+
}
|
|
542
|
+
const row = await this.database.manager.findOneByOrFail(native_thermostat_entity_1.NativeThermostatEntity, { controllerId: id });
|
|
543
|
+
if (row.bindingState !== 'bound' || this.releaseOwners.has(id))
|
|
544
|
+
fail('Native binding is not bound.');
|
|
545
|
+
const owner = await this.database.manager.findOneBy(devices_entity_1.DeviceEntity, { id });
|
|
546
|
+
if (!owner?.enabled)
|
|
547
|
+
fail('Native controller is disabled or missing.');
|
|
548
|
+
if (dto.expectedRevision !== row.revision)
|
|
549
|
+
fail('Native thermostat revision changed.');
|
|
550
|
+
const unit = await this.capture(row.sourceDeviceId);
|
|
551
|
+
if (unit.fingerprint !== row.fingerprint || unit.physicalIdentity !== row.physicalIdentity)
|
|
552
|
+
fail('Native binding changed; explicitly revalidate first.');
|
|
553
|
+
const prepared = unit.prepare(request);
|
|
554
|
+
if (!Object.keys(request).length || !prepared?.isCurrent())
|
|
555
|
+
fail('Unsupported native climate request or combination.');
|
|
556
|
+
const revision = row.revision + 1;
|
|
557
|
+
const generation = (this.generations.get(id) ?? 0) + 1;
|
|
558
|
+
await this.graph.withStructuralWrite(async (manager) => {
|
|
559
|
+
(0, sqlite_data_source_1.registerSqliteCommitGuard)(manager, () => unit.isCurrent() && prepared.isCurrent() && !this.releaseOwners.has(id) && this.ready);
|
|
560
|
+
await manager.insert(native_thermostat_entity_1.NativeThermostatRequestEntity, {
|
|
561
|
+
id: dto.requestId,
|
|
562
|
+
controllerId: id,
|
|
563
|
+
revision,
|
|
564
|
+
request,
|
|
565
|
+
operations: [],
|
|
566
|
+
state: 'pending',
|
|
567
|
+
createdAt: new Date(),
|
|
568
|
+
});
|
|
569
|
+
await manager.update(native_thermostat_entity_1.NativeThermostatEntity, { controllerId: id, revision: row.revision }, {
|
|
570
|
+
revision,
|
|
571
|
+
requested: { ...row.requested, ...request },
|
|
572
|
+
latestRequestId: dto.requestId,
|
|
573
|
+
});
|
|
574
|
+
});
|
|
575
|
+
this.generations.set(id, generation);
|
|
576
|
+
await this.reload();
|
|
577
|
+
const current = () => this.ready &&
|
|
578
|
+
!this.releaseOwners.has(id) &&
|
|
579
|
+
this.generations.get(id) === generation &&
|
|
580
|
+
unit.isCurrent() &&
|
|
581
|
+
prepared.isCurrent();
|
|
582
|
+
execute = async () => {
|
|
583
|
+
const admitted = async () => this.lock.runShared(async () => {
|
|
584
|
+
const liveOwner = await this.database.manager.findOneBy(devices_entity_1.DeviceEntity, { id });
|
|
585
|
+
const live = await this.database.manager.findOneBy(native_thermostat_entity_1.NativeThermostatEntity, { controllerId: id });
|
|
586
|
+
return (!!liveOwner?.enabled &&
|
|
587
|
+
live?.bindingState === 'bound' &&
|
|
588
|
+
live.revision === revision &&
|
|
589
|
+
live.latestRequestId === dto.requestId &&
|
|
590
|
+
current());
|
|
591
|
+
});
|
|
592
|
+
let operations;
|
|
593
|
+
try {
|
|
594
|
+
operations = (await admitted())
|
|
595
|
+
? await prepared.dispatch(current)
|
|
596
|
+
: [
|
|
597
|
+
{
|
|
598
|
+
operation: 'request',
|
|
599
|
+
outcome: 'refused',
|
|
600
|
+
reason: 'request_superseded',
|
|
601
|
+
confirmed: false,
|
|
602
|
+
},
|
|
603
|
+
];
|
|
604
|
+
}
|
|
605
|
+
catch {
|
|
606
|
+
operations = [
|
|
607
|
+
{ operation: 'request', outcome: 'unknown', reason: 'transport_error', confirmed: false },
|
|
608
|
+
];
|
|
609
|
+
}
|
|
610
|
+
await this.lock.runExclusive(() => this.graph.withStructuralWrite(async (manager) => {
|
|
611
|
+
await manager.update(native_thermostat_entity_1.NativeThermostatRequestEntity, { id: dto.requestId, controllerId: id, revision, state: 'pending' }, { operations: [...operations], state: 'settled' });
|
|
612
|
+
}));
|
|
613
|
+
};
|
|
614
|
+
});
|
|
615
|
+
if (releaseAdmission !== undefined) {
|
|
616
|
+
await releaseAdmission;
|
|
617
|
+
return this.requestOwned(id, dto);
|
|
618
|
+
}
|
|
619
|
+
if (execute) {
|
|
620
|
+
const issued = execute();
|
|
621
|
+
this.work.add(issued);
|
|
622
|
+
try {
|
|
623
|
+
await issued;
|
|
624
|
+
}
|
|
625
|
+
finally {
|
|
626
|
+
this.work.delete(issued);
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
await this.refresh();
|
|
630
|
+
return this.get(id);
|
|
631
|
+
}
|
|
632
|
+
async release(id, dto) {
|
|
633
|
+
if (this.destroyed || !this.ready)
|
|
634
|
+
fail('Native runtime is stopped.');
|
|
635
|
+
if (this.releaseOwners.has(id) || this.pendingReleaseAdmissions.has(id))
|
|
636
|
+
fail('Native binding release is already in progress.');
|
|
637
|
+
const expectedRevision = dto.expectedRevision;
|
|
638
|
+
const token = Object.freeze({});
|
|
639
|
+
let decide;
|
|
640
|
+
const admission = new Promise((resolve) => {
|
|
641
|
+
decide = resolve;
|
|
642
|
+
});
|
|
643
|
+
const pending = { decision: admission };
|
|
644
|
+
this.pendingReleaseAdmissions.set(id, pending);
|
|
645
|
+
const completeAdmission = () => {
|
|
646
|
+
if (this.pendingReleaseAdmissions.get(id) === pending)
|
|
647
|
+
this.pendingReleaseAdmissions.delete(id);
|
|
648
|
+
decide();
|
|
649
|
+
};
|
|
650
|
+
const originalAttempts = [...(this.attempts.get(id) ?? [])];
|
|
651
|
+
let settle;
|
|
652
|
+
const completion = new Promise((resolve) => {
|
|
653
|
+
settle = resolve;
|
|
654
|
+
});
|
|
655
|
+
this.work.add(completion);
|
|
656
|
+
try {
|
|
657
|
+
const revision = await this.lock.runExclusive(() => {
|
|
658
|
+
pending.isOriginalOwner = this.lock.captureExclusiveOwner();
|
|
659
|
+
return this.graph.withStructuralWrite(async (manager) => {
|
|
660
|
+
try {
|
|
661
|
+
const row = await manager.findOneByOrFail(native_thermostat_entity_1.NativeThermostatEntity, { controllerId: id });
|
|
662
|
+
if (row.revision !== expectedRevision)
|
|
663
|
+
fail('Native thermostat revision changed.');
|
|
664
|
+
if (row.bindingState === 'released')
|
|
665
|
+
return null;
|
|
666
|
+
this.releaseOwners.set(id, token);
|
|
667
|
+
const next = row.revision + 1;
|
|
668
|
+
await manager.update(native_thermostat_entity_1.NativeThermostatEntity, { controllerId: id, revision: row.revision, bindingState: row.bindingState }, { bindingState: 'releasing', revision: next });
|
|
669
|
+
return next;
|
|
670
|
+
}
|
|
671
|
+
finally {
|
|
672
|
+
if (this.releaseOwners.get(id) !== token)
|
|
673
|
+
completeAdmission();
|
|
674
|
+
}
|
|
675
|
+
});
|
|
676
|
+
});
|
|
677
|
+
if (revision !== null) {
|
|
678
|
+
this.generations.set(id, (this.generations.get(id) ?? 0) + 1);
|
|
679
|
+
this.epoch++;
|
|
680
|
+
}
|
|
681
|
+
completeAdmission();
|
|
682
|
+
await Promise.allSettled(originalAttempts);
|
|
683
|
+
if (revision !== null)
|
|
684
|
+
await this.lock.runExclusive(async () => {
|
|
685
|
+
await this.graph.withStructuralWrite(async (manager) => {
|
|
686
|
+
const row = await manager.findOneByOrFail(native_thermostat_entity_1.NativeThermostatEntity, { controllerId: id });
|
|
687
|
+
if (this.releaseOwners.get(id) !== token || row.revision !== revision || row.bindingState !== 'releasing')
|
|
688
|
+
fail('Native binding release owner changed.');
|
|
689
|
+
await manager.update(native_thermostat_entity_1.NativeThermostatEntity, { controllerId: id, revision, bindingState: 'releasing' }, { bindingState: 'released', revision: revision + 1 });
|
|
690
|
+
});
|
|
691
|
+
for (const propertyId of Object.values(this.reservations.find((row) => row.controllerId === id)?.propertyIds ?? {})) {
|
|
692
|
+
const lease = this.leases.get(propertyId);
|
|
693
|
+
if (lease)
|
|
694
|
+
this.producers.unregister(lease);
|
|
695
|
+
this.leases.delete(propertyId);
|
|
696
|
+
}
|
|
697
|
+
await this.reload();
|
|
698
|
+
});
|
|
699
|
+
return this.get(id);
|
|
700
|
+
}
|
|
701
|
+
finally {
|
|
702
|
+
if (this.releaseOwners.get(id) === token)
|
|
703
|
+
this.releaseOwners.delete(id);
|
|
704
|
+
completeAdmission();
|
|
705
|
+
settle();
|
|
706
|
+
this.work.delete(completion);
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
async isRegisteredSetting(property, manager) {
|
|
710
|
+
if (property.valueOrigin !== devices_virtual_entity_1.VirtualValueOrigin.LOCAL || property.sourcePropertyId)
|
|
711
|
+
return false;
|
|
712
|
+
return (await manager.find(native_thermostat_entity_1.NativeThermostatEntity)).some((row) => ['mode', 'heating_setpoint', 'cooling_setpoint', 'heating_enabled', 'cooling_enabled'].some((key) => row.propertyIds[key] === property.id));
|
|
713
|
+
}
|
|
714
|
+
async ownsController(id) {
|
|
715
|
+
return this.database.manager.existsBy(native_thermostat_entity_1.NativeThermostatEntity, { controllerId: id });
|
|
716
|
+
}
|
|
717
|
+
async command(updates) {
|
|
718
|
+
return this.commandSettings(updates.map((entry) => ({ deviceId: entry.device.id, propertyId: entry.property.id, value: entry.value })));
|
|
719
|
+
}
|
|
720
|
+
async commandSettings(input) {
|
|
721
|
+
const updates = input.map((entry) => Object.freeze({ deviceId: entry.deviceId, propertyId: entry.propertyId, value: entry.value }));
|
|
722
|
+
if (!updates.length)
|
|
723
|
+
return true;
|
|
724
|
+
const id = updates[0].deviceId;
|
|
725
|
+
const row = await this.database.manager.findOneBy(native_thermostat_entity_1.NativeThermostatEntity, { controllerId: id });
|
|
726
|
+
if (!row ||
|
|
727
|
+
row.bindingState !== 'bound' ||
|
|
728
|
+
this.releaseOwners.has(id) ||
|
|
729
|
+
updates.some((entry) => entry.deviceId !== id))
|
|
730
|
+
return false;
|
|
731
|
+
const request = new native_thermostat_dto_1.RequestNativeThermostatDto();
|
|
732
|
+
request.requestId = (0, uuid_1.v4)();
|
|
733
|
+
request.expectedRevision = row.revision;
|
|
734
|
+
const seen = new Set();
|
|
735
|
+
let modeControl = false;
|
|
736
|
+
for (const update of updates) {
|
|
737
|
+
const key = Object.keys(row.propertyIds).find((key) => row.propertyIds[key] === update.propertyId);
|
|
738
|
+
if (!key || seen.has(key))
|
|
739
|
+
return false;
|
|
740
|
+
seen.add(key);
|
|
741
|
+
if (key === 'mode') {
|
|
742
|
+
if (modeControl)
|
|
743
|
+
return false;
|
|
744
|
+
modeControl = true;
|
|
745
|
+
request.mode = update.value;
|
|
746
|
+
}
|
|
747
|
+
else if (key === 'heating_enabled' || key === 'cooling_enabled') {
|
|
748
|
+
if (typeof update.value !== 'boolean' || modeControl)
|
|
749
|
+
return false;
|
|
750
|
+
modeControl = true;
|
|
751
|
+
const branch = key === 'heating_enabled' ? 'heat' : 'cool';
|
|
752
|
+
const opposite = branch === 'heat' ? 'cool' : 'heat';
|
|
753
|
+
if (update.value)
|
|
754
|
+
request.mode = branch;
|
|
755
|
+
else if (row.requested.mode === opposite)
|
|
756
|
+
continue;
|
|
757
|
+
else
|
|
758
|
+
request.mode = row.requested.mode === 'auto' ? opposite : 'off';
|
|
759
|
+
}
|
|
760
|
+
else if (key === 'heating_setpoint')
|
|
761
|
+
request.heatingSetpoint = update.value;
|
|
762
|
+
else if (key === 'cooling_setpoint')
|
|
763
|
+
request.coolingSetpoint = update.value;
|
|
764
|
+
else
|
|
765
|
+
return false;
|
|
766
|
+
}
|
|
767
|
+
if (request.mode === undefined && request.heatingSetpoint === undefined && request.coolingSetpoint === undefined)
|
|
768
|
+
return true;
|
|
769
|
+
try {
|
|
770
|
+
await this.request(id, request);
|
|
771
|
+
const original = await this.database.manager.findOneBy(native_thermostat_entity_1.NativeThermostatRequestEntity, { id: request.requestId });
|
|
772
|
+
return (original?.state === 'settled' &&
|
|
773
|
+
original.operations.length > 0 &&
|
|
774
|
+
original.operations.every((operation) => operation.outcome === 'accepted'));
|
|
775
|
+
}
|
|
776
|
+
catch (error) {
|
|
777
|
+
if (error instanceof devices_exceptions_1.DevicesValidationException)
|
|
778
|
+
return false;
|
|
779
|
+
throw error;
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
async refresh() {
|
|
783
|
+
const issued = this.refreshOwned();
|
|
784
|
+
this.work.add(issued);
|
|
785
|
+
try {
|
|
786
|
+
await issued;
|
|
787
|
+
}
|
|
788
|
+
finally {
|
|
789
|
+
this.work.delete(issued);
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
async refreshOwned() {
|
|
793
|
+
if (!this.ready || this.refreshing)
|
|
794
|
+
return;
|
|
795
|
+
this.refreshing = true;
|
|
796
|
+
try {
|
|
797
|
+
await this.lock.runShared(async () => {
|
|
798
|
+
for (const row of this.reservations) {
|
|
799
|
+
if (row.bindingState !== 'bound' || this.releaseOwners.has(row.controllerId))
|
|
800
|
+
continue;
|
|
801
|
+
const generation = this.generations.get(row.controllerId) ?? 0;
|
|
802
|
+
let unit = null;
|
|
803
|
+
try {
|
|
804
|
+
unit = await this.capture(row.sourceDeviceId);
|
|
805
|
+
}
|
|
806
|
+
catch {
|
|
807
|
+
}
|
|
808
|
+
const owner = await this.database.manager.findOneBy(devices_entity_1.DeviceEntity, { id: row.controllerId });
|
|
809
|
+
const observed = unit?.observe() ?? {
|
|
810
|
+
available: false,
|
|
811
|
+
temperature: null,
|
|
812
|
+
mode: null,
|
|
813
|
+
heatingSetpoint: null,
|
|
814
|
+
coolingSetpoint: null,
|
|
815
|
+
activity: null,
|
|
816
|
+
observedAt: null,
|
|
817
|
+
reasons: ['native_source_unavailable'],
|
|
818
|
+
isCurrent: () => false,
|
|
819
|
+
};
|
|
820
|
+
const feedbackCurrent = () => this.ready &&
|
|
821
|
+
!!owner?.enabled &&
|
|
822
|
+
!!unit?.isCurrent() &&
|
|
823
|
+
observed?.isCurrent?.() === true &&
|
|
824
|
+
unit.fingerprint === row.fingerprint &&
|
|
825
|
+
unit.physicalIdentity === row.physicalIdentity &&
|
|
826
|
+
(this.generations.get(row.controllerId) ?? 0) === generation;
|
|
827
|
+
for (const [key, propertyId] of Object.entries(row.propertyIds)) {
|
|
828
|
+
const property = await this.database.manager.findOneBy(devices_virtual_entity_1.VirtualChannelPropertyEntity, {
|
|
829
|
+
id: propertyId,
|
|
830
|
+
channel: { device: { id: row.controllerId } },
|
|
831
|
+
valueOrigin: devices_virtual_entity_1.VirtualValueOrigin.LOCAL,
|
|
832
|
+
});
|
|
833
|
+
if (!property || property.sourcePropertyId) {
|
|
834
|
+
const previous = this.leases.get(propertyId);
|
|
835
|
+
if (previous)
|
|
836
|
+
this.producers.unregister(previous);
|
|
837
|
+
this.leases.delete(propertyId);
|
|
838
|
+
this.observations.delete(propertyId);
|
|
839
|
+
this.requestedPublications.delete(propertyId);
|
|
840
|
+
continue;
|
|
841
|
+
}
|
|
842
|
+
if (key === 'mode' || key === 'locked' || key.endsWith('_setpoint') || key.endsWith('_enabled')) {
|
|
843
|
+
const field = key === 'mode' ? 'mode' : key === 'heating_setpoint' ? 'heatingSetpoint' : 'coolingSetpoint';
|
|
844
|
+
const value = key === 'locked'
|
|
845
|
+
? false
|
|
846
|
+
: key.endsWith('_enabled')
|
|
847
|
+
? row.requested.mode === undefined
|
|
848
|
+
? undefined
|
|
849
|
+
: row.requested.mode === (key === 'heating_enabled' ? 'heat' : 'cool') ||
|
|
850
|
+
row.requested.mode === 'auto'
|
|
851
|
+
: row.requested[field];
|
|
852
|
+
if (value !== undefined &&
|
|
853
|
+
this.ready &&
|
|
854
|
+
!!owner?.enabled &&
|
|
855
|
+
!this.releaseOwners.has(row.controllerId) &&
|
|
856
|
+
(this.generations.get(row.controllerId) ?? 0) === generation &&
|
|
857
|
+
this.requestedPublications.get(propertyId) !== row.revision) {
|
|
858
|
+
let written = false;
|
|
859
|
+
try {
|
|
860
|
+
written = await this.values.write(property, value);
|
|
861
|
+
}
|
|
862
|
+
catch {
|
|
863
|
+
}
|
|
864
|
+
if (written &&
|
|
865
|
+
this.ready &&
|
|
866
|
+
!this.releaseOwners.has(row.controllerId) &&
|
|
867
|
+
(this.generations.get(row.controllerId) ?? 0) === generation)
|
|
868
|
+
this.requestedPublications.set(propertyId, row.revision);
|
|
869
|
+
}
|
|
870
|
+
continue;
|
|
871
|
+
}
|
|
872
|
+
let lease = this.leases.get(propertyId);
|
|
873
|
+
if (!lease || lease.revision !== row.revision || !this.producers.isAvailable(lease)) {
|
|
874
|
+
lease = this.producers.register(property, row.revision, {
|
|
875
|
+
isCurrent: feedbackCurrent,
|
|
876
|
+
reason: 'native_feedback_expired',
|
|
877
|
+
});
|
|
878
|
+
this.leases.set(propertyId, lease);
|
|
879
|
+
}
|
|
880
|
+
const value = key === 'temperature'
|
|
881
|
+
? observed.temperature
|
|
882
|
+
: observed.activity === null
|
|
883
|
+
? null
|
|
884
|
+
: observed.activity === (key === 'heating_activity' ? 'heating' : 'cooling');
|
|
885
|
+
if (!feedbackCurrent() || !observed.available || !observed.observedAt || value === null) {
|
|
886
|
+
this.producers.invalidate(lease, observed.reasons.length ? [...observed.reasons] : ['native_feedback_unavailable']);
|
|
887
|
+
continue;
|
|
888
|
+
}
|
|
889
|
+
const sampledAt = new Date(observed.observedAt);
|
|
890
|
+
const observationKey = JSON.stringify([row.revision, observed.observedAt, value]);
|
|
891
|
+
if (this.observations.get(propertyId) === observationKey && this.producers.isAvailable(lease))
|
|
892
|
+
continue;
|
|
893
|
+
const publication = await this.values.publishDerived(property, lease, value, {
|
|
894
|
+
quality: 'good',
|
|
895
|
+
reasons: [],
|
|
896
|
+
sampledAt,
|
|
897
|
+
evaluatedAt: new Date(),
|
|
898
|
+
expiresAt: new Date(sampledAt.getTime() + 30_000),
|
|
899
|
+
});
|
|
900
|
+
if (publication.state)
|
|
901
|
+
this.observations.set(propertyId, observationKey);
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
});
|
|
905
|
+
}
|
|
906
|
+
finally {
|
|
907
|
+
this.refreshing = false;
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
};
|
|
911
|
+
exports.NativeThermostatService = NativeThermostatService;
|
|
912
|
+
__decorate([
|
|
913
|
+
(0, event_emitter_1.OnEvent)(devices_constants_1.EventType.DEVICE_UPDATED),
|
|
914
|
+
(0, event_emitter_1.OnEvent)(devices_constants_1.EventType.DEVICE_DELETED),
|
|
915
|
+
(0, event_emitter_1.OnEvent)(devices_constants_1.EventType.CHANNEL_PROPERTY_UPDATED),
|
|
916
|
+
(0, event_emitter_1.OnEvent)(devices_constants_1.EventType.CHANNEL_PROPERTY_DELETED),
|
|
917
|
+
__metadata("design:type", Function),
|
|
918
|
+
__metadata("design:paramtypes", [Object]),
|
|
919
|
+
__metadata("design:returntype", void 0)
|
|
920
|
+
], NativeThermostatService.prototype, "onCatalogChanged", null);
|
|
921
|
+
exports.NativeThermostatService = NativeThermostatService = __decorate([
|
|
922
|
+
(0, common_1.Injectable)(),
|
|
923
|
+
__metadata("design:paramtypes", [typeorm_1.DataSource,
|
|
924
|
+
device_structure_lock_service_1.DeviceStructureLockService,
|
|
925
|
+
virtual_dependency_graph_service_1.VirtualDependencyGraphService,
|
|
926
|
+
devices_service_1.DevicesService,
|
|
927
|
+
platform_registry_service_1.PlatformRegistryService,
|
|
928
|
+
property_command_admission_registry_service_1.PropertyCommandAdmissionRegistryService,
|
|
929
|
+
property_value_service_1.PropertyValueService,
|
|
930
|
+
property_producer_registry_service_1.PropertyProducerRegistryService])
|
|
931
|
+
], NativeThermostatService);
|
|
932
|
+
//# sourceMappingURL=native-thermostat.service.js.map
|