iobroker.eos-admin 9.0.21 → 9.0.24

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 (692) hide show
  1. package/NEXOWATT_EOS_BUILD_INFO.json +17 -11
  2. package/README.md +32 -8
  3. package/START_HIER_9.0.21.md +53 -0
  4. package/START_HIER_9.0.22.md +48 -0
  5. package/START_HIER_9.0.23.md +47 -0
  6. package/START_HIER_9.0.24.md +70 -0
  7. package/adminWww/.vite/manifest.json +55 -55
  8. package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +13760 -13760
  9. package/adminWww/assets/{AdapterUpdateDialog-Dxl_b7Op.js → AdapterUpdateDialog-D7sI5VRm.js} +1 -1
  10. package/adminWww/assets/{Adapters-CVKKhXmI.js → Adapters-DS6ITaEH.js} +1 -1
  11. package/adminWww/assets/{ConfigManager-Bf6nTAkL.js → ConfigManager-_iFDSXuD.js} +1 -1
  12. package/adminWww/assets/{Enums-CJHVJY7t.js → Enums-Bdv7Tqmf.js} +1 -1
  13. package/adminWww/assets/{Fields-DWHbZKvm.js → Fields-CWUY1AnV.js} +1 -1
  14. package/adminWww/assets/{Files-a6owMTXA.js → Files-BveV1b_F.js} +1 -1
  15. package/adminWww/assets/{Hosts-LtEMeXpV.js → Hosts-B1HWZLGl.js} +1 -1
  16. package/adminWww/assets/{Instances-DhChziA1.js → Instances-DYvbOlj7.js} +1 -1
  17. package/adminWww/assets/{Intro-Cyq9gVDC.js → Intro-pYT2FzIK.js} +1 -1
  18. package/adminWww/assets/{Logs-wcramXsg.js → Logs-D2ZbCY3Z.js} +1 -1
  19. package/adminWww/assets/{Objects-DINVHd_e.js → Objects-CTUxbXJM.js} +1 -1
  20. package/adminWww/assets/{Overview-DK4R41zR.js → Overview-i6PsoN_F.js} +1 -1
  21. package/adminWww/assets/{State-DcEACXzL.js → State-BEQXNcI3.js} +1 -1
  22. package/adminWww/assets/{UsedResources-C1LcM0Rb.js → UsedResources-CLc1afk1.js} +1 -1
  23. package/adminWww/assets/{Users-DvDdSyDY.js → Users-DG6i7iqC.js} +1 -1
  24. package/adminWww/assets/{bootstrap-Dbj_GbnP.js → bootstrap-4KhX67tn.js} +4 -4
  25. package/adminWww/assets/{hostInit-BNFIx0-f.js → hostInit-B08JmaAP.js} +1 -1
  26. package/adminWww/assets/{icons-material-DVbdXNgr.js → icons-material-sOCHi6x9.js} +1 -1
  27. package/adminWww/assets/{index-CoKP1NSA.js → index-DHSNS0v8.js} +2 -2
  28. package/adminWww/assets/{installSVGRenderer-CMvku1F1.js → installSVGRenderer-CWaaO5tF.js} +1 -1
  29. package/adminWww/assets/{mf-entry-bootstrap-0-ac330bce.js → mf-entry-bootstrap-0-e7c54f7f.js} +2 -2
  30. package/adminWww/index.html +23 -23
  31. package/adminWww/mf-manifest.json +1 -1
  32. package/adminWww/mf-stats.json +1 -1
  33. package/adminWww/{remoteEntry-eos-9.0.21.js → remoteEntry-eos-9.0.24.js} +1 -1
  34. package/adminWww/remoteEntry.js +1 -1
  35. package/build/lib/eosHistoryBackupScope.js +73 -0
  36. package/build/lib/eosHistoryBackupScope.js.map +1 -0
  37. package/build/lib/eosKiosk.js +348 -0
  38. package/build/lib/eosKiosk.js.map +1 -0
  39. package/build/lib/eosLegacyMigration.js +14 -3
  40. package/build/lib/eosLegacyMigration.js.map +1 -1
  41. package/build/lib/eosLicenseService.js +1 -1
  42. package/build/lib/eosLicenseService.js.map +1 -1
  43. package/build/lib/eosModuleConfigStore.js +1 -1
  44. package/build/lib/eosModuleConfigStore.js.map +1 -1
  45. package/build/lib/eosModuleHost.js +241 -21
  46. package/build/lib/eosModuleHost.js.map +1 -1
  47. package/build/lib/eosModuleHttp.js +40 -6
  48. package/build/lib/eosModuleHttp.js.map +1 -1
  49. package/build/lib/eosModuleProcess.js +317 -0
  50. package/build/lib/eosModuleProcess.js.map +1 -0
  51. package/build/lib/eosModuleProcessProtocol.js +213 -0
  52. package/build/lib/eosModuleProcessProtocol.js.map +1 -0
  53. package/build/lib/eosModuleProcessWorker.js +279 -0
  54. package/build/lib/eosModuleProcessWorker.js.map +1 -0
  55. package/build/lib/eosPostgresProvisioning.js +189 -0
  56. package/build/lib/eosPostgresProvisioning.js.map +1 -0
  57. package/build/lib/eosRuntimeHealth.js +155 -0
  58. package/build/lib/eosRuntimeHealth.js.map +1 -0
  59. package/build/lib/eosUiProcess.js +689 -0
  60. package/build/lib/eosUiProcess.js.map +1 -0
  61. package/build/lib/eosUiProcessRpc.js +279 -0
  62. package/build/lib/eosUiProcessRpc.js.map +1 -0
  63. package/build/lib/eosUiProcessWorker.js +399 -0
  64. package/build/lib/eosUiProcessWorker.js.map +1 -0
  65. package/build/lib/eosUiSecretCodec.js +64 -0
  66. package/build/lib/eosUiSecretCodec.js.map +1 -0
  67. package/build/lib/eosUnifiedBoundary.js +28 -4
  68. package/build/lib/eosUnifiedBoundary.js.map +1 -1
  69. package/build/lib/eosUpdateSnapshot.js +32 -1
  70. package/build/lib/eosUpdateSnapshot.js.map +1 -1
  71. package/build/lib/web.js +104 -7
  72. package/build/lib/web.js.map +1 -1
  73. package/docs/reports/unified-9.0.21/CRA_NACHWEISSTAND.md +159 -0
  74. package/docs/reports/unified-9.0.21/CUSTOMER_UPDATE_BACKEND_REVIEW.md +30 -0
  75. package/docs/reports/unified-9.0.21/CUSTOMER_UPDATE_UI_REVIEW.md +44 -0
  76. package/docs/reports/unified-9.0.21/CUSTOMER_UPDATE_WORKER_REVIEW.md +147 -0
  77. package/docs/reports/unified-9.0.21/CUSTOMER_WORKER_ZWEITPRUEFUNG.md +108 -0
  78. package/docs/reports/unified-9.0.21/DEVICE_STABILITY_REVIEW.md +50 -0
  79. package/docs/reports/unified-9.0.21/EMS_STABILITAET.md +41 -0
  80. package/docs/reports/unified-9.0.21/HISTORY_TARIFF_STABILITY_REVIEW.md +48 -0
  81. package/docs/reports/unified-9.0.21/MQTT_ZWEITPRUEFUNG_EMS.md +47 -0
  82. package/docs/reports/unified-9.0.21/PERSISTENZ_STABILITAET.md +76 -0
  83. package/docs/reports/unified-9.0.21/PRUEFBERICHT.md +64 -0
  84. package/docs/reports/unified-9.0.21/SECURITY_STABILITY_REVIEW.md +118 -0
  85. package/docs/reports/unified-9.0.21/UI_SECURITY_GATE_REVIEW.md +62 -0
  86. package/docs/reports/unified-9.0.21/UPDATE_HTTP_SNAPSHOT_PRUEFUNG.md +46 -0
  87. package/docs/reports/unified-9.0.21/raw/INDEX.json +1307 -0
  88. package/docs/reports/unified-9.0.21/raw/audit-full.log +345 -0
  89. package/docs/reports/unified-9.0.21/raw/audit-full.result.json +14 -0
  90. package/docs/reports/unified-9.0.21/raw/audit-runtime.log +23 -0
  91. package/docs/reports/unified-9.0.21/raw/audit-runtime.result.json +15 -0
  92. package/docs/reports/unified-9.0.21/raw/backend-final.log +5 -0
  93. package/docs/reports/unified-9.0.21/raw/backend-final.result.json +14 -0
  94. package/docs/reports/unified-9.0.21/raw/cra/frontend-installer-sbom.json +32 -0
  95. package/docs/reports/unified-9.0.21/raw/customer-update-glue/root-glue-focused-node24.tap +34 -0
  96. package/docs/reports/unified-9.0.21/raw/customer-update-service/lint.log +0 -0
  97. package/docs/reports/unified-9.0.21/raw/customer-update-service/real920-archive-inspection.json +20 -0
  98. package/docs/reports/unified-9.0.21/raw/customer-update-service/service-node22.log +110 -0
  99. package/docs/reports/unified-9.0.21/raw/customer-update-service/service-node24.log +24 -0
  100. package/docs/reports/unified-9.0.21/raw/customer-update-service/service-verification.json +54 -0
  101. package/docs/reports/unified-9.0.21/raw/customer-update-service/typecheck.log +0 -0
  102. package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-lint.log +0 -0
  103. package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-node22.tap +86 -0
  104. package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-node24.tap +20 -0
  105. package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-strict-typecheck.log +0 -0
  106. package/docs/reports/unified-9.0.21/raw/customer-update-worker/customer-worker-typecheck.log +0 -0
  107. package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/independent-worker-probes.cjs +109 -0
  108. package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/node22.tap +86 -0
  109. package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/node24.tap +20 -0
  110. package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/probes-node22.tap +44 -0
  111. package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/probes-node24.tap +13 -0
  112. package/docs/reports/unified-9.0.21/raw/customer-update-worker/independent/receipt.json +89 -0
  113. package/docs/reports/unified-9.0.21/raw/customer-update-worker/receipt.json +42 -0
  114. package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-drain-catch-node22.log +1959 -0
  115. package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-drain-test-update-node22.log +1968 -0
  116. package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-drain-test-update-node24.log +337 -0
  117. package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-runtime-review-node22.log +1895 -0
  118. package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-before-runtime-review-node24.log +317 -0
  119. package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-final-node22.log +1959 -0
  120. package/docs/reports/unified-9.0.21/raw/device-mqtt/all-devices-final-node24.log +327 -0
  121. package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-final-message-test-node22.log +36 -0
  122. package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-final-message-test-node24.log +28 -0
  123. package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-message-session-node22.log +36 -0
  124. package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-message-session-node24.log +28 -0
  125. package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-mqtt-command-replay-repro-node22.log +15 -0
  126. package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-mqtt-command-replay-repro-node24.log +13 -0
  127. package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-mqtt-shutdown-repro-node22.log +16 -0
  128. package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-mqtt-shutdown-repro-node24.log +14 -0
  129. package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-resources-node22.log +74 -0
  130. package/docs/reports/unified-9.0.21/raw/device-mqtt/baseline-resources-node24.log +46 -0
  131. package/docs/reports/unified-9.0.21/raw/device-mqtt/commands-before-drain-test-update.json +206 -0
  132. package/docs/reports/unified-9.0.21/raw/device-mqtt/commands-before-runtime-review.json +150 -0
  133. package/docs/reports/unified-9.0.21/raw/device-mqtt/commands-final.json +275 -0
  134. package/docs/reports/unified-9.0.21/raw/device-mqtt/commands.json +134 -0
  135. package/docs/reports/unified-9.0.21/raw/device-mqtt/env-node22.log +3 -0
  136. package/docs/reports/unified-9.0.21/raw/device-mqtt/env-node24.log +1 -0
  137. package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-before-drain-test-update-node22.log +2 -0
  138. package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-before-drain-test-update-node24.log +0 -0
  139. package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-before-runtime-review-node22.log +2 -0
  140. package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-before-runtime-review-node24.log +0 -0
  141. package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-final-node22.log +2 -0
  142. package/docs/reports/unified-9.0.21/raw/device-mqtt/lint-final-node24.log +0 -0
  143. package/docs/reports/unified-9.0.21/raw/device-mqtt/mqtt-command-replay-repro.cjs +38 -0
  144. package/docs/reports/unified-9.0.21/raw/device-mqtt/mqtt-shutdown-repro.cjs +31 -0
  145. package/docs/reports/unified-9.0.21/raw/device-mqtt/regression-node22.log +322 -0
  146. package/docs/reports/unified-9.0.21/raw/device-mqtt/regression-node24.log +55 -0
  147. package/docs/reports/unified-9.0.21/raw/device-mqtt/run-evidence.py +23 -0
  148. package/docs/reports/unified-9.0.21/raw/device-mqtt/run-final-evidence.py +20 -0
  149. package/docs/reports/unified-9.0.21/raw/device-mqtt/runtime-lint-920.json +1 -0
  150. package/docs/reports/unified-9.0.21/raw/device-mqtt/runtime-lint-921.json +1 -0
  151. package/docs/reports/unified-9.0.21/raw/device-mqtt/source-hashes.json +16 -0
  152. package/docs/reports/unified-9.0.21/raw/device-mqtt/types-before-drain-test-update-node22.log +0 -0
  153. package/docs/reports/unified-9.0.21/raw/device-mqtt/types-before-drain-test-update-node24.log +0 -0
  154. package/docs/reports/unified-9.0.21/raw/device-mqtt/types-before-runtime-review-node22.log +0 -0
  155. package/docs/reports/unified-9.0.21/raw/device-mqtt/types-before-runtime-review-node24.log +0 -0
  156. package/docs/reports/unified-9.0.21/raw/device-mqtt/types-final-node22.log +0 -0
  157. package/docs/reports/unified-9.0.21/raw/device-mqtt/types-final-node24.log +0 -0
  158. package/docs/reports/unified-9.0.21/raw/ems/baseline-files-eslint.json +1 -0
  159. package/docs/reports/unified-9.0.21/raw/ems/changed-files-eslint.json +1 -0
  160. package/docs/reports/unified-9.0.21/raw/ems/engine.patch +38 -0
  161. package/docs/reports/unified-9.0.21/raw/ems/eslint-delta.json +6 -0
  162. package/docs/reports/unified-9.0.21/raw/ems/evidence.json +171 -0
  163. package/docs/reports/unified-9.0.21/raw/ems/farm-concurrency-baseline-node24.log +124 -0
  164. package/docs/reports/unified-9.0.21/raw/ems/farm-concurrency-node22.log +56 -0
  165. package/docs/reports/unified-9.0.21/raw/ems/farm-concurrency-node24.log +15 -0
  166. package/docs/reports/unified-9.0.21/raw/ems/farm-owned-methods.patch +133 -0
  167. package/docs/reports/unified-9.0.21/raw/ems/generated-regression-node22.log +460 -0
  168. package/docs/reports/unified-9.0.21/raw/ems/generated-regression-node24.log +82 -0
  169. package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-frozen-node22.log +170 -0
  170. package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-frozen-node24.log +33 -0
  171. package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-review-node22.log +153 -0
  172. package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-review-node24.log +39 -0
  173. package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-reviewed-node22.log +170 -0
  174. package/docs/reports/unified-9.0.21/raw/ems/mqtt-final-reviewed-node24.log +33 -0
  175. package/docs/reports/unified-9.0.21/raw/ems/mqtt-queue-inheritance-before.log +28 -0
  176. package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-review-baseline-node24.log +64 -0
  177. package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-review-initial-timing.log +32 -0
  178. package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-review-node22.log +44 -0
  179. package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-review-node24.log +13 -0
  180. package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-session-review.cjs +23 -0
  181. package/docs/reports/unified-9.0.21/raw/ems/mqtt-runtime-session-review.log +119 -0
  182. package/docs/reports/unified-9.0.21/raw/ems/nvp-baseline-node22.log +170 -0
  183. package/docs/reports/unified-9.0.21/raw/ems/nvp-baseline-node24.log +121 -0
  184. package/docs/reports/unified-9.0.21/raw/ems/nvp-node22.log +68 -0
  185. package/docs/reports/unified-9.0.21/raw/ems/nvp-node24.log +17 -0
  186. package/docs/reports/unified-9.0.21/raw/ems/ui-code-delta-inventory.json +32 -0
  187. package/docs/reports/unified-9.0.21/raw/ems/ui-docs-check.log +6 -0
  188. package/docs/reports/unified-9.0.21/raw/ems/ui-farm-fingerprint-moves.json +74 -0
  189. package/docs/reports/unified-9.0.21/raw/ems/ui-lint-policy-tests.log +6 -0
  190. package/docs/reports/unified-9.0.21/raw/ems/ui-lint-security-final-node22.log +5 -0
  191. package/docs/reports/unified-9.0.21/raw/ems/ui-lint-security-final-node24.log +8 -0
  192. package/docs/reports/unified-9.0.21/raw/ems/ui-lint-security-initial.log +6 -0
  193. package/docs/reports/unified-9.0.21/raw/ems/ui-main-full-delta.patch +135 -0
  194. package/docs/reports/unified-9.0.21/raw/ems/ui-reviewed-changes.json +93 -0
  195. package/docs/reports/unified-9.0.21/raw/ems/ui-reviewed-findings-before.json +3185 -0
  196. package/docs/reports/unified-9.0.21/raw/ems/ui-security-final-node22.json +28833 -0
  197. package/docs/reports/unified-9.0.21/raw/ems/ui-security-final-node24.json +28833 -0
  198. package/docs/reports/unified-9.0.21/raw/ems/ui-security-inventory-before.json +28991 -0
  199. package/docs/reports/unified-9.0.21/raw/ems/update-ui-reviewed-findings.cjs +59 -0
  200. package/docs/reports/unified-9.0.21/raw/frontend-build.log +152 -0
  201. package/docs/reports/unified-9.0.21/raw/frontend-build.result.json +14 -0
  202. package/docs/reports/unified-9.0.21/raw/frontend-installer-sbom.json +32 -0
  203. package/docs/reports/unified-9.0.21/raw/history/baseline920-influx-sequence-node24.log +12 -0
  204. package/docs/reports/unified-9.0.21/raw/history/baseline920-outage-node24.log +64 -0
  205. package/docs/reports/unified-9.0.21/raw/history/cra-tariff-source-node22.log +38 -0
  206. package/docs/reports/unified-9.0.21/raw/history/cra-tariff-source-node24.log +36 -0
  207. package/docs/reports/unified-9.0.21/raw/history/lint-baseline-comparison.json +83 -0
  208. package/docs/reports/unified-9.0.21/raw/history/lint-scope.cjs +29 -0
  209. package/docs/reports/unified-9.0.21/raw/history/regression-node22.log +438 -0
  210. package/docs/reports/unified-9.0.21/raw/history/regression-node24.log +75 -0
  211. package/docs/reports/unified-9.0.21/raw/history/results-node22.json +37 -0
  212. package/docs/reports/unified-9.0.21/raw/history/results-node24.json +66 -0
  213. package/docs/reports/unified-9.0.21/raw/history/run-checks.py +18 -0
  214. package/docs/reports/unified-9.0.21/raw/history/source-evidence.json +83 -0
  215. package/docs/reports/unified-9.0.21/raw/installer-build.log +26 -0
  216. package/docs/reports/unified-9.0.21/raw/installer-build.result.json +14 -0
  217. package/docs/reports/unified-9.0.21/raw/keygen-source.json +6 -0
  218. package/docs/reports/unified-9.0.21/raw/lint-final.log +16 -0
  219. package/docs/reports/unified-9.0.21/raw/lint-final.result.json +14 -0
  220. package/docs/reports/unified-9.0.21/raw/modules-build.log +5 -0
  221. package/docs/reports/unified-9.0.21/raw/modules-build.result.json +14 -0
  222. package/docs/reports/unified-9.0.21/raw/node22-tests-final.log +13274 -0
  223. package/docs/reports/unified-9.0.21/raw/node22-tests-final.result.json +13 -0
  224. package/docs/reports/unified-9.0.21/raw/node22-typecheck-final.log +7 -0
  225. package/docs/reports/unified-9.0.21/raw/node22-typecheck-final.result.json +14 -0
  226. package/docs/reports/unified-9.0.21/raw/node22-version.log +1 -0
  227. package/docs/reports/unified-9.0.21/raw/node24-tests-final.log +2223 -0
  228. package/docs/reports/unified-9.0.21/raw/node24-tests-final.result.json +13 -0
  229. package/docs/reports/unified-9.0.21/raw/node24-typecheck-final.log +5 -0
  230. package/docs/reports/unified-9.0.21/raw/node24-typecheck-final.result.json +14 -0
  231. package/docs/reports/unified-9.0.21/raw/node24-version.log +1 -0
  232. package/docs/reports/unified-9.0.21/raw/persistence/920-http-draft-revision-node24.log +50 -0
  233. package/docs/reports/unified-9.0.21/raw/persistence/920-late-commit-overwrite-node24.log +30 -0
  234. package/docs/reports/unified-9.0.21/raw/persistence/920-save-lifecycle-node24.log +59 -0
  235. package/docs/reports/unified-9.0.21/raw/persistence/921-backend-types.log +0 -0
  236. package/docs/reports/unified-9.0.21/raw/persistence/921-editor-lint.log +0 -0
  237. package/docs/reports/unified-9.0.21/raw/persistence/921-eebus-editor-typecheck.log +0 -0
  238. package/docs/reports/unified-9.0.21/raw/persistence/921-final-format-review.json +24 -0
  239. package/docs/reports/unified-9.0.21/raw/persistence/921-lint.log +0 -0
  240. package/docs/reports/unified-9.0.21/raw/persistence/921-new-update-http-before.log +177 -0
  241. package/docs/reports/unified-9.0.21/raw/persistence/921-new-update-snapshot-before.log +80 -0
  242. package/docs/reports/unified-9.0.21/raw/persistence/921-persistence-final-node22.log +1019 -0
  243. package/docs/reports/unified-9.0.21/raw/persistence/921-persistence-final-node22.receipt.json +28 -0
  244. package/docs/reports/unified-9.0.21/raw/persistence/921-persistence-final-node24.log +174 -0
  245. package/docs/reports/unified-9.0.21/raw/persistence/921-persistence-final-node24.receipt.json +28 -0
  246. package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-eslint-final.log +0 -0
  247. package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-final-node22.log +137 -0
  248. package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-final-node22.receipt.json +21 -0
  249. package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-final-node24.log +30 -0
  250. package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-final-node24.receipt.json +21 -0
  251. package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-strict-typecheck.log +0 -0
  252. package/docs/reports/unified-9.0.21/raw/persistence/921-update-helpers-typecheck-final.log +0 -0
  253. package/docs/reports/unified-9.0.21/raw/persistence/http-slowbody-after.log +3 -0
  254. package/docs/reports/unified-9.0.21/raw/persistence/http-slowbody-before-observation.json +25 -0
  255. package/docs/reports/unified-9.0.21/raw/persistence/http-slowbody-repro.cjs +7 -0
  256. package/docs/reports/unified-9.0.21/raw/persistence/source-files.pre-final-format.sha256 +14 -0
  257. package/docs/reports/unified-9.0.21/raw/persistence/source-files.sha256 +14 -0
  258. package/docs/reports/unified-9.0.21/raw/release-overlay/obsolete-assets-920-added.json +94 -0
  259. package/docs/reports/unified-9.0.21/raw/release-overlay/publish-catalog-regression.log +49 -0
  260. package/docs/reports/unified-9.0.21/raw/release-overlay/publish-catalog-regression.result.json +15 -0
  261. package/docs/reports/unified-9.0.21/raw/sbom-runtime.log +7 -0
  262. package/docs/reports/unified-9.0.21/raw/sbom-runtime.result.json +14 -0
  263. package/docs/reports/unified-9.0.21/raw/sbom-vendor-check.log +1 -0
  264. package/docs/reports/unified-9.0.21/raw/sbom-vendor-check.result.json +14 -0
  265. package/docs/reports/unified-9.0.21/raw/security-stability/backend-typecheck.log +0 -0
  266. package/docs/reports/unified-9.0.21/raw/security-stability/boundaries-node22.tap +495 -0
  267. package/docs/reports/unified-9.0.21/raw/security-stability/boundaries-node24.tap +88 -0
  268. package/docs/reports/unified-9.0.21/raw/security-stability/coexistence-node22.tap +179 -0
  269. package/docs/reports/unified-9.0.21/raw/security-stability/coexistence-node24.tap +36 -0
  270. package/docs/reports/unified-9.0.21/raw/security-stability/results.json +118 -0
  271. package/docs/reports/unified-9.0.21/raw/security-stability/upload-admission-before-node22.tap +63 -0
  272. package/docs/reports/unified-9.0.21/raw/security-stability/upload-admission-before-node24.tap +47 -0
  273. package/docs/reports/unified-9.0.21/raw/security-stability/upload-lint.log +0 -0
  274. package/docs/reports/unified-9.0.21/raw/security-stability/upload-node22.tap +148 -0
  275. package/docs/reports/unified-9.0.21/raw/security-stability/upload-node24.tap +30 -0
  276. package/docs/reports/unified-9.0.21/raw/ui-docs-check.log +6 -0
  277. package/docs/reports/unified-9.0.21/raw/ui-docs-check.result.json +14 -0
  278. package/docs/reports/unified-9.0.21/raw/ui-runtime-final.log +7 -0
  279. package/docs/reports/unified-9.0.21/raw/ui-runtime-final.result.json +14 -0
  280. package/docs/reports/unified-9.0.21/raw/ui-runtime-sync.log +1 -0
  281. package/docs/reports/unified-9.0.21/raw/ui-runtime-sync.result.json +14 -0
  282. package/docs/reports/unified-9.0.21/raw/ui-sbom-check.log +6 -0
  283. package/docs/reports/unified-9.0.21/raw/ui-sbom-check.result.json +14 -0
  284. package/docs/reports/unified-9.0.21/raw/ui-sbom-final.log +6 -0
  285. package/docs/reports/unified-9.0.21/raw/ui-sbom-final.result.json +14 -0
  286. package/docs/reports/unified-9.0.21/raw/ui-secret-final.log +6 -0
  287. package/docs/reports/unified-9.0.21/raw/ui-secret-final.result.json +14 -0
  288. package/docs/reports/unified-9.0.21/raw/ui-security-final.log +8 -0
  289. package/docs/reports/unified-9.0.21/raw/ui-security-final.result.json +14 -0
  290. package/docs/reports/unified-9.0.21/raw/update-ui/baseline-ui.log +280 -0
  291. package/docs/reports/unified-9.0.21/raw/update-ui/browser-preview.test.cjs +170 -0
  292. package/docs/reports/unified-9.0.21/raw/update-ui/draft-regression.log +214 -0
  293. package/docs/reports/unified-9.0.21/raw/update-ui/eos-updates-before.ts +171 -0
  294. package/docs/reports/unified-9.0.21/raw/update-ui/lint.log +0 -0
  295. package/docs/reports/unified-9.0.21/raw/update-ui/results.json +90 -0
  296. package/docs/reports/unified-9.0.21/raw/update-ui/source-evidence.json +30 -0
  297. package/docs/reports/unified-9.0.21/raw/update-ui/type-node22.log +0 -0
  298. package/docs/reports/unified-9.0.21/raw/update-ui/type-node24.log +0 -0
  299. package/docs/reports/unified-9.0.21/raw/update-ui/ui-node22.log +98 -0
  300. package/docs/reports/unified-9.0.21/raw/update-ui/ui-node24.log +22 -0
  301. package/docs/reports/unified-9.0.22/BACKUP_POSTGRES_FOLLOWUP.md +44 -0
  302. package/docs/reports/unified-9.0.22/ENERGIEFLUSS_BROWSERPRUEFUNG.md +40 -0
  303. package/docs/reports/unified-9.0.22/ENERGY_FLOW_BACKEND.md +44 -0
  304. package/docs/reports/unified-9.0.22/FLOW_TARIFF_INDEPENDENT_REVIEW.md +33 -0
  305. package/docs/reports/unified-9.0.22/OCPP_STOP_WRITER_REVIEW.md +27 -0
  306. package/docs/reports/unified-9.0.22/POSTGRESQL_SYSTEM_SETUP.md +34 -0
  307. package/docs/reports/unified-9.0.22/PRUEFBERICHT.md +85 -0
  308. package/docs/reports/unified-9.0.22/flow/PRUEFVERMERK.md +42 -0
  309. package/docs/reports/unified-9.0.22/flow/frontend-cadence-tests.log +37 -0
  310. package/docs/reports/unified-9.0.22/flow/frontend-source-hashes.json +13 -0
  311. package/docs/reports/unified-9.0.22/flow/frontend-tests.log +31 -0
  312. package/docs/reports/unified-9.0.22/postgres-history-review.md +43 -0
  313. package/docs/reports/unified-9.0.22/postgres-real-review.tap +21 -0
  314. package/docs/reports/unified-9.0.22/postgres-review-lint.log +0 -0
  315. package/docs/reports/unified-9.0.22/postgres-review-typecheck.log +0 -0
  316. package/docs/reports/unified-9.0.22/postgres-review-unit-api.tap +25 -0
  317. package/docs/reports/unified-9.0.22/raw/INDEX.json +43 -0
  318. package/docs/reports/unified-9.0.22/raw/backup-followup/eslint-backup.log +0 -0
  319. package/docs/reports/unified-9.0.22/raw/backup-followup/evcs-stop-writer-after.tap +13 -0
  320. package/docs/reports/unified-9.0.22/raw/backup-followup/evcs-stop-writer-before.tap +54 -0
  321. package/docs/reports/unified-9.0.22/raw/backup-followup/evcs-stop-writer-test-eslint.log +0 -0
  322. package/docs/reports/unified-9.0.22/raw/backup-followup/influx-real-node24.tap +11 -0
  323. package/docs/reports/unified-9.0.22/raw/backup-followup/scope-hashes.json +51 -0
  324. package/docs/reports/unified-9.0.22/raw/backup-followup/storage-nullable-before.tap +96 -0
  325. package/docs/reports/unified-9.0.22/raw/backup-followup/storage-nullable-flow.tap +12 -0
  326. package/docs/reports/unified-9.0.22/raw/backup-followup/tests-node24.tap +116 -0
  327. package/docs/reports/unified-9.0.22/raw/backup-followup/typecheck-backup-scope.log +0 -0
  328. package/docs/reports/unified-9.0.22/raw/backup-followup/typecheck-backup.log +0 -0
  329. package/docs/reports/unified-9.0.22/raw/backup-followup/typecheck-postgres-setup.log +0 -0
  330. package/docs/reports/unified-9.0.22/raw/current/admin-build.log +152 -0
  331. package/docs/reports/unified-9.0.22/raw/current/availability-final.log +1 -0
  332. package/docs/reports/unified-9.0.22/raw/current/backend-build.log +5 -0
  333. package/docs/reports/unified-9.0.22/raw/current/baseline-repairs.log +60 -0
  334. package/docs/reports/unified-9.0.22/raw/current/baseline-unified.log +1675 -0
  335. package/docs/reports/unified-9.0.22/raw/current/combined-fixes.log +65 -0
  336. package/docs/reports/unified-9.0.22/raw/current/control-final.log +25 -0
  337. package/docs/reports/unified-9.0.22/raw/current/energyflow-browser.json +244 -0
  338. package/docs/reports/unified-9.0.22/raw/current/energyflow-browser.stderr +0 -0
  339. package/docs/reports/unified-9.0.22/raw/current/energyflow-cadence-browser.json +63 -0
  340. package/docs/reports/unified-9.0.22/raw/current/energyflow-cadence-browser.stderr +0 -0
  341. package/docs/reports/unified-9.0.22/raw/current/lint-final.log +5 -0
  342. package/docs/reports/unified-9.0.22/raw/current/lint.log +5 -0
  343. package/docs/reports/unified-9.0.22/raw/current/markdown-build.log +1 -0
  344. package/docs/reports/unified-9.0.22/raw/current/modules-build.log +5 -0
  345. package/docs/reports/unified-9.0.22/raw/current/pre-ocpp-full.log +2337 -0
  346. package/docs/reports/unified-9.0.22/raw/current/production-audit.json +22 -0
  347. package/docs/reports/unified-9.0.22/raw/current/production-audit.stderr +1 -0
  348. package/docs/reports/unified-9.0.22/raw/current/runtime-build-final.log +8 -0
  349. package/docs/reports/unified-9.0.22/raw/current/runtime-build.log +32 -0
  350. package/docs/reports/unified-9.0.22/raw/current/runtime-sync.log +1 -0
  351. package/docs/reports/unified-9.0.22/raw/current/safety-envelope-final.log +1 -0
  352. package/docs/reports/unified-9.0.22/raw/current/sbom-lock-graph.log +1 -0
  353. package/docs/reports/unified-9.0.22/raw/current/sbom.log +6120 -0
  354. package/docs/reports/unified-9.0.22/raw/current/station-permission-final.log +1 -0
  355. package/docs/reports/unified-9.0.22/raw/current/storage-feedforward-final.log +1 -0
  356. package/docs/reports/unified-9.0.22/raw/current/typecheck-final.log +5 -0
  357. package/docs/reports/unified-9.0.22/raw/current/typecheck.log +5 -0
  358. package/docs/reports/unified-9.0.22/raw/ems-control-points/eslint.txt +0 -0
  359. package/docs/reports/unified-9.0.22/raw/ems-control-points/node22-availability.txt +1 -0
  360. package/docs/reports/unified-9.0.22/raw/ems-control-points/node22-safety.txt +1 -0
  361. package/docs/reports/unified-9.0.22/raw/ems-control-points/node22-station.txt +1 -0
  362. package/docs/reports/unified-9.0.22/raw/ems-control-points/node22-tests.tap +124 -0
  363. package/docs/reports/unified-9.0.22/raw/ems-control-points/node24-availability.txt +1 -0
  364. package/docs/reports/unified-9.0.22/raw/ems-control-points/node24-safety.txt +1 -0
  365. package/docs/reports/unified-9.0.22/raw/ems-control-points/node24-station.txt +1 -0
  366. package/docs/reports/unified-9.0.22/raw/ems-control-points/node24-tests.tap +26 -0
  367. package/docs/reports/unified-9.0.22/raw/ems-control-points/typecheck.txt +0 -0
  368. package/docs/reports/unified-9.0.22/raw/flow-backend/core-pv-node22.tap +30 -0
  369. package/docs/reports/unified-9.0.22/raw/flow-backend/core-pv-node24.tap +11 -0
  370. package/docs/reports/unified-9.0.22/raw/flow-backend/environment.json +7 -0
  371. package/docs/reports/unified-9.0.22/raw/flow-backend/lint.log +0 -0
  372. package/docs/reports/unified-9.0.22/raw/flow-backend/node22.tap +164 -0
  373. package/docs/reports/unified-9.0.22/raw/flow-backend/node24.tap +33 -0
  374. package/docs/reports/unified-9.0.22/raw/flow-backend/typecheck.log +0 -0
  375. package/docs/reports/unified-9.0.22/raw/history-ui/browser-runtime.json +11 -0
  376. package/docs/reports/unified-9.0.22/raw/history-ui/browser-smoke.json +49 -0
  377. package/docs/reports/unified-9.0.22/raw/history-ui/browser-smoke.stderr +0 -0
  378. package/docs/reports/unified-9.0.22/raw/history-ui/build.log +18 -0
  379. package/docs/reports/unified-9.0.22/raw/history-ui/environment.json +38 -0
  380. package/docs/reports/unified-9.0.22/raw/history-ui/lint.log +0 -0
  381. package/docs/reports/unified-9.0.22/raw/history-ui/node22.tap +144 -0
  382. package/docs/reports/unified-9.0.22/raw/history-ui/node24.tap +30 -0
  383. package/docs/reports/unified-9.0.22/raw/node22-tests-final.log +14086 -0
  384. package/docs/reports/unified-9.0.22/raw/node22-version.log +1 -0
  385. package/docs/reports/unified-9.0.22/raw/node24-tests-final.log +2356 -0
  386. package/docs/reports/unified-9.0.22/raw/node24-version.log +1 -0
  387. package/docs/reports/unified-9.0.22/raw/postgresql-system/setup-eslint.log +0 -0
  388. package/docs/reports/unified-9.0.22/raw/postgresql-system/setup-node22.tap +72 -0
  389. package/docs/reports/unified-9.0.22/raw/postgresql-system/setup-node24.tap +70 -0
  390. package/docs/reports/unified-9.0.22/raw/postgresql-system/status-eslint.log +0 -0
  391. package/docs/reports/unified-9.0.22/raw/postgresql-system/typecheck.log +0 -0
  392. package/docs/reports/unified-9.0.23/MODULE_PROCESS_IMPLEMENTATION.md +43 -0
  393. package/docs/reports/unified-9.0.23/OCPP_0.4.3_ERGEBNIS.json +24 -0
  394. package/docs/reports/unified-9.0.23/OCPP_0.4.3_PRUEFBERICHT.md +50 -0
  395. package/docs/reports/unified-9.0.23/OCPP_AUTOMATISCHE_ZUORDNUNG.md +49 -0
  396. package/docs/reports/unified-9.0.23/OCPP_CM_INTEGRATION.md +31 -0
  397. package/docs/reports/unified-9.0.23/PROZESSDIAGNOSE.md +35 -0
  398. package/docs/reports/unified-9.0.23/PRUEFBERICHT.md +75 -0
  399. package/docs/reports/unified-9.0.23/UI_EMS_PROZESSGRENZE.md +36 -0
  400. package/docs/reports/unified-9.0.23/UI_PROCESS_INDEPENDENT_FOLLOWUP.md +33 -0
  401. package/docs/reports/unified-9.0.23/module-process-contract-review-node22.tap +86 -0
  402. package/docs/reports/unified-9.0.23/module-process-contract-review-node24.tap +20 -0
  403. package/docs/reports/unified-9.0.23/module-process-contract-review.md +39 -0
  404. package/docs/reports/unified-9.0.23/module-process-contract-review.tap +20 -0
  405. package/docs/reports/unified-9.0.23/module-process-final.tap +27 -0
  406. package/docs/reports/unified-9.0.23/module-process-static.json +57 -0
  407. package/docs/reports/unified-9.0.23/raw/INDEX.json +43 -0
  408. package/docs/reports/unified-9.0.23/raw/build-backend-final.log +5 -0
  409. package/docs/reports/unified-9.0.23/raw/build-frontend.log +152 -0
  410. package/docs/reports/unified-9.0.23/raw/build-installer.log +26 -0
  411. package/docs/reports/unified-9.0.23/raw/build-ui-final.log +7 -0
  412. package/docs/reports/unified-9.0.23/raw/current/evcs-stop-writer-ocpp043.txt +20 -0
  413. package/docs/reports/unified-9.0.23/raw/current/ocpp-runtime-feedback-lint.txt +1 -0
  414. package/docs/reports/unified-9.0.23/raw/current/ocpp-runtime-feedback-tests.txt +28 -0
  415. package/docs/reports/unified-9.0.23/raw/current/runtime-health-browser.json +49 -0
  416. package/docs/reports/unified-9.0.23/raw/current/runtime-health-browser.stderr.txt +0 -0
  417. package/docs/reports/unified-9.0.23/raw/current/runtime-health-lint.txt +1 -0
  418. package/docs/reports/unified-9.0.23/raw/current/runtime-health-tests.txt +27 -0
  419. package/docs/reports/unified-9.0.23/raw/current/runtime-health-types.txt +1 -0
  420. package/docs/reports/unified-9.0.23/raw/eos-production-audit.json +22 -0
  421. package/docs/reports/unified-9.0.23/raw/idle-pwa-node22.log +75 -0
  422. package/docs/reports/unified-9.0.23/raw/idle-pwa-node24.log +22 -0
  423. package/docs/reports/unified-9.0.23/raw/lint-final.log +5 -0
  424. package/docs/reports/unified-9.0.23/raw/node22-tests-final.log +14612 -0
  425. package/docs/reports/unified-9.0.23/raw/node22-version.log +1 -0
  426. package/docs/reports/unified-9.0.23/raw/node24-tests-final.log +2443 -0
  427. package/docs/reports/unified-9.0.23/raw/node24-version.log +1 -0
  428. package/docs/reports/unified-9.0.23/raw/ocpp-auto-discovery.log +21 -0
  429. package/docs/reports/unified-9.0.23/raw/ocpp-discovery-browser.json +55 -0
  430. package/docs/reports/unified-9.0.23/raw/ocpp-discovery-lifecycle-regression.log +48 -0
  431. package/docs/reports/unified-9.0.23/raw/ocpp-production-audit.json +69 -0
  432. package/docs/reports/unified-9.0.23/raw/typecheck-final.log +5 -0
  433. package/docs/reports/unified-9.0.23/raw/ui-process/discovery-review.tap +21 -0
  434. package/docs/reports/unified-9.0.23/raw/ui-process/lint.log +0 -0
  435. package/docs/reports/unified-9.0.23/raw/ui-process/node22.tap +118 -0
  436. package/docs/reports/unified-9.0.23/raw/ui-process/node24.tap +112 -0
  437. package/docs/reports/unified-9.0.23/raw/ui-process/root-typecheck.log +0 -0
  438. package/docs/reports/unified-9.0.23/raw/ui-process/typecheck.log +0 -0
  439. package/docs/reports/unified-9.0.23/raw/ui-process/unified-listen-build-node24.tap +196 -0
  440. package/docs/reports/unified-9.0.23/raw/ui-process/unified-listen-node22.tap +200 -0
  441. package/docs/reports/unified-9.0.23/raw/ui-process/web-lint.log +0 -0
  442. package/docs/reports/unified-9.0.23/raw/ui-process/web-pipeline-node22.tap +92 -0
  443. package/docs/reports/unified-9.0.23/raw/ui-process/web-pipeline-node24.tap +90 -0
  444. package/docs/reports/unified-9.0.23/ui-process-contract-review.md +30 -0
  445. package/docs/reports/unified-9.0.23/ui-process-final-review-node22.tap +50 -0
  446. package/docs/reports/unified-9.0.23/ui-process-final-review-node24.tap +14 -0
  447. package/docs/reports/unified-9.0.23/ui-process-followup-hashes.json +13 -0
  448. package/docs/reports/unified-9.0.23/ui-process-operational-review-node22.tap +30 -0
  449. package/docs/reports/unified-9.0.23/ui-process-operational-review-node24.tap +11 -0
  450. package/docs/reports/unified-9.0.23/ui-process-review-node22.tap +48 -0
  451. package/docs/reports/unified-9.0.23/ui-process-review-node24.tap +46 -0
  452. package/docs/reports/unified-9.0.24/BACKUP_INTEROP_PRUEFBERICHT.md +48 -0
  453. package/docs/reports/unified-9.0.24/KIOSK_FRONTEND_BROWSERPRUEFUNG.md +49 -0
  454. package/docs/reports/unified-9.0.24/KIOSK_UNABHAENGIGER_REVIEW.md +21 -0
  455. package/docs/reports/unified-9.0.24/OCPP_HOST_MIGRATION.md +41 -0
  456. package/docs/reports/unified-9.0.24/OCPP_NAMESPACE_REGELPFAD.md +55 -0
  457. package/docs/reports/unified-9.0.24/OCPP_UNABHAENGIGER_REVIEW.md +37 -0
  458. package/docs/reports/unified-9.0.24/OCPP_VERWALTUNG.md +33 -0
  459. package/docs/reports/unified-9.0.24/PRUEFBERICHT.md +54 -0
  460. package/docs/reports/unified-9.0.24/PUBLISH_OVERLAY_9_0_21.md +23 -0
  461. package/docs/reports/unified-9.0.24/raw/INDEX.json +43 -0
  462. package/docs/reports/unified-9.0.24/raw/backup-interop/ems-independence-node24.tap +9 -0
  463. package/docs/reports/unified-9.0.24/raw/backup-interop/final-node22.tap +175 -0
  464. package/docs/reports/unified-9.0.24/raw/backup-interop/final-node24.tap +35 -0
  465. package/docs/reports/unified-9.0.24/raw/backup-interop/focused-node22.tap +132 -0
  466. package/docs/reports/unified-9.0.24/raw/backup-interop/focused-node24.tap +27 -0
  467. package/docs/reports/unified-9.0.24/raw/backup-interop/kiosk-review-node24.tap +13 -0
  468. package/docs/reports/unified-9.0.24/raw/backup-interop/kiosk-update-snapshot-node24.tap +22 -0
  469. package/docs/reports/unified-9.0.24/raw/backup-interop/lint-source.txt +0 -0
  470. package/docs/reports/unified-9.0.24/raw/backup-interop/lint-tests.txt +0 -0
  471. package/docs/reports/unified-9.0.24/raw/backup-interop/ocpp-backup-node24.tap +10 -0
  472. package/docs/reports/unified-9.0.24/raw/backup-interop/own-source-hashes.json +12 -0
  473. package/docs/reports/unified-9.0.24/raw/backup-interop/types.txt +0 -0
  474. package/docs/reports/unified-9.0.24/raw/backup-interop/update-snapshot-node24.tap +20 -0
  475. package/docs/reports/unified-9.0.24/raw/build.log +200 -0
  476. package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-browser-node22.json +69 -0
  477. package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-browser-node22.stderr.txt +3 -0
  478. package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-browser.json +69 -0
  479. package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-browser.stderr.txt +2 -0
  480. package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-http-node22.txt +253 -0
  481. package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-http-node24.txt +52 -0
  482. package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-lint.txt +0 -0
  483. package/docs/reports/unified-9.0.24/raw/current/ocpp-admin-types.txt +0 -0
  484. package/docs/reports/unified-9.0.24/raw/current/ocpp-lease-registration-before.txt +28 -0
  485. package/docs/reports/unified-9.0.24/raw/current/ocpp-namespace-independent-node22.txt +302 -0
  486. package/docs/reports/unified-9.0.24/raw/current/ocpp-namespace-independent-node24.txt +55 -0
  487. package/docs/reports/unified-9.0.24/raw/current/ocpp-native-generic-before.txt +25 -0
  488. package/docs/reports/unified-9.0.24/raw/current/runtime-health-browser.json +49 -0
  489. package/docs/reports/unified-9.0.24/raw/current/runtime-health-browser.stderr.txt +0 -0
  490. package/docs/reports/unified-9.0.24/raw/current/runtime-health-types.txt +0 -0
  491. package/docs/reports/unified-9.0.24/raw/eos-production-audit.json +77 -0
  492. package/docs/reports/unified-9.0.24/raw/kiosk-auth-profiles-node22.log +16 -0
  493. package/docs/reports/unified-9.0.24/raw/kiosk-auth-profiles-node24.log +14 -0
  494. package/docs/reports/unified-9.0.24/raw/kiosk-browser-node22.json +57 -0
  495. package/docs/reports/unified-9.0.24/raw/kiosk-browser-node24.json +57 -0
  496. package/docs/reports/unified-9.0.24/raw/kiosk-idle-node22.log +215 -0
  497. package/docs/reports/unified-9.0.24/raw/kiosk-idle-node24.log +42 -0
  498. package/docs/reports/unified-9.0.24/raw/lint.log +45 -0
  499. package/docs/reports/unified-9.0.24/raw/node22-tests-final.log +15517 -0
  500. package/docs/reports/unified-9.0.24/raw/node22-version.log +1 -0
  501. package/docs/reports/unified-9.0.24/raw/node24-tests-final.log +2595 -0
  502. package/docs/reports/unified-9.0.24/raw/node24-version.log +1 -0
  503. package/docs/reports/unified-9.0.24/raw/ocpp-host-node22.tap +105 -0
  504. package/docs/reports/unified-9.0.24/raw/ocpp-host-node24.tap +24 -0
  505. package/docs/reports/unified-9.0.24/raw/ocpp-host-regression-node22.tap +818 -0
  506. package/docs/reports/unified-9.0.24/raw/ocpp-host-regression-node24.tap +140 -0
  507. package/docs/reports/unified-9.0.24/raw/ocpp-hosted-mapping-browser.log +2 -0
  508. package/docs/reports/unified-9.0.24/raw/ocpp-legacy-mapping-browser.log +2 -0
  509. package/docs/reports/unified-9.0.24/raw/ocpp-namespace-control.log +49 -0
  510. package/docs/reports/unified-9.0.24/raw/publish-overlay-node22.tap +278 -0
  511. package/docs/reports/unified-9.0.24/raw/publish-overlay-node24.tap +52 -0
  512. package/docs/reports/unified-9.0.24/raw/publish-overlay-provenance-922-923.json +32 -0
  513. package/docs/reports/unified-9.0.24/raw/publish-overlay-provenance.json +19 -0
  514. package/docs/reports/unified-9.0.24/raw/typecheck.log +5 -0
  515. package/docs/unified/EMS_BEDIEN_DATENPUNKTE_9_0_22.md +51 -0
  516. package/docs/unified/HISTORY_UI_9_0_22.md +75 -0
  517. package/docs/unified/POSTGRESQL_9_0_22.md +89 -0
  518. package/io-package.json +16 -17
  519. package/modules/backup/README.md +10 -0
  520. package/modules/backup/RECOVERY-9.0.22.md +59 -0
  521. package/modules/backup/admin/index.html +2 -1
  522. package/modules/backup/admin/index.js +17 -1
  523. package/modules/backup/build/config.js +2 -0
  524. package/modules/backup/build/coverage.js +64 -0
  525. package/modules/backup/build/creators.js +22 -17
  526. package/modules/backup/build/databaseTargets.js +42 -0
  527. package/modules/backup/build/index.js +47 -4
  528. package/modules/backup/build/influxIntegrity.js +159 -0
  529. package/modules/backup/build/postgresHistory.js +91 -0
  530. package/modules/backup/build/preflight.js +3 -8
  531. package/modules/backup/build/publicTrust.js +46 -0
  532. package/modules/backup/build/restore-cli.js +72 -1
  533. package/modules/backup/build/storageRetention.js +26 -0
  534. package/modules/backup/build/worker.js +18 -1
  535. package/modules/backup/src/config.ts +2 -0
  536. package/modules/backup/src/coverage.ts +50 -0
  537. package/modules/backup/src/creators.ts +20 -17
  538. package/modules/backup/src/databaseTargets.ts +45 -0
  539. package/modules/backup/src/index.ts +37 -4
  540. package/modules/backup/src/influxIntegrity.ts +125 -0
  541. package/modules/backup/src/postgresHistory.ts +66 -0
  542. package/modules/backup/src/preflight.ts +3 -10
  543. package/modules/backup/src/publicTrust.ts +34 -0
  544. package/modules/backup/src/restore-cli.ts +55 -4
  545. package/modules/backup/src/storageRetention.ts +20 -0
  546. package/modules/backup/src/types.ts +5 -0
  547. package/modules/backup/src/worker.ts +18 -2
  548. package/modules/backup/test/completeness.test.cjs +193 -0
  549. package/modules/backup/test/hosted.test.cjs +43 -3
  550. package/modules/backup/test/influx-real.test.cjs +75 -0
  551. package/modules/backup/test/lifecycle.test.cjs +7 -5
  552. package/modules/backup/test/ocpp-coverage.test.cjs +152 -0
  553. package/modules/devices/admin/index.html +1 -1
  554. package/modules/eebus/admin/index.html +1 -1
  555. package/modules/ocpp/LICENSE +21 -0
  556. package/modules/ocpp/README.md +61 -0
  557. package/modules/ocpp/admin/config-fields.json +353 -0
  558. package/modules/ocpp/admin/index.html +52 -0
  559. package/modules/ocpp/admin/index.js +228 -0
  560. package/modules/ocpp/admin/style.css +27 -0
  561. package/modules/ocpp/build/index.js +401 -0
  562. package/modules/ocpp/build/operationGuard.js +26 -0
  563. package/modules/ocpp/build/server.js +155 -0
  564. package/modules/ocpp/eslint.config.mjs +13 -0
  565. package/modules/ocpp/index.js +3 -0
  566. package/modules/ocpp/native-defaults.json +44 -0
  567. package/modules/ocpp/ocpp/common.js +646 -0
  568. package/modules/ocpp/ocpp/compact.js +332 -0
  569. package/modules/ocpp/ocpp/configuration.js +364 -0
  570. package/modules/ocpp/ocpp/eos-contract.js +149 -0
  571. package/modules/ocpp/ocpp/freshness.d.ts +10 -0
  572. package/modules/ocpp/ocpp/freshness.js +272 -0
  573. package/modules/ocpp/ocpp/schemas/NOTICE.md +17 -0
  574. package/modules/ocpp/ocpp/schemas/ocpp2_0_1_official.json +1 -0
  575. package/modules/ocpp/ocpp/schemas/ocpp2_1_official.json +1 -0
  576. package/modules/ocpp/ocpp/server.js +3 -0
  577. package/modules/ocpp/ocpp/v16.js +213 -0
  578. package/modules/ocpp/ocpp/v201.js +4 -0
  579. package/modules/ocpp/ocpp/v21.js +4 -0
  580. package/modules/ocpp/ocpp/v2base.js +255 -0
  581. package/modules/ocpp/package.json +11 -0
  582. package/modules/ocpp/provenance.json +33 -0
  583. package/modules/ocpp/runtime.d.ts +16 -0
  584. package/modules/ocpp/runtime.js +3391 -0
  585. package/modules/ocpp/src/index.ts +463 -0
  586. package/modules/ocpp/src/operationGuard.ts +29 -0
  587. package/modules/ocpp/src/server.ts +193 -0
  588. package/modules/ocpp/test/configuration-runtime.test.js +786 -0
  589. package/modules/ocpp/test/core.test.js +772 -0
  590. package/modules/ocpp/test/eos-contract.test.js +67 -0
  591. package/modules/ocpp/test/hosted.test.cjs +165 -0
  592. package/modules/ocpp/tsconfig.json +7 -0
  593. package/modules/ocpp/validation/manifest.json +36 -0
  594. package/modules/ocpp/validation/node22-tests.log +525 -0
  595. package/modules/ocpp/validation/node24-tests.log +92 -0
  596. package/package.json +27 -11
  597. package/public/eos-migration/index.html +1 -1
  598. package/public/eos-migration/index.js +2 -2
  599. package/public/eos-runtime/index.html +35 -0
  600. package/public/eos-runtime/index.js +111 -0
  601. package/public/eos-runtime/style.css +18 -0
  602. package/release-manifests/unified/build-environment.cdx.json +767 -131
  603. package/release-manifests/unified/files.json +612 -207
  604. package/release-manifests/unified/obsolete-admin-assets.json +210 -6
  605. package/release-manifests/unified/runtime.cdx.json +871 -143
  606. package/release-manifests/unified/validation.json +15 -15
  607. package/reports/unified/ocpp-pure-pv-9.0.22/PRUEFVERMERK.md +35 -0
  608. package/reports/unified/ocpp-pure-pv-9.0.22/raw/auto-pv-phases.log +1 -0
  609. package/reports/unified/ocpp-pure-pv-9.0.22/raw/control-tests.log +11 -0
  610. package/reports/unified/ocpp-pure-pv-9.0.22/raw/ocpp-stability.log +1 -0
  611. package/reports/unified/ocpp-pure-pv-9.0.22/raw/rc60.log +1 -0
  612. package/reports/unified/tariff-energy-flow-9.0.22/PRUEFVERMERK.md +44 -0
  613. package/reports/unified/tariff-energy-flow-9.0.22/raw/focused-tests.log +37 -0
  614. package/reports/unified/tariff-energy-flow-9.0.22/raw/grid-charge-policy.log +1 -0
  615. package/reports/unified/tariff-energy-flow-9.0.22/raw/status-truth.log +1 -0
  616. package/tools/eos-release-check.cjs +5 -0
  617. package/tools/eos-release-manifest.cjs +3 -3
  618. package/tools/eos-sbom-vendored.cjs +2 -1
  619. package/tools/system/eos-postgresql-setup.cjs +409 -0
  620. package/tsconfig.eos-history-backup-scope.json +9 -0
  621. package/tsconfig.eos-postgres-system.json +15 -0
  622. package/ui/admin/react/assets/index-wHWXfD_g.js +13 -0
  623. package/ui/admin/react/index.html +1 -1
  624. package/ui/ems/consumers/evcs.js +11 -7
  625. package/ui/ems/datapoints.js +14 -5
  626. package/ui/ems/engine.js +4 -1
  627. package/ui/ems/modules/charging-management.js +193 -63
  628. package/ui/ems/modules/core-limits.js +15 -20
  629. package/ui/ems/modules/storage-control.js +8 -6
  630. package/ui/ems/modules/tarif-vis.js +7 -2
  631. package/ui/ems/modules/tariff-status.js +19 -1
  632. package/ui/eslint.postgres-history.config.mjs +9 -0
  633. package/ui/io-package.json +5 -1
  634. package/ui/lib/ems-control-values.js +64 -0
  635. package/ui/lib/flow-measurement.js +72 -0
  636. package/ui/lib/hosted-adapter.js +12 -1
  637. package/ui/lib/influx-history-runtime.js +66 -24
  638. package/ui/lib/installer-lifecycle.js +4 -2
  639. package/ui/lib/ocpp-auto-discovery.js +397 -0
  640. package/ui/lib/ocpp-limit-feedback.js +166 -0
  641. package/ui/lib/partner-runtime.js +35 -2
  642. package/ui/lib/partner-websocket.js +4 -1
  643. package/ui/lib/postgres-history-config.js +57 -0
  644. package/ui/lib/postgres-history.js +344 -0
  645. package/ui/lib/runtime-proxy-html.js +34 -1
  646. package/ui/lib/smarthome-device-controls.js +4 -1
  647. package/ui/lib/ui-access-policy.js +39 -6
  648. package/ui/main.js +392 -222
  649. package/ui/package.json +1 -1
  650. package/ui/tsconfig.postgres-history.json +4 -0
  651. package/ui/www/app.js +106 -152
  652. package/ui/www/auth.js +36 -10
  653. package/ui/www/charging-diagnostics-appcenter.js +1 -0
  654. package/ui/www/customer-tariff.js +1 -0
  655. package/ui/www/dashboard-lp-status.js +1 -0
  656. package/ui/www/dc-station-display.js +1 -0
  657. package/ui/www/ems-apps.js +48 -8
  658. package/ui/www/energy-origin-appcenter.js +1 -0
  659. package/ui/www/energy-origin-ledger-view.js +1 -0
  660. package/ui/www/eos-kiosk-settings.js +174 -0
  661. package/ui/www/eos-session-idle.js +40 -6
  662. package/ui/www/eos-updates.js +1 -0
  663. package/ui/www/index.html +2 -1
  664. package/ui/www/license.js +1 -0
  665. package/ui/www/licenses/smarthome-markdown-components.json +157 -157
  666. package/ui/www/live-display.js +4 -2
  667. package/ui/www/login.js +19 -7
  668. package/ui/www/manifest.webmanifest +3 -3
  669. package/ui/www/netoperator-appcenter.js +1 -0
  670. package/ui/www/netoperator.js +1 -0
  671. package/ui/www/operating-strategies-appcenter.js +1 -0
  672. package/ui/www/operating-strategies-rule-builder.js +1 -0
  673. package/ui/www/power-measurements.js +27 -2
  674. package/ui/www/pwa.js +1 -0
  675. package/ui/www/runtime-base.js +1 -0
  676. package/ui/www/settings.html +13 -1
  677. package/ui/www/smarthome-activation.js +1 -0
  678. package/ui/www/smarthome-alias-config.js +1 -0
  679. package/ui/www/smarthome-custom-config.js +1 -0
  680. package/ui/www/smarthome-custom-views.js +1 -0
  681. package/ui/www/smarthome-device-categories.js +1 -0
  682. package/ui/www/smarthome-device-config.js +1 -0
  683. package/ui/www/smarthome-device-controls.js +1 -0
  684. package/ui/www/smarthome-feedback.js +1 -0
  685. package/ui/www/smarthome-layout-editor.js +1 -0
  686. package/ui/www/smarthome-presentation.js +1 -0
  687. package/ui/www/smarthome-setup.js +1 -0
  688. package/ui/www/smarthome-touch.js +1 -0
  689. package/ui/www/storagefarm-dispatch.js +1 -0
  690. package/ui/www/storagefarm-summary.js +1 -0
  691. package/ui/www/tariff-display.js +62 -2
  692. package/ui/admin/react/assets/index-BJO3q7oe.js +0 -13
