iobroker.eos-admin 9.0.17 → 9.0.19
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/NEXOWATT_EOS_BUILD_INFO.json +11 -14
- package/README.md +7 -3
- package/START_HIER_9.0.18.md +47 -0
- package/START_HIER_9.0.19.md +52 -0
- package/adminWww/.vite/manifest.json +114 -114
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +13759 -13759
- package/adminWww/assets/{AdapterUpdateDialog-Cpo3dAfY.js → AdapterUpdateDialog-JOf2z4Vg.js} +1 -1
- package/adminWww/assets/{Adapters-n2ukPDdC.js → Adapters-C9fcSdWm.js} +1 -1
- package/adminWww/assets/{ConfigManager-BVZ6_Ebo.js → ConfigManager-BeeLlT6D.js} +1 -1
- package/adminWww/assets/{Enums-CQ6yHG2W.js → Enums-FqnXWl8U.js} +1 -1
- package/adminWww/assets/{Fields-CaJqzoW-.js → Fields-DMgrt5Pi.js} +1 -1
- package/adminWww/assets/{Files-DfvpKGa3.js → Files-CIHtt12g.js} +1 -1
- package/adminWww/assets/{Hosts-3xLBsdG6.js → Hosts-fPLBzvTy.js} +1 -1
- package/adminWww/assets/{Instances-B7hKEhyw.js → Instances-4XaVQlrT.js} +1 -1
- package/adminWww/assets/{Intro-BV4kYZdT.js → Intro-5TKriiLO.js} +1 -1
- package/adminWww/assets/{Logs-DpL9eY69.js → Logs-33zcIds-.js} +1 -1
- package/adminWww/assets/{Objects-dN06jhQk.js → Objects-CNQPVbNG.js} +1 -1
- package/adminWww/assets/{Overview-Lip63_ej.js → Overview-BskXGOc8.js} +1 -1
- package/adminWww/assets/{State-BSO2X_xN.js → State-C8SJ_Iqo.js} +1 -1
- package/adminWww/assets/{UsedResources-DvqzszKI.js → UsedResources-CgqRa9ei.js} +1 -1
- package/adminWww/assets/{Users-Csqd1xA-.js → Users-0JVYWR9u.js} +1 -1
- package/adminWww/assets/{bootstrap-C3HM8kNL.js → bootstrap-D16lu6rd.js} +3 -3
- package/adminWww/assets/{hostInit-DdxBUeXQ.js → hostInit-C8YZJuzi.js} +1 -1
- package/adminWww/assets/{icons-material-D1Tb_725.js → icons-material-CiNJ_6Ur.js} +1 -1
- package/adminWww/assets/{index-BOujTMyH.js → index-DA9Sphgh.js} +2 -2
- package/adminWww/assets/{installSVGRenderer-BZyrUVAo.js → installSVGRenderer-DPdkRa_d.js} +1 -1
- package/adminWww/assets/{mf-entry-bootstrap-0-3418586b.js → mf-entry-bootstrap-0-a7ab91de.js} +2 -2
- package/adminWww/index.html +23 -23
- package/adminWww/mf-manifest.json +1 -1
- package/adminWww/mf-stats.json +1 -1
- package/adminWww/{remoteEntry-eos-9.0.17.js → remoteEntry-eos-9.0.19.js} +1 -1
- package/adminWww/remoteEntry.js +1 -1
- package/build/lib/eosCookieNamespace.js +12 -2
- package/build/lib/eosCookieNamespace.js.map +1 -1
- package/build/lib/eosDeviceEmsPlan.js +1147 -0
- package/build/lib/eosDeviceEmsPlan.js.map +1 -0
- package/build/lib/eosDeviceEmsService.js +473 -0
- package/build/lib/eosDeviceEmsService.js.map +1 -0
- package/build/lib/eosModuleHost.js +227 -51
- package/build/lib/eosModuleHost.js.map +1 -1
- package/build/lib/eosModuleHttp.js +1 -1
- package/build/lib/eosModuleHttp.js.map +1 -1
- package/build/lib/web.js +31 -0
- package/build/lib/web.js.map +1 -1
- package/docs/reports/unified-9.0.18/ALIAS_V1_COVERAGE.json +5056 -0
- package/docs/reports/unified-9.0.18/ALIAS_V1_VERTRAG.md +257 -0
- package/docs/reports/unified-9.0.18/ANFORDERUNGEN.md +55 -0
- package/docs/reports/unified-9.0.18/CUSTOMER_TARIFF_REVIEW.md +33 -0
- package/docs/reports/unified-9.0.18/GERAETE_EMS_EINRICHTUNG.md +86 -0
- package/docs/reports/unified-9.0.18/INSTALLER_LIFECYCLE_REVIEW.md +29 -0
- package/docs/reports/unified-9.0.18/KUNDENTARIF_EINRICHTUNG.md +27 -0
- package/docs/reports/unified-9.0.18/PRUEFBERICHT.md +87 -0
- package/docs/reports/unified-9.0.18/UNABHAENGIGER_REVIEW.md +63 -0
- package/docs/reports/unified-9.0.18/raw/INDEX.json +331 -0
- package/docs/reports/unified-9.0.18/raw/audit-full.log +345 -0
- package/docs/reports/unified-9.0.18/raw/audit-full.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/audit-runtime.log +23 -0
- package/docs/reports/unified-9.0.18/raw/audit-runtime.result.json +15 -0
- package/docs/reports/unified-9.0.18/raw/backend-final.log +5 -0
- package/docs/reports/unified-9.0.18/raw/backend-final.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/frontend-build.log +152 -0
- package/docs/reports/unified-9.0.18/raw/frontend-build.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/installer-build.log +26 -0
- package/docs/reports/unified-9.0.18/raw/installer-build.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/keygen-source.json +6 -0
- package/docs/reports/unified-9.0.18/raw/lint-final.log +5 -0
- package/docs/reports/unified-9.0.18/raw/lint-final.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/modules-build.log +5 -0
- package/docs/reports/unified-9.0.18/raw/modules-build.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/node22-tests-final.log +9859 -0
- package/docs/reports/unified-9.0.18/raw/node22-tests-final.result.json +13 -0
- package/docs/reports/unified-9.0.18/raw/node22-typecheck-final.log +7 -0
- package/docs/reports/unified-9.0.18/raw/node22-typecheck-final.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.18/raw/node24-tests-final.log +1663 -0
- package/docs/reports/unified-9.0.18/raw/node24-tests-final.result.json +13 -0
- package/docs/reports/unified-9.0.18/raw/node24-typecheck-final.log +5 -0
- package/docs/reports/unified-9.0.18/raw/node24-typecheck-final.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.18/raw/sbom-runtime.log +7 -0
- package/docs/reports/unified-9.0.18/raw/sbom-runtime.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/sbom-vendor-check.log +1 -0
- package/docs/reports/unified-9.0.18/raw/sbom-vendor-check.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-docs-check.log +6 -0
- package/docs/reports/unified-9.0.18/raw/ui-docs-check.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-runtime-final.log +7 -0
- package/docs/reports/unified-9.0.18/raw/ui-runtime-final.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-runtime-sync.log +6 -0
- package/docs/reports/unified-9.0.18/raw/ui-runtime-sync.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-sbom-check.log +6 -0
- package/docs/reports/unified-9.0.18/raw/ui-sbom-check.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-sbom-final.log +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-sbom-final.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-secret-final.log +6 -0
- package/docs/reports/unified-9.0.18/raw/ui-secret-final.result.json +14 -0
- package/docs/reports/unified-9.0.18/raw/ui-security-final.log +8 -0
- package/docs/reports/unified-9.0.18/raw/ui-security-final.result.json +14 -0
- package/docs/reports/unified-9.0.19/ALIAS_MESSWERTFRISCHE.md +31 -0
- package/docs/reports/unified-9.0.19/COMMISSIONING_PLAN_REVIEW.md +56 -0
- package/docs/reports/unified-9.0.19/EMS_ABSCHLUSSREVIEW.md +43 -0
- package/docs/reports/unified-9.0.19/EMS_KATEGORIEN_ABDECKUNG.md +66 -0
- package/docs/reports/unified-9.0.19/EMS_VERGLEICH_UND_KOPPLUNG.md +25 -0
- package/docs/reports/unified-9.0.19/EVCS_STATE_OBJECTS.md +47 -0
- package/docs/reports/unified-9.0.19/GERAETE_EMS_EINRICHTUNG.md +100 -0
- package/docs/reports/unified-9.0.19/GERAETE_STARTAUSFALL.md +37 -0
- package/docs/reports/unified-9.0.19/INSTALLER_LIFECYCLE_REVIEW.md +59 -0
- package/docs/reports/unified-9.0.19/LEGACY_REGRESSION_REVIEW.md +42 -0
- package/docs/reports/unified-9.0.19/MODBUS_AUTHORIZATION_READS.md +25 -0
- package/docs/reports/unified-9.0.19/PRUEFBERICHT.md +56 -0
- package/docs/reports/unified-9.0.19/RUNTIME_START_UEBERNAHME.md +33 -0
- package/docs/reports/unified-9.0.19/SMA_RECEIVER_LIFECYCLE.md +42 -0
- package/docs/reports/unified-9.0.19/STATIC_REVIEW_DE.md +11 -0
- package/docs/reports/unified-9.0.19/TARIFF_PRICE_VALUES_REVIEW.md +31 -0
- package/docs/reports/unified-9.0.19/TARIF_VIERTELSTUNDEN_RUNTIME.md +17 -0
- package/docs/reports/unified-9.0.19/UNABHAENGIGER_REVIEW.md +49 -0
- package/docs/reports/unified-9.0.19/raw/INDEX.json +751 -0
- package/docs/reports/unified-9.0.19/raw/audit-full.log +345 -0
- package/docs/reports/unified-9.0.19/raw/audit-full.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/audit-runtime.log +23 -0
- package/docs/reports/unified-9.0.19/raw/audit-runtime.result.json +15 -0
- package/docs/reports/unified-9.0.19/raw/backend-final.log +5 -0
- package/docs/reports/unified-9.0.19/raw/backend-final.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/devices-hosted-typecheck-node22.log +0 -0
- package/docs/reports/unified-9.0.19/raw/devices-hosted-typecheck-node22.result.json +15 -0
- package/docs/reports/unified-9.0.19/raw/devices-hosted-typecheck-node24.log +0 -0
- package/docs/reports/unified-9.0.19/raw/devices-hosted-typecheck-node24.result.json +15 -0
- package/docs/reports/unified-9.0.19/raw/devices-incident-build.log +5 -0
- package/docs/reports/unified-9.0.19/raw/devices-incident-host-final.log +70 -0
- package/docs/reports/unified-9.0.19/raw/devices-incident-lease-918-before.log +26 -0
- package/docs/reports/unified-9.0.19/raw/devices-incident-lease-after.log +9 -0
- package/docs/reports/unified-9.0.19/raw/devices-incident-metadata-after.log +11 -0
- package/docs/reports/unified-9.0.19/raw/devices-incident-metadata-before.log +28 -0
- package/docs/reports/unified-9.0.19/raw/devices-incident-web-pipeline.log +22 -0
- package/docs/reports/unified-9.0.19/raw/frontend-build.log +152 -0
- package/docs/reports/unified-9.0.19/raw/frontend-build.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/installer-build.log +26 -0
- package/docs/reports/unified-9.0.19/raw/installer-build.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/keygen-source.json +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-auto-pv.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-auto-pv.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-charging-grid-cap-clamp.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-charging-grid-cap-clamp.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-charging-grid-cap-safe.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-charging-grid-cap-safe.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-charging-mode-recovery.log +539 -0
- package/docs/reports/unified-9.0.19/raw/legacy-charging-mode-recovery.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-core-limits-phase1.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-core-limits-phase1.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-core-limits-phase2.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-core-limits-phase2.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-core-limits-tariff-final.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-core-limits-tariff-final.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-energy-wallet-final.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-energy-wallet-final.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-farm-dispatch-loader-current.log +2 -0
- package/docs/reports/unified-9.0.19/raw/legacy-farm-dispatch-loader-current.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-final-write-envelope.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-final-write-envelope.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-history-http.log +39 -0
- package/docs/reports/unified-9.0.19/raw/legacy-history-http.result.json +15 -0
- package/docs/reports/unified-9.0.19/raw/legacy-import-grid-budget.log +30 -0
- package/docs/reports/unified-9.0.19/raw/legacy-import-grid-budget.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-import-grid-contract-current.log +2 -0
- package/docs/reports/unified-9.0.19/raw/legacy-import-grid-contract-current.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-live-mode-loader-current.log +203 -0
- package/docs/reports/unified-9.0.19/raw/legacy-live-mode-loader-current.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-load-grid-sanity.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-load-grid-sanity.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-ocpp-stability.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-ocpp-stability.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-ocpp21-storage-safety.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-ocpp21-storage-safety.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-permanent-grid-protection.log +18 -0
- package/docs/reports/unified-9.0.19/raw/legacy-permanent-grid-protection.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-storage-dp-persistence.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-storage-dp-persistence.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-storage-farm-dispatch-recovery.log +16 -0
- package/docs/reports/unified-9.0.19/raw/legacy-storage-farm-dispatch-recovery.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-storage-functional-safety.log +6 -0
- package/docs/reports/unified-9.0.19/raw/legacy-storage-functional-safety.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-storage-topology-loader-current.log +2 -0
- package/docs/reports/unified-9.0.19/raw/legacy-storage-topology-loader-current.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/legacy-test-loader.cjs +47 -0
- package/docs/reports/unified-9.0.19/raw/lint-final.log +16 -0
- package/docs/reports/unified-9.0.19/raw/lint-final.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/modules-build.log +5 -0
- package/docs/reports/unified-9.0.19/raw/modules-build.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/node22-tests-final.log +10719 -0
- package/docs/reports/unified-9.0.19/raw/node22-tests-final.result.json +13 -0
- package/docs/reports/unified-9.0.19/raw/node22-typecheck-final.log +7 -0
- package/docs/reports/unified-9.0.19/raw/node22-typecheck-final.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.19/raw/node24-tests-final.log +1805 -0
- package/docs/reports/unified-9.0.19/raw/node24-tests-final.result.json +13 -0
- package/docs/reports/unified-9.0.19/raw/node24-typecheck-final.log +5 -0
- package/docs/reports/unified-9.0.19/raw/node24-typecheck-final.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.19/raw/sbom-runtime.log +7 -0
- package/docs/reports/unified-9.0.19/raw/sbom-runtime.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/sbom-vendor-check.log +1 -0
- package/docs/reports/unified-9.0.19/raw/sbom-vendor-check.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/tariff-price-chain-919.log +11 -0
- package/docs/reports/unified-9.0.19/raw/tariff-price-chain-919.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/tariff-price-chain-old-918.log +68 -0
- package/docs/reports/unified-9.0.19/raw/tariff-price-chain-old-918.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/ui-docs-check.log +6 -0
- package/docs/reports/unified-9.0.19/raw/ui-docs-check.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/ui-runtime-final.log +7 -0
- package/docs/reports/unified-9.0.19/raw/ui-runtime-final.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/ui-runtime-sync.log +6 -0
- package/docs/reports/unified-9.0.19/raw/ui-runtime-sync.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/ui-sbom-check.log +6 -0
- package/docs/reports/unified-9.0.19/raw/ui-sbom-check.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/ui-sbom-final.log +6 -0
- package/docs/reports/unified-9.0.19/raw/ui-sbom-final.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/ui-secret-final.log +6 -0
- package/docs/reports/unified-9.0.19/raw/ui-secret-final.result.json +14 -0
- package/docs/reports/unified-9.0.19/raw/ui-security-final.log +8 -0
- package/docs/reports/unified-9.0.19/raw/ui-security-final.result.json +14 -0
- package/io-package.json +12 -12
- package/modules/devices/admin/alias-contract-v1.json +189 -0
- package/modules/devices/admin/ems-assignment.d.ts +16 -0
- package/modules/devices/admin/ems-assignment.js +356 -0
- package/modules/devices/admin/host-bridge.js +76 -4
- package/modules/devices/admin/index.html +40 -1
- package/modules/devices/admin/index_m.js +158 -2
- package/modules/devices/admin/style.css +32 -4
- package/modules/devices/checks/emsAssignment.check.js +132 -0
- package/modules/devices/contracts.d.ts +1 -1
- package/modules/devices/eslint.hosted.config.mjs +1 -1
- package/modules/devices/index.js +64 -16
- package/modules/devices/lib/alias-contract-v1.json +189 -0
- package/modules/devices/lib/aliasContract.js +7 -1
- package/modules/devices/lib/device-alias-semantics-v1.json +1605 -0
- package/modules/devices/lib/deviceAliasFreshness.js +65 -0
- package/modules/devices/lib/deviceAliasSemantics.js +109 -0
- package/modules/devices/lib/deviceRuntime.js +204 -127
- package/modules/devices/lib/drivers/modbus.js +18 -3
- package/modules/devices/lib/drivers/speedwire.js +42 -22
- package/modules/devices/test/aliasContractV1.test.js +1 -1
- package/modules/devices/test/deviceAliasFreshness.test.js +149 -0
- package/modules/devices/test/deviceAliasSemantics.test.js +163 -0
- package/modules/devices/test/emsAssignmentUi.test.js +298 -0
- package/modules/devices/test/modbusAuthorizationReads.test.js +112 -0
- package/modules/devices/test/runtimeLiveness.test.js +1 -1
- package/modules/devices/test/speedwireLifecycle.test.js +118 -0
- package/modules/devices/tsconfig.alias-semantics.json +17 -0
- package/modules/devices/tsconfig.ems-ui.json +9 -0
- package/modules/devices/tsconfig.hosted.json +1 -1
- package/package.json +11 -7
- package/release-manifests/unified/build-environment.cdx.json +1483 -7370
- package/release-manifests/unified/files.json +392 -121
- package/release-manifests/unified/frontend.cdx.json +2688 -5952
- package/release-manifests/unified/installer.cdx.json +2053 -821
- package/release-manifests/unified/obsolete-admin-assets.json +172 -6
- package/release-manifests/unified/runtime.cdx.json +40 -3283
- package/release-manifests/unified/validation.json +15 -15
- package/tools/eos-release-check.cjs +1 -1
- package/tools/eos-release-manifest.cjs +5 -5
- package/ui/docs/security/eslint-reviewed-findings.json +32 -18
- package/ui/ems/datapoints.js +22 -1
- package/ui/ems/engine.js +54 -7
- package/ui/ems/module-manager.js +44 -21
- package/ui/ems/modules/core-limits.js +5 -3
- package/ui/ems/modules/energy-wallet.js +31 -32
- package/ui/ems/modules/storage-control.js +5 -4
- package/ui/ems/modules/tarif-vis.js +36 -24
- package/ui/ems/modules/tariff-provider.js +259 -59
- package/ui/ems/services/tariff-provider-registry.js +11 -8
- package/ui/io-package.json +5 -1
- package/ui/lib/customer-tariff.js +245 -0
- package/ui/lib/installer-lifecycle.js +220 -0
- package/ui/lib/storage-farm-overview.js +115 -0
- package/ui/lib/tariff-price.js +115 -0
- package/ui/main.js +400 -163
- package/ui/package.json +14 -4
- package/ui/www/app.js +47 -134
- package/ui/www/customer-tariff.css +21 -0
- package/ui/www/customer-tariff.js +333 -0
- package/ui/www/ems-apps.html +2 -0
- package/ui/www/ems-apps.js +29 -7
- package/ui/www/index.html +2 -0
- package/ui/www/licenses/smarthome-markdown-components.json +156 -156
- package/ui/www/manifest.webmanifest +2 -2
- package/ui/www/power-measurements.js +62 -0
- package/ui/www/settings.html +47 -0
- package/ui/www/storagefarm-summary.css +17 -0
- package/ui/www/storagefarm-summary.js +136 -0
- package/ui/www/storagefarm.html +16 -1
- package/ui/www/storagefarm.js +10 -22
- package/ui/www/tariff-display.js +161 -0
package/ui/ems/module-manager.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
8
|
*
|
|
9
9
|
* Quelle: src-ts/runtime-executables/ems/module-manager.ts
|
|
10
|
-
* Quell-Hash: sha256:
|
|
10
|
+
* Quell-Hash: sha256:382f3613b2f3099328fb22e4e23b7e5a1298519fa774d5fbb4c0a228bbd50f57
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -156,6 +156,7 @@ class ModuleManager {
|
|
|
156
156
|
* @param {*} dpRegistry
|
|
157
157
|
*/
|
|
158
158
|
constructor(adapter, dpRegistry) {
|
|
159
|
+
this._pendingModuleWork = new Set();
|
|
159
160
|
this.adapter = adapter;
|
|
160
161
|
this.dp = dpRegistry || null;
|
|
161
162
|
/** @type {Array<{key: string, instance: any, enabledFn: () => boolean}>} */
|
|
@@ -308,6 +309,19 @@ class ModuleManager {
|
|
|
308
309
|
maxLen = 20000;
|
|
309
310
|
return s.length > maxLen ? (s.slice(0, maxLen) + '...') : s;
|
|
310
311
|
}
|
|
312
|
+
/** Behält auch bereits zeitüberschrittene Modulaufträge bis zum echten Ende.
|
|
313
|
+
* Der äußere Watchdog darf sie melden, aber eine Rekonfiguration darf danach
|
|
314
|
+
* keinen zweiten Regler auf denselben Aktor starten. */
|
|
315
|
+
_trackModuleWork(work) {
|
|
316
|
+
const task = Promise.resolve().then(work);
|
|
317
|
+
const settlement = task.then(() => undefined, () => undefined);
|
|
318
|
+
this._pendingModuleWork.add(settlement);
|
|
319
|
+
void settlement.then(() => { this._pendingModuleWork.delete(settlement); });
|
|
320
|
+
return task;
|
|
321
|
+
}
|
|
322
|
+
async waitForPendingWork() {
|
|
323
|
+
await Promise.all([...this._pendingModuleWork]);
|
|
324
|
+
}
|
|
311
325
|
/**
|
|
312
326
|
* Initialisiert ein Modul genau einmal, bevor dessen erster Regel-Tick laeuft.
|
|
313
327
|
* AppCenter-Aenderungen koennen enabledFn zur Laufzeit von false auf true setzen;
|
|
@@ -851,7 +865,7 @@ class ModuleManager {
|
|
|
851
865
|
// must not freeze the complete EMS scheduler. The helper also
|
|
852
866
|
// deduplicates unresolved work so no Promise pile-up can grow the
|
|
853
867
|
// V8 heap on every one-second cycle.
|
|
854
|
-
const isolated = await (0, rc85_runtime_hardening_1.rc85RunIsolatedResult)(`ems-module:${key}`, timeoutMs, () => withActuatorShadowContext(this.adapter, { owner: key, module: key, priority: priorityForOwner(key), reason: 'module-tick', cycleId: this._tickCount, leaseMs: 15000 }, () => m.instance.tick()), this.adapter?.log || console);
|
|
868
|
+
const isolated = await (0, rc85_runtime_hardening_1.rc85RunIsolatedResult)(`ems-module:${key}`, timeoutMs, () => this._trackModuleWork(() => withActuatorShadowContext(this.adapter, { owner: key, module: key, priority: priorityForOwner(key), reason: 'module-tick', cycleId: this._tickCount, leaseMs: 15000 }, () => m.instance.tick())), this.adapter?.log || console);
|
|
855
869
|
if (!isolated.ok) {
|
|
856
870
|
const prefix = isolated.timedOut
|
|
857
871
|
? 'module-timeout'
|
|
@@ -970,29 +984,38 @@ class ModuleManager {
|
|
|
970
984
|
* Ablauf und Zusammenhang: Beendet Module und Laufzeitüberwachung. Wird von der Engine beim Stoppen aufgerufen, damit Modul-Timer und weitere Hintergrundarbeit nicht fortlaufen.
|
|
971
985
|
*/
|
|
972
986
|
stop() {
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
this._stopHeapMonitor?.();
|
|
980
|
-
}
|
|
981
|
-
catch (_error) { }
|
|
982
|
-
this._stopHeapMonitor = undefined;
|
|
983
|
-
try {
|
|
984
|
-
(0, rc85_runtime_hardening_1.rc88ClearRuntimeHardening)();
|
|
985
|
-
}
|
|
986
|
-
catch (_error) { }
|
|
987
|
-
for (const m of this.modules || []) {
|
|
987
|
+
if (this._stopCompletion)
|
|
988
|
+
return;
|
|
989
|
+
const pending = [];
|
|
990
|
+
const stopOne = (stop) => {
|
|
991
|
+
if (!stop)
|
|
992
|
+
return;
|
|
988
993
|
try {
|
|
989
|
-
|
|
990
|
-
m.instance.stop();
|
|
994
|
+
pending.push(Promise.resolve(stop()));
|
|
991
995
|
}
|
|
992
|
-
catch (
|
|
993
|
-
|
|
996
|
+
catch (error) {
|
|
997
|
+
pending.push(Promise.reject(error));
|
|
994
998
|
}
|
|
999
|
+
};
|
|
1000
|
+
stopOne(this._nvpTopologyModule?.stop?.bind(this._nvpTopologyModule));
|
|
1001
|
+
this._nvpTopologyModule = undefined;
|
|
1002
|
+
stopOne(this._stopHeapMonitor);
|
|
1003
|
+
this._stopHeapMonitor = undefined;
|
|
1004
|
+
stopOne(() => (0, rc85_runtime_hardening_1.rc88ClearRuntimeHardening)());
|
|
1005
|
+
for (const row of this.modules || []) {
|
|
1006
|
+
const instance = row.instance;
|
|
1007
|
+
if (instance && typeof instance.stop === 'function')
|
|
1008
|
+
stopOne(() => instance.stop());
|
|
995
1009
|
}
|
|
1010
|
+
// Every rejection is observed even when adapter unload cannot await us.
|
|
1011
|
+
this._stopCompletion = Promise.allSettled(pending);
|
|
1012
|
+
}
|
|
1013
|
+
/** Nur ein vollständig beendeter alter Modulbestand darf ersetzt werden. */
|
|
1014
|
+
async stopAndWait() {
|
|
1015
|
+
this.stop();
|
|
1016
|
+
const results = await this._stopCompletion;
|
|
1017
|
+
if (results?.some(result => result.status === 'rejected'))
|
|
1018
|
+
throw new Error('EOS_EMS_MODULE_STOP_FAILED');
|
|
996
1019
|
}
|
|
997
1020
|
}
|
|
998
1021
|
module.exports = { ModuleManager };
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
8
|
*
|
|
9
9
|
* Quelle: src-ts/runtime-executables/ems/modules/core-limits.ts
|
|
10
|
-
* Quell-Hash: sha256:
|
|
10
|
+
* Quell-Hash: sha256:1b7a9c9b7f69a644713610de9afd141a124b8af89ed993c0aa5f0f9e463e61e9
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
*/
|
|
73
73
|
|
|
74
74
|
'use strict';
|
|
75
|
+
const { readTariffPriceState } = require('../../lib/tariff-price');
|
|
75
76
|
|
|
76
77
|
|
|
77
78
|
/**
|
|
@@ -2948,10 +2949,11 @@ class CoreLimitsModule extends BaseModule {
|
|
|
2948
2949
|
|
|
2949
2950
|
const tariffActive = await readStateBool(this.adapter, 'tarif.aktiv', false);
|
|
2950
2951
|
const tariffState = await readStateString(this.adapter, 'tarif.state', '');
|
|
2951
|
-
const
|
|
2952
|
+
const tariffCurrentPriceFresh = await readStateBool(this.adapter, 'tarif.currentPriceFresh', null);
|
|
2953
|
+
const tariffCurrentPrice = tariffCurrentPriceFresh === false ? null : await readTariffPriceState(this.adapter, 'tarif.preisAktuellEurProKwh');
|
|
2952
2954
|
const tariffNegativeActive = await readStateBool(this.adapter, 'tarif.negativpreisAktiv', false);
|
|
2953
2955
|
const tariffGridImportPreferred = await readStateBool(this.adapter, 'tarif.netzbezugBevorzugt', tariffNegativeActive);
|
|
2954
|
-
const tariffNegativeMinPrice = await
|
|
2956
|
+
const tariffNegativeMinPrice = await readTariffPriceState(this.adapter, 'tarif.negativPreisMinEurProKwh');
|
|
2955
2957
|
const tariffNextNegativeFrom = await readStateString(this.adapter, 'tarif.naechstesNegativVon', '');
|
|
2956
2958
|
const tariffNextNegativeTo = await readStateString(this.adapter, 'tarif.naechstesNegativBis', '');
|
|
2957
2959
|
const tariffStatus = await readStateString(this.adapter, 'tarif.negativpreisStatus', '');
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
8
|
*
|
|
9
9
|
* Quelle: src-ts/runtime-executables/ems/modules/energy-wallet.ts
|
|
10
|
-
* Quell-Hash: sha256:
|
|
10
|
+
* Quell-Hash: sha256:0b1e11b104246e2b2e8584deb7d80d7ca353f61d2d770f1136eef413d04ffb69
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
*/
|
|
73
73
|
'use strict';
|
|
74
74
|
const { BaseModule } = require('./base');
|
|
75
|
+
const { tariffPriceNumber } = require('../../lib/tariff-price');
|
|
75
76
|
function num(v, fallback = null) {
|
|
76
77
|
const n = Number(v);
|
|
77
78
|
return Number.isFinite(n) ? n : fallback;
|
|
@@ -106,13 +107,13 @@ function yearKeyLocal(date = new Date()) {
|
|
|
106
107
|
return String(date.getFullYear());
|
|
107
108
|
}
|
|
108
109
|
|
|
109
|
-
function normalizePriceEurPerKwh(value, fallback) {
|
|
110
|
-
const n =
|
|
110
|
+
function normalizePriceEurPerKwh(value, fallback, explicitEur = false) {
|
|
111
|
+
const n = tariffPriceNumber(value);
|
|
111
112
|
if (!Number.isFinite(n)) return fallback;
|
|
112
113
|
const abs = Math.abs(n);
|
|
113
114
|
// Installer geben Preise häufig in ct/kWh ein. Werte >2 und <=500 interpretieren wir als ct/kWh.
|
|
114
|
-
const eur = abs > 2 && abs <= 500 ? n / 100 : n;
|
|
115
|
-
if (!Number.isFinite(eur) || eur < -2 || eur > 5) return fallback;
|
|
115
|
+
const eur = !explicitEur && abs > 2 && abs <= 500 ? n / 100 : n;
|
|
116
|
+
if (!Number.isFinite(eur) || (explicitEur ? Math.abs(eur) > 100 : eur < -2 || eur > 5)) return fallback;
|
|
116
117
|
return eur;
|
|
117
118
|
}
|
|
118
119
|
|
|
@@ -415,37 +416,34 @@ class EnergyWalletModule extends BaseModule {
|
|
|
415
416
|
const rec = this._cacheEntry(key);
|
|
416
417
|
if (!rec) continue;
|
|
417
418
|
const raw = rec && typeof rec === 'object' && Object.prototype.hasOwnProperty.call(rec, 'value') ? rec.value : rec;
|
|
418
|
-
const n =
|
|
419
|
-
if (
|
|
419
|
+
const n = tariffPriceNumber(raw);
|
|
420
|
+
if (n !== null) return n;
|
|
420
421
|
}
|
|
421
422
|
return fallback;
|
|
422
423
|
}
|
|
423
424
|
|
|
424
425
|
|
|
425
|
-
_readStateCandidate(keys) {
|
|
426
|
-
//
|
|
427
|
-
//
|
|
428
|
-
//
|
|
429
|
-
// und ein alter Zeittarif sauber auf den festen Preis zurückfallen.
|
|
426
|
+
_readStateCandidate(keys, maxAgeSec = 7200) {
|
|
427
|
+
// A missing derived budget price must not hide a real current provider price.
|
|
428
|
+
// Inspect every candidate's own timestamp; retain a stale candidate only for
|
|
429
|
+
// diagnosis after all fresher fallbacks have been considered.
|
|
430
430
|
const list = Array.isArray(keys) ? keys : [keys];
|
|
431
431
|
const now = Date.now();
|
|
432
|
+
let staleCandidate = null;
|
|
432
433
|
for (const key of list) {
|
|
433
|
-
const
|
|
434
|
-
|
|
434
|
+
const cached = this.adapter?.stateCache && Object.prototype.hasOwnProperty.call(this.adapter.stateCache, key) ? Reflect.get(this.adapter.stateCache, key) : null;
|
|
435
|
+
const rec = cached && typeof cached === 'object' && !Array.isArray(cached) ? cached : null;
|
|
436
|
+
if (!rec || (rec.q !== undefined && rec.q !== 0)) continue;
|
|
435
437
|
const raw = rec && typeof rec === 'object' && Object.prototype.hasOwnProperty.call(rec, 'value') ? rec.value : rec;
|
|
436
|
-
const n =
|
|
437
|
-
if (
|
|
438
|
-
const
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
value: n,
|
|
444
|
-
ts,
|
|
445
|
-
ageSec: Math.max(0, Math.round((now - ts) / 1000)),
|
|
446
|
-
};
|
|
438
|
+
const n = tariffPriceNumber(raw);
|
|
439
|
+
if (n === null) continue;
|
|
440
|
+
const ts = typeof rec.ts === 'number' ? rec.ts : null;
|
|
441
|
+
if (ts === null || !Number.isFinite(ts) || ts <= 0 || ts > now + 1000) continue;
|
|
442
|
+
const candidate = { found: true, key: String(key), value: n, ts, ageSec: Math.max(0, Math.round((now - ts) / 1000)) };
|
|
443
|
+
if (candidate.ageSec <= maxAgeSec) return candidate;
|
|
444
|
+
if (!staleCandidate) staleCandidate = candidate;
|
|
447
445
|
}
|
|
448
|
-
return { found: false, key: '', value: null, ts: 0, ageSec: 0 };
|
|
446
|
+
return staleCandidate || { found: false, key: '', value: null, ts: 0, ageSec: 0 };
|
|
449
447
|
}
|
|
450
448
|
|
|
451
449
|
|
|
@@ -611,6 +609,8 @@ class EnergyWalletModule extends BaseModule {
|
|
|
611
609
|
// - Quelle, Alter und Fallback-Grund werden veröffentlicht, damit Nutzerkarte und
|
|
612
610
|
// Installateurdiagnose nicht dieselbe Warnsprache verwenden müssen.
|
|
613
611
|
const dynamicTariffActive = this._readStateBool(['settings.dynamicTariff', 'dynamicTariff'], false);
|
|
612
|
+
const maxAgeSecRaw = cfg.dynamicTariffMaxAgeSec !== undefined ? Number(cfg.dynamicTariffMaxAgeSec) : 7200;
|
|
613
|
+
const maxAgeSec = Math.round(clamp(Number.isFinite(maxAgeSecRaw) ? maxAgeSecRaw : 7200, 60, 86400));
|
|
614
614
|
const tariffCandidate = this._readStateCandidate([
|
|
615
615
|
'ems.budget.tariff.currentPriceEurKwh',
|
|
616
616
|
'tarif.preisAktuellEurProKwh',
|
|
@@ -618,12 +618,11 @@ class EnergyWalletModule extends BaseModule {
|
|
|
618
618
|
'priceCurrent',
|
|
619
619
|
'tarif.priceCurrent',
|
|
620
620
|
'tariff.priceCurrent',
|
|
621
|
-
]);
|
|
622
|
-
const
|
|
623
|
-
const
|
|
624
|
-
const
|
|
625
|
-
const
|
|
626
|
-
const tariffFresh = tariffFinite && (!tariffCandidate.found || tariffCandidate.ageSec <= maxAgeSec);
|
|
621
|
+
], maxAgeSec);
|
|
622
|
+
const canonicalEurPrice = ['ems.budget.tariff.currentPriceEurKwh', 'tarif.preisAktuellEurProKwh', 'historie.tariff.providerCurrentEurPerKwh'].includes(tariffCandidate.key);
|
|
623
|
+
const tariffNow = tariffCandidate.found ? normalizePriceEurPerKwh(tariffCandidate.value, null, canonicalEurPrice) : null;
|
|
624
|
+
const tariffFinite = tariffCandidate.found && typeof tariffNow === 'number' && Number.isFinite(tariffNow);
|
|
625
|
+
const tariffFresh = tariffFinite && tariffCandidate.ageSec <= maxAgeSec;
|
|
627
626
|
const dynamicTariffAvailable = dynamicTariffActive && tariffFinite && tariffFresh;
|
|
628
627
|
|
|
629
628
|
const fixedInput = this._readStateNumber([
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
8
|
*
|
|
9
9
|
* Quelle: src-ts/runtime-executables/ems/modules/storage-control.ts
|
|
10
|
-
* Quell-Hash: sha256:
|
|
10
|
+
* Quell-Hash: sha256:e8d44e13782e130773163c03326564b675e324cdd0783367adaf10f6c232f9d8
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -8188,9 +8188,10 @@ const _prevRampW = (typeof this._lastTargetW === 'number' && Number.isFinite(thi
|
|
|
8188
8188
|
const appsRoot = (rootCfg.emsApps && typeof rootCfg.emsApps === 'object') ? rootCfg.emsApps : {};
|
|
8189
8189
|
const apps = (appsRoot.apps && typeof appsRoot.apps === 'object') ? appsRoot.apps : {};
|
|
8190
8190
|
const singleApp = (apps.storage && typeof apps.storage === 'object') ? apps.storage : null;
|
|
8191
|
-
const
|
|
8191
|
+
const deviceAssignmentDisabled = rootCfg.storage?._eosDevice?.v === 1 && rootCfg.storage?.enabled === false;
|
|
8192
|
+
const singleAppActive = !deviceAssignmentDisabled && (singleApp
|
|
8192
8193
|
? (singleApp.installed === true && singleApp.enabled === true)
|
|
8193
|
-
: (rootCfg.enableStorageControl === true);
|
|
8194
|
+
: (rootCfg.enableStorageControl === true));
|
|
8194
8195
|
|
|
8195
8196
|
const farm = (this.adapter && typeof this.adapter._nwGetStorageFarmRuntimeInfo === 'function')
|
|
8196
8197
|
? this.adapter._nwGetStorageFarmRuntimeInfo()
|
|
@@ -8280,7 +8281,7 @@ const _prevRampW = (typeof this._lastTargetW === 'number' && Number.isFinite(thi
|
|
|
8280
8281
|
? (app.installed === true && app.enabled === true)
|
|
8281
8282
|
: (rootCfg.enableStorageFarm === true);
|
|
8282
8283
|
|
|
8283
|
-
return !!(enabledByConfig && configuredCount >=
|
|
8284
|
+
return !!(enabledByConfig && configuredCount >= 1);
|
|
8284
8285
|
} catch {
|
|
8285
8286
|
return false;
|
|
8286
8287
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
8
|
*
|
|
9
9
|
* Quelle: src-ts/runtime-executables/ems/modules/tarif-vis.ts
|
|
10
|
-
* Quell-Hash: sha256:
|
|
10
|
+
* Quell-Hash: sha256:2059a2f9ed5bc8d2350a4885ae37d34153bc6825549fc50d562d59470c5d9ace
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -74,6 +74,7 @@
|
|
|
74
74
|
'use strict';
|
|
75
75
|
|
|
76
76
|
const { BaseModule } = require('./base');
|
|
77
|
+
const { tariffPriceUnit, normalizeTariffPrice } = require('../../lib/tariff-price');
|
|
77
78
|
|
|
78
79
|
/**
|
|
79
80
|
* Speicher-Netzladen ist strikt an einen frischen, aktiven und als „günstig“
|
|
@@ -528,22 +529,28 @@ class TarifVisModule extends BaseModule {
|
|
|
528
529
|
* Zusammenhang: Gehört zu EMS-Modul (Regelungs-, Diagnose- oder Beratungslogik innerhalb der EMS-Engine) und wird von benachbarten UI-/API-/EMS-Bausteinen genutzt.
|
|
529
530
|
* Wartung/TypeScript: Änderungen an Signatur oder Rückgabe können abhängige Aufrufer beeinflussen; Aufrufstellen mitprüfen. Beim TS-Umbau Parameter, Rückgabe und genutzte State-/Config-Objekte explizit typisieren.
|
|
530
531
|
*/
|
|
531
|
-
_normalizePriceEurPerKwh(v, fallback = null) {
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
532
|
+
_normalizePriceEurPerKwh(v, fallback = null, unit = 'auto') {
|
|
533
|
+
// Preserve the established locale parser, but never interpret status values as money.
|
|
534
|
+
if (typeof v !== 'number' && typeof v !== 'string') return fallback;
|
|
535
|
+
const parsed = this._num(v, null);
|
|
536
|
+
const value = normalizeTariffPrice(parsed, tariffPriceUnit(unit));
|
|
537
|
+
return value === null ? fallback : value;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
/** Preis-Einheit aus dem tatsächlichen Mapping: eigene Provider-DPs sind EUR/kWh.
|
|
541
|
+
* Manuelle Einheiten bleiben erhalten; nicht typisierte Legacy-Quellen nutzen Auto. */
|
|
542
|
+
_priceInputUnit(key, field, providerSuffix) {
|
|
543
|
+
const entry = this.dp && typeof this.dp.getEntry === 'function' ? this.dp.getEntry(key) : null;
|
|
544
|
+
if (entry?.objectId === `${this.adapter.namespace}.tariffProvider.${providerSuffix}`) return 'EUR/kWh';
|
|
545
|
+
const units = this.adapter?.config?.units || {};
|
|
546
|
+
const configured = field === 'priceCurrent' ? units.priceCurrent : field === 'priceAverage' ? units.priceAverage
|
|
547
|
+
: field === 'priceTodayJson' ? units.priceTodayJson : field === 'priceTomorrowJson' ? units.priceTomorrowJson : '';
|
|
548
|
+
for (const candidate of [configured, entry?.unitIn, entry?.unit]) {
|
|
549
|
+
const unit = tariffPriceUnit(candidate);
|
|
550
|
+
if (unit !== 'auto') return unit;
|
|
551
|
+
}
|
|
552
|
+
return 'auto';
|
|
553
|
+
}
|
|
547
554
|
|
|
548
555
|
/**
|
|
549
556
|
* Code-Teil: Methode `_parsePriceCurve`
|
|
@@ -557,7 +564,7 @@ class TarifVisModule extends BaseModule {
|
|
|
557
564
|
* Zusammenhang: Teil von EMS-Modul: Regelung, Diagnose oder Beratung; Aufrufstellen und abhängige States/APIs beim Ändern mitprüfen.
|
|
558
565
|
* TypeScript: Parameter, Rückgabewert und verwendete Config-/State-Objekte später explizit typisieren.
|
|
559
566
|
*/
|
|
560
|
-
_parsePriceCurve(raw) {
|
|
567
|
+
_parsePriceCurve(raw, unit = 'auto') {
|
|
561
568
|
// Accepts either a JSON string or already-parsed array/object.
|
|
562
569
|
// Expected (tibber-like) schema: [{ total: 0.318, startsAt: "...", endsAt: "..." }, ...]
|
|
563
570
|
if (raw === null || raw === undefined) return [];
|
|
@@ -629,7 +636,7 @@ class TarifVisModule extends BaseModule {
|
|
|
629
636
|
continue;
|
|
630
637
|
}
|
|
631
638
|
const raw = (typeof it === 'number') ? it : Number(String(it).trim());
|
|
632
|
-
const priceEurKwh = this._normalizePriceEurPerKwh(raw, null);
|
|
639
|
+
const priceEurKwh = this._normalizePriceEurPerKwh(raw, null, unit);
|
|
633
640
|
if (!Number.isFinite(priceEurKwh)) {
|
|
634
641
|
idx++;
|
|
635
642
|
continue;
|
|
@@ -662,7 +669,12 @@ class TarifVisModule extends BaseModule {
|
|
|
662
669
|
else if (it.price.value !== undefined) pRaw = it.price.value;
|
|
663
670
|
}
|
|
664
671
|
|
|
665
|
-
|
|
672
|
+
// The normalized provider/Tibber contract is already EUR/kWh. Explicit
|
|
673
|
+
// units still take precedence for manually mapped structured curves.
|
|
674
|
+
const rowUnit = tariffPriceUnit(it.unit);
|
|
675
|
+
const curveUnit = unit !== 'auto' ? unit : rowUnit !== 'auto' ? rowUnit
|
|
676
|
+
: (typeof it.total === 'number' && typeof it.startsAt === 'string' && it.currency === 'EUR') ? 'EUR/kWh' : 'auto';
|
|
677
|
+
const price = this._normalizePriceEurPerKwh(pRaw, null, curveUnit);
|
|
666
678
|
if (typeof price !== 'number' || !Number.isFinite(price)) continue;
|
|
667
679
|
|
|
668
680
|
// Time field heuristics
|
|
@@ -1098,7 +1110,7 @@ class TarifVisModule extends BaseModule {
|
|
|
1098
1110
|
const currentPriceDirectFresh = currentPriceAgeMs === null || currentPriceAgeMs === undefined || currentPriceAgeMs <= currentPriceMaxAgeMs;
|
|
1099
1111
|
if (this.dp && typeof this.dp.getEntry === 'function' && this.dp.getEntry('tarif.preisAktuellEurProKwh')) {
|
|
1100
1112
|
const raw = this.dp.getNumberFresh('tarif.preisAktuellEurProKwh', currentPriceMaxAgeMs, null);
|
|
1101
|
-
preisAktuell = this._normalizePriceEurPerKwh(raw, null);
|
|
1113
|
+
preisAktuell = this._normalizePriceEurPerKwh(raw, null, this._priceInputUnit('tarif.preisAktuellEurProKwh', 'priceCurrent', 'currentPriceEurPerKwh'));
|
|
1102
1114
|
if (typeof preisAktuell === 'number' && Number.isFinite(preisAktuell)) preisAktuellSource = 'provider-current';
|
|
1103
1115
|
}
|
|
1104
1116
|
|
|
@@ -1108,7 +1120,7 @@ class TarifVisModule extends BaseModule {
|
|
|
1108
1120
|
: null;
|
|
1109
1121
|
if (this.dp && typeof this.dp.getEntry === 'function' && this.dp.getEntry('tarif.preisDurchschnittEurProKwh')) {
|
|
1110
1122
|
const raw = this.dp.getNumberFresh('tarif.preisDurchschnittEurProKwh', averagePriceMaxAgeMs, null);
|
|
1111
|
-
preisDurchschnitt = this._normalizePriceEurPerKwh(raw, null);
|
|
1123
|
+
preisDurchschnitt = this._normalizePriceEurPerKwh(raw, null, this._priceInputUnit('tarif.preisDurchschnittEurProKwh', 'priceAverage', 'averagePriceEurPerKwh'));
|
|
1112
1124
|
}
|
|
1113
1125
|
|
|
1114
1126
|
const preisVisOk = (typeof preisGrenzeVis === 'number' && Number.isFinite(preisGrenzeVis));
|
|
@@ -1164,8 +1176,8 @@ class TarifVisModule extends BaseModule {
|
|
|
1164
1176
|
? this.dp.getRaw('tarif.pricesTomorrowJson')
|
|
1165
1177
|
: null;
|
|
1166
1178
|
|
|
1167
|
-
const todayArr = this._parsePriceCurve(rawToday);
|
|
1168
|
-
const tomorrowArr = this._parsePriceCurve(rawTomorrow);
|
|
1179
|
+
const todayArr = this._parsePriceCurve(rawToday, this._priceInputUnit('tarif.pricesTodayJson', 'priceTodayJson', 'pricesTodayJson'));
|
|
1180
|
+
const tomorrowArr = this._parsePriceCurve(rawTomorrow, this._priceInputUnit('tarif.pricesTomorrowJson', 'priceTomorrowJson', 'pricesTomorrowJson'));
|
|
1169
1181
|
|
|
1170
1182
|
const all = [...todayArr, ...tomorrowArr]
|
|
1171
1183
|
.filter(x => x && Number.isFinite(x.startMs) && Number.isFinite(x.endMs) && Number.isFinite(x.priceEurKwh))
|