@fastybird/smart-panel-backend 1.1.0-alpha.64 → 1.1.0-alpha.66
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/services/backup.service.js +3 -5
- package/dist/modules/system/services/backup.service.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,1171 @@
|
|
|
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
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.VirtualThermostatConfigService = exports.THERMOSTAT_CONFIG_CHANGED = void 0;
|
|
16
|
+
const node_async_hooks_1 = require("node:async_hooks");
|
|
17
|
+
const typeorm_1 = require("typeorm");
|
|
18
|
+
const uuid_1 = require("uuid");
|
|
19
|
+
const common_1 = require("@nestjs/common");
|
|
20
|
+
const event_emitter_1 = require("@nestjs/event-emitter");
|
|
21
|
+
const sqlite_data_source_1 = require("../../../common/database/sqlite-data-source");
|
|
22
|
+
const devices_constants_1 = require("../../../modules/devices/devices.constants");
|
|
23
|
+
const devices_exceptions_1 = require("../../../modules/devices/devices.exceptions");
|
|
24
|
+
const devices_entity_1 = require("../../../modules/devices/entities/devices.entity");
|
|
25
|
+
const controller_publication_context_1 = require("../../../modules/devices/services/controller-publication-context");
|
|
26
|
+
const creation_capture_1 = require("../../../modules/devices/services/creation-capture");
|
|
27
|
+
const device_structure_lock_service_1 = require("../../../modules/devices/services/device-structure-lock.service");
|
|
28
|
+
const property_value_service_1 = require("../../../modules/devices/services/property-value.service");
|
|
29
|
+
const property_permissions_utils_1 = require("../../../modules/devices/utils/property-permissions.utils");
|
|
30
|
+
const devices_shelly_ng_entity_1 = require("../../devices-shelly-ng/entities/devices-shelly-ng.entity");
|
|
31
|
+
const remote_dew_point_lease_contract_1 = require("../../devices-shelly-ng/services/remote-dew-point-lease.contract");
|
|
32
|
+
const thermostat_actuation_contract_1 = require("../contracts/thermostat-actuation.contract");
|
|
33
|
+
const devices_virtual_entity_1 = require("../entities/devices-virtual.entity");
|
|
34
|
+
const native_thermostat_entity_1 = require("../entities/native-thermostat.entity");
|
|
35
|
+
const thermostat_cooling_dependency_entity_1 = require("../entities/thermostat-cooling-dependency.entity");
|
|
36
|
+
const thermostat_member_protection_entity_1 = require("../entities/thermostat-member-protection.entity");
|
|
37
|
+
const virtual_thermostat_entity_1 = require("../entities/virtual-thermostat.entity");
|
|
38
|
+
const virtual_transform_entity_1 = require("../entities/virtual-transform.entity");
|
|
39
|
+
const virtual_thermostat_ownership_subscriber_1 = require("../subscribers/virtual-thermostat-ownership.subscriber");
|
|
40
|
+
const native_thermostat_service_1 = require("./native-thermostat.service");
|
|
41
|
+
const thermostat_comfort_selection_1 = require("./thermostat-comfort-selection");
|
|
42
|
+
const thermostat_controller_mutation_1 = require("./thermostat-controller-mutation");
|
|
43
|
+
const thermostat_cooling_dependency_service_1 = require("./thermostat-cooling-dependency.service");
|
|
44
|
+
const thermostat_protection_source_utils_1 = require("./thermostat-protection-source.utils");
|
|
45
|
+
const virtual_dependency_graph_service_1 = require("./virtual-dependency-graph.service");
|
|
46
|
+
const virtual_numeric_transform_utils_1 = require("./virtual-numeric-transform.utils");
|
|
47
|
+
const virtual_source_eligibility_utils_1 = require("./virtual-source-eligibility.utils");
|
|
48
|
+
const virtual_thermostat_automation_service_1 = require("./virtual-thermostat-automation.service");
|
|
49
|
+
const virtual_thermostat_claims_service_1 = require("./virtual-thermostat-claims.service");
|
|
50
|
+
const virtual_thermostat_comfort_utils_1 = require("./virtual-thermostat-comfort.utils");
|
|
51
|
+
const virtual_thermostat_contract_utils_1 = require("./virtual-thermostat-contract.utils");
|
|
52
|
+
const virtual_thermostat_policy_utils_1 = require("./virtual-thermostat-policy.utils");
|
|
53
|
+
const virtual_transform_contract_utils_1 = require("./virtual-transform-contract.utils");
|
|
54
|
+
const virtual_transform_resolver_1 = require("./virtual-transform-resolver");
|
|
55
|
+
const virtual_window_trend_utils_1 = require("./virtual-window-trend.utils");
|
|
56
|
+
exports.THERMOSTAT_CONFIG_CHANGED = 'devices-virtual.thermostat.config.changed';
|
|
57
|
+
const fail = (message) => {
|
|
58
|
+
throw new devices_exceptions_1.DevicesValidationException(message);
|
|
59
|
+
};
|
|
60
|
+
let VirtualThermostatConfigService = class VirtualThermostatConfigService {
|
|
61
|
+
constructor(dataSource, structureLock, graph, claims, events, values, resolver = new virtual_transform_resolver_1.VirtualTransformResolver(), automation, native) {
|
|
62
|
+
this.dataSource = dataSource;
|
|
63
|
+
this.structureLock = structureLock;
|
|
64
|
+
this.graph = graph;
|
|
65
|
+
this.claims = claims;
|
|
66
|
+
this.events = events;
|
|
67
|
+
this.values = values;
|
|
68
|
+
this.resolver = resolver;
|
|
69
|
+
this.automation = automation;
|
|
70
|
+
this.native = native;
|
|
71
|
+
}
|
|
72
|
+
onModuleInit() {
|
|
73
|
+
if (process.env.FB_CLI === 'on')
|
|
74
|
+
return;
|
|
75
|
+
const publication = (0, creation_capture_1.captureCreation)(this, ['afterCommit']);
|
|
76
|
+
this.stopAutomationPublication = this.automation?.registerPublication((id) => publication.values.afterCommit.call(publication.receiver, id));
|
|
77
|
+
}
|
|
78
|
+
onModuleDestroy() {
|
|
79
|
+
this.stopAutomationPublication?.();
|
|
80
|
+
this.stopAutomationPublication = undefined;
|
|
81
|
+
}
|
|
82
|
+
coolingDependencies() {
|
|
83
|
+
return new thermostat_cooling_dependency_service_1.ThermostatCoolingDependencyService(this.dataSource, this.values, this.claims);
|
|
84
|
+
}
|
|
85
|
+
async configure(controllerId, dto) {
|
|
86
|
+
return controller_publication_context_1.ControllerPublicationContext.complete(async () => {
|
|
87
|
+
const release = this.claims.holdRecoveryFence();
|
|
88
|
+
this.claims.revokeAllQualifications();
|
|
89
|
+
this.events.emit(exports.THERMOSTAT_CONFIG_CHANGED, controllerId);
|
|
90
|
+
let input;
|
|
91
|
+
let predecessors;
|
|
92
|
+
let captureFailure;
|
|
93
|
+
let ownerCurrent = () => false;
|
|
94
|
+
let noop;
|
|
95
|
+
try {
|
|
96
|
+
noop = virtual_thermostat_ownership_subscriber_1.VirtualThermostatOwnershipSubscriber.captureNoopFence(this.dataSource, () => ownerCurrent());
|
|
97
|
+
predecessors = this.automation?.beginMutation(controllerId);
|
|
98
|
+
void predecessors?.catch(() => undefined);
|
|
99
|
+
input = (0, creation_capture_1.snapshotCreation)(dto);
|
|
100
|
+
}
|
|
101
|
+
catch (cause) {
|
|
102
|
+
captureFailure = { cause };
|
|
103
|
+
}
|
|
104
|
+
try {
|
|
105
|
+
try {
|
|
106
|
+
if (predecessors !== undefined)
|
|
107
|
+
await predecessors;
|
|
108
|
+
}
|
|
109
|
+
catch (cause) {
|
|
110
|
+
captureFailure ??= { cause };
|
|
111
|
+
}
|
|
112
|
+
return await this.structureLock.runExclusive(controller_publication_context_1.ControllerPublicationContext.captureCallback(async () => {
|
|
113
|
+
if (captureFailure)
|
|
114
|
+
throw captureFailure.cause;
|
|
115
|
+
ownerCurrent = this.structureLock.captureExclusiveOwner();
|
|
116
|
+
let receipt;
|
|
117
|
+
let ready = false;
|
|
118
|
+
let unchanged = false;
|
|
119
|
+
const write = async (manager, advanceGraph) => {
|
|
120
|
+
const slot = await this.automation?.captureManualSlot(manager, controllerId);
|
|
121
|
+
const owned = await this.automation?.captureManualBaseline(manager, controllerId, 0);
|
|
122
|
+
const before = await (0, thermostat_controller_mutation_1.readControllerMutationImage)(manager, controllerId);
|
|
123
|
+
const edges = (0, creation_capture_1.captureCreation)(this.graph, ['edges']);
|
|
124
|
+
(0, sqlite_data_source_1.registerSqliteCommitGuard)(manager, () => edges.current());
|
|
125
|
+
const bindings = await (0, thermostat_controller_mutation_1.captureControllerBindings)(manager, controllerId, before, [
|
|
126
|
+
...(Array.isArray(input.sources) ? input.sources.map((source) => source?.sourcePropertyId) : []),
|
|
127
|
+
...(Array.isArray(input.settings) ? input.settings.map((setting) => setting?.propertyId) : []),
|
|
128
|
+
...(Array.isArray(input.actuators)
|
|
129
|
+
? input.actuators.flatMap((actuator) => [
|
|
130
|
+
actuator?.sourcePropertyId,
|
|
131
|
+
actuator?.protection?.sourcePropertyId,
|
|
132
|
+
actuator?.coolingProtection?.dewPointPropertyId,
|
|
133
|
+
actuator?.coolingProtection?.surfacePropertyId,
|
|
134
|
+
])
|
|
135
|
+
: []),
|
|
136
|
+
], () => edges.values.edges.call(edges.receiver, manager));
|
|
137
|
+
const prepared = (0, creation_capture_1.snapshotCreation)(await this.prepare(manager, controllerId, input));
|
|
138
|
+
if (owned && prepared.config.comfort)
|
|
139
|
+
prepared.config.comfort.automation_baseline = null;
|
|
140
|
+
await bindings();
|
|
141
|
+
await (0, thermostat_controller_mutation_1.assertControllerMutationImage)(manager, controllerId, before);
|
|
142
|
+
unchanged =
|
|
143
|
+
(!slot?.facts || (!['LIVE', 'PROVISIONAL'].includes(slot.facts.state) && slot.facts.manualHold)) &&
|
|
144
|
+
(0, thermostat_controller_mutation_1.controllerConfigurationUnchanged)(manager, before, prepared, input.sources.map((source) => source.id));
|
|
145
|
+
if (unchanged) {
|
|
146
|
+
await this.automation?.captureUnchangedAuthority(manager, controllerId);
|
|
147
|
+
await this.graph.sealControllerLedger(manager);
|
|
148
|
+
noop.arm();
|
|
149
|
+
ready = true;
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
for (const row of [
|
|
153
|
+
prepared.config,
|
|
154
|
+
...prepared.actuators,
|
|
155
|
+
...prepared.protections,
|
|
156
|
+
...prepared.coolingDependencies,
|
|
157
|
+
])
|
|
158
|
+
if (!Number.isSafeInteger(row.revision) || row.revision < 1)
|
|
159
|
+
fail('Thermostat configuration counter overflow.');
|
|
160
|
+
const graphRevision = await advanceGraph();
|
|
161
|
+
const expected = await this.persist(manager, controllerId, prepared, before);
|
|
162
|
+
await bindings(expected.properties, manager, graphRevision);
|
|
163
|
+
await this.automation?.manualFence(manager, controllerId, true, slot);
|
|
164
|
+
await this.graph.sealControllerLedger(manager);
|
|
165
|
+
noop.applied();
|
|
166
|
+
ready = true;
|
|
167
|
+
};
|
|
168
|
+
await this.graph.withControllerMutationWrite(write, input.expectedGraphRevision, (manager) => {
|
|
169
|
+
receipt = (0, sqlite_data_source_1.observeSqliteOuterOutcome)(manager);
|
|
170
|
+
noop.admit(manager);
|
|
171
|
+
(0, sqlite_data_source_1.registerSqliteCommitGuard)(manager, () => ready && ownerCurrent());
|
|
172
|
+
}, () => {
|
|
173
|
+
if (receipt.outcome !== 'committed')
|
|
174
|
+
fail('Missing original native configuration acknowledgement.');
|
|
175
|
+
}, write, noop);
|
|
176
|
+
return unchanged ? this.get(controllerId) : this.afterCommit(controllerId);
|
|
177
|
+
}));
|
|
178
|
+
}
|
|
179
|
+
finally {
|
|
180
|
+
noop?.close();
|
|
181
|
+
release();
|
|
182
|
+
await this.claims.refresh().catch(() => undefined);
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
prepare(manager, controllerId, dto, draft) {
|
|
187
|
+
return this.validate(manager, controllerId, dto, draft);
|
|
188
|
+
}
|
|
189
|
+
async captureCreationPredecessor(controllerId) {
|
|
190
|
+
return this.automation ? this.automation.captureCreationPredecessor(controllerId) : () => Promise.resolve();
|
|
191
|
+
}
|
|
192
|
+
async captureCreation(manager, controllerId, predecessor) {
|
|
193
|
+
return this.automation
|
|
194
|
+
? this.automation.captureCreation(manager, controllerId, predecessor)
|
|
195
|
+
: { finish: () => Promise.resolve() };
|
|
196
|
+
}
|
|
197
|
+
async persist(manager, controllerId, prepared, before, creation) {
|
|
198
|
+
if (before && creation)
|
|
199
|
+
for (const claim of prepared.actuators)
|
|
200
|
+
claim.qualificationGeneration = (0, uuid_1.v4)();
|
|
201
|
+
const expected = before ? { ...before } : undefined;
|
|
202
|
+
if (expected) {
|
|
203
|
+
expected.configuration = await (0, thermostat_controller_mutation_1.writeControllerPartition)(manager, 'configuration', before.configuration, [
|
|
204
|
+
prepared.config,
|
|
205
|
+
]);
|
|
206
|
+
expected.sources = await (0, thermostat_controller_mutation_1.writeControllerPartition)(manager, 'sources', before.sources, prepared.sources);
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
await manager.save(prepared.config);
|
|
210
|
+
await manager.delete(virtual_thermostat_entity_1.VirtualThermostatSourceEntity, { controllerId });
|
|
211
|
+
await manager.save(prepared.sources);
|
|
212
|
+
}
|
|
213
|
+
if (expected) {
|
|
214
|
+
expected.properties = await (0, thermostat_controller_mutation_1.writeControllerSettingPermissions)(manager, before, prepared.settings);
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
const oldSettings = await manager.findBy(virtual_thermostat_entity_1.VirtualThermostatSettingEntity, { controllerId });
|
|
218
|
+
for (const setting of oldSettings)
|
|
219
|
+
if (!prepared.settings.some((row) => row.propertyId === setting.propertyId))
|
|
220
|
+
await manager.update(devices_virtual_entity_1.VirtualChannelPropertyEntity, { id: setting.propertyId }, { permissions: [devices_constants_1.PermissionType.READ_ONLY] });
|
|
221
|
+
for (const setting of prepared.settings)
|
|
222
|
+
await manager.update(devices_virtual_entity_1.VirtualChannelPropertyEntity, { id: setting.propertyId }, { permissions: [devices_constants_1.PermissionType.READ_WRITE] });
|
|
223
|
+
}
|
|
224
|
+
if (expected) {
|
|
225
|
+
expected.settings = await (0, thermostat_controller_mutation_1.writeControllerPartition)(manager, 'settings', before.settings, prepared.settings);
|
|
226
|
+
expected.claims = await (0, thermostat_controller_mutation_1.writeControllerPartition)(manager, 'claims', before.claims, prepared.actuators, true);
|
|
227
|
+
expected.protections = await (0, thermostat_controller_mutation_1.writeControllerPartition)(manager, 'protections', before.protections, prepared.protections, true);
|
|
228
|
+
expected.cooling = await (0, thermostat_controller_mutation_1.writeControllerPartition)(manager, 'cooling', before.cooling, prepared.coolingDependencies, true);
|
|
229
|
+
await (0, thermostat_controller_mutation_1.assertControllerMutationImage)(manager, controllerId, expected);
|
|
230
|
+
}
|
|
231
|
+
else {
|
|
232
|
+
await manager.delete(virtual_thermostat_entity_1.VirtualThermostatSettingEntity, { controllerId });
|
|
233
|
+
await manager.save(prepared.settings);
|
|
234
|
+
await manager.save(prepared.actuators);
|
|
235
|
+
await manager.save(thermostat_member_protection_entity_1.ThermostatMemberProtectionEntity, prepared.protections);
|
|
236
|
+
if (prepared.coolingDependencies.length)
|
|
237
|
+
await manager.save(thermostat_cooling_dependency_entity_1.ThermostatCoolingDependencyEntity, prepared.coolingDependencies);
|
|
238
|
+
if (!creation)
|
|
239
|
+
await this.automation?.initializeCreated(manager, controllerId);
|
|
240
|
+
}
|
|
241
|
+
if (creation)
|
|
242
|
+
await creation();
|
|
243
|
+
return expected;
|
|
244
|
+
}
|
|
245
|
+
async describe(prepared) {
|
|
246
|
+
return this.model(prepared.config, prepared.sources, prepared.actuators, prepared.settings, undefined, prepared.protections, prepared.coolingDependencies);
|
|
247
|
+
}
|
|
248
|
+
async snapshot(manager, controllerId) {
|
|
249
|
+
const config = await manager.findOneByOrFail(virtual_thermostat_entity_1.VirtualThermostatConfigEntity, { controllerId });
|
|
250
|
+
const [sources, actuators, settings] = await Promise.all([
|
|
251
|
+
manager.findBy(virtual_thermostat_entity_1.VirtualThermostatSourceEntity, { controllerId }),
|
|
252
|
+
manager.findBy(virtual_thermostat_entity_1.VirtualThermostatActuatorClaimEntity, { controllerId, state: (0, typeorm_1.Not)('released') }),
|
|
253
|
+
manager.findBy(virtual_thermostat_entity_1.VirtualThermostatSettingEntity, { controllerId }),
|
|
254
|
+
]);
|
|
255
|
+
return this.model(config, sources, actuators, settings, manager);
|
|
256
|
+
}
|
|
257
|
+
async afterCommit(controllerId) {
|
|
258
|
+
const own = (0, creation_capture_1.captureCreation)(this, ['get', 'property']);
|
|
259
|
+
const get = Reflect.get(own.values, 'get');
|
|
260
|
+
const property = Reflect.get(own.values, 'property');
|
|
261
|
+
const manager = this.dataSource.manager;
|
|
262
|
+
const claims = (0, creation_capture_1.captureCreation)(this.claims, ['invalidate', 'refresh']);
|
|
263
|
+
const values = (0, creation_capture_1.captureCreation)(this.values, ['write', 'readLatest']);
|
|
264
|
+
const events = (0, creation_capture_1.captureCreation)(this.events, ['emit']);
|
|
265
|
+
const graphCurrent = this.graph.capturePublishGuard();
|
|
266
|
+
const publication = new controller_publication_context_1.ControllerPublicationContext(() => graphCurrent() && own.current() && claims.current() && values.current() && events.current());
|
|
267
|
+
return publication.run(async () => {
|
|
268
|
+
claims.values.invalidate.call(claims.receiver);
|
|
269
|
+
const current = await (0, creation_capture_1.invokeCreation)(get, this, controllerId);
|
|
270
|
+
for (const setting of current.settings) {
|
|
271
|
+
const target = await (0, creation_capture_1.invokeCreation)(property, this, manager, setting.property);
|
|
272
|
+
const value = setting.setting === 'heating_setpoint'
|
|
273
|
+
? current.policy.heatingSetpoint
|
|
274
|
+
: setting.setting === 'cooling_setpoint'
|
|
275
|
+
? current.policy.coolingSetpoint
|
|
276
|
+
: setting.setting === 'locked'
|
|
277
|
+
? current.locked
|
|
278
|
+
: setting.setting === 'heating_enabled'
|
|
279
|
+
? ['heat', 'auto'].includes(current.requested_mode)
|
|
280
|
+
: ['cool', 'auto'].includes(current.requested_mode);
|
|
281
|
+
await values.values.write.call(values.receiver, target.property, value);
|
|
282
|
+
target.property.value = await values.values.readLatest.call(values.receiver, target.property);
|
|
283
|
+
events.values.emit.call(events.receiver, devices_constants_1.EventType.CHANNEL_PROPERTY_UPDATED, target.property);
|
|
284
|
+
}
|
|
285
|
+
await claims.values.refresh.call(claims.receiver).catch(() => undefined);
|
|
286
|
+
events.values.emit.call(events.receiver, exports.THERMOSTAT_CONFIG_CHANGED, controllerId);
|
|
287
|
+
return current;
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
async preview(controllerId, dto) {
|
|
291
|
+
return this.structureLock.runExclusive(async () => {
|
|
292
|
+
if (dto.expectedGraphRevision !== undefined && dto.expectedGraphRevision !== (await this.graph.revision()))
|
|
293
|
+
fail('Virtual graph revision changed.');
|
|
294
|
+
const prepared = await this.prepare(this.dataSource.manager, controllerId, dto);
|
|
295
|
+
return this.describe(prepared);
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
async get(controllerId) {
|
|
299
|
+
return this.structureLock.runShared(async () => {
|
|
300
|
+
const manager = this.dataSource.manager;
|
|
301
|
+
const config = await manager.findOneBy(virtual_thermostat_entity_1.VirtualThermostatConfigEntity, { controllerId });
|
|
302
|
+
if (!config)
|
|
303
|
+
throw new common_1.NotFoundException('Thermostat configuration does not exist.');
|
|
304
|
+
const [sources, actuators, settings] = await Promise.all([
|
|
305
|
+
manager.findBy(virtual_thermostat_entity_1.VirtualThermostatSourceEntity, { controllerId }),
|
|
306
|
+
manager.findBy(virtual_thermostat_entity_1.VirtualThermostatActuatorClaimEntity, { controllerId, state: (0, typeorm_1.Not)('released') }),
|
|
307
|
+
manager.findBy(virtual_thermostat_entity_1.VirtualThermostatSettingEntity, { controllerId }),
|
|
308
|
+
]);
|
|
309
|
+
return this.model(config, sources, actuators, settings);
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
async requestRelease(controllerId, expectedRevision) {
|
|
313
|
+
const entryClaims = (0, creation_capture_1.captureCreation)(this.claims, ['holdRecoveryFence', 'revokeAllQualifications', 'refresh']);
|
|
314
|
+
const events = (0, creation_capture_1.captureCreation)(this.events, ['emit']);
|
|
315
|
+
const exclusiveLock = (0, creation_capture_1.captureCreation)(this.structureLock, ['runExclusive']);
|
|
316
|
+
const exclusive = exclusiveLock.values.runExclusive;
|
|
317
|
+
const read = (0, creation_capture_1.captureCreation)(this, ['get']);
|
|
318
|
+
const get = Reflect.get(read.values, 'get'), configChanged = exports.THERMOSTAT_CONFIG_CHANGED;
|
|
319
|
+
let ownerCurrent = () => false;
|
|
320
|
+
const captured = (() => {
|
|
321
|
+
try {
|
|
322
|
+
const lock = (0, creation_capture_1.captureCreation)(exclusiveLock.receiver, [
|
|
323
|
+
'runShared',
|
|
324
|
+
'hasCurrentStructuralLease',
|
|
325
|
+
'context',
|
|
326
|
+
]);
|
|
327
|
+
const own = (0, creation_capture_1.captureCreation)(this, [
|
|
328
|
+
'requestRelease',
|
|
329
|
+
'dataSource',
|
|
330
|
+
'structureLock',
|
|
331
|
+
'graph',
|
|
332
|
+
'claims',
|
|
333
|
+
'events',
|
|
334
|
+
'get',
|
|
335
|
+
]);
|
|
336
|
+
const claims = (0, creation_capture_1.captureCreation)(entryClaims.receiver, ['invalidate']);
|
|
337
|
+
const graph = (0, creation_capture_1.captureCreation)(this.graph, [
|
|
338
|
+
'withComfortSelectionWrite',
|
|
339
|
+
'sealControllerLedger',
|
|
340
|
+
'structuralWrite',
|
|
341
|
+
'refreshValidation',
|
|
342
|
+
'dataSource',
|
|
343
|
+
'revision',
|
|
344
|
+
]);
|
|
345
|
+
const helper = (0, creation_capture_1.captureCreation)(thermostat_comfort_selection_1.thermostatComfortSelection, ['pin']);
|
|
346
|
+
const selection = helper.values.pin(this.dataSource, 'release-request');
|
|
347
|
+
const input = selection.releaseInput(controllerId, expectedRevision);
|
|
348
|
+
const pins = [own, entryClaims, claims, events, exclusiveLock, lock, graph, helper, selection];
|
|
349
|
+
const current = () => pins.every((pin) => pin.current());
|
|
350
|
+
const check = () => {
|
|
351
|
+
if (!current())
|
|
352
|
+
fail('Original thermostat release dispatch expired.');
|
|
353
|
+
};
|
|
354
|
+
const operation = selection.operation(input, () => ownerCurrent(), current, true);
|
|
355
|
+
return { value: { lock, graph, claims, input, operation, check } };
|
|
356
|
+
}
|
|
357
|
+
catch (cause) {
|
|
358
|
+
return { failure: Object.freeze({ cause }) };
|
|
359
|
+
}
|
|
360
|
+
})();
|
|
361
|
+
const release = entryClaims.values.holdRecoveryFence.call(entryClaims.receiver);
|
|
362
|
+
entryClaims.values.revokeAllQualifications.call(entryClaims.receiver);
|
|
363
|
+
events.values.emit.call(events.receiver, configChanged, controllerId);
|
|
364
|
+
try {
|
|
365
|
+
const predecessors = !captured.failure ? this.automation?.beginMutation(controllerId) : undefined;
|
|
366
|
+
if (predecessors !== undefined)
|
|
367
|
+
await predecessors;
|
|
368
|
+
return await (0, creation_capture_1.invokeCreation)(exclusive, exclusiveLock.receiver, async () => {
|
|
369
|
+
if (captured.failure)
|
|
370
|
+
throw captured.failure.cause;
|
|
371
|
+
const { lock, graph, claims, input, operation, check } = captured.value;
|
|
372
|
+
check();
|
|
373
|
+
ownerCurrent = node_async_hooks_1.AsyncLocalStorage.bind(() => lock.values.hasCurrentStructuralLease.call(lock.receiver));
|
|
374
|
+
try {
|
|
375
|
+
await graph.values.withComfortSelectionWrite.call(graph.receiver, async (manager) => {
|
|
376
|
+
const slot = await this.automation?.captureManualSlot(manager, controllerId);
|
|
377
|
+
const owned = await this.automation?.captureInstalledIntent(manager, controllerId);
|
|
378
|
+
const result = await operation.write(manager, owned ?? undefined);
|
|
379
|
+
await this.automation?.manualFence(manager, controllerId, true, slot);
|
|
380
|
+
await graph.values.sealControllerLedger.call(graph.receiver, manager);
|
|
381
|
+
operation.markReady();
|
|
382
|
+
return result;
|
|
383
|
+
}, undefined, operation.admit, operation.accepted, 'release-request');
|
|
384
|
+
operation.accepted();
|
|
385
|
+
}
|
|
386
|
+
catch (cause) {
|
|
387
|
+
operation.settlement.transactionFailure = Object.freeze({ cause });
|
|
388
|
+
throw cause;
|
|
389
|
+
}
|
|
390
|
+
let stage = 'claims.invalidate';
|
|
391
|
+
try {
|
|
392
|
+
claims.values.invalidate.call(claims.receiver);
|
|
393
|
+
stage = 'claims.refresh';
|
|
394
|
+
await entryClaims.values.refresh.call(entryClaims.receiver);
|
|
395
|
+
stage = 'configChanged';
|
|
396
|
+
events.values.emit.call(events.receiver, configChanged, input.id);
|
|
397
|
+
stage = 'get';
|
|
398
|
+
return await (0, creation_capture_1.invokeCreation)(get, read.receiver, input.id);
|
|
399
|
+
}
|
|
400
|
+
catch (cause) {
|
|
401
|
+
operation.settlement.maintenanceFailure = Object.freeze({ stage, cause });
|
|
402
|
+
throw cause;
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
catch (cause) {
|
|
407
|
+
if (captured.value)
|
|
408
|
+
captured.value.operation.settlement.structuralFailure = Object.freeze({ cause });
|
|
409
|
+
throw cause;
|
|
410
|
+
}
|
|
411
|
+
finally {
|
|
412
|
+
release();
|
|
413
|
+
await entryClaims.values.refresh.call(entryClaims.receiver).catch(() => undefined);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
async restoreActuator(controllerId, claimId, dto, actorId) {
|
|
417
|
+
return controller_publication_context_1.ControllerPublicationContext.complete(async () => {
|
|
418
|
+
if (!actorId ||
|
|
419
|
+
dto.disconnectionAcknowledged !== true ||
|
|
420
|
+
typeof dto.reason !== 'string' ||
|
|
421
|
+
dto.reason.trim().length < 10)
|
|
422
|
+
fail('An identified operator, disconnection acknowledgement and meaningful reason are required.');
|
|
423
|
+
const releaseFence = this.claims.holdRecoveryFence();
|
|
424
|
+
let ownedInput;
|
|
425
|
+
let predecessors;
|
|
426
|
+
let captureFailure;
|
|
427
|
+
try {
|
|
428
|
+
predecessors = this.automation?.beginMutation(controllerId);
|
|
429
|
+
void predecessors?.catch(() => undefined);
|
|
430
|
+
ownedInput = (0, creation_capture_1.snapshotCreation)(dto);
|
|
431
|
+
}
|
|
432
|
+
catch (cause) {
|
|
433
|
+
captureFailure = { cause };
|
|
434
|
+
}
|
|
435
|
+
try {
|
|
436
|
+
try {
|
|
437
|
+
if (predecessors !== undefined)
|
|
438
|
+
await predecessors;
|
|
439
|
+
}
|
|
440
|
+
catch (cause) {
|
|
441
|
+
captureFailure ??= { cause };
|
|
442
|
+
}
|
|
443
|
+
return await this.structureLock.runExclusive(controller_publication_context_1.ControllerPublicationContext.captureCallback(async () => {
|
|
444
|
+
if (captureFailure)
|
|
445
|
+
throw captureFailure.cause;
|
|
446
|
+
const dto = ownedInput;
|
|
447
|
+
const ownerCurrent = this.structureLock.captureExclusiveOwner();
|
|
448
|
+
let receipt;
|
|
449
|
+
let ready = false;
|
|
450
|
+
await this.graph.withControllerMutationWrite(async (manager) => {
|
|
451
|
+
const slot = await this.automation?.captureManualSlot(manager, controllerId);
|
|
452
|
+
const owned = await this.automation?.captureManualBaseline(manager, controllerId);
|
|
453
|
+
const before = await (0, thermostat_controller_mutation_1.readControllerMutationImage)(manager, controllerId);
|
|
454
|
+
const config = await manager.findOneBy(virtual_thermostat_entity_1.VirtualThermostatConfigEntity, { controllerId });
|
|
455
|
+
const edges = (0, creation_capture_1.captureCreation)(this.graph, ['edges']);
|
|
456
|
+
(0, sqlite_data_source_1.registerSqliteCommitGuard)(manager, () => edges.current());
|
|
457
|
+
const bindings = await (0, thermostat_controller_mutation_1.captureControllerBindings)(manager, controllerId, before, [dto.sourcePropertyId], () => edges.values.edges.call(edges.receiver, manager));
|
|
458
|
+
const claim = await manager.findOneBy(virtual_thermostat_entity_1.VirtualThermostatActuatorClaimEntity, {
|
|
459
|
+
id: claimId,
|
|
460
|
+
controllerId,
|
|
461
|
+
});
|
|
462
|
+
if (!config ||
|
|
463
|
+
!claim ||
|
|
464
|
+
config.revision !== dto.expectedRevision ||
|
|
465
|
+
claim.revision !== dto.expectedClaimRevision)
|
|
466
|
+
fail('Thermostat or claim revision changed; reload the retained reservation.');
|
|
467
|
+
if (![config.revision, claim.revision].every((value) => Number.isSafeInteger(value) && value >= 1 && value < Number.MAX_SAFE_INTEGER))
|
|
468
|
+
fail('Thermostat or claim revision overflowed; the retained reservation cannot be restored.');
|
|
469
|
+
if (claim.state === 'released' || claim.physicalIdentity !== dto.physicalIdentity)
|
|
470
|
+
fail('Only this exact retained canonical claim can be restored.');
|
|
471
|
+
if (claim.sourcePropertyId) {
|
|
472
|
+
if (claim.sourcePropertyId !== dto.sourcePropertyId)
|
|
473
|
+
fail('The old endpoint still exists; replacing its property requires a retained alias reservation.');
|
|
474
|
+
const previous = await this.property(manager, claim.sourcePropertyId);
|
|
475
|
+
if ((0, virtual_thermostat_contract_utils_1.thermostatActuatorIdentity)(previous.property, previous.channel, previous.device) !==
|
|
476
|
+
claim.physicalIdentity)
|
|
477
|
+
fail('Existing endpoint no longer matches the reserved canonical hardware.');
|
|
478
|
+
}
|
|
479
|
+
const target = await this.property(manager, dto.sourcePropertyId);
|
|
480
|
+
const identity = (0, virtual_thermostat_contract_utils_1.thermostatActuatorIdentity)(target.property, target.channel, target.device);
|
|
481
|
+
if (identity !== claim.physicalIdentity ||
|
|
482
|
+
!(target.channel instanceof devices_shelly_ng_entity_1.ShellyNgChannelEntity) ||
|
|
483
|
+
!(target.property instanceof devices_shelly_ng_entity_1.ShellyNgChannelPropertyEntity) ||
|
|
484
|
+
target.property.identifier !== 'output')
|
|
485
|
+
fail('Restored property must be the same canonical readable and writable Shelly output.');
|
|
486
|
+
const conflict = await manager.findOneBy(virtual_thermostat_entity_1.VirtualThermostatActuatorClaimEntity, {
|
|
487
|
+
physicalIdentity: identity,
|
|
488
|
+
state: (0, typeorm_1.Not)('released'),
|
|
489
|
+
});
|
|
490
|
+
if (conflict?.id !== claim.id)
|
|
491
|
+
fail('Canonical physical actuator is reserved by another claim.');
|
|
492
|
+
const priorProperty = claim.sourcePropertyIdentity;
|
|
493
|
+
const releaseRequestedAt = claim.releaseRequestedAt ?? config.releaseRequestedAt;
|
|
494
|
+
const releaseRequested = claim.state === 'releasing' || releaseRequestedAt !== null;
|
|
495
|
+
if (owned && config.comfort)
|
|
496
|
+
config.comfort.automation_baseline = null;
|
|
497
|
+
config.revision++;
|
|
498
|
+
config.requestedMode = 'off';
|
|
499
|
+
claim.revision++;
|
|
500
|
+
claim.qualificationGeneration = (0, uuid_1.v4)();
|
|
501
|
+
claim.state = releaseRequested ? 'releasing' : 'reserved';
|
|
502
|
+
claim.sourcePropertyId = target.property.id;
|
|
503
|
+
claim.sourcePropertyIdentity = target.property.id;
|
|
504
|
+
claim.sourceDeviceId = target.device.id;
|
|
505
|
+
claim.sourceDeviceIdentity = target.device.id;
|
|
506
|
+
claim.contractFingerprint = (0, virtual_thermostat_contract_utils_1.thermostatPropertyContract)(target.property, target.channel, target.device);
|
|
507
|
+
claim.reason = releaseRequested ? claim.reason : 'operator_restored_same_physical_actuator';
|
|
508
|
+
claim.releaseRequestedAt = releaseRequestedAt;
|
|
509
|
+
claim.releasedAt = null;
|
|
510
|
+
claim.releaseEvidence = null;
|
|
511
|
+
await bindings();
|
|
512
|
+
await (0, thermostat_controller_mutation_1.assertControllerMutationImage)(manager, controllerId, before);
|
|
513
|
+
const configuration = await (0, thermostat_controller_mutation_1.writeControllerPartition)(manager, 'configuration', before.configuration, [
|
|
514
|
+
config,
|
|
515
|
+
]);
|
|
516
|
+
const claims = await (0, thermostat_controller_mutation_1.writeControllerPartition)(manager, 'claims', before.claims, [claim], true);
|
|
517
|
+
const audit = manager.create(virtual_thermostat_entity_1.VirtualThermostatRecoveryEntity, {
|
|
518
|
+
id: (0, uuid_1.v4)(),
|
|
519
|
+
controllerId,
|
|
520
|
+
claimId: claim.id,
|
|
521
|
+
physicalIdentity: identity,
|
|
522
|
+
previousPropertyIdentity: priorProperty,
|
|
523
|
+
restoredPropertyId: target.property.id,
|
|
524
|
+
actorId,
|
|
525
|
+
reason: dto.reason.trim(),
|
|
526
|
+
disconnectionAcknowledged: true,
|
|
527
|
+
configurationRevision: config.revision,
|
|
528
|
+
claimRevision: claim.revision,
|
|
529
|
+
createdAt: new Date(),
|
|
530
|
+
});
|
|
531
|
+
const recoveries = await (0, thermostat_controller_mutation_1.writeControllerPartition)(manager, 'recoveries', before.recoveries, [audit], true);
|
|
532
|
+
await (0, thermostat_controller_mutation_1.assertControllerMutationImage)(manager, controllerId, {
|
|
533
|
+
...before,
|
|
534
|
+
configuration,
|
|
535
|
+
claims,
|
|
536
|
+
recoveries,
|
|
537
|
+
});
|
|
538
|
+
await bindings();
|
|
539
|
+
await this.automation?.manualFence(manager, controllerId, true, slot);
|
|
540
|
+
await this.graph.sealControllerLedger(manager);
|
|
541
|
+
ready = true;
|
|
542
|
+
}, undefined, (manager) => {
|
|
543
|
+
receipt = (0, sqlite_data_source_1.observeSqliteOuterOutcome)(manager);
|
|
544
|
+
(0, sqlite_data_source_1.registerSqliteCommitGuard)(manager, () => ready && ownerCurrent());
|
|
545
|
+
}, () => {
|
|
546
|
+
if (receipt.outcome !== 'committed')
|
|
547
|
+
fail('Missing original native restore acknowledgement.');
|
|
548
|
+
});
|
|
549
|
+
this.claims.revokeQualification(dto.physicalIdentity);
|
|
550
|
+
return this.afterCommit(controllerId);
|
|
551
|
+
}));
|
|
552
|
+
}
|
|
553
|
+
finally {
|
|
554
|
+
releaseFence();
|
|
555
|
+
await this.claims.refresh().catch(() => undefined);
|
|
556
|
+
}
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
async recoveryEvents(controllerId) {
|
|
560
|
+
await this.get(controllerId);
|
|
561
|
+
return this.dataSource.manager.find(virtual_thermostat_entity_1.VirtualThermostatRecoveryEntity, {
|
|
562
|
+
where: { controllerId },
|
|
563
|
+
order: { createdAt: 'DESC' },
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
async command(updates) {
|
|
567
|
+
return controller_publication_context_1.ControllerPublicationContext.complete(async () => {
|
|
568
|
+
const own = (0, creation_capture_1.captureCreation)(this, [
|
|
569
|
+
'command',
|
|
570
|
+
'dataSource',
|
|
571
|
+
'structureLock',
|
|
572
|
+
'graph',
|
|
573
|
+
'claims',
|
|
574
|
+
'events',
|
|
575
|
+
'values',
|
|
576
|
+
]);
|
|
577
|
+
const lock = (0, creation_capture_1.captureCreation)(this.structureLock, [
|
|
578
|
+
'runExclusive',
|
|
579
|
+
'runShared',
|
|
580
|
+
'hasCurrentStructuralLease',
|
|
581
|
+
'context',
|
|
582
|
+
]);
|
|
583
|
+
const graph = (0, creation_capture_1.captureCreation)(this.graph, [
|
|
584
|
+
'withComfortSelectionWrite',
|
|
585
|
+
'sealControllerLedger',
|
|
586
|
+
'structuralWrite',
|
|
587
|
+
'refreshValidation',
|
|
588
|
+
'dataSource',
|
|
589
|
+
'revision',
|
|
590
|
+
]);
|
|
591
|
+
const claims = (0, creation_capture_1.captureCreation)(this.claims, ['invalidate', 'refresh']);
|
|
592
|
+
const values = (0, creation_capture_1.captureCreation)(this.values, ['write', 'readLatest']);
|
|
593
|
+
const events = (0, creation_capture_1.captureCreation)(this.events, ['emit']);
|
|
594
|
+
const helper = (0, creation_capture_1.captureCreation)(thermostat_comfort_selection_1.thermostatComfortSelection, ['pin']);
|
|
595
|
+
const valueSet = devices_constants_1.EventType.CHANNEL_PROPERTY_VALUE_SET, configChanged = exports.THERMOSTAT_CONFIG_CHANGED;
|
|
596
|
+
const selection = helper.values.pin(this.dataSource, 'registered-settings');
|
|
597
|
+
const { input, destinations } = selection.registeredInput(updates);
|
|
598
|
+
if (input === null)
|
|
599
|
+
return true;
|
|
600
|
+
if (this.native && (await this.native.ownsController(input.id)))
|
|
601
|
+
return this.native.commandSettings(input.commands);
|
|
602
|
+
const pins = [own, lock, graph, claims, values, events, helper, selection];
|
|
603
|
+
const current = () => pins.every((pin) => pin.current());
|
|
604
|
+
const check = () => {
|
|
605
|
+
if (!current())
|
|
606
|
+
fail('Original thermostat settings dispatch expired.');
|
|
607
|
+
};
|
|
608
|
+
check();
|
|
609
|
+
let ownerCurrent = () => false;
|
|
610
|
+
const operation = selection.operation(input, () => ownerCurrent(), current, true);
|
|
611
|
+
const noop = virtual_thermostat_ownership_subscriber_1.VirtualThermostatOwnershipSubscriber.captureNoopFence(this.dataSource, () => ownerCurrent());
|
|
612
|
+
try {
|
|
613
|
+
const predecessors = this.automation?.beginMutation(input.id);
|
|
614
|
+
if (predecessors !== undefined)
|
|
615
|
+
await predecessors;
|
|
616
|
+
await lock.values.runExclusive.call(lock.receiver, controller_publication_context_1.ControllerPublicationContext.captureCallback(async () => {
|
|
617
|
+
check();
|
|
618
|
+
ownerCurrent = node_async_hooks_1.AsyncLocalStorage.bind(() => lock.values.hasCurrentStructuralLease.call(lock.receiver));
|
|
619
|
+
try {
|
|
620
|
+
const write = async (manager, advanceGraph) => {
|
|
621
|
+
const slot = await this.automation?.captureManualSlot(manager, input.id);
|
|
622
|
+
const owned = await this.automation?.captureInstalledIntent(manager, input.id);
|
|
623
|
+
const before = await (0, thermostat_controller_mutation_1.readControllerMutationImage)(manager, input.id);
|
|
624
|
+
const result = await operation.write(manager, owned ?? undefined, {
|
|
625
|
+
advanceGraph,
|
|
626
|
+
canRemainUnchanged: (takeover) => !slot?.facts ||
|
|
627
|
+
(!['LIVE', 'PROVISIONAL'].includes(slot.facts.state) && (!takeover || slot.facts.manualHold)),
|
|
628
|
+
verifyUnchanged: async () => {
|
|
629
|
+
await (0, thermostat_controller_mutation_1.assertControllerMutationImage)(manager, input.id, before);
|
|
630
|
+
await this.automation?.captureUnchangedAuthority(manager, input.id);
|
|
631
|
+
},
|
|
632
|
+
});
|
|
633
|
+
if (this.automation && operation.changed()) {
|
|
634
|
+
const takeover = operation.takesManualHold();
|
|
635
|
+
await this.automation.manualFence(manager, input.id, takeover ? true : undefined, slot, takeover);
|
|
636
|
+
}
|
|
637
|
+
await graph.values.sealControllerLedger.call(graph.receiver, manager);
|
|
638
|
+
if (operation.changed())
|
|
639
|
+
noop.applied();
|
|
640
|
+
else
|
|
641
|
+
noop.arm();
|
|
642
|
+
operation.markReady();
|
|
643
|
+
return result;
|
|
644
|
+
};
|
|
645
|
+
await graph.values.withComfortSelectionWrite.call(graph.receiver, write, undefined, (manager) => {
|
|
646
|
+
operation.admit(manager);
|
|
647
|
+
noop.admit(manager);
|
|
648
|
+
}, operation.accepted, 'registered-settings', write, noop);
|
|
649
|
+
operation.accepted();
|
|
650
|
+
}
|
|
651
|
+
catch (cause) {
|
|
652
|
+
operation.settlement.transactionFailure = Object.freeze({ cause });
|
|
653
|
+
throw cause;
|
|
654
|
+
}
|
|
655
|
+
const publication = new controller_publication_context_1.ControllerPublicationContext(this.graph.capturePublishGuard());
|
|
656
|
+
return publication.run(async () => {
|
|
657
|
+
let stage = 'claims.invalidate';
|
|
658
|
+
let index;
|
|
659
|
+
try {
|
|
660
|
+
claims.values.invalidate.call(claims.receiver);
|
|
661
|
+
stage = 'claims.refresh';
|
|
662
|
+
await claims.values.refresh.call(claims.receiver);
|
|
663
|
+
for (index = 0; index < destinations.length; index++) {
|
|
664
|
+
const property = destinations[index], value = input.commands[index].value;
|
|
665
|
+
stage = 'values.write';
|
|
666
|
+
await (0, creation_capture_1.invokeCreation)(values.values.write, values.receiver, property, value);
|
|
667
|
+
stage = 'values.readLatest';
|
|
668
|
+
const latest = await (0, creation_capture_1.invokeCreation)(values.values.readLatest, values.receiver, property);
|
|
669
|
+
stage = 'property.value';
|
|
670
|
+
property.value = latest;
|
|
671
|
+
stage = 'VALUE_SET';
|
|
672
|
+
events.values.emit.call(events.receiver, valueSet, property);
|
|
673
|
+
}
|
|
674
|
+
index = undefined;
|
|
675
|
+
stage = 'configChanged';
|
|
676
|
+
events.values.emit.call(events.receiver, configChanged, input.id);
|
|
677
|
+
return true;
|
|
678
|
+
}
|
|
679
|
+
catch (cause) {
|
|
680
|
+
operation.settlement.maintenanceFailure = Object.freeze({ stage, index, cause });
|
|
681
|
+
throw cause;
|
|
682
|
+
}
|
|
683
|
+
});
|
|
684
|
+
}));
|
|
685
|
+
return true;
|
|
686
|
+
}
|
|
687
|
+
catch (cause) {
|
|
688
|
+
operation.settlement.structuralFailure = Object.freeze({ cause });
|
|
689
|
+
throw cause;
|
|
690
|
+
}
|
|
691
|
+
finally {
|
|
692
|
+
noop.close();
|
|
693
|
+
}
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
async isRegisteredSetting(property, manager = this.dataSource.manager) {
|
|
697
|
+
if (await this.native?.isRegisteredSetting(property, manager))
|
|
698
|
+
return true;
|
|
699
|
+
const setting = await manager.findOneBy(virtual_thermostat_entity_1.VirtualThermostatSettingEntity, { propertyId: property.id });
|
|
700
|
+
if (!setting)
|
|
701
|
+
return false;
|
|
702
|
+
const target = await this.property(manager, property.id);
|
|
703
|
+
return (property.valueOrigin === devices_virtual_entity_1.VirtualValueOrigin.LOCAL &&
|
|
704
|
+
!property.sourcePropertyId &&
|
|
705
|
+
setting.contractFingerprint === (0, virtual_thermostat_contract_utils_1.thermostatPropertyContract)(property, target.channel, target.device));
|
|
706
|
+
}
|
|
707
|
+
async property(manager, id, previewOnly = false) {
|
|
708
|
+
const property = previewOnly
|
|
709
|
+
? await manager
|
|
710
|
+
.createQueryBuilder(devices_entity_1.ChannelPropertyEntity, 'property')
|
|
711
|
+
.leftJoinAndSelect('property.channel', 'channel')
|
|
712
|
+
.leftJoinAndSelect('channel.device', 'device')
|
|
713
|
+
.where('property.id = :id', { id })
|
|
714
|
+
.callListeners(false)
|
|
715
|
+
.getOne()
|
|
716
|
+
: await manager.findOne(devices_entity_1.ChannelPropertyEntity, {
|
|
717
|
+
where: { id },
|
|
718
|
+
relations: ['channel', 'channel.device'],
|
|
719
|
+
});
|
|
720
|
+
if (!property)
|
|
721
|
+
fail('Thermostat source or setting property does not exist.');
|
|
722
|
+
const channel = property.channel;
|
|
723
|
+
return { property, channel, device: channel.device };
|
|
724
|
+
}
|
|
725
|
+
validatePolicy(policy, mode) {
|
|
726
|
+
const errors = (0, virtual_thermostat_policy_utils_1.validateVirtualThermostatPolicy)(policy);
|
|
727
|
+
if (errors.length ||
|
|
728
|
+
!['off', 'heat', 'cool', 'auto'].includes(mode) ||
|
|
729
|
+
((mode === 'heat' || mode === 'auto') && policy.heatingSetpoint === null) ||
|
|
730
|
+
((mode === 'cool' || mode === 'auto') && policy.coolingSetpoint === null))
|
|
731
|
+
fail(`Invalid thermostat mode/policy: ${errors.join(', ')}.`);
|
|
732
|
+
}
|
|
733
|
+
async validate(manager, controllerId, dto, draft) {
|
|
734
|
+
const owner = draft ?? (await manager.findOneBy(devices_virtual_entity_1.VirtualDeviceEntity, { id: controllerId }));
|
|
735
|
+
if (!owner || owner.mode !== devices_virtual_entity_1.VirtualDeviceMode.CLIMATE_CONTROLLER || owner.category !== devices_constants_1.DeviceCategory.THERMOSTAT)
|
|
736
|
+
fail('Thermostat configuration requires a climate-controller thermostat device.');
|
|
737
|
+
const previous = await manager.findOneBy(virtual_thermostat_entity_1.VirtualThermostatConfigEntity, { controllerId });
|
|
738
|
+
if (!previous &&
|
|
739
|
+
this.dataSource.hasMetadata(native_thermostat_entity_1.NativeThermostatEntity) &&
|
|
740
|
+
(await manager.existsBy(native_thermostat_entity_1.NativeThermostatEntity, { controllerId })))
|
|
741
|
+
fail('Guarded branches and native units are mutually exclusive.');
|
|
742
|
+
if (dto.schemaVersion !== 1 || dto.expectedRevision !== (previous?.revision ?? 0))
|
|
743
|
+
fail('Thermostat configuration revision changed.');
|
|
744
|
+
if (dto.controlStrategy !== undefined && dto.controlStrategy !== 'guarded_branches')
|
|
745
|
+
fail('Use the native thermostat API to configure the native_unit strategy.');
|
|
746
|
+
this.validatePolicy(dto.policy, dto.requestedMode);
|
|
747
|
+
const comfort = dto.comfort
|
|
748
|
+
? {
|
|
749
|
+
...dto.comfort,
|
|
750
|
+
selected_preset: previous?.comfort?.selected_preset ?? null,
|
|
751
|
+
user_off: dto.requestedMode === 'off',
|
|
752
|
+
automation_enabled: dto.comfort.automation_enabled ?? previous?.comfort?.automation_enabled ?? false,
|
|
753
|
+
automation_baseline: dto.comfort.automation_enabled === false ? null : (previous?.comfort?.automation_baseline ?? null),
|
|
754
|
+
temporary_override: previous?.comfort?.temporary_override ?? null,
|
|
755
|
+
}
|
|
756
|
+
: previous?.comfort
|
|
757
|
+
? { ...previous.comfort, user_off: dto.requestedMode === 'off' }
|
|
758
|
+
: null;
|
|
759
|
+
if (comfort) {
|
|
760
|
+
const errors = (0, virtual_thermostat_comfort_utils_1.validateThermostatComfort)(comfort, dto.policy);
|
|
761
|
+
if (errors.length)
|
|
762
|
+
fail(`Reconfigure comfort before changing branches/ranges: ${errors.join(', ')}`);
|
|
763
|
+
}
|
|
764
|
+
if (dto.heuristic && !(0, virtual_window_trend_utils_1.validateVirtualWindowTrendPolicy)(dto.heuristic))
|
|
765
|
+
fail('Invalid independent window trend policy.');
|
|
766
|
+
if (![dto.contactOpeningMs, dto.contactClosingMs].every((value) => Number.isSafeInteger(value) && value >= 0 && value <= 86400000))
|
|
767
|
+
fail('Invalid contact debounce policy.');
|
|
768
|
+
const heatingInputs = Array.isArray(dto.actuators)
|
|
769
|
+
? dto.actuators.filter((member) => member.role === 'heating')
|
|
770
|
+
: [];
|
|
771
|
+
if (!Array.isArray(dto.sources) ||
|
|
772
|
+
dto.sources.length > 18 ||
|
|
773
|
+
dto.sources.filter((source) => source.role === 'ambient').length !== 1 ||
|
|
774
|
+
dto.sources.filter((source) => source.role === 'floor').length > (dto.policy.floor ? 1 : 0) ||
|
|
775
|
+
(dto.policy.floor &&
|
|
776
|
+
!dto.sources.some((source) => source.role === 'floor') &&
|
|
777
|
+
!(heatingInputs.length > 0 && heatingInputs.every((member) => !!member.protection))))
|
|
778
|
+
fail('One ambient and one independently configured floor source are required for their enabled roles.');
|
|
779
|
+
const oldSources = await manager.findBy(virtual_thermostat_entity_1.VirtualThermostatSourceEntity, { controllerId });
|
|
780
|
+
const sources = [];
|
|
781
|
+
for (const input of dto.sources) {
|
|
782
|
+
if (!['ambient', 'floor', 'contact'].includes(input.role) ||
|
|
783
|
+
!Number.isInteger(input.maximumAgeSeconds) ||
|
|
784
|
+
input.maximumAgeSeconds < 1 ||
|
|
785
|
+
input.maximumAgeSeconds > 86400)
|
|
786
|
+
fail('Invalid thermostat source role or freshness bound.');
|
|
787
|
+
const old = input.id ? oldSources.find((row) => row.id === input.id && row.role === input.role) : null;
|
|
788
|
+
if (input.id && !old)
|
|
789
|
+
fail('Source binding identity is not owned by this role/controller.');
|
|
790
|
+
if (!input.sourcePropertyId) {
|
|
791
|
+
if (!old || old.sourcePropertyId !== null)
|
|
792
|
+
fail('Only an existing missing source may retain a null binding.');
|
|
793
|
+
sources.push(manager.create(virtual_thermostat_entity_1.VirtualThermostatSourceEntity, { ...old, maximumAgeSeconds: input.maximumAgeSeconds }));
|
|
794
|
+
continue;
|
|
795
|
+
}
|
|
796
|
+
const target = await this.property(manager, input.sourcePropertyId, !!draft);
|
|
797
|
+
if (input.role === 'contact') {
|
|
798
|
+
const primitive = (value) => ['string', 'number', 'boolean'].includes(typeof value) &&
|
|
799
|
+
(typeof value !== 'number' || Number.isFinite(value));
|
|
800
|
+
if (target.device.type === 'virtual' ||
|
|
801
|
+
target.channel.category !== devices_constants_1.ChannelCategory.CONTACT ||
|
|
802
|
+
target.property.category !== devices_constants_1.PropertyCategory.DETECTED ||
|
|
803
|
+
!(0, property_permissions_utils_1.permissionSatisfied)(devices_constants_1.PermissionType.READ_ONLY, new Set(target.property.permissions)) ||
|
|
804
|
+
!primitive(input.openValue) ||
|
|
805
|
+
!primitive(input.closedValue) ||
|
|
806
|
+
input.openValue === input.closedValue)
|
|
807
|
+
fail('Contacts require physical readable detected properties and distinct explicit open/closed mappings.');
|
|
808
|
+
}
|
|
809
|
+
else if (!(0, virtual_thermostat_contract_utils_1.isThermostatTemperature)(target.property, target.channel) ||
|
|
810
|
+
(target.device.type === 'virtual' &&
|
|
811
|
+
!(0, virtual_source_eligibility_utils_1.isEligibleVirtualTransformedTemperature)(target.property, target.channel, target.device) &&
|
|
812
|
+
(input.role !== 'ambient' || !(0, virtual_source_eligibility_utils_1.isEligibleVirtualMeasurement)(target.property, target.channel, target.device))))
|
|
813
|
+
fail('Temperature roles require readable Celsius physical inputs or a materialized ambient producer.');
|
|
814
|
+
let physicalIdentity = target.device.type === 'virtual' ? null : `property:${target.property.id}`;
|
|
815
|
+
let contractFingerprint = (0, virtual_thermostat_contract_utils_1.thermostatPropertyContract)(target.property, target.channel, target.device);
|
|
816
|
+
if (target.device.mode === devices_virtual_entity_1.VirtualDeviceMode.SENSOR_TRANSFORM) {
|
|
817
|
+
const transform = await manager.findOneBy(virtual_transform_entity_1.VirtualTransformConfigEntity, {
|
|
818
|
+
outputPropertyId: target.property.id,
|
|
819
|
+
});
|
|
820
|
+
const binding = await manager.findOneBy(virtual_transform_entity_1.VirtualTransformSourceEntity, { outputPropertyId: target.property.id });
|
|
821
|
+
const physical = binding?.sourcePropertyId
|
|
822
|
+
? (await this.property(manager, binding.sourcePropertyId, !!draft)).property
|
|
823
|
+
: null;
|
|
824
|
+
if (!transform ||
|
|
825
|
+
(input.role === 'floor' && transform.policy?.operator === virtual_numeric_transform_utils_1.VirtualNumericTransformOperator.EXTENSION) ||
|
|
826
|
+
!binding ||
|
|
827
|
+
transform.quantity !== String(devices_constants_1.PropertyCategory.TEMPERATURE) ||
|
|
828
|
+
transform.unit !== '°C' ||
|
|
829
|
+
(0, virtual_transform_contract_utils_1.transformContractErrors)(transform, target.property, physical, binding, this.resolver).length)
|
|
830
|
+
fail('Transformed thermostat temperatures require a configured Celsius single-physical-input producer contract.');
|
|
831
|
+
physicalIdentity = `property:${binding.sourcePropertyIdentity}`;
|
|
832
|
+
contractFingerprint = (0, virtual_thermostat_contract_utils_1.thermostatFingerprint)({
|
|
833
|
+
output: contractFingerprint,
|
|
834
|
+
transformRevision: transform.revision,
|
|
835
|
+
transformPolicy: transform.policy,
|
|
836
|
+
physicalIdentity,
|
|
837
|
+
sourceQuantity: binding.quantity,
|
|
838
|
+
sourceUnit: binding.unit,
|
|
839
|
+
});
|
|
840
|
+
}
|
|
841
|
+
sources.push(manager.create(virtual_thermostat_entity_1.VirtualThermostatSourceEntity, {
|
|
842
|
+
id: old?.id ?? (0, uuid_1.v4)(),
|
|
843
|
+
controllerId,
|
|
844
|
+
role: input.role,
|
|
845
|
+
sourcePropertyId: target.property.id,
|
|
846
|
+
sourcePropertyIdentity: target.property.id,
|
|
847
|
+
physicalIdentity,
|
|
848
|
+
contractFingerprint,
|
|
849
|
+
maximumAgeSeconds: input.maximumAgeSeconds,
|
|
850
|
+
openValue: input.openValue ?? null,
|
|
851
|
+
closedValue: input.closedValue ?? null,
|
|
852
|
+
}));
|
|
853
|
+
}
|
|
854
|
+
if (new Set(sources.map((source) => source.role + ':' + source.sourcePropertyIdentity)).size !== sources.length)
|
|
855
|
+
fail('Duplicate source binding.');
|
|
856
|
+
if (!Array.isArray(dto.actuators) ||
|
|
857
|
+
dto.actuators.length < 1 ||
|
|
858
|
+
dto.actuators.length > thermostat_actuation_contract_1.MAX_THERMOSTAT_ACTUATOR_MEMBERS ||
|
|
859
|
+
dto.actuators.some((actuator) => !['heating', 'cooling'].includes(actuator.role)) ||
|
|
860
|
+
!!dto.actuators.find((actuator) => actuator.role === 'heating') !== (dto.policy.heatingSetpoint !== null) ||
|
|
861
|
+
!!dto.actuators.find((actuator) => actuator.role === 'cooling') !== (dto.policy.coolingSetpoint !== null))
|
|
862
|
+
fail('Physical actuator branches must match configured comfort setpoints.');
|
|
863
|
+
const oldClaims = await manager.findBy(virtual_thermostat_entity_1.VirtualThermostatActuatorClaimEntity, {
|
|
864
|
+
controllerId,
|
|
865
|
+
state: (0, typeorm_1.Not)('released'),
|
|
866
|
+
});
|
|
867
|
+
const actuators = [];
|
|
868
|
+
for (const input of dto.actuators) {
|
|
869
|
+
const old = oldClaims.find((claim) => claim.role === input.role && claim.sourcePropertyIdentity === input.sourcePropertyId);
|
|
870
|
+
if (old && old.sourcePropertyId !== input.sourcePropertyId)
|
|
871
|
+
fail('Request and prove release before actuator repair, remap or detach.');
|
|
872
|
+
const target = await this.property(manager, input.sourcePropertyId, !!draft);
|
|
873
|
+
const identity = (0, virtual_thermostat_contract_utils_1.thermostatActuatorIdentity)(target.property, target.channel, target.device);
|
|
874
|
+
if (!identity ||
|
|
875
|
+
!(target.channel instanceof devices_shelly_ng_entity_1.ShellyNgChannelEntity) ||
|
|
876
|
+
!(target.property instanceof devices_shelly_ng_entity_1.ShellyNgChannelPropertyEntity) ||
|
|
877
|
+
target.property.identifier !== 'output' ||
|
|
878
|
+
!Number.isFinite(input.leaseSeconds) ||
|
|
879
|
+
input.leaseSeconds <= 0)
|
|
880
|
+
fail('Actuator requires a supported physical guarded boolean leaf and explicit finite ON lease.');
|
|
881
|
+
const fingerprint = (0, virtual_thermostat_contract_utils_1.thermostatPropertyContract)(target.property, target.channel, target.device);
|
|
882
|
+
if (old && (old.physicalIdentity !== identity || old.contractFingerprint !== fingerprint))
|
|
883
|
+
fail('Actuator identity/contract changed; explicit release and repair required.');
|
|
884
|
+
const conflict = await manager.findOneBy(virtual_thermostat_entity_1.VirtualThermostatActuatorClaimEntity, {
|
|
885
|
+
physicalIdentity: identity,
|
|
886
|
+
state: (0, typeorm_1.Not)('released'),
|
|
887
|
+
});
|
|
888
|
+
if (conflict && conflict.id !== old?.id)
|
|
889
|
+
fail('Canonical physical actuator is already reserved; qualified release is required before repair or remap.');
|
|
890
|
+
actuators.push(manager.create(virtual_thermostat_entity_1.VirtualThermostatActuatorClaimEntity, {
|
|
891
|
+
id: old?.id ?? (0, uuid_1.v4)(),
|
|
892
|
+
controllerId,
|
|
893
|
+
role: input.role,
|
|
894
|
+
physicalIdentity: identity,
|
|
895
|
+
providerProfile: input.role === 'cooling' && dto.policy.cooling
|
|
896
|
+
? remote_dew_point_lease_contract_1.REMOTE_DEW_POINT_PROFILE
|
|
897
|
+
: (old?.providerProfile ?? thermostat_actuation_contract_1.SHELLY_GUARDED_PROFILE),
|
|
898
|
+
providerProfileVersion: old?.providerProfileVersion ?? thermostat_actuation_contract_1.SHELLY_GUARDED_PROFILE_VERSION,
|
|
899
|
+
sourcePropertyId: target.property.id,
|
|
900
|
+
sourcePropertyIdentity: target.property.id,
|
|
901
|
+
sourceDeviceId: target.device.id,
|
|
902
|
+
sourceDeviceIdentity: target.device.id,
|
|
903
|
+
contractFingerprint: fingerprint,
|
|
904
|
+
revision: (old?.revision ?? 0) + 1,
|
|
905
|
+
qualificationGeneration: old?.qualificationGeneration ?? null,
|
|
906
|
+
state: old?.state ?? 'reserved',
|
|
907
|
+
leaseSeconds: input.leaseSeconds,
|
|
908
|
+
reason: old?.reason ?? null,
|
|
909
|
+
releaseRequestedAt: old?.releaseRequestedAt ?? null,
|
|
910
|
+
releasedAt: null,
|
|
911
|
+
releaseEvidence: null,
|
|
912
|
+
}));
|
|
913
|
+
}
|
|
914
|
+
if (oldClaims.some((old) => !actuators.some((claim) => claim.id === old.id)))
|
|
915
|
+
fail('Unresolved actuator reservation cannot be detached.');
|
|
916
|
+
if (new Set(actuators.map((claim) => claim.physicalIdentity)).size !== actuators.length)
|
|
917
|
+
fail('Branch members cannot own the same physical actuator more than once.');
|
|
918
|
+
const coolingDependencies = [];
|
|
919
|
+
for (const claim of actuators) {
|
|
920
|
+
const input = dto.actuators.find((member) => member.sourcePropertyId === claim.sourcePropertyIdentity);
|
|
921
|
+
if (input.coolingProtection || (dto.policy.cooling && claim.role === 'cooling')) {
|
|
922
|
+
if (!dto.policy.cooling)
|
|
923
|
+
fail('Cooling dependency requires the separate cooling policy.');
|
|
924
|
+
const dependency = await this.coolingDependencies().prepare(manager, claim, input.coolingProtection);
|
|
925
|
+
if (sources.some((source) => source.role === 'ambient' &&
|
|
926
|
+
(source.sourcePropertyId === dependency.surfacePropertyId ||
|
|
927
|
+
source.physicalIdentity === `property:${dependency.physicalSurfaceIdentity}`)))
|
|
928
|
+
fail('Ambient temperature cannot substitute for a cooled-surface probe.');
|
|
929
|
+
coolingDependencies.push(dependency);
|
|
930
|
+
claim.qualificationGeneration = (0, uuid_1.v4)();
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
const protections = [];
|
|
934
|
+
const heating = actuators.filter((claim) => claim.role === 'heating');
|
|
935
|
+
for (const claim of actuators) {
|
|
936
|
+
const input = dto.actuators.find((member) => member.sourcePropertyId === claim.sourcePropertyIdentity);
|
|
937
|
+
const old = await manager.findOneBy(thermostat_member_protection_entity_1.ThermostatMemberProtectionEntity, { claimId: claim.id });
|
|
938
|
+
if (input.protection === undefined) {
|
|
939
|
+
if (old || (claim.role === 'heating' && heating.length > 1))
|
|
940
|
+
fail('Every parallel or previously explicit heating member requires an explicit retained protection binding.');
|
|
941
|
+
continue;
|
|
942
|
+
}
|
|
943
|
+
const protection = input.protection;
|
|
944
|
+
if (!protection ||
|
|
945
|
+
claim.role !== 'heating' ||
|
|
946
|
+
protection.schemaVersion !== 1 ||
|
|
947
|
+
protection.kind !== 'local_floor' ||
|
|
948
|
+
!dto.policy.floor ||
|
|
949
|
+
!Number.isInteger(protection.maximumAgeSeconds) ||
|
|
950
|
+
protection.maximumAgeSeconds < 1 ||
|
|
951
|
+
protection.maximumAgeSeconds > 86400)
|
|
952
|
+
fail('Invalid explicit local floor protection.');
|
|
953
|
+
if (!protection.sourcePropertyId) {
|
|
954
|
+
if (!old || old.sourcePropertyId !== null)
|
|
955
|
+
fail('Null cannot remove protection; only retain an already missing source.');
|
|
956
|
+
protections.push(manager.create(thermostat_member_protection_entity_1.ThermostatMemberProtectionEntity, {
|
|
957
|
+
...old,
|
|
958
|
+
revision: old.revision + 1,
|
|
959
|
+
maximumAgeSeconds: protection.maximumAgeSeconds,
|
|
960
|
+
}));
|
|
961
|
+
}
|
|
962
|
+
else {
|
|
963
|
+
const source = await (0, thermostat_protection_source_utils_1.resolveThermostatProtectionSource)(manager, protection.sourcePropertyId, claim.physicalIdentity);
|
|
964
|
+
protections.push(manager.create(thermostat_member_protection_entity_1.ThermostatMemberProtectionEntity, {
|
|
965
|
+
claimId: claim.id,
|
|
966
|
+
schemaVersion: 1,
|
|
967
|
+
kind: 'local_floor',
|
|
968
|
+
revision: (old?.revision ?? 0) + 1,
|
|
969
|
+
sourcePropertyId: source.property.id,
|
|
970
|
+
sourcePropertyIdentity: source.property.id,
|
|
971
|
+
physicalPropertyIdentity: source.leaf.id,
|
|
972
|
+
contractFingerprint: source.fingerprint,
|
|
973
|
+
maximumAgeSeconds: protection.maximumAgeSeconds,
|
|
974
|
+
}));
|
|
975
|
+
}
|
|
976
|
+
claim.qualificationGeneration = (0, uuid_1.v4)();
|
|
977
|
+
}
|
|
978
|
+
if (dto.displayFloorClaimId && !protections.some((row) => row.claimId === dto.displayFloorClaimId))
|
|
979
|
+
fail('Display floor must select an explicitly protected active member.');
|
|
980
|
+
const otherConsumers = await manager
|
|
981
|
+
.createQueryBuilder(thermostat_member_protection_entity_1.ThermostatMemberProtectionEntity, 'protection')
|
|
982
|
+
.innerJoin('protection.claim', 'claim')
|
|
983
|
+
.where('claim.controllerId <> :controllerId AND claim.state <> :released', { controllerId, released: 'released' })
|
|
984
|
+
.getMany();
|
|
985
|
+
(0, thermostat_protection_source_utils_1.validateProtectionConsumerIndex)([...otherConsumers, ...protections]);
|
|
986
|
+
this.graph.validate(await this.graph.edges(manager));
|
|
987
|
+
if (!Array.isArray(dto.settings) ||
|
|
988
|
+
dto.settings.length > 5 ||
|
|
989
|
+
new Set(dto.settings.map((input) => input.setting)).size !== dto.settings.length ||
|
|
990
|
+
new Set(dto.settings.map((input) => input.propertyId)).size !== dto.settings.length)
|
|
991
|
+
fail('Invalid or duplicate local setting registration.');
|
|
992
|
+
const settings = [];
|
|
993
|
+
for (const input of dto.settings) {
|
|
994
|
+
const draftProperty = draft?.channels
|
|
995
|
+
?.flatMap((channel) => channel.properties ?? [])
|
|
996
|
+
.find((property) => property.id === input.propertyId);
|
|
997
|
+
const target = draftProperty
|
|
998
|
+
? { property: draftProperty, channel: draftProperty.channel, device: draft }
|
|
999
|
+
: await this.property(manager, input.propertyId);
|
|
1000
|
+
const expected = this.settingContract(input.setting);
|
|
1001
|
+
const property = target.property;
|
|
1002
|
+
if (target.device.id !== controllerId ||
|
|
1003
|
+
property.valueOrigin !== devices_virtual_entity_1.VirtualValueOrigin.LOCAL ||
|
|
1004
|
+
property.sourcePropertyId ||
|
|
1005
|
+
!expected ||
|
|
1006
|
+
target.channel.category !== expected.channel ||
|
|
1007
|
+
property.category !== expected.property ||
|
|
1008
|
+
(expected.numeric
|
|
1009
|
+
? ![devices_constants_1.DataTypeType.FLOAT, devices_constants_1.DataTypeType.INT].includes(property.dataType)
|
|
1010
|
+
: property.dataType !== devices_constants_1.DataTypeType.BOOL) ||
|
|
1011
|
+
!property.permissions.some((permission) => [devices_constants_1.PermissionType.READ_ONLY, devices_constants_1.PermissionType.READ_WRITE].includes(permission)) ||
|
|
1012
|
+
(input.setting.startsWith('heating') && dto.policy.heatingSetpoint === null) ||
|
|
1013
|
+
(input.setting.startsWith('cooling') && dto.policy.coolingSetpoint === null))
|
|
1014
|
+
fail('Setting must be an owned writable property matching its thermostat role.');
|
|
1015
|
+
property.permissions = [devices_constants_1.PermissionType.READ_WRITE];
|
|
1016
|
+
settings.push(manager.create(virtual_thermostat_entity_1.VirtualThermostatSettingEntity, {
|
|
1017
|
+
propertyId: input.propertyId,
|
|
1018
|
+
controllerId,
|
|
1019
|
+
setting: input.setting,
|
|
1020
|
+
contractFingerprint: (0, virtual_thermostat_contract_utils_1.thermostatPropertyContract)(property, target.channel, target.device),
|
|
1021
|
+
}));
|
|
1022
|
+
}
|
|
1023
|
+
const config = manager.create(virtual_thermostat_entity_1.VirtualThermostatConfigEntity, {
|
|
1024
|
+
controlStrategy: 'guarded_branches',
|
|
1025
|
+
displayFloorClaimId: dto.displayFloorClaimId ?? null,
|
|
1026
|
+
controllerId,
|
|
1027
|
+
ownerDeviceId: controllerId,
|
|
1028
|
+
schemaVersion: 1,
|
|
1029
|
+
revision: (previous?.revision ?? 0) + 1,
|
|
1030
|
+
requestedMode: dto.requestedMode,
|
|
1031
|
+
comfort,
|
|
1032
|
+
locked: previous?.locked ?? false,
|
|
1033
|
+
policy: { ...dto.policy, floor: dto.policy.floor ?? null },
|
|
1034
|
+
heuristic: dto.heuristic ?? null,
|
|
1035
|
+
contactOpeningMs: dto.contactOpeningMs,
|
|
1036
|
+
contactClosingMs: dto.contactClosingMs,
|
|
1037
|
+
configuredAt: new Date(),
|
|
1038
|
+
releaseRequestedAt: previous?.releaseRequestedAt ?? null,
|
|
1039
|
+
});
|
|
1040
|
+
return { config, sources, actuators, settings, protections, coolingDependencies };
|
|
1041
|
+
}
|
|
1042
|
+
settingContract(setting) {
|
|
1043
|
+
if (setting === 'locked')
|
|
1044
|
+
return { channel: devices_constants_1.ChannelCategory.THERMOSTAT, property: devices_constants_1.PropertyCategory.LOCKED, numeric: false };
|
|
1045
|
+
if (!['heating_setpoint', 'cooling_setpoint', 'heating_enabled', 'cooling_enabled'].includes(setting))
|
|
1046
|
+
return null;
|
|
1047
|
+
return {
|
|
1048
|
+
channel: setting.startsWith('heating') ? devices_constants_1.ChannelCategory.HEATER : devices_constants_1.ChannelCategory.COOLER,
|
|
1049
|
+
property: setting.endsWith('setpoint') ? devices_constants_1.PropertyCategory.TEMPERATURE : devices_constants_1.PropertyCategory.ON,
|
|
1050
|
+
numeric: setting.endsWith('setpoint'),
|
|
1051
|
+
};
|
|
1052
|
+
}
|
|
1053
|
+
async model(config, sources, actuators, settings, manager, preparedProtections, preparedCoolingDependencies) {
|
|
1054
|
+
const protections = preparedProtections ?? (await (manager ?? this.dataSource.manager).find(thermostat_member_protection_entity_1.ThermostatMemberProtectionEntity));
|
|
1055
|
+
const coolingDependencies = preparedCoolingDependencies ??
|
|
1056
|
+
(this.dataSource.hasMetadata?.(thermostat_cooling_dependency_entity_1.ThermostatCoolingDependencyEntity)
|
|
1057
|
+
? await (manager ?? this.dataSource.manager).find(thermostat_cooling_dependency_entity_1.ThermostatCoolingDependencyEntity)
|
|
1058
|
+
: []);
|
|
1059
|
+
const coolingService = this.coolingDependencies();
|
|
1060
|
+
const coolingDiagnostics = this.dataSource.hasMetadata?.(thermostat_cooling_dependency_entity_1.ThermostatCoolingDependencyEntity)
|
|
1061
|
+
? coolingService.read(await coolingService.load(config, actuators, coolingDependencies), Date.now())
|
|
1062
|
+
: [];
|
|
1063
|
+
const reasons = ['controller_runtime_unavailable'];
|
|
1064
|
+
if (config.policy.cooling &&
|
|
1065
|
+
coolingDiagnostics.some((d) => d.reasons.includes('cooling_remote_profile_installation_unqualified')))
|
|
1066
|
+
reasons.push('cooling_remote_profile_installation_unqualified');
|
|
1067
|
+
for (const claim of actuators) {
|
|
1068
|
+
if (!claim.sourcePropertyId || !claim.sourceDeviceId)
|
|
1069
|
+
reasons.push(claim.role + '_actuator_missing');
|
|
1070
|
+
if (!this.claims.qualification(claim, (0, thermostat_actuation_contract_1.thermostatHasOpposedBranches)(actuators)))
|
|
1071
|
+
reasons.push(claim.role + '_hardware_qualification_missing');
|
|
1072
|
+
if (claim.state !== 'reserved')
|
|
1073
|
+
reasons.push(claim.role + '_' + claim.state);
|
|
1074
|
+
}
|
|
1075
|
+
for (const source of sources)
|
|
1076
|
+
if (!source.sourcePropertyId)
|
|
1077
|
+
reasons.push(source.role + '_source_missing');
|
|
1078
|
+
const modelClaim = (claim) => ({
|
|
1079
|
+
cooling_diagnostics: coolingDiagnostics.find((entry) => entry.claim === claim.id) ?? null,
|
|
1080
|
+
cooling_protection: coolingDependencies
|
|
1081
|
+
.filter((row) => row.claimId === claim.id)
|
|
1082
|
+
.map((row) => ({
|
|
1083
|
+
schema_version: row.schemaVersion,
|
|
1084
|
+
revision: row.revision,
|
|
1085
|
+
purpose: row.purpose,
|
|
1086
|
+
dew_point_property: row.dewPointPropertyId,
|
|
1087
|
+
dew_point_identity: row.dewPointIdentity,
|
|
1088
|
+
surface_property: row.surfacePropertyId,
|
|
1089
|
+
surface_identity: row.surfaceIdentity,
|
|
1090
|
+
maximum_age_seconds: row.maximumAgeSeconds,
|
|
1091
|
+
}))[0] ?? null,
|
|
1092
|
+
protection: protections
|
|
1093
|
+
.filter((row) => row.claimId === claim.id)
|
|
1094
|
+
.map((row) => ({
|
|
1095
|
+
schema_version: row.schemaVersion,
|
|
1096
|
+
kind: row.kind,
|
|
1097
|
+
revision: row.revision,
|
|
1098
|
+
source_property: row.sourcePropertyId,
|
|
1099
|
+
source_identity: row.sourcePropertyIdentity,
|
|
1100
|
+
physical_property: row.physicalPropertyIdentity,
|
|
1101
|
+
maximum_age_seconds: row.maximumAgeSeconds,
|
|
1102
|
+
}))[0] ?? null,
|
|
1103
|
+
id: claim.id,
|
|
1104
|
+
group_identity: (0, thermostat_actuation_contract_1.thermostatBranchGroupIdentity)(config.controllerId, claim.role),
|
|
1105
|
+
provider_profile: claim.providerProfile ?? thermostat_actuation_contract_1.SHELLY_GUARDED_PROFILE,
|
|
1106
|
+
provider_profile_version: claim.providerProfileVersion ?? thermostat_actuation_contract_1.SHELLY_GUARDED_PROFILE_VERSION,
|
|
1107
|
+
role: claim.role,
|
|
1108
|
+
source_property: claim.sourcePropertyId,
|
|
1109
|
+
source_identity: claim.sourcePropertyIdentity,
|
|
1110
|
+
physical_identity: claim.physicalIdentity,
|
|
1111
|
+
revision: claim.revision,
|
|
1112
|
+
qualification_generation: claim.qualificationGeneration,
|
|
1113
|
+
state: claim.state,
|
|
1114
|
+
lease_seconds: claim.leaseSeconds,
|
|
1115
|
+
reason: claim.reason,
|
|
1116
|
+
release_requested_at: claim.releaseRequestedAt?.toISOString() ?? null,
|
|
1117
|
+
released_at: claim.releasedAt?.toISOString() ?? null,
|
|
1118
|
+
release_evidence: claim.releaseEvidence,
|
|
1119
|
+
});
|
|
1120
|
+
return {
|
|
1121
|
+
display_floor_claim: config.displayFloorClaimId ?? null,
|
|
1122
|
+
controller: config.controllerId,
|
|
1123
|
+
schema_version: 1,
|
|
1124
|
+
control_strategy: config.controlStrategy ?? 'guarded_branches',
|
|
1125
|
+
revision: config.revision,
|
|
1126
|
+
graph_revision: await this.graph.revision(manager),
|
|
1127
|
+
requested_mode: config.requestedMode,
|
|
1128
|
+
locked: config.locked,
|
|
1129
|
+
policy: config.policy,
|
|
1130
|
+
heuristic: config.heuristic,
|
|
1131
|
+
contact_opening_ms: config.contactOpeningMs,
|
|
1132
|
+
contact_closing_ms: config.contactClosingMs,
|
|
1133
|
+
readiness: 'draft',
|
|
1134
|
+
reasons,
|
|
1135
|
+
sources: sources.map((source) => ({
|
|
1136
|
+
id: source.id,
|
|
1137
|
+
role: source.role,
|
|
1138
|
+
source_property: source.sourcePropertyId,
|
|
1139
|
+
source_identity: source.sourcePropertyIdentity,
|
|
1140
|
+
physical_identity: source.physicalIdentity,
|
|
1141
|
+
contract_fingerprint: source.contractFingerprint,
|
|
1142
|
+
maximum_age_seconds: source.maximumAgeSeconds,
|
|
1143
|
+
open_value: source.openValue,
|
|
1144
|
+
closed_value: source.closedValue,
|
|
1145
|
+
})),
|
|
1146
|
+
actuators: actuators.map(modelClaim),
|
|
1147
|
+
released_actuators: (await (manager ?? this.dataSource.manager).findBy(virtual_thermostat_entity_1.VirtualThermostatActuatorClaimEntity, {
|
|
1148
|
+
controllerId: config.controllerId,
|
|
1149
|
+
state: 'released',
|
|
1150
|
+
})).map(modelClaim),
|
|
1151
|
+
settings: settings.map((setting) => ({ property: setting.propertyId, setting: setting.setting })),
|
|
1152
|
+
};
|
|
1153
|
+
}
|
|
1154
|
+
};
|
|
1155
|
+
exports.VirtualThermostatConfigService = VirtualThermostatConfigService;
|
|
1156
|
+
exports.VirtualThermostatConfigService = VirtualThermostatConfigService = __decorate([
|
|
1157
|
+
(0, common_1.Injectable)(),
|
|
1158
|
+
__param(6, (0, common_1.Optional)()),
|
|
1159
|
+
__param(7, (0, common_1.Optional)()),
|
|
1160
|
+
__param(8, (0, common_1.Optional)()),
|
|
1161
|
+
__metadata("design:paramtypes", [typeorm_1.DataSource,
|
|
1162
|
+
device_structure_lock_service_1.DeviceStructureLockService,
|
|
1163
|
+
virtual_dependency_graph_service_1.VirtualDependencyGraphService,
|
|
1164
|
+
virtual_thermostat_claims_service_1.VirtualThermostatClaimsService,
|
|
1165
|
+
event_emitter_1.EventEmitter2,
|
|
1166
|
+
property_value_service_1.PropertyValueService,
|
|
1167
|
+
virtual_transform_resolver_1.VirtualTransformResolver,
|
|
1168
|
+
virtual_thermostat_automation_service_1.VirtualThermostatAutomationService,
|
|
1169
|
+
native_thermostat_service_1.NativeThermostatService])
|
|
1170
|
+
], VirtualThermostatConfigService);
|
|
1171
|
+
//# sourceMappingURL=virtual-thermostat-config.service.js.map
|