package/ui/main.js CHANGED
@@ -7,7 +7,7 @@
7
7
  * AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
8
8
  *
9
9
  * Quelle: src-ts/runtime-executables/main.ts
10
- * Quell-Hash: sha256:f61d808e29a1884d6fe6d80783d784beef53f7053fedd14fd49a0b661e04dd52
10
+ * Quell-Hash: sha256:ad361d2b7b0b927a9644e599c04682b4af2895a775374ecad364a37576534a05
11
11
  * Erzeugung: npm run sync:ts-runtime-executables
12
12
  *
13
13
  * Zweck:
@@ -30,6 +30,7 @@
30
30
  */
31
31
  // Canonical main.js runtime source; generate with `npm run sync:ts-runtime-executables`.
32
32
  'use strict';
33
+ const { emsControlField, validEmsControlValue } = require('./lib/ems-control-values');
33
34
  const { HostedAdapter, centralLicenseSnapshot, centralAccess } = require('./lib/hosted-adapter');
34
35
  const { stopHostedRuntime, createHostedCleanup } = require('./lib/hosted-runtime-stop');
35
36
  const { readHostedStartup } = require('./lib/hosted-startup-status');
@@ -56,11 +57,14 @@ const bodyParser = express.json({ limit: '5mb', inflate: false });
56
57
  const crypto = require('crypto');
