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.
Files changed (242) hide show
  1. package/NEXOWATT_EOS_BUILD_INFO.json +10 -11
  2. package/README.md +7 -7
  3. package/adminWww/.vite/manifest.json +233 -224
  4. package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +13897 -13887
  5. package/adminWww/assets/AccessTime-CuR73YC3.js +1 -0
  6. package/adminWww/assets/{AdapterUpdateDialog-UhaQHyF1.js → AdapterUpdateDialog-5L75o18m.js} +5 -5
  7. package/adminWww/assets/{Adapters-Di3sM_ky.js → Adapters-FcghjF7E.js} +5 -5
  8. package/adminWww/assets/ConfigManager-BnHarBfH.js +1 -0
  9. package/adminWww/assets/Enums-BjLbLLQL.js +92 -0
  10. package/adminWww/assets/Fields-DDE1hVOa.js +1 -0
  11. package/adminWww/assets/Files-CDjnR4q6.js +1 -0
  12. package/adminWww/assets/{Hosts-DXjTE0pX.js → Hosts-CJKQaNrD.js} +6 -6
  13. package/adminWww/assets/Instances-DZNl369k.js +4 -0
  14. package/adminWww/assets/Intro-CjAmMGDB.js +2 -0
  15. package/adminWww/assets/KeyboardArrowRight-ifvmV1ZL.js +1 -0
  16. package/adminWww/assets/{Logs-DTo6XJF_.js → Logs-rUAV7SwM.js} +2 -2
  17. package/adminWww/assets/MoreHoriz-CS7nODK8.js +1 -0
  18. package/adminWww/assets/{Objects-DyEBMDK6.js → Objects-CqOH6rT_.js} +4 -4
  19. package/adminWww/assets/Overview-BOtXqsMy.js +3 -0
  20. package/adminWww/assets/Pageview-wzrLQZ-j.js +1 -0
  21. package/adminWww/assets/PersonOff-YtHcY0sV.js +1 -0
  22. package/adminWww/assets/Star-D8VNXawT.js +1 -0
  23. package/adminWww/assets/State-C8ncThop.js +1 -0
  24. package/adminWww/assets/UsedResources-lUYJqy4F.js +2 -0
  25. package/adminWww/assets/Users-CK1Cax82.js +1 -0
  26. package/adminWww/assets/ViewCompact-D7bHgn99.js +1 -0
  27. package/adminWww/assets/ViewSidebar-CjClbCI5.js +1 -0
  28. package/adminWww/assets/WifiTethering-DJ9VO12W.js +1 -0
  29. package/adminWww/assets/{bootstrap-BQ4OzwbT.js → bootstrap-CC0Qr-kr.js} +25 -25
  30. package/adminWww/assets/date-fns-BtR4dG_j.js +1 -0
  31. package/adminWww/assets/en-US-BjjaEI6N.js +1 -0
  32. package/adminWww/assets/{hostInit-CGSSNegd.js → hostInit-DqGL6nY8.js} +1 -1
  33. package/adminWww/assets/icons-material-07rWS63O.js +1 -0
  34. package/adminWww/assets/{index-C4CShixx.js → index-BhhkToP2.js} +2 -2
  35. package/adminWww/assets/{installSVGRenderer-DeaOAT3W.js → installSVGRenderer-B4-7lSQZ.js} +1 -1
  36. package/adminWww/assets/isSameWeek-WMSJR5Qs.js +1 -0
  37. package/adminWww/assets/locale-DN6Bdkdt.js +1 -0
  38. package/adminWww/assets/{mf-entry-bootstrap-0-c5733c2d.js → mf-entry-bootstrap-0-1afd2287.js} +2 -2
  39. package/adminWww/assets/sentry-CPzCHrwe.js +1 -0
  40. package/adminWww/assets/setYear-DDSuW45e.js +1 -0
  41. package/adminWww/index.html +23 -23
  42. package/adminWww/mf-manifest.json +1 -1
  43. package/adminWww/mf-stats.json +1 -1
  44. package/adminWww/{remoteEntry-eos-9.0.31.js → remoteEntry-eos-9.0.34.js} +1 -1
  45. package/adminWww/remoteEntry.js +1 -1
  46. package/build/lib/eosDeviceEmsPlan.js +285 -9
  47. package/build/lib/eosDeviceEmsPlan.js.map +1 -1
  48. package/build/lib/eosDeviceEmsService.js +29 -2
  49. package/build/lib/eosDeviceEmsService.js.map +1 -1
  50. package/build/lib/eosUiProcess.js +31 -14
  51. package/build/lib/eosUiProcess.js.map +1 -1
  52. package/build/lib/eosUiProcessRpc.js +3 -1
  53. package/build/lib/eosUiProcessRpc.js.map +1 -1
  54. package/build/lib/eosUiProcessWorker.js +6 -4
  55. package/build/lib/eosUiProcessWorker.js.map +1 -1
  56. package/docs/README.md +3 -2
  57. package/docs/reports/unified-9.0.32/PRUEFBERICHT.md +34 -0
  58. package/docs/reports/unified-9.0.32/PRUEFERGEBNISSE.json +112 -0
  59. package/docs/reports/unified-9.0.32/raw/INDEX.json +102 -0
  60. package/docs/reports/unified-9.0.32/raw/backend.log +5 -0
  61. package/docs/reports/unified-9.0.32/raw/browser-cadence-headless.json +63 -0
  62. package/docs/reports/unified-9.0.32/raw/browser-flow-headless.json +328 -0
  63. package/docs/reports/unified-9.0.32/raw/focused.log +67 -0
  64. package/docs/reports/unified-9.0.32/raw/frontend.log +151 -0
  65. package/docs/reports/unified-9.0.32/raw/installer.log +26 -0
  66. package/docs/reports/unified-9.0.32/raw/lint.log +5 -0
  67. package/docs/reports/unified-9.0.32/raw/modules.log +5 -0
  68. package/docs/reports/unified-9.0.32/raw/node22-tests-final.log +17212 -0
  69. package/docs/reports/unified-9.0.32/raw/node22-version.log +1 -0
  70. package/docs/reports/unified-9.0.32/raw/node24-tests-final.log +2869 -0
  71. package/docs/reports/unified-9.0.32/raw/node24-version.log +1 -0
  72. package/docs/reports/unified-9.0.32/raw/sbom.log +2 -0
  73. package/docs/reports/unified-9.0.32/raw/typecheck.log +5 -0
  74. package/docs/reports/unified-9.0.32/raw/ui-runtime.log +8 -0
  75. package/docs/reports/unified-9.0.32/raw/version-parity-928-929.log +6 -0
  76. package/docs/reports/unified-9.0.33/PRUEFBERICHT.md +60 -0
  77. package/docs/reports/unified-9.0.33/PRUEFERGEBNISSE.json +112 -0
  78. package/docs/reports/unified-9.0.33/raw/INDEX.json +272 -0
  79. package/docs/reports/unified-9.0.33/raw/backend.log +5 -0
  80. package/docs/reports/unified-9.0.33/raw/browser/UI_REVIEW.json +147 -0
  81. package/docs/reports/unified-9.0.33/raw/browser/admin-bundle.log +136 -0
  82. package/docs/reports/unified-9.0.33/raw/browser/eos-backup-settings-browser.log +67 -0
  83. package/docs/reports/unified-9.0.33/raw/browser/eos-customer-tariff-startup-browser.log +43 -0
  84. package/docs/reports/unified-9.0.33/raw/browser/eos-energyflow-browser-smoke.log +438 -0
  85. package/docs/reports/unified-9.0.33/raw/browser/eos-energyflow-cadence-browser-10s.log +108 -0
  86. package/docs/reports/unified-9.0.33/raw/browser/eos-evcs-delete-browser.log +1 -0
  87. package/docs/reports/unified-9.0.33/raw/browser/eos-history-setup-browser-smoke.log +49 -0
  88. package/docs/reports/unified-9.0.33/raw/browser/eos-kiosk-browser.log +59 -0
  89. package/docs/reports/unified-9.0.33/raw/browser/eos-ocpp-admin-browser.log +71 -0
  90. package/docs/reports/unified-9.0.33/raw/browser/eos-ocpp-installer-discovery-browser.log +11 -0
  91. package/docs/reports/unified-9.0.33/raw/browser/eos-pwa-trust-browser.log +35 -0
  92. package/docs/reports/unified-9.0.33/raw/browser/eos-runtime-controls-browser.log +78 -0
  93. package/docs/reports/unified-9.0.33/raw/browser/eos-runtime-health-browser.log +49 -0
  94. package/docs/reports/unified-9.0.33/raw/browser/eos-runtime-login-browser.log +34 -0
  95. package/docs/reports/unified-9.0.33/raw/browser/smarthome.log +46 -0
  96. package/docs/reports/unified-9.0.33/raw/browser-ten-seconds.json +108 -0
  97. package/docs/reports/unified-9.0.33/raw/changed-test-coverage.json +116 -0
  98. package/docs/reports/unified-9.0.33/raw/connected-control-node22.jsonl +42 -0
  99. package/docs/reports/unified-9.0.33/raw/connected-control-summary-node22.json +103 -0
  100. package/docs/reports/unified-9.0.33/raw/connected-control-summary.json +103 -0
  101. package/docs/reports/unified-9.0.33/raw/connected-control.jsonl +42 -0
  102. package/docs/reports/unified-9.0.33/raw/display-ui-node22.log +162 -0
  103. package/docs/reports/unified-9.0.33/raw/display-ui.log +35 -0
  104. package/docs/reports/unified-9.0.33/raw/frontend.log +151 -0
  105. package/docs/reports/unified-9.0.33/raw/git-delivery-fix.log +10 -0
  106. package/docs/reports/unified-9.0.33/raw/installer.log +26 -0
  107. package/docs/reports/unified-9.0.33/raw/license-central-node24.log +173 -0
  108. package/docs/reports/unified-9.0.33/raw/lint-final.log +45 -0
  109. package/docs/reports/unified-9.0.33/raw/modules.log +5 -0
  110. package/docs/reports/unified-9.0.33/raw/node22-npm-version.log +1 -0
  111. package/docs/reports/unified-9.0.33/raw/node22-tests-final.log +17646 -0
  112. package/docs/reports/unified-9.0.33/raw/node22-version.log +1 -0
  113. package/docs/reports/unified-9.0.33/raw/node24-npm-version.log +1 -0
  114. package/docs/reports/unified-9.0.33/raw/node24-tests-final.log +2941 -0
  115. package/docs/reports/unified-9.0.33/raw/node24-version.log +1 -0
  116. package/docs/reports/unified-9.0.33/raw/process-final-node22.log +220 -0
  117. package/docs/reports/unified-9.0.33/raw/process-final-node24.log +110 -0
  118. package/docs/reports/unified-9.0.33/raw/ram-picker.jsonl +12 -0
  119. package/docs/reports/unified-9.0.33/raw/reg-combined-node22.log +622 -0
  120. package/docs/reports/unified-9.0.33/raw/reg-combined.log +108 -0
  121. package/docs/reports/unified-9.0.33/raw/sbom-final.log +8 -0
  122. package/docs/reports/unified-9.0.33/raw/tariff-update-all-final-node22.log +1185 -0
  123. package/docs/reports/unified-9.0.33/raw/typecheck-final.log +5 -0
  124. package/docs/reports/unified-9.0.33/raw/ui-functional-node24.log +430 -0
  125. package/docs/reports/unified-9.0.33/raw/ui-runtime-final-verification.log +1 -0
  126. package/docs/reports/unified-9.0.33/raw/update-controller-standard-7-2-5.log +4 -0
  127. package/docs/reports/unified-9.0.33/raw/worker-memory-eos933.log +12 -0
  128. package/docs/reports/unified-9.0.33/raw/worker-memory-flow932.log +12 -0
  129. package/docs/reports/unified-9.0.34/PRUEFBERICHT.md +40 -0
  130. package/docs/reports/unified-9.0.34/PRUEFERGEBNISSE.json +112 -0
  131. package/docs/reports/unified-9.0.34/raw/INDEX.json +137 -0
  132. package/docs/reports/unified-9.0.34/raw/backend.log +5 -0
  133. package/docs/reports/unified-9.0.34/raw/dashboard-interval.json +108 -0
  134. package/docs/reports/unified-9.0.34/raw/fixtures-verification.log +44 -0
  135. package/docs/reports/unified-9.0.34/raw/frontend.log +152 -0
  136. package/docs/reports/unified-9.0.34/raw/installer.log +26 -0
  137. package/docs/reports/unified-9.0.34/raw/lint.log +45 -0
  138. package/docs/reports/unified-9.0.34/raw/mira-dashboard-browser.json +1 -0
  139. package/docs/reports/unified-9.0.34/raw/mira-devices-browser.log +9 -0
  140. package/docs/reports/unified-9.0.34/raw/mira-memory-process.json +379 -0
  141. package/docs/reports/unified-9.0.34/raw/modules.log +5 -0
  142. package/docs/reports/unified-9.0.34/raw/node22-mira.log +216 -0
  143. package/docs/reports/unified-9.0.34/raw/node22-protocol-to-ems.log +8 -0
  144. package/docs/reports/unified-9.0.34/raw/node22-tests-final.log +17850 -0
  145. package/docs/reports/unified-9.0.34/raw/node22-version.log +1 -0
  146. package/docs/reports/unified-9.0.34/raw/node24-mira.log +40 -0
  147. package/docs/reports/unified-9.0.34/raw/node24-protocol-to-ems.log +6 -0
  148. package/docs/reports/unified-9.0.34/raw/node24-tests-final.log +2973 -0
  149. package/docs/reports/unified-9.0.34/raw/node24-version.log +1 -0
  150. package/docs/reports/unified-9.0.34/raw/protocol-to-ems.cjs +364 -0
  151. package/docs/reports/unified-9.0.34/raw/release-metadata.log +13 -0
  152. package/docs/reports/unified-9.0.34/raw/sbom.log +8 -0
  153. package/docs/reports/unified-9.0.34/raw/typecheck.log +5 -0
  154. package/docs/reports/unified-9.0.34/raw/ui-runtime.log +8 -0
  155. package/docs/start/START_HIER_9.0.32.md +16 -0
  156. package/docs/start/START_HIER_9.0.33.md +32 -0
  157. package/docs/start/START_HIER_9.0.34.md +25 -0
  158. package/io-package.json +16 -16
  159. package/modules/devices/admin/alias-contract-v1.json +22 -0
  160. package/modules/devices/admin/ems-assignment.js +6 -1
  161. package/modules/devices/admin/host-bridge.js +2 -0
  162. package/modules/devices/admin/index.html +16 -0
  163. package/modules/devices/admin/index_m.js +168 -9
  164. package/modules/devices/admin/templates.json +976 -0
  165. package/modules/devices/checks/emsAssignment.check.js +52 -2
  166. package/modules/devices/index.js +5 -1
  167. package/modules/devices/lib/alias-contract-v1.json +22 -0
  168. package/modules/devices/lib/deviceRuntime.js +17 -7
  169. package/modules/devices/lib/drivers/modbus.js +1 -1
  170. package/modules/devices/lib/drivers/modbusRtuBus.js +7 -1
  171. package/modules/devices/lib/drivers/ovumMira.js +148 -0
  172. package/modules/devices/lib/ovumMiraAliases.js +61 -0
  173. package/modules/devices/lib/ovumMiraConnection.js +32 -0
  174. package/modules/devices/lib/templates.json +976 -0
  175. package/modules/devices/test/aliasContractV1.test.js +4 -4
  176. package/modules/devices/test/deviceAliasSemantics.test.js +2 -2
  177. package/modules/devices/test/fixtures/approved-additive-templates.json +3 -1
  178. package/modules/devices/test/ovumMiraPairing.test.js +76 -0
  179. package/modules/devices/test/ovumMiraTemplates.test.js +110 -0
  180. package/modules/devices/test/ovumMiraTransport.test.js +162 -0
  181. package/package.json +10 -5
  182. package/release-manifests/unified/build-environment.cdx.json +7 -7
  183. package/release-manifests/unified/files.json +302 -180
  184. package/release-manifests/unified/frontend.cdx.json +7 -7
  185. package/release-manifests/unified/installer.cdx.json +7 -7
  186. package/release-manifests/unified/obsolete-admin-assets.json +281 -28
  187. package/release-manifests/unified/runtime.cdx.json +28 -28
  188. package/release-manifests/unified/validation.json +15 -15
  189. package/tools/eos-release-manifest.cjs +2 -2
  190. package/ui/ems/consumers/ovum-mira.js +164 -0
  191. package/ui/ems/consumers/sg-ready.js +26 -6
  192. package/ui/ems/datapoints.js +12 -4
  193. package/ui/ems/modules/charging-management.js +58 -67
  194. package/ui/ems/modules/core-limits.js +59 -36
  195. package/ui/ems/modules/para14a.js +3 -2
  196. package/ui/ems/modules/prime-mover-control.js +141 -29
  197. package/ui/ems/modules/stage-a-diagnostics.js +4 -2
  198. package/ui/ems/modules/storage-control.js +31 -38
  199. package/ui/ems/modules/storage-mapping.js +14 -13
  200. package/ui/ems/modules/tarif-vis.js +38 -56
  201. package/ui/ems/modules/thermal-control.js +91 -10
  202. package/ui/ems/services/measurement-freshness.js +58 -21
  203. package/ui/ems/services/safety-envelope.js +13 -6
  204. package/ui/io-package.json +13 -1
  205. package/ui/lib/datapoint-picker.js +27 -20
  206. package/ui/lib/installer-lifecycle.js +11 -2
  207. package/ui/lib/tariff-price.js +7 -1
  208. package/ui/lib/ts-mirrors/ems/core-limits/core-runtime.js +5 -1
  209. package/ui/main.js +313 -188
  210. package/ui/package.json +4 -3
  211. package/ui/www/app.js +238 -100
  212. package/ui/www/ems-apps.js +30 -10
  213. package/ui/www/index.html +1 -0
  214. package/ui/www/licenses/smarthome-markdown-components.json +156 -156
  215. package/ui/www/live-display.js +38 -4
  216. package/ui/www/manifest.webmanifest +2 -2
  217. package/ui/www/power-measurements.js +28 -3
  218. package/adminWww/assets/AddLink-0L0E-LsA.js +0 -1
  219. package/adminWww/assets/ColorLens-DA51K29x.js +0 -1
  220. package/adminWww/assets/ConfigManager-C2naRwDl.js +0 -1
  221. package/adminWww/assets/Enums-B9ucB-qg.js +0 -92
  222. package/adminWww/assets/Fields-DN41WFbp.js +0 -1
  223. package/adminWww/assets/FileCopy-B16lEuur.js +0 -1
  224. package/adminWww/assets/Files-C3PbbeNR.js +0 -1
  225. package/adminWww/assets/Instances-PKvEjDNQ.js +0 -4
  226. package/adminWww/assets/Intro-BnYMjDZr.js +0 -2
  227. package/adminWww/assets/Lens-9lkeoWGk.js +0 -1
  228. package/adminWww/assets/LinearScale-Be5h2beh.js +0 -1
  229. package/adminWww/assets/North-C2whbHM-.js +0 -1
  230. package/adminWww/assets/Overview-CWLYuqZx.js +0 -3
  231. package/adminWww/assets/PersonOff-DqBq0Fho.js +0 -1
  232. package/adminWww/assets/PlaylistAdd-O8k92YBd.js +0 -1
  233. package/adminWww/assets/State-Ca9_Ke_c.js +0 -1
  234. package/adminWww/assets/UsedResources-20bsoxmj.js +0 -2
  235. package/adminWww/assets/Users-yZyZX-18.js +0 -1
  236. package/adminWww/assets/date-fns-C1dqkno9.js +0 -1
  237. package/adminWww/assets/icons-material-C3PNaipj.js +0 -1
  238. package/adminWww/assets/isSameWeek-Crh37s7U.js +0 -1
  239. package/adminWww/assets/isWithinInterval-Bo1WiDfq.js +0 -1
  240. package/adminWww/assets/locale-hLcz_Xh2.js +0 -1
  241. package/adminWww/assets/sentry-DwQQLI7N.js +0 -1
  242. 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:305c05010a6328ee034469a14398167a917e0732b3809828afc09e2090844af0
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 ? Number(rt.ts) : NaN;
1123
- const ageMs = Number.isFinite(ts) && ts > 0 ? Math.max(0, Number(now) - ts) : null;
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
- if (fresh && pvGate) {
1133
- const gateEffectiveW = Math.max(0, Number(pvGate.effectiveW) || 0);
1134
- const allocationTotalW = allocation && Number.isFinite(Number(allocation.totalW))
1135
- ? Math.max(0, Number(allocation.totalW))
1136
- : gateEffectiveW;
1137
- const allocationCapW = allocation && Number.isFinite(Number(allocation.evcsCapW))
1138
- ? Math.max(0, Number(allocation.evcsCapW))
1139
- : allocationTotalW;
1140
- const allocationLimitedW = Math.max(0, Math.min(allocationTotalW, allocationCapW));
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
- // In der aktuellen Adaptergeneration ist Core-Limits immer vor dem
1196
- // Lademanagement aktiv. Existiert die zentrale Runtime, ist sie daher auch
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: false,
1224
- source: 'local-fallback-no-central-budget',
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: localRaw,
1227
- totalW: localEffective,
1228
- evcsCapW: localEffective,
1229
- allocation: null,
1206
+ rawW: 0,
1207
+ totalW: 0,
1208
+ evcsCapW: 0,
1209
+ allocation,
1230
1210
  localRawW: localRaw,
1231
1211
  localEffectiveW: localEffective,
1232
- mismatchW: 0,
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
- const currentPrice = stTariffPrice ? Number(stTariffPrice.val) : NaN;
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
- // Price curves from provider mapping (via dp registry)
8435
- let rawToday = null;
8436
- let rawTomorrow = null;
8437
- if (this.dp && typeof this.dp.getEntry === 'function') {
8438
- if (this.dp.getEntry('tarif.pricesTodayJson')) rawToday = this.dp.getRaw('tarif.pricesTodayJson');
8439
- if (this.dp.getEntry('tarif.pricesTomorrowJson')) rawTomorrow = this.dp.getRaw('tarif.pricesTomorrowJson');
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 (active && tariffCurrentPriceFresh && tariffCurrentPriceEurKwh !== null && !segs.some((segment) => segment.startMs <= now && segment.endMs > now)) {
8479
- segs.unshift({ startMs: now, endMs: Math.min(horizonEndMs, now + 15 * 60000), priceEurKwh: tariffCurrentPriceEurKwh, state: tariffCurrentState, allowGrid: gridChargeAllowedRaw });
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
- if (!(typeof gridImportNoEvW === 'number' && Number.isFinite(gridImportNoEvW))) {
9223
- gridImportNoEvW = (typeof gridW === 'number' && Number.isFinite(gridW))
9224
- ? Math.max(0, gridW - pvEvcsUsedW - storageChargeNowW + storageDischargeNowW)
9225
- : 0;
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:19be55c831c35d97c7f93fdd7ef0469801bc686e0c7b68dea7fce9e3b47432c9
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
- let usedCentralStorageFlow = false;
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 = (this.adapter && typeof this.adapter._nwResolveBatteryFlowFromCache === 'function')
1927
- ? this.adapter._nwResolveBatteryFlowFromCache({ now, maxAgeMs: staleMs, deadbandW: 25, strictStale: true })
1928
- : null;
1929
- if (flow && typeof flow === 'object') {
1930
- usedCentralStorageFlow = true;
1931
- storageChargeW = Math.max(0, Math.round(Number(flow.chargeW) || 0));
1932
- storageDischargeW = Math.max(0, Math.round(Number(flow.dischargeW) || 0));
1933
- }
1934
- } catch (_eFlow) {}
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 evcsActualW = evcsEnabled ? evcsActualRawW : 0;
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:331cc29ad5328e9145c5b6c73ba2951477ad95abfe360e9ce612d3329e32ae81
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
- if (!row || row.enabled !== true) return;
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]