iobroker.eos-admin 9.0.17 → 9.0.19

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 (291) hide show
  1. package/NEXOWATT_EOS_BUILD_INFO.json +11 -14
  2. package/README.md +7 -3
  3. package/START_HIER_9.0.18.md +47 -0
  4. package/START_HIER_9.0.19.md +52 -0
  5. package/adminWww/.vite/manifest.json +114 -114
  6. package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +13759 -13759
  7. package/adminWww/assets/{AdapterUpdateDialog-Cpo3dAfY.js → AdapterUpdateDialog-JOf2z4Vg.js} +1 -1
  8. package/adminWww/assets/{Adapters-n2ukPDdC.js → Adapters-C9fcSdWm.js} +1 -1
  9. package/adminWww/assets/{ConfigManager-BVZ6_Ebo.js → ConfigManager-BeeLlT6D.js} +1 -1
  10. package/adminWww/assets/{Enums-CQ6yHG2W.js → Enums-FqnXWl8U.js} +1 -1
  11. package/adminWww/assets/{Fields-CaJqzoW-.js → Fields-DMgrt5Pi.js} +1 -1
  12. package/adminWww/assets/{Files-DfvpKGa3.js → Files-CIHtt12g.js} +1 -1
  13. package/adminWww/assets/{Hosts-3xLBsdG6.js → Hosts-fPLBzvTy.js} +1 -1
  14. package/adminWww/assets/{Instances-B7hKEhyw.js → Instances-4XaVQlrT.js} +1 -1
  15. package/adminWww/assets/{Intro-BV4kYZdT.js → Intro-5TKriiLO.js} +1 -1
  16. package/adminWww/assets/{Logs-DpL9eY69.js → Logs-33zcIds-.js} +1 -1
  17. package/adminWww/assets/{Objects-dN06jhQk.js → Objects-CNQPVbNG.js} +1 -1
  18. package/adminWww/assets/{Overview-Lip63_ej.js → Overview-BskXGOc8.js} +1 -1
  19. package/adminWww/assets/{State-BSO2X_xN.js → State-C8SJ_Iqo.js} +1 -1
  20. package/adminWww/assets/{UsedResources-DvqzszKI.js → UsedResources-CgqRa9ei.js} +1 -1
  21. package/adminWww/assets/{Users-Csqd1xA-.js → Users-0JVYWR9u.js} +1 -1
  22. package/adminWww/assets/{bootstrap-C3HM8kNL.js → bootstrap-D16lu6rd.js} +3 -3
  23. package/adminWww/assets/{hostInit-DdxBUeXQ.js → hostInit-C8YZJuzi.js} +1 -1
  24. package/adminWww/assets/{icons-material-D1Tb_725.js → icons-material-CiNJ_6Ur.js} +1 -1
  25. package/adminWww/assets/{index-BOujTMyH.js → index-DA9Sphgh.js} +2 -2
  26. package/adminWww/assets/{installSVGRenderer-BZyrUVAo.js → installSVGRenderer-DPdkRa_d.js} +1 -1
  27. package/adminWww/assets/{mf-entry-bootstrap-0-3418586b.js → mf-entry-bootstrap-0-a7ab91de.js} +2 -2
  28. package/adminWww/index.html +23 -23
  29. package/adminWww/mf-manifest.json +1 -1
  30. package/adminWww/mf-stats.json +1 -1
  31. package/adminWww/{remoteEntry-eos-9.0.17.js → remoteEntry-eos-9.0.19.js} +1 -1
  32. package/adminWww/remoteEntry.js +1 -1
  33. package/build/lib/eosCookieNamespace.js +12 -2
  34. package/build/lib/eosCookieNamespace.js.map +1 -1
  35. package/build/lib/eosDeviceEmsPlan.js +1147 -0
  36. package/build/lib/eosDeviceEmsPlan.js.map +1 -0
  37. package/build/lib/eosDeviceEmsService.js +473 -0
  38. package/build/lib/eosDeviceEmsService.js.map +1 -0
  39. package/build/lib/eosModuleHost.js +227 -51
  40. package/build/lib/eosModuleHost.js.map +1 -1
  41. package/build/lib/eosModuleHttp.js +1 -1
  42. package/build/lib/eosModuleHttp.js.map +1 -1
  43. package/build/lib/web.js +31 -0
  44. package/build/lib/web.js.map +1 -1
  45. package/docs/reports/unified-9.0.18/ALIAS_V1_COVERAGE.json +5056 -0
  46. package/docs/reports/unified-9.0.18/ALIAS_V1_VERTRAG.md +257 -0
  47. package/docs/reports/unified-9.0.18/ANFORDERUNGEN.md +55 -0
  48. package/docs/reports/unified-9.0.18/CUSTOMER_TARIFF_REVIEW.md +33 -0
  49. package/docs/reports/unified-9.0.18/GERAETE_EMS_EINRICHTUNG.md +86 -0
  50. package/docs/reports/unified-9.0.18/INSTALLER_LIFECYCLE_REVIEW.md +29 -0
  51. package/docs/reports/unified-9.0.18/KUNDENTARIF_EINRICHTUNG.md +27 -0
  52. package/docs/reports/unified-9.0.18/PRUEFBERICHT.md +87 -0
  53. package/docs/reports/unified-9.0.18/UNABHAENGIGER_REVIEW.md +63 -0
  54. package/docs/reports/unified-9.0.18/raw/INDEX.json +331 -0
  55. package/docs/reports/unified-9.0.18/raw/audit-full.log +345 -0
  56. package/docs/reports/unified-9.0.18/raw/audit-full.result.json +14 -0
  57. package/docs/reports/unified-9.0.18/raw/audit-runtime.log +23 -0
  58. package/docs/reports/unified-9.0.18/raw/audit-runtime.result.json +15 -0
  59. package/docs/reports/unified-9.0.18/raw/backend-final.log +5 -0
  60. package/docs/reports/unified-9.0.18/raw/backend-final.result.json +14 -0
  61. package/docs/reports/unified-9.0.18/raw/frontend-build.log +152 -0
  62. package/docs/reports/unified-9.0.18/raw/frontend-build.result.json +14 -0
  63. package/docs/reports/unified-9.0.18/raw/installer-build.log +26 -0
  64. package/docs/reports/unified-9.0.18/raw/installer-build.result.json +14 -0
  65. package/docs/reports/unified-9.0.18/raw/keygen-source.json +6 -0
  66. package/docs/reports/unified-9.0.18/raw/lint-final.log +5 -0
  67. package/docs/reports/unified-9.0.18/raw/lint-final.result.json +14 -0
  68. package/docs/reports/unified-9.0.18/raw/modules-build.log +5 -0
  69. package/docs/reports/unified-9.0.18/raw/modules-build.result.json +14 -0
  70. package/docs/reports/unified-9.0.18/raw/node22-tests-final.log +9859 -0
  71. package/docs/reports/unified-9.0.18/raw/node22-tests-final.result.json +13 -0
  72. package/docs/reports/unified-9.0.18/raw/node22-typecheck-final.log +7 -0
  73. package/docs/reports/unified-9.0.18/raw/node22-typecheck-final.result.json +14 -0
  74. package/docs/reports/unified-9.0.18/raw/node22-version.log +1 -0
  75. package/docs/reports/unified-9.0.18/raw/node24-tests-final.log +1663 -0
  76. package/docs/reports/unified-9.0.18/raw/node24-tests-final.result.json +13 -0
  77. package/docs/reports/unified-9.0.18/raw/node24-typecheck-final.log +5 -0
  78. package/docs/reports/unified-9.0.18/raw/node24-typecheck-final.result.json +14 -0
  79. package/docs/reports/unified-9.0.18/raw/node24-version.log +1 -0
  80. package/docs/reports/unified-9.0.18/raw/sbom-runtime.log +7 -0
  81. package/docs/reports/unified-9.0.18/raw/sbom-runtime.result.json +14 -0
  82. package/docs/reports/unified-9.0.18/raw/sbom-vendor-check.log +1 -0
  83. package/docs/reports/unified-9.0.18/raw/sbom-vendor-check.result.json +14 -0
  84. package/docs/reports/unified-9.0.18/raw/ui-docs-check.log +6 -0
  85. package/docs/reports/unified-9.0.18/raw/ui-docs-check.result.json +14 -0
  86. package/docs/reports/unified-9.0.18/raw/ui-runtime-final.log +7 -0
  87. package/docs/reports/unified-9.0.18/raw/ui-runtime-final.result.json +14 -0
  88. package/docs/reports/unified-9.0.18/raw/ui-runtime-sync.log +6 -0
  89. package/docs/reports/unified-9.0.18/raw/ui-runtime-sync.result.json +14 -0
  90. package/docs/reports/unified-9.0.18/raw/ui-sbom-check.log +6 -0
  91. package/docs/reports/unified-9.0.18/raw/ui-sbom-check.result.json +14 -0
  92. package/docs/reports/unified-9.0.18/raw/ui-sbom-final.log +14 -0
  93. package/docs/reports/unified-9.0.18/raw/ui-sbom-final.result.json +14 -0
  94. package/docs/reports/unified-9.0.18/raw/ui-secret-final.log +6 -0
  95. package/docs/reports/unified-9.0.18/raw/ui-secret-final.result.json +14 -0
  96. package/docs/reports/unified-9.0.18/raw/ui-security-final.log +8 -0
  97. package/docs/reports/unified-9.0.18/raw/ui-security-final.result.json +14 -0
  98. package/docs/reports/unified-9.0.19/ALIAS_MESSWERTFRISCHE.md +31 -0
  99. package/docs/reports/unified-9.0.19/COMMISSIONING_PLAN_REVIEW.md +56 -0
  100. package/docs/reports/unified-9.0.19/EMS_ABSCHLUSSREVIEW.md +43 -0
  101. package/docs/reports/unified-9.0.19/EMS_KATEGORIEN_ABDECKUNG.md +66 -0
  102. package/docs/reports/unified-9.0.19/EMS_VERGLEICH_UND_KOPPLUNG.md +25 -0
  103. package/docs/reports/unified-9.0.19/EVCS_STATE_OBJECTS.md +47 -0
  104. package/docs/reports/unified-9.0.19/GERAETE_EMS_EINRICHTUNG.md +100 -0
  105. package/docs/reports/unified-9.0.19/GERAETE_STARTAUSFALL.md +37 -0
  106. package/docs/reports/unified-9.0.19/INSTALLER_LIFECYCLE_REVIEW.md +59 -0
  107. package/docs/reports/unified-9.0.19/LEGACY_REGRESSION_REVIEW.md +42 -0
  108. package/docs/reports/unified-9.0.19/MODBUS_AUTHORIZATION_READS.md +25 -0
  109. package/docs/reports/unified-9.0.19/PRUEFBERICHT.md +56 -0
  110. package/docs/reports/unified-9.0.19/RUNTIME_START_UEBERNAHME.md +33 -0
  111. package/docs/reports/unified-9.0.19/SMA_RECEIVER_LIFECYCLE.md +42 -0
  112. package/docs/reports/unified-9.0.19/STATIC_REVIEW_DE.md +11 -0
  113. package/docs/reports/unified-9.0.19/TARIFF_PRICE_VALUES_REVIEW.md +31 -0
  114. package/docs/reports/unified-9.0.19/TARIF_VIERTELSTUNDEN_RUNTIME.md +17 -0
  115. package/docs/reports/unified-9.0.19/UNABHAENGIGER_REVIEW.md +49 -0
  116. package/docs/reports/unified-9.0.19/raw/INDEX.json +751 -0
  117. package/docs/reports/unified-9.0.19/raw/audit-full.log +345 -0
  118. package/docs/reports/unified-9.0.19/raw/audit-full.result.json +14 -0
  119. package/docs/reports/unified-9.0.19/raw/audit-runtime.log +23 -0
  120. package/docs/reports/unified-9.0.19/raw/audit-runtime.result.json +15 -0
  121. package/docs/reports/unified-9.0.19/raw/backend-final.log +5 -0
  122. package/docs/reports/unified-9.0.19/raw/backend-final.result.json +14 -0
  123. package/docs/reports/unified-9.0.19/raw/devices-hosted-typecheck-node22.log +0 -0
  124. package/docs/reports/unified-9.0.19/raw/devices-hosted-typecheck-node22.result.json +15 -0
  125. package/docs/reports/unified-9.0.19/raw/devices-hosted-typecheck-node24.log +0 -0
  126. package/docs/reports/unified-9.0.19/raw/devices-hosted-typecheck-node24.result.json +15 -0
  127. package/docs/reports/unified-9.0.19/raw/devices-incident-build.log +5 -0
  128. package/docs/reports/unified-9.0.19/raw/devices-incident-host-final.log +70 -0
  129. package/docs/reports/unified-9.0.19/raw/devices-incident-lease-918-before.log +26 -0
  130. package/docs/reports/unified-9.0.19/raw/devices-incident-lease-after.log +9 -0
  131. package/docs/reports/unified-9.0.19/raw/devices-incident-metadata-after.log +11 -0
  132. package/docs/reports/unified-9.0.19/raw/devices-incident-metadata-before.log +28 -0
  133. package/docs/reports/unified-9.0.19/raw/devices-incident-web-pipeline.log +22 -0
  134. package/docs/reports/unified-9.0.19/raw/frontend-build.log +152 -0
  135. package/docs/reports/unified-9.0.19/raw/frontend-build.result.json +14 -0
  136. package/docs/reports/unified-9.0.19/raw/installer-build.log +26 -0
  137. package/docs/reports/unified-9.0.19/raw/installer-build.result.json +14 -0
  138. package/docs/reports/unified-9.0.19/raw/keygen-source.json +6 -0
  139. package/docs/reports/unified-9.0.19/raw/legacy-auto-pv.log +6 -0
  140. package/docs/reports/unified-9.0.19/raw/legacy-auto-pv.result.json +14 -0
  141. package/docs/reports/unified-9.0.19/raw/legacy-charging-grid-cap-clamp.log +6 -0
  142. package/docs/reports/unified-9.0.19/raw/legacy-charging-grid-cap-clamp.result.json +14 -0
  143. package/docs/reports/unified-9.0.19/raw/legacy-charging-grid-cap-safe.log +6 -0
  144. package/docs/reports/unified-9.0.19/raw/legacy-charging-grid-cap-safe.result.json +14 -0
  145. package/docs/reports/unified-9.0.19/raw/legacy-charging-mode-recovery.log +539 -0
  146. package/docs/reports/unified-9.0.19/raw/legacy-charging-mode-recovery.result.json +14 -0
  147. package/docs/reports/unified-9.0.19/raw/legacy-core-limits-phase1.log +6 -0
  148. package/docs/reports/unified-9.0.19/raw/legacy-core-limits-phase1.result.json +14 -0
  149. package/docs/reports/unified-9.0.19/raw/legacy-core-limits-phase2.log +6 -0
  150. package/docs/reports/unified-9.0.19/raw/legacy-core-limits-phase2.result.json +14 -0
  151. package/docs/reports/unified-9.0.19/raw/legacy-core-limits-tariff-final.log +6 -0
  152. package/docs/reports/unified-9.0.19/raw/legacy-core-limits-tariff-final.result.json +14 -0
  153. package/docs/reports/unified-9.0.19/raw/legacy-energy-wallet-final.log +6 -0
  154. package/docs/reports/unified-9.0.19/raw/legacy-energy-wallet-final.result.json +14 -0
  155. package/docs/reports/unified-9.0.19/raw/legacy-farm-dispatch-loader-current.log +2 -0
  156. package/docs/reports/unified-9.0.19/raw/legacy-farm-dispatch-loader-current.result.json +14 -0
  157. package/docs/reports/unified-9.0.19/raw/legacy-final-write-envelope.log +6 -0
  158. package/docs/reports/unified-9.0.19/raw/legacy-final-write-envelope.result.json +14 -0
  159. package/docs/reports/unified-9.0.19/raw/legacy-history-http.log +39 -0
  160. package/docs/reports/unified-9.0.19/raw/legacy-history-http.result.json +15 -0
  161. package/docs/reports/unified-9.0.19/raw/legacy-import-grid-budget.log +30 -0
  162. package/docs/reports/unified-9.0.19/raw/legacy-import-grid-budget.result.json +14 -0
  163. package/docs/reports/unified-9.0.19/raw/legacy-import-grid-contract-current.log +2 -0
  164. package/docs/reports/unified-9.0.19/raw/legacy-import-grid-contract-current.result.json +14 -0
  165. package/docs/reports/unified-9.0.19/raw/legacy-live-mode-loader-current.log +203 -0
  166. package/docs/reports/unified-9.0.19/raw/legacy-live-mode-loader-current.result.json +14 -0
  167. package/docs/reports/unified-9.0.19/raw/legacy-load-grid-sanity.log +6 -0
  168. package/docs/reports/unified-9.0.19/raw/legacy-load-grid-sanity.result.json +14 -0
  169. package/docs/reports/unified-9.0.19/raw/legacy-ocpp-stability.log +6 -0
  170. package/docs/reports/unified-9.0.19/raw/legacy-ocpp-stability.result.json +14 -0
  171. package/docs/reports/unified-9.0.19/raw/legacy-ocpp21-storage-safety.log +6 -0
  172. package/docs/reports/unified-9.0.19/raw/legacy-ocpp21-storage-safety.result.json +14 -0
  173. package/docs/reports/unified-9.0.19/raw/legacy-permanent-grid-protection.log +18 -0
  174. package/docs/reports/unified-9.0.19/raw/legacy-permanent-grid-protection.result.json +14 -0
  175. package/docs/reports/unified-9.0.19/raw/legacy-storage-dp-persistence.log +6 -0
  176. package/docs/reports/unified-9.0.19/raw/legacy-storage-dp-persistence.result.json +14 -0
  177. package/docs/reports/unified-9.0.19/raw/legacy-storage-farm-dispatch-recovery.log +16 -0
  178. package/docs/reports/unified-9.0.19/raw/legacy-storage-farm-dispatch-recovery.result.json +14 -0
  179. package/docs/reports/unified-9.0.19/raw/legacy-storage-functional-safety.log +6 -0
  180. package/docs/reports/unified-9.0.19/raw/legacy-storage-functional-safety.result.json +14 -0
  181. package/docs/reports/unified-9.0.19/raw/legacy-storage-topology-loader-current.log +2 -0
  182. package/docs/reports/unified-9.0.19/raw/legacy-storage-topology-loader-current.result.json +14 -0
  183. package/docs/reports/unified-9.0.19/raw/legacy-test-loader.cjs +47 -0
  184. package/docs/reports/unified-9.0.19/raw/lint-final.log +16 -0
  185. package/docs/reports/unified-9.0.19/raw/lint-final.result.json +14 -0
  186. package/docs/reports/unified-9.0.19/raw/modules-build.log +5 -0
  187. package/docs/reports/unified-9.0.19/raw/modules-build.result.json +14 -0
  188. package/docs/reports/unified-9.0.19/raw/node22-tests-final.log +10719 -0
  189. package/docs/reports/unified-9.0.19/raw/node22-tests-final.result.json +13 -0
  190. package/docs/reports/unified-9.0.19/raw/node22-typecheck-final.log +7 -0
  191. package/docs/reports/unified-9.0.19/raw/node22-typecheck-final.result.json +14 -0
  192. package/docs/reports/unified-9.0.19/raw/node22-version.log +1 -0
  193. package/docs/reports/unified-9.0.19/raw/node24-tests-final.log +1805 -0
  194. package/docs/reports/unified-9.0.19/raw/node24-tests-final.result.json +13 -0
  195. package/docs/reports/unified-9.0.19/raw/node24-typecheck-final.log +5 -0
  196. package/docs/reports/unified-9.0.19/raw/node24-typecheck-final.result.json +14 -0
  197. package/docs/reports/unified-9.0.19/raw/node24-version.log +1 -0
  198. package/docs/reports/unified-9.0.19/raw/sbom-runtime.log +7 -0
  199. package/docs/reports/unified-9.0.19/raw/sbom-runtime.result.json +14 -0
  200. package/docs/reports/unified-9.0.19/raw/sbom-vendor-check.log +1 -0
  201. package/docs/reports/unified-9.0.19/raw/sbom-vendor-check.result.json +14 -0
  202. package/docs/reports/unified-9.0.19/raw/tariff-price-chain-919.log +11 -0
  203. package/docs/reports/unified-9.0.19/raw/tariff-price-chain-919.result.json +14 -0
  204. package/docs/reports/unified-9.0.19/raw/tariff-price-chain-old-918.log +68 -0
  205. package/docs/reports/unified-9.0.19/raw/tariff-price-chain-old-918.result.json +14 -0
  206. package/docs/reports/unified-9.0.19/raw/ui-docs-check.log +6 -0
  207. package/docs/reports/unified-9.0.19/raw/ui-docs-check.result.json +14 -0
  208. package/docs/reports/unified-9.0.19/raw/ui-runtime-final.log +7 -0
  209. package/docs/reports/unified-9.0.19/raw/ui-runtime-final.result.json +14 -0
  210. package/docs/reports/unified-9.0.19/raw/ui-runtime-sync.log +6 -0
  211. package/docs/reports/unified-9.0.19/raw/ui-runtime-sync.result.json +14 -0
  212. package/docs/reports/unified-9.0.19/raw/ui-sbom-check.log +6 -0
  213. package/docs/reports/unified-9.0.19/raw/ui-sbom-check.result.json +14 -0
  214. package/docs/reports/unified-9.0.19/raw/ui-sbom-final.log +6 -0
  215. package/docs/reports/unified-9.0.19/raw/ui-sbom-final.result.json +14 -0
  216. package/docs/reports/unified-9.0.19/raw/ui-secret-final.log +6 -0
  217. package/docs/reports/unified-9.0.19/raw/ui-secret-final.result.json +14 -0
  218. package/docs/reports/unified-9.0.19/raw/ui-security-final.log +8 -0
  219. package/docs/reports/unified-9.0.19/raw/ui-security-final.result.json +14 -0
  220. package/io-package.json +12 -12
  221. package/modules/devices/admin/alias-contract-v1.json +189 -0
  222. package/modules/devices/admin/ems-assignment.d.ts +16 -0
  223. package/modules/devices/admin/ems-assignment.js +356 -0
  224. package/modules/devices/admin/host-bridge.js +76 -4
  225. package/modules/devices/admin/index.html +40 -1
  226. package/modules/devices/admin/index_m.js +158 -2
  227. package/modules/devices/admin/style.css +32 -4
  228. package/modules/devices/checks/emsAssignment.check.js +132 -0
  229. package/modules/devices/contracts.d.ts +1 -1
  230. package/modules/devices/eslint.hosted.config.mjs +1 -1
  231. package/modules/devices/index.js +64 -16
  232. package/modules/devices/lib/alias-contract-v1.json +189 -0
  233. package/modules/devices/lib/aliasContract.js +7 -1
  234. package/modules/devices/lib/device-alias-semantics-v1.json +1605 -0
  235. package/modules/devices/lib/deviceAliasFreshness.js +65 -0
  236. package/modules/devices/lib/deviceAliasSemantics.js +109 -0
  237. package/modules/devices/lib/deviceRuntime.js +204 -127
  238. package/modules/devices/lib/drivers/modbus.js +18 -3
  239. package/modules/devices/lib/drivers/speedwire.js +42 -22
  240. package/modules/devices/test/aliasContractV1.test.js +1 -1
  241. package/modules/devices/test/deviceAliasFreshness.test.js +149 -0
  242. package/modules/devices/test/deviceAliasSemantics.test.js +163 -0
  243. package/modules/devices/test/emsAssignmentUi.test.js +298 -0
  244. package/modules/devices/test/modbusAuthorizationReads.test.js +112 -0
  245. package/modules/devices/test/runtimeLiveness.test.js +1 -1
  246. package/modules/devices/test/speedwireLifecycle.test.js +118 -0
  247. package/modules/devices/tsconfig.alias-semantics.json +17 -0
  248. package/modules/devices/tsconfig.ems-ui.json +9 -0
  249. package/modules/devices/tsconfig.hosted.json +1 -1
  250. package/package.json +11 -7
  251. package/release-manifests/unified/build-environment.cdx.json +1483 -7370
  252. package/release-manifests/unified/files.json +392 -121
  253. package/release-manifests/unified/frontend.cdx.json +2688 -5952
  254. package/release-manifests/unified/installer.cdx.json +2053 -821
  255. package/release-manifests/unified/obsolete-admin-assets.json +172 -6
  256. package/release-manifests/unified/runtime.cdx.json +40 -3283
  257. package/release-manifests/unified/validation.json +15 -15
  258. package/tools/eos-release-check.cjs +1 -1
  259. package/tools/eos-release-manifest.cjs +5 -5
  260. package/ui/docs/security/eslint-reviewed-findings.json +32 -18
  261. package/ui/ems/datapoints.js +22 -1
  262. package/ui/ems/engine.js +54 -7
  263. package/ui/ems/module-manager.js +44 -21
  264. package/ui/ems/modules/core-limits.js +5 -3
  265. package/ui/ems/modules/energy-wallet.js +31 -32
  266. package/ui/ems/modules/storage-control.js +5 -4
  267. package/ui/ems/modules/tarif-vis.js +36 -24
  268. package/ui/ems/modules/tariff-provider.js +259 -59
  269. package/ui/ems/services/tariff-provider-registry.js +11 -8
  270. package/ui/io-package.json +5 -1
  271. package/ui/lib/customer-tariff.js +245 -0
  272. package/ui/lib/installer-lifecycle.js +220 -0
  273. package/ui/lib/storage-farm-overview.js +115 -0
  274. package/ui/lib/tariff-price.js +115 -0
  275. package/ui/main.js +400 -163
  276. package/ui/package.json +14 -4
  277. package/ui/www/app.js +47 -134
  278. package/ui/www/customer-tariff.css +21 -0
  279. package/ui/www/customer-tariff.js +333 -0
  280. package/ui/www/ems-apps.html +2 -0
  281. package/ui/www/ems-apps.js +29 -7
  282. package/ui/www/index.html +2 -0
  283. package/ui/www/licenses/smarthome-markdown-components.json +156 -156
  284. package/ui/www/manifest.webmanifest +2 -2
  285. package/ui/www/power-measurements.js +62 -0
  286. package/ui/www/settings.html +47 -0
  287. package/ui/www/storagefarm-summary.css +17 -0
  288. package/ui/www/storagefarm-summary.js +136 -0
  289. package/ui/www/storagefarm.html +16 -1
  290. package/ui/www/storagefarm.js +10 -22
  291. package/ui/www/tariff-display.js +161 -0
