iobroker.eos-admin 9.0.34 → 9.0.35

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 (165) hide show
  1. package/NEXOWATT_EOS_BUILD_INFO.json +13 -10
  2. package/README.md +10 -4
  3. package/adminWww/.vite/manifest.json +39 -39
  4. package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +107 -107
  5. package/adminWww/assets/{AdapterUpdateDialog-5L75o18m.js → AdapterUpdateDialog-DH6S-kWX.js} +1 -1
  6. package/adminWww/assets/{Adapters-FcghjF7E.js → Adapters-CIlqSF5B.js} +1 -1
  7. package/adminWww/assets/{ConfigManager-BnHarBfH.js → ConfigManager-BhVBfM-q.js} +1 -1
  8. package/adminWww/assets/{Enums-BjLbLLQL.js → Enums-3H97czGs.js} +1 -1
  9. package/adminWww/assets/{Fields-DDE1hVOa.js → Fields-vWLKiuvO.js} +1 -1
  10. package/adminWww/assets/{Files-CDjnR4q6.js → Files-wmjjMXYM.js} +1 -1
  11. package/adminWww/assets/{Hosts-CJKQaNrD.js → Hosts-Bk-xmI98.js} +1 -1
  12. package/adminWww/assets/{Instances-DZNl369k.js → Instances-Db6Vgh62.js} +1 -1
  13. package/adminWww/assets/{Intro-CjAmMGDB.js → Intro-Dc3wAG9V.js} +1 -1
  14. package/adminWww/assets/{Logs-rUAV7SwM.js → Logs-CPbEGWNq.js} +1 -1
  15. package/adminWww/assets/{Objects-CqOH6rT_.js → Objects-DJB-2468.js} +1 -1
  16. package/adminWww/assets/{Overview-BOtXqsMy.js → Overview-DdvghCLQ.js} +1 -1
  17. package/adminWww/assets/{State-C8ncThop.js → State-0UzpgKYj.js} +1 -1
  18. package/adminWww/assets/{UsedResources-lUYJqy4F.js → UsedResources-Bcmo58YD.js} +1 -1
  19. package/adminWww/assets/{Users-CK1Cax82.js → Users-BGHf3Rox.js} +1 -1
  20. package/adminWww/assets/{bootstrap-CC0Qr-kr.js → bootstrap-qkrk_CAn.js} +3 -3
  21. package/adminWww/assets/{hostInit-DqGL6nY8.js → hostInit-DlGqatlv.js} +1 -1
  22. package/adminWww/assets/{icons-material-07rWS63O.js → icons-material-CUNq6tdT.js} +1 -1
  23. package/adminWww/assets/{index-BhhkToP2.js → index-BrtKq3UN.js} +2 -2
  24. package/adminWww/assets/{installSVGRenderer-B4-7lSQZ.js → installSVGRenderer-DujLjpXt.js} +1 -1
  25. package/adminWww/assets/{mf-entry-bootstrap-0-1afd2287.js → mf-entry-bootstrap-0-3e1cd85c.js} +2 -2
  26. package/adminWww/index.html +23 -23
  27. package/adminWww/mf-manifest.json +1 -1
  28. package/adminWww/mf-stats.json +1 -1
  29. package/adminWww/remoteEntry-eos-9.0.35.js +12 -0
  30. package/adminWww/remoteEntry.js +1 -1
  31. package/build/lib/eosDashboardProcessStatus.js +191 -0
  32. package/build/lib/eosDashboardProcessStatus.js.map +1 -0
  33. package/build/lib/eosKiosk.js +1 -0
  34. package/build/lib/eosKiosk.js.map +1 -1
  35. package/build/lib/eosModuleHost.js +17 -6
  36. package/build/lib/eosModuleHost.js.map +1 -1
  37. package/build/lib/eosModuleHttp.js +18 -3
  38. package/build/lib/eosModuleHttp.js.map +1 -1
  39. package/build/lib/eosModuleProcess.js +17 -0
  40. package/build/lib/eosModuleProcess.js.map +1 -1
  41. package/build/lib/eosModuleProcessWorker.js +22 -1
  42. package/build/lib/eosModuleProcessWorker.js.map +1 -1
  43. package/build/lib/eosRuntimeControl.js +6 -0
  44. package/build/lib/eosRuntimeControl.js.map +1 -1
  45. package/build/lib/eosRuntimeHealth.js +50 -1
  46. package/build/lib/eosRuntimeHealth.js.map +1 -1
  47. package/build/lib/eosSupervisorNotifications.js +169 -0
  48. package/build/lib/eosSupervisorNotifications.js.map +1 -0
  49. package/build/lib/eosUiProcess.js +1 -0
  50. package/build/lib/eosUiProcess.js.map +1 -1
  51. package/build/lib/web.js +5 -0
  52. package/build/lib/web.js.map +1 -1
  53. package/docs/README.md +1 -0
  54. package/docs/reports/unified-9.0.35/PRUEFBERICHT.md +51 -0
  55. package/docs/reports/unified-9.0.35/PRUEFERGEBNISSE.json +112 -0
  56. package/docs/reports/unified-9.0.35/raw/INDEX.json +282 -0
  57. package/docs/reports/unified-9.0.35/raw/backend.log +5 -0
  58. package/docs/reports/unified-9.0.35/raw/browser-lp-detail.log +1 -0
  59. package/docs/reports/unified-9.0.35/raw/browser-lp-feedback.log +1 -0
  60. package/docs/reports/unified-9.0.35/raw/cold-ocpp-22.log +108 -0
  61. package/docs/reports/unified-9.0.35/raw/cold-ocpp-24.log +24 -0
  62. package/docs/reports/unified-9.0.35/raw/core-final-node22.log +1439 -0
  63. package/docs/reports/unified-9.0.35/raw/core-final-node24.log +1381 -0
  64. package/docs/reports/unified-9.0.35/raw/dashboard-de-en-nl.json +716 -0
  65. package/docs/reports/unified-9.0.35/raw/device-chain-closed-fixed.json +98 -0
  66. package/docs/reports/unified-9.0.35/raw/device-chain-rst-fixed.json +98 -0
  67. package/docs/reports/unified-9.0.35/raw/device-chain.json +93 -0
  68. package/docs/reports/unified-9.0.35/raw/ee-fusion-final.log +12 -0
  69. package/docs/reports/unified-9.0.35/raw/eebus-monitor-browser.json +1 -0
  70. package/docs/reports/unified-9.0.35/raw/eebus-monitor-node22.log +206 -0
  71. package/docs/reports/unified-9.0.35/raw/eebus-monitor-node24.log +39 -0
  72. package/docs/reports/unified-9.0.35/raw/fixtures-verification.log +44 -0
  73. package/docs/reports/unified-9.0.35/raw/frontend.log +152 -0
  74. package/docs/reports/unified-9.0.35/raw/installer.log +26 -0
  75. package/docs/reports/unified-9.0.35/raw/legacy-mail-setup-browser.log +1 -0
  76. package/docs/reports/unified-9.0.35/raw/lint.log +45 -0
  77. package/docs/reports/unified-9.0.35/raw/live-ems-loss.log +10 -0
  78. package/docs/reports/unified-9.0.35/raw/modules.log +5 -0
  79. package/docs/reports/unified-9.0.35/raw/node22-mira-reconnect-integrity.log +452 -0
  80. package/docs/reports/unified-9.0.35/raw/node22-mira.log +222 -0
  81. package/docs/reports/unified-9.0.35/raw/node22-system-status.log +213 -0
  82. package/docs/reports/unified-9.0.35/raw/node22-tests-final.log +18137 -0
  83. package/docs/reports/unified-9.0.35/raw/node22-version.log +1 -0
  84. package/docs/reports/unified-9.0.35/raw/node24-mira-reconnect-integrity.log +79 -0
  85. package/docs/reports/unified-9.0.35/raw/node24-mira.log +41 -0
  86. package/docs/reports/unified-9.0.35/raw/node24-system-status.log +40 -0
  87. package/docs/reports/unified-9.0.35/raw/node24-tests-final.log +3019 -0
  88. package/docs/reports/unified-9.0.35/raw/node24-version.log +1 -0
  89. package/docs/reports/unified-9.0.35/raw/notifications-legacy-node22.log +1 -0
  90. package/docs/reports/unified-9.0.35/raw/notifications-legacy-node24.log +1 -0
  91. package/docs/reports/unified-9.0.35/raw/notifications-node22.log +67 -0
  92. package/docs/reports/unified-9.0.35/raw/notifications-node24.log +17 -0
  93. package/docs/reports/unified-9.0.35/raw/npm-runtime-audit.json +77 -0
  94. package/docs/reports/unified-9.0.35/raw/ocpp-dashboard-stations-node22.log +110 -0
  95. package/docs/reports/unified-9.0.35/raw/ocpp-dashboard-stations-node24.log +106 -0
  96. package/docs/reports/unified-9.0.35/raw/ocpp-history-node22.log +561 -0
  97. package/docs/reports/unified-9.0.35/raw/ocpp-history-node24.log +98 -0
  98. package/docs/reports/unified-9.0.35/raw/poll-life-node22.log +38 -0
  99. package/docs/reports/unified-9.0.35/raw/poll-life-node24.log +12 -0
  100. package/docs/reports/unified-9.0.35/raw/qa-source-check.log +2 -0
  101. package/docs/reports/unified-9.0.35/raw/release-metadata.log +13 -0
  102. package/docs/reports/unified-9.0.35/raw/sbom.log +8 -0
  103. package/docs/reports/unified-9.0.35/raw/typecheck.log +5 -0
  104. package/docs/reports/unified-9.0.35/raw/ui-runtime.log +8 -0
  105. package/docs/reports/unified-9.0.35/raw/vergleich-9.0.33.json +29 -0
  106. package/docs/reports/unified-9.0.35/raw/vergleich-9.0.34.json +249 -0
  107. package/docs/reports/unified-9.0.35/raw/vorher-9.0.33-chromium.json +286 -0
  108. package/docs/reports/unified-9.0.35/raw/vorher-9.0.34-chromium.json +291 -0
  109. package/docs/start/START_HIER_9.0.35.md +27 -0
  110. package/io-package.json +8 -8
  111. package/modules/devices/contracts.d.ts +1 -0
  112. package/modules/devices/index.js +20 -1
  113. package/modules/devices/lib/deviceRuntime.js +19 -0
  114. package/modules/devices/lib/drivers/modbus.js +11 -6
  115. package/modules/devices/lib/drivers/ovumMira.js +7 -3
  116. package/modules/devices/test/ovumMiraTransport.test.js +40 -1
  117. package/modules/eebus/README.md +8 -0
  118. package/modules/eebus/admin/index.js +29 -2
  119. package/modules/eebus/build/index.js +28 -3
  120. package/modules/eebus/build/lib/eebusRuntime.js +17 -2
  121. package/modules/eebus/build/lib/partnerMonitor.js +160 -0
  122. package/modules/eebus/build/lib/shipEndpoint.js +4 -0
  123. package/modules/eebus/build/lib/stateDefinitions.js +1 -0
  124. package/modules/eebus/src/index.ts +23 -3
  125. package/modules/eebus/src/lib/eebusRuntime.ts +20 -2
  126. package/modules/eebus/src/lib/partnerMonitor.ts +127 -0
  127. package/modules/eebus/src/lib/shipEndpoint.ts +5 -0
  128. package/modules/eebus/src/lib/stateDefinitions.ts +1 -0
  129. package/modules/eebus/test/partner-monitor.test.js +82 -0
  130. package/modules/eebus/test/security.test.js +17 -0
  131. package/modules/ocpp/README.md +9 -1
  132. package/modules/ocpp/build/index.js +137 -10
  133. package/modules/ocpp/build/stationHistory.js +113 -0
  134. package/modules/ocpp/ocpp/freshness.d.ts +3 -0
  135. package/modules/ocpp/ocpp/freshness.js +6 -0
  136. package/modules/ocpp/provenance.json +3 -2
  137. package/modules/ocpp/runtime.d.ts +1 -0
  138. package/modules/ocpp/runtime.js +23 -1
  139. package/modules/ocpp/src/index.ts +163 -12
  140. package/modules/ocpp/src/stationHistory.ts +119 -0
  141. package/modules/ocpp/test/hosted.test.cjs +161 -0
  142. package/package.json +7 -5
  143. package/release-manifests/unified/build-environment.cdx.json +6 -6
  144. package/release-manifests/unified/files.json +220 -140
  145. package/release-manifests/unified/frontend.cdx.json +6 -6
  146. package/release-manifests/unified/installer.cdx.json +6 -6
  147. package/release-manifests/unified/obsolete-admin-assets.json +83 -0
  148. package/release-manifests/unified/runtime.cdx.json +30 -30
  149. package/release-manifests/unified/validation.json +15 -15
  150. package/tools/eos-release-manifest.cjs +1 -1
  151. package/ui/io-package.json +5 -1
  152. package/ui/lib/notification-mail.js +235 -40
  153. package/ui/lib/notification-policy.js +41 -14
  154. package/ui/package.json +2 -1
  155. package/ui/www/app.js +91 -11
  156. package/ui/www/dashboard-lp-status.js +4 -11
  157. package/ui/www/dashboard-process-status.js +202 -0
  158. package/ui/www/i18n/en.json +23 -0
  159. package/ui/www/i18n/nl.json +20 -0
  160. package/ui/www/index.html +10 -5
  161. package/ui/www/live-display.js +101 -9
  162. package/ui/www/manifest.webmanifest +2 -2
  163. package/ui/www/settings.html +2 -2
  164. package/ui/www/styles.css +4 -0
  165. package/adminWww/remoteEntry-eos-9.0.34.js +0 -12