57
58
  const { installerRevision, assertInstallerRevision, provisionInstallerObjects, assertDeviceAppActivations, numericMeasurement, activeDeviceProfileReferences, awaitEmsTransition } = require('./lib/installer-lifecycle');
58
59
  const { buildFarmOverview } = require('./lib/storage-farm-overview');
60
+ const { readFlowMeasurement, sumFlowMeasurements } = require('./lib/flow-measurement');
59
61
  const { tariffDisplayConfig, tariffPriceNumber } = require('./lib/tariff-price');
60
62
  const { customerTariffView, prepareCustomerTariffChange } = require('./lib/customer-tariff');
61
63
  const { InfluxDirectClient } = require('./lib/influx-direct');
62
64
  const { InfluxHistoryRuntime } = require('./lib/influx-history-runtime');
63
- const { prepareInfluxHistoryChange, protectInfluxHistoryConfig, restoreInfluxHistoryConfig, redactInfluxHistoryConfig } = require('./lib/influx-config');
65
+ const { PostgresHistoryClient, loadPostgresProfile } = require('./lib/postgres-history');
66
+ const { prepareHistoryChange, isUntouchedHistoryDefault } = require('./lib/postgres-history-config');
67
+ const { protectInfluxHistoryConfig, restoreInfluxHistoryConfig, redactInfluxHistoryConfig } = require('./lib/influx-config');
64
68
  const https = require('https');