@@ -7,7 +7,7 @@
7
7
  * AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
8
8
  *
9
9
  * Quelle: src-ts/runtime-executables/ems/module-manager.ts
10
- * Quell-Hash: sha256:6747d170f616bff498e7501e2bc0d12ab6d7c00efa383074a803222b59248b70
10
+ * Quell-Hash: sha256:382f3613b2f3099328fb22e4e23b7e5a1298519fa774d5fbb4c0a228bbd50f57
11
11
  * Erzeugung: npm run sync:ts-runtime-executables
12
12
  *
13
13
  * Zweck:
@@ -156,6 +156,7 @@ class ModuleManager {
156
156
  * @param {*} dpRegistry
157
157
  */
158
158
  constructor(adapter, dpRegistry) {
159
+ this._pendingModuleWork = new Set();
159
160
  this.adapter = adapter;
160
161
  this.dp = dpRegistry || null;
161
162
  /** @type {Array<{key: string, instance: any, enabledFn: () => boolean}>} */
@@ -308,6 +309,19 @@ class ModuleManager {
308
309
  maxLen = 20000;
309
310
  return s.length > maxLen ? (s.slice(0, maxLen) + '...') : s;
310
311
  }
312
+ /** Behält auch bereits zeitüberschrittene Modulaufträge bis zum echten Ende.
313
+ * Der äußere Watchdog darf sie melden, aber eine Rekonfiguration darf danach
314
+ * keinen zweiten Regler auf denselben Aktor starten. */
315
+ _trackModuleWork(work) {
316
+ const task = Promise.resolve().then(work);
317
+ const settlement = task.then(() => undefined, () => undefined);
318
+ this._pendingModuleWork.add(settlement);
319
+ void settlement.then(() => { this._pendingModuleWork.delete(settlement); });
320
+ return task;
321
+ }
322
+ async waitForPendingWork() {
323
+ await Promise.all([...this._pendingModuleWork]);
324
+ }
311
325
  /**
312
326
  * Initialisiert ein Modul genau einmal, bevor dessen erster Regel-Tick laeuft.
313
327
  * AppCenter-Aenderungen koennen enabledFn zur Laufzeit von false auf true setzen;
@@ -851,7 +865,7 @@ class ModuleManager {
851
865
  // must not freeze the complete EMS scheduler. The helper also
852
866
  // deduplicates unresolved work so no Promise pile-up can grow the
853
867
  // V8 heap on every one-second cycle.
854
- const isolated = await (0, rc85_runtime_hardening_1.rc85RunIsolatedResult)(`ems-module:${key}`, timeoutMs, () => withActuatorShadowContext(this.adapter, { owner: key, module: key, priority: priorityForOwner(key), reason: 'module-tick', cycleId: this._tickCount, leaseMs: 15000 }, () => m.instance.tick()), this.adapter?.log || console);
868
+ const isolated = await (0, rc85_runtime_hardening_1.rc85RunIsolatedResult)(`ems-module:${key}`, timeoutMs, () => this._trackModuleWork(() => withActuatorShadowContext(this.adapter, { owner: key, module: key, priority: priorityForOwner(key), reason: 'module-tick', cycleId: this._tickCount, leaseMs: 15000 }, () => m.instance.tick())), this.adapter?.log || console);
855
869
  if (!isolated.ok) {
856
870
  const prefix = isolated.timedOut
857
871
  ? 'module-timeout'
@@ -970,29 +984,38 @@ class ModuleManager {
970
984
  * Ablauf und Zusammenhang: Beendet Module und Laufzeitüberwachung. Wird von der Engine beim Stoppen aufgerufen, damit Modul-Timer und weitere Hintergrundarbeit nicht fortlaufen.
971
985
  */
972
986
  stop() {
973
- try {
974
- this._nvpTopologyModule?.stop?.();
975
- }
976
- catch (_error) { }
977
- this._nvpTopologyModule = undefined;
978
- try {
979
- this._stopHeapMonitor?.();
980
- }
981
- catch (_error) { }
982
- this._stopHeapMonitor = undefined;
983
- try {
984
- (0, rc85_runtime_hardening_1.rc88ClearRuntimeHardening)();
985
- }
986
- catch (_error) { }
987
- for (const m of this.modules || []) {
987
+ if (this._stopCompletion)
988
+ return;
989
+ const pending = [];
990
+ const stopOne = (stop) => {
991
+ if (!stop)
992
+ return;
988
993
  try {
989
- if (m && m.instance && typeof m.instance.stop === 'function')
990
- m.instance.stop();
994
+ pending.push(Promise.resolve(stop()));
991
995
  }
992
- catch (_e) {
993
- // Ein fehlerhaftes Modul darf den restlichen Shutdown nicht blockieren.
996
+ catch (error) {
997
+ pending.push(Promise.reject(error));
994
998
  }
999
+ };
1000
+ stopOne(this._nvpTopologyModule?.stop?.bind(this._nvpTopologyModule));
1001
+ this._nvpTopologyModule = undefined;
1002
+ stopOne(this._stopHeapMonitor);
1003
+ this._stopHeapMonitor = undefined;
1004
+ stopOne(() => (0, rc85_runtime_hardening_1.rc88ClearRuntimeHardening)());
1005
+ for (const row of this.modules || []) {
1006
+ const instance = row.instance;
1007
+ if (instance && typeof instance.stop === 'function')
1008
+ stopOne(() => instance.stop());
995
1009
  }
1010
+ // Every rejection is observed even when adapter unload cannot await us.
1011
+ this._stopCompletion = Promise.allSettled(pending);
1012
+ }
1013
+ /** Nur ein vollständig beendeter alter Modulbestand darf ersetzt werden. */
1014
+ async stopAndWait() {
1015
+ this.stop();
1016
+ const results = await this._stopCompletion;
1017
+ if (results?.some(result => result.status === 'rejected'))
1018
+ throw new Error('EOS_EMS_MODULE_STOP_FAILED');
996
1019
  }
997
1020
  }
998
1021
  module.exports = { ModuleManager };
@@ -7,7 +7,7 @@
7
7
  * AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
8
8
  *
9
9
  * Quelle: src-ts/runtime-executables/ems/modules/core-limits.ts
10
- * Quell-Hash: sha256:245a633b0b8591a297e405248b478bc27436d953606cc4fd317aa85b76f27501
10
+ * Quell-Hash: sha256:1b7a9c9b7f69a644713610de9afd141a124b8af89ed993c0aa5f0f9e463e61e9
11
11
  * Erzeugung: npm run sync:ts-runtime-executables
12
12
  *
13
13
  * Zweck:
@@ -72,6 +72,7 @@
72
72
  */
73
73
 
74
74
  'use strict';
75
+ const { readTariffPriceState } = require('../../lib/tariff-price');
75
76
 
76
77
 
77
78
  /**
@@ -2948,10 +2949,11 @@ class CoreLimitsModule extends BaseModule {
2948
2949
 
2949
2950
  const tariffActive = await readStateBool(this.adapter, 'tarif.aktiv', false);
2950
2951
  const tariffState = await readStateString(this.adapter, 'tarif.state', '');
2951
- const tariffCurrentPrice = await readStateNumber(this.adapter, 'tarif.preisAktuellEurProKwh', null);
2952
+ const tariffCurrentPriceFresh = await readStateBool(this.adapter, 'tarif.currentPriceFresh', null);
2953
+ const tariffCurrentPrice = tariffCurrentPriceFresh === false ? null : await readTariffPriceState(this.adapter, 'tarif.preisAktuellEurProKwh');
2952
2954
  const tariffNegativeActive = await readStateBool(this.adapter, 'tarif.negativpreisAktiv', false);
2953
2955
  const tariffGridImportPreferred = await readStateBool(this.adapter, 'tarif.netzbezugBevorzugt', tariffNegativeActive);
2954
- const tariffNegativeMinPrice = await readStateNumber(this.adapter, 'tarif.negativPreisMinEurProKwh', null);
2956
+ const tariffNegativeMinPrice = await readTariffPriceState(this.adapter, 'tarif.negativPreisMinEurProKwh');
2955
2957
  const tariffNextNegativeFrom = await readStateString(this.adapter, 'tarif.naechstesNegativVon', '');
2956
2958
  const tariffNextNegativeTo = await readStateString(this.adapter, 'tarif.naechstesNegativBis', '');
2957
2959
  const tariffStatus = await readStateString(this.adapter, 'tarif.negativpreisStatus', '');
@@ -7,7 +7,7 @@
7
7
  * AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
8
8
  *
9
9
  * Quelle: src-ts/runtime-executables/ems/modules/energy-wallet.ts
10
- * Quell-Hash: sha256:1629e8483f74a54c179ef86821aaa37e90a2b71ad1a3ad246ad38c4c9241e65e
10
+ * Quell-Hash: sha256:0b1e11b104246e2b2e8584deb7d80d7ca353f61d2d770f1136eef413d04ffb69
11
11
  * Erzeugung: npm run sync:ts-runtime-executables
12
12
  *
13
13
  * Zweck:
@@ -72,6 +72,7 @@
72
72
  */
73
73
  'use strict';
74
74
  const { BaseModule } = require('./base');
75
+ const { tariffPriceNumber } = require('../../lib/tariff-price');
75
76
  function num(v, fallback = null) {
76
77
  const n = Number(v);
77
78
  return Number.isFinite(n) ? n : fallback;
@@ -106,13 +107,13 @@ function yearKeyLocal(date = new Date()) {
106
107
  return String(date.getFullYear());
107
108
  }
108
109
 
109
- function normalizePriceEurPerKwh(value, fallback) {
110
- const n = num(value, fallback);
110
+ function normalizePriceEurPerKwh(value, fallback, explicitEur = false) {
111
+ const n = tariffPriceNumber(value);
111
112
  if (!Number.isFinite(n)) return fallback;
112
113
  const abs = Math.abs(n);
113
114
  // Installer geben Preise häufig in ct/kWh ein. Werte >2 und <=500 interpretieren wir als ct/kWh.
114
- const eur = abs > 2 && abs <= 500 ? n / 100 : n;
115
- if (!Number.isFinite(eur) || eur < -2 || eur > 5) return fallback;
115
+ const eur = !explicitEur && abs > 2 && abs <= 500 ? n / 100 : n;
116
+ if (!Number.isFinite(eur) || (explicitEur ? Math.abs(eur) > 100 : eur < -2 || eur > 5)) return fallback;
116
117
  return eur;
117
118
  }
118
119
 
@@ -415,37 +416,34 @@ class EnergyWalletModule extends BaseModule {
415
416
  const rec = this._cacheEntry(key);
416
417
  if (!rec) continue;
417
418
  const raw = rec && typeof rec === 'object' && Object.prototype.hasOwnProperty.call(rec, 'value') ? rec.value : rec;
418
- const n = Number(raw);
419
- if (Number.isFinite(n)) return n;
419
+ const n = tariffPriceNumber(raw);
420
+ if (n !== null) return n;
420
421
  }
421
422
  return fallback;
422
423
  }
423
424
 
424
425
 
425
- _readStateCandidate(keys) {
426
- // 0.8.24: Für dynamische Tarifpreise reicht der Zahlenwert allein nicht mehr.
427
- // Das Wertkonto muss auch wissen, welcher State verwendet wurde und wie alt der
428
- // Preis ist. Nur so kann die LIVE-Karte eine nachvollziehbare Preisquelle zeigen
429
- // und ein alter Zeittarif sauber auf den festen Preis zurückfallen.
426
+ _readStateCandidate(keys, maxAgeSec = 7200) {
427
+ // A missing derived budget price must not hide a real current provider price.
428
+ // Inspect every candidate's own timestamp; retain a stale candidate only for
429
+ // diagnosis after all fresher fallbacks have been considered.
430
430
  const list = Array.isArray(keys) ? keys : [keys];
431
431
  const now = Date.now();
432
+ let staleCandidate = null;
432
433
  for (const key of list) {
433
- const rec = this._cacheEntry(key);
434
- if (!rec) continue;
434
+ const cached = this.adapter?.stateCache && Object.prototype.hasOwnProperty.call(this.adapter.stateCache, key) ? Reflect.get(this.adapter.stateCache, key) : null;
435
+ const rec = cached && typeof cached === 'object' && !Array.isArray(cached) ? cached : null;
436
+ if (!rec || (rec.q !== undefined && rec.q !== 0)) continue;
435
437
  const raw = rec && typeof rec === 'object' && Object.prototype.hasOwnProperty.call(rec, 'value') ? rec.value : rec;
436
- const n = Number(raw);
437
- if (!Number.isFinite(n)) continue;
438
- const tsRaw = rec && typeof rec === 'object' ? Number(rec.ts || rec.lc || 0) : 0;
439
- const ts = Number.isFinite(tsRaw) && tsRaw > 0 ? tsRaw : now;
440
- return {
441
- found: true,
442
- key: String(key),
443
- value: n,
444
- ts,
445
- ageSec: Math.max(0, Math.round((now - ts) / 1000)),
446
- };
438
+ const n = tariffPriceNumber(raw);
439
+ if (n === null) continue;
440
+ const ts = typeof rec.ts === 'number' ? rec.ts : null;
441
+ if (ts === null || !Number.isFinite(ts) || ts <= 0 || ts > now + 1000) continue;
442
+ const candidate = { found: true, key: String(key), value: n, ts, ageSec: Math.max(0, Math.round((now - ts) / 1000)) };
443
+ if (candidate.ageSec <= maxAgeSec) return candidate;
444
+ if (!staleCandidate) staleCandidate = candidate;
447
445
  }
448
- return { found: false, key: '', value: null, ts: 0, ageSec: 0 };
446
+ return staleCandidate || { found: false, key: '', value: null, ts: 0, ageSec: 0 };
449
447
  }
450
448
 
451
449
 
@@ -611,6 +609,8 @@ class EnergyWalletModule extends BaseModule {
611
609
  // - Quelle, Alter und Fallback-Grund werden veröffentlicht, damit Nutzerkarte und
612
610
  // Installateurdiagnose nicht dieselbe Warnsprache verwenden müssen.
613
611
  const dynamicTariffActive = this._readStateBool(['settings.dynamicTariff', 'dynamicTariff'], false);
612
+ const maxAgeSecRaw = cfg.dynamicTariffMaxAgeSec !== undefined ? Number(cfg.dynamicTariffMaxAgeSec) : 7200;
613
+ const maxAgeSec = Math.round(clamp(Number.isFinite(maxAgeSecRaw) ? maxAgeSecRaw : 7200, 60, 86400));
614
614
  const tariffCandidate = this._readStateCandidate([
615
615
  'ems.budget.tariff.currentPriceEurKwh',
616
616
  'tarif.preisAktuellEurProKwh',
@@ -618,12 +618,11 @@ class EnergyWalletModule extends BaseModule {
618
618
  'priceCurrent',
619
619
  'tarif.priceCurrent',
620
620
  'tariff.priceCurrent',
621
- ]);
622
- const tariffNow = tariffCandidate.found ? normalizePriceEurPerKwh(tariffCandidate.value, null) : null;
623
- const maxAgeSecRaw = cfg.dynamicTariffMaxAgeSec !== undefined ? Number(cfg.dynamicTariffMaxAgeSec) : 7200;
624
- const maxAgeSec = Math.round(clamp(Number.isFinite(maxAgeSecRaw) ? maxAgeSecRaw : 7200, 60, 86400));
625
- const tariffFinite = Number.isFinite(Number(tariffNow));
626
- const tariffFresh = tariffFinite && (!tariffCandidate.found || tariffCandidate.ageSec <= maxAgeSec);
621
+ ], maxAgeSec);
622
+ const canonicalEurPrice = ['ems.budget.tariff.currentPriceEurKwh', 'tarif.preisAktuellEurProKwh', 'historie.tariff.providerCurrentEurPerKwh'].includes(tariffCandidate.key);
623
+ const tariffNow = tariffCandidate.found ? normalizePriceEurPerKwh(tariffCandidate.value, null, canonicalEurPrice) : null;
624
+ const tariffFinite = tariffCandidate.found && typeof tariffNow === 'number' && Number.isFinite(tariffNow);
625
+ const tariffFresh = tariffFinite && tariffCandidate.ageSec <= maxAgeSec;
627
626
  const dynamicTariffAvailable = dynamicTariffActive && tariffFinite && tariffFresh;
628
627
 
629
628
  const fixedInput = this._readStateNumber([
@@ -7,7 +7,7 @@
7
7
  * AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
8
8
  *
9
9
  * Quelle: src-ts/runtime-executables/ems/modules/storage-control.ts
10
- * Quell-Hash: sha256:e485ef1fdbbbf90d33adf49bdd1a17e97e7f216a39072dc3a0e6437e294d9397
10
+ * Quell-Hash: sha256:e8d44e13782e130773163c03326564b675e324cdd0783367adaf10f6c232f9d8
11
11
  * Erzeugung: npm run sync:ts-runtime-executables
12
12
  *
13
13
  * Zweck:
@@ -8188,9 +8188,10 @@ const _prevRampW = (typeof this._lastTargetW === 'number' && Number.isFinite(thi
8188
8188
  const appsRoot = (rootCfg.emsApps && typeof rootCfg.emsApps === 'object') ? rootCfg.emsApps : {};
8189
8189
  const apps = (appsRoot.apps && typeof appsRoot.apps === 'object') ? appsRoot.apps : {};
8190
8190
  const singleApp = (apps.storage && typeof apps.storage === 'object') ? apps.storage : null;
8191
- const singleAppActive = singleApp
8191
+ const deviceAssignmentDisabled = rootCfg.storage?._eosDevice?.v === 1 && rootCfg.storage?.enabled === false;
8192
+ const singleAppActive = !deviceAssignmentDisabled && (singleApp
8192
8193
  ? (singleApp.installed === true && singleApp.enabled === true)
8193
- : (rootCfg.enableStorageControl === true);
8194
+ : (rootCfg.enableStorageControl === true));
8194
8195
 
8195
8196
  const farm = (this.adapter && typeof this.adapter._nwGetStorageFarmRuntimeInfo === 'function')
8196
8197
  ? this.adapter._nwGetStorageFarmRuntimeInfo()
@@ -8280,7 +8281,7 @@ const _prevRampW = (typeof this._lastTargetW === 'number' && Number.isFinite(thi
8280
8281
  ? (app.installed === true && app.enabled === true)
8281
8282
  : (rootCfg.enableStorageFarm === true);
8282
8283
 
8283
- return !!(enabledByConfig && configuredCount >= 2);
8284
+ return !!(enabledByConfig && configuredCount >= 1);
8284
8285
  } catch {
8285
8286
  return false;
8286
8287
  }
@@ -7,7 +7,7 @@
7
7
  * AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
8
8
  *
9
9
  * Quelle: src-ts/runtime-executables/ems/modules/tarif-vis.ts
10
- * Quell-Hash: sha256:7a0b446a14f63ca7c3f3354f677cf7e86027f0114634e6014c3c6689bdc48110
10
+ * Quell-Hash: sha256:2059a2f9ed5bc8d2350a4885ae37d34153bc6825549fc50d562d59470c5d9ace
11
11
  * Erzeugung: npm run sync:ts-runtime-executables
12
12
  *
13
13
  * Zweck:
@@ -74,6 +74,7 @@
74
74
  'use strict';
75
75
 
76
76
  const { BaseModule } = require('./base');
77
+ const { tariffPriceUnit, normalizeTariffPrice } = require('../../lib/tariff-price');
77
78
 
78
79
  /**
79
80
  * Speicher-Netzladen ist strikt an einen frischen, aktiven und als „günstig“
@@ -528,22 +529,28 @@ class TarifVisModule extends BaseModule {
528
529
  * Zusammenhang: Gehört zu EMS-Modul (Regelungs-, Diagnose- oder Beratungslogik innerhalb der EMS-Engine) und wird von benachbarten UI-/API-/EMS-Bausteinen genutzt.
529
530
  * Wartung/TypeScript: Änderungen an Signatur oder Rückgabe können abhängige Aufrufer beeinflussen; Aufrufstellen mitprüfen. Beim TS-Umbau Parameter, Rückgabe und genutzte State-/Config-Objekte explizit typisieren.
530
531
  */
531
- _normalizePriceEurPerKwh(v, fallback = null) {
532
- // Normalizes either €/kWh or ct/kWh into €/kWh.
533
- // Heuristic: values with |v| > 2 are interpreted as ct/kWh (common sources: 31.5, 40, ...).
534
- let n = (typeof v === 'number') ? v : this._num(v, fallback);
535
- if (!Number.isFinite(n)) return fallback;
536
-
537
- // Auto-convert ct/kWh -> €/kWh
538
- const abs = Math.abs(n);
539
- if (abs > 2 && abs <= 500) {
540
- n = n / 100;
541
- }
542
-
543
- // Plausibility (allow small negative prices)
544
- if (!Number.isFinite(n) || n < -2 || n > 2) return fallback;
545
- return n;
546
- }
532
+ _normalizePriceEurPerKwh(v, fallback = null, unit = 'auto') {
533
+ // Preserve the established locale parser, but never interpret status values as money.
534
+ if (typeof v !== 'number' && typeof v !== 'string') return fallback;
535
+ const parsed = this._num(v, null);
536
+ const value = normalizeTariffPrice(parsed, tariffPriceUnit(unit));
537
+ return value === null ? fallback : value;
538
+ }
539
+
540
+ /** Preis-Einheit aus dem tatsächlichen Mapping: eigene Provider-DPs sind EUR/kWh.
541
+ * Manuelle Einheiten bleiben erhalten; nicht typisierte Legacy-Quellen nutzen Auto. */
542
+ _priceInputUnit(key, field, providerSuffix) {
543
+ const entry = this.dp && typeof this.dp.getEntry === 'function' ? this.dp.getEntry(key) : null;
544
+ if (entry?.objectId === `${this.adapter.namespace}.tariffProvider.${providerSuffix}`) return 'EUR/kWh';
545
+ const units = this.adapter?.config?.units || {};
546
+ const configured = field === 'priceCurrent' ? units.priceCurrent : field === 'priceAverage' ? units.priceAverage
547
+ : field === 'priceTodayJson' ? units.priceTodayJson : field === 'priceTomorrowJson' ? units.priceTomorrowJson : '';
548
+ for (const candidate of [configured, entry?.unitIn, entry?.unit]) {
549
+ const unit = tariffPriceUnit(candidate);
550
+ if (unit !== 'auto') return unit;
551
+ }
552
+ return 'auto';
553
+ }
547
554
 
548
555
  /**
549
556
  * Code-Teil: Methode `_parsePriceCurve`
@@ -557,7 +564,7 @@ class TarifVisModule extends BaseModule {
557
564
  * Zusammenhang: Teil von EMS-Modul: Regelung, Diagnose oder Beratung; Aufrufstellen und abhängige States/APIs beim Ändern mitprüfen.
558
565
  * TypeScript: Parameter, Rückgabewert und verwendete Config-/State-Objekte später explizit typisieren.
559
566
  */
560
- _parsePriceCurve(raw) {
567
+ _parsePriceCurve(raw, unit = 'auto') {
561
568
  // Accepts either a JSON string or already-parsed array/object.
562
569
  // Expected (tibber-like) schema: [{ total: 0.318, startsAt: "...", endsAt: "..." }, ...]
563
570
  if (raw === null || raw === undefined) return [];
@@ -629,7 +636,7 @@ class TarifVisModule extends BaseModule {
629
636
  continue;
630
637
  }
631
638
  const raw = (typeof it === 'number') ? it : Number(String(it).trim());
632
- const priceEurKwh = this._normalizePriceEurPerKwh(raw, null);
639
+ const priceEurKwh = this._normalizePriceEurPerKwh(raw, null, unit);
633
640
  if (!Number.isFinite(priceEurKwh)) {
634
641
  idx++;
635
642
  continue;
@@ -662,7 +669,12 @@ class TarifVisModule extends BaseModule {
662
669
  else if (it.price.value !== undefined) pRaw = it.price.value;
663
670
  }
664
671
 
665
- const price = this._normalizePriceEurPerKwh(pRaw, null);
672
+ // The normalized provider/Tibber contract is already EUR/kWh. Explicit
673
+ // units still take precedence for manually mapped structured curves.
674
+ const rowUnit = tariffPriceUnit(it.unit);
675
+ const curveUnit = unit !== 'auto' ? unit : rowUnit !== 'auto' ? rowUnit
676
+ : (typeof it.total === 'number' && typeof it.startsAt === 'string' && it.currency === 'EUR') ? 'EUR/kWh' : 'auto';
677
+ const price = this._normalizePriceEurPerKwh(pRaw, null, curveUnit);
666
678
  if (typeof price !== 'number' || !Number.isFinite(price)) continue;
667
679
 
668
680
  // Time field heuristics
@@ -1098,7 +1110,7 @@ class TarifVisModule extends BaseModule {
1098
1110
  const currentPriceDirectFresh = currentPriceAgeMs === null || currentPriceAgeMs === undefined || currentPriceAgeMs <= currentPriceMaxAgeMs;
1099
1111
  if (this.dp && typeof this.dp.getEntry === 'function' && this.dp.getEntry('tarif.preisAktuellEurProKwh')) {
1100
1112
  const raw = this.dp.getNumberFresh('tarif.preisAktuellEurProKwh', currentPriceMaxAgeMs, null);
1101
- preisAktuell = this._normalizePriceEurPerKwh(raw, null);
1113
+ preisAktuell = this._normalizePriceEurPerKwh(raw, null, this._priceInputUnit('tarif.preisAktuellEurProKwh', 'priceCurrent', 'currentPriceEurPerKwh'));
1102
1114
  if (typeof preisAktuell === 'number' && Number.isFinite(preisAktuell)) preisAktuellSource = 'provider-current';
1103
1115
  }
1104
1116
 
@@ -1108,7 +1120,7 @@ class TarifVisModule extends BaseModule {
1108
1120
  : null;
1109
1121
  if (this.dp && typeof this.dp.getEntry === 'function' && this.dp.getEntry('tarif.preisDurchschnittEurProKwh')) {
1110
1122
  const raw = this.dp.getNumberFresh('tarif.preisDurchschnittEurProKwh', averagePriceMaxAgeMs, null);
1111
- preisDurchschnitt = this._normalizePriceEurPerKwh(raw, null);
1123
+ preisDurchschnitt = this._normalizePriceEurPerKwh(raw, null, this._priceInputUnit('tarif.preisDurchschnittEurProKwh', 'priceAverage', 'averagePriceEurPerKwh'));
1112
1124
  }
1113
1125
 
1114
1126
  const preisVisOk = (typeof preisGrenzeVis === 'number' && Number.isFinite(preisGrenzeVis));
@@ -1164,8 +1176,8 @@ class TarifVisModule extends BaseModule {
1164
1176
  ? this.dp.getRaw('tarif.pricesTomorrowJson')
1165
1177
  : null;
1166
1178
 
1167
- const todayArr = this._parsePriceCurve(rawToday);
1168
- const tomorrowArr = this._parsePriceCurve(rawTomorrow);
1179
+ const todayArr = this._parsePriceCurve(rawToday, this._priceInputUnit('tarif.pricesTodayJson', 'priceTodayJson', 'pricesTodayJson'));
1180
+ const tomorrowArr = this._parsePriceCurve(rawTomorrow, this._priceInputUnit('tarif.pricesTomorrowJson', 'priceTomorrowJson', 'pricesTomorrowJson'));
1169
1181
 
1170
1182
  const all = [...todayArr, ...tomorrowArr]
1171
1183
  .filter(x => x && Number.isFinite(x.startMs) && Number.isFinite(x.endMs) && Number.isFinite(x.priceEurKwh))