package/ui/www/app.js CHANGED
@@ -7,7 +7,7 @@
7
7
  * AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
8
8
  *
9
9
  * Quelle: src-ts/runtime-executables/www/app.ts
10
- * Quell-Hash: sha256:8886479238d20c1219eec9882822102510e91d8ab11bd5ea4d1741bff6cec969
10
+ * Quell-Hash: sha256:e59de3872cd83630a187dcdaf065152929e4521d5958a4acc142dc5b79d4ea45
11
11
  * Erzeugung: npm run sync:ts-runtime-executables
12
12
  *
13
13
  * Zweck:
@@ -1881,6 +1881,82 @@ function nwLatestStateTimestamp(keys) {
1881
1881
  }
1882
1882
  return best;
1883
1883
  }
1884
+ // The shared headline has one owner. A repeated SSE snapshot can confirm the
1885
+ // existing connection without resetting an already established operating status.
1886
+ function nwRenderDashboardStatus(connection, health = null, chargeModel = null, safetyStop = false, fallback = false) {
1887
+ const label = document.getElementById('sideStatusText');
1888
+ if (!label) return;
1889
+ const processHealth = window.NexoWattDashboardProcesses?.current();
1890
+ const headline = window.NexoWattLiveDisplay?.dashboardStatus(health, connection, chargeModel, safetyStop, fallback, processHealth);
1891
+ const translate = text => window.NexoWattI18n?.translateText(text) || text;
1892
+ const source = headline ? headline.text : (connection === 'disconnected' ? 'Verbindung unterbrochen' : 'Betriebsstatus prüfen');
1893
+ let message = translate(source);
1894
+ if (headline?.processIds?.length) {
1895
+ const labels = { ui: 'Oberfläche', ems: 'EMS', devices: 'Geräte', eebus: 'EEBus', backup: 'Sicherung', ocpp: 'OCPP' };
1896
+ message = message.replace('{names}', () => headline.processIds.map(id => translate(labels[id])).join(', '));
1897
+ }
1898
+ let detail = '';
1899
+ if (headline?.deviceNames?.length) {
1900
+ const names = headline.deviceNames;
1901
+ const line = translate('Geräte offline · {names}');
1902
+ const format = shown => {
1903
+ const count = headline.totalOffline - shown.length;
1904
+ return line.replace('{names}', () => shown.join(', ') + (count > 0 ? ' (+' + count + ')' : ''));
1905
+ };
1906
+ detail = [message, format(names)].filter(Boolean).join(' · ');
1907
+ message = [message, format(names.slice(0, 2))].filter(Boolean).join(' · ');
1908
+ }
1909
+ if (label.textContent !== message) label.textContent = message;
1910
+ if (label.title !== detail) label.title = detail;
1911
+ const details = document.getElementById('sideStatusDevices');
1912
+ if (details) {
1913
+ const show = headline?.totalOffline > 2;
1914
+ if (details.hidden === show) details.hidden = !show;
1915
+ if (!show && details.open) details.open = false;
1916
+ const names = document.getElementById('sideStatusDeviceNames');
1917
+ const text = show ? headline.deviceNames.join(', ') : '';
1918
+ const remaining = show ? headline.totalOffline - headline.deviceNames.length : 0;
1919
+ const list = remaining > 0 ? text + ' (+' + remaining + ')' : text;
1920
+ if (names && names.textContent !== list) names.textContent = list;
1921
+ }
1922
+ const panel = label.closest?.('.nw-panel-status');
1923
+ if (panel) {
1924
+ const level = headline?.level || (connection === 'disconnected' ? 'error' : 'warn');
1925
+ for (const name of ['error', 'warn', 'info']) {
1926
+ const cls = 'is-' + name;
1927
+ if (panel.classList.contains(cls) !== (level === name)) panel.classList.toggle(cls, level === name);
1928
+ }
1929
+ }
1930
+ }
1931
+
1932
+ // Re-evaluate the banner independently of the ten-second power display. Normal
1933
+ // telemetry does not rebuild the list of charging points or repaint the diagram.
1934
+ function nwRefreshDashboardStatus() {
1935
+ if (!document.getElementById('sideStatusText')) return;
1936
+ const connection = window.__nwFlowConnection || 'connecting';
1937
+ const connected = connection === 'snapshot' || connection === 'ready';
1938
+ if (!connected) { nwRenderDashboardStatus(connection); return; }
1939
+ const values = window.latestState || state || {};
1940
+ const read = key => values[key]?.value;
1941
+ const health = window.NexoWattLiveDisplay?.status(values, true, Date.now(), getFlowFreshMaxAgeMs());
1942
+ const lp = nwEvcsFeatureFromConfig() ? window.NexoWattLpStatusPresenter?.read(read) : null;
1943
+ nwRenderDashboardStatus(connection, health, lp, read('chargingManagement.audit.safetyStage') === 'EOS-SAFETY-STOP',
1944
+ read('para14a.communicationFallbackActive') === true);
1945
+ }
1946
+
1947
+ function nwDashboardAlarmChanged(patch, previous) {
1948
+ for (const key in patch) {
1949
+ if (key !== 'ems.core.schedulerAlive' && key !== 'ems.gridMeasurementFresh' &&
1950
+ key !== 'chargingManagement.audit.safetyStage' && key !== 'para14a.communicationFallbackActive' &&
1951
+ !/^chargingManagement\.wallboxes\.[^.]+\.(?:online|mappingOk|operationalBlocked|hardwareCommandConfirmed|applyStatus)$/.test(key)) continue;
1952
+ const next = patch[key], before = previous[key];
1953
+ if (next?.value !== before?.value || next?.q !== before?.q || next?.ack !== before?.ack) return true;
1954
+ }
1955
+ return false;
1956
+ }
1957
+ window.addEventListener('nexowatt:process-health', nwRefreshDashboardStatus);
1958
+ window.addEventListener('nexowatt:languagechange', nwRefreshDashboardStatus);
1959
+
1884
1960
  /**
1885
1961
  * Code-Teil: nwSetLiveOnline
1886
1962
  * Zweck: Kapselt einen lokalen Verarbeitungsschritt, damit Aufrufer nicht direkt in Detaildaten eingreifen.
@@ -1893,7 +1969,7 @@ function nwSetLiveOnline(isOnline) {
1893
1969
  window.__nwTariffLiveOnline = online;
1894
1970
  if (tariffConnectionChanged) updateEmsControlUi();
1895
1971
  setText('sideConnection', online ? 'Online' : 'Offline');
1896
- setText('sideStatusText', online ? 'Verbindung hergestellt · Betriebsstatus wird geprüft' : 'Verbindung unterbrochen');
1972
+ if (!online) nwRenderDashboardStatus('disconnected');
1897
1973
  const dot = document.getElementById('sideLiveDot');
1898
1974
  if (dot) dot.classList.toggle('is-offline', !online);
1899
1975
  if (!online) {
@@ -1921,8 +1997,8 @@ function updateDashboardShellUi(data) {
1921
1997
  const snap = data || {};
1922
1998
  const d = typeof snap.d === 'function' ? snap.d : ((k) => (window.latestState || state || {})[k]?.value);
1923
1999
 
1924
- const liveDot = document.getElementById('liveDot');
1925
- nwSetLiveOnline(!liveDot || liveDot.classList.contains('live'));
2000
+ const connection = window.__nwFlowConnection || 'connecting';
2001
+ const connected = connection === 'snapshot' || connection === 'ready';
1926
2002
 
1927
2003
  const { pv, buy, sell, load, charge, discharge, soc } = getLiveMeasurementView();
1928
2004
  const batterySigned = charge === null || discharge === null ? null : discharge - charge;
@@ -1936,11 +2012,13 @@ function updateDashboardShellUi(data) {
1936
2012
  setText('sideStorage', Number.isFinite(soc) ? `${Math.round(soc)} %` : '-- %');
1937
2013
  setText('sideBatterySoc', Number.isFinite(soc) ? `${Math.round(soc)} %` : '-- %');
1938
2014
  const p14 = !!d('ems.core.para14aActive') || !!d('para14a.active'), peak = String(d('peakShaving.control.status') || '').trim(), safety = String(d('chargingManagement.audit.safetyStage') || '').trim(), p14Fallback = d('para14a.communicationFallbackActive') === true;
1939
- const health = window.NexoWattLiveDisplay?.status(window.latestState || state || {}, window.__nwTariffLiveOnline !== false, window.__nwLiveFrameNow ?? Date.now(), getFlowFreshMaxAgeMs());
1940
- setText('sideEms', safety === 'EOS-SAFETY-STOP' ? 'Safety aktiv' : health?.ems || 'Status unbekannt');
1941
- setText('sideGridStatus', p14Fallback ? '§14a Fallback' : (p14 ? '§14a aktiv' : (peak === 'active' ? 'Peak aktiv' : health?.grid || 'Messstatus unbekannt')));
1942
- setText('sideStatusText', health?.summary || 'Betriebsstatus unbekannt');
1943
- try { window.NexoWattLpStatusPresenter?.render(d, evcsAvailable); } catch (_eChargingStatus) {}
2015
+ const health = window.NexoWattLiveDisplay?.status(window.latestState || state || {}, connected, window.__nwLiveFrameNow ?? Date.now(), getFlowFreshMaxAgeMs());
2016
+ const safetyStop = connected && safety === 'EOS-SAFETY-STOP';
2017
+ setText('sideEms', connection === 'connecting' ? 'Status unbekannt' : safetyStop ? 'Safety aktiv' : health?.ems || 'Status unbekannt');
2018
+ setText('sideGridStatus', connected && p14Fallback ? '§14a Fallback' : (connected && p14 ? '§14a aktiv' : (connected && peak === 'active' ? 'Peak aktiv' : health?.grid || 'Messstatus unbekannt')));
2019
+ let chargeModel = null;
2020
+ try { chargeModel = window.NexoWattLpStatusPresenter?.render(d, evcsAvailable); } catch (_eChargingStatus) {}
2021
+ nwRenderDashboardStatus(connection, health, chargeModel, safetyStop, p14Fallback);
1944
2022
 
1945
2023
  setText('sideConsumptionTotal', load === null ? '--' : formatFlowPower(Math.max(0, load)));
1946
2024
  setText('sideSelfConsumption', Number.isFinite(selfc) ? `${Math.round(selfc)} %` : '-- %');
@@ -3888,6 +3966,8 @@ const refreshConfig = async () => {
3888
3966
  if (closed || !msg || !msg.payload || typeof msg.payload !== 'object' || Array.isArray(msg.payload)) return;
3889
3967
  const isInitMessage = msg.type === 'init';
3890
3968
  const isUpdateMessage = msg.type === 'update';
3969
+ const firstSnapshot = isInitMessage && !initialized;
3970
+ const statusChanged = isInitMessage || (isUpdateMessage && initialized && nwDashboardAlarmChanged(msg.payload, state));
3891
3971
  if (isInitMessage) {
3892
3972
  if (msg.degraded === true) { reconnect(); return; }
3893
3973
  state = msg.payload;
@@ -3920,8 +4000,8 @@ const refreshConfig = async () => {
3920
4000
  }
3921
4001
  } catch (_e) {}
3922
4002
 
3923
- if (isInitMessage) scheduleLiveTelemetryRender(true);
3924
- else if (isUpdateMessage) scheduleLiveTelemetryRender(false);
4003
+ if (statusChanged) nwRefreshDashboardStatus();
4004
+ scheduleLiveTelemetryRender(firstSnapshot);
3925
4005
  } catch (e) { console.warn(e); }
3926
4006
  };
3927
4007
  } catch (e) {
@@ -7,7 +7,7 @@
7
7
  * AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
8
8
  *
9
9
  * Quelle: src-ts/runtime-executables/www/dashboard-lp-status.ts
10
- * Quell-Hash: sha256:0e130b0d3bcb3fadead101a383a1c59542f94131900508e54f2e0ff0195fa390
10
+ * Quell-Hash: sha256:e4cd09eb097095ed0748ba22534938a94f37e420ec22cf3f1b37f07bd4592fea
11
11
  * Erzeugung: npm run sync:ts-runtime-executables
12
12
  *
13
13
  * Zweck:
@@ -530,13 +530,12 @@
530
530
  const list = document.getElementById('sideEvcsStatusList');
531
531
  const summaryElement = document.getElementById('sideEvcsStatusSummary');
532
532
  const detailsLink = document.getElementById('sideEvcsStatusDetails');
533
- const panel = document.querySelector('.nw-panel-status');
534
- if (!block || !list || !summaryElement)
535
- return null;
536
533
  const model = evcsAvailable ? build(getter) : {
537
534
  items: [], total: 0, chargingCount: 0, errorCount: 0, warningCount: 0, waitingCount: 0,
538
535
  globalSafety: false, paraFallbackActive: false, summary: '', systemText: '', overallLevel: 'ok',
539
536
  };
537
+ if (!block || !list || !summaryElement)
538
+ return model;
540
539
  block.classList.toggle('hidden', !evcsAvailable || model.items.length === 0);
541
540
  const detailsAvailable = evcsAvailable && model.items.length > 1;
542
541
  if (detailsLink) {
@@ -588,17 +587,11 @@
588
587
  else {
589
588
  summaryElement.textContent = text('noPoints');
590
589
  }
591
- panel?.classList.toggle('is-error', model.overallLevel === 'error');
592
- panel?.classList.toggle('is-warn', model.overallLevel === 'warn');
593
- if (evcsAvailable && model.items.length > 0 && model.systemText) {
594
- const statusText = document.getElementById('sideStatusText');
595
- if (statusText)
596
- statusText.textContent = model.systemText;
597
- }
598
590
  return model;
599
591
  }
600
592
  dashboardWindow.NexoWattLpStatusPresenter = Object.freeze({
601
593
  build: (values) => build((key) => values[key]),
594
+ read: build,
602
595
  render,
603
596
  });
604
597
  })();
@@ -0,0 +1,202 @@
1
+ /**
2
+ * Copyright (c) 2026 NexoWatt. All rights reserved.
3
+ * Confidential and Proprietary.
4
+ * Use, modification or distribution without express written permission is prohibited.
5
+ */
6
+ /**
7
+ * AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
8
+ *
9
+ * Quelle: src-ts/runtime-executables/www/dashboard-process-status.ts
10
+ * Quell-Hash: sha256:ebabb70be8b30b9a7eba89e595e8c9ca6197dd6cb7f121c2db137f35025cbfae
11
+ * Erzeugung: npm run sync:ts-runtime-executables
12
+ *
13
+ * Zweck:
14
+ * Diese JavaScript-Datei ist das ausführbare Build-Artefakt für www/dashboard-process-status.js.
15
+ * Die fachliche Bearbeitung erfolgt ab 0.7.131 in der TypeScript-Quelle.
16
+ * Ab 0.7.132 sind doppelte Legacy-JS-Bäume wie .nwcore entfernt.
17
+ *
18
+ * Pflege-Regel:
19
+ * 1. Änderung zuerst in src-ts/runtime-executables/ vornehmen.
20
+ * 2. npm run sync:ts-runtime-executables ausführen.
21
+ * 3. npm run test:runtime-executables prüfen.
22
+ */
23
+ "use strict";
24
+ /** Read the host's public process summary independently of the EMS telemetry stream. */
25
+ (() => {
26
+ const win = window;
27
+ const dashboard = document.querySelector('main.nw-dashboard');
28
+ if (!dashboard || !document.getElementById('sideStatusText') || win.NexoWattDashboardProcesses)
29
+ return;
30
+ const names = ['ui', 'ems', 'devices', 'eebus', 'backup', 'ocpp'];
31
+ const intervalMs = 10000;
32
+ const maxAgeMs = 30000;
33
+ const unknownDevices = Object.freeze({ state: 'unknown', offline: Object.freeze([]), totalOffline: 0 });
34
+ let pageActive = true;
35
+ let ready = document.readyState !== 'loading';
36
+ let sample = null;
37
+ let pending = null;
38
+ let nextStart = 0;
39
+ let pollTimer;
40
+ let abortTimer;
41
+ let expiryTimer;
42
+ function identifiers(value) {
43
+ if (!Array.isArray(value) || value.length > names.length ||
44
+ !value.every(id => names.includes(id)) || new Set(value).size !== value.length)
45
+ return null;
46
+ return Object.freeze(names.filter(id => value.includes(id)));
47
+ }
48
+ function devices(body) {
49
+ if (!body || typeof body !== 'object')
50
+ return unknownDevices;
51
+ const { state, offline, totalOffline } = body;
52
+ if ((state !== 'ok' && state !== 'unknown' && state !== 'fault') ||
53
+ typeof totalOffline !== 'number' || !Number.isSafeInteger(totalOffline) || totalOffline < 0 || totalOffline > 10000 ||
54
+ !Array.isArray(offline) || offline.length > 12 || offline.length > totalOffline ||
55
+ (state === 'fault') !== (totalOffline > 0) || (totalOffline > 0 && offline.length === 0))
56
+ return unknownDevices;
57
+ const names = [];
58
+ for (const row of offline) {
59
+ if (!row || typeof row.name !== 'string' || !row.name.trim() || row.name.length > 64)
60
+ return unknownDevices;
61
+ names.push(Object.freeze({ name: row.name }));
62
+ }
63
+ return Object.freeze({ state, offline: Object.freeze(names), totalOffline });
64
+ }
65
+ function decode(body) {
66
+ if (!body || typeof body !== 'object' || Array.isArray(body))
67
+ return null;
68
+ const row = body;
69
+ const { observedAt, state } = row;
70
+ if (typeof observedAt !== 'number' || !Number.isSafeInteger(observedAt) || observedAt <= 0 ||
71
+ (state !== 'ok' && state !== 'fault' && state !== 'unknown'))
72
+ return null;
73
+ const failed = identifiers(row.failed);
74
+ const paused = identifiers(row.paused);
75
+ if (!failed || !paused || failed.some(id => paused.includes(id)) || (state === 'fault') !== (failed.length > 0))
76
+ return null;
77
+ return { observedAt, state, failed, paused, deviceHealth: devices(row.deviceHealth) };
78
+ }
79
+ function visible() {
80
+ return ready && pageActive && document.visibilityState === 'visible' && !dashboard.hidden && dashboard.style.display !== 'none';
81
+ }
82
+ function age(s) {
83
+ return s.ageMs + Math.max(0, performance.now() - s.receivedTick, Date.now() - s.receivedAt);
84
+ }
85
+ function current() {
86
+ if (!sample)
87
+ return null;
88
+ const ageMs = age(sample);
89
+ return ageMs < maxAgeMs ? { ...sample.value, observedAt: Math.floor(Date.now() - ageMs) } : null;
90
+ }
91
+ function notify() { window.dispatchEvent(new Event('nexowatt:process-health')); }
92
+ function forget() {
93
+ window.clearTimeout(expiryTimer);
94
+ if (sample) {
95
+ sample = null;
96
+ notify();
97
+ }
98
+ }
99
+ function setExpiry() {
100
+ window.clearTimeout(expiryTimer);
101
+ if (!sample)
102
+ return;
103
+ const remaining = maxAgeMs - age(sample);
104
+ if (remaining <= 0)
105
+ forget();
106
+ else
107
+ expiryTimer = window.setTimeout(setExpiry, Math.ceil(remaining));
108
+ }
109
+ function accept(value, serverDate, started) {
110
+ const now = Date.now();
111
+ const tick = performance.now();
112
+ // HTTP Date has one-second precision. Bound the possible observation age,
113
+ // also accounting for time spent receiving the response over a slow link.
114
+ const headerMs = Date.parse(serverDate || '');
115
+ const remoteNow = Number.isFinite(headerMs) ? headerMs + 999 : now;
116
+ const delta = remoteNow - value.observedAt;
117
+ const ageMs = Math.max(0, delta) + (tick - started);
118
+ if (delta < -5000 || ageMs >= maxAgeMs)
119
+ return;
120
+ const previous = current();
121
+ if (previous && sample && value.observedAt <= sample.value.observedAt)
122
+ return;
123
+ sample = { value, receivedAt: now, receivedTick: tick, ageMs };
124
+ setExpiry();
125
+ if (!previous || previous.state !== value.state || previous.failed.join() !== value.failed.join() ||
126
+ previous.paused.join() !== value.paused.join() || JSON.stringify(previous.deviceHealth) !== JSON.stringify(value.deviceHealth))
127
+ notify();
128
+ }
129
+ function schedule() {
130
+ window.clearTimeout(pollTimer);
131
+ if (visible() && !pending)
132
+ pollTimer = window.setTimeout(poll, Math.max(0, nextStart - performance.now()));
133
+ }
134
+ function cancelRequest() {
135
+ window.clearTimeout(abortTimer);
136
+ const controller = pending;
137
+ pending = null;
138
+ controller?.abort();
139
+ }
140
+ async function poll() {
141
+ if (!visible() || pending)
142
+ return;
143
+ const started = performance.now();
144
+ nextStart = started + intervalMs;
145
+ const controller = new AbortController();
146
+ pending = controller;
147
+ abortTimer = window.setTimeout(() => {
148
+ if (pending === controller) {
149
+ cancelRequest();
150
+ schedule();
151
+ }
152
+ }, 4000);
153
+ try {
154
+ const path = '/api/eos/dashboard/process-status';
155
+ const url = new URL(win.NW_RUNTIME?.url(path) ?? path, window.location.href);
156
+ if (url.origin !== window.location.origin || url.username || url.password)
157
+ return;
158
+ const res = await window.fetch(url.href, { credentials: 'same-origin', cache: 'no-store',
159
+ redirect: 'error', signal: controller.signal });
160
+ if (pending !== controller || !visible())
161
+ return;
162
+ if (res.status === 401 || res.status === 403) {
163
+ forget();
164
+ return;
165
+ }
166
+ if (!res.ok)
167
+ return;
168
+ const value = decode(await res.json());
169
+ if (pending === controller && visible() && value)
170
+ accept(value, res.headers.get('Date'), started);
171
+ }
172
+ catch { /* A transport failure leaves the last confirmed observation valid only until its original expiry. */ }
173
+ finally {
174
+ if (pending === controller) {
175
+ window.clearTimeout(abortTimer);
176
+ pending = null;
177
+ schedule();
178
+ }
179
+ }
180
+ }
181
+ function sync() {
182
+ if (visible()) {
183
+ setExpiry();
184
+ schedule();
185
+ }
186
+ else {
187
+ window.clearTimeout(pollTimer);
188
+ window.clearTimeout(expiryTimer);
189
+ cancelRequest();
190
+ }
191
+ }
192
+ win.NexoWattDashboardProcesses = Object.freeze({ current });
193
+ const tab = new MutationObserver(sync);
194
+ tab.observe(dashboard, { attributes: true, attributeFilter: ['style', 'hidden'] });
195
+ document.addEventListener('visibilitychange', sync);
196
+ window.addEventListener('pagehide', () => { pageActive = false; sync(); });
197
+ window.addEventListener('pageshow', () => { pageActive = true; sync(); });
198
+ if (!ready)
199
+ document.addEventListener('DOMContentLoaded', () => { ready = true; sync(); }, { once: true });
200
+ else
201
+ sync();
202
+ })();
@@ -11,6 +11,29 @@
11
11
  "Aktivieren, wenn der kumulierte Ladeenergie-DP Wh liefert. NexoWatt teilt den Wert durch 1000 und führt ihn intern in kWh.": "Enable this when the cumulative charging-energy data point provides Wh. NexoWatt divides the value by 1000 and processes it internally as kWh."
