iobroker.eos-admin 9.0.30 → 9.0.33
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 -12
- package/README.md +11 -11
- package/adminWww/.vite/manifest.json +39 -39
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +111 -110
- package/adminWww/apple-touch-icon-eos-v2.png +0 -0
- package/adminWww/apple-touch-icon.png +0 -0
- package/adminWww/assets/{AdapterUpdateDialog-qC6MANmq.js → AdapterUpdateDialog-DBUqmmyD.js} +1 -1
- package/adminWww/assets/{Adapters-C8quekd0.js → Adapters-dDEp7o5h.js} +1 -1
- package/adminWww/assets/{ConfigManager-hRZCAWRy.js → ConfigManager-DbqTWi2N.js} +1 -1
- package/adminWww/assets/{Enums-Dd0Z2KfV.js → Enums-DjldGElU.js} +1 -1
- package/adminWww/assets/{Fields-WfHFtdYw.js → Fields-0GsPCJeU.js} +1 -1
- package/adminWww/assets/{Files-DyG14v5-.js → Files-COnUtEbg.js} +1 -1
- package/adminWww/assets/{Hosts-3pSXVMxW.js → Hosts-CwU1LujG.js} +1 -1
- package/adminWww/assets/{Instances-DT6fp_TN.js → Instances-CUX5mxMQ.js} +1 -1
- package/adminWww/assets/{Intro-C6pMFhbu.js → Intro-BhQmHn3A.js} +1 -1
- package/adminWww/assets/{Logs-suepwNkZ.js → Logs-B5SpNqHq.js} +1 -1
- package/adminWww/assets/{Objects-CpjVeEjv.js → Objects-COg_cFkz.js} +1 -1
- package/adminWww/assets/{Overview-CxZJgF7X.js → Overview-CitzUjBF.js} +1 -1
- package/adminWww/assets/{State-CUsia7sz.js → State-D5ljzf-T.js} +1 -1
- package/adminWww/assets/{UsedResources-C3zr7pM8.js → UsedResources-BY_NF2wB.js} +1 -1
- package/adminWww/assets/{Users-BoBSUBkO.js → Users-Cu93_-VF.js} +1 -1
- package/adminWww/assets/{bootstrap-CM9qXoc1.js → bootstrap-Dwfxhm2V.js} +3 -3
- package/adminWww/assets/{hostInit-BQPg9kSQ.js → hostInit-3BbTwhaZ.js} +1 -1
- package/adminWww/assets/{icons-material-CDhwkQ0o.js → icons-material-DjqX0l_7.js} +1 -1
- package/adminWww/assets/{index-BrXN_pu2.js → index-nddph2Sl.js} +2 -2
- package/adminWww/assets/{installSVGRenderer-BEgWxsNI.js → installSVGRenderer-CPDIwFAL.js} +1 -1
- package/adminWww/assets/{mf-entry-bootstrap-0-3ef6056c.js → mf-entry-bootstrap-0-d1f0f40f.js} +2 -2
- package/adminWww/index.html +24 -24
- package/adminWww/mf-manifest.json +1 -1
- package/adminWww/mf-stats.json +1 -1
- package/adminWww/remoteEntry-eos-9.0.33.js +12 -0
- package/adminWww/remoteEntry.js +1 -1
- package/build/lib/eosUiProcess.js +31 -14
- package/build/lib/eosUiProcess.js.map +1 -1
- package/build/lib/eosUiProcessRpc.js +3 -1
- package/build/lib/eosUiProcessRpc.js.map +1 -1
- package/build/lib/eosUiProcessWorker.js +6 -4
- package/build/lib/eosUiProcessWorker.js.map +1 -1
- package/build/lib/web.js +9 -8
- package/build/lib/web.js.map +1 -1
- package/docs/README.md +3 -2
- package/docs/reports/unified-9.0.31/PRUEFBERICHT.md +22 -0
- package/docs/reports/unified-9.0.31/PRUEFERGEBNISSE.json +112 -0
- package/docs/reports/unified-9.0.31/raw/INDEX.json +102 -0
- package/docs/reports/unified-9.0.31/raw/backend.log +5 -0
- package/docs/reports/unified-9.0.31/raw/branding-build-node22.log +59 -0
- package/docs/reports/unified-9.0.31/raw/branding-node24.log +17 -0
- package/docs/reports/unified-9.0.31/raw/frontend.log +151 -0
- package/docs/reports/unified-9.0.31/raw/https-build-node22.log +235 -0
- package/docs/reports/unified-9.0.31/raw/https-node24.log +46 -0
- package/docs/reports/unified-9.0.31/raw/installer.log +26 -0
- package/docs/reports/unified-9.0.31/raw/lint.log +5 -0
- package/docs/reports/unified-9.0.31/raw/modules.log +5 -0
- package/docs/reports/unified-9.0.31/raw/node22-tests-final.log +17170 -0
- package/docs/reports/unified-9.0.31/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.31/raw/node24-tests-final.log +2862 -0
- package/docs/reports/unified-9.0.31/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.31/raw/typecheck.log +5 -0
- package/docs/reports/unified-9.0.31/raw/ui-runtime.log +8 -0
- package/docs/reports/unified-9.0.31/raw/web-lint.log +0 -0
- package/docs/reports/unified-9.0.32/PRUEFBERICHT.md +34 -0
- package/docs/reports/unified-9.0.32/PRUEFERGEBNISSE.json +112 -0
- package/docs/reports/unified-9.0.32/raw/INDEX.json +102 -0
- package/docs/reports/unified-9.0.32/raw/backend.log +5 -0
- package/docs/reports/unified-9.0.32/raw/browser-cadence-headless.json +63 -0
- package/docs/reports/unified-9.0.32/raw/browser-flow-headless.json +328 -0
- package/docs/reports/unified-9.0.32/raw/focused.log +67 -0
- package/docs/reports/unified-9.0.32/raw/frontend.log +151 -0
- package/docs/reports/unified-9.0.32/raw/installer.log +26 -0
- package/docs/reports/unified-9.0.32/raw/lint.log +5 -0
- package/docs/reports/unified-9.0.32/raw/modules.log +5 -0
- package/docs/reports/unified-9.0.32/raw/node22-tests-final.log +17212 -0
- package/docs/reports/unified-9.0.32/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.32/raw/node24-tests-final.log +2869 -0
- package/docs/reports/unified-9.0.32/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.32/raw/sbom.log +2 -0
- package/docs/reports/unified-9.0.32/raw/typecheck.log +5 -0
- package/docs/reports/unified-9.0.32/raw/ui-runtime.log +8 -0
- package/docs/reports/unified-9.0.32/raw/version-parity-928-929.log +6 -0
- package/docs/reports/unified-9.0.33/PRUEFBERICHT.md +60 -0
- package/docs/reports/unified-9.0.33/PRUEFERGEBNISSE.json +112 -0
- package/docs/reports/unified-9.0.33/raw/INDEX.json +272 -0
- package/docs/reports/unified-9.0.33/raw/backend.log +5 -0
- package/docs/reports/unified-9.0.33/raw/browser/UI_REVIEW.json +147 -0
- package/docs/reports/unified-9.0.33/raw/browser/admin-bundle.log +136 -0
- package/docs/reports/unified-9.0.33/raw/browser/eos-backup-settings-browser.log +67 -0
- package/docs/reports/unified-9.0.33/raw/browser/eos-customer-tariff-startup-browser.log +43 -0
- package/docs/reports/unified-9.0.33/raw/browser/eos-energyflow-browser-smoke.log +438 -0
- package/docs/reports/unified-9.0.33/raw/browser/eos-energyflow-cadence-browser-10s.log +108 -0
- package/docs/reports/unified-9.0.33/raw/browser/eos-evcs-delete-browser.log +1 -0
- package/docs/reports/unified-9.0.33/raw/browser/eos-history-setup-browser-smoke.log +49 -0
- package/docs/reports/unified-9.0.33/raw/browser/eos-kiosk-browser.log +59 -0
- package/docs/reports/unified-9.0.33/raw/browser/eos-ocpp-admin-browser.log +71 -0
- package/docs/reports/unified-9.0.33/raw/browser/eos-ocpp-installer-discovery-browser.log +11 -0
- package/docs/reports/unified-9.0.33/raw/browser/eos-pwa-trust-browser.log +35 -0
- package/docs/reports/unified-9.0.33/raw/browser/eos-runtime-controls-browser.log +78 -0
- package/docs/reports/unified-9.0.33/raw/browser/eos-runtime-health-browser.log +49 -0
- package/docs/reports/unified-9.0.33/raw/browser/eos-runtime-login-browser.log +34 -0
- package/docs/reports/unified-9.0.33/raw/browser/smarthome.log +46 -0
- package/docs/reports/unified-9.0.33/raw/browser-ten-seconds.json +108 -0
- package/docs/reports/unified-9.0.33/raw/changed-test-coverage.json +116 -0
- package/docs/reports/unified-9.0.33/raw/connected-control-node22.jsonl +42 -0
- package/docs/reports/unified-9.0.33/raw/connected-control-summary-node22.json +103 -0
- package/docs/reports/unified-9.0.33/raw/connected-control-summary.json +103 -0
- package/docs/reports/unified-9.0.33/raw/connected-control.jsonl +42 -0
- package/docs/reports/unified-9.0.33/raw/display-ui-node22.log +162 -0
- package/docs/reports/unified-9.0.33/raw/display-ui.log +35 -0
- package/docs/reports/unified-9.0.33/raw/frontend.log +151 -0
- package/docs/reports/unified-9.0.33/raw/git-delivery-fix.log +10 -0
- package/docs/reports/unified-9.0.33/raw/installer.log +26 -0
- package/docs/reports/unified-9.0.33/raw/license-central-node24.log +173 -0
- package/docs/reports/unified-9.0.33/raw/lint-final.log +45 -0
- package/docs/reports/unified-9.0.33/raw/modules.log +5 -0
- package/docs/reports/unified-9.0.33/raw/node22-npm-version.log +1 -0
- package/docs/reports/unified-9.0.33/raw/node22-tests-final.log +17646 -0
- package/docs/reports/unified-9.0.33/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.33/raw/node24-npm-version.log +1 -0
- package/docs/reports/unified-9.0.33/raw/node24-tests-final.log +2941 -0
- package/docs/reports/unified-9.0.33/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.33/raw/process-final-node22.log +220 -0
- package/docs/reports/unified-9.0.33/raw/process-final-node24.log +110 -0
- package/docs/reports/unified-9.0.33/raw/ram-picker.jsonl +12 -0
- package/docs/reports/unified-9.0.33/raw/reg-combined-node22.log +622 -0
- package/docs/reports/unified-9.0.33/raw/reg-combined.log +108 -0
- package/docs/reports/unified-9.0.33/raw/sbom-final.log +8 -0
- package/docs/reports/unified-9.0.33/raw/tariff-update-all-final-node22.log +1185 -0
- package/docs/reports/unified-9.0.33/raw/typecheck-final.log +5 -0
- package/docs/reports/unified-9.0.33/raw/ui-functional-node24.log +430 -0
- package/docs/reports/unified-9.0.33/raw/ui-runtime-final-verification.log +1 -0
- package/docs/reports/unified-9.0.33/raw/update-controller-standard-7-2-5.log +4 -0
- package/docs/reports/unified-9.0.33/raw/worker-memory-eos933.log +12 -0
- package/docs/reports/unified-9.0.33/raw/worker-memory-flow932.log +12 -0
- package/docs/start/START_HIER_9.0.31.md +16 -0
- package/docs/start/START_HIER_9.0.32.md +16 -0
- package/docs/start/START_HIER_9.0.33.md +32 -0
- package/io-package.json +16 -16
- package/package.json +10 -5
- package/public/eos-tls/trust.html +1 -1
- package/release-manifests/unified/build-environment.cdx.json +6 -6
- package/release-manifests/unified/files.json +259 -157
- package/release-manifests/unified/frontend.cdx.json +6 -6
- package/release-manifests/unified/installer.cdx.json +6 -6
- package/release-manifests/unified/obsolete-admin-assets.json +341 -88
- package/release-manifests/unified/runtime.cdx.json +26 -26
- package/release-manifests/unified/validation.json +15 -15
- package/tools/eos-release-manifest.cjs +2 -2
- package/ui/ems/consumers/sg-ready.js +26 -6
- package/ui/ems/datapoints.js +12 -4
- package/ui/ems/modules/charging-management.js +58 -67
- package/ui/ems/modules/core-limits.js +59 -36
- package/ui/ems/modules/prime-mover-control.js +141 -29
- package/ui/ems/modules/storage-control.js +31 -38
- package/ui/ems/modules/storage-mapping.js +14 -13
- package/ui/ems/modules/tarif-vis.js +38 -56
- package/ui/ems/services/measurement-freshness.js +58 -21
- package/ui/ems/services/safety-envelope.js +13 -6
- package/ui/io-package.json +13 -1
- package/ui/lib/datapoint-picker.js +27 -20
- package/ui/lib/eos-presentation-routes.js +2 -5
- package/ui/lib/tariff-price.js +7 -1
- package/ui/lib/ts-mirrors/ems/core-limits/core-runtime.js +5 -1
- package/ui/lib/ui-access-policy.js +12 -3
- package/ui/main.js +280 -190
- package/ui/package.json +4 -3
- package/ui/www/app.js +207 -87
- package/ui/www/ems-apps.html +1 -1
- package/ui/www/ems-apps.js +3 -2
- package/ui/www/energy-ledger.html +1 -1
- package/ui/www/evcs.html +1 -1
- package/ui/www/history.html +1 -1
- package/ui/www/index.html +2 -1
- package/ui/www/live-display.js +38 -4
- package/ui/www/logic.html +1 -1
- package/ui/www/login.html +1 -1
- package/ui/www/manifest.webmanifest +2 -2
- package/ui/www/power-measurements.js +28 -3
- package/ui/www/settings.html +1 -1
- package/ui/www/simulation.html +1 -1
- package/ui/www/smarthome-config.html +1 -1
- package/ui/www/smarthome.html +1 -1
- package/ui/www/storagefarm.html +1 -1
- package/adminWww/remoteEntry-eos-9.0.30.js +0 -12
|
@@ -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:1ef6a702f33390e7f72332ae2b9b20ed5b1d0f04bbb5b8e626592756d54563a5
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
'use strict';
|
|
75
75
|
|
|
76
76
|
const { BaseModule } = require('./base');
|
|
77
|
-
const { tariffPriceUnit, normalizeTariffPrice } = require('../../lib/tariff-price');
|
|
77
|
+
const { tariffPriceUnit, normalizeTariffPrice, verifiedTariffAgeMs } = require('../../lib/tariff-price');
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* Speicher-Netzladen ist strikt an einen frischen, aktiven und als „günstig“
|
|
@@ -981,10 +981,6 @@ class TarifVisModule extends BaseModule {
|
|
|
981
981
|
}
|
|
982
982
|
|
|
983
983
|
async tick() {
|
|
984
|
-
// VIS-Einstellungen sind Konfigurationswerte und müssen dauerhaft gültig bleiben.
|
|
985
|
-
// Wenn diese nach kurzer Zeit als "stale" gelten, fällt die Logik auf Fallbacks zurück
|
|
986
|
-
// (z.B. Manual-Preis = null) und die Tarifsteuerung wirkt "inaktiv".
|
|
987
|
-
const staleTimeoutMs = 365 * 24 * 60 * 60 * 1000; // 1 Jahr
|
|
988
984
|
// Aktueller Preis und Day-Ahead-Kurve haben unterschiedliche Lebenszeiten:
|
|
989
985
|
// - der aktuelle Stundenpreis darf standardmäßig höchstens 90 Minuten alt sein;
|
|
990
986
|
// - Durchschnitt und Day-Ahead-Kurve dürfen bis zu 36 Stunden alt sein.
|
|
@@ -1000,18 +996,16 @@ class TarifVisModule extends BaseModule {
|
|
|
1000
996
|
|
|
1001
997
|
try {
|
|
1002
998
|
// --- VIS Settings ---
|
|
1003
|
-
|
|
1004
|
-
const
|
|
1005
|
-
const aktivFresh = (aktivAge === null || aktivAge === undefined) ? true : (aktivAge <= staleTimeoutMs);
|
|
1006
|
-
const aktivEff = !!(aktivFresh && aktiv);
|
|
999
|
+
// Persisted operator settings remain in force until changed.
|
|
1000
|
+
const aktivEff = !!this.dp?.getBoolean('vis.settings.dynamicTariff', false);
|
|
1007
1001
|
|
|
1008
|
-
const modusRaw = this.dp ? this.dp.
|
|
1002
|
+
const modusRaw = this.dp ? this.dp.getNumber('vis.settings.tariffMode', null) : null;
|
|
1009
1003
|
const modusInt = (typeof modusRaw === 'number' && Number.isFinite(modusRaw)) ? Math.round(modusRaw) : 1;
|
|
1010
1004
|
|
|
1011
|
-
const preisGrenzeVisRaw = this.dp ? this.dp.
|
|
1012
|
-
const priorRaw = this.dp ? this.dp.
|
|
1013
|
-
const storageW = this.dp ? this.dp.
|
|
1014
|
-
const evcsMaxW = this.dp ? this.dp.
|
|
1005
|
+
const preisGrenzeVisRaw = this.dp ? this.dp.getNumber('vis.settings.price', null) : null;
|
|
1006
|
+
const priorRaw = this.dp ? this.dp.getNumber('vis.settings.priority', null) : null;
|
|
1007
|
+
const storageW = this.dp ? this.dp.getNumber('vis.settings.storagePower', null) : null;
|
|
1008
|
+
const evcsMaxW = this.dp ? this.dp.getNumber('vis.settings.evcsMaxPower', null) : null;
|
|
1015
1009
|
|
|
1016
1010
|
const prioritaet = this._normPrioritaet(priorRaw);
|
|
1017
1011
|
const storagePowerAbsW = Math.max(0, Math.abs(this._num(storageW, 0)));
|
|
@@ -1021,17 +1015,8 @@ class TarifVisModule extends BaseModule {
|
|
|
1021
1015
|
// Unterstützt zwei Modelle:
|
|
1022
1016
|
// 1) Einfach (HT/NT) – ganzjährig
|
|
1023
1017
|
// 2) Quartale (NT/HT je Quartal, Rest = Standard)
|
|
1024
|
-
const
|
|
1025
|
-
const
|
|
1026
|
-
const netFeeFresh = (netFeeAge === null || netFeeAge === undefined) ? true : (netFeeAge <= staleTimeoutMs);
|
|
1027
|
-
|
|
1028
|
-
// IMPORTANT (Robustness/UX):
|
|
1029
|
-
// Das Zeitfenster muss auch ohne dynamischen Stromtarif funktionieren.
|
|
1030
|
-
// Ist der dynamische Tarif aktiv, muss sein Preis zusätzlich frisch sein;
|
|
1031
|
-
// teuer, stale oder unbekannt sperrt trotz NT die wirtschaftliche Netzladung.
|
|
1032
|
-
const netFeeEff = !!(netFeeFresh && netFeeEnabledRaw);
|
|
1033
|
-
|
|
1034
|
-
const netFeeModelRaw = this.dp ? this.dp.getNumberFresh('vis.settings.netFeeModel', staleTimeoutMs, 1) : 1;
|
|
1018
|
+
const netFeeEff = !!this.dp?.getBoolean('vis.settings.netFeeEnabled', false);
|
|
1019
|
+
const netFeeModelRaw = this.dp ? this.dp.getNumber('vis.settings.netFeeModel', 1) : 1;
|
|
1035
1020
|
const netFeeModel = (typeof netFeeModelRaw === 'number' && Number.isFinite(netFeeModelRaw)) ? Math.round(netFeeModelRaw) : 1;
|
|
1036
1021
|
const netFeeModelEff = (netFeeModel === 2) ? 2 : 1;
|
|
1037
1022
|
|
|
@@ -1109,35 +1094,33 @@ class TarifVisModule extends BaseModule {
|
|
|
1109
1094
|
|
|
1110
1095
|
let preisAktuell = null;
|
|
1111
1096
|
let preisAktuellSource = 'missing';
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
const
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
preisDurchschnitt = this._normalizePriceEurPerKwh(raw, null, this._priceInputUnit('tarif.preisDurchschnittEurProKwh', 'priceAverage', 'averagePriceEurPerKwh'));
|
|
1129
|
-
}
|
|
1097
|
+
// Use original, acknowledged samples for each price source. A heartbeat
|
|
1098
|
+
// or an old cached command cannot grant permission to buy electricity.
|
|
1099
|
+
const priceAge = key => verifiedTariffAgeMs(this.dp, key, nowMs);
|
|
1100
|
+
const currentPriceAgeMs = priceAge('tarif.preisAktuellEurProKwh');
|
|
1101
|
+
const currentPriceDirectFresh = currentPriceAgeMs <= currentPriceMaxAgeMs;
|
|
1102
|
+
if (currentPriceDirectFresh) {
|
|
1103
|
+
const raw = this.dp.getNumber('tarif.preisAktuellEurProKwh', null);
|
|
1104
|
+
preisAktuell = this._normalizePriceEurPerKwh(raw, null, this._priceInputUnit('tarif.preisAktuellEurProKwh', 'priceCurrent', 'currentPriceEurPerKwh'));
|
|
1105
|
+
if (Number.isFinite(preisAktuell)) preisAktuellSource = 'provider-current';
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
let preisDurchschnitt = null;
|
|
1109
|
+
if (priceAge('tarif.preisDurchschnittEurProKwh') <= averagePriceMaxAgeMs) {
|
|
1110
|
+
const raw = this.dp.getNumber('tarif.preisDurchschnittEurProKwh', null);
|
|
1111
|
+
preisDurchschnitt = this._normalizePriceEurPerKwh(raw, null, this._priceInputUnit('tarif.preisDurchschnittEurProKwh', 'priceAverage', 'averagePriceEurPerKwh'));
|
|
1112
|
+
}
|
|
1130
1113
|
|
|
1131
1114
|
const preisVisOk = (typeof preisGrenzeVis === 'number' && Number.isFinite(preisGrenzeVis));
|
|
1132
1115
|
let preisAktuellOk = (typeof preisAktuell === 'number' && Number.isFinite(preisAktuell));
|
|
1133
1116
|
const preisDurchschnittOk = (typeof preisDurchschnitt === 'number' && Number.isFinite(preisDurchschnitt));
|
|
1134
1117
|
|
|
1135
|
-
const todayCurveAgeMs = (
|
|
1136
|
-
const tomorrowCurveAgeMs = (
|
|
1137
|
-
const todayCurveFresh = todayCurveAgeMs
|
|
1138
|
-
const tomorrowCurveFresh = tomorrowCurveAgeMs
|
|
1139
|
-
const
|
|
1140
|
-
|
|
1118
|
+
const todayCurveAgeMs = priceAge('tarif.pricesTodayJson');
|
|
1119
|
+
const tomorrowCurveAgeMs = priceAge('tarif.pricesTomorrowJson');
|
|
1120
|
+
const todayCurveFresh = todayCurveAgeMs <= curveMaxAgeMs;
|
|
1121
|
+
const tomorrowCurveFresh = tomorrowCurveAgeMs <= curveMaxAgeMs;
|
|
1122
|
+
const curveAgeMs = Math.min(todayCurveAgeMs, tomorrowCurveAgeMs);
|
|
1123
|
+
let effectiveCurrentPriceAgeMs = currentPriceAgeMs;
|
|
1141
1124
|
let curveFresh = false;
|
|
1142
1125
|
let priceDataStatus = preisAktuellOk ? 'current-price-fresh' : (currentPriceDirectFresh ? 'current-price-missing' : 'current-price-stale');
|
|
1143
1126
|
|
|
@@ -1205,6 +1188,7 @@ class TarifVisModule extends BaseModule {
|
|
|
1205
1188
|
preisAktuell = activeSegment.priceEurKwh;
|
|
1206
1189
|
preisAktuellOk = true;
|
|
1207
1190
|
preisAktuellSource = 'curve-current';
|
|
1191
|
+
effectiveCurrentPriceAgeMs = todayArr.includes(activeSegment) ? todayCurveAgeMs : tomorrowCurveAgeMs;
|
|
1208
1192
|
priceDataStatus = 'current-from-fresh-curve';
|
|
1209
1193
|
}
|
|
1210
1194
|
}
|
|
@@ -1236,11 +1220,9 @@ class TarifVisModule extends BaseModule {
|
|
|
1236
1220
|
if (negAll.length > 0) {
|
|
1237
1221
|
negativeMinPrice = Math.min(...negAll.map(x => x.priceEurKwh));
|
|
1238
1222
|
const activeSeg = negAll.find(x => x.startMs <= nowMs && x.endMs > nowMs);
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
negativeCurrentPrice = activeSeg.priceEurKwh;
|
|
1243
|
-
}
|
|
1223
|
+
// The forecast describes its window. Only the selected current
|
|
1224
|
+
// price (direct, or the curve as fallback) grants grid import.
|
|
1225
|
+
negativeWindowNow = !!activeSeg;
|
|
1244
1226
|
|
|
1245
1227
|
const first = negAll[0];
|
|
1246
1228
|
let winStart = first.startMs;
|
|
@@ -1641,7 +1623,6 @@ class TarifVisModule extends BaseModule {
|
|
|
1641
1623
|
await this._setIfChanged('tarif.speicherLeistungW', this._num(storageW, 0));
|
|
1642
1624
|
await this._setIfChanged('tarif.ladeparkMaxW', this._num(evcsMaxW, 0));
|
|
1643
1625
|
|
|
1644
|
-
const effectiveCurrentPriceAgeMs = preisAktuellSource === 'curve-current' ? curveAgeMs : currentPriceAgeMs;
|
|
1645
1626
|
await this._setIfChanged('tarif.currentPriceFresh', !!preisAktuellOk);
|
|
1646
1627
|
await this._setIfChanged('tarif.currentPriceAgeMs', Number.isFinite(Number(effectiveCurrentPriceAgeMs)) ? Math.round(Number(effectiveCurrentPriceAgeMs)) : null);
|
|
1647
1628
|
await this._setIfChanged('tarif.currentPriceMaxAgeMs', Math.round(currentPriceMaxAgeMs));
|
|
@@ -1796,6 +1777,7 @@ await this._setIfChanged('tarif.speicherIntentGrund', storageIntentReason);
|
|
|
1796
1777
|
currentPriceFresh: !!preisAktuellOk,
|
|
1797
1778
|
currentPriceAgeMs: Number.isFinite(Number(effectiveCurrentPriceAgeMs)) ? Math.round(Number(effectiveCurrentPriceAgeMs)) : null,
|
|
1798
1779
|
currentPriceSource: preisAktuellSource,
|
|
1780
|
+
curveMaxAgeMs,
|
|
1799
1781
|
curveFresh: !!curveFresh,
|
|
1800
1782
|
curveAgeMs: Number.isFinite(Number(curveAgeMs)) ? Math.round(Number(curveAgeMs)) : null,
|
|
1801
1783
|
priceDataStatus,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
8
|
*
|
|
9
9
|
* Quelle: src-ts/runtime-executables/ems/services/measurement-freshness.ts
|
|
10
|
-
* Quell-Hash: sha256:
|
|
10
|
+
* Quell-Hash: sha256:e125e1d4d44561ea53e210281d0123c0abf217168ca0082e744434062d706920
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -110,6 +110,8 @@ function buildNvpSnapshotFromRegistry(input) {
|
|
|
110
110
|
const invertGrid = input.invertGrid === true;
|
|
111
111
|
const age = (key) => normalizedAge(typeof registry.getMeasurementAgeMs === 'function' ? registry.getMeasurementAgeMs(key) : registry.getAgeMs(key));
|
|
112
112
|
const timestamp = (key) => {
|
|
113
|
+
if (typeof registry.getVerifiedMeasurementTimestampMs === 'function')
|
|
114
|
+
return registry.getVerifiedMeasurementTimestampMs(key, now);
|
|
113
115
|
if (typeof registry.getMeasurementTimestampMs === 'function')
|
|
114
116
|
return finiteOrNull(registry.getMeasurementTimestampMs(key));
|
|
115
117
|
const valueAge = age(key);
|
|
@@ -136,8 +138,8 @@ function buildNvpSnapshotFromRegistry(input) {
|
|
|
136
138
|
const watchdogId = String(watchdogEntry.srcObjectId || watchdogEntry.objectId || '');
|
|
137
139
|
if (/lastSeenMs$/i.test(watchdogId)) {
|
|
138
140
|
const lastSeenMs = registry.getNumber(watchdogKey, null);
|
|
139
|
-
if (finiteOrNull(lastSeenMs) !== null && Number(lastSeenMs) > 0)
|
|
140
|
-
heartbeatAgeMs =
|
|
141
|
+
if (finiteOrNull(lastSeenMs) !== null && Number(lastSeenMs) > 0 && Number(lastSeenMs) <= now)
|
|
142
|
+
heartbeatAgeMs = now - Number(lastSeenMs);
|
|
141
143
|
}
|
|
142
144
|
else {
|
|
143
145
|
const candidates = [age(watchdogKey), aliveAge(watchdogKey)].filter((value) => value !== null);
|
|
@@ -155,14 +157,16 @@ function buildNvpSnapshotFromRegistry(input) {
|
|
|
155
157
|
}
|
|
156
158
|
const sample = (key, value) => {
|
|
157
159
|
const mapped = !!registry.getEntry(key);
|
|
160
|
+
const sampleTs = mapped ? timestamp(key) : null;
|
|
161
|
+
const measurementAgeMs = sampleTs !== null && sampleTs > 0 && sampleTs <= now ? now - sampleTs : null;
|
|
158
162
|
return {
|
|
159
163
|
mapped,
|
|
160
164
|
value,
|
|
161
|
-
sampleTs
|
|
165
|
+
sampleTs,
|
|
162
166
|
freshness: evaluateMeasurementFreshness({
|
|
163
167
|
mapped,
|
|
164
168
|
present: mapped && finiteOrNull(value) !== null,
|
|
165
|
-
measurementAgeMs
|
|
169
|
+
measurementAgeMs,
|
|
166
170
|
heartbeatAgeMs,
|
|
167
171
|
connected,
|
|
168
172
|
}, { staleMs, heartbeatStaleMs: staleMs, maxHeartbeatHoldMs }),
|
|
@@ -176,12 +180,28 @@ function buildNvpSnapshotFromRegistry(input) {
|
|
|
176
180
|
const exportKey = invertGrid ? buyKey : sellKey;
|
|
177
181
|
const importValue = finiteOrNull(invertGrid ? rawSell : rawBuy);
|
|
178
182
|
const exportValue = finiteOrNull(invertGrid ? rawBuy : rawSell);
|
|
183
|
+
const importSample = sample(importKey, importValue);
|
|
184
|
+
const exportSample = sample(exportKey, exportValue);
|
|
179
185
|
const resolution = resolveNvpMeasurement({
|
|
180
186
|
signed: sample(signedKey, signedValue),
|
|
181
|
-
import:
|
|
182
|
-
export:
|
|
187
|
+
import: importSample,
|
|
188
|
+
export: exportSample,
|
|
183
189
|
maxSkewMs,
|
|
184
190
|
});
|
|
191
|
+
// Bei fehlerhafter Telemetrie eines konfigurierten Richtungskanals darf
|
|
192
|
+
// der Gegenkanal allein keinen vollständigen NVP für Stellbefehle vortäuschen.
|
|
193
|
+
if (resolution.mode === 'split' && resolution.usable &&
|
|
194
|
+
((importSample.mapped && (importSample.value === null || importSample.freshness?.measurementAgeMs == null)) ||
|
|
195
|
+
(exportSample.mapped && (exportSample.value === null || exportSample.freshness?.measurementAgeMs == null)))) {
|
|
196
|
+
resolution.usable = false;
|
|
197
|
+
resolution.coherent = false;
|
|
198
|
+
resolution.status = 'stale';
|
|
199
|
+
resolution.reason = 'split-measurement-invalid';
|
|
200
|
+
resolution.netW = null;
|
|
201
|
+
resolution.importW = 0;
|
|
202
|
+
resolution.exportW = 0;
|
|
203
|
+
resolution.measurementAgeMs = null;
|
|
204
|
+
}
|
|
185
205
|
return {
|
|
186
206
|
...resolution,
|
|
187
207
|
ts: now,
|
|
@@ -211,20 +231,23 @@ function resolveNvpDisplay(input) {
|
|
|
211
231
|
gridSellW: Math.max(0, -canonicalNetW),
|
|
212
232
|
hasGrid: true,
|
|
213
233
|
src: String(input.canonicalSource || 'ems-canonical'),
|
|
234
|
+
sampleSource: 'canonical',
|
|
214
235
|
...mapped,
|
|
215
236
|
};
|
|
216
237
|
}
|
|
217
238
|
if (input.canonicalKnown && input.canonicalFresh === false) {
|
|
218
|
-
return { gridBuyRaw: null, gridSellRaw: null, gridNetRaw: null, gridBuyW: 0, gridSellW: 0, hasGrid: false, src: `ems-${String(input.canonicalStatus || 'stale')}`, ...mapped };
|
|
239
|
+
return { gridBuyRaw: null, gridSellRaw: null, gridNetRaw: null, gridBuyW: 0, gridSellW: 0, hasGrid: false, src: `ems-${String(input.canonicalStatus || 'stale')}`, sampleSource: 'missing', ...mapped };
|
|
219
240
|
}
|
|
220
241
|
const gridNetRaw = finiteOrNull(input.gridNetRaw);
|
|
221
242
|
let gridBuyRaw = finiteOrNull(input.gridBuyRaw);
|
|
222
243
|
let gridSellRaw = finiteOrNull(input.gridSellRaw);
|
|
223
244
|
let src = 'missing';
|
|
245
|
+
let sampleSource = 'missing';
|
|
224
246
|
if (gridNetRaw !== null) {
|
|
225
247
|
gridBuyRaw = Math.max(0, gridNetRaw);
|
|
226
248
|
gridSellRaw = Math.max(0, -gridNetRaw);
|
|
227
249
|
src = 'net-fresh';
|
|
250
|
+
sampleSource = 'signed';
|
|
228
251
|
}
|
|
229
252
|
else if (gridBuyRaw !== null || gridSellRaw !== null) {
|
|
230
253
|
const buyTs = finiteOrNull(input.gridBuyTs);
|
|
@@ -234,21 +257,27 @@ function resolveNvpDisplay(input) {
|
|
|
234
257
|
if (buyTs >= sellTs) {
|
|
235
258
|
gridSellRaw = 0;
|
|
236
259
|
src = 'split-newer-import';
|
|
260
|
+
sampleSource = 'import';
|
|
237
261
|
}
|
|
238
262
|
else {
|
|
239
263
|
gridBuyRaw = 0;
|
|
240
264
|
src = 'split-newer-export';
|
|
265
|
+
sampleSource = 'export';
|
|
241
266
|
}
|
|
242
267
|
}
|
|
243
|
-
else if (gridBuyRaw !== null && gridSellRaw !== null)
|
|
268
|
+
else if (gridBuyRaw !== null && gridSellRaw !== null) {
|
|
244
269
|
src = 'split-coherent';
|
|
270
|
+
sampleSource = 'split';
|
|
271
|
+
}
|
|
245
272
|
else if (gridBuyRaw !== null) {
|
|
246
273
|
gridSellRaw = 0;
|
|
247
274
|
src = 'split-import-only';
|
|
275
|
+
sampleSource = 'import';
|
|
248
276
|
}
|
|
249
277
|
else {
|
|
250
278
|
gridBuyRaw = 0;
|
|
251
279
|
src = 'split-export-only';
|
|
280
|
+
sampleSource = 'export';
|
|
252
281
|
}
|
|
253
282
|
}
|
|
254
283
|
const rawBuyW = Math.max(0, Math.abs(gridBuyRaw ?? 0));
|
|
@@ -267,6 +296,7 @@ function resolveNvpDisplay(input) {
|
|
|
267
296
|
gridSellW,
|
|
268
297
|
hasGrid,
|
|
269
298
|
src,
|
|
299
|
+
sampleSource,
|
|
270
300
|
...mapped,
|
|
271
301
|
};
|
|
272
302
|
}
|
|
@@ -276,20 +306,27 @@ function resolveCurrentNvpSnapshot(snapshot, now, maxAgeMs) {
|
|
|
276
306
|
if (!value)
|
|
277
307
|
return { known: false, current: false, usable: false, ageMs: null, measurementAgeMs: null, heartbeatAgeMs: null, netW: null, status: 'missing', source: '', reason: '', connected: null };
|
|
278
308
|
const ts = finiteOrNull(value.ts);
|
|
279
|
-
const ageMs = ts
|
|
280
|
-
const
|
|
309
|
+
const ageMs = ts !== null && ts > 0 && ts <= now ? now - ts : null;
|
|
310
|
+
const limitMs = Math.max(1000, maxAgeMs);
|
|
311
|
+
const current = ageMs !== null && ageMs <= limitMs;
|
|
312
|
+
// Ältere Einzelmessungs-Snapshots tragen nur ts. Die Engine führt das Messalter
|
|
313
|
+
// ausdrücklich mit, da ein neuer Rechenzyklus kein neues Zählersample ist.
|
|
314
|
+
const atCreation = 'measurementAgeMs' in value ? finiteOrNull(value.measurementAgeMs) : 0;
|
|
315
|
+
const measurementAgeMs = ageMs !== null && atCreation !== null && atCreation >= 0 ? atCreation + ageMs : null;
|
|
316
|
+
const physicalFresh = measurementAgeMs !== null && measurementAgeMs <= limitMs;
|
|
317
|
+
const expiredMeasurement = current && value.usable === true && !physicalFresh;
|
|
281
318
|
const netW = finiteOrNull(value.netW);
|
|
282
319
|
return {
|
|
283
320
|
known: true,
|
|
284
321
|
current,
|
|
285
|
-
usable: current && value.usable === true && netW !== null && value.connected !== false,
|
|
322
|
+
usable: current && physicalFresh && value.usable === true && netW !== null && value.connected !== false,
|
|
286
323
|
ageMs,
|
|
287
|
-
measurementAgeMs
|
|
324
|
+
measurementAgeMs,
|
|
288
325
|
heartbeatAgeMs: normalizedAge(value.heartbeatAgeMs),
|
|
289
326
|
netW,
|
|
290
|
-
status: String(value.status || (current ? 'stale' : 'snapshot-stale')),
|
|
327
|
+
status: expiredMeasurement ? 'stale' : String(value.status || (current ? 'stale' : 'snapshot-stale')),
|
|
291
328
|
source: String(value.source || 'ems-canonical'),
|
|
292
|
-
reason: String(value.reason || ''),
|
|
329
|
+
reason: expiredMeasurement ? 'measurement-stale' : String(value.reason || ''),
|
|
293
330
|
connected: typeof value.connected === 'boolean' ? value.connected : null,
|
|
294
331
|
};
|
|
295
332
|
}
|
|
@@ -346,8 +383,8 @@ function resolveNvpMeasurement(input) {
|
|
|
346
383
|
const importTs = channelTs(imp);
|
|
347
384
|
const exportTs = channelTs(exp);
|
|
348
385
|
const skewMs = importTs !== null && exportTs !== null ? Math.abs(importTs - exportTs) : null;
|
|
349
|
-
const
|
|
350
|
-
const
|
|
386
|
+
const importAge = channelAge(imp);
|
|
387
|
+
const exportAge = channelAge(exp);
|
|
351
388
|
if (importFresh && exportFresh) {
|
|
352
389
|
if (skewMs === null || skewMs <= maxSkewMs) {
|
|
353
390
|
return {
|
|
@@ -361,11 +398,11 @@ function resolveNvpMeasurement(input) {
|
|
|
361
398
|
importW,
|
|
362
399
|
exportW,
|
|
363
400
|
skewMs,
|
|
364
|
-
measurementAgeMs,
|
|
401
|
+
measurementAgeMs: importAge !== null && exportAge !== null ? Math.max(importAge, exportAge) : null,
|
|
365
402
|
reason: 'split-coherent',
|
|
366
403
|
};
|
|
367
404
|
}
|
|
368
|
-
const useImport = importTs !== null && exportTs !== null ? importTs >= exportTs : (
|
|
405
|
+
const useImport = importTs !== null && exportTs !== null ? importTs >= exportTs : (importAge ?? Infinity) <= (exportAge ?? Infinity);
|
|
369
406
|
return {
|
|
370
407
|
usable: true,
|
|
371
408
|
coherent: false,
|
|
@@ -377,7 +414,7 @@ function resolveNvpMeasurement(input) {
|
|
|
377
414
|
importW: useImport ? importW : 0,
|
|
378
415
|
exportW: useImport ? 0 : exportW,
|
|
379
416
|
skewMs,
|
|
380
|
-
measurementAgeMs,
|
|
417
|
+
measurementAgeMs: useImport ? importAge : exportAge,
|
|
381
418
|
reason: `split-skew>${Math.round(maxSkewMs)}ms`,
|
|
382
419
|
};
|
|
383
420
|
}
|
|
@@ -424,7 +461,7 @@ function resolveNvpMeasurement(input) {
|
|
|
424
461
|
importW: 0,
|
|
425
462
|
exportW: 0,
|
|
426
463
|
skewMs,
|
|
427
|
-
measurementAgeMs,
|
|
464
|
+
measurementAgeMs: importAge !== null && exportAge !== null ? Math.min(importAge, exportAge) : importAge ?? exportAge,
|
|
428
465
|
reason: [imp?.freshness?.reason, exp?.freshness?.reason].filter(Boolean).join('+') || 'split-stale',
|
|
429
466
|
};
|
|
430
467
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
8
|
*
|
|
9
9
|
* Quelle: src-ts/runtime-executables/ems/services/safety-envelope.ts
|
|
10
|
-
* Quell-Hash: sha256:
|
|
10
|
+
* Quell-Hash: sha256:ab0f2797afcb7da70ea18c777d1d26bc02ed126c0dc0f8da20e63409afecf021
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -253,10 +253,14 @@ function invalidateSafetyEnvelope(adapter, reason, options = {}) {
|
|
|
253
253
|
adapter._nwSafetyEnvelope = envelope;
|
|
254
254
|
return envelope;
|
|
255
255
|
}
|
|
256
|
-
function phaseAgeMs(dp, key) {
|
|
256
|
+
function phaseAgeMs(dp, key, now) {
|
|
257
257
|
if (!dp)
|
|
258
258
|
return null;
|
|
259
259
|
try {
|
|
260
|
+
if (typeof dp.getVerifiedMeasurementTimestampMs === 'function') {
|
|
261
|
+
const ts = dp.getVerifiedMeasurementTimestampMs(key, now);
|
|
262
|
+
return ts === null ? null : now - ts;
|
|
263
|
+
}
|
|
260
264
|
const age = typeof dp.getMeasurementAgeMs === 'function'
|
|
261
265
|
? dp.getMeasurementAgeMs(key)
|
|
262
266
|
: (typeof dp.getAgeMs === 'function' ? dp.getAgeMs(key) : null);
|
|
@@ -267,7 +271,7 @@ function phaseAgeMs(dp, key) {
|
|
|
267
271
|
return null;
|
|
268
272
|
}
|
|
269
273
|
}
|
|
270
|
-
function readPhase(dp, key, staleMs) {
|
|
274
|
+
function readPhase(dp, key, staleMs, now) {
|
|
271
275
|
if (!dp || typeof dp.getEntry !== 'function' || !dp.getEntry(key)) {
|
|
272
276
|
return { mapped: false, fresh: false, valueA: null, ageMs: null, connected: null, reason: 'not-mapped' };
|
|
273
277
|
}
|
|
@@ -277,7 +281,7 @@ function readPhase(dp, key, staleMs) {
|
|
|
277
281
|
}
|
|
278
282
|
catch (_e) { }
|
|
279
283
|
const valueA = strictFiniteNumber(raw, null);
|
|
280
|
-
const ageMs = phaseAgeMs(dp, key);
|
|
284
|
+
const ageMs = phaseAgeMs(dp, key, now);
|
|
281
285
|
let connected = null;
|
|
282
286
|
try {
|
|
283
287
|
connected = typeof dp.getConnectionStatus === 'function' ? dp.getConnectionStatus(key) : null;
|
|
@@ -371,9 +375,12 @@ function buildSafetyEnvelope({ adapter, dp, coreSnapshot, budgetSnapshot, now =
|
|
|
371
375
|
const headroomA = {};
|
|
372
376
|
let minHeadroomA = null;
|
|
373
377
|
let phaseValid = true;
|
|
378
|
+
let validForMs = Math.min(safetyCfg.staleMs, safetyCfg.envelopeMaxAgeMs);
|
|
374
379
|
if (phaseRequired) {
|
|
375
380
|
for (const key of phaseKeys) {
|
|
376
|
-
const sample = readPhase(dp, key, safetyCfg.staleMs);
|
|
381
|
+
const sample = readPhase(dp, key, safetyCfg.staleMs, now);
|
|
382
|
+
if (sample.fresh && sample.ageMs !== null)
|
|
383
|
+
validForMs = Math.min(validForMs, safetyCfg.staleMs - sample.ageMs);
|
|
377
384
|
const label = key.replace(/^ps\./, '').replace(/A$/i, '').toUpperCase();
|
|
378
385
|
currentsA[label] = sample.valueA;
|
|
379
386
|
// Signed headroom is intentional. If a phase is already above its
|
|
@@ -466,7 +473,7 @@ function buildSafetyEnvelope({ adapter, dp, coreSnapshot, budgetSnapshot, now =
|
|
|
466
473
|
generation: cycle.generation,
|
|
467
474
|
ts: now,
|
|
468
475
|
timestamp: now,
|
|
469
|
-
expiresAt: now +
|
|
476
|
+
expiresAt: now + validForMs,
|
|
470
477
|
valid,
|
|
471
478
|
commissioned,
|
|
472
479
|
emergencyStop: forceZero,
|
package/ui/io-package.json
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "nexowatt-ui",
|
|
4
|
-
"version": "9.0.
|
|
4
|
+
"version": "9.0.33",
|
|
5
5
|
"news": {
|
|
6
|
+
"9.0.33": {
|
|
7
|
+
"de": "EMS prüft Bestätigung, Qualität und Alter der Netzanschlussmessung vor der Leistungsfreigabe. Verbesserungen an Energiefluss und Regelung bei Mess- und Kommunikationsstörungen.",
|
|
8
|
+
"en": "The EMS checks acknowledgement, quality and age of grid measurements before granting power. Improves energy flow and control when measurements or communications fail."
|
|
9
|
+
},
|
|
10
|
+
"9.0.32": {
|
|
11
|
+
"de": "Gebäudeverbrauch im LIVE-Energiefluss wird aus gültigen Messwerten ermittelt. Die Anzeige unterscheidet unvollständige Messdaten und unplausible Bilanzen.",
|
|
12
|
+
"en": "Calculate live building consumption from valid power measurements. Distinguish incomplete measurements from inconsistent power balances."
|
|
13
|
+
},
|
|
14
|
+
"9.0.31": {
|
|
15
|
+
"de": "Safari erhält das NexoWatt-Symbol für die iPhone-Web-App über einen eigenen PNG-Pfad. Die üblichen Apple-Icon-Adressen liefern dieselbe 180×180-Datei.",
|
|
16
|
+
"en": "Safari receives the NexoWatt Home Screen icon from a dedicated PNG path. Standard Apple icon URLs serve the same 180×180 file."
|
|
17
|
+
},
|
|
6
18
|
"9.0.30": {
|
|
7
19
|
"de": "HTTPS-Gerätezertifikat und öffentliches Stammzertifikat in der EOS-Administration lokal erstellen. Beide PEM-Dateien und der SHA-256-Fingerabdruck stehen direkt bereit. Das erzeugte Zertifikat wird erst durch eine bestätigte Übernahme verwendet.",
|
|
8
20
|
"en": "Generate an HTTPS device certificate and public root certificate in EOS Administration. Both PEM downloads and the SHA-256 fingerprint are available immediately, with a separate activation step."
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
8
|
*
|
|
9
9
|
* Quelle: src-ts/runtime-executables/lib/datapoint-picker.ts
|
|
10
|
-
* Quell-Hash: sha256:
|
|
10
|
+
* Quell-Hash: sha256:2395476303e197eed42fa43f1a8524351343b5cdd576ed1384d388e517360177
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -24,6 +24,22 @@
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.registerDatapointPicker = registerDatapointPicker;
|
|
26
26
|
const ephemeral_cache_1 = require("./ephemeral-cache");
|
|
27
|
+
function buildPickerTree(items) {
|
|
28
|
+
const root = { children: null, item: null };
|
|
29
|
+
for (const item of items) {
|
|
30
|
+
if (!item.id)
|
|
31
|
+
continue;
|
|
32
|
+
let node = root;
|
|
33
|
+
for (const segment of item.id.split('.')) {
|
|
34
|
+
if (!segment)
|
|
35
|
+
continue;
|
|
36
|
+
const children = node.children ?? (node.children = Object.create(null));
|
|
37
|
+
node = children[segment] ?? (children[segment] = { children: null, item: null });
|
|
38
|
+
}
|
|
39
|
+
node.item = item;
|
|
40
|
+
}
|
|
41
|
+
return root;
|
|
42
|
+
}
|
|
27
43
|
const SEARCH_MAX_AGE_MS = 15000;
|
|
28
44
|
const TREE_MAX_AGE_MS = 30000;
|
|
29
45
|
const ALLOWED_TYPES = new Set(['boolean', 'number', 'string']);
|
|
@@ -40,7 +56,6 @@ function csvFilter(value, maxItems, validator) {
|
|
|
40
56
|
function registerDatapointPicker(app, owner, requireDpDiscovery, time) {
|
|
41
57
|
let closed = false;
|
|
42
58
|
const snapshot = new ephemeral_cache_1.ExpiringSnapshot(async () => {
|
|
43
|
-
var _a;
|
|
44
59
|
if (closed)
|
|
45
60
|
throw new Error('EOS_UI_STOPPING');
|
|
46
61
|
const objects = (await owner.getForeignObjectsAsync?.('*', 'state')) || {};
|
|
@@ -66,18 +81,7 @@ function registerDatapointPicker(app, owner, requireDpDiscovery, time) {
|
|
|
66
81
|
});
|
|
67
82
|
}
|
|
68
83
|
items.sort((a, b) => a.idLower.localeCompare(b.idLower));
|
|
69
|
-
|
|
70
|
-
const trie = makeNode();
|
|
71
|
-
for (const item of items) {
|
|
72
|
-
if (!item.id)
|
|
73
|
-
continue;
|
|
74
|
-
let node = trie;
|
|
75
|
-
for (const segment of item.id.split('.').filter(Boolean)) {
|
|
76
|
-
node = (_a = node.children)[segment] ?? (_a[segment] = makeNode());
|
|
77
|
-
}
|
|
78
|
-
node.item = item;
|
|
79
|
-
}
|
|
80
|
-
return { items, trie };
|
|
84
|
+
return { items, trie: null };
|
|
81
85
|
}, TREE_MAX_AGE_MS, time);
|
|
82
86
|
app.get('/api/smarthome/dpsearch', requireDpDiscovery, async (req, res) => {
|
|
83
87
|
try {
|
|
@@ -145,23 +149,26 @@ function registerDatapointPicker(app, owner, requireDpDiscovery, time) {
|
|
|
145
149
|
if (typeof owner.getForeignObjectsAsync !== 'function') {
|
|
146
150
|
return void res.status(500).json({ ok: false, error: 'getForeignObjectsAsync not available' });
|
|
147
151
|
}
|
|
148
|
-
const
|
|
152
|
+
const index = await snapshot.get(false, TREE_MAX_AGE_MS);
|
|
149
153
|
const parts = prefix ? prefix.split('.').filter(Boolean) : [];
|
|
150
|
-
let node = trie;
|
|
154
|
+
let node = index.trie ?? (index.trie = buildPickerTree(index.items));
|
|
151
155
|
for (const segment of parts) {
|
|
152
|
-
const child = node.children[segment];
|
|
156
|
+
const child = node.children?.[segment];
|
|
153
157
|
if (!child)
|
|
154
158
|
return void res.json({ ok: true, prefix, children: [] });
|
|
155
159
|
node = child;
|
|
156
160
|
}
|
|
157
|
-
const
|
|
161
|
+
const branches = node.children;
|
|
162
|
+
if (!branches)
|
|
163
|
+
return void res.json({ ok: true, prefix, children: [] });
|
|
164
|
+
const labels = Object.keys(branches).sort((a, b) => a.localeCompare(b));
|
|
158
165
|
const children = labels.map(label => {
|
|
159
|
-
const child =
|
|
166
|
+
const child = branches[label];
|
|
160
167
|
const item = child?.item;
|
|
161
168
|
return {
|
|
162
169
|
id: prefix ? `${prefix}.${label}` : label,
|
|
163
170
|
label,
|
|
164
|
-
hasChildren: !!
|
|
171
|
+
hasChildren: !!child.children,
|
|
165
172
|
isState: !!item,
|
|
166
173
|
name: item ? item.name : '',
|
|
167
174
|
role: item ? item.role : '',
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
3
3
|
*
|
|
4
4
|
* Quelle: src-ts/runtime-executables/lib/eos-presentation-routes.ts
|
|
5
|
-
* Quell-Hash: sha256:
|
|
5
|
+
* Quell-Hash: sha256:c7964864ce73d5ad00cae72592e580f871db3c886db149b9809ff18efd8f2b66
|
|
6
6
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
7
7
|
*
|
|
8
8
|
* Zweck:
|
|
@@ -28,10 +28,7 @@ const DATAPOINT_PICKER_ROUTES = new Set([
|
|
|
28
28
|
exports.PRESENTATION_FILES = new Map([
|
|
29
29
|
['/manifest.webmanifest', ['www/manifest.webmanifest', 'application/manifest+json']],
|
|
30
30
|
['/sw.js', ['www/sw.js', 'application/javascript']],
|
|
31
|
-
[
|
|
32
|
-
['/apple-touch-icon-precomposed.png', ['www/assets/icons/nexowatt-180.png', 'image/png']],
|
|
33
|
-
['/apple-touch-icon-180x180.png', ['www/assets/icons/nexowatt-180.png', 'image/png']],
|
|
34
|
-
['/apple-touch-icon-180x180-precomposed.png', ['www/assets/icons/nexowatt-180.png', 'image/png']],
|
|
31
|
+
...ui_access_policy_1.APPLE_TOUCH_ICON_PATHS.map(path => [path, ['www/assets/icons/nexowatt-180.png', 'image/png']]),
|
|
35
32
|
['/favicon.ico', ['www/assets/icons/nexowatt-32.png', 'image/x-icon']],
|
|
36
33
|
]);
|
|
37
34
|
/** A raw HTTP path must match this allowlist before crossing into the read-only process. */
|
package/ui/lib/tariff-price.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
8
|
*
|
|
9
9
|
* Quelle: src-ts/runtime-executables/lib/tariff-price.ts
|
|
10
|
-
* Quell-Hash: sha256:
|
|
10
|
+
* Quell-Hash: sha256:78d64702103606065c5c63747c842fdb52616cd9fabfdac457d557e57296ce69
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"use strict";
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.tariffPriceNumber = tariffPriceNumber;
|
|
26
|
+
exports.verifiedTariffAgeMs = verifiedTariffAgeMs;
|
|
26
27
|
exports.tariffPriceUnit = tariffPriceUnit;
|
|
27
28
|
exports.normalizeTariffPrice = normalizeTariffPrice;
|
|
28
29
|
exports.readTariffPriceState = readTariffPriceState;
|
|
@@ -45,6 +46,11 @@ function tariffPriceNumber(value) {
|
|
|
45
46
|
const parsed = Number(value);
|
|
46
47
|
return Number.isFinite(parsed) ? parsed : null;
|
|
47
48
|
}
|
|
49
|
+
/** Age of a confirmed source sample, independent of connection heartbeats. */
|
|
50
|
+
function verifiedTariffAgeMs(dp, key, now) {
|
|
51
|
+
const stamp = dp?.getVerifiedMeasurementTimestampMs?.(key, now);
|
|
52
|
+
return typeof stamp === 'number' && Number.isFinite(stamp) && stamp > 0 && stamp <= now ? now - stamp : Infinity;
|
|
53
|
+
}
|
|
48
54
|
/** Nur explizite Preis-Einheiten; ohne Vertrag bleibt der bisherige Auto-Pfad. */
|
|
49
55
|
function tariffPriceUnit(value) {
|
|
50
56
|
const unit = typeof value === 'string' ? value.trim().toLowerCase().replace(/\s+/g, '') : '';
|