65
69
  const pkg = require('./package.json');
66
70
  const { defaultEnergyOriginConfig, registerEnergyOriginApi } = require('./lib/energy-origin-api');
@@ -77,6 +81,7 @@ const { buildStationDisplayPresentation } = require('./lib/station-display-prese
77
81
  const tariffProviderRegistry = require('./ems/services/tariff-provider-registry');
78
82
  const { normalizeEvcsEnergyTotalKwh } = require('./ems/services/evcs-unit-conversion');
79
83
  const { validateEvcsElectricalConfig } = require('./lib/evcs-electrical-limits');
84
+ const { OcppAutoDiscovery, planOcppDiscovery, normalizeOcppDiscovery, ocppDiscoveryPatterns, ocppStationRoot, ocppRootInScope, ocppNamespace } = require('./lib/ocpp-auto-discovery');
80
85
  const { NotificationMail, validAddress } = require('./lib/notification-mail');
81
86
  const { startOpenMeteoPvForecastRuntime, requestOpenMeteoJson, validateOpenMeteoWeather, safeOpenMeteoError, configuredOpenMeteoApiKey } = require('./ems/services/open-meteo-pv-forecast'), { AdminOverviewPublisher } = require('./ems/services/admin-overview-publisher');
82
87
  /**
@@ -394,7 +399,7 @@ class NexoWattVis extends HostedAdapter {
394
399
  // responsive and avoids unnecessary InfluxDB round-trips.
395
400
  this._nwHistoryApiCache = new EphemeralMap(5000, 4);
396
401
  this._nwHistoryApiInflight = new Map();
397
- this._nwDirectHistory = new InfluxHistoryRuntime(this.namespace);
402
+ this._nwDirectHistory = new InfluxHistoryRuntime(this.namespace, undefined, undefined, this.hostNamespace);
398
403
  // Only fulfilled ioBroker writes may enter the historian. Capture the event's
399
404
  // timestamp before awaiting persistence; never await network I/O in an EMS tick.
400
405
  const writeHistoryState = this.setStateAsync.bind(this);
@@ -4786,6 +4791,7 @@ class NexoWattVis extends HostedAdapter {
4786
4791
  }
4787
4792
  }
4788
4793
 
4794
+ this._nwHistoryExistingInstallation = st !== null && st !== undefined || source === 'userdata';
4789
4795
  // Neue Laufzeitfelder werden ausschließlich im Speicher ergänzt. Ein normales
4790
4796
  // Update/Neustart schreibt keine normalisierte Fassung über vorhandene Kundendaten.
4791
4797
  patch = restoreInfluxHistoryConfig(patch, this._nwHistorySecretCodec());
@@ -4968,6 +4974,60 @@ class NexoWattVis extends HostedAdapter {
4968
4974
  } finally { this._nwEndInstallerConfigMutation(token); }
4969
4975
  }
4970
4976
 
4977
+ /** Native OCPP registration changes mappings only, never app activation or installation limits. */
4978
+ async reconcileOcppDiscovery(stations) {
4979
+ const assertReady = () => {
4980
+ if (this._nwShuttingDown || this._bridge.canWrite() !== true) throw new Error('EOS_UI_OWNERSHIP_REQUIRED');
4981
+ if (!['ready', 'degraded'].includes(this._hostedStartup?.state)) throw new Error('EOS_UI_STARTING');
4982
+ if (!centralLicenseSnapshot(this._bridge).ok) throw new Error('EOS_LICENSE_REQUIRED');
4983
+ };
4984
+ assertReady();
4985
+ const token = this._nwBeginInstallerConfigMutation();
4986
+ if (!token) throw new Error('EOS_OCPP_DISCOVERY_BUSY');
4987
+ try {
4988
+ assertReady();
4989
+ const effective = this.nwApplyInstallerPatchToRuntimeConfig(this.config || {}, this._nwInstallerConfigPatch || {});
4990
+ const plan = planOcppDiscovery(effective, stations, { maxRows: this._nwLicenseMaxWallboxes() });
4991
+ if (!plan.changed && !this._nwOcppApplyPending) return plan;
4992
+ const patch = this.nwDeepMerge(this._nwDeepClone(this._nwInstallerConfigPatch || {}), plan.patch);
4993
+ const next = this.nwApplyInstallerPatchToRuntimeConfig(this.config || {}, patch);
4994
+ await this._nwProvisionInstallerObjects(next);
4995
+ assertReady();
4996
+ if (plan.changed) {
4997
+ if (await this.persistInstallerConfigToState(patch) === false) throw new Error('EOS_OCPP_DISCOVERY_PERSIST_FAILED');
4998
+ this._nwInstallerConfigPatch = patch;
4999
+ this._nwInstallerConfigRawPatch = this._nwDeepClone(patch);
5000
+ }
5001
+ this._nwOcppApplyPending = true;
5002
+ this._nwEmsInitError = 'EOS_EMS_CONFIG_APPLY_PENDING';
5003
+ assertReady();
5004
+ if (this.emsEngine?.stopForReconfigure) await awaitEmsTransition(this.emsEngine.stopForReconfigure());
5005
+ assertReady();
5006
+ this.config = next;
5007
+ await this._nwApplyInstallerRuntime(true, 'ocpp-discovery');
5008
+ this._nwOcppApplyPending = false;
5009
+ try { await this.nwWriteUserdataBackup(patch, 'ocpp-discovery'); }
5010
+ catch (_error) { this.log.warn('EOS_OCPP_DISCOVERY_BACKUP_FAILED: Zuordnung gespeichert; zusätzliche Sicherung fehlgeschlagen.'); }
5011
+ return plan;
5012
+ } finally { this._nwEndInstallerConfigMutation(token); }
5013
+ }
5014
+
5015
+ _nwStartOcppAutoDiscovery() {
5016
+ if (this._nwShuttingDown || this._ocppAutoDiscovery) return;
5017
+ this._ocppAutoDiscovery = new OcppAutoDiscovery({
5018
+ hostNamespace: this.hostNamespace,
5019
+ readObjects: async () => Object.assign({}, ...await Promise.all(ocppDiscoveryPatterns(this.hostNamespace).map(pattern => this.getForeignObjectsAsync(pattern, 'state')))),
5020
+ readMetadata: async () => Object.assign({}, ...await Promise.all(ocppDiscoveryPatterns(this.hostNamespace).map(pattern => this.getForeignStatesAsync(`${pattern}.info.*`)))),
5021
+ subscribe: () => Promise.all(ocppDiscoveryPatterns(this.hostNamespace).map(pattern => this.subscribeForeignStatesAsync(`${pattern}.info.*`))),
5022
+ reconcile: stations => this.reconcileOcppDiscovery(stations),
5023
+ canRun: () => !this._nwShuttingDown && this._bridge.canWrite() === true
5024
+ && centralLicenseSnapshot(this._bridge).ok && ['ready', 'degraded'].includes(this._hostedStartup?.state),
5025
+ warn: code => this.log.warn(`${code}: Automatische OCPP-Zuordnung wird erneut geprüft.`),
5026
+ });
5027
+ // Bounded discovery must not hold up the operational startup or local control loop.
5028
+ void this._ocppAutoDiscovery.start().catch(() => this.log.warn('EOS_OCPP_DISCOVERY_FAILED'));
5029
+ }
5030
+
4971
5031
  /** Profil-/Protokollwechsel darf eine laufende Regelung nicht unter unveränderten
4972
5032
  * Geräte-DP-IDs auf andere Register umlenken. Derselbe Save-Token bleibt bis zum
4973
5033
  * abgeschlossenen Geräte-Commit beim Host; reine Umbenennungen rufen diesen Pfad nicht auf. */
@@ -9195,7 +9255,13 @@ class NexoWattVis extends HostedAdapter {
9195
9255
  let controlMappingAutoResolvedOnline = false;
9196
9256
  let controlMappingAutoResolvedHeartbeat = false;
9197
9257
  try {
9198
- const resolved = await resolveEvcsControlMapping(row, canUseEvcsControlDp, canUseEvcsReadDp);
9258
+ const discovery = normalizeOcppDiscovery(row.ocppDiscovery);
9259
+ const existingControlIds = new Set([row.setCurrentAId, row.setPowerWId, row.enableWriteId]
9260
+ .filter(id => typeof id === 'string' && id.trim()).map(id => id.trim()));
9261
+ const writeExists = discovery?.code === 'MANUAL_MAPPING_REVIEW_REQUIRED'
9262
+ ? id => existingControlIds.has(String(id)) ? canUseEvcsControlDp(id) : Promise.resolve(false)
9263
+ : canUseEvcsControlDp;
9264
+ const resolved = await resolveEvcsControlMapping(row, writeExists, canUseEvcsReadDp);
9199
9265
  if (resolved && resolved.row) row = resolved.row;
9200
9266
  controlMappingAutoResolved = !!(resolved && resolved.changed);
9201
9267
  controlMappingAutoResolvedCurrent = !!(resolved && resolved.inferredCurrent);
@@ -9337,6 +9403,10 @@ class NexoWattVis extends HostedAdapter {
9337
9403
  const storageAssistControlScope = globalStorageAssistCustomerAllowed ? 'global' : 'per-lp';
9338
9404
  evcsList.push({ index: i+1, enabled, priority, name, note, powerId, energyTotalId, energyTotalInputIsWh, statusId, chargingStateId, activeId, vehicleConnectedId, chargeDemandId, heartbeatId, vehicleConnectedTrueValues, vehicleConnectedFalseValues, chargeDemandTrueValues, chargeDemandFalseValues, statusDemandValues, statusReadyValues, statusConnectedValues, statusDisconnectedValues, statusNoDemandValues, modeId, lockWriteId, rfidReadId, setCurrentAId, setPowerWId, onlineId, dataFreshId, enableWriteId, telemetryProfile, chargerType, phases, voltageV, controlPreference, minCurrentA, maxCurrentA, minPowerW, maxPowerW, dcCurrentReference, dcVoltageId, stepA, stepW, userMode, stationKey, connectorNo, allowBoost, boostTimeoutMin, boostMaxPowerW, vehicleSocId, phaseMode, phaseSwitchId, phaseFeedbackId, phaseSwitchValue1p, phaseSwitchValue3p, stopBeforePhaseSwitch, phaseSwitchUpThresholdW, phaseSwitchDownThresholdW, phaseSwitchUpStableSec, phaseSwitchDownStableSec, phaseSwitchCooldownSec, phaseSwitchSettleSec, storageAssistCustomerAllowed, storageAssistControlScope, controlMappingAutoResolved, controlMappingAutoResolvedCurrent, controlMappingAutoResolvedPower, controlMappingAutoResolvedEnable, controlMappingAutoResolvedPowerRead, controlMappingAutoResolvedEnergyTotal, controlMappingAutoResolvedStatus, controlMappingAutoResolvedVehicleConnected, controlMappingAutoResolvedOnline, controlMappingAutoResolvedHeartbeat });
9339
9405
  }
9406
+ for (const normalized of evcsList) {
9407
+ const discovery = normalizeOcppDiscovery(rawList[normalized.index - 1]?.ocppDiscovery);
9408
+ if (discovery) normalized.ocppDiscovery = discovery;
9409
+ }
9340
9410
  this.evcsList = evcsList;
9341
9411
  // Stationsgruppen (für DC-Stationen mit mehreren Ladepunkten)
9342
9412
  const sgRaw = Array.isArray(cfg.stationGroups) ? cfg.stationGroups : [];
@@ -9528,11 +9598,11 @@ class NexoWattVis extends HostedAdapter {
9528
9598
  const configuredId = String(binding.configuredId || sourceId || '').trim();
9529
9599
  const ts = (typeof state.ts === 'number' && Number.isFinite(state.ts))
9530
9600
  ? state.ts
9531
- : ((typeof state.lc === 'number' && Number.isFinite(state.lc)) ? state.lc : Date.now());
9601
+ : ((typeof state.lc === 'number' && Number.isFinite(state.lc)) ? state.lc : null);
9532
9602
  const normalized = this._nwScaleMappedValue(binding.key, configuredId, state.val);
9533
9603
  const prev = (this.stateCache && this.stateCache[binding.key]) ? this.stateCache[binding.key] : null;
9534
- const cacheChanged = !(prev && prev.ts === ts && Object.is(prev.value, normalized));
9535
- if (cacheChanged) this.updateValue(binding.key, normalized, ts);
9604
+ const cacheChanged = !(prev && prev.ts === ts && Object.is(prev.value, normalized) && prev.q === state.q);
9605
+ if (cacheChanged) this.updateValue(binding.key, normalized, ts, { q: state.q });
9536
9606
 
9537
9607
  const localId = this.namespace ? `${this.namespace}.${binding.key}` : '';
9538
9608
  const shouldMirror = binding.key.startsWith('evcs.')
@@ -9544,14 +9614,14 @@ class NexoWattVis extends HostedAdapter {
9544
9614
  const mirrorValue = this._nwEvcsMirrorValue(binding, normalized);
9545
9615
  let stampValue = '';
9546
9616
  try { stampValue = (mirrorValue && typeof mirrorValue === 'object') ? JSON.stringify(mirrorValue) : String(mirrorValue); } catch (_e) { stampValue = String(mirrorValue); }
9547
- const stamp = `${ts}|${typeof mirrorValue}|${stampValue}`;
9617
+ const stamp = `${ts}|${state.q}|${typeof mirrorValue}|${stampValue}`;
9548
9618
  if (!this._nwEvcsMirrorStampByKey || typeof this._nwEvcsMirrorStampByKey.get !== 'function') {
9549
9619
  this._nwEvcsMirrorStampByKey = new Map();
9550
9620
  }
9551
9621
  if (this._nwEvcsMirrorStampByKey.get(binding.key) === stamp) return cacheChanged;
9552
9622
 
9553
9623
  try {
9554
- await this.setStateAsync(binding.key, { val: mirrorValue, ack: true });
9624
+ await this.setStateAsync(binding.key, { val: mirrorValue, ack: true, q: ts === null ? 64 : (state.q ?? 0), ...(ts !== null ? { ts } : {}) });
9555
9625
  this._nwEvcsMirrorStampByKey.set(binding.key, stamp);
9556
9626
  return true;
9557
9627
  } catch (e) {
@@ -12097,6 +12167,7 @@ async onReady() {
12097
12167
  // Historie (Influx): canonical export states under 'nexowatt-ui.0.historie.*'
12098
12168
  // This avoids double-mapping of device datapoints for dashboards/history.
12099
12169
  try {
12170
+ await startupStep(() => this._nwActivateProvisionedHistory());
12100
12171
  await startupStep(() => this.ensureHistorieExportStates());
12101
12172
  await startupStep(() => this.updateHistorieExportStates('startup'));
12102
12173
  this.startHistorieExportTimer();
@@ -12181,6 +12252,7 @@ async onReady() {
12181
12252
  const emsReady = this._nwIsEmsReady();
12182
12253
  this._hostedStartup = { state: emsReady ? 'ready' : 'degraded', error: emsReady ? '' : 'EOS_EMS_INIT_FAILED' };
12183
12254
  this._bridge.deviceEmsConfigChanged?.();
12255
+ this._nwStartOcppAutoDiscovery();
12184
12256
  if (emsReady) this.log.info('NexoWatt EOS ist bereit.');
12185
12257
  else this.log.warn('EOS_EMS_INIT_FAILED: Bedienoberfläche verfügbar, Betriebsstart unvollständig.');
12186
12258
  } catch (e) {
@@ -16104,26 +16176,26 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
16104
16176
  if (!['admin', 'installer'].includes(req.nwSession?.role)) return sendForbidden(res);
16105
16177
  return next();
16106
16178
  };
16107
- const historyResponse = () => ({ ok: true, config: redactInfluxHistoryConfig({ history: this.config?.history || { provider: 'adapter' } }).history, configurationRevision: this._nwInstallerConfigRevision(), status: this._nwDirectHistory.status() });
16179
+ const historyResponse = async () => ({ ok: true, config: { ...redactInfluxHistoryConfig({ history: this.config?.history || { provider: 'adapter' } }).history, postgresql: { profile: 'local', provisioned: await this._nwPostgresProfileAvailable() }, newInstallationAllowed: await this._nwHistoryNewInstallationAllowed() }, configurationRevision: this._nwInstallerConfigRevision(), status: this._nwDirectHistory.status() });
16108
16180
  const historyFailure = (res, error) => {
16109
16181
  const rawCode = error?.code;
16110
- const code = typeof rawCode === 'string' && /^EOS_INFLUX_[A-Z_]{1,64}$/.test(rawCode) ? rawCode : 'EOS_INFLUX_REQUEST_FAILED';
16111
- const invalid = ['EOS_INFLUX_CONFIG_INVALID', 'EOS_INFLUX_PROVIDER_INVALID', 'EOS_INFLUX_TOKEN_INVALID', 'EOS_INFLUX_CA_INVALID', 'EOS_INFLUX_URL_INVALID', 'EOS_INFLUX_NEW_DESTINATION_REQUIRES_TOKEN'].includes(code);
16182
+ const code = typeof rawCode === 'string' && /^EOS_(?:INFLUX|POSTGRES)_[A-Z_]{1,64}$/.test(rawCode) ? rawCode : 'EOS_INFLUX_REQUEST_FAILED';
16183
+ const invalid = ['EOS_INFLUX_CONFIG_INVALID', 'EOS_INFLUX_PROVIDER_INVALID', 'EOS_INFLUX_TOKEN_INVALID', 'EOS_INFLUX_CA_INVALID', 'EOS_INFLUX_URL_INVALID', 'EOS_INFLUX_NEW_DESTINATION_REQUIRES_TOKEN', 'EOS_POSTGRES_PROFILE_INVALID', 'EOS_POSTGRES_EXISTING_HISTORY', 'EOS_POSTGRES_NEW_INSTALLATION_REQUIRED'].includes(code);
16112
16184
  return res.status(invalid ? 400 : 503).json({ ok: false, error: code });
16113
16185
  };
16114
- app.get('/api/installer/history', requireInstaller, requireHistoryInstaller, (_req, res) => {
16115
- sendNoStore(res); this._nwConfigureHistory(); return res.json(historyResponse());
16186
+ app.get('/api/installer/history', requireInstaller, requireHistoryInstaller, async (_req, res) => {
16187
+ sendNoStore(res); this._nwConfigureHistory(); return res.json(await historyResponse());
16116
16188
  });
16117
16189
  app.post('/api/installer/history/check', requireInstaller, requireHistoryInstaller, async (req, res) => {
16118
16190
  sendNoStore(res);
16119
16191
  if (this._nwShuttingDown || this._bridge.canWrite() !== true) return res.status(503).json({ ok: false, error: 'EOS_UI_OWNERSHIP_REQUIRED' });
16120
- if (this._nwHistoryCheckInFlight) return res.status(409).json({ ok: false, error: 'EOS_INFLUX_CHECK_BUSY' });
16192
+ if (this._nwHistoryCheckInFlight) return res.status(409).json({ ok: false, error: req.body?.history?.provider === 'postgresql' ? 'EOS_POSTGRES_BUSY' : 'EOS_INFLUX_CHECK_BUSY' });
16121
16193
  this._nwHistoryCheckInFlight = true;
16122
16194
  let client = null;
16123
16195
  try {
16124
- const candidate = prepareInfluxHistoryChange(this.config?.history, req.body?.history || { provider: 'influxdb2' });
16125
- if (candidate.provider !== 'influxdb2') return res.status(400).json({ ok: false, error: 'EOS_INFLUX_PROVIDER_INVALID' });
16126
- client = new InfluxDirectClient(candidate.influxdb2);
16196
+ const candidate = prepareHistoryChange(this.config?.history, req.body?.history || { provider: 'influxdb2' }, await this._nwHistoryNewInstallationAllowed());
16197
+ if (!['influxdb2', 'postgresql'].includes(candidate.provider)) return res.status(400).json({ ok: false, error: 'EOS_INFLUX_PROVIDER_INVALID' });
16198
+ client = candidate.provider === 'postgresql' ? new PostgresHistoryClient(this.hostNamespace) : new InfluxDirectClient(candidate.influxdb2);
16127
16199
  this._nwHistoryCheckClient = client;
16128
16200
  const check = await client.check();
16129
16201
  return res.json({ ok: true, check });
@@ -16134,14 +16206,18 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
16134
16206
  sendNoStore(res);
16135
16207
  if (this._nwShuttingDown || this._bridge.canWrite() !== true) return res.status(503).json({ ok: false, error: 'EOS_UI_OWNERSHIP_REQUIRED' });
16136
16208
  const mutation = beginMeshAppSave();
16137
- if (!mutation) return res.status(409).json({ ok: false, error: 'EOS_INFLUX_CONFIG_BUSY' });
16209
+ if (!mutation) return res.status(409).json({ ok: false, error: req.body?.history?.provider === 'postgresql' ? 'EOS_POSTGRES_BUSY' : 'EOS_INFLUX_CONFIG_BUSY' });
16138
16210
  try {
16139
16211
  if (typeof req.body?.expectedConfigurationRevision !== 'string' || req.body.expectedConfigurationRevision !== this._nwInstallerConfigRevision()) {
16140
16212
  return res.status(409).json({ ok: false, error: 'EOS_INSTALLER_CONFIG_CONFLICT' });
16141
16213
  }
16142
- const history = prepareInfluxHistoryChange(this.config?.history, req.body?.history);
16214
+ const history = prepareHistoryChange(this.config?.history, req.body?.history, await this._nwHistoryNewInstallationAllowed());
16215
+ if (history.provider === 'postgresql') {
16216
+ const postgres = new PostgresHistoryClient(this.hostNamespace);
16217
+ try { await postgres.check(); } finally { postgres.close(); }
16218
+ }
16143
16219
  const patch = { ...this._nwDeepClone(this._nwInstallerConfigPatch || {}), history };
16144
- if (await this.persistInstallerConfigToState(patch) === false) return res.status(503).json({ ok: false, error: 'EOS_INFLUX_CONFIG_SAVE_FAILED' });
16220
+ if (await this.persistInstallerConfigToState(patch) === false) return res.status(503).json({ ok: false, error: history.provider === 'postgresql' ? 'EOS_POSTGRES_CONFIG_SAVE_FAILED' : 'EOS_INFLUX_CONFIG_SAVE_FAILED' });
16145
16221
  this._nwInstallerConfigPatch = patch;
16146
16222
  this.config = this.nwApplyInstallerPatchToRuntimeConfig(this.config, patch);
16147
16223
  if (this._nwShuttingDown || this._bridge.canWrite() !== true) return res.status(503).json({ ok: false, saved: true, error: 'EOS_UI_OWNERSHIP_REQUIRED' });
@@ -16151,7 +16227,7 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
16151
16227
  void this.updateHistorieExportStates('history-save').catch(() => {});
16152
16228
  }
16153
16229
  try { await this.nwWriteUserdataBackup(patch, 'history-save'); } catch (_error) {}
16154
- return res.json(historyResponse());
16230
+ return res.json(await historyResponse());
16155
16231
  } catch (error) { return historyFailure(res, error); }
16156
16232
  finally { endMeshAppSave(mutation); }
16157
16233
  });
@@ -16186,6 +16262,7 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
16186
16262
  cfgOut.locale = this._nwBuildLocaleInfo();
16187
16263
  cfgOut.countryProfile = Object.assign({}, cfgOut.countryProfile || {}, this._nwBuildCountryProfileInfo());
16188
16264
  cfgOut.regressionSafety = this._nwInstallerRegressionSafetyLastReport || { schema: 'nexowatt.installer-regression-safety.v1', ok: true, checks: [] };
16265
+ cfgOut.ocppAutoDiscovery = this._ocppAutoDiscovery?.status() || { state: 'idle', error: '', ts: 0, stations: [] };
16189
16266
  res.json({ ok: true, license: cfgOut.license, config: cfgOut, configurationRevision });
16190
16267
  } catch (e) {
16191
16268
  this.log.warn('Installer config API error: ' + e.message);
@@ -16810,24 +16887,23 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
16810
16887
  // by ChargingManagement/UI to these native IDs.
16811
16888
  let compactObjects = {};
16812
16889
  try {
16813
- compactObjects = await this.getForeignObjectsAsync('ocpp21.*', 'state') || {};
16890
+ compactObjects = Object.assign({}, ...await Promise.all(ocppDiscoveryPatterns(this.hostNamespace).map(pattern => this.getForeignObjectsAsync(pattern, 'state'))));
16814
16891
  } catch (_compactScanError) {
16815
16892
  compactObjects = {};
16816
16893
  }
16817
16894
 
16818
16895
  const compactGroups = new Map();
16819
16896
  for (const id of Object.keys(compactObjects)) {
16820
- const match = String(id).match(/^ocpp21\.(\d+)\.([^.]+)\./);
16821
- if (!match) continue;
16822
- const key = `${match[1]}|${match[2]}`;
16823
- if (!compactGroups.has(key)) compactGroups.set(key, { instance: String(match[1]), station: String(match[2]) });
16897
+ const root = ocppStationRoot(id);
16898
+ if (!ocppRootInScope(root, this.hostNamespace)) continue;
16899
+ if (!compactGroups.has(root)) compactGroups.set(root, { root, station: root.slice(root.lastIndexOf('.') + 1) });
16824
16900
  }
16825
16901
 
16826
16902
  const compactHas = (id) => !!(id && compactObjects[id]);
16827
16903
  const compactPick = (...ids) => ids.flat().map(id => String(id || '').trim()).find(compactHas) || '';
16828
16904
  const compactConnectors = [];
16829
16905
  for (const group of compactGroups.values()) {
16830
- const nativeRoot = `ocpp21.${group.instance}.${group.station}`;
16906
+ const nativeRoot = group.root;
16831
16907
  const nativeId = (suffix) => `${nativeRoot}.${suffix}`;
16832
16908
  const powerId = compactPick(nativeId('measurements.powerW'));
16833
16909
  const energyKWhId = compactPick(nativeId('measurements.energyKWh'));
@@ -16853,7 +16929,8 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
16853
16929
  };
16854
16930
  if (!Object.values(ids).some(value => String(value || '').trim())) continue;
16855
16931
  compactConnectors.push({
16856
- stationKey: group.station,
16932
+ stationKey: nativeRoot,
16933
+ adapterInstance: ocppNamespace(nativeRoot),
16857
16934
  connectorNo: 1,
16858
16935
  base: nativeRoot,
16859
16936
  name: group.station,
@@ -27168,14 +27245,14 @@ return res.json(out);
27168
27245
 
27169
27246
  const ts = (typeof st.ts === 'number' && Number.isFinite(st.ts))
27170
27247
  ? st.ts
27171
- : ((typeof st.lc === 'number' && Number.isFinite(st.lc)) ? st.lc : now);
27248
+ : ((typeof st.lc === 'number' && Number.isFinite(st.lc)) ? st.lc : null);
27172
27249
 
27173
27250
  if (emsDp) {
27174
27251
  try {
27175
27252
  const prev = (emsDp.cacheByObjectId && typeof emsDp.cacheByObjectId.get === 'function')
27176
27253
  ? emsDp.cacheByObjectId.get(entry.id)
27177
27254
  : null;
27178
- const sameRaw = !!(prev && prev.ts === ts && Object.is(prev.val, st.val));
27255
+ const sameRaw = !!(prev && prev.ts === ts && Object.is(prev.val, st.val) && prev.q === st.q);
27179
27256
  if (!sameRaw) emsDp.handleStateChange(entry.id, st);
27180
27257
  } catch (_e) {}
27181
27258
  }
@@ -27195,9 +27272,9 @@ return res.json(out);
27195
27272
  if (!key || handledEvcsKeys.has(key)) continue;
27196
27273
  const scaled = this._nwScaleMappedValue(key, entry.id, st.val);
27197
27274
  const prev = (this.stateCache && this.stateCache[key]) ? this.stateCache[key] : null;
27198
- const sameScaled = !!(prev && prev.ts === ts && Object.is(prev.value, scaled));
27275
+ const sameScaled = !!(prev && prev.ts === ts && Object.is(prev.value, scaled) && prev.q === st.q);
27199
27276
  if (sameScaled) continue;
27200
- this.updateValue(key, scaled, ts);
27277
+ this.updateValue(key, scaled, ts, { q: st.q });
27201
27278
  }
27202
27279
  };
27203
27280
 
@@ -27471,7 +27548,7 @@ return res.json(out);
27471
27548
  await this._nwPrimeForeignPowerScale(id);
27472
27549
  const state = await this.getForeignStateAsync(id);
27473
27550
  if (state && state.val !== undefined) {
27474
- this.updateValue(key, this._nwScaleMappedValue(key, id, state.val), state.ts);
27551
+ this.updateValue(key, this._nwScaleMappedValue(key, id, state.val), state.ts, { q: state.q });
27475
27552
  }
27476
27553
  } catch (e) {
27477
27554
  this.log.warn(`Cannot read initial state for ${key} (${id}): ${e.message}`);
@@ -27502,7 +27579,7 @@ return res.json(out);
27502
27579
  await this._nwPrimeForeignPowerScale(id);
27503
27580
  const st = await this.getForeignStateAsync(id);
27504
27581
  if (st && st.val !== undefined) {
27505
- this.updateValue(slot.stateKey, this._nwScaleMappedValue(slot.stateKey, id, st.val), st.ts);
27582
+ this.updateValue(slot.stateKey, this._nwScaleMappedValue(slot.stateKey, id, st.val), st.ts, { q: st.q });
27506
27583
  }
27507
27584
  } catch (e) {
27508
27585
  this.log.warn(`Cannot read initial flow slot state for ${slot.stateKey} (${id}): ${e.message}`);
@@ -27588,8 +27665,27 @@ return res.json(out);
27588
27665
  */
27589
27666
  onStateChange(id, state) {
27590
27667
  if (this._nwShuttingDown) return;
27668
+ this._ocppAutoDiscovery?.onStateChange(id, state);
27591
27669
  if (state && state.ack === false && String(id).startsWith(this.namespace + '.')
27592
27670
  && !centralLicenseSnapshot(this._bridge).ok) return;
27671
+ // Ordinary ioBroker controls remain usable without a separate token or
27672
+ // permission layer. Validate values before caches/compatibility translation.
27673
+ if (state && String(id).startsWith(this.namespace + '.')) {
27674
+ const relative = String(id).slice(this.namespace.length + 1);
27675
+ const field = emsControlField(relative);
27676
+ if (field && !validEmsControlValue(field, state.val)) {
27677
+ if (field !== 'legacyMode') {
27678
+ this.stateCache[relative] = { value: 'EOS_INVALID_CONTROL_VALUE', ts: Number(state.ts) || Date.now() };
27679
+ this._nwRequestImmediateEmsTick(`invalid-control:${relative}`);
27680
+ }
27681
+ const now = Date.now();
27682
+ if (!this._nwInvalidControlWarnAt || now - this._nwInvalidControlWarnAt >= 30000) {
27683
+ this._nwInvalidControlWarnAt = now;
27684
+ this.log.warn(`EOS_INVALID_CONTROL_VALUE: ${relative}; Bedienwert im Datenpunkt prüfen.`);
27685
+ }
27686
+ return;
27687
+ }
27688
+ }
27593
27689
  // Feed EMS datapoint cache (for embedded charging engine)
27594
27690
  try {
27595
27691
  if (this.emsEngine && this.emsEngine.dp && typeof this.emsEngine.dp.handleStateChange === 'function') {
@@ -27625,7 +27721,7 @@ return res.json(out);
27625
27721
  let normalizedMappedValue = state.val;
27626
27722
  if (key && !evcsMappedAlreadyHandled && !ownReadOnlyEvcsMirrorAck) {
27627
27723
  normalizedMappedValue = this._nwScaleMappedValue(key, id, state.val);
27628
- this.updateValue(key, normalizedMappedValue, state.ts);
27724
+ this.updateValue(key, normalizedMappedValue, state.ts, { q: state.q });
27629
27725
 
27630
27726
  // Bedienzustände der Ladepunkte werden sofort im stateCache sichtbar und
27631
27727
  // lösen einen debouncten zentralen EMS-Tick aus. Das gilt auch für externe
@@ -27656,8 +27752,8 @@ return res.json(out);
27656
27752
  try {
27657
27753
  const pvAuto = this._derivedFlow?.auto?.pvInverters;
27658
27754
  if (pvAuto && pvAuto.ids && pvAuto.ids.has(id)) {
27659
- const tsMs = Number(state.ts) || Date.now();
27660
- pvAuto.cache.set(id, { val: state.val, ts: tsMs });
27755
+ const tsMs = numericMeasurement(state.ts);
27756
+ pvAuto.cache.set(id, { val: state.val, ts: tsMs, q: state.q });
27661
27757
  this.scheduleDerivedFlowUpdate('autoPv');
27662
27758
  }
27663
27759
  } catch (_e) {}
@@ -28317,7 +28413,7 @@ return res.json(out);
28317
28413
  if (enableInfluxCustom) await this._nwEnsureInfluxCustom(id, inst, influxOpts);
28318
28414
  };
28319
28415
 
28320
- await ensureChannel('historie', 'Historie (Influx)');
28416
+ await ensureChannel('historie', this.config?.history?.provider === 'postgresql' ? 'EOS Historie' : 'Historie (Influx)');
28321
28417
  await ensureChannel('historie.core', 'Kernwerte');
28322
28418
 
28323
28419
  await ensureChannel('historie.core.grid', 'Netz');
@@ -28481,7 +28577,7 @@ return res.json(out);
28481
28577
  async _nwEnsureInfluxCustom(localId, inst, opts = null) {
28482
28578
  this._nwConfigureHistory();
28483
28579
  this._nwDirectHistory.register(localId, opts?.changesOnly === true);
28484
- if (this.config?.history?.provider === 'influxdb2') {
28580
+ if (['influxdb2', 'postgresql'].includes(this.config?.history?.provider)) {
28485
28581
  const object = await this.getObjectAsync(localId).catch(() => null);
28486
28582
  const custom = object?.common?.custom;
28487
28583
  const active = custom && typeof custom === 'object' && Object.entries(custom).some(([id, entry]) => /^influxdb\.\d+$/.test(id) && entry?.enabled === true);
@@ -30865,6 +30961,13 @@ return res.json(out);
30865
30961
  native: {},
30866
30962
  });
30867
30963
 
30964
+ await this.setObjectNotExistsAsync('derived.core.production', {
30965
+ type: 'channel', common: { name: 'Zusätzliche Erzeugung (berechnet)' }, native: {},
30966
+ });
30967
+ await this.setObjectNotExistsAsync('derived.core.production.extraW', {
30968
+ type: 'state', common: { name: 'Zusätzliche Erzeugung ohne PV-Duplikate', type: 'number', role: 'value.power', unit: 'W', read: true, write: false }, native: {},
30969
+ });
30970
+
30868
30971
  await this.setObjectNotExistsAsync('derived.core.building', {
30869
30972
  type: 'channel',
30870
30973
  common: { name: 'Gebäude (berechnet)' },
@@ -31809,9 +31912,64 @@ return res.json(out);
31809
31912
  return { encrypt: value => this._owner.encrypt(value), decrypt: value => this._owner.decrypt(value) };
31810
31913
  }
31811
31914
 
31915
+ async _nwPostgresProfileAvailable() {
31916
+ try { await loadPostgresProfile(this.hostNamespace); return true; }
31917
+ catch (_error) { return false; }
31918
+ }
31919
+
31920
+ /** No implicit migration: any saved installer history or installed historian blocks PG first selection. */
31921
+ async _nwHistoryNewInstallationAllowed() {
31922
+ if (this.namespace !== this.hostNamespace || this.config?.history?.provider === 'postgresql' || typeof this._nwHistoryExistingInstallation !== 'boolean' ||
31923
+ this._nwInstallerConfigPatch?.history || !isUntouchedHistoryDefault(this._owner.config?.eosUi?.history, require('./io-package.json').native.history) || this.config?.history?.provider === 'influxdb2' ||
31924
+ this.config?.history?.instance && this.config.history.instance !== 'influxdb.0') return false;
31925
+ // A system installer may explicitly provision a new site after EOS's first
31926
+ // empty initialization. Only its protected newInstallation profile can
31927
+ // authorize this case; absent history fields alone never do.
31928
+ if (this._nwHistoryExistingInstallation && !await this._nwPostgresProfileAvailable()) return false;
31929
+ try {
31930
+ for (const name of ['influxdb', 'sql', 'history']) {
31931
+ const objects = await this.getForeignObjectsAsync(`system.adapter.${name}.*`, 'instance');
31932
+ if (!objects || typeof objects !== 'object' || Object.keys(objects).length) return false;
31933
+ }
31934
+ return true;
31935
+ } catch (_error) { return false; }
31936
+ }
31937
+
31938
+ /** The protected profile is an explicit system-installer decision, never an npm/postinstall side effect. */
31939
+ async _nwActivateProvisionedHistory() {
31940
+ if (!await this._nwHistoryNewInstallationAllowed()) return;
31941
+ try { await loadPostgresProfile(this.hostNamespace); }
31942
+ catch (error) {
31943
+ if (error?.code !== 'EOS_POSTGRES_SETUP_REQUIRED') this.log.warn(error?.code || 'EOS_POSTGRES_PROFILE_INVALID');
31944
+ return;
31945
+ }
31946
+ if (this._nwShuttingDown || this._bridge.canWrite() !== true) return;
31947
+ const history = prepareHistoryChange(this.config?.history, { provider: 'postgresql', postgresql: { profile: 'local' }, newInstallation: true }, true);
31948
+ const patch = { ...this._nwDeepClone(this._nwInstallerConfigPatch || {}), history };
31949
+ if (await this.persistInstallerConfigToState(patch) === false) {
31950
+ this.log.warn('EOS_POSTGRES_CONFIG_SAVE_FAILED'); return;
31951
+ }
31952
+ this._nwInstallerConfigPatch = patch;
31953
+ this.config = this.nwApplyInstallerPatchToRuntimeConfig(this.config, patch);
31954
+ this._nwConfigureHistory();
31955
+ }
31956
+
31957
+ getHistoryBackupRequirement() {
31958
+ const history = this.config?.history;
31959
+ if (!history || typeof history !== 'object') return { provider: 'unknown' };
31960
+ if (history.provider === 'postgresql') return { provider: 'postgresql', namespace: this.hostNamespace };
31961
+ if (history.provider === 'influxdb2') {
31962
+ const direct = history.influxdb2;
31963
+ if (!direct || typeof direct.url !== 'string' || typeof direct.bucket !== 'string' || typeof direct.organization !== 'string') return { provider: 'unknown' };
31964
+ return { provider: 'influxdb2', url: direct.url, bucket: direct.bucket, org: direct.organization };
31965
+ }
31966
+ const instance = this._nwGetHistoryInstance();
31967
+ return /^[a-z][a-z0-9_-]*\.\d+$/.test(instance) ? { provider: 'adapter', instance } : { provider: 'unknown' };
31968
+ }
31969
+
31812
31970
  _nwConfigureHistory() {
31813
31971
  if (this._nwShuttingDown) return;
31814
- if (!this._nwDirectHistory) this._nwDirectHistory = new InfluxHistoryRuntime(this.namespace);
31972
+ if (!this._nwDirectHistory) this._nwDirectHistory = new InfluxHistoryRuntime(this.namespace, undefined, undefined, this.hostNamespace);
31815
31973
  this._nwDirectHistory.configure(this.config?.history);
31816
31974
  if (this._nwHistoryProviderSignature !== JSON.stringify(this.config?.history || {})) {
31817
31975
  this._nwHistoryProviderSignature = JSON.stringify(this.config?.history || {});
@@ -31821,7 +31979,7 @@ return res.json(out);
31821
31979
  }
31822
31980
 
31823
31981
  _nwDispatchHistory(instance, payload, callback) {
31824
- if (this.config?.history?.provider !== 'influxdb2') return this.sendTo(instance, 'getHistory', payload, callback);
31982
+ if (!['influxdb2', 'postgresql'].includes(this.config?.history?.provider)) return this.sendTo(instance, 'getHistory', payload, callback);
31825
31983
  this._nwConfigureHistory();
31826
31984
  return this._nwDirectHistory.query(payload.id, payload.options).then(
31827
31985
  result => callback(result),
@@ -31830,7 +31988,7 @@ return res.json(out);
31830
31988
  }
31831
31989
 
31832
31990
  async _nwDetectInfluxInstance() {
31833
- if (this.config?.history?.provider === 'influxdb2') return 'eos-direct-influxdb2';
31991
+ if (['influxdb2', 'postgresql'].includes(this.config?.history?.provider)) return `eos-direct-${this.config.history.provider}`;
31834
31992
  try {
31835
31993
  // If user did not specify a history instance, try to detect an installed influxdb.X instance.
31836
31994
  if (this._nwTrimId((this.config && this.config.history && this.config.history.instance) || '')) return this._nwTrimId(this.config.history.instance);
@@ -31853,7 +32011,7 @@ return res.json(out);
31853
32011
  * TypeScript: Parameter, Rückgabewert und verwendete Config-/State-Objekte später explizit typisieren.
31854
32012
  */
31855
32013
  _nwGetHistoryInstance() {
31856
- if (this.config?.history?.provider === 'influxdb2') return 'eos-direct-influxdb2';
32014
+ if (['influxdb2', 'postgresql'].includes(this.config?.history?.provider)) return `eos-direct-${this.config.history.provider}`;
31857
32015
  const hcfg = (this.config && this.config.history) || {};
31858
32016
  const inst = this._nwTrimId(hcfg.instance) || this._nwTrimId(this._nwDetectedInfluxInstance) || 'influxdb.0';
31859
32017
  return inst;
@@ -32007,10 +32165,10 @@ return res.json(out);
32007
32165
  * TypeScript: Parameter, Rückgabewert und verwendete Config-/State-Objekte später explizit typisieren.
32008
32166
  */
32009
32167
  async _nwEnsurePara14aInfluxInstance(force = false) {
32010
- if (this.config?.history?.provider === 'influxdb2') {
32168
+ if (['influxdb2', 'postgresql'].includes(this.config?.history?.provider)) {
32011
32169
  this._nwConfigureHistory();
32012
32170
  const status = this._nwDirectHistory.status();
32013
- return { instance: 'eos-direct-influxdb2', ready: status.state === 'ready', dedicated: false, autoProvisioned: false, provisionState: 'direct', provisionError: status.lastError };
32171
+ return { instance: `eos-direct-${this.config.history.provider}`, ready: status.state === 'ready', dedicated: false, autoProvisioned: false, provisionState: 'direct', provisionError: status.lastError };
32014
32172
  }
32015
32173
  const now = Date.now();
32016
32174
  const cached = this._nwPara14aInfluxProvision;
@@ -32458,7 +32616,7 @@ return res.json(out);
32458
32616
  try { await this.subscribeForeignStatesAsync(nid); } catch (_e) {}
32459
32617
  try {
32460
32618
  const st = await this.getForeignStateAsync(nid);
32461
- if (st && st.val !== undefined) cache.cache.set(nid, { val: st.val, ts: st.ts || now });
32619
+ if (st && st.val !== undefined) cache.cache.set(nid, { val: st.val, ts: st.ts, q: st.q });
32462
32620
  } catch (_e) {}
32463
32621
  }
32464
32622
  }
@@ -32509,6 +32667,19 @@ return res.json(out);
32509
32667
  // If no direct house meter (consumptionTotal) is configured, we use this as fallback for the UI.
32510
32668
 
32511
32669
  const ts = Date.now();
32670
+ const configuredAgeSec = numericMeasurement(this.config?.settings?.deviceStaleTimeoutSec);
32671
+ const liveMaxAgeMs = Math.max(10000, (configuredAgeSec !== null && configuredAgeSec > 0 ? configuredAgeSec : 60) * 1000);
32672
+ const inputTimes = [];
32673
+ const pvTimes = [];
32674
+ const producerTimes = [];
32675
+ const gridTimes = [];
32676
+ const storageTimes = [];
32677
+ const readLive = (key, times = inputTimes) => {
32678
+ const sample = readFlowMeasurement(this.stateCache, key, ts, liveMaxAgeMs);
32679
+ if (sample) times.push(sample.ts);
32680
+ return sample ? sample.value : null;
32681
+ };
32682
+ const oldestTime = (times) => times.length ? Math.min(...times) : ts;
32512
32683
 
32513
32684
  // Keep PV-inverter auto-cache reasonably fresh (cheap no-op when not due)
32514
32685
  await this._derivedRefreshPvInvertersCache(false);
@@ -32534,7 +32705,7 @@ return res.json(out);
32534
32705
  // settings.flowInvertBattery flips that signed value before splitting.
32535
32706
  // Separate charge/discharge datapoints remain supported, but stale/legacy mirrored
32536
32707
  // values must not make the UI or derived balance show both directions at once.
32537
- const storageFlow = this._nwResolveBatteryFlowFromCache({ now: ts });
32708
+ const storageFlow = this._nwResolveBatteryFlowFromCache({ now: ts, strictStale: true, maxAgeMs: liveMaxAgeMs });
32538
32709
  const chargeW = Math.max(0, Number(storageFlow.chargeW) || 0);
32539
32710
  const dischargeW = Math.max(0, Number(storageFlow.dischargeW) || 0);
32540
32711
  const storageSrc = storageFlow.src || 'missing';
@@ -32544,14 +32715,27 @@ return res.json(out);
32544
32715
  // --- Producer slots (optional extra production) ---
32545
32716
  let producerSumW = 0;
32546
32717
  let producerCount = 0;
32718
+ let missingProducer = false;
32719
+ const producerInputs = [];
32547
32720
  for (let i = 1; i <= 5; i++) {
32548
- const p = this._nwGetNumberFromCache(`producer${i}Power`);
32549
- if (p !== null) {
32550
- const n = Number(p);
32551
- if (Number.isFinite(n)) {
32552
- producerSumW += Math.abs(n);
32553
- producerCount++;
32554
- }
32721
+ const key = `producer${i}Power`;
32722
+ const slot = typeof this._nwGetFlowSlotInfo === 'function' ? this._nwGetFlowSlotInfo('producers', i) : null;
32723
+ const id = String(slot?.objectId || this.config?.datapoints?.[key] || '').trim();
32724
+ if (id) producerInputs.push({ key: String(slot?.stateKey || key), id });
32725
+ }
32726
+
32727
+ for (const [kind, prefix] of [['bhkw', 'b'], ['generator', 'g']]) {
32728
+ const devices = this.config?.[kind]?.devices;
32729
+ if (!Array.isArray(devices)) continue;
32730
+ const indexes = new Set();
32731
+ for (let i = 0; i < Math.min(devices.length, 10); i++) {
32732
+ const row = devices[i];
32733
+ if (!row || row.enabled !== true) continue;
32734
+ const idx = Math.max(1, Math.min(10, Math.round(Number(row.idx ?? row.index ?? (i + 1)) || (i + 1))));
32735
+ if (indexes.has(idx)) continue;
32736
+ indexes.add(idx);
32737
+ const id = String(row.powerReadId || row.powerObjectId || row.powerId || '').trim();
32738
+ if (id) producerInputs.push({ key: `${kind}.devices.${prefix}${idx}.powerW`, id });
32555
32739
  }
32556
32740
  }
32557
32741
 
@@ -32561,12 +32745,12 @@ return res.json(out);
32561
32745
  let pvBaseSourceId = '';
32562
32746
  let pvBaseSourceIds = [];
32563
32747
  if (pvPowerMapped) {
32564
- pvAcRaw = this._nwGetNumberFromCache('pvPower');
32748
+ pvAcRaw = readLive('pvPower', pvTimes);
32565
32749
  pvSource = 'mapped:pvPower';
32566
32750
  pvBaseSourceId = String(this.config?.datapoints?.pvPower || '').trim();
32567
32751
  pvBaseSourceIds = pvBaseSourceId ? [pvBaseSourceId] : [];
32568
32752
  } else if (prodTotalMapped) {
32569
- pvAcRaw = this._nwGetNumberFromCache('productionTotal');
32753
+ pvAcRaw = readLive('productionTotal', pvTimes);
32570
32754
  pvSource = 'mapped:productionTotal';
32571
32755
  pvBaseSourceId = String(this.config?.datapoints?.productionTotal || '').trim();
32572
32756
  pvBaseSourceIds = pvBaseSourceId ? [pvBaseSourceId] : [];
@@ -32594,13 +32778,14 @@ return res.json(out);
32594
32778
  const isOffline = (oRec && oRec.val !== undefined) ? !!oRec.val : false;
32595
32779
  const ageOk = (pRec && Number.isFinite(Number(pRec.ts))) ? ((ts - Number(pRec.ts)) <= staleMs) : false;
32596
32780
 
32597
- if (!connected || isOffline || !ageOk) {
32781
+ if (!connected || isOffline || !ageOk || (pRec?.q !== undefined && pRec.q !== 0)) {
32598
32782
  offline++;
32599
32783
  continue;
32600
32784
  }
32601
32785
 
32602
- const v = Number(pRec?.val);
32603
- if (!Number.isFinite(v)) continue;
32786
+ const v = numericMeasurement(pRec?.val);
32787
+ if (v === null || Number(pRec.ts) <= 0 || Number(pRec.ts) > ts) { offline++; continue; }
32788
+ pvTimes.push(Number(pRec.ts));
32604
32789
  sum += Math.abs(v);
32605
32790
  used++;
32606
32791
  const sourceId = String(dev && dev.powerId || '').trim();
@@ -32609,7 +32794,7 @@ return res.json(out);
32609
32794
 
32610
32795
  if (used > 0) {
32611
32796
  pvAcW = Math.max(0, sum);
32612
- pvSource = 'auto:pvSources';
32797
+ pvSource = offline > 0 ? 'auto:pvSources-incomplete' : 'auto:pvSources';
32613
32798
  } else {
32614
32799
  // No PV sources configured/available.
32615
32800
  // IMPORTANT: Do NOT fall back to producer-slots here. Producer slots are always optional and
@@ -32656,7 +32841,7 @@ return res.json(out);
32656
32841
  if (pvFarmMerge.farmFallbackUsed && pvSource === 'missing') pvSource = 'farm:pv-sources';
32657
32842
  else if (pvFarmMerge.farmAddedW > 0) pvSource = pvSource === 'missing' ? 'farm:pv-sources' : `${pvSource}+farm`;
32658
32843
  } else if (singleStorageDcEnabled) {
32659
- const dc = this._nwGetNumberFromCache('speicher.dcPvPowerW');
32844
+ const dc = readLive('speicher.dcPvPowerW', pvTimes);
32660
32845
  if (dc !== null && Number.isFinite(Number(dc))) {
32661
32846
  pvDcW = Math.max(0, Math.abs(Number(dc)));
32662
32847
  pvDcSource = 'storage:dc';
@@ -32707,7 +32892,17 @@ return res.json(out);
32707
32892
  + (Number(pvPlausibility.suppressedW) || 0),
32708
32893
  );
32709
32894
 
32710
- // Total production = PV(total) + extra producers
32895
+ // Only distinct physical sources are additional production. An alias of the
32896
+ // already mapped PV source must not be added for a second display slot.
32897
+ const producerSources = new Set(pvBaseSourceIds.map(id => nwPhysicalPvSourceKey(id) || id));
32898
+ for (const input of producerInputs) {
32899
+ const identity = input.id ? (nwPhysicalPvSourceKey(input.id) || input.id) : input.key;
32900
+ if (producerSources.has(identity)) continue;
32901
+ producerSources.add(identity);
32902
+ const value = readLive(input.key, producerTimes);
32903
+ if (value !== null) { producerSumW += Math.abs(value); producerCount++; }
32904
+ else missingProducer = true;
32905
+ }
32711
32906
  const productionW = pvTotalW + producerSumW;
32712
32907
 
32713
32908
  // --- Derived loads ---
@@ -32718,104 +32913,77 @@ return res.json(out);
32718
32913
  // LIVE, Sungrow/FENECON-Deckungslogik und Diagnose die stabilere Quelle als die
32719
32914
  // Bilanzgleichung aus PV + NVP + Speicher. Die Bilanz bleibt als Fallback und
32720
32915
  // Kontrollwert erhalten, weil Einzelwerte zeitlich versetzt eintreffen koennen.
32721
- const directLoadMaxAgeMs = Math.max(10 * 1000, Number(this.config?.settings?.deviceStaleTimeoutSec || 60) * 1000);
32722
- const directLoadTotalRaw = consumptionMapped
32723
- ? this._nwGetNumberFromCacheFresh('consumptionTotal', directLoadMaxAgeMs, null, ts)
32724
- : null;
32916
+ const directTimes = [];
32917
+ const directLoadTotalRaw = consumptionMapped ? readLive('consumptionTotal', directTimes) : null;
32725
32918
  const directLoadTotalW = (typeof directLoadTotalRaw === 'number' && Number.isFinite(directLoadTotalRaw) && directLoadTotalRaw >= 0)
32726
32919
  ? Math.max(0, directLoadTotalRaw)
32727
32920
  : null;
32728
32921
  const directLoadAgeMs = consumptionMapped ? this._nwGetCacheAgeMs('consumptionTotal', ts) : null;
32729
32922
  let loadTotalSource = directLoadTotalW !== null ? 'mapped:consumptionTotal' : 'balance:pv+nvp+storage';
32730
32923
 
32731
- // Some meters/adapters update asynchronously (grid/PV/battery).
32732
- // This can temporarily yield an impossible negative power balance.
32733
- // To avoid 0 W spikes in the VIS, we hold the last plausible value for a short time.
32734
- let loadTotalW = directLoadTotalW !== null ? directLoadTotalW : rawLoadTotalW;
32735
-
32736
- const activityW = (Math.abs(productionW) + Math.abs(gridBuyW) + Math.abs(gridSellW) + Math.abs(chargeW) + Math.abs(dischargeW));
32737
- const hasActivity = activityW > 200;
32738
-
32739
- // Timestamp skew between inputs (debug only)
32740
- const tsList = [];
32741
- /**
32742
- * Code-Teil: pushTs
32743
- * Zweck: Kapselt einen lokalen Verarbeitungsschritt, damit Aufrufer nicht direkt in Detaildaten eingreifen.
32744
- * Zusammenhang: Teil von Adapterkern: Lifecycle, Webserver, API, States, EMS-Engine; Aufrufstellen und abhängige States/APIs beim Ändern mitprüfen.
32745
- * TypeScript: Parameter, Rückgabewert und verwendete Config-/State-Objekte später explizit typisieren.
32746
- */
32747
- const pushTs = (k) => {
32748
- const rec = this.stateCache && this.stateCache[k];
32749
- const t = rec && rec.ts;
32750
- if (typeof t === 'number' && Number.isFinite(t)) tsList.push(t);
32751
- };
32752
- pushTs('gridBuyPower'); pushTs('gridSellPower'); pushTs('gridPointPower');
32753
- pushTs('storageChargePower'); pushTs('storageDischargePower'); pushTs('batteryPower');
32754
- pushTs('pvPower'); pushTs('productionTotal');
32755
- if (sfEnabled) {
32756
- pushTs('storageFarm.totalPvPowerW');
32757
- pushTs('storageFarm.totalPvAcPowerW');
32758
- pushTs('storageFarm.totalPvDcPowerW');
32759
- pushTs('storageFarm.totalPowerW');
32760
- pushTs('storageFarm.totalChargePowerW');
32761
- pushTs('storageFarm.totalDischargePowerW');
32762
- }
32763
- if (singleStorageDcEnabled) {
32764
- pushTs('speicher.dcPvPowerW');
32765
- }
32766
- const inputSkewMs = (tsList.length >= 2) ? (Math.max(...tsList) - Math.min(...tsList)) : null;
32767
-
32924
+ // A balance is usable only with all configured contributors observed.
32925
+ // Never refresh an old measurement through this periodic calculation.
32926
+ let gridObserved = false;
32927
+ if (hasGrid) {
32928
+ if (gridSrc === 'net-fresh') gridObserved = readLive('gridPointPower', gridTimes) !== null;
32929
+ else if (String(gridSrc).startsWith('split-')) {
32930
+ const buyRequired = this._nwHasMappedDatapoint('gridBuyPower');
32931
+ const sellRequired = this._nwHasMappedDatapoint('gridSellPower');
32932
+ const buy = buyRequired ? readLive('gridBuyPower', gridTimes) : 0;
32933
+ const sell = sellRequired ? readLive('gridSellPower', gridTimes) : 0;
32934
+ gridObserved = (buyRequired || sellRequired) && buy !== null && sell !== null;
32935
+ } else gridObserved = readLive('ems.gridPowerRawW', gridTimes) !== null;
32936
+ }
32937
+ const storageConfigured = selectedStorageTopologyLive !== 'none'
32938
+ || ['batteryPower', 'storageChargePower', 'storageDischargePower', 'storageSoc'].some(key => this._nwHasMappedDatapoint(key));
32939
+ let storageObserved = !storageConfigured;
32940
+ if (String(storageSrc).startsWith('storageFarm') && !String(storageSrc).includes('missing') && !String(storageSrc).includes('unavailable')) {
32941
+ storageObserved = readLive('storageFarm.totalPowerW', storageTimes) !== null;
32942
+ } else if (storageSrc === 'batterySigned') storageObserved = readLive('batteryPower', storageTimes) !== null;
32943
+ else if (storageSrc === 'sameChargeDischargeSigned') storageObserved = readLive('storageChargePower', storageTimes) !== null;
32944
+ else if (String(storageSrc).startsWith('chargeDischarge')) {
32945
+ storageObserved = ['storageChargePower', 'storageDischargePower'].every(key => !this._nwHasMappedDatapoint(key) || readLive(key, storageTimes) !== null);
32946
+ }
32947
+ const autoPvConfigured = (this._derivedFlow?.auto?.pvInverters?.list || []).length > 0;
32948
+ const pvConfigured = pvPowerMapped || prodTotalMapped || autoPvConfigured || sfEnabled || singleStorageDcEnabled;
32949
+ let pvObserved = !pvConfigured || (pvSource !== 'missing' && !pvSource.includes('incomplete'));
32950
+ if (sfEnabled && (pvFarmMerge?.farmAddedW > 0 || pvFarmMerge?.farmFallbackUsed)) {
32951
+ pvObserved = pvObserved && readLive('storageFarm.totalPvPowerW', pvTimes) !== null;
32952
+ }
32953
+ inputTimes.push(...pvTimes, ...producerTimes, ...gridTimes, ...storageTimes);
32954
+ const balanceObserved = gridObserved && storageObserved && pvObserved && !missingProducer;
32955
+ const loadTotalW = directLoadTotalW !== null ? directLoadTotalW
32956
+ : (balanceObserved && Number.isFinite(rawLoadTotalW) && rawLoadTotalW >= 0 ? rawLoadTotalW : null);
32957
+ if (loadTotalW === null) loadTotalSource = balanceObserved ? 'invalid:negative-balance' : 'invalid:missing-input';
32958
+ const loadTimestamp = directLoadTotalW !== null ? oldestTime(directTimes) : oldestTime(inputTimes);
32959
+ const activityW = Math.abs(productionW) + Math.abs(gridBuyW) + Math.abs(gridSellW) + chargeW + dischargeW;
32960
+ const inputSkewMs = inputTimes.length >= 2 ? Math.max(...inputTimes) - Math.min(...inputTimes) : null;
32961
+ const usedFallback = false;
32768
32962
  if (!this._derivedFlow) this._derivedFlow = {};
32769
- if (!this._derivedFlow.good) this._derivedFlow.good = { loadTotalW: null, loadRestW: null, ts: 0 };
32770
- const good = this._derivedFlow.good;
32771
- const goodLoad = (typeof good.loadTotalW === 'number' && Number.isFinite(good.loadTotalW)) ? good.loadTotalW : null;
32772
- const goodRest = (typeof good.loadRestW === 'number' && Number.isFinite(good.loadRestW)) ? good.loadRestW : null;
32773
- const goodAgeMs = (good && typeof good.ts === 'number' && Number.isFinite(good.ts)) ? (ts - good.ts) : Infinity;
32774
-
32775
- const holdMaxAgeMs = 60 * 1000;
32776
- let usedFallback = false;
32777
-
32778
- // Clamp to plausible range + anti-spike
32779
- if (!Number.isFinite(loadTotalW)) loadTotalW = 0;
32780
- if (loadTotalW < 0 || (loadTotalW === 0 && hasActivity)) {
32781
- if (goodLoad !== null && goodAgeMs <= holdMaxAgeMs) {
32782
- loadTotalW = goodLoad;
32783
- loadTotalSource = `${loadTotalSource}:hold-last-good`;
32784
- usedFallback = true;
32785
- } else if (hasActivity) {
32786
- // Minimal plausible base-load to avoid "0.00 kW" optics while there is clearly energy activity.
32787
- loadTotalW = 100;
32788
- loadTotalSource = `${loadTotalSource}:minimal-plausible`;
32789
- usedFallback = true;
32790
- } else {
32791
- loadTotalW = 0;
32792
- }
32793
- }
32794
- if (loadTotalW < 0) loadTotalW = 0;
32963
+ if (!this._derivedFlow.last) this._derivedFlow.last = {};
32795
32964
 
32796
- // Rest-load: subtract EV and configured extra consumers (for convenience / mapping)
32797
- const evW = Math.max(0, Math.abs(this._nwGetNumberFromCache('evcs.totalPowerW') ?? 0));
32965
+ const restTimes = [];
32966
+ const evAbsent = Number(this.evcsCount) === 0 && !this._nwHasMappedDatapoint('consumptionEvcs');
32967
+ const evRaw = this._nwHasMappedDatapoint('consumptionEvcs') ? readLive('consumptionEvcs', restTimes) : readLive('evcs.totalPowerW', restTimes);
32968
+ const evW = evRaw !== null ? Math.abs(evRaw) : (evAbsent ? 0 : null);
32798
32969
  let consumersW = 0;
32970
+ let consumersObserved = true;
32971
+ const consumerSources = new Set([String(this.config?.datapoints?.consumptionEvcs || '').trim()].filter(Boolean));
32799
32972
  for (let i = 1; i <= 10; i++) {
32800
- const c = this._nwGetNumberFromCache(`consumer${i}Power`);
32801
- if (c !== null) {
32802
- const n = Number(c);
32803
- if (Number.isFinite(n)) consumersW += Math.abs(n);
32804
- }
32805
- }
32806
-
32807
- const rawLoadRestW = loadTotalW - evW - consumersW;
32808
-
32809
- let loadRestW = loadTotalW - evW - consumersW;
32810
- // If we had to hold/fallback the total load, prefer holding the last plausible rest-load as well.
32811
- if (usedFallback && goodRest !== null && goodAgeMs <= holdMaxAgeMs) {
32812
- loadRestW = goodRest;
32813
- }
32814
- if (!Number.isFinite(loadRestW)) loadRestW = 0;
32815
- if (loadRestW < 0) loadRestW = 0;
32816
-
32817
- const loadTotalRound = Math.round(loadTotalW);
32818
- const loadRestRound = Math.round(loadRestW);
32973
+ const key = `consumer${i}Power`;
32974
+ const slot = typeof this._nwGetFlowSlotInfo === 'function' ? this._nwGetFlowSlotInfo('consumers', i) : null;
32975
+ const id = String(slot?.objectId || this.config?.datapoints?.[key] || '').trim();
32976
+ if (!id || consumerSources.has(id)) continue;
32977
+ consumerSources.add(id);
32978
+ const c = readLive(String(slot?.stateKey || key), restTimes);
32979
+ if (c !== null) consumersW += Math.abs(c);
32980
+ else consumersObserved = false;
32981
+ }
32982
+ const rawLoadRestW = loadTotalW !== null && evW !== null && consumersObserved ? loadTotalW - evW - consumersW : null;
32983
+ const loadRestW = rawLoadRestW !== null && rawLoadRestW >= 0 ? rawLoadRestW : null;
32984
+ const loadTotalRound = loadTotalW !== null ? Math.round(loadTotalW) : null;
32985
+ const loadRestRound = loadRestW !== null ? Math.round(loadRestW) : null;
32986
+ const restTimestamp = Math.min(loadTimestamp, oldestTime(restTimes));
32819
32987
 
32820
32988
  const tsShadow = this._nwRunEnergyFlowTsShadowComparison({
32821
32989
  ts,
@@ -32863,8 +33031,10 @@ return res.json(out);
32863
33031
  const publishGridSellRound = Math.round(Number(effectiveEnergyFlow.gridSellW) || 0);
32864
33032
  const publishChargeRound = Math.round(Number(effectiveEnergyFlow.storageChargeW) || 0);
32865
33033
  const publishDischargeRound = Math.round(Number(effectiveEnergyFlow.storageDischargeW) || 0);
32866
- const publishLoadTotalRound = Math.round(Number(effectiveEnergyFlow.buildingLoadW) || 0);
32867
- const publishLoadRestRound = Math.max(0, Math.round(publishLoadTotalRound - evW - consumersW));
33034
+ const selectedLoad = numericMeasurement(effectiveEnergyFlow.buildingLoadW);
33035
+ const publishLoadTotalRound = loadTotalRound === null ? null : (directLoadTotalW !== null ? loadTotalRound : (selectedLoad !== null && selectedLoad >= 0 ? Math.round(selectedLoad) : null));
33036
+ const selectedRest = publishLoadTotalRound !== null && evW !== null && consumersObserved ? publishLoadTotalRound - evW - consumersW : null;
33037
+ const publishLoadRestRound = selectedRest !== null && selectedRest >= 0 ? Math.round(selectedRest) : null;
32868
33038
 
32869
33039
  /**
32870
33040
  * Code-Teil: Energiefluss-TS-Liveteststatus veröffentlichen
@@ -32902,31 +33072,16 @@ return res.json(out);
32902
33072
  }
32903
33073
  } catch (_eTsLiveState) {}
32904
33074
 
32905
- // Update last-plausible cache from the selected building-load source.
32906
- // Direkte Verbrauchs-DPs sind dabei bevorzugt; die Bilanz bleibt Fallback. So
32907
- // halten wir bei asynchronen PV/NVP/Speicher-Ticks keinen alten Bilanzwert fest,
32908
- // wenn ein frischer Gebäudeverbrauch bereits vorhanden ist.
32909
- try {
32910
- if (Number.isFinite(loadTotalW) && loadTotalW >= 0) {
32911
- const selectedRound = Math.round(loadTotalW);
32912
- const selectedRestRound = Math.round(Math.max(0, rawLoadRestW));
32913
- const goodCandidateOk = (selectedRound > 10) || !hasActivity;
32914
- if (goodCandidateOk) {
32915
- good.loadTotalW = selectedRound;
32916
- good.loadRestW = selectedRestRound;
32917
- good.ts = ts;
32918
- }
32919
- }
32920
- } catch (_eHold) {}
32921
-
32922
33075
  // --- Update adapter states (for App-Center mapping / debugging) ---
32923
- if (this._derivedFlow?.last?.loadTotalW !== publishLoadTotalRound) {
33076
+ if (this._derivedFlow?.last?.loadTotalW !== publishLoadTotalRound || this._derivedFlow?.last?.loadTimestamp !== loadTimestamp) {
33077
+ this._derivedFlow.last.loadTimestamp = loadTimestamp;
32924
33078
  this._derivedFlow.last.loadTotalW = publishLoadTotalRound;
32925
- await this.setStateAsync('derived.core.building.loadTotalW', { val: publishLoadTotalRound, ack: true });
33079
+ await this.setStateAsync('derived.core.building.loadTotalW', { val: publishLoadTotalRound, ack: true, ts: loadTimestamp });
32926
33080
  }
32927
- if (this._derivedFlow?.last?.loadRestW !== publishLoadRestRound) {
33081
+ if (this._derivedFlow?.last?.loadRestW !== publishLoadRestRound || this._derivedFlow?.last?.restTimestamp !== restTimestamp) {
33082
+ this._derivedFlow.last.restTimestamp = restTimestamp;
32928
33083
  this._derivedFlow.last.loadRestW = publishLoadRestRound;
32929
- await this.setStateAsync('derived.core.building.loadRestW', { val: publishLoadRestRound, ack: true });
33084
+ await this.setStateAsync('derived.core.building.loadRestW', { val: publishLoadRestRound, ack: true, ts: restTimestamp });
32930
33085
  }
32931
33086
  if (this._derivedFlow?.last?.loadSource !== loadTotalSource) {
32932
33087
  this._derivedFlow.last.loadSource = loadTotalSource;
@@ -32937,19 +33092,32 @@ return res.json(out);
32937
33092
  const pvDcRound = Math.round(pvDcW);
32938
33093
  const pvTotalRound = Math.round(pvTotalW);
32939
33094
 
32940
- if (this._derivedFlow?.last?.pvAcW !== pvAcRound) {
32941
- this._derivedFlow.last.pvAcW = pvAcRound;
32942
- await this.setStateAsync('derived.core.pv.acW', { val: pvAcRound, ack: true });
33095
+ const publishPvAcW = pvObserved ? pvAcRound : null;
33096
+ if (this._derivedFlow?.last?.pvAcW !== publishPvAcW || this._derivedFlow?.last?.pvTimestamp !== oldestTime(pvTimes)) {
33097
+ this._derivedFlow.last.pvAcW = publishPvAcW;
33098
+ await this.setStateAsync('derived.core.pv.acW', { val: publishPvAcW, ack: true, ts: oldestTime(pvTimes) });
32943
33099
  }
32944
- if (this._derivedFlow?.last?.pvDcW !== pvDcRound) {
32945
- this._derivedFlow.last.pvDcW = pvDcRound;
32946
- await this.setStateAsync('derived.core.pv.dcW', { val: pvDcRound, ack: true });
33100
+ const publishPvDcW = pvObserved ? pvDcRound : null;
33101
+ if (this._derivedFlow?.last?.pvDcW !== publishPvDcW || this._derivedFlow?.last?.pvTimestamp !== oldestTime(pvTimes)) {
33102
+ this._derivedFlow.last.pvDcW = publishPvDcW;
33103
+ await this.setStateAsync('derived.core.pv.dcW', { val: publishPvDcW, ack: true, ts: oldestTime(pvTimes) });
32947
33104
  }
32948
- if (this._derivedFlow?.last?.pvTotalW !== pvTotalRound) {
32949
- this._derivedFlow.last.pvTotalW = pvTotalRound;
32950
- await this.setStateAsync('derived.core.pv.totalW', { val: pvTotalRound, ack: true });
33105
+ const publishPvTotalW = pvObserved ? pvTotalRound : null;
33106
+ if (this._derivedFlow?.last?.pvTotalW !== publishPvTotalW || this._derivedFlow?.last?.pvTimestamp !== oldestTime(pvTimes)) {
33107
+ this._derivedFlow.last.pvTotalW = publishPvTotalW;
33108
+ await this.setStateAsync('derived.core.pv.totalW', { val: publishPvTotalW, ack: true, ts: oldestTime(pvTimes) });
32951
33109
  }
32952
33110
 
33111
+ this._derivedFlow.last.pvTimestamp = oldestTime(pvTimes);
33112
+ const publishExtraW = missingProducer ? null : Math.round(producerSumW);
33113
+ const producerTimestamp = oldestTime(producerTimes);
33114
+ if (this._derivedFlow.last.extraProductionW !== publishExtraW || this._derivedFlow.last.extraTimestamp !== producerTimestamp) {
33115
+ this._derivedFlow.last.extraProductionW = publishExtraW;
33116
+ this._derivedFlow.last.extraTimestamp = producerTimestamp;
33117
+ await this.setStateAsync('derived.core.production.extraW', { val: publishExtraW, ack: true, ts: producerTimestamp });
33118
+ }
33119
+ this.updateValue('derived.core.production.extraW', publishExtraW, producerTimestamp, { raw: false });
33120
+
32953
33121
  const pvRawTotalRound = Math.round(pvRawTotalW);
32954
33122
  const pvCapacityLimitRound = Math.round(pvPlausibility.capacityLimitW);
32955
33123
  const pvDuplicateSuppressedRound = Math.round(pvDuplicateSuppressedW);
@@ -32977,12 +33145,12 @@ return res.json(out);
32977
33145
  // Die abgeleiteten Kernwerte werden zusätzlich in den API-/SSE-Cache gespiegelt.
32978
33146
  // Das Kundenfrontend verwendet dadurch exakt denselben kanonischen Energiefluss wie
32979
33147
  // Historie und EMS und muss Farm-PV/-Leistung nicht noch einmal lokal rekonstruieren.
32980
- this.updateValue('derived.core.building.loadTotalW', publishLoadTotalRound, ts, { raw: false });
32981
- this.updateValue('derived.core.building.loadRestW', publishLoadRestRound, ts, { raw: false });
33148
+ this.updateValue('derived.core.building.loadTotalW', publishLoadTotalRound, loadTimestamp, { raw: false });
33149
+ this.updateValue('derived.core.building.loadRestW', publishLoadRestRound, restTimestamp, { raw: false });
32982
33150
  this.updateValue('derived.core.building.loadSource', loadTotalSource, ts, { raw: false });
32983
- this.updateValue('derived.core.pv.acW', pvAcRound, ts, { raw: false });
32984
- this.updateValue('derived.core.pv.dcW', pvDcRound, ts, { raw: false });
32985
- this.updateValue('derived.core.pv.totalW', pvTotalRound, ts, { raw: false });
33151
+ this.updateValue('derived.core.pv.acW', pvObserved ? pvAcRound : null, oldestTime(pvTimes), { raw: false });
33152
+ this.updateValue('derived.core.pv.dcW', pvObserved ? pvDcRound : null, oldestTime(pvTimes), { raw: false });
33153
+ this.updateValue('derived.core.pv.totalW', pvObserved ? pvTotalRound : null, oldestTime(pvTimes), { raw: false });
32986
33154
  this.updateValue('derived.core.pv.rawTotalW', pvRawTotalRound, ts, { raw: false });
32987
33155
  this.updateValue('derived.core.pv.capacityLimitW', pvCapacityLimitRound, ts, { raw: false });
32988
33156
  this.updateValue('derived.core.pv.duplicateSuppressedW', pvDuplicateSuppressedRound, ts, { raw: false });
@@ -32991,14 +33159,14 @@ return res.json(out);
32991
33159
 
32992
33160
  // --- Quality indicator ---
32993
33161
  let quality = 'ok';
32994
- if (!hasGrid) quality = 'missing-grid';
32995
- else if (pvSource === 'missing') quality = 'missing-pv';
32996
- else if (storageSrc === 'missing') quality = 'missing-storage';
32997
-
32998
- if (usedFallback) {
32999
- if (quality === 'ok') quality = 'degraded-balance';
33000
- else quality = String(quality) + '+degraded';
33001
- }
33162
+ if (!gridObserved) quality = 'missing-grid';
33163
+ else if (!pvObserved) quality = 'missing-pv';
33164
+ else if (!storageObserved) quality = 'missing-storage';
33165
+ else if (missingProducer) quality = 'missing-producer';
33166
+ else if (publishLoadTotalRound === null) quality = 'invalid-balance';
33167
+ else if (evW === null || !consumersObserved) quality = 'missing-consumer';
33168
+ else if (publishLoadRestRound === null) quality = 'invalid-rest-balance';
33169
+ this.updateValue('derived.core.building.quality', quality, ts, { raw: false });
33002
33170
 
33003
33171
  if (this._derivedFlow?.last?.quality !== quality) {
33004
33172
  this._derivedFlow.last.quality = quality;
@@ -33048,7 +33216,7 @@ return res.json(out);
33048
33216
  },
33049
33217
  extraProductionW: Math.round(producerSumW),
33050
33218
  consumersW: Math.round(consumersW),
33051
- evW: Math.round(evW),
33219
+ evW: evW !== null ? Math.round(evW) : null,
33052
33220
  building: {
33053
33221
  loadTotalW: publishLoadTotalRound,
33054
33222
  loadRestW: publishLoadRestRound,
@@ -33061,7 +33229,7 @@ return res.json(out);
33061
33229
  balance: {
33062
33230
  rawLoadTotalW: Math.round(rawLoadTotalW),
33063
33231
  selectedLoadTotalW: loadTotalRound,
33064
- rawLoadRestW: Math.round(Math.max(0, rawLoadRestW)),
33232
+ rawLoadRestW: rawLoadRestW !== null ? Math.round(rawLoadRestW) : null,
33065
33233
  usedFallback: !!usedFallback,
33066
33234
  inputSkewMs: inputSkewMs,
33067
33235
  activityW: Math.round(activityW),
@@ -33076,6 +33244,7 @@ return res.json(out);
33076
33244
  };
33077
33245
  const json = JSON.stringify(payload);
33078
33246
  await this.setStateAsync('derived.core.building.inputsJson', { val: json, ack: true });
33247
+ this.updateValue('derived.core.building.inputsJson', json, ts, { raw: false });
33079
33248
  await this.setStateAsync('derived.core.building.tsSwitchJson', { val: tsSwitchJsonText, ack: true });
33080
33249
  await this.setStateAsync('derived.core.building.tsCandidateJson', { val: tsCandidateJsonText, ack: true });
33081
33250
  await this.setStateAsync('derived.core.building.tsFixedSourceJson', { val: tsFixedSourceJsonText, ack: true });
@@ -33087,29 +33256,29 @@ return res.json(out);
33087
33256
  // derive them from the signed NVP datapoint (Import + / Export -).
33088
33257
  const gridBuyMapped = this._nwHasMappedDatapoint('gridBuyPower');
33089
33258
  const gridSellMapped = this._nwHasMappedDatapoint('gridSellPower');
33090
- if (gridNetRaw !== null && (!gridBuyMapped || gridBuyRaw === null)) {
33259
+ if (gridObserved && gridNetRaw !== null && (!gridBuyMapped || gridBuyRaw === null)) {
33091
33260
  const cur = Number(this.stateCache?.gridBuyPower?.value);
33092
- if (!Number.isFinite(cur) || cur !== gridBuyRound) {
33093
- this.updateValue('gridBuyPower', publishGridBuyRound, ts);
33261
+ if (!Number.isFinite(cur) || cur !== gridBuyRound || this.stateCache?.gridBuyPower?.ts !== oldestTime(gridTimes)) {
33262
+ this.updateValue('gridBuyPower', publishGridBuyRound, oldestTime(gridTimes), { raw: false });
33094
33263
  }
33095
33264
  }
33096
- if (gridNetRaw !== null && (!gridSellMapped || gridSellRaw === null)) {
33265
+ if (gridObserved && gridNetRaw !== null && (!gridSellMapped || gridSellRaw === null)) {
33097
33266
  const cur = Number(this.stateCache?.gridSellPower?.value);
33098
- if (!Number.isFinite(cur) || cur !== gridSellRound) {
33099
- this.updateValue('gridSellPower', publishGridSellRound, ts);
33267
+ if (!Number.isFinite(cur) || cur !== gridSellRound || this.stateCache?.gridSellPower?.ts !== oldestTime(gridTimes)) {
33268
+ this.updateValue('gridSellPower', publishGridSellRound, oldestTime(gridTimes), { raw: false });
33100
33269
  }
33101
33270
  }
33102
33271
 
33103
33272
  // 2) If no direct house meter is mapped, publish as "consumptionTotal" so the energyflow can render it.
33104
33273
  if (!consumptionMapped) {
33105
- this.updateValue('consumptionTotal', publishLoadTotalRound, ts);
33274
+ this.updateValue('consumptionTotal', publishLoadTotalRound, loadTimestamp, { raw: false });
33106
33275
  }
33107
33276
 
33108
33277
  // 3) If PV is not mapped, publish PV total as "pvPower" so the energyflow can render PV without mapping.
33109
33278
  if (!pvPowerMapped && !prodTotalMapped) {
33110
33279
  const cur = this.stateCache?.pvPower?.value;
33111
33280
  if (cur !== pvTotalRound) {
33112
- this.updateValue('pvPower', pvTotalRound, ts);
33281
+ this.updateValue('pvPower', pvObserved ? pvTotalRound : null, oldestTime(pvTimes), { raw: false });
33113
33282
  }
33114
33283
  }
33115
33284
 
@@ -33128,8 +33297,8 @@ return res.json(out);
33128
33297
  const fromSignedOnly = !!(storageFlow && storageFlow.fromSigned && !chargeMapped && !dischargeMapped);
33129
33298
  const fromFarmOrBalance = !!(storageFlow && (src.indexOf('storageFarm') === 0 || src.indexOf('balanceDerived') === 0));
33130
33299
  const noSplitMapped = !chargeMapped && !dischargeMapped;
33131
- const shouldMirrorBoth = !!(samePair || fromSignedOnly || (noSplitMapped && fromFarmOrBalance));
33132
- const shouldZeroMissingSide = !!(storageFlow && !storageFlow.derived && (chargeMapped !== dischargeMapped));
33300
+ const shouldMirrorBoth = storageObserved && !!(samePair || fromSignedOnly || (noSplitMapped && fromFarmOrBalance));
33301
+ const shouldZeroMissingSide = storageObserved && !!(storageFlow && !storageFlow.derived && (chargeMapped !== dischargeMapped));
33133
33302
  const chargeRound = publishChargeRound;
33134
33303
  const dischargeRound = publishDischargeRound;
33135
33304
  /**
@@ -33140,7 +33309,7 @@ return res.json(out);
33140
33309
  */
33141
33310
  const updateLocal = (k, v) => {
33142
33311
  const cur = Number(this.stateCache?.[k]?.value);
33143
- if (!Number.isFinite(cur) || cur !== v) this.updateValue(k, v, ts, { raw: false });
33312
+ if (!Number.isFinite(cur) || cur !== v || this.stateCache?.[k]?.ts !== oldestTime(storageTimes)) this.updateValue(k, v, oldestTime(storageTimes), { raw: false });
33144
33313
  };
33145
33314
  if (shouldMirrorBoth) {
33146
33315
  updateLocal('storageChargePower', chargeRound);
@@ -33152,7 +33321,7 @@ return res.json(out);
33152
33321
  // batteryPower is an internal signed convenience value when no signed DP is mapped.
33153
33322
  // It may be derived from valid split DPs, farm totals or a calculated fallback, but
33154
33323
  // it must never overwrite a configured signed battery DP.
33155
- if (!batteryMapped) {
33324
+ if (!batteryMapped && storageObserved) {
33156
33325
  /**
33157
33326
  * Code-Teil: batteryPower aus effektiven Publish-Werten spiegeln
33158
33327
  *
@@ -34117,7 +34286,7 @@ return res.json(out);
34117
34286
  const keepRaw = !(opts && opts.raw === false);
34118
34287
  if (keepRaw) {
34119
34288
  if (!this._nwRawValueCache || typeof this._nwRawValueCache !== 'object') this._nwRawValueCache = {};
34120
- this._nwRawValueCache[key] = { value: rawValue, ts };
34289
+ this._nwRawValueCache[key] = { value: rawValue, ts, ...(opts.q !== undefined ? { q: opts.q } : {}) };
34121
34290
  }
34122
34291
  } catch (_e0) {}
34123
34292
 
@@ -34134,7 +34303,7 @@ return res.json(out);
34134
34303
  value = Math.abs(value);
34135
34304
  }
34136
34305
 
34137
- this.stateCache[key] = { value, ts };
34306
+ this.stateCache[key] = { value, ts, ...(opts.q !== undefined ? { q: opts.q } : {}) };
34138
34307
 
34139
34308
  const payload = { [key]: this.stateCache[key] };
34140
34309
 
@@ -34142,15 +34311,13 @@ return res.json(out);
34142
34311
  try {
34143
34312
  if (/^evcs\.\d+\.powerW$/.test(key)) {
34144
34313
  const count = Math.max(0, Math.round(Number(this.evcsCount || 0) || 0));
34145
- let sum = 0;
34146
- for (let i = 1; i <= count; i++) {
34147
- const v = this.stateCache[`evcs.${i}.powerW`]?.value;
34148
- sum += Number(v || 0) || 0;
34149
- }
34150
- this.stateCache['evcs.totalPowerW'] = { value: sum, ts };
34151
- payload['evcs.totalPowerW'] = this.stateCache['evcs.totalPowerW'];
34152
- // persist as adapter state for other consumers
34153
- this.setStateAsync('evcs.totalPowerW', sum, true).catch(()=>{});
34314
+ const maxAgeMs = Math.max(10000, (numericMeasurement(this.config?.settings?.deviceStaleTimeoutSec) || 60) * 1000);
34315
+ const keys = Array.from({ length: Math.min(count, 1024) }, (_, index) => `evcs.${index + 1}.powerW`);
34316
+ const observation = sumFlowMeasurements(this.stateCache, keys, Date.now(), maxAgeMs);
34317
+ const aggregate = observation || { value: null, ts: Date.now() };
34318
+ this.stateCache['evcs.totalPowerW'] = aggregate;
34319
+ payload['evcs.totalPowerW'] = aggregate;
34320
+ this.setStateAsync('evcs.totalPowerW', { val: aggregate.value, ts: aggregate.ts, ack: true }).catch(() => {});
34154
34321
  }
34155
34322
 
34156
34323
  const mEnergy = key.match(/^evcs\.(\d+)\.energyTotalKwh$/);
@@ -34373,6 +34540,7 @@ return res.json(out);
34373
34540
  this._hostedOperational = false;
34374
34541
  this._nwSmartHomeHydrating = false;
34375
34542
  this._nwPreservedUiStates = null;
34543
+ cleanup.capture(() => this._ocppAutoDiscovery?.stop());
34376
34544
  cleanup.capture(() => this._nwCancelHistoryRequests?.());
34377
34545
  cleanup.capture(() => this._nwDirectHistory?.drainAndClose(3000));
34378
34546
  cleanup.capture(() => this._nwHistoryCheckClient?.close());
@@ -34524,6 +34692,7 @@ function createHostedRuntime(owner, bridge) {
34524
34692
  }
34525
34693
  await startPromise;
34526
34694
  },
34695
+ getHistoryBackupRequirement() { return runtime.getHistoryBackupRequirement(); },
34527
34696
  reserveDeviceProfileChange(input) {
34528
34697
  if (stopRequested) return Promise.reject(Object.assign(new Error('EOS_DEVICES_PROFILE_CHECK_UNAVAILABLE'), { code: 'EOS_DEVICES_PROFILE_CHECK_UNAVAILABLE' }));
34529
34698
  return runtime.reserveDeviceProfileChange(input);
@@ -34549,7 +34718,8 @@ function createHostedRuntime(owner, bridge) {
34549
34718
  revokeSessions() { runtime._nwCloseSseClients(); },
34550
34719
  status() { return { ...(stopUnconfirmed ? { state: 'stop-unconfirmed', error: 'EOS_UI_STOP_UNCONFIRMED' }
34551
34720
  : stopRequested ? { state: stopConfirmed ? 'stopped' : 'stopping', error: '' } : runtime._hostedStartup || { state: 'stopped', error: '' }),
34552
- active: started && !stopRequested, emsReady: !stopRequested && runtime._hostedStartup?.state === 'ready' && runtime._nwIsEmsReady(), canWrite: guardedBridge.canWrite() === true }; },
34721
+ active: started && !stopRequested, emsReady: !stopRequested && runtime._hostedStartup?.state === 'ready' && runtime._nwIsEmsReady(), canWrite: guardedBridge.canWrite() === true,
34722
+ ocppDiscovery: runtime._ocppAutoDiscovery?.status() || { state: 'idle', error: '', ts: 0, stations: [] } }; },
34553
34723
  stop() {
34554
34724
  if (!stopping) {
34555
34725
  // Sofortige, dauerhafte Sperre vor jedem await und jedem Cleanup-Callback.