12
12
  },
13
13
  "text": {
14
+ "Betroffene Geräte": "Affected devices",
15
+ "System, Adapter und EOS-Prozesse": "System, adapters and EOS processes",
16
+ "Kommunikationsausfälle von Geräten und Ladestationen": "Device and charging station communication failures",
17
+ "Verbinde…": "Connecting…",
18
+ "Verbindung unterbrochen": "Connection lost",
19
+ "Alle Systeme normal": "All systems normal",
20
+ "Sicherheitsstopp aktiv": "Safety stop active",
21
+ "EMS gestoppt": "EMS stopped",
22
+ "EMS pausiert": "EMS paused",
23
+ "Betriebsstatus prüfen": "Check operating status",
24
+ "Netzmessung fehlt oder ist veraltet": "Grid measurement missing or stale",
25
+ "§14a-Kommunikationsfallback aktiv": "§14a communication fallback active",
26
+ "Prozessstatus unbekannt": "Process status unknown",
27
+ "Gerätestatus unbekannt": "Device status unknown",
28
+ "Geräte offline · {names}": "Devices offline · {names}",
29
+ "Prozess gestört · {names}": "Process fault · {names}",
30
+ "Live-Verbindung unterbrochen · Prozess gestört: {names}": "Live connection lost · Process fault: {names}",
31
+ "Sicherheitsstopp aktiv · Prozess gestört: {names}": "Safety stop active · Process fault: {names}",
32
+ "Oberfläche": "User interface",
33
+ "Geräte": "Devices",
34
+ "Sicherung": "Backup",
35
+ "Messstatus unbekannt": "Measurement status unknown",
36
+ "Status unbekannt": "Status unknown",
14
37
  "BILANZ": "LEDGER",
15
38
  "Fahrzeug/Ladevorgang aktiv (lesen, optional)": "Vehicle/charging session active (read-only, optional)",
16
39
  "Status / CP-Zustand (lesen, optional)": "Status / CP state (read-only, optional)",
@@ -24,6 +24,26 @@
24
24
  "Aktivieren, wenn der kumulierte Ladeenergie-DP Wh liefert. NexoWatt teilt den Wert durch 1000 und führt ihn intern in kWh.": "Activeren wanneer het cumulatieve laadenergie-datapunt Wh levert. NexoWatt deelt de waarde door 1000 en verwerkt deze intern in kWh."
25
25
  },
