iobroker.eos-admin 9.0.31 → 9.0.34
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 +10 -11
- package/README.md +7 -7
- package/adminWww/.vite/manifest.json +233 -224
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +13897 -13887
- package/adminWww/assets/AccessTime-CuR73YC3.js +1 -0
- package/adminWww/assets/{AdapterUpdateDialog-UhaQHyF1.js → AdapterUpdateDialog-5L75o18m.js} +5 -5
- package/adminWww/assets/{Adapters-Di3sM_ky.js → Adapters-FcghjF7E.js} +5 -5
- package/adminWww/assets/ConfigManager-BnHarBfH.js +1 -0
- package/adminWww/assets/Enums-BjLbLLQL.js +92 -0
- package/adminWww/assets/Fields-DDE1hVOa.js +1 -0
- package/adminWww/assets/Files-CDjnR4q6.js +1 -0
- package/adminWww/assets/{Hosts-DXjTE0pX.js → Hosts-CJKQaNrD.js} +6 -6
- package/adminWww/assets/Instances-DZNl369k.js +4 -0
- package/adminWww/assets/Intro-CjAmMGDB.js +2 -0
- package/adminWww/assets/KeyboardArrowRight-ifvmV1ZL.js +1 -0
- package/adminWww/assets/{Logs-DTo6XJF_.js → Logs-rUAV7SwM.js} +2 -2
- package/adminWww/assets/MoreHoriz-CS7nODK8.js +1 -0
- package/adminWww/assets/{Objects-DyEBMDK6.js → Objects-CqOH6rT_.js} +4 -4
- package/adminWww/assets/Overview-BOtXqsMy.js +3 -0
- package/adminWww/assets/Pageview-wzrLQZ-j.js +1 -0
- package/adminWww/assets/PersonOff-YtHcY0sV.js +1 -0
- package/adminWww/assets/Star-D8VNXawT.js +1 -0
- package/adminWww/assets/State-C8ncThop.js +1 -0
- package/adminWww/assets/UsedResources-lUYJqy4F.js +2 -0
- package/adminWww/assets/Users-CK1Cax82.js +1 -0
- package/adminWww/assets/ViewCompact-D7bHgn99.js +1 -0
- package/adminWww/assets/ViewSidebar-CjClbCI5.js +1 -0
- package/adminWww/assets/WifiTethering-DJ9VO12W.js +1 -0
- package/adminWww/assets/{bootstrap-BQ4OzwbT.js → bootstrap-CC0Qr-kr.js} +25 -25
- package/adminWww/assets/date-fns-BtR4dG_j.js +1 -0
- package/adminWww/assets/en-US-BjjaEI6N.js +1 -0
- package/adminWww/assets/{hostInit-CGSSNegd.js → hostInit-DqGL6nY8.js} +1 -1
- package/adminWww/assets/icons-material-07rWS63O.js +1 -0
- package/adminWww/assets/{index-C4CShixx.js → index-BhhkToP2.js} +2 -2
- package/adminWww/assets/{installSVGRenderer-DeaOAT3W.js → installSVGRenderer-B4-7lSQZ.js} +1 -1
- package/adminWww/assets/isSameWeek-WMSJR5Qs.js +1 -0
- package/adminWww/assets/locale-DN6Bdkdt.js +1 -0
- package/adminWww/assets/{mf-entry-bootstrap-0-c5733c2d.js → mf-entry-bootstrap-0-1afd2287.js} +2 -2
- package/adminWww/assets/sentry-CPzCHrwe.js +1 -0
- package/adminWww/assets/setYear-DDSuW45e.js +1 -0
- 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.31.js → remoteEntry-eos-9.0.34.js} +1 -1
- package/adminWww/remoteEntry.js +1 -1
- package/build/lib/eosDeviceEmsPlan.js +285 -9
- package/build/lib/eosDeviceEmsPlan.js.map +1 -1
- package/build/lib/eosDeviceEmsService.js +29 -2
- package/build/lib/eosDeviceEmsService.js.map +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/docs/README.md +3 -2
- 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/reports/unified-9.0.34/PRUEFBERICHT.md +40 -0
- package/docs/reports/unified-9.0.34/PRUEFERGEBNISSE.json +112 -0
- package/docs/reports/unified-9.0.34/raw/INDEX.json +137 -0
- package/docs/reports/unified-9.0.34/raw/backend.log +5 -0
- package/docs/reports/unified-9.0.34/raw/dashboard-interval.json +108 -0
- package/docs/reports/unified-9.0.34/raw/fixtures-verification.log +44 -0
- package/docs/reports/unified-9.0.34/raw/frontend.log +152 -0
- package/docs/reports/unified-9.0.34/raw/installer.log +26 -0
- package/docs/reports/unified-9.0.34/raw/lint.log +45 -0
- package/docs/reports/unified-9.0.34/raw/mira-dashboard-browser.json +1 -0
- package/docs/reports/unified-9.0.34/raw/mira-devices-browser.log +9 -0
- package/docs/reports/unified-9.0.34/raw/mira-memory-process.json +379 -0
- package/docs/reports/unified-9.0.34/raw/modules.log +5 -0
- package/docs/reports/unified-9.0.34/raw/node22-mira.log +216 -0
- package/docs/reports/unified-9.0.34/raw/node22-protocol-to-ems.log +8 -0
- package/docs/reports/unified-9.0.34/raw/node22-tests-final.log +17850 -0
- package/docs/reports/unified-9.0.34/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.34/raw/node24-mira.log +40 -0
- package/docs/reports/unified-9.0.34/raw/node24-protocol-to-ems.log +6 -0
- package/docs/reports/unified-9.0.34/raw/node24-tests-final.log +2973 -0
- package/docs/reports/unified-9.0.34/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.34/raw/protocol-to-ems.cjs +364 -0
- package/docs/reports/unified-9.0.34/raw/release-metadata.log +13 -0
- package/docs/reports/unified-9.0.34/raw/sbom.log +8 -0
- package/docs/reports/unified-9.0.34/raw/typecheck.log +5 -0
- package/docs/reports/unified-9.0.34/raw/ui-runtime.log +8 -0
- package/docs/start/START_HIER_9.0.32.md +16 -0
- package/docs/start/START_HIER_9.0.33.md +32 -0
- package/docs/start/START_HIER_9.0.34.md +25 -0
- package/io-package.json +16 -16
- package/modules/devices/admin/alias-contract-v1.json +22 -0
- package/modules/devices/admin/ems-assignment.js +6 -1
- package/modules/devices/admin/host-bridge.js +2 -0
- package/modules/devices/admin/index.html +16 -0
- package/modules/devices/admin/index_m.js +168 -9
- package/modules/devices/admin/templates.json +976 -0
- package/modules/devices/checks/emsAssignment.check.js +52 -2
- package/modules/devices/index.js +5 -1
- package/modules/devices/lib/alias-contract-v1.json +22 -0
- package/modules/devices/lib/deviceRuntime.js +17 -7
- package/modules/devices/lib/drivers/modbus.js +1 -1
- package/modules/devices/lib/drivers/modbusRtuBus.js +7 -1
- package/modules/devices/lib/drivers/ovumMira.js +148 -0
- package/modules/devices/lib/ovumMiraAliases.js +61 -0
- package/modules/devices/lib/ovumMiraConnection.js +32 -0
- package/modules/devices/lib/templates.json +976 -0
- package/modules/devices/test/aliasContractV1.test.js +4 -4
- package/modules/devices/test/deviceAliasSemantics.test.js +2 -2
- package/modules/devices/test/fixtures/approved-additive-templates.json +3 -1
- package/modules/devices/test/ovumMiraPairing.test.js +76 -0
- package/modules/devices/test/ovumMiraTemplates.test.js +110 -0
- package/modules/devices/test/ovumMiraTransport.test.js +162 -0
- package/package.json +10 -5
- package/release-manifests/unified/build-environment.cdx.json +7 -7
- package/release-manifests/unified/files.json +302 -180
- package/release-manifests/unified/frontend.cdx.json +7 -7
- package/release-manifests/unified/installer.cdx.json +7 -7
- package/release-manifests/unified/obsolete-admin-assets.json +281 -28
- package/release-manifests/unified/runtime.cdx.json +28 -28
- package/release-manifests/unified/validation.json +15 -15
- package/tools/eos-release-manifest.cjs +2 -2
- package/ui/ems/consumers/ovum-mira.js +164 -0
- 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/para14a.js +3 -2
- package/ui/ems/modules/prime-mover-control.js +141 -29
- package/ui/ems/modules/stage-a-diagnostics.js +4 -2
- 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/modules/thermal-control.js +91 -10
- 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/installer-lifecycle.js +11 -2
- package/ui/lib/tariff-price.js +7 -1
- package/ui/lib/ts-mirrors/ems/core-limits/core-runtime.js +5 -1
- package/ui/main.js +313 -188
- package/ui/package.json +4 -3
- package/ui/www/app.js +238 -100
- package/ui/www/ems-apps.js +30 -10
- package/ui/www/index.html +1 -0
- package/ui/www/licenses/smarthome-markdown-components.json +156 -156
- package/ui/www/live-display.js +38 -4
- package/ui/www/manifest.webmanifest +2 -2
- package/ui/www/power-measurements.js +28 -3
- package/adminWww/assets/AddLink-0L0E-LsA.js +0 -1
- package/adminWww/assets/ColorLens-DA51K29x.js +0 -1
- package/adminWww/assets/ConfigManager-C2naRwDl.js +0 -1
- package/adminWww/assets/Enums-B9ucB-qg.js +0 -92
- package/adminWww/assets/Fields-DN41WFbp.js +0 -1
- package/adminWww/assets/FileCopy-B16lEuur.js +0 -1
- package/adminWww/assets/Files-C3PbbeNR.js +0 -1
- package/adminWww/assets/Instances-PKvEjDNQ.js +0 -4
- package/adminWww/assets/Intro-BnYMjDZr.js +0 -2
- package/adminWww/assets/Lens-9lkeoWGk.js +0 -1
- package/adminWww/assets/LinearScale-Be5h2beh.js +0 -1
- package/adminWww/assets/North-C2whbHM-.js +0 -1
- package/adminWww/assets/Overview-CWLYuqZx.js +0 -3
- package/adminWww/assets/PersonOff-DqBq0Fho.js +0 -1
- package/adminWww/assets/PlaylistAdd-O8k92YBd.js +0 -1
- package/adminWww/assets/State-Ca9_Ke_c.js +0 -1
- package/adminWww/assets/UsedResources-20bsoxmj.js +0 -2
- package/adminWww/assets/Users-yZyZX-18.js +0 -1
- package/adminWww/assets/date-fns-C1dqkno9.js +0 -1
- package/adminWww/assets/icons-material-C3PNaipj.js +0 -1
- package/adminWww/assets/isSameWeek-Crh37s7U.js +0 -1
- package/adminWww/assets/isWithinInterval-Bo1WiDfq.js +0 -1
- package/adminWww/assets/locale-hLcz_Xh2.js +0 -1
- package/adminWww/assets/sentry-DwQQLI7N.js +0 -1
- package/adminWww/assets/startOfWeek-DJph8SIW.js +0 -1
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
8
|
*
|
|
9
9
|
* Quelle: src-ts/runtime-executables/ems/modules/charging-management.ts
|
|
10
|
-
* Quell-Hash: sha256:
|
|
10
|
+
* Quell-Hash: sha256:52f80d763e27fa9547b52142ae16a79e63485d77d4f8b693a2f625c98966bd15
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
'use strict';
|
|
36
36
|
|
|
37
37
|
const { BaseModule } = require('./base');
|
|
38
|
+
const { tariffPriceNumber, verifiedTariffAgeMs } = require('../../lib/tariff-price');
|
|
38
39
|
const { EMS_CONTROL_FIELDS, checkedEmsControlState } = require('../../lib/ems-control-values');
|
|
39
40
|
const { readFlowMeasurement } = require('../../lib/flow-measurement');
|
|
40
41
|
const { resolveOcppLimitFeedback, resolveOcppRuntimeAlive, ocppConnectionConfirmed, ocppLeaseCapability, OcppControlLeases } = require('../../lib/ocpp-limit-feedback');
|
|
@@ -1119,8 +1120,8 @@ function resolveChargingPvBudgetControl({
|
|
|
1119
1120
|
const localRaw = Math.max(0, Number(localRawW) || 0);
|
|
1120
1121
|
const localEffective = Math.max(0, Number(localEffectiveW) || 0);
|
|
1121
1122
|
const rt = centralBudget && typeof centralBudget === 'object' ? centralBudget : null;
|
|
1122
|
-
const ts = rt
|
|
1123
|
-
const ageMs = Number.isFinite(ts) && ts > 0
|
|
1123
|
+
const ts = rt?.ts;
|
|
1124
|
+
const ageMs = Number.isFinite(ts) && ts > 0 && ts <= now ? now - ts : null;
|
|
1124
1125
|
const fresh = ageMs !== null && ageMs <= Math.max(1000, Number(maxAgeMs) || 30000);
|
|
1125
1126
|
const pvGate = rt && rt.gates && rt.gates.pv && typeof rt.gates.pv === 'object'
|
|
1126
1127
|
? rt.gates.pv
|
|
@@ -1129,15 +1130,15 @@ function resolveChargingPvBudgetControl({
|
|
|
1129
1130
|
? rt.gates.pvAllocation
|
|
1130
1131
|
: null;
|
|
1131
1132
|
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
const allocationLimitedW =
|
|
1133
|
+
const unverifiedStorage = rt?.raw?.pvBudgetPhysicalSource === 'storage-flow-unverified';
|
|
1134
|
+
const nonnegativeWatts = value => Number.isFinite(value) && value >= 0;
|
|
1135
|
+
const validGrant = pvGate && nonnegativeWatts(pvGate.effectiveW)
|
|
1136
|
+
&& (pvGate.rawW === undefined || (nonnegativeWatts(pvGate.rawW) && pvGate.effectiveW <= pvGate.rawW))
|
|
1137
|
+
&& (!allocation || (nonnegativeWatts(allocation.totalW) && nonnegativeWatts(allocation.evcsCapW)));
|
|
1138
|
+
if (fresh && validGrant && !unverifiedStorage) {
|
|
1139
|
+
const gateEffectiveW = pvGate.effectiveW;
|
|
1140
|
+
const allocationTotalW = allocation ? Math.min(gateEffectiveW, allocation.totalW) : gateEffectiveW;
|
|
1141
|
+
const allocationLimitedW = allocation ? Math.min(allocationTotalW, allocation.evcsCapW) : allocationTotalW;
|
|
1141
1142
|
|
|
1142
1143
|
// Zwei zentrale PV-Grants sind absichtlich getrennt:
|
|
1143
1144
|
// - physicalGrantW: gesamtes aktuell physikalisch verfuegbares PV-Budget.
|
|
@@ -1192,44 +1193,24 @@ function resolveChargingPvBudgetControl({
|
|
|
1192
1193
|
};
|
|
1193
1194
|
}
|
|
1194
1195
|
|
|
1195
|
-
//
|
|
1196
|
-
//
|
|
1197
|
-
// bei einem kurzzeitig fehlenden/stalen Snapshot die einzige Quelle. Ein
|
|
1198
|
-
// Rueckfall auf die lokale EVCS-PV-Rekonstruktion wuerde genau das zweite
|
|
1199
|
-
// Parallelbudget erzeugen, das Speicher und Wallbox gegeneinander regeln
|
|
1200
|
-
// laesst. In diesem Fehlerfall wird PV-Laden sicher blockiert, bis der Core
|
|
1201
|
-
// wieder einen frischen Grant liefert.
|
|
1202
|
-
if (rt) {
|
|
1203
|
-
return {
|
|
1204
|
-
authoritative: true,
|
|
1205
|
-
blocked: true,
|
|
1206
|
-
source: fresh ? 'central-ems-budget-missing-pv-gate' : 'central-ems-budget-stale-blocked',
|
|
1207
|
-
ageMs,
|
|
1208
|
-
rawW: 0,
|
|
1209
|
-
totalW: 0,
|
|
1210
|
-
evcsCapW: 0,
|
|
1211
|
-
allocation: allocation || null,
|
|
1212
|
-
localRawW: localRaw,
|
|
1213
|
-
localEffectiveW: localEffective,
|
|
1214
|
-
mismatchW: -localEffective,
|
|
1215
|
-
centralGrantW: 0,
|
|
1216
|
-
};
|
|
1217
|
-
}
|
|
1218
|
-
|
|
1219
|
-
// Nur fuer sehr alte Laufzeiten ohne Core-Limits bleibt der lokale Wert als
|
|
1220
|
-
// Kompatibilitaetsfallback erhalten. Im regulaeren NexoWatt-EMS wird dieser
|
|
1221
|
-
// Zweig wegen der festen Modulreihenfolge nicht verwendet.
|
|
1196
|
+
// Only the current shared grant can reserve PV for a controllable load.
|
|
1197
|
+
// A local house estimate cannot replace it during startup or recovery.
|
|
1222
1198
|
return {
|
|
1223
|
-
authoritative:
|
|
1224
|
-
|
|
1199
|
+
authoritative: true,
|
|
1200
|
+
blocked: true,
|
|
1201
|
+
source: !rt ? 'central-ems-budget-missing'
|
|
1202
|
+
: !fresh ? 'central-ems-budget-stale-blocked'
|
|
1203
|
+
: unverifiedStorage ? 'storage-flow-unverified'
|
|
1204
|
+
: pvGate ? 'central-ems-budget-invalid-pv-grant' : 'central-ems-budget-missing-pv-gate',
|
|
1225
1205
|
ageMs,
|
|
1226
|
-
rawW:
|
|
1227
|
-
totalW:
|
|
1228
|
-
evcsCapW:
|
|
1229
|
-
allocation
|
|
1206
|
+
rawW: 0,
|
|
1207
|
+
totalW: 0,
|
|
1208
|
+
evcsCapW: 0,
|
|
1209
|
+
allocation,
|
|
1230
1210
|
localRawW: localRaw,
|
|
1231
1211
|
localEffectiveW: localEffective,
|
|
1232
|
-
mismatchW:
|
|
1212
|
+
mismatchW: -localEffective,
|
|
1213
|
+
centralGrantW: 0,
|
|
1233
1214
|
};
|
|
1234
1215
|
}
|
|
1235
1216
|
/** Code-Teil: toBool – Kapselt einen lokalen Verarbeitungsschritt, damit Aufrufer nicht direkt in Detaildaten eingreifen. */
|
|
@@ -8284,8 +8265,7 @@ class ChargingManagementModule extends BaseModule {
|
|
|
8284
8265
|
tariffActive = stTariffActive ? !!stTariffActive.val : false;
|
|
8285
8266
|
tariffDynamicStale = stTariffStale ? !!stTariffStale.val : false;
|
|
8286
8267
|
tariffCurrentState = stTariffState ? String(stTariffState.val || 'unknown').trim().toLowerCase().replace(/ü/g, 'ue') : 'unknown';
|
|
8287
|
-
|
|
8288
|
-
tariffCurrentPriceEurKwh = Number.isFinite(currentPrice) ? currentPrice : null;
|
|
8268
|
+
tariffCurrentPriceEurKwh = tariffPriceNumber(stTariffPrice?.val);
|
|
8289
8269
|
tariffCurrentPriceFresh = stTariffFresh ? !!stTariffFresh.val : (tariffCurrentPriceEurKwh !== null && !tariffDynamicStale);
|
|
8290
8270
|
if (nfEnabled && nfMode === 'HT') gridChargeAllowedRaw = false;
|
|
8291
8271
|
else if (nfEnabled && nfMode === 'NT') {
|
|
@@ -8431,13 +8411,14 @@ class ChargingManagementModule extends BaseModule {
|
|
|
8431
8411
|
const delta = (ref !== null && exp !== null) ? Math.max(0, exp - ref) : null;
|
|
8432
8412
|
const cheapManual = (ref !== null && delta !== null) ? (ref - delta) : null;
|
|
8433
8413
|
|
|
8434
|
-
//
|
|
8435
|
-
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8414
|
+
// The deadline planner accepts the same priced inputs as the
|
|
8415
|
+
// active tariff policy, including each curve's source timestamp.
|
|
8416
|
+
const ageLimit = this.adapter._tarifVis?.curveMaxAgeMs;
|
|
8417
|
+
const readCurve = key => Number.isFinite(ageLimit) && verifiedTariffAgeMs(this.dp, key, now) <= ageLimit
|
|
8418
|
+
? this.dp.getRaw(key) : null;
|
|
8419
|
+
const rawToday = readCurve('tarif.pricesTodayJson');
|
|
8420
|
+
const rawTomorrow = readCurve('tarif.pricesTomorrowJson');
|
|
8421
|
+
const hasCurrentPrice = active && tariffCurrentPriceFresh && !tariffDynamicStale && tariffCurrentPriceEurKwh !== null;
|
|
8441
8422
|
|
|
8442
8423
|
const curve = [
|
|
8443
8424
|
...parsePriceCurve(rawToday),
|
|
@@ -8453,6 +8434,10 @@ class ChargingManagementModule extends BaseModule {
|
|
|
8453
8434
|
if (!Number.isFinite(startMs) || !Number.isFinite(endMs) || endMs <= now) continue;
|
|
8454
8435
|
if (startMs >= horizonEndMs) break;
|
|
8455
8436
|
|
|
8437
|
+
if (hasCurrentPrice && startMs <= now) {
|
|
8438
|
+
segs.push({ startMs, endMs, priceEurKwh: tariffCurrentPriceEurKwh, state: tariffCurrentState, allowGrid: gridChargeAllowedRaw });
|
|
8439
|
+
continue;
|
|
8440
|
+
}
|
|
8456
8441
|
const p = it.priceEurKwh;
|
|
8457
8442
|
|
|
8458
8443
|
// Approximate tariff state for planning (no hysteresis; conservative enough).
|
|
@@ -8475,8 +8460,9 @@ class ChargingManagementModule extends BaseModule {
|
|
|
8475
8460
|
segs.push({ startMs, endMs, priceEurKwh: p, state, allowGrid });
|
|
8476
8461
|
}
|
|
8477
8462
|
|
|
8478
|
-
if (
|
|
8479
|
-
|
|
8463
|
+
if (hasCurrentPrice && !segs.some(segment => segment.startMs <= now)) {
|
|
8464
|
+
const endMs = Math.min(horizonEndMs, now + 15 * 60000, segs[0]?.startMs ?? Infinity);
|
|
8465
|
+
segs.unshift({ startMs: now, endMs, priceEurKwh: tariffCurrentPriceEurKwh, state: tariffCurrentState, allowGrid: gridChargeAllowedRaw });
|
|
8480
8466
|
}
|
|
8481
8467
|
tariffForecast = {
|
|
8482
8468
|
active,
|
|
@@ -8600,7 +8586,7 @@ class ChargingManagementModule extends BaseModule {
|
|
|
8600
8586
|
// Der nächste Core-Zyklus liest diese ORIGINALEN Leistungsmesswerte.
|
|
8601
8587
|
// Für PV-Rekonstruktion braucht er die volle Aufnahme, auch im Boost:
|
|
8602
8588
|
// Der Netzanteil wird bereits einmal über den signierten NVP abgezogen.
|
|
8603
|
-
this.adapter._zeroExportEvcsMeters = { ts: now,
|
|
8589
|
+
this.adapter._zeroExportEvcsMeters = { ts: now, pvBaseByKey: new Map(),
|
|
8604
8590
|
keys: wbList.filter(w => w.controlAvailable === true && w.actualPowerWId).map(w => `cm.wb.${w.safe}.pW`) };
|
|
8605
8591
|
for (const w of wbList) {
|
|
8606
8592
|
let override = normalizeWallboxModeOverride(w.userMode);
|
|
@@ -8878,6 +8864,7 @@ class ChargingManagementModule extends BaseModule {
|
|
|
8878
8864
|
let pvBudgetLocalEstimateWState = 0;
|
|
8879
8865
|
let pvBudgetMismatchWState = 0;
|
|
8880
8866
|
let pvBudgetCentralAuthoritative = false;
|
|
8867
|
+
let centralPvInputsUsable = false;
|
|
8881
8868
|
|
|
8882
8869
|
if (needPvBudget || needPvDiagnostics) {
|
|
8883
8870
|
// PV-Überschuss sauber ermitteln:
|
|
@@ -8924,12 +8911,16 @@ class ChargingManagementModule extends BaseModule {
|
|
|
8924
8911
|
// Boost bleibt ausserhalb der Kundenaufteilung. Kommandowerte werden hier bewusst
|
|
8925
8912
|
// nicht verwendet; der NVP bildet den realen Leistungsfluss ab.
|
|
8926
8913
|
const effectiveMode = String(w.effectiveMode || '').trim().toLowerCase();
|
|
8914
|
+
const meterKey = `cm.wb.${w.safe}.pW`;
|
|
8915
|
+
const pvBases = this.adapter._zeroExportEvcsMeters.pvBaseByKey;
|
|
8927
8916
|
if ((effectiveMode === 'normal' || effectiveMode === 'auto')
|
|
8928
8917
|
&& normalizeWallboxModeOverride(w.userMode) === 'auto' && w.meterStale !== true) {
|
|
8929
8918
|
pvEvcsPhysicalPvManagedW += a;
|
|
8930
8919
|
pvEvcsAutoPriorityMeasuredW += a;
|
|
8920
|
+
pvBases.set(meterKey, { id: w.actualPowerWId, baseW: 0 });
|
|
8931
8921
|
} else if (effectiveMode === 'pv') {
|
|
8932
8922
|
pvEvcsPhysicalPvManagedW += a;
|
|
8923
|
+
pvBases.set(meterKey, { id: w.actualPowerWId, baseW: 0 });
|
|
8933
8924
|
} else if (effectiveMode === 'minpv') {
|
|
8934
8925
|
// Min+PV-Grundlast kommt aus dem normalen Gesamt-/Netzbudget.
|
|
8935
8926
|
// Nur der Anteil oberhalb der technischen Mindestleistung darf
|
|
@@ -8943,6 +8934,7 @@ class ChargingManagementModule extends BaseModule {
|
|
|
8943
8934
|
: 0,
|
|
8944
8935
|
);
|
|
8945
8936
|
pvEvcsPhysicalPvManagedW += Math.max(0, a - Math.min(a, minPvPhysicalBaseW));
|
|
8937
|
+
pvBases.set(meterKey, { id: w.actualPowerWId, baseW: minPvPhysicalBaseW });
|
|
8946
8938
|
}
|
|
8947
8939
|
|
|
8948
8940
|
const prevCmd = (this._lastCmdTargetW && typeof this._lastCmdTargetW.get === 'function')
|
|
@@ -9001,7 +8993,7 @@ class ChargingManagementModule extends BaseModule {
|
|
|
9001
8993
|
let centralStorageFlowUsed = false;
|
|
9002
8994
|
try {
|
|
9003
8995
|
const flow = (this.adapter && typeof this.adapter._nwResolveBatteryFlowFromCache === 'function')
|
|
9004
|
-
? this.adapter._nwResolveBatteryFlowFromCache({ maxAgeMs: storageFlowMaxAgeMs, deadbandW: 25 })
|
|
8996
|
+
? this.adapter._nwResolveBatteryFlowFromCache({ now, maxAgeMs: storageFlowMaxAgeMs, deadbandW: 25, observe: true, strictStale: true })
|
|
9005
8997
|
: null;
|
|
9006
8998
|
if (flow && typeof flow === 'object') {
|
|
9007
8999
|
centralStorageFlowUsed = true;
|
|
@@ -9105,14 +9097,12 @@ class ChargingManagementModule extends BaseModule {
|
|
|
9105
9097
|
: pvEvcsActualW;
|
|
9106
9098
|
const baseLoadNoEvW = Math.max(0, loadTotalDirectW - evcsForLoadW);
|
|
9107
9099
|
pvSurplusNoEvW = Math.max(0, pvDirectW - baseLoadNoEvW);
|
|
9108
|
-
gridImportNoEvW = Math.max(0, baseLoadNoEvW - pvDirectW);
|
|
9109
9100
|
} else if (typeof gridW === 'number' && Number.isFinite(gridW)) {
|
|
9110
9101
|
// Fallback-Rekonstruktion ohne direkte PV-/Verbrauchs-DPs. Wir rechnen
|
|
9111
9102
|
// sowohl EVCS als auch die aktuelle Speicherladung zum sichtbaren Export
|
|
9112
9103
|
// zurueck. Batterie-Entladung wird abgezogen, weil sie kein PV-Ueberschuss
|
|
9113
9104
|
// ist und das Wallbox-Budget niemals kuenstlich vergroessern darf.
|
|
9114
9105
|
pvSurplusNoEvW = Math.max(0, (-gridW) + pvEvcsUsedW + storageChargeNowW - storageDischargeNowW);
|
|
9115
|
-
gridImportNoEvW = Math.max(0, gridW - pvEvcsUsedW - storageChargeNowW + storageDischargeNowW);
|
|
9116
9106
|
} else if (typeof pvSurplusCfgW === 'number' && Number.isFinite(pvSurplusCfgW)) {
|
|
9117
9107
|
// Fallback wenn kein Grid-DP verfügbar (z. B. nur PV-Surplus DP konfiguriert)
|
|
9118
9108
|
pvSurplusNoEvW = Math.max(0, pvSurplusCfgW);
|
|
@@ -9169,6 +9159,7 @@ class ChargingManagementModule extends BaseModule {
|
|
|
9169
9159
|
});
|
|
9170
9160
|
const allocationGate = pvBudgetControl.allocation;
|
|
9171
9161
|
pvBudgetCentralAuthoritative = pvBudgetControl.authoritative === true;
|
|
9162
|
+
centralPvInputsUsable = pvBudgetControl.blocked !== true;
|
|
9172
9163
|
pvBudgetSourceState = String(pvBudgetControl.source || '');
|
|
9173
9164
|
pvBudgetCentralAgeMsState = pvBudgetControl.ageMs;
|
|
9174
9165
|
pvBudgetCentralTotalWState = Math.max(0, Number(pvBudgetControl.totalW) || 0);
|
|
@@ -9219,11 +9210,11 @@ class ChargingManagementModule extends BaseModule {
|
|
|
9219
9210
|
&& Number.isFinite(Number(w.pvStartupHoldUntilMs)) && Number(w.pvStartupHoldUntilMs) > now);
|
|
9220
9211
|
|
|
9221
9212
|
gridImportW = (typeof gridW === 'number' && Number.isFinite(gridW)) ? Math.max(0, gridW) : 0;
|
|
9222
|
-
|
|
9223
|
-
|
|
9224
|
-
|
|
9225
|
-
|
|
9226
|
-
|
|
9213
|
+
// The abort threshold describes import at the physical connection.
|
|
9214
|
+
// A building estimate or an outstanding EV command is not a meter reading.
|
|
9215
|
+
gridImportNoEvW = Number.isFinite(gridW)
|
|
9216
|
+
? Math.max(0, gridW - pvEvcsActualW - storageChargeNowW + storageDischargeNowW)
|
|
9217
|
+
: 0;
|
|
9227
9218
|
|
|
9228
9219
|
let pvAvail = purePvHysteresisActive ? !!this._pvAvailable : false;
|
|
9229
9220
|
if (purePvHysteresisActive) {
|
|
@@ -11530,7 +11521,7 @@ if (components.length) {
|
|
|
11530
11521
|
const probeActualFresh = !!(w.actualPowerWId && typeof probeMeasurementAgeMs === 'number'
|
|
11531
11522
|
&& Number.isFinite(probeMeasurementAgeMs) && probeMeasurementAgeMs >= 0
|
|
11532
11523
|
&& probeMeasurementAgeMs <= 5000 && !w.meterStale && !w.staleAny);
|
|
11533
|
-
const probeEligible = !!(isPvOnly && zeroMode.active && w.enabled && w.online && w.controlAvailable
|
|
11524
|
+
const probeEligible = !!(isPvOnly && centralPvInputsUsable && zeroMode.active && w.enabled && w.online && w.controlAvailable
|
|
11534
11525
|
&& w.electricalLimitsValid !== false && w.vehiclePlugged === true
|
|
11535
11526
|
&& (w.vehicleDemandConfirmed === true || w.vehicleStartEligible === true)
|
|
11536
11527
|
&& !w.faultActive && !w.unavailableActive && !w.operationalBlocked && !w.rfidLockActive
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
8
|
*
|
|
9
9
|
* Quelle: src-ts/runtime-executables/ems/modules/core-limits.ts
|
|
10
|
-
* Quell-Hash: sha256:
|
|
10
|
+
* Quell-Hash: sha256:8cfc36ca57999179b9e1695765fbd1e6e35eef0fc146d3b310fff381482736b8
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -331,6 +331,7 @@ function legacyComputeCentralBudgetGrant(runtime = {}, request = {}) {
|
|
|
331
331
|
* - Ohne irgendeinen physikalischen Beleg bleibt die Obergrenze 0 W.
|
|
332
332
|
*/
|
|
333
333
|
function legacyResolvePvBudgetPhysicalCapW({
|
|
334
|
+
storageFlowUsable = true,
|
|
334
335
|
measuredPvW = 0,
|
|
335
336
|
measuredPvFresh = false,
|
|
336
337
|
flowRawW = 0,
|
|
@@ -343,6 +344,7 @@ function legacyResolvePvBudgetPhysicalCapW({
|
|
|
343
344
|
exportEvidenceThresholdW = 250,
|
|
344
345
|
importToleranceW = 250,
|
|
345
346
|
} = {}) {
|
|
347
|
+
if (!storageFlowUsable) return { capW: 0, source: 'storage-flow-unverified', trusted: false, held: false };
|
|
346
348
|
const measuredW = Math.max(0, Number(measuredPvW) || 0);
|
|
347
349
|
const flowW = Math.max(0, Number(flowRawW) || 0);
|
|
348
350
|
const exportW = Math.max(0, Number(gridExportW) || 0);
|
|
@@ -1414,6 +1416,40 @@ class CoreLimitsModule extends BaseModule {
|
|
|
1414
1416
|
return fallback;
|
|
1415
1417
|
}
|
|
1416
1418
|
|
|
1419
|
+
// Core runs before charging management. Re-read the last classified meter
|
|
1420
|
+
// mappings against the current cycle's source cache, after NVP and EV have
|
|
1421
|
+
// changed. A previous cycle's aggregate cannot follow a real start or stop.
|
|
1422
|
+
_currentEvMeterPowers(now, maxAgeMs) {
|
|
1423
|
+
const meters = this.adapter?._zeroExportEvcsMeters;
|
|
1424
|
+
if (!(meters?.pvBaseByKey instanceof Map) || typeof this.dp?.getVerifiedMeasurementTimestampMs !== 'function') return null;
|
|
1425
|
+
let actualW = 0;
|
|
1426
|
+
let pvManagedW = 0;
|
|
1427
|
+
if (meters.ts > now || now - meters.ts > maxAgeMs) return { actualW, pvManagedW };
|
|
1428
|
+
const seen = new Map();
|
|
1429
|
+
for (const key of meters.keys) {
|
|
1430
|
+
const entry = this.dp.getEntry(key);
|
|
1431
|
+
const id = entry?.srcObjectId || entry?.objectId;
|
|
1432
|
+
if (!id) continue;
|
|
1433
|
+
// A shared meter identifies one physical load but no unique mode.
|
|
1434
|
+
if (seen.has(id)) {
|
|
1435
|
+
pvManagedW -= seen.get(id);
|
|
1436
|
+
seen.set(id, 0);
|
|
1437
|
+
continue;
|
|
1438
|
+
}
|
|
1439
|
+
const stamp = this.dp.getVerifiedMeasurementTimestampMs(key, now);
|
|
1440
|
+
if (!Number.isFinite(stamp) || now - stamp > maxAgeMs) continue;
|
|
1441
|
+
const watts = this.dp.getNumber(key, null);
|
|
1442
|
+
if (!Number.isFinite(watts) || watts < 0) continue;
|
|
1443
|
+
const row = meters.pvBaseByKey.get(key);
|
|
1444
|
+
const eligibleW = row && (row.id === entry.objectId || row.id === id) && Number.isFinite(row.baseW)
|
|
1445
|
+
? Math.max(0, watts - row.baseW) : 0;
|
|
1446
|
+
seen.set(id, eligibleW);
|
|
1447
|
+
actualW += watts;
|
|
1448
|
+
pvManagedW += eligibleW;
|
|
1449
|
+
}
|
|
1450
|
+
return { actualW, pvManagedW };
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1417
1453
|
/**
|
|
1418
1454
|
* Code-Teil: _resolveDirectPvPower
|
|
1419
1455
|
* Zweck: Vergleicht alle frischen direkten PV-Quellen und verwendet die
|
|
@@ -1921,41 +1957,25 @@ class CoreLimitsModule extends BaseModule {
|
|
|
1921
1957
|
// - die nicht ausgewaehlte Topologie ist in jedem Fall ausgeschlossen
|
|
1922
1958
|
let storageChargeW = 0;
|
|
1923
1959
|
let storageDischargeW = 0;
|
|
1924
|
-
|
|
1960
|
+
const batteryMappings = cfg.datapoints || {};
|
|
1961
|
+
const storageFlowExpected = storageTopology !== 'none'
|
|
1962
|
+
|| storageAuthority.farmAggregationActive === true
|
|
1963
|
+
|| ['batteryPower', 'storageChargePower', 'storageDischargePower', 'storageSoc']
|
|
1964
|
+
.some(key => Boolean(String(batteryMappings[key] || '').trim()));
|
|
1965
|
+
let storageFlowUsable = !storageFlowExpected;
|
|
1925
1966
|
try {
|
|
1926
|
-
const flow =
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
if (!usedCentralStorageFlow && storageTopology === 'farm') {
|
|
1937
|
-
// Kompatibilitaets-Fallback fuer Laufzeiten ohne zentralen Resolver:
|
|
1938
|
-
// bei ausgewaehlter Farm sind ausschliesslich Farmaggregate zulaessig.
|
|
1939
|
-
storageChargeW = Math.max(0, this._readCacheNumberMax(['storageFarm.totalChargePowerW'], 0) || 0);
|
|
1940
|
-
storageDischargeW = Math.max(0, this._readCacheNumberMax(['storageFarm.totalDischargePowerW'], 0) || 0);
|
|
1941
|
-
} else if (!usedCentralStorageFlow && storageTopology === 'single') {
|
|
1942
|
-
// Beim Einzelpfad duerfen keine alten Farmwerte in das Budget einfließen.
|
|
1943
|
-
storageChargeW = Math.max(0, this._readCacheNumberMax(['storageChargePower'], 0) || 0);
|
|
1944
|
-
storageDischargeW = Math.max(0, this._readCacheNumberMax(['storageDischargePower'], 0) || 0);
|
|
1945
|
-
const batteryPowerW = this._readCacheNumber(['batteryPower'], null);
|
|
1946
|
-
if (isFiniteNumber(batteryPowerW)) {
|
|
1947
|
-
const flowBatteryMapped = !!(cfg.datapoints && String(cfg.datapoints.batteryPower || '').trim());
|
|
1948
|
-
const invBattery = flowBatteryMapped && !!(cfg.settings && cfg.settings.flowInvertBattery);
|
|
1949
|
-
const signed = Math.round(invBattery ? -batteryPowerW : batteryPowerW);
|
|
1950
|
-
if (signed < -25) {
|
|
1951
|
-
storageChargeW = Math.max(storageChargeW, Math.abs(signed));
|
|
1952
|
-
storageDischargeW = 0;
|
|
1953
|
-
} else if (signed > 25) {
|
|
1954
|
-
storageDischargeW = Math.max(storageDischargeW, signed);
|
|
1955
|
-
storageChargeW = 0;
|
|
1956
|
-
}
|
|
1967
|
+
const flow = this.adapter?._nwResolveBatteryFlowFromCache?.({
|
|
1968
|
+
now, maxAgeMs: staleMs, deadbandW: 25, strictStale: true, observe: true,
|
|
1969
|
+
});
|
|
1970
|
+
const stamp = flow?.observedAt;
|
|
1971
|
+
if (Number.isFinite(stamp) && stamp > 0 && stamp <= now && now - stamp <= staleMs
|
|
1972
|
+
&& Number.isFinite(flow.chargeW) && flow.chargeW >= 0
|
|
1973
|
+
&& Number.isFinite(flow.dischargeW) && flow.dischargeW >= 0) {
|
|
1974
|
+
storageFlowUsable = true;
|
|
1975
|
+
storageChargeW = Math.round(flow.chargeW);
|
|
1976
|
+
storageDischargeW = Math.round(flow.dischargeW);
|
|
1957
1977
|
}
|
|
1958
|
-
}
|
|
1978
|
+
} catch { /* A configured storage with no observation cannot establish PV surplus. */ }
|
|
1959
1979
|
|
|
1960
1980
|
const evcsEnabled = cfg.enableChargingManagement !== false;
|
|
1961
1981
|
const thermalEnabled = cfg.enableThermalControl === true;
|
|
@@ -1980,14 +2000,15 @@ class CoreLimitsModule extends BaseModule {
|
|
|
1980
2000
|
|
|
1981
2001
|
// Nur aktive EMS-Apps dürfen alte Runtimewerte in Budget/Diagnose übernehmen.
|
|
1982
2002
|
const evcsUsedW = evcsEnabled ? evcsUsedRawW : 0;
|
|
1983
|
-
const
|
|
2003
|
+
const currentEvMeters = evcsEnabled ? this._currentEvMeterPowers(now, staleMs) : null;
|
|
2004
|
+
const evcsActualW = evcsEnabled ? (currentEvMeters?.actualW ?? evcsActualRawW) : 0;
|
|
1984
2005
|
const zeroExportMode = readZeroExportMode(this.adapter);
|
|
1985
2006
|
const zeroExportMeasurementIds = new Set();
|
|
1986
2007
|
// Bei Nulleinspeisung die vollständige FRISCHE EV-Aufnahme rekonstruieren,
|
|
1987
2008
|
// einschließlich Boost/Auto-Netzanteil. Der signierte NVP zieht Netzbezug
|
|
1988
2009
|
// bereits ab; ein zweiter Abzug am LP würde PV bei jedem Tick verlieren.
|
|
1989
2010
|
const evcsPvUsedW = evcsEnabled ? (zeroExportMode.active
|
|
1990
|
-
? measuredFlexibleLoadW(this.adapter, this.dp, 'evcs', zeroExportMeasurementIds, now) : evcsPvUsedRawW) : 0;
|
|
2011
|
+
? measuredFlexibleLoadW(this.adapter, this.dp, 'evcs', zeroExportMeasurementIds, now) : (currentEvMeters?.pvManagedW ?? evcsPvUsedRawW)) : 0;
|
|
1991
2012
|
// Bei Nulleinspeisung zählt nur gemessene Aufnahme, kein letzter Sollwert.
|
|
1992
2013
|
const thermalUsedW = thermalEnabled ? (zeroExportMode.active ? measuredFlexibleLoadW(this.adapter, this.dp, 'thermal', zeroExportMeasurementIds, now) : thermalUsedRawW) : 0, thermalActualW = thermalEnabled ? thermalActualRawW : 0;
|
|
1993
2014
|
const heatingRodUsedW = heatingRodEnabled ? (zeroExportMode.active ? measuredFlexibleLoadW(this.adapter, this.dp, 'heatingRod', zeroExportMeasurementIds, now) : heatingRodUsedRawW) : 0, heatingRodActualW = heatingRodEnabled ? heatingRodActualRawW : 0;
|
|
@@ -2012,6 +2033,7 @@ class CoreLimitsModule extends BaseModule {
|
|
|
2012
2033
|
? Math.max(0, now - this._lastTrustedPvPhysicalCapTs)
|
|
2013
2034
|
: null;
|
|
2014
2035
|
const pvPhysicalResolution = resolvePvBudgetPhysicalCapW({
|
|
2036
|
+
storageFlowUsable,
|
|
2015
2037
|
measuredPvW: pvPowerW,
|
|
2016
2038
|
measuredPvFresh: pvPowerInfo.fresh === true,
|
|
2017
2039
|
flowRawW: pvBudgetFlowRawW,
|
|
@@ -2327,6 +2349,7 @@ class CoreLimitsModule extends BaseModule {
|
|
|
2327
2349
|
importToleranceW: 250,
|
|
2328
2350
|
},
|
|
2329
2351
|
storage: {
|
|
2352
|
+
flowUsable: storageFlowUsable,
|
|
2330
2353
|
chargeW: storageChargeW,
|
|
2331
2354
|
dischargeW: storageDischargeW,
|
|
2332
2355
|
eligible: storageEligible,
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
8
|
*
|
|
9
9
|
* Quelle: src-ts/runtime-executables/ems/modules/para14a.ts
|
|
10
|
-
* Quell-Hash: sha256:
|
|
10
|
+
* Quell-Hash: sha256:9f7a9f836cb28da9b5419fc822da6b223f48f6c74421539f1448106af11998e1
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -1031,7 +1031,8 @@ class Para14aModule extends BaseModule {
|
|
|
1031
1031
|
const thermalCfg = root.thermal && typeof root.thermal === 'object' ? root.thermal : {};
|
|
1032
1032
|
const rows = Array.isArray(thermalCfg.devices) ? thermalCfg.devices : [];
|
|
1033
1033
|
rows.forEach((row, index) => {
|
|
1034
|
-
|
|
1034
|
+
// The MIRA PV request delegates control back to its local heat curve and cannot promise a hard cap.
|
|
1035
|
+
if (!row || row.enabled !== true || row.ovumMira === true) return;
|
|
1035
1036
|
const slot = safeSlot(row.slot ?? row.consumerSlot, index + 1);
|
|
1036
1037
|
const slotCfg = flowConsumers[slot - 1] && typeof flowConsumers[slot - 1] === 'object'
|
|
1037
1038
|
? flowConsumers[slot - 1]
|