iobroker.eos-admin 9.0.25 → 9.0.26
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 +3 -3
- package/README.md +6 -4
- package/START_HIER_9.0.26.md +80 -0
- package/adminWww/.vite/manifest.json +39 -39
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +107 -107
- package/adminWww/assets/{AdapterUpdateDialog-CLDpmxDx.js → AdapterUpdateDialog-DIjnNZ5k.js} +1 -1
- package/adminWww/assets/{Adapters-BCGeX2v7.js → Adapters-D8UOQg1q.js} +1 -1
- package/adminWww/assets/{ConfigManager-B_sJf5_w.js → ConfigManager-CAvT_4-g.js} +1 -1
- package/adminWww/assets/{Enums-D3n1pOtc.js → Enums-CrNUOX0d.js} +1 -1
- package/adminWww/assets/{Fields-Bdx5gPoT.js → Fields-D-0qFiqr.js} +1 -1
- package/adminWww/assets/{Files-BPK84lYU.js → Files-BL8kvaeC.js} +1 -1
- package/adminWww/assets/{Hosts--Jr6oLf2.js → Hosts-BToJLy61.js} +1 -1
- package/adminWww/assets/{Instances-DxTOzFus.js → Instances-Dlrp1KGP.js} +1 -1
- package/adminWww/assets/{Intro-CYBGeZtu.js → Intro-5EbxvP4X.js} +1 -1
- package/adminWww/assets/{Logs-CVNC-4S8.js → Logs-xdFVJ6fZ.js} +1 -1
- package/adminWww/assets/{Objects-Cqm9Rvym.js → Objects-DhyJ5eAY.js} +1 -1
- package/adminWww/assets/{Overview-JgjcHwlz.js → Overview-BspgcFB7.js} +1 -1
- package/adminWww/assets/{State-BV14HSwZ.js → State-CJ1mKH_U.js} +1 -1
- package/adminWww/assets/{UsedResources-Dz48WzEF.js → UsedResources-BMiCxqWH.js} +1 -1
- package/adminWww/assets/{Users-D19YlRCD.js → Users-DrlJHRa5.js} +1 -1
- package/adminWww/assets/{bootstrap-a7POLSDr.js → bootstrap-BU7j1Fe_.js} +3 -3
- package/adminWww/assets/{hostInit-keGjwsZR.js → hostInit-Cgee6juw.js} +1 -1
- package/adminWww/assets/{icons-material-Omb_HCfb.js → icons-material-C0U9EKON.js} +1 -1
- package/adminWww/assets/{index-DqPrQK7T.js → index-BUZf1ftI.js} +2 -2
- package/adminWww/assets/{installSVGRenderer-iWfLFoQU.js → installSVGRenderer-CcjgaxiA.js} +1 -1
- package/adminWww/assets/{mf-entry-bootstrap-0-2a856bb6.js → mf-entry-bootstrap-0-96d40e57.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.26.js +12 -0
- package/adminWww/remoteEntry.js +1 -1
- package/build/lib/eosKiosk.js +11 -1
- package/build/lib/eosKiosk.js.map +1 -1
- package/build/lib/eosModuleHost.js +134 -38
- package/build/lib/eosModuleHost.js.map +1 -1
- package/build/lib/eosModuleHttp.js +9 -3
- package/build/lib/eosModuleHttp.js.map +1 -1
- package/build/lib/eosModuleLoad.js +83 -0
- package/build/lib/eosModuleLoad.js.map +1 -0
- package/build/lib/eosModuleProcess.js +16 -1
- package/build/lib/eosModuleProcess.js.map +1 -1
- package/build/lib/eosModuleProcessProtocol.js +13 -1
- package/build/lib/eosModuleProcessProtocol.js.map +1 -1
- package/build/lib/eosModuleProcessWorker.js +50 -23
- package/build/lib/eosModuleProcessWorker.js.map +1 -1
- package/build/lib/eosRuntimeControl.js +17 -6
- package/build/lib/eosRuntimeControl.js.map +1 -1
- package/build/lib/eosTlsHttp.js +84 -0
- package/build/lib/eosTlsHttp.js.map +1 -1
- package/build/lib/eosUiProcessWorker.js +1 -0
- package/build/lib/eosUiProcessWorker.js.map +1 -1
- package/build/lib/web.js +18 -1
- package/build/lib/web.js.map +1 -1
- package/docs/reports/unified-9.0.26/ACTIVATION.md +50 -0
- package/docs/reports/unified-9.0.26/BACKUP_READINESS_REVIEW.md +30 -0
- package/docs/reports/unified-9.0.26/BACKUP_UI.md +69 -0
- package/docs/reports/unified-9.0.26/CHARGING_CLIENT_REVIEW.md +24 -0
- package/docs/reports/unified-9.0.26/EVCS_DELETE_UI_REVIEW.md +120 -0
- package/docs/reports/unified-9.0.26/EVCS_IDENTITY_REVIEW.md +47 -0
- package/docs/reports/unified-9.0.26/INDEPENDENT_REVIEW.md +114 -0
- package/docs/reports/unified-9.0.26/LIFECYCLE_REVIEW.md +47 -0
- package/docs/reports/unified-9.0.26/OCPP_DELETION_REVIEW.md +49 -0
- package/docs/reports/unified-9.0.26/PIPELINE_OFFLINE_ASSERTION_REVIEW.md +71 -0
- package/docs/reports/unified-9.0.26/PRUEFBERICHT.md +71 -0
- package/docs/reports/unified-9.0.26/PWA_TLS.md +43 -0
- package/docs/reports/unified-9.0.26/TARIFF_STARTUP.md +42 -0
- package/docs/reports/unified-9.0.26/installed-package/README.md +105 -0
- package/docs/reports/unified-9.0.26/installed-package/baseline925-git-export.json +31 -0
- package/docs/reports/unified-9.0.26/installed-package/baseline925-node22-install.log +15 -0
- package/docs/reports/unified-9.0.26/installed-package/baseline925-node22-lifecycle.log +17 -0
- package/docs/reports/unified-9.0.26/installed-package/baseline925-node22.log +26 -0
- package/docs/reports/unified-9.0.26/installed-package/baseline925-node24-lifecycle.log +17 -0
- package/docs/reports/unified-9.0.26/installed-package/baseline925-node24.log +10 -0
- package/docs/reports/unified-9.0.26/installed-package/diagnostic-node22.log +26 -0
- package/docs/reports/unified-9.0.26/installed-package/diagnostic-node24.log +10 -0
- package/docs/reports/unified-9.0.26/installed-package/registry925-comparison.json +18 -0
- package/docs/reports/unified-9.0.26/raw/INDEX.json +43 -0
- package/docs/reports/unified-9.0.26/raw/activation/INTERNAL_VISUAL_CHECKS.md +1 -0
- package/docs/reports/unified-9.0.26/raw/activation/eslint.log +0 -0
- package/docs/reports/unified-9.0.26/raw/activation/node22-browser.json +74 -0
- package/docs/reports/unified-9.0.26/raw/activation/node22-browser.stderr.log +2 -0
- package/docs/reports/unified-9.0.26/raw/activation/node22-real-processes.log +40 -0
- package/docs/reports/unified-9.0.26/raw/activation/node22-unit-http.log +196 -0
- package/docs/reports/unified-9.0.26/raw/activation/node24-browser.json +74 -0
- package/docs/reports/unified-9.0.26/raw/activation/node24-browser.stderr.log +0 -0
- package/docs/reports/unified-9.0.26/raw/activation/node24-module-http.log +18 -0
- package/docs/reports/unified-9.0.26/raw/activation/node24-tests.log +43 -0
- package/docs/reports/unified-9.0.26/raw/activation/typecheck.log +0 -0
- package/docs/reports/unified-9.0.26/raw/activation/verification.json +38 -0
- package/docs/reports/unified-9.0.26/raw/backup-ui/field-map.json +497 -0
- package/docs/reports/unified-9.0.26/raw/backup-ui/node22-browser.json +67 -0
- package/docs/reports/unified-9.0.26/raw/backup-ui/node22-browser.stderr.log +2 -0
- package/docs/reports/unified-9.0.26/raw/backup-ui/node24-browser.json +67 -0
- package/docs/reports/unified-9.0.26/raw/backup-ui/node24-browser.stderr.log +0 -0
- package/docs/reports/unified-9.0.26/raw/backup-ui/verification.json +32 -0
- package/docs/reports/unified-9.0.26/raw/build-and-static/FINAL_CHECKS.json +45 -0
- package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-build-backend-before-ems-tariff.log +5 -0
- package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-build-backend-delivery.log +5 -0
- package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-build-frontend.log +152 -0
- package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-build-installer.log +26 -0
- package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-build-modules.log +5 -0
- package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-build-ui-runtime-delivery.log +7 -0
- package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-build-ui-runtime.log +7 -0
- package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-lint-complete.log +45 -0
- package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-lint-delivery.log +45 -0
- package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-production-audit.json +77 -0
- package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-production-audit.stderr +1 -0
- package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-registry-check.json +7 -0
- package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-registry-check.stderr +9 -0
- package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-sbom-vendored.log +1 -0
- package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-typecheck-complete.log +5 -0
- package/docs/reports/unified-9.0.26/raw/build-and-static/eos926-typecheck-delivery.log +5 -0
- package/docs/reports/unified-9.0.26/raw/charging-control-client-review-hashes.json +10 -0
- package/docs/reports/unified-9.0.26/raw/charging-control-client-review-node22.log +86 -0
- package/docs/reports/unified-9.0.26/raw/charging-control-client-review-node24.log +20 -0
- package/docs/reports/unified-9.0.26/raw/charging-identity/node22.log +130 -0
- package/docs/reports/unified-9.0.26/raw/charging-identity/node24.log +27 -0
- package/docs/reports/unified-9.0.26/raw/charging-identity-review/PRODUCT_REVIEW.md +45 -0
- package/docs/reports/unified-9.0.26/raw/charging-identity-review/independent-probes.json +18 -0
- package/docs/reports/unified-9.0.26/raw/charging-identity-review/independent-probes.stderr +0 -0
- package/docs/reports/unified-9.0.26/raw/charging-identity-review/node24-tests.log +38 -0
- package/docs/reports/unified-9.0.26/raw/charging-identity-review/registry-ipc.json +24 -0
- package/docs/reports/unified-9.0.26/raw/charging-identity-review/review-probes.cjs +81 -0
- package/docs/reports/unified-9.0.26/raw/deletion-station-kiosk-node22.log +188 -0
- package/docs/reports/unified-9.0.26/raw/deletion-station-kiosk-node24.log +36 -0
- package/docs/reports/unified-9.0.26/raw/evcs-control-fence-node22.log +148 -0
- package/docs/reports/unified-9.0.26/raw/evcs-control-fence-node24.log +30 -0
- package/docs/reports/unified-9.0.26/raw/evcs-delete/browser-lint.log +0 -0
- package/docs/reports/unified-9.0.26/raw/evcs-delete/node22-browser.json +28 -0
- package/docs/reports/unified-9.0.26/raw/evcs-delete/node22-browser.log +3 -0
- package/docs/reports/unified-9.0.26/raw/evcs-delete/node22-client-handshake.log +112 -0
- package/docs/reports/unified-9.0.26/raw/evcs-delete/node22-pipeline-corrected.log +94 -0
- package/docs/reports/unified-9.0.26/raw/evcs-delete/node22-pipeline-diagnostic.log +27 -0
- package/docs/reports/unified-9.0.26/raw/evcs-delete/node22-pipeline-repro.log +94 -0
- package/docs/reports/unified-9.0.26/raw/evcs-delete/node22-pipeline-tick-probe.log +36 -0
- package/docs/reports/unified-9.0.26/raw/evcs-delete/node24-browser.json +28 -0
- package/docs/reports/unified-9.0.26/raw/evcs-delete/node24-browser.log +1 -0
- package/docs/reports/unified-9.0.26/raw/evcs-delete/node24-client-handshake.log +24 -0
- package/docs/reports/unified-9.0.26/raw/evcs-delete/node24-pipeline-corrected.log +23 -0
- package/docs/reports/unified-9.0.26/raw/evcs-delete/node24-pipeline-repro.log +23 -0
- package/docs/reports/unified-9.0.26/raw/evcs-delete/node24-pipeline-tick-probe.log +28 -0
- package/docs/reports/unified-9.0.26/raw/evcs-delete/pipeline-corrected-snapshot.json +23 -0
- package/docs/reports/unified-9.0.26/raw/evcs-delete/pipeline-lint.log +6 -0
- package/docs/reports/unified-9.0.26/raw/final-source-snapshot.json +16 -0
- package/docs/reports/unified-9.0.26/raw/git-vendor-source/node22.log +28 -0
- package/docs/reports/unified-9.0.26/raw/git-vendor-source/node24.log +10 -0
- package/docs/reports/unified-9.0.26/raw/git-vendor-source/verification.json +29 -0
- package/docs/reports/unified-9.0.26/raw/independent-review/GIT_ADDENDUM.json +20 -0
- package/docs/reports/unified-9.0.26/raw/independent-review/INDEX.json +76 -0
- package/docs/reports/unified-9.0.26/raw/independent-review/baseline925-artifacts-independent.json +16 -0
- package/docs/reports/unified-9.0.26/raw/independent-review/git-runtime-complete-node22.log +22 -0
- package/docs/reports/unified-9.0.26/raw/independent-review/git-runtime-complete-node24.log +9 -0
- package/docs/reports/unified-9.0.26/raw/independent-review/git-runtime-node24.log +9 -0
- package/docs/reports/unified-9.0.26/raw/independent-review/git-transport-independent.json +33 -0
- package/docs/reports/unified-9.0.26/raw/independent-review/npm-dry-run-file-inventory.json +16271 -0
- package/docs/reports/unified-9.0.26/raw/independent-review/npm-git-complete-inventory.json +40 -0
- package/docs/reports/unified-9.0.26/raw/independent-review/public-trust-node24.log +9 -0
- package/docs/reports/unified-9.0.26/raw/independent-review/runtime-lifecycle-import-node24.log +35 -0
- package/docs/reports/unified-9.0.26/raw/lifecycle/node22-baseline925.json +30 -0
- package/docs/reports/unified-9.0.26/raw/lifecycle/node22-candidate926.json +30 -0
- package/docs/reports/unified-9.0.26/raw/lifecycle/node24-baseline925.json +30 -0
- package/docs/reports/unified-9.0.26/raw/lifecycle/node24-candidate926.json +30 -0
- package/docs/reports/unified-9.0.26/raw/node22-tests-before-backup-git-regression.log +16035 -0
- package/docs/reports/unified-9.0.26/raw/node22-tests-before-backup-ui.log +16037 -0
- package/docs/reports/unified-9.0.26/raw/node22-tests-before-ems-tariff.log +16064 -0
- package/docs/reports/unified-9.0.26/raw/node22-tests-before-git-regression.log +16027 -0
- package/docs/reports/unified-9.0.26/raw/node22-tests-before-pipeline-fixture.log +11584 -0
- package/docs/reports/unified-9.0.26/raw/node22-tests-before-remap-noop.log +11581 -0
- package/docs/reports/unified-9.0.26/raw/node22-tests-final.log +16520 -0
- package/docs/reports/unified-9.0.26/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.26/raw/node24-tests-before-backup-git-regression.log +2678 -0
- package/docs/reports/unified-9.0.26/raw/node24-tests-before-backup-ui.log +2678 -0
- package/docs/reports/unified-9.0.26/raw/node24-tests-before-ems-tariff.log +1860 -0
- package/docs/reports/unified-9.0.26/raw/node24-tests-before-git-regression.log +2677 -0
- package/docs/reports/unified-9.0.26/raw/node24-tests-before-pipeline-fixture.log +1925 -0
- package/docs/reports/unified-9.0.26/raw/node24-tests-before-remap-noop.log +1924 -0
- package/docs/reports/unified-9.0.26/raw/node24-tests-final.log +2757 -0
- package/docs/reports/unified-9.0.26/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.26/raw/ocpp-deletion-node22.log +148 -0
- package/docs/reports/unified-9.0.26/raw/ocpp-deletion-node24.log +30 -0
- package/docs/reports/unified-9.0.26/raw/publish-overlay-provenance.json +10 -0
- package/docs/reports/unified-9.0.26/raw/pwa/INTERNAL_VISUAL_CHECKS.md +1 -0
- package/docs/reports/unified-9.0.26/raw/pwa/index.json +18 -0
- package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-baseline.log +48 -0
- package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-browser-node22.json +33 -0
- package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-browser-node22.stderr +5 -0
- package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-browser.json +33 -0
- package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-browser.stderr +2 -0
- package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-focused-node22.log +137 -0
- package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-focused-node24.log +32 -0
- package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-lint.log +0 -0
- package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-recovery-node22.log +28 -0
- package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-recovery-node24.log +10 -0
- package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-tls-final.log +9 -0
- package/docs/reports/unified-9.0.26/raw/pwa/pwa-926-typecheck.log +0 -0
- package/docs/reports/unified-9.0.26/raw/tariff-deletion-station-kiosk-node22.log +250 -0
- package/docs/reports/unified-9.0.26/raw/tariff-deletion-station-kiosk-node24.log +46 -0
- package/docs/reports/unified-9.0.26/raw/tariff-startup/PRODUCT_REVIEW.md +30 -0
- package/docs/reports/unified-9.0.26/raw/tariff-startup/browser-eslint.log +0 -0
- package/docs/reports/unified-9.0.26/raw/tariff-startup/eslint.log +0 -0
- package/docs/reports/unified-9.0.26/raw/tariff-startup/independent-review-node24.log +35 -0
- package/docs/reports/unified-9.0.26/raw/tariff-startup/node22-browser.json +43 -0
- package/docs/reports/unified-9.0.26/raw/tariff-startup/node22-browser.stderr +2 -0
- package/docs/reports/unified-9.0.26/raw/tariff-startup/node22-process-final.log +26 -0
- package/docs/reports/unified-9.0.26/raw/tariff-startup/node22-tests.log +378 -0
- package/docs/reports/unified-9.0.26/raw/tariff-startup/node24-browser.json +43 -0
- package/docs/reports/unified-9.0.26/raw/tariff-startup/node24-browser.stderr +0 -0
- package/docs/reports/unified-9.0.26/raw/tariff-startup/node24-process-final.log +10 -0
- package/docs/reports/unified-9.0.26/raw/tariff-startup/node24-tests.log +66 -0
- package/docs/reports/unified-9.0.26/raw/tariff-startup/process-verification.json +41 -0
- package/docs/reports/unified-9.0.26/raw/tariff-startup/typecheck.log +0 -0
- package/docs/unified/NEXOWATT_TLS_DE.md +12 -2
- package/io-package.json +8 -9
- package/modules/backup/admin/index.html +24 -95
- package/modules/backup/admin/index.js +350 -98
- package/modules/backup/admin/style.css +40 -0
- package/package.json +12 -8
- package/public/eos-runtime/index.js +12 -2
- package/public/eos-tls/index.html +1 -1
- package/public/eos-tls/trust.css +19 -0
- package/public/eos-tls/trust.html +52 -0
- package/release-manifests/unified/build-environment.cdx.json +6 -6
- package/release-manifests/unified/files.json +316 -126
- package/release-manifests/unified/frontend.cdx.json +6 -6
- package/release-manifests/unified/installer.cdx.json +2 -2
- package/release-manifests/unified/obsolete-admin-assets.json +539 -457
- package/release-manifests/unified/runtime.cdx.json +26 -26
- package/release-manifests/unified/validation.json +15 -15
- package/tools/eos-lifecycle-benchmark.cjs +50 -0
- package/tools/eos-release-manifest.cjs +1 -1
- package/ui/ems/engine.js +5 -1
- package/ui/io-package.json +1 -1
- package/ui/lib/charging-point-identity.js +465 -0
- package/ui/lib/charging-station-identity.js +111 -0
- package/ui/lib/ocpp-auto-discovery.js +34 -3
- package/ui/main.js +165 -29
- package/ui/package.json +1 -1
- package/ui/www/app.js +63 -18
- package/ui/www/customer-tariff.js +67 -11
- package/ui/www/dc-station-display.js +15 -11
- package/ui/www/ems-apps.js +40 -6
- package/ui/www/evcs.js +55 -12
- package/ui/www/login.html +1 -0
- package/ui/www/manifest.webmanifest +2 -2
- package/adminWww/remoteEntry-eos-9.0.25.js +0 -12
package/ui/main.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
8
|
*
|
|
9
9
|
* Quelle: src-ts/runtime-executables/main.ts
|
|
10
|
-
* Quell-Hash: sha256:
|
|
10
|
+
* Quell-Hash: sha256:bac2f47a42f00f3f4642fdf9764ffdfd2eb4f957049d3e27c49d3157e5acda58
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -82,6 +82,8 @@ const tariffProviderRegistry = require('./ems/services/tariff-provider-registry'
|
|
|
82
82
|
const { normalizeEvcsEnergyTotalKwh } = require('./ems/services/evcs-unit-conversion');
|
|
83
83
|
const { validateEvcsElectricalConfig } = require('./lib/evcs-electrical-limits');
|
|
84
84
|
const { OcppAutoDiscovery, planOcppDiscovery, normalizeOcppDiscovery, ocppDiscoveryPatterns, ocppStationRoot, ocppRootInScope, ocppNamespace } = require('./lib/ocpp-auto-discovery');
|
|
85
|
+
const { beginChargingControlWrite, bindChargingPointIdentityBaseline, chargingPointLayoutChanged, remapChargingPointDefaultModes, publicChargingControlIdentity, assertChargingControlIdentity } = require('./lib/charging-point-identity');
|
|
86
|
+
const { remapChargingStationAssignments } = require('./lib/charging-station-identity');
|
|
85
87
|
const { NotificationMail, validAddress } = require('./lib/notification-mail');
|
|
86
88
|
const { startOpenMeteoPvForecastRuntime, requestOpenMeteoJson, validateOpenMeteoWeather, safeOpenMeteoError, configuredOpenMeteoApiKey } = require('./ems/services/open-meteo-pv-forecast'), { AdminOverviewPublisher } = require('./ems/services/admin-overview-publisher');
|
|
87
89
|
/**
|
|
@@ -4755,6 +4757,7 @@ class NexoWattVis extends HostedAdapter {
|
|
|
4755
4757
|
}
|
|
4756
4758
|
|
|
4757
4759
|
async loadInstallerConfigFromState() {
|
|
4760
|
+
this._nwInstallerConfigHydrated = false;
|
|
4758
4761
|
const preservedMode = this.namespace !== this.hostNamespace && /^nexowatt-ui\.\d+$/.test(this.namespace);
|
|
4759
4762
|
const previous = { config: this.config, native: this._nwNativeConfigBase, patch: this._nwInstallerConfigPatch, rawPatch: this._nwInstallerConfigRawPatch };
|
|
4760
4763
|
try {
|
|
@@ -4822,6 +4825,9 @@ class NexoWattVis extends HostedAdapter {
|
|
|
4822
4825
|
await this.nwWriteUserdataBackup(patch, source === 'userdata' ? 'restore-userdata' : 'normalize');
|
|
4823
4826
|
} catch (_e5) {}
|
|
4824
4827
|
}
|
|
4828
|
+
// Read APIs may only confirm the persisted tariff after the entire load
|
|
4829
|
+
// (including a required first commit) succeeded, never native defaults.
|
|
4830
|
+
this._nwInstallerConfigHydrated = true;
|
|
4825
4831
|
|
|
4826
4832
|
} catch (e) {
|
|
4827
4833
|
this.config = previous.config;
|
|
@@ -4890,6 +4896,42 @@ class NexoWattVis extends HostedAdapter {
|
|
|
4890
4896
|
});
|
|
4891
4897
|
}
|
|
4892
4898
|
|
|
4899
|
+
/** Keep old index ownership durable before committing a changed point order.
|
|
4900
|
+
* The old engine and accepted customer writes are drained before snapshots;
|
|
4901
|
+
* Engine.init recovers/copies the journal before new controllers can start. */
|
|
4902
|
+
async _nwPrepareChargingPointReconfigure(nextConfig, restartEms) {
|
|
4903
|
+
const configuredRows = config => {
|
|
4904
|
+
const settings = config?.settingsConfig || {};
|
|
4905
|
+
const list = Array.isArray(settings.evcsList) ? settings.evcsList : [];
|
|
4906
|
+
const configuredCount = settings.evcsCount === undefined ? list.length : Number(settings.evcsCount);
|
|
4907
|
+
const count = Number.isFinite(configuredCount) ? Math.max(0, Math.min(50, Math.round(configuredCount))) : list.length;
|
|
4908
|
+
return Array.from({ length: count }, (_, index) => list[index] && typeof list[index] === 'object' ? list[index] : {});
|
|
4909
|
+
};
|
|
4910
|
+
const previous = Array.isArray(this.evcsList) ? this.evcsList : configuredRows(this.config);
|
|
4911
|
+
const desired = remapChargingPointDefaultModes(previous, configuredRows(nextConfig), this.namespace);
|
|
4912
|
+
const changed = chargingPointLayoutChanged(previous, desired, this.config?.chargeKiosk, nextConfig?.chargeKiosk, this.namespace);
|
|
4913
|
+
let stopped = false;
|
|
4914
|
+
const stopPrevious = async () => {
|
|
4915
|
+
this._nwEvcsIdentityTransitionPending = true;
|
|
4916
|
+
const previousEngine = this.emsEngine;
|
|
4917
|
+
if (previousEngine) {
|
|
4918
|
+
if (typeof previousEngine.stopForReconfigure !== 'function') throw new Error('EOS_EMS_STOP_UNCONFIRMED');
|
|
4919
|
+
await previousEngine.stopForReconfigure();
|
|
4920
|
+
if (this.emsEngine === previousEngine) this.emsEngine = null;
|
|
4921
|
+
}
|
|
4922
|
+
stopped = true;
|
|
4923
|
+
};
|
|
4924
|
+
if (changed || this._nwEvcsIdentityTransitionPending) await stopPrevious();
|
|
4925
|
+
await bindChargingPointIdentityBaseline(this, previous, desired, nextConfig?.chargeKiosk);
|
|
4926
|
+
const recovery = this._nwEvcsIdentityTransitionPending === true;
|
|
4927
|
+
if (recovery && !stopped) await stopPrevious();
|
|
4928
|
+
if (changed || recovery || stopped) {
|
|
4929
|
+
this._nwEvcsIdentityTransitionPending = true;
|
|
4930
|
+
return true;
|
|
4931
|
+
}
|
|
4932
|
+
return !!restartEms;
|
|
4933
|
+
}
|
|
4934
|
+
|
|
4893
4935
|
async _nwApplyInstallerRuntime(restartEms, reason) {
|
|
4894
4936
|
this._nwConfigureHistory();
|
|
4895
4937
|
const currentTariffModule = this.emsEngine?.mm?.modules?.find(entry => entry.key === 'tariffProvider')?.instance;
|
|
@@ -4954,6 +4996,7 @@ class NexoWattVis extends HostedAdapter {
|
|
|
4954
4996
|
const storageLicense = this._nwValidateStorageFarmLicense(next);
|
|
4955
4997
|
if (!storageLicense.ok) throw new Error(String(storageLicense.error || 'EOS_EMS_STORAGE_LICENSE_REQUIRED'));
|
|
4956
4998
|
await this._nwProvisionInstallerObjects(next);
|
|
4999
|
+
await this._nwPrepareChargingPointReconfigure(next, true);
|
|
4957
5000
|
assertReady();
|
|
4958
5001
|
if (plan.changed) {
|
|
4959
5002
|
if (await this.persistInstallerConfigToState(patch) === false) throw new Error('EOS_DEVICE_EMS_PERSIST_FAILED');
|
|
@@ -4965,7 +5008,7 @@ class NexoWattVis extends HostedAdapter {
|
|
|
4965
5008
|
assertReady();
|
|
4966
5009
|
if (this.emsEngine?.stopForReconfigure) await this.emsEngine.stopForReconfigure();
|
|
4967
5010
|
assertReady();
|
|
4968
|
-
this.config =
|
|
5011
|
+
this.config = this.nwApplyInstallerPatchToRuntimeConfig(this.config || {}, patch);
|
|
4969
5012
|
await this._nwApplyInstallerRuntime(true, 'device-commissioning');
|
|
4970
5013
|
this._nwDeviceEmsApplyPending = false;
|
|
4971
5014
|
try { await this.nwWriteUserdataBackup(patch, 'device-commissioning'); }
|
|
@@ -4992,6 +5035,7 @@ class NexoWattVis extends HostedAdapter {
|
|
|
4992
5035
|
const patch = this.nwDeepMerge(this._nwDeepClone(this._nwInstallerConfigPatch || {}), plan.patch);
|
|
4993
5036
|
const next = this.nwApplyInstallerPatchToRuntimeConfig(this.config || {}, patch);
|
|
4994
5037
|
await this._nwProvisionInstallerObjects(next);
|
|
5038
|
+
await this._nwPrepareChargingPointReconfigure(next, true);
|
|
4995
5039
|
assertReady();
|
|
4996
5040
|
if (plan.changed) {
|
|
4997
5041
|
if (await this.persistInstallerConfigToState(patch) === false) throw new Error('EOS_OCPP_DISCOVERY_PERSIST_FAILED');
|
|
@@ -5003,7 +5047,7 @@ class NexoWattVis extends HostedAdapter {
|
|
|
5003
5047
|
assertReady();
|
|
5004
5048
|
if (this.emsEngine?.stopForReconfigure) await awaitEmsTransition(this.emsEngine.stopForReconfigure());
|
|
5005
5049
|
assertReady();
|
|
5006
|
-
this.config =
|
|
5050
|
+
this.config = this.nwApplyInstallerPatchToRuntimeConfig(this.config || {}, patch);
|
|
5007
5051
|
await this._nwApplyInstallerRuntime(true, 'ocpp-discovery');
|
|
5008
5052
|
this._nwOcppApplyPending = false;
|
|
5009
5053
|
try { await this.nwWriteUserdataBackup(patch, 'ocpp-discovery'); }
|
|
@@ -5018,6 +5062,12 @@ class NexoWattVis extends HostedAdapter {
|
|
|
5018
5062
|
hostNamespace: this.hostNamespace,
|
|
5019
5063
|
readObjects: async () => Object.assign({}, ...await Promise.all(ocppDiscoveryPatterns(this.hostNamespace).map(pattern => this.getForeignObjectsAsync(pattern, 'state')))),
|
|
5020
5064
|
readMetadata: async () => Object.assign({}, ...await Promise.all(ocppDiscoveryPatterns(this.hostNamespace).map(pattern => this.getForeignStatesAsync(`${pattern}.info.*`)))),
|
|
5065
|
+
readSources: async () => ({
|
|
5066
|
+
instances: await this.getObjectViewAsync('system', 'instance', {
|
|
5067
|
+
startkey: 'system.adapter.ocpp21.', endkey: 'system.adapter.ocpp21.\u9999', limit: 129,
|
|
5068
|
+
}),
|
|
5069
|
+
hostedNamespace: this._bridge.getRuntimeReadiness?.()?.hostedOcppNamespace,
|
|
5070
|
+
}),
|
|
5021
5071
|
subscribe: () => Promise.all(ocppDiscoveryPatterns(this.hostNamespace).map(pattern => this.subscribeForeignStatesAsync(`${pattern}.info.*`))),
|
|
5022
5072
|
reconcile: stations => this.reconcileOcppDiscovery(stations),
|
|
5023
5073
|
canRun: () => !this._nwShuttingDown && this._bridge.canWrite() === true
|
|
@@ -5075,7 +5125,30 @@ class NexoWattVis extends HostedAdapter {
|
|
|
5075
5125
|
|
|
5076
5126
|
async persistInstallerConfigToState(patchObj) {
|
|
5077
5127
|
// Auch interne Save-/Importpfade dürfen verbindliche Mesh-Grenzen nicht lösen.
|
|
5078
|
-
|
|
5128
|
+
let nextRuntime = this.nwApplyInstallerPatchToRuntimeConfig(this.config, patchObj);
|
|
5129
|
+
const previousEvcsRows = this.config?.settingsConfig?.evcsList || [];
|
|
5130
|
+
const nextEvcsRows = nextRuntime?.settingsConfig?.evcsList || [];
|
|
5131
|
+
const persistedEvcsRows = this._nwInstallerConfigPatch?.settingsConfig?.evcsList;
|
|
5132
|
+
const submittedEvcsRows = patchObj?.settingsConfig?.evcsList;
|
|
5133
|
+
// Unrelated tariff/history saves must neither remap nor revalidate an
|
|
5134
|
+
// unchanged persisted point layout. Runtime-only normalization is not an
|
|
5135
|
+
// operator reassignment. A real persisted row change takes every guard.
|
|
5136
|
+
if (JSON.stringify(persistedEvcsRows === undefined ? previousEvcsRows : persistedEvcsRows)
|
|
5137
|
+
!== JSON.stringify(submittedEvcsRows === undefined ? nextEvcsRows : submittedEvcsRows)) {
|
|
5138
|
+
const remappedModes = remapChargingPointDefaultModes(previousEvcsRows, nextEvcsRows, this.namespace);
|
|
5139
|
+
if (remappedModes !== nextEvcsRows && patchObj && typeof patchObj === 'object') {
|
|
5140
|
+
patchObj.settingsConfig = { ...nextRuntime.settingsConfig, evcsList: remappedModes };
|
|
5141
|
+
nextRuntime = this.nwApplyInstallerPatchToRuntimeConfig(this.config, patchObj);
|
|
5142
|
+
}
|
|
5143
|
+
// A public station URL stays bound to its physical points when lpN indices
|
|
5144
|
+
// move. Persist its remapped manual/fallback list in this same config commit.
|
|
5145
|
+
const nextKiosk = remapChargingStationAssignments(previousEvcsRows, nextRuntime?.settingsConfig?.evcsList || [],
|
|
5146
|
+
this.config?.chargeKiosk, nextRuntime?.chargeKiosk, this.namespace);
|
|
5147
|
+
if (nextKiosk !== nextRuntime?.chargeKiosk && patchObj && typeof patchObj === 'object') {
|
|
5148
|
+
patchObj.chargeKiosk = nextKiosk;
|
|
5149
|
+
nextRuntime = this.nwApplyInstallerPatchToRuntimeConfig(this.config, patchObj);
|
|
5150
|
+
}
|
|
5151
|
+
}
|
|
5079
5152
|
this._meshCoordinator?.assertAppChange(nextRuntime);
|
|
5080
5153
|
assertPartnerPersistence(this.config || {}, nextRuntime);
|
|
5081
5154
|
if (!this._nwPartnerCommitInFlight && JSON.stringify(currentPartnerConfig(this.config)) !== JSON.stringify(currentPartnerConfig(nextRuntime))) {
|
|
@@ -12023,6 +12096,7 @@ async onReady() {
|
|
|
12023
12096
|
assertStartupAuthority();
|
|
12024
12097
|
return result;
|
|
12025
12098
|
};
|
|
12099
|
+
this._nwInstallerConfigHydrated = false;
|
|
12026
12100
|
this._hostedStartup = { state: 'starting', error: '' };
|
|
12027
12101
|
try {
|
|
12028
12102
|
if (!centralLicenseSnapshot(this._bridge).ok) {
|
|
@@ -16235,7 +16309,6 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
16235
16309
|
app.get('/api/installer/config', requireInstaller, async (_req, res) => {
|
|
16236
16310
|
try {
|
|
16237
16311
|
sendNoStore(res);
|
|
16238
|
-
const configurationRevision = this._nwInstallerConfigRevision();
|
|
16239
16312
|
// A license can be saved through the Admin tab while the App-Center is already open.
|
|
16240
16313
|
// Refresh the runtime license cache here before filtering apps. This also covers the
|
|
16241
16314
|
// startup edge case where the HTTP gate is open but _nwLicenseInfo has not yet been
|
|
@@ -16248,7 +16321,12 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
16248
16321
|
// system.adapter.<instance>.native. Persisting to native triggers an ioBroker instance restart
|
|
16249
16322
|
// and breaks the UI with "Failed to fetch" + SSE disconnects.
|
|
16250
16323
|
const nativeObj = (this.config && typeof this.config === 'object') ? this.config : {};
|
|
16251
|
-
|
|
16324
|
+
// Take the token and its configuration snapshot without an await between
|
|
16325
|
+
// them. Discovery may commit while license refresh/hydration is pending;
|
|
16326
|
+
// it must never pair newer rows with an older form revision.
|
|
16327
|
+
const configurationRevision = this._nwInstallerConfigRevision();
|
|
16328
|
+
const installerSnapshot = this._nwDeepClone(_nwPickPersistedInstallerConfig());
|
|
16329
|
+
let cfgOut = await _nwHydrateStorageFarmConfigFromRuntimeStates(installerSnapshot);
|
|
16252
16330
|
cfgOut = _nwMaskTariffProviderForUi(cfgOut);
|
|
16253
16331
|
// 1.0.3: Nur die an die UI gelieferte Kopie wird auf die aktuelle Edition
|
|
16254
16332
|
// begrenzt. Alte Pro-Konfigurationen bleiben intern erhalten, dürfen bei einer
|
|
@@ -16279,7 +16357,7 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
16279
16357
|
const body = req.body || {};
|
|
16280
16358
|
this._nwAssertInstallerConfigRevision(body.expectedConfigurationRevision);
|
|
16281
16359
|
const patch = body.patch && typeof body.patch === 'object' ? body.patch : {};
|
|
16282
|
-
|
|
16360
|
+
let restartEms = body.restartEms !== false; // identity changes always restart safely
|
|
16283
16361
|
const tokenError = nwValidateStationTokenChanges(patch);
|
|
16284
16362
|
if (tokenError) return res.status(400).json({ ok: false, error: 'invalid_station_token', message: tokenError });
|
|
16285
16363
|
|
|
@@ -16330,6 +16408,12 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
16330
16408
|
const gateResult = await _nwApplyInstallerRegressionSafetyGate(safePatch, basePatch);
|
|
16331
16409
|
const guardedPatch = gateResult && gateResult.patch ? gateResult.patch : safePatch;
|
|
16332
16410
|
let mergedPatch = this.nwDeepMerge(this.nwDeepMerge({}, basePatch), guardedPatch);
|
|
16411
|
+
// The explicit empty-list permission belongs to this accepted edit,
|
|
16412
|
+
// never to subsequent forms or background configuration changes.
|
|
16413
|
+
if (mergedPatch.settingsConfig && typeof mergedPatch.settingsConfig === 'object') {
|
|
16414
|
+
delete mergedPatch.settingsConfig.__allowEmptyEvcsList;
|
|
16415
|
+
delete mergedPatch.settingsConfig.__explicitDeleteAll;
|
|
16416
|
+
}
|
|
16333
16417
|
// Die Topologie ist ein atomarer Vertrag; kein partieller Deep-Merge mit
|
|
16334
16418
|
// alten Messpunkten, Stellhoheiten oder Schutzgrenzen.
|
|
16335
16419
|
if (Object.prototype.hasOwnProperty.call(safePatch, 'nvpTopology')) mergedPatch.nvpTopology = this._nwDeepClone(safePatch.nvpTopology);
|
|
@@ -16425,6 +16509,7 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
16425
16509
|
catch (error) { const failure = safeConfigurationFailure(error); return res.status(failure.status).json(failure.body); }
|
|
16426
16510
|
// Persist patch to states (no ioBroker restart)
|
|
16427
16511
|
await this._nwProvisionInstallerObjects(this.nwApplyInstallerPatchToRuntimeConfig(this.config, mergedPatch));
|
|
16512
|
+
restartEms = await this._nwPrepareChargingPointReconfigure(this.nwApplyInstallerPatchToRuntimeConfig(this.config, mergedPatch), restartEms);
|
|
16428
16513
|
if (await this.persistInstallerConfigToState(mergedPatch) === false) throw new Error('Installer-Konfiguration konnte nicht gespeichert werden.');
|
|
16429
16514
|
this._nwInstallerConfigPatch = mergedPatch;
|
|
16430
16515
|
|
|
@@ -16523,7 +16608,7 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
16523
16608
|
try {
|
|
16524
16609
|
const body = req.body || {};
|
|
16525
16610
|
this._nwAssertInstallerConfigRevision(body.expectedConfigurationRevision);
|
|
16526
|
-
|
|
16611
|
+
let restartEms = body.restartEms !== false; // identity changes always restart safely
|
|
16527
16612
|
const mode = String(body.mode || 'replace').toLowerCase(); // replace | merge
|
|
16528
16613
|
|
|
16529
16614
|
// Accept both a wrapped backup object or a raw patch.
|
|
@@ -16633,6 +16718,7 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
16633
16718
|
try { this._meshCoordinator?.assertAppChange(this.nwApplyInstallerPatchToRuntimeConfig(baseNative, finalPatch)); }
|
|
16634
16719
|
catch (error) { const failure = safeConfigurationFailure(error); return res.status(failure.status).json(failure.body); }
|
|
16635
16720
|
await this._nwProvisionInstallerObjects(this.nwApplyInstallerPatchToRuntimeConfig(baseNative, finalPatch));
|
|
16721
|
+
restartEms = await this._nwPrepareChargingPointReconfigure(this.nwApplyInstallerPatchToRuntimeConfig(baseNative, finalPatch), restartEms);
|
|
16636
16722
|
if (await this.persistInstallerConfigToState(finalPatch) === false) throw new Error('Installer-Import konnte nicht gespeichert werden.');
|
|
16637
16723
|
this._nwInstallerConfigPatch = finalPatch;
|
|
16638
16724
|
|
|
@@ -17356,6 +17442,13 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
17356
17442
|
const requireCustomerTariff = async (req, res, next) => {
|
|
17357
17443
|
if (!['customer', 'installer', 'admin'].includes(req.nwSession?.role)) return res.status(403).json({ ok: false, error: 'forbidden' });
|
|
17358
17444
|
if (!this._nwIsFeatureLicensed('dynamicTariffs')) return res.status(403).json({ ok: false, error: 'EOS_TARIFF_LICENSE_REQUIRED' });
|
|
17445
|
+
// Both reads and writes require a positively confirmed stored configuration.
|
|
17446
|
+
// HTTP/shell availability alone must never expose or overwrite native defaults.
|
|
17447
|
+
if (this._nwInstallerConfigHydrated !== true) {
|
|
17448
|
+
sendNoStore(res);
|
|
17449
|
+
const loading = ['idle', 'starting'].includes(this._hostedStartup?.state);
|
|
17450
|
+
return res.status(503).json({ ok: false, error: loading ? 'EOS_TARIFF_CONFIG_LOADING' : 'EOS_TARIFF_CONFIG_UNAVAILABLE' });
|
|
17451
|
+
}
|
|
17359
17452
|
return next();
|
|
17360
17453
|
};
|
|
17361
17454
|
const customerTariffSnapshot = () => {
|
|
@@ -21664,6 +21757,10 @@ const _nwDisplayBuildPayload = (station) => {
|
|
|
21664
21757
|
return {
|
|
21665
21758
|
ok: true,
|
|
21666
21759
|
generatedAt: now,
|
|
21760
|
+
chargingControlIdentity: (() => {
|
|
21761
|
+
const snapshot = publicChargingControlIdentity(this, list);
|
|
21762
|
+
return { revision: snapshot.revision, slots: Object.fromEntries(Object.entries(snapshot.slots).filter(([slot]) => assignedSet.has(slot))) };
|
|
21763
|
+
})(),
|
|
21667
21764
|
station: {
|
|
21668
21765
|
id: station.id,
|
|
21669
21766
|
name: station.name,
|
|
@@ -23205,6 +23302,7 @@ app.post('/api/display/station/:token/heartbeat', async (req, res) => {
|
|
|
23205
23302
|
});
|
|
23206
23303
|
|
|
23207
23304
|
app.post('/api/display/station/:token/command', async (req, res) => {
|
|
23305
|
+
let releaseChargingControl;
|
|
23208
23306
|
try {
|
|
23209
23307
|
sendNoStore(res);
|
|
23210
23308
|
if (!_nwDisplayIsLicensed()) return res.status(403).json({ ok: false, error: 'eos_required', message: 'DC Station Display ist nur in EOS verfügbar.' });
|
|
@@ -23243,6 +23341,8 @@ app.post('/api/display/station/:token/command', async (req, res) => {
|
|
|
23243
23341
|
return res.status(409).json({ ok: false, error: 'global_storage_control_required', message: 'Der Speicherschutz wird zentral auf der EVCS-Seite gesteuert.' });
|
|
23244
23342
|
}
|
|
23245
23343
|
|
|
23344
|
+
releaseChargingControl = beginChargingControlWrite(this);
|
|
23345
|
+
assertChargingControlIdentity(this, lp, body);
|
|
23246
23346
|
const commandTs = Date.now();
|
|
23247
23347
|
await _nwDisplayWriteStationState(station.id, 'lastTouch', commandTs, true);
|
|
23248
23348
|
await _nwDisplayWriteStationState(station.id, 'lastCommand', `${action}:${lp}:${mode}`, true);
|
|
@@ -23258,6 +23358,11 @@ app.post('/api/display/station/:token/command', async (req, res) => {
|
|
|
23258
23358
|
await _nwDisplayPersistSessionOperatorStates(station, payload);
|
|
23259
23359
|
return res.json({ ok: true, accepted: true, action, lp, mode, bridge: bridgeResult.bridge, controlProfile: bridgeResult.controlProfile, manufacturerOpen: true, payload });
|
|
23260
23360
|
} catch (e) {
|
|
23361
|
+
if (e && ['EOS_EVCS_IDENTITY_BUSY', 'EOS_EVCS_IDENTITY_CHANGED'].includes(e.code)) {
|
|
23362
|
+
return res.status(409).json({ ok: false, error: e.code, message: e.code === 'EOS_EVCS_IDENTITY_CHANGED'
|
|
23363
|
+
? 'Die Ladepunktzuordnung wurde geändert. Bitte die Seite neu laden und den Ladepunkt erneut auswählen.'
|
|
23364
|
+
: 'Die Ladepunktzuordnung wird gerade aktualisiert. Bitte anschließend erneut bedienen.' });
|
|
23365
|
+
}
|
|
23261
23366
|
try {
|
|
23262
23367
|
const station = _nwDisplayFindStation(req.params && req.params.token);
|
|
23263
23368
|
if (station) {
|
|
@@ -23268,12 +23373,16 @@ app.post('/api/display/station/:token/command', async (req, res) => {
|
|
|
23268
23373
|
}
|
|
23269
23374
|
} catch (_e) {}
|
|
23270
23375
|
return res.status(500).json({ ok: false, error: 'internal_error', message: 'Anfrage konnte intern nicht verarbeitet werden.' });
|
|
23376
|
+
} finally {
|
|
23377
|
+
if (releaseChargingControl) releaseChargingControl();
|
|
23271
23378
|
}
|
|
23272
23379
|
});
|
|
23273
23380
|
app.get('/api/locale', nwLocaleApiService.createLocaleHandler(this, sendNoStore));
|
|
23274
23381
|
|
|
23275
23382
|
// API-Kommentar: GET-Route. Zweck: stellt einen Web-/API-Endpunkt bereit. Zusammenhang: Frontend-Dateien in www/* können diesen Endpunkt direkt nutzen. Route/Handler: '/config', (req, res) => {
|
|
23276
23383
|
app.get('/config', async (req, res) => {
|
|
23384
|
+
// Resolve access before taking the synchronous rows/identity snapshot.
|
|
23385
|
+
const sess = authEnabled ? await resolveAccess(req) : null;
|
|
23277
23386
|
// UI flags: treat missing (undefined) EMS module flags as sensible defaults.
|
|
23278
23387
|
// This avoids "legacy" fallbacks in the EVCS UI on upgrades where config flags
|
|
23279
23388
|
// were not persisted yet.
|
|
@@ -23498,9 +23607,8 @@ app.get('/config', async (req, res) => {
|
|
|
23498
23607
|
return evcsAvailableEffective;
|
|
23499
23608
|
};
|
|
23500
23609
|
|
|
23501
|
-
const sess = authEnabled ? await resolveAccess(req) : null;
|
|
23502
|
-
|
|
23503
23610
|
const nwConfigPayload = {
|
|
23611
|
+
chargingControlIdentity: publicChargingControlIdentity(this, evcsListForConfig),
|
|
23504
23612
|
tariffDisplay: tariffDisplayConfig(cfg, this.namespace),
|
|
23505
23613
|
locale: this._nwBuildLocaleInfo(),
|
|
23506
23614
|
countryProfile: this._nwBuildCountryProfileInfo(),
|
|
@@ -24702,11 +24810,23 @@ settingsConfig: {
|
|
|
24702
24810
|
// generic setter for customer-facing settings and commands
|
|
24703
24811
|
// API-Kommentar: POST-Route. Zweck: stellt einen Web-/API-Endpunkt bereit. Zusammenhang: Frontend-Dateien in www/* können diesen Endpunkt direkt nutzen. Route/Handler: '/api/set', requireAuth, async (req, res) => {
|
|
24704
24812
|
app.post('/api/set', requireAuth, async (req, res) => {
|
|
24813
|
+
let releaseChargingControl;
|
|
24705
24814
|
try {
|
|
24706
24815
|
const scope = req.body && req.body.scope;
|
|
24707
24816
|
const key = req.body && req.body.key;
|
|
24708
24817
|
const value = req.body && req.body.value;
|
|
24709
24818
|
if (!['settings', 'installer', 'ems', 'bhkw', 'generator', 'threshold', 'relay', 'evcs', 'rfid', 'flow', 'storageFarm'].includes(scope) || typeof key !== 'string' || !key || key.length > 256) return res.status(400).json({ ok: false, error: 'bad request' });
|
|
24819
|
+
if (scope === 'ems' || scope === 'evcs' || (scope === 'settings' && /^evcs/i.test(key))) {
|
|
24820
|
+
releaseChargingControl = beginChargingControlWrite(this);
|
|
24821
|
+
// Bind to the identity rendered by the caller, before any asynchronous
|
|
24822
|
+
// plan/read can let a configuration change replace this index.
|
|
24823
|
+
const point = scope === 'ems'
|
|
24824
|
+
? key.match(/^(?:evcs\.)?(\d+)\./i) || key.match(/^(?:chargingManagement\.(?:wallboxes\.)?)?lp(\d+)\./i)
|
|
24825
|
+
: scope === 'evcs' ? key.match(/^(?:evcs\.)?(\d+)\./i) : null;
|
|
24826
|
+
const global = scope === 'settings' || /^(?:evcs\.)?(?:global|all)\./i.test(key);
|
|
24827
|
+
if (point) assertChargingControlIdentity(this, `lp${Number(point[1])}`, req.body);
|
|
24828
|
+
else if (global) assertChargingControlIdentity(this, null, req.body);
|
|
24829
|
+
}
|
|
24710
24830
|
|
|
24711
24831
|
if (scope === 'settings' && key === 'email' && String(value || '').trim() && !validAddress(String(value).trim())) return res.status(400).json({ ok: false, error: 'Bitte eine einzelne gültige E-Mail-Adresse eingeben.' });
|
|
24712
24832
|
|
|
@@ -24852,6 +24972,10 @@ settingsConfig: {
|
|
|
24852
24972
|
}
|
|
24853
24973
|
}
|
|
24854
24974
|
if (!safe || !prop) return res.status(400).json({ ok: false, error: 'bad request' });
|
|
24975
|
+
// The compatibility spelling must still address a configured lpN,
|
|
24976
|
+
// never create an unbound named control that bypasses identity checks.
|
|
24977
|
+
if (/^lp\d+$/i.test(safe)) safe = `lp${Number(safe.slice(2))}`;
|
|
24978
|
+
else assertChargingControlIdentity(this, safe, req.body);
|
|
24855
24979
|
|
|
24856
24980
|
// Kundenseitige Freigabe der physischen Ladestation. Dieser State ist
|
|
24857
24981
|
// bewusst vom Connector-/Fahrzeugstatus (`activeId`) und von der
|
|
@@ -26028,8 +26152,15 @@ settingsConfig: {
|
|
|
26028
26152
|
}
|
|
26029
26153
|
res.json({ ok: true });
|
|
26030
26154
|
} catch (e) {
|
|
26155
|
+
if (e && ['EOS_EVCS_IDENTITY_BUSY', 'EOS_EVCS_IDENTITY_CHANGED'].includes(e.code)) {
|
|
26156
|
+
return res.status(409).json({ ok: false, error: e.code, message: e.code === 'EOS_EVCS_IDENTITY_CHANGED'
|
|
26157
|
+
? 'Die Ladepunktzuordnung wurde geändert. Bitte die Seite neu laden und den Ladepunkt erneut auswählen.'
|
|
26158
|
+
: 'Die Ladepunktzuordnung wird gerade aktualisiert. Bitte anschließend erneut bedienen.' });
|
|
26159
|
+
}
|
|
26031
26160
|
this.log.warn('set error: ' + e.message);
|
|
26032
26161
|
res.status(500).json({ ok: false, error: 'internal error' });
|
|
26162
|
+
} finally {
|
|
26163
|
+
if (releaseChargingControl) releaseChargingControl();
|
|
26033
26164
|
}
|
|
26034
26165
|
});
|
|
26035
26166
|
|
|
@@ -27663,7 +27794,7 @@ return res.json(out);
|
|
|
27663
27794
|
/**
|
|
27664
27795
|
* Ablauf und Zusammenhang: Übernimmt ioBroker-Ereignisse in die Adapter-Laufzeit und verteilt relevante Änderungen an Anzeige, Einstellungen und Regelung. Bestätigte Messwerte und Bedien-Schreibwünsche dürfen dabei nicht verwechselt werden.
|
|
27665
27796
|
*/
|
|
27666
|
-
onStateChange(id, state) {
|
|
27797
|
+
async onStateChange(id, state) {
|
|
27667
27798
|
if (this._nwShuttingDown) return;
|
|
27668
27799
|
this._ocppAutoDiscovery?.onStateChange(id, state);
|
|
27669
27800
|
if (state && state.ack === false && String(id).startsWith(this.namespace + '.')
|
|
@@ -27758,33 +27889,38 @@ return res.json(out);
|
|
|
27758
27889
|
}
|
|
27759
27890
|
} catch (_e) {}
|
|
27760
27891
|
|
|
27761
|
-
//
|
|
27892
|
+
// Compatibility mirrors participate in the same drain as HTTP commands.
|
|
27893
|
+
// Copying a journal uses ack:true and writes both representations itself.
|
|
27894
|
+
let releaseModeMirror;
|
|
27762
27895
|
try {
|
|
27763
|
-
|
|
27764
|
-
|
|
27765
|
-
|
|
27766
|
-
|
|
27767
|
-
|
|
27896
|
+
const legacyMode = key && key.match(/^evcs\.(\d+)\.mode$/);
|
|
27897
|
+
const userModeState = key && key.match(/^chargingManagement\.wallboxes\.lp(\d+)\.userMode$/);
|
|
27898
|
+
if ((legacyMode && (state.ack === false || !this._nwIsOwnStateId(id))) || userModeState) {
|
|
27899
|
+
releaseModeMirror = beginChargingControlWrite(this);
|
|
27900
|
+
if (legacyMode && state.ack === false) {
|
|
27901
|
+
const idx = Number(legacyMode[1]);
|
|
27768
27902
|
const mv = Number(state.val);
|
|
27769
27903
|
const userMode = (mv === 1) ? 'boost' : (mv === 2) ? 'minpv' : (mv === 3) ? 'pv' : 'auto';
|
|
27770
27904
|
const userModeKey = `chargingManagement.wallboxes.lp${idx}.userMode`;
|
|
27771
|
-
this.setStateAsync(userModeKey, userMode, false)
|
|
27772
|
-
|
|
27905
|
+
await this.setStateAsync(userModeKey, userMode, false);
|
|
27906
|
+
this.updateValue(userModeKey, userMode, Number(state.ts) || Date.now());
|
|
27773
27907
|
this._nwRequestImmediateEmsTick(`state:${userModeKey}`);
|
|
27774
27908
|
}
|
|
27775
|
-
|
|
27776
|
-
|
|
27777
|
-
|
|
27778
|
-
if (
|
|
27779
|
-
const idx = Number(
|
|
27780
|
-
const
|
|
27781
|
-
const
|
|
27782
|
-
this.setStateAsync(`evcs.${idx}.mode`,
|
|
27909
|
+
if (legacyMode && ((!this._nwIsOwnStateId(id) && !evcsMappedAlreadyHandled) || state.ack === false)) {
|
|
27910
|
+
await this.setStateAsync(key, normalizedMappedValue, true);
|
|
27911
|
+
}
|
|
27912
|
+
if (userModeState) {
|
|
27913
|
+
const idx = Number(userModeState[1]);
|
|
27914
|
+
const value = String(state.val ?? '').toLowerCase();
|
|
27915
|
+
const numeric = value === 'boost' ? 1 : value === 'minpv' ? 2 : value === 'pv' ? 3 : 0;
|
|
27916
|
+
await this.setStateAsync(`evcs.${idx}.mode`, numeric, true);
|
|
27783
27917
|
}
|
|
27784
27918
|
}
|
|
27785
|
-
} catch (
|
|
27919
|
+
} catch (error) {
|
|
27920
|
+
if (error?.code !== 'EOS_EVCS_IDENTITY_BUSY') this.log.warn('EOS_EVCS_MODE_MIRROR_FAILED');
|
|
27921
|
+
} finally { releaseModeMirror?.(); }
|
|
27786
27922
|
|
|
27787
|
-
if (key && key.startsWith('evcs.')) {
|
|
27923
|
+
if (key && key.startsWith('evcs.') && !/^evcs\.\d+\.mode$/.test(key)) {
|
|
27788
27924
|
const ownState = this._nwIsOwnStateId(id);
|
|
27789
27925
|
// Externe Quellen werden durch den robusten EVCS-Publisher gespiegelt.
|
|
27790
27926
|
// Eigene writeable EVCS-States werden nur bei ack=false quittiert; ack=true-
|
package/ui/package.json
CHANGED