26
26
  "text": {
27
+ "Betroffene Geräte": "Betrokken apparaten",
28
+ "System, Adapter und EOS-Prozesse": "Systeem, adapters en EOS-processen",
29
+ "Kommunikationsausfälle von Geräten und Ladestationen": "Verbindingsstoringen van apparaten en laadstations",
30
+ "Verbindung unterbrochen": "Verbinding verbroken",
31
+ "Sicherheitsstopp aktiv": "Veiligheidsstop actief",
32
+ "EMS gestoppt": "EMS gestopt",
33
+ "EMS pausiert": "EMS gepauzeerd",
34
+ "Betriebsstatus prüfen": "Bedrijfsstatus controleren",
35
+ "Netzmessung fehlt oder ist veraltet": "Netmeting ontbreekt of is verouderd",
36
+ "§14a-Kommunikationsfallback aktiv": "§14a-communicatieterugval actief",
37
+ "Prozessstatus unbekannt": "Processtatus onbekend",
38
+ "Gerätestatus unbekannt": "Apparaatstatus onbekend",
39
+ "Geräte offline · {names}": "Apparaten offline · {names}",
40
+ "Prozess gestört · {names}": "Processtoring · {names}",
41
+ "Live-Verbindung unterbrochen · Prozess gestört: {names}": "Liveverbinding verbroken · Processtoring: {names}",
42
+ "Sicherheitsstopp aktiv · Prozess gestört: {names}": "Veiligheidsstop actief · Processtoring: {names}",
43
+ "Oberfläche": "Gebruikersinterface",
44
+ "Sicherung": "Back-up",
45
+ "Messstatus unbekannt": "Meetstatus onbekend",
46
+ "Status unbekannt": "Status onbekend",
27
47
  "Menu": "Menu",
28
48
  "Einstellungen": "Instellingen",
29
49
  "Einstellungen öffnen": "Instellingen openen",
package/ui/www/index.html CHANGED
@@ -78,12 +78,16 @@
78
78
  <!-- Abschnitt: Hauptinhalt der Seite. DOM-IDs in diesem Bereich werden durch zugehörige JS-Dateien befüllt. -->
79
79
  <main class="content nw-dashboard">
80
80
  <aside class="nw-dashboard-rail nw-dashboard-left" aria-label="System- und Liveübersicht">
81
- <section class="card nw-panel nw-panel-status">
81
+ <section class="card nw-panel nw-panel-status is-warn">
82
82
  <div class="nw-panel-title">
83
83
  <span class="nw-panel-icon">🛡️</span>
84
84
  <span>Systemstatus</span>
85
85
  </div>
86
- <div class="nw-system-ok" id="sideStatusText">Alle Systeme normal</div>
86
+ <div class="nw-system-ok" id="sideStatusText" role="status" aria-atomic="true">Verbinde…</div>
87
+ <details id="sideStatusDevices" hidden>
88
+ <summary>Betroffene Geräte</summary>
89
+ <span id="sideStatusDeviceNames"></span>
90
+ </details>
87
91
  <div class="nw-status-list">
88
92
  <div class="nw-status-row">
89
93
  <span class="nw-status-icon">📶</span>
@@ -91,7 +95,7 @@
91
95
  </div>
92
96
  <div class="nw-status-row">
93
97
  <span class="nw-status-icon">⚙️</span>
94
- <span><b>EMS</b><small id="sideEms">Aktiv</small></span>
98
+ <span><b>EMS</b><small id="sideEms">Status unbekannt</small></span>
95
99
  </div>
96
100
  <div class="nw-status-row">
97
101
  <span class="nw-status-icon">🔋</span>
@@ -99,7 +103,7 @@
99
103
  </div>
100
104
  <div class="nw-status-row">
101
105
  <span class="nw-status-icon">🗼</span>
102
- <span><b>Netzstatus</b><small id="sideGridStatus">Stabil</small></span>
106
+ <span><b>Netzstatus</b><small id="sideGridStatus">Messstatus unbekannt</small></span>
103
107
  </div>
104
108
  </div>
105
109
  <div class="nw-evcs-system-block hidden" id="sideEvcsStatusBlock">
@@ -1004,6 +1008,7 @@
1004
1008
  <script src="/static/power-measurements.js"></script>
1005
1009
  <script src="/static/tariff-display.js"></script>
1006
1010
  <script src="/static/live-display.js"></script>
1011
+ <script src="/static/dashboard-process-status.js"></script>
1007
1012
  <script src="/static/app.js"></script>
1008
1013
 
1009
1014
  <!-- Kundeneinstellungen liegen ausschließlich in settings.html. -->
@@ -1015,4 +1020,4 @@
1015
1020
  <script src="/static/cockpit-shell.js"></script>
1016
1021
  <script src="/static/nw-shell.js"></script>
1017
1022
  </body>
1018
- </html>
1023
+ </html>
@@ -7,7 +7,7 @@
7
7
  * AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
8
8
  *
9
9
  * Quelle: src-ts/runtime-executables/www/live-display.ts
10
- * Quell-Hash: sha256:91b95cc8d63fc9c2d8036e465b4c666cacc61482dce5cc7d803659fd89f202f3
10
+ * Quell-Hash: sha256:7adcf233b8ba012cd73ded0882f6519d330d7706c6366742654436483bf07a71
11
11
  * Erzeugung: npm run sync:ts-runtime-executables
12
12
  *
13
13
  * Zweck:
@@ -131,21 +131,113 @@
131
131
  return missing;
132
132
  }
133
133
  }
134
+ const processIds = ['ui', 'ems', 'devices', 'eebus', 'backup', 'ocpp'];
135
+ // Older snapshots omit ack. An explicit unconfirmed value cannot establish operational health.
136
+ function confirmed(row, now, maxAge) {
137
+ return current(row, now, maxAge, true) && (row?.ack === undefined || row.ack === true);
138
+ }
134
139
  function status(snapshot, online, now, gridMaxAge = 30000) {
135
140
  if (!online)
136
- return { ems: 'Verbindung unterbrochen', grid: 'Messstatus unbekannt', summary: 'Verbindung unterbrochen' };
141
+ return { ems: 'Verbindung unterbrochen', grid: 'Messstatus unbekannt', summary: 'Verbindung unterbrochen', phase: 'offline' };
137
142
  const alive = entry(snapshot, 'ems.core.schedulerAlive');
138
- const heartbeat = read(snapshot, 'ems.core.schedulerHeartbeatAt', now, 30000, true);
139
- const running = alive?.value === true && heartbeat !== null && heartbeat > 0 && heartbeat <= now + 5000 && now - heartbeat <= 30000;
140
- const stopped = current(alive, now, 30000, true) && alive?.value === false;
143
+ const beat = entry(snapshot, 'ems.core.schedulerHeartbeatAt');
144
+ const heartbeat = confirmed(beat, now, 30000) ? number(beat?.value) : null;
145
+ const aliveKnown = confirmed(alive, now, 30000);
146
+ const running = aliveKnown && alive?.value === true && heartbeat !== null && heartbeat > 0 && heartbeat <= now + 5000 && now - heartbeat <= 30000;
147
+ const stopped = aliveKnown && alive?.value === false;
141
148
  const nvp = entry(snapshot, 'ems.gridMeasurementFresh');
142
- const gridKnown = current(nvp, now, 30000, true) && typeof nvp?.value === 'boolean';
149
+ const gridKnown = confirmed(nvp, now, 30000) && typeof nvp?.value === 'boolean';
143
150
  const gridFresh = gridKnown && nvp?.value === true;
144
- const gridObserved = !nvp && read(snapshot, 'derived.core.grid.netW', now, gridMaxAge, true) !== null;
151
+ const grid = entry(snapshot, 'derived.core.grid.netW');
152
+ const legacyGrid = record(snapshot) && !Object.hasOwn(snapshot, 'ems.gridMeasurementFresh');
153
+ const gridObserved = legacyGrid && confirmed(grid, now, gridMaxAge) && number(grid?.value) !== null;
154
+ const phase = stopped ? 'stopped' : gridKnown && !gridFresh ? 'grid-unavailable'
155
+ : running && gridFresh ? 'healthy' : 'unknown';
145
156
  return { ems: running ? 'Aktiv' : stopped ? 'Gestoppt' : 'Status unbekannt',
146
157
  grid: gridFresh || gridObserved ? 'Messung aktuell' : gridKnown ? 'Messung fehlt / veraltet' : 'Messstatus unbekannt',
147
- summary: running && gridFresh ? 'EMS aktiv · NVP-Messung aktuell' : stopped ? 'EMS gestoppt' : 'Betriebsstatus prüfen' };
158
+ summary: running && gridFresh ? 'EMS aktiv · NVP-Messung aktuell' : stopped ? 'EMS gestoppt' : 'Betriebsstatus prüfen', phase };
159
+ }
160
+ function validIds(value) {
161
+ return Array.isArray(value) && value.length <= processIds.length &&
162
+ value.every(id => typeof id === 'string' && processIds.some(allowed => allowed === id)) &&
163
+ new Set(value).size === value.length;
164
+ }
165
+ function processHealth(snapshot, now) {
166
+ if (!record(snapshot))
167
+ return null;
168
+ const { observedAt, state, failed, paused } = snapshot;
169
+ if (typeof observedAt !== 'number' || !Number.isSafeInteger(observedAt) || observedAt <= 0 ||
170
+ !Number.isFinite(now) || observedAt > now + 5000 || now - observedAt > 30000)
171
+ return null;
172
+ if (state !== 'ok' && state !== 'fault' && state !== 'unknown')
173
+ return null;
174
+ if (!validIds(failed) || !validIds(paused) || failed.some(id => paused.includes(id)) ||
175
+ (state === 'fault') !== (failed.length > 0))
176
+ return null;
177
+ return { state, failed: processIds.filter(id => failed.includes(id)), paused };
178
+ }
179
+ // Only the dashboard renderer commits this decision. Charging details keep their own summary.
180
+ function operatingStatus(health, connection, chargeModel, safetyStop, p14Fallback, processes) {
181
+ const offline = connection === 'disconnected' || health?.phase === 'offline';
182
+ const safety = safetyStop || chargeModel?.globalSafety;
183
+ if (processes?.state === 'fault') {
184
+ const text = offline ? 'Live-Verbindung unterbrochen · Prozess gestört: {names}'
185
+ : safety ? 'Sicherheitsstopp aktiv · Prozess gestört: {names}' : 'Prozess gestört · {names}';
186
+ return { text, level: 'error', processIds: processes.failed };
187
+ }
188
+ if (connection === 'disconnected')
189
+ return { text: 'Verbindung unterbrochen', level: 'error' };
190
+ if (connection !== 'ready' && connection !== 'snapshot')
191
+ return { text: 'Verbinde…', level: 'warn' };
192
+ if (offline)
193
+ return { text: 'Verbindung unterbrochen', level: 'error' };
194
+ if (safety)
195
+ return { text: 'Sicherheitsstopp aktiv', level: 'error' };
196
+ const emsPaused = processes?.paused.includes('ems') === true;
197
+ if (!emsPaused && health?.phase === 'stopped')
198
+ return { text: 'EMS gestoppt', level: 'error' };
199
+ if (chargeModel && chargeModel.total > 0 && chargeModel.overallLevel === 'error') {
200
+ return { text: chargeModel.systemText, level: 'error' };
201
+ }
202
+ if (!emsPaused && health?.phase === 'grid-unavailable')
203
+ return { text: 'Netzmessung fehlt oder ist veraltet', level: 'warn' };
204
+ if (!emsPaused && health?.phase !== 'healthy')
205
+ return { text: 'Betriebsstatus prüfen', level: 'warn' };
206
+ if (p14Fallback)
207
+ return { text: '§14a-Kommunikationsfallback aktiv', level: 'warn' };
208
+ if (chargeModel && chargeModel.total > 0 && chargeModel.overallLevel === 'warn') {
209
+ return { text: chargeModel.systemText, level: 'warn' };
210
+ }
211
+ if (processes?.state !== 'ok')
212
+ return { text: 'Prozessstatus unbekannt', level: 'warn' };
213
+ if (emsPaused)
214
+ return { text: 'EMS pausiert', level: 'info' };
215
+ return { text: 'Alle Systeme normal', level: 'ok' };
216
+ }
217
+ function dashboardStatus(health, connection, chargeModel, safetyStop, p14Fallback, processSnapshot, now = Date.now()) {
218
+ const processes = processHealth(processSnapshot, now);
219
+ const primary = operatingStatus(health, connection, chargeModel, safetyStop, p14Fallback, processes);
220
+ const devices = processes && record(processSnapshot) ? processSnapshot.deviceHealth : null;
221
+ if (record(devices) && devices.state === 'fault' && Array.isArray(devices.offline) &&
222
+ devices.offline.length > 0 && devices.offline.length <= 12 && typeof devices.totalOffline === 'number' &&
223
+ Number.isSafeInteger(devices.totalOffline) && devices.totalOffline >= devices.offline.length && devices.totalOffline <= 10000) {
224
+ const names = [];
225
+ for (const item of devices.offline) {
226
+ if (!record(item) || typeof item.name !== 'string' || !item.name.trim() || item.name.length > 64)
227
+ break;
228
+ names.push(item.name);
229
+ }
230
+ if (names.length === devices.offline.length) {
231
+ return { ...primary, text: primary.level === 'error' ? primary.text : '',
232
+ level: 'error', deviceNames: names, totalOffline: devices.totalOffline };
233
+ }
234
+ }
235
+ if (primary.level === 'ok' && !(record(devices) && devices.state === 'ok' &&
236
+ devices.totalOffline === 0 && Array.isArray(devices.offline) && devices.offline.length === 0)) {
237
+ return { text: 'Gerätestatus unbekannt', level: 'warn' };
238
+ }
239
+ return primary;
148
240
  }
149
241
  const host = window;
150
- host.NexoWattLiveDisplay = Object.freeze({ read, farm, status, buildingQuality });
242
+ host.NexoWattLiveDisplay = Object.freeze({ read, farm, status, dashboardStatus, buildingQuality });
151
243
  })();
@@ -50,8 +50,8 @@
50
50
  "purpose": "any"
51
51
  }
52
52
  ],
53
- "version": "9.0.34",
54
- "appVersion": "9.0.34",
53
+ "version": "9.0.35",
54
+ "appVersion": "9.0.35",
55
55
  "id": "/",
56
56
  "lang": "de",
57
57
  "description": "NexoWatt EOS – Energie und SmartHome auf deinem Gerät."