iobroker.eos-admin 9.0.33 → 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.
- package/NEXOWATT_EOS_BUILD_INFO.json +13 -11
- package/README.md +12 -8
- package/adminWww/.vite/manifest.json +233 -224
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +13897 -13887
- package/adminWww/assets/AccessTime-CuR73YC3.js +1 -0
- package/adminWww/assets/{AdapterUpdateDialog-DBUqmmyD.js → AdapterUpdateDialog-DH6S-kWX.js} +5 -5
- package/adminWww/assets/{Adapters-dDEp7o5h.js → Adapters-CIlqSF5B.js} +5 -5
- package/adminWww/assets/ConfigManager-BhVBfM-q.js +1 -0
- package/adminWww/assets/Enums-3H97czGs.js +92 -0
- package/adminWww/assets/Fields-vWLKiuvO.js +1 -0
- package/adminWww/assets/Files-wmjjMXYM.js +1 -0
- package/adminWww/assets/{Hosts-CwU1LujG.js → Hosts-Bk-xmI98.js} +6 -6
- package/adminWww/assets/Instances-Db6Vgh62.js +4 -0
- package/adminWww/assets/Intro-Dc3wAG9V.js +2 -0
- package/adminWww/assets/KeyboardArrowRight-ifvmV1ZL.js +1 -0
- package/adminWww/assets/{Logs-B5SpNqHq.js → Logs-CPbEGWNq.js} +2 -2
- package/adminWww/assets/MoreHoriz-CS7nODK8.js +1 -0
- package/adminWww/assets/{Objects-COg_cFkz.js → Objects-DJB-2468.js} +4 -4
- package/adminWww/assets/Overview-DdvghCLQ.js +3 -0
- package/adminWww/assets/Pageview-wzrLQZ-j.js +1 -0
- package/adminWww/assets/PersonOff-YtHcY0sV.js +1 -0
- package/adminWww/assets/Star-D8VNXawT.js +1 -0
- package/adminWww/assets/State-0UzpgKYj.js +1 -0
- package/adminWww/assets/UsedResources-Bcmo58YD.js +2 -0
- package/adminWww/assets/Users-BGHf3Rox.js +1 -0
- package/adminWww/assets/ViewCompact-D7bHgn99.js +1 -0
- package/adminWww/assets/ViewSidebar-CjClbCI5.js +1 -0
- package/adminWww/assets/WifiTethering-DJ9VO12W.js +1 -0
- package/adminWww/assets/{bootstrap-Dwfxhm2V.js → bootstrap-qkrk_CAn.js} +25 -25
- package/adminWww/assets/date-fns-BtR4dG_j.js +1 -0
- package/adminWww/assets/en-US-BjjaEI6N.js +1 -0
- package/adminWww/assets/{hostInit-3BbTwhaZ.js → hostInit-DlGqatlv.js} +1 -1
- package/adminWww/assets/icons-material-CUNq6tdT.js +1 -0
- package/adminWww/assets/{index-nddph2Sl.js → index-BrtKq3UN.js} +2 -2
- package/adminWww/assets/{installSVGRenderer-CPDIwFAL.js → installSVGRenderer-DujLjpXt.js} +1 -1
- package/adminWww/assets/isSameWeek-WMSJR5Qs.js +1 -0
- package/adminWww/assets/locale-DN6Bdkdt.js +1 -0
- package/adminWww/assets/{mf-entry-bootstrap-0-d1f0f40f.js → mf-entry-bootstrap-0-3e1cd85c.js} +2 -2
- package/adminWww/assets/sentry-CPzCHrwe.js +1 -0
- package/adminWww/assets/setYear-DDSuW45e.js +1 -0
- package/adminWww/index.html +23 -23
- package/adminWww/mf-manifest.json +1 -1
- package/adminWww/mf-stats.json +1 -1
- package/adminWww/{remoteEntry-eos-9.0.33.js → remoteEntry-eos-9.0.35.js} +1 -1
- package/adminWww/remoteEntry.js +1 -1
- package/build/lib/eosDashboardProcessStatus.js +191 -0
- package/build/lib/eosDashboardProcessStatus.js.map +1 -0
- package/build/lib/eosDeviceEmsPlan.js +285 -9
- package/build/lib/eosDeviceEmsPlan.js.map +1 -1
- package/build/lib/eosDeviceEmsService.js +29 -2
- package/build/lib/eosDeviceEmsService.js.map +1 -1
- package/build/lib/eosKiosk.js +1 -0
- package/build/lib/eosKiosk.js.map +1 -1
- package/build/lib/eosModuleHost.js +17 -6
- package/build/lib/eosModuleHost.js.map +1 -1
- package/build/lib/eosModuleHttp.js +18 -3
- package/build/lib/eosModuleHttp.js.map +1 -1
- package/build/lib/eosModuleProcess.js +17 -0
- package/build/lib/eosModuleProcess.js.map +1 -1
- package/build/lib/eosModuleProcessWorker.js +22 -1
- package/build/lib/eosModuleProcessWorker.js.map +1 -1
- package/build/lib/eosRuntimeControl.js +6 -0
- package/build/lib/eosRuntimeControl.js.map +1 -1
- package/build/lib/eosRuntimeHealth.js +50 -1
- package/build/lib/eosRuntimeHealth.js.map +1 -1
- package/build/lib/eosSupervisorNotifications.js +169 -0
- package/build/lib/eosSupervisorNotifications.js.map +1 -0
- package/build/lib/eosUiProcess.js +1 -0
- package/build/lib/eosUiProcess.js.map +1 -1
- package/build/lib/web.js +5 -0
- package/build/lib/web.js.map +1 -1
- package/docs/README.md +3 -2
- package/docs/reports/unified-9.0.34/PRUEFBERICHT.md +40 -0
- package/docs/reports/unified-9.0.34/PRUEFERGEBNISSE.json +112 -0
- package/docs/reports/unified-9.0.34/raw/INDEX.json +137 -0
- package/docs/reports/unified-9.0.34/raw/backend.log +5 -0
- package/docs/reports/unified-9.0.34/raw/dashboard-interval.json +108 -0
- package/docs/reports/unified-9.0.34/raw/fixtures-verification.log +44 -0
- package/docs/reports/unified-9.0.34/raw/frontend.log +152 -0
- package/docs/reports/unified-9.0.34/raw/installer.log +26 -0
- package/docs/reports/unified-9.0.34/raw/lint.log +45 -0
- package/docs/reports/unified-9.0.34/raw/mira-dashboard-browser.json +1 -0
- package/docs/reports/unified-9.0.34/raw/mira-devices-browser.log +9 -0
- package/docs/reports/unified-9.0.34/raw/mira-memory-process.json +379 -0
- package/docs/reports/unified-9.0.34/raw/modules.log +5 -0
- package/docs/reports/unified-9.0.34/raw/node22-mira.log +216 -0
- package/docs/reports/unified-9.0.34/raw/node22-protocol-to-ems.log +8 -0
- package/docs/reports/unified-9.0.34/raw/node22-tests-final.log +17850 -0
- package/docs/reports/unified-9.0.34/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.34/raw/node24-mira.log +40 -0
- package/docs/reports/unified-9.0.34/raw/node24-protocol-to-ems.log +6 -0
- package/docs/reports/unified-9.0.34/raw/node24-tests-final.log +2973 -0
- package/docs/reports/unified-9.0.34/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.34/raw/protocol-to-ems.cjs +364 -0
- package/docs/reports/unified-9.0.34/raw/release-metadata.log +13 -0
- package/docs/reports/unified-9.0.34/raw/sbom.log +8 -0
- package/docs/reports/unified-9.0.34/raw/typecheck.log +5 -0
- package/docs/reports/unified-9.0.34/raw/ui-runtime.log +8 -0
- package/docs/reports/unified-9.0.35/PRUEFBERICHT.md +51 -0
- package/docs/reports/unified-9.0.35/PRUEFERGEBNISSE.json +112 -0
- package/docs/reports/unified-9.0.35/raw/INDEX.json +282 -0
- package/docs/reports/unified-9.0.35/raw/backend.log +5 -0
- package/docs/reports/unified-9.0.35/raw/browser-lp-detail.log +1 -0
- package/docs/reports/unified-9.0.35/raw/browser-lp-feedback.log +1 -0
- package/docs/reports/unified-9.0.35/raw/cold-ocpp-22.log +108 -0
- package/docs/reports/unified-9.0.35/raw/cold-ocpp-24.log +24 -0
- package/docs/reports/unified-9.0.35/raw/core-final-node22.log +1439 -0
- package/docs/reports/unified-9.0.35/raw/core-final-node24.log +1381 -0
- package/docs/reports/unified-9.0.35/raw/dashboard-de-en-nl.json +716 -0
- package/docs/reports/unified-9.0.35/raw/device-chain-closed-fixed.json +98 -0
- package/docs/reports/unified-9.0.35/raw/device-chain-rst-fixed.json +98 -0
- package/docs/reports/unified-9.0.35/raw/device-chain.json +93 -0
- package/docs/reports/unified-9.0.35/raw/ee-fusion-final.log +12 -0
- package/docs/reports/unified-9.0.35/raw/eebus-monitor-browser.json +1 -0
- package/docs/reports/unified-9.0.35/raw/eebus-monitor-node22.log +206 -0
- package/docs/reports/unified-9.0.35/raw/eebus-monitor-node24.log +39 -0
- package/docs/reports/unified-9.0.35/raw/fixtures-verification.log +44 -0
- package/docs/reports/unified-9.0.35/raw/frontend.log +152 -0
- package/docs/reports/unified-9.0.35/raw/installer.log +26 -0
- package/docs/reports/unified-9.0.35/raw/legacy-mail-setup-browser.log +1 -0
- package/docs/reports/unified-9.0.35/raw/lint.log +45 -0
- package/docs/reports/unified-9.0.35/raw/live-ems-loss.log +10 -0
- package/docs/reports/unified-9.0.35/raw/modules.log +5 -0
- package/docs/reports/unified-9.0.35/raw/node22-mira-reconnect-integrity.log +452 -0
- package/docs/reports/unified-9.0.35/raw/node22-mira.log +222 -0
- package/docs/reports/unified-9.0.35/raw/node22-system-status.log +213 -0
- package/docs/reports/unified-9.0.35/raw/node22-tests-final.log +18137 -0
- package/docs/reports/unified-9.0.35/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.35/raw/node24-mira-reconnect-integrity.log +79 -0
- package/docs/reports/unified-9.0.35/raw/node24-mira.log +41 -0
- package/docs/reports/unified-9.0.35/raw/node24-system-status.log +40 -0
- package/docs/reports/unified-9.0.35/raw/node24-tests-final.log +3019 -0
- package/docs/reports/unified-9.0.35/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.35/raw/notifications-legacy-node22.log +1 -0
- package/docs/reports/unified-9.0.35/raw/notifications-legacy-node24.log +1 -0
- package/docs/reports/unified-9.0.35/raw/notifications-node22.log +67 -0
- package/docs/reports/unified-9.0.35/raw/notifications-node24.log +17 -0
- package/docs/reports/unified-9.0.35/raw/npm-runtime-audit.json +77 -0
- package/docs/reports/unified-9.0.35/raw/ocpp-dashboard-stations-node22.log +110 -0
- package/docs/reports/unified-9.0.35/raw/ocpp-dashboard-stations-node24.log +106 -0
- package/docs/reports/unified-9.0.35/raw/ocpp-history-node22.log +561 -0
- package/docs/reports/unified-9.0.35/raw/ocpp-history-node24.log +98 -0
- package/docs/reports/unified-9.0.35/raw/poll-life-node22.log +38 -0
- package/docs/reports/unified-9.0.35/raw/poll-life-node24.log +12 -0
- package/docs/reports/unified-9.0.35/raw/qa-source-check.log +2 -0
- package/docs/reports/unified-9.0.35/raw/release-metadata.log +13 -0
- package/docs/reports/unified-9.0.35/raw/sbom.log +8 -0
- package/docs/reports/unified-9.0.35/raw/typecheck.log +5 -0
- package/docs/reports/unified-9.0.35/raw/ui-runtime.log +8 -0
- package/docs/reports/unified-9.0.35/raw/vergleich-9.0.33.json +29 -0
- package/docs/reports/unified-9.0.35/raw/vergleich-9.0.34.json +249 -0
- package/docs/reports/unified-9.0.35/raw/vorher-9.0.33-chromium.json +286 -0
- package/docs/reports/unified-9.0.35/raw/vorher-9.0.34-chromium.json +291 -0
- package/docs/start/START_HIER_9.0.34.md +25 -0
- package/docs/start/START_HIER_9.0.35.md +27 -0
- package/io-package.json +12 -12
- package/modules/devices/admin/alias-contract-v1.json +22 -0
- package/modules/devices/admin/ems-assignment.js +6 -1
- package/modules/devices/admin/host-bridge.js +2 -0
- package/modules/devices/admin/index.html +16 -0
- package/modules/devices/admin/index_m.js +168 -9
- package/modules/devices/admin/templates.json +976 -0
- package/modules/devices/checks/emsAssignment.check.js +52 -2
- package/modules/devices/contracts.d.ts +1 -0
- package/modules/devices/index.js +25 -2
- package/modules/devices/lib/alias-contract-v1.json +22 -0
- package/modules/devices/lib/deviceRuntime.js +36 -7
- package/modules/devices/lib/drivers/modbus.js +12 -7
- package/modules/devices/lib/drivers/modbusRtuBus.js +7 -1
- package/modules/devices/lib/drivers/ovumMira.js +152 -0
- package/modules/devices/lib/ovumMiraAliases.js +61 -0
- package/modules/devices/lib/ovumMiraConnection.js +32 -0
- package/modules/devices/lib/templates.json +976 -0
- package/modules/devices/test/aliasContractV1.test.js +4 -4
- package/modules/devices/test/deviceAliasSemantics.test.js +2 -2
- package/modules/devices/test/fixtures/approved-additive-templates.json +3 -1
- package/modules/devices/test/ovumMiraPairing.test.js +76 -0
- package/modules/devices/test/ovumMiraTemplates.test.js +110 -0
- package/modules/devices/test/ovumMiraTransport.test.js +201 -0
- package/modules/eebus/README.md +8 -0
- package/modules/eebus/admin/index.js +29 -2
- package/modules/eebus/build/index.js +28 -3
- package/modules/eebus/build/lib/eebusRuntime.js +17 -2
- package/modules/eebus/build/lib/partnerMonitor.js +160 -0
- package/modules/eebus/build/lib/shipEndpoint.js +4 -0
- package/modules/eebus/build/lib/stateDefinitions.js +1 -0
- package/modules/eebus/src/index.ts +23 -3
- package/modules/eebus/src/lib/eebusRuntime.ts +20 -2
- package/modules/eebus/src/lib/partnerMonitor.ts +127 -0
- package/modules/eebus/src/lib/shipEndpoint.ts +5 -0
- package/modules/eebus/src/lib/stateDefinitions.ts +1 -0
- package/modules/eebus/test/partner-monitor.test.js +82 -0
- package/modules/eebus/test/security.test.js +17 -0
- package/modules/ocpp/README.md +9 -1
- package/modules/ocpp/build/index.js +137 -10
- package/modules/ocpp/build/stationHistory.js +113 -0
- package/modules/ocpp/ocpp/freshness.d.ts +3 -0
- package/modules/ocpp/ocpp/freshness.js +6 -0
- package/modules/ocpp/provenance.json +3 -2
- package/modules/ocpp/runtime.d.ts +1 -0
- package/modules/ocpp/runtime.js +23 -1
- package/modules/ocpp/src/index.ts +163 -12
- package/modules/ocpp/src/stationHistory.ts +119 -0
- package/modules/ocpp/test/hosted.test.cjs +161 -0
- package/package.json +9 -5
- package/release-manifests/unified/build-environment.cdx.json +6 -6
- package/release-manifests/unified/files.json +313 -190
- package/release-manifests/unified/frontend.cdx.json +6 -6
- package/release-manifests/unified/installer.cdx.json +6 -6
- package/release-manifests/unified/obsolete-admin-assets.json +166 -0
- package/release-manifests/unified/runtime.cdx.json +30 -30
- package/release-manifests/unified/validation.json +15 -15
- package/tools/eos-release-manifest.cjs +1 -1
- package/ui/ems/consumers/ovum-mira.js +164 -0
- package/ui/ems/modules/para14a.js +3 -2
- package/ui/ems/modules/stage-a-diagnostics.js +4 -2
- package/ui/ems/modules/thermal-control.js +91 -10
- package/ui/io-package.json +9 -1
- package/ui/lib/installer-lifecycle.js +11 -2
- package/ui/lib/notification-mail.js +235 -40
- package/ui/lib/notification-policy.js +41 -14
- package/ui/main.js +37 -7
- package/ui/package.json +2 -1
- package/ui/www/app.js +122 -24
- package/ui/www/dashboard-lp-status.js +4 -11
- package/ui/www/dashboard-process-status.js +202 -0
- package/ui/www/ems-apps.js +28 -9
- package/ui/www/i18n/en.json +23 -0
- package/ui/www/i18n/nl.json +20 -0
- package/ui/www/index.html +10 -5
- package/ui/www/licenses/smarthome-markdown-components.json +156 -156
- package/ui/www/live-display.js +101 -9
- package/ui/www/manifest.webmanifest +2 -2
- package/ui/www/settings.html +2 -2
- package/ui/www/styles.css +4 -0
- package/adminWww/assets/AddLink-0L0E-LsA.js +0 -1
- package/adminWww/assets/ColorLens-DA51K29x.js +0 -1
- package/adminWww/assets/ConfigManager-DbqTWi2N.js +0 -1
- package/adminWww/assets/Enums-DjldGElU.js +0 -92
- package/adminWww/assets/Fields-0GsPCJeU.js +0 -1
- package/adminWww/assets/FileCopy-B16lEuur.js +0 -1
- package/adminWww/assets/Files-COnUtEbg.js +0 -1
- package/adminWww/assets/Instances-CUX5mxMQ.js +0 -4
- package/adminWww/assets/Intro-BhQmHn3A.js +0 -2
- package/adminWww/assets/Lens-9lkeoWGk.js +0 -1
- package/adminWww/assets/LinearScale-Be5h2beh.js +0 -1
- package/adminWww/assets/North-C2whbHM-.js +0 -1
- package/adminWww/assets/Overview-CitzUjBF.js +0 -3
- package/adminWww/assets/PersonOff-DqBq0Fho.js +0 -1
- package/adminWww/assets/PlaylistAdd-O8k92YBd.js +0 -1
- package/adminWww/assets/State-D5ljzf-T.js +0 -1
- package/adminWww/assets/UsedResources-BY_NF2wB.js +0 -2
- package/adminWww/assets/Users-Cu93_-VF.js +0 -1
- package/adminWww/assets/date-fns-C1dqkno9.js +0 -1
- package/adminWww/assets/icons-material-DjqX0l_7.js +0 -1
- package/adminWww/assets/isSameWeek-Crh37s7U.js +0 -1
- package/adminWww/assets/isWithinInterval-Bo1WiDfq.js +0 -1
- package/adminWww/assets/locale-hLcz_Xh2.js +0 -1
- package/adminWww/assets/sentry-DwQQLI7N.js +0 -1
- package/adminWww/assets/startOfWeek-DJph8SIW.js +0 -1
package/modules/ocpp/README.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
# Integriertes OCPP-Modul 0.4.4
|
|
2
2
|
|
|
3
|
-
Dieses Modul
|
|
3
|
+
Dieses Modul ist seit NexoWatt EOS 9.0.24 Teil der gemeinsamen Installation. Es enthält den gelieferten und geprüften OCPP-Kern 0.4.3 unter MIT-Lizenz sowie eine neue typisierte Prozessgrenze. Eine zweite Installation von `iobroker.ocpp21` ist für neue Anlagen nicht erforderlich. Herkunft, Originalprüfsummen und Änderungen stehen in `provenance.json`.
|
|
4
|
+
|
|
5
|
+
## Stationszustand im LIVE-Dashboard ab EOS 9.0.35
|
|
6
|
+
|
|
7
|
+
Ein Boot, Heartbeat oder empfangener Status- bzw. Messwert bestätigt die OCPP-Sitzung. Nach einem Verbindungsabbruch oder nach Ablauf des vorhandenen OCPP-Aktivitätsfensters meldet der Worker eine bestätigte Station als offline. Beim Wiederverbinden wartet er auf die erste Stationsmeldung. Eine betriebsbereite Station ohne Fahrzeug gilt als online.
|
|
8
|
+
|
|
9
|
+
Im Dashboard erscheinen fortlaufende Namen wie „Ladestation 1“. Ihre Reihenfolge richtet sich nach der Anmeldung im aktuellen Prozess. Die Anzahl ausgefallener Stationen umfasst auch Fälle über die ersten zwölf Namen hinaus. Für interne Benachrichtigungen liefert der Worker bis zu 256 pseudonyme Stationsschlüssel. Die OCPP-Zulassungsliste erlaubt Anmeldungen. Ein Eintrag allein macht eine Station noch nicht zu einem erwarteten Gerät. EOS merkt sich nach bestätigtem Boot, Heartbeat, Status oder Messwert einen pseudonymen Schlüssel im Stationskanal. Beim Neustart lädt es diese Nachweise aus dem verwendeten ioBroker-Namensraum. Bei älteren Ständen zählen ein durch Boot gesetztes Heartbeat-Intervall oder gespeicherte Boot-, Heartbeat- und Messwertzeiten zusammen mit der bestätigten Stationsidentität. Eine Socket-Anmeldung oder ein Eintrag in der Zulassungsliste genügt dafür nicht.
|
|
10
|
+
|
|
11
|
+
Vorher bestätigte Stationen erscheinen bis zur Wiederanmeldung als unbekannt. Liegt vor dem Neustart ein bestätigter Verbindungsabbruch vor, bleibt die Station offline. Nach Ablauf des regulären OCPP-Aktivitätsfensters gilt auch eine weiterhin ausbleibende Anmeldung als Ausfall. Mit den Standardwerten beträgt das Fenster 750 Sekunden. Erst eine neue OCPP-Aktivität bestätigt die Rückkehr. Beim Start werden höchstens 1.024 Stationswurzeln ausgewertet. Fehlende oder unvollständige historische Auskunft ergibt einen unbekannten Status. Die Datenbankabfrage läuft unabhängig vom Serverstart. Die laufende Dashboard-Abfrage liest ausschließlich aus dem Arbeitsspeicher.
|
|
4
12
|
|
|
5
13
|
## Laufzeit und Zuständigkeit
|
|
6
14
|
|
|
@@ -5,6 +5,7 @@ exports.validateConfig = validateConfig;
|
|
|
5
5
|
exports.preflightLegacyConfig = preflightLegacyConfig;
|
|
6
6
|
exports.createHostedModule = createHostedModule;
|
|
7
7
|
/** NexoWatt EOS OCPP hosting boundary. MIT; original station runtime remains attributed in provenance.json. */
|
|
8
|
+
const stationHistory_1 = require("./stationHistory");
|
|
8
9
|
const node_async_hooks_1 = require("node:async_hooks");
|
|
9
10
|
const node_events_1 = require("node:events");
|
|
10
11
|
const node_module_1 = require("node:module");
|
|
@@ -253,6 +254,24 @@ function createHostedModule(options) {
|
|
|
253
254
|
})();
|
|
254
255
|
return stopping;
|
|
255
256
|
};
|
|
257
|
+
const dashboardKeys = new WeakMap();
|
|
258
|
+
const configuredIdentities = new Set(Array.isArray(settings.identityAllowlist) ? settings.identityAllowlist : []);
|
|
259
|
+
const allowedKeys = new Set([...configuredIdentities].map(id => (0, stationHistory_1.stationKey)(String(id))));
|
|
260
|
+
let knownStations = new Map();
|
|
261
|
+
let historyComplete = false;
|
|
262
|
+
let observationStarted = 0;
|
|
263
|
+
let retryHistoryAfter = 0;
|
|
264
|
+
const restoreHistory = async () => {
|
|
265
|
+
retryHistoryAfter = 0;
|
|
266
|
+
const token = generation;
|
|
267
|
+
const loaded = await (0, stationHistory_1.readStationHistory)(adapter.namespace, pattern => call('getStatesAsync', [pattern]), allowedKeys);
|
|
268
|
+
if (!allowed() || token !== generation) {
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
knownStations = loaded.complete ? loaded.known : new Map([...knownStations, ...loaded.known]);
|
|
272
|
+
historyComplete = loaded.complete;
|
|
273
|
+
retryHistoryAfter = loaded.readFailed ? Date.now() + 30000 : 0;
|
|
274
|
+
};
|
|
256
275
|
const start = () => {
|
|
257
276
|
if (starting) {
|
|
258
277
|
return starting;
|
|
@@ -302,7 +321,10 @@ function createHostedModule(options) {
|
|
|
302
321
|
]);
|
|
303
322
|
}
|
|
304
323
|
await call('setStateAsync', ['info.eosHostedRuntime', { val: true, ack: true }]);
|
|
324
|
+
// Inventory hydration cannot delay the WebSocket listener or physical control.
|
|
325
|
+
void restoreHistory();
|
|
305
326
|
await runtime.onReady();
|
|
327
|
+
observationStarted = Date.now();
|
|
306
328
|
assert();
|
|
307
329
|
started = true;
|
|
308
330
|
state = 'running';
|
|
@@ -312,6 +334,9 @@ function createHostedModule(options) {
|
|
|
312
334
|
if (publishing || !allowed() || !runtime?.server) {
|
|
313
335
|
return;
|
|
314
336
|
}
|
|
337
|
+
if (retryHistoryAfter && Date.now() >= retryHistoryAfter) {
|
|
338
|
+
void restoreHistory();
|
|
339
|
+
}
|
|
315
340
|
publishing = true;
|
|
316
341
|
void publishAlive(true)
|
|
317
342
|
.catch(() => {
|
|
@@ -332,6 +357,116 @@ function createHostedModule(options) {
|
|
|
332
357
|
});
|
|
333
358
|
return starting;
|
|
334
359
|
};
|
|
360
|
+
const connectionHealth = (entry, now) => (0, freshness_1.deriveConnectionHealth)({
|
|
361
|
+
now,
|
|
362
|
+
socketConnected: entry.socketConnected,
|
|
363
|
+
connectedAt: entry.connectedAt,
|
|
364
|
+
lastMessageAt: entry.lastMessageAt,
|
|
365
|
+
lastHeartbeatAt: entry.lastHeartbeatAt,
|
|
366
|
+
heartbeatIntervalSec: entry.heartbeatIntervalSec,
|
|
367
|
+
heartbeatTimeoutFactor: settings.heartbeatTimeoutFactor,
|
|
368
|
+
activityTimeoutSec: settings.activityTimeoutSec,
|
|
369
|
+
});
|
|
370
|
+
const getDashboardDeviceHealth = () => {
|
|
371
|
+
const result = {
|
|
372
|
+
state: 'ok',
|
|
373
|
+
offline: [],
|
|
374
|
+
totalOffline: 0,
|
|
375
|
+
tracked: [],
|
|
376
|
+
complete: false,
|
|
377
|
+
};
|
|
378
|
+
if (!settings.enabled) {
|
|
379
|
+
result.complete = true;
|
|
380
|
+
return result;
|
|
381
|
+
}
|
|
382
|
+
if (!started ||
|
|
383
|
+
!runtime ||
|
|
384
|
+
revoked ||
|
|
385
|
+
state !== 'running' ||
|
|
386
|
+
!options.canOperate() ||
|
|
387
|
+
(options.getAuthorityGeneration?.() ?? 0) !== authorityGeneration) {
|
|
388
|
+
result.state = 'unknown';
|
|
389
|
+
return result;
|
|
390
|
+
}
|
|
391
|
+
const now = Date.now();
|
|
392
|
+
if (!historyComplete) {
|
|
393
|
+
result.state = 'unknown';
|
|
394
|
+
}
|
|
395
|
+
const seen = new Set();
|
|
396
|
+
let ordinal = 0, eligible = 0, confirmedConfigured = 0;
|
|
397
|
+
for (const entry of runtime.runtimeIndex.values()) {
|
|
398
|
+
ordinal++;
|
|
399
|
+
let key = dashboardKeys.get(entry);
|
|
400
|
+
if (!key) {
|
|
401
|
+
key = (0, stationHistory_1.stationKey)(entry.rawIdentity);
|
|
402
|
+
dashboardKeys.set(entry, key);
|
|
403
|
+
}
|
|
404
|
+
const historical = knownStations.get(key);
|
|
405
|
+
const confirmed = (0, freshness_1.hasConfirmedSessionActivity)(entry);
|
|
406
|
+
if (!confirmed && !entry.dashboardPreviouslyConfirmed && !historical && !entry.socketConnected) {
|
|
407
|
+
continue;
|
|
408
|
+
}
|
|
409
|
+
seen.add(key);
|
|
410
|
+
eligible++;
|
|
411
|
+
if ((confirmed || entry.dashboardPreviouslyConfirmed) && configuredIdentities.has(entry.rawIdentity)) {
|
|
412
|
+
confirmedConfigured++;
|
|
413
|
+
}
|
|
414
|
+
let current = 'unknown';
|
|
415
|
+
if (confirmed) {
|
|
416
|
+
current = connectionHealth(entry, now).online ? 'online' : 'offline';
|
|
417
|
+
}
|
|
418
|
+
else if ((entry.dashboardPreviouslyConfirmed || historical) && !entry.socketConnected) {
|
|
419
|
+
current = 'offline';
|
|
420
|
+
}
|
|
421
|
+
// The native station object has an OCPP identity and no separate public display name.
|
|
422
|
+
const name = `Ladestation ${ordinal}`;
|
|
423
|
+
if (current === 'offline') {
|
|
424
|
+
result.state = 'fault';
|
|
425
|
+
result.totalOffline++;
|
|
426
|
+
if (result.offline.length < 12) {
|
|
427
|
+
result.offline.push({ name });
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
else if (current === 'unknown' && result.state !== 'fault') {
|
|
431
|
+
result.state = 'unknown';
|
|
432
|
+
}
|
|
433
|
+
if (result.tracked.length < 256) {
|
|
434
|
+
result.tracked.push({ key, name, state: current });
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
const windowMs = (0, freshness_1.activityTimeoutMs)(settings.heartbeatIntervalSec, settings.heartbeatTimeoutFactor, settings.activityTimeoutSec);
|
|
438
|
+
for (const old of knownStations.values()) {
|
|
439
|
+
if (seen.has(old.key)) {
|
|
440
|
+
continue;
|
|
441
|
+
}
|
|
442
|
+
const name = `Ladestation ${++ordinal}`;
|
|
443
|
+
const absent = old.offline || now - observationStarted > windowMs;
|
|
444
|
+
if (absent) {
|
|
445
|
+
result.state = 'fault';
|
|
446
|
+
result.totalOffline++;
|
|
447
|
+
if (result.offline.length < 12) {
|
|
448
|
+
result.offline.push({ name });
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
else if (result.state !== 'fault') {
|
|
452
|
+
result.state = 'unknown';
|
|
453
|
+
}
|
|
454
|
+
eligible++;
|
|
455
|
+
if (allowedKeys.has(old.key)) {
|
|
456
|
+
confirmedConfigured++;
|
|
457
|
+
}
|
|
458
|
+
if (result.tracked.length < 256) {
|
|
459
|
+
result.tracked.push({ key: old.key, name, state: absent ? 'offline' : 'unknown' });
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
// With open admission, earlier sessions may be missing after a worker restart.
|
|
463
|
+
result.complete =
|
|
464
|
+
historyComplete &&
|
|
465
|
+
configuredIdentities.size > 0 &&
|
|
466
|
+
confirmedConfigured === configuredIdentities.size &&
|
|
467
|
+
eligible === result.tracked.length;
|
|
468
|
+
return result;
|
|
469
|
+
};
|
|
335
470
|
const getStatus = () => ({
|
|
336
471
|
started: started && allowed(),
|
|
337
472
|
state,
|
|
@@ -352,16 +487,7 @@ function createHostedModule(options) {
|
|
|
352
487
|
connected: entry.socketConnected,
|
|
353
488
|
status: entry.chargingState || '',
|
|
354
489
|
lastSeenMs: entry.lastMessageAt || 0,
|
|
355
|
-
dataFresh: (0, freshness_1.dataFreshForEos)((0,
|
|
356
|
-
now: Date.now(),
|
|
357
|
-
socketConnected: entry.socketConnected,
|
|
358
|
-
connectedAt: entry.connectedAt,
|
|
359
|
-
lastMessageAt: entry.lastMessageAt,
|
|
360
|
-
lastHeartbeatAt: entry.lastHeartbeatAt,
|
|
361
|
-
heartbeatIntervalSec: entry.heartbeatIntervalSec,
|
|
362
|
-
heartbeatTimeoutFactor: settings.heartbeatTimeoutFactor,
|
|
363
|
-
activityTimeoutSec: settings.activityTimeoutSec,
|
|
364
|
-
}).online, entry.lastPowerAt > 0 && Date.now() - entry.lastPowerAt <= Number(settings.telemetryMaxAgeSec) * 1000, entry.socketConnected && entry.safeZeroAt > 0),
|
|
490
|
+
dataFresh: (0, freshness_1.dataFreshForEos)(connectionHealth(entry, Date.now()).online, entry.lastPowerAt > 0 && Date.now() - entry.lastPowerAt <= Number(settings.telemetryMaxAgeSec) * 1000, entry.socketConnected && entry.safeZeroAt > 0),
|
|
365
491
|
leaseArmed: runtime?._eosLeases.get(id)?.armed === true,
|
|
366
492
|
leaseState: runtime?._eosLeases.get(id)?.active === true
|
|
367
493
|
? 'active'
|
|
@@ -389,6 +515,7 @@ function createHostedModule(options) {
|
|
|
389
515
|
start,
|
|
390
516
|
stop,
|
|
391
517
|
getStatus,
|
|
518
|
+
getDashboardDeviceHealth,
|
|
392
519
|
onStateChange,
|
|
393
520
|
command: (name) => {
|
|
394
521
|
assert();
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stationKey = void 0;
|
|
4
|
+
exports.readStationHistory = readStationHistory;
|
|
5
|
+
const node_crypto_1 = require("node:crypto");
|
|
6
|
+
const record = (value) => !!value && typeof value === 'object' && !Array.isArray(value);
|
|
7
|
+
const stationKey = (identity) => (0, node_crypto_1.createHash)('sha256').update(identity).digest('hex');
|
|
8
|
+
exports.stationKey = stationKey;
|
|
9
|
+
const fields = [
|
|
10
|
+
'health.staleReason',
|
|
11
|
+
'health.online',
|
|
12
|
+
'health.dashboardConfirmedKey',
|
|
13
|
+
'info.identity',
|
|
14
|
+
'info.heartbeatInterval',
|
|
15
|
+
'health.lastBoot',
|
|
16
|
+
'info.lastHeartbeat',
|
|
17
|
+
'health.lastMeterValue',
|
|
18
|
+
];
|
|
19
|
+
/**
|
|
20
|
+
* Only exact evidence suffixes in the module's own (possibly migrated) namespace.
|
|
21
|
+
* Object defaults, socket creation and a configuration allowlist do not prove a station exists.
|
|
22
|
+
*/
|
|
23
|
+
async function readStationHistory(namespace, read, allow) {
|
|
24
|
+
const rows = new Map();
|
|
25
|
+
let complete = true;
|
|
26
|
+
let readFailed = false;
|
|
27
|
+
const collect = async (field) => {
|
|
28
|
+
try {
|
|
29
|
+
const values = await read(`*.${field}`);
|
|
30
|
+
if (!record(values)) {
|
|
31
|
+
throw new Error('invalid controller response');
|
|
32
|
+
}
|
|
33
|
+
for (const [id, state] of Object.entries(values)) {
|
|
34
|
+
const rel = id.startsWith(`${namespace}.`) ? id.slice(namespace.length + 1) : id;
|
|
35
|
+
if (!rel.endsWith(`.${field}`)) {
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
const root = rel.slice(0, -(field.length + 1));
|
|
39
|
+
if (!/^[A-Za-z0-9_-]{1,256}$/.test(root) || !record(state)) {
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
if (state.ack !== true || (state.q !== undefined && state.q !== 0)) {
|
|
43
|
+
// An unreadable positive marker is not proof of an empty station inventory.
|
|
44
|
+
if (field === 'health.dashboardConfirmedKey' && state.val) {
|
|
45
|
+
complete = false;
|
|
46
|
+
}
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
let row = rows.get(root);
|
|
50
|
+
if (!row) {
|
|
51
|
+
if (rows.size >= 1024) {
|
|
52
|
+
complete = false;
|
|
53
|
+
continue;
|
|
54
|
+
}
|
|
55
|
+
row = {};
|
|
56
|
+
rows.set(root, row);
|
|
57
|
+
}
|
|
58
|
+
row[field] = state.val;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
complete = false;
|
|
63
|
+
readFailed = true;
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
// Start with outage evidence before the normal runtime resets old session flags.
|
|
67
|
+
// At most two bounded controller requests in flight, independent of station count.
|
|
68
|
+
for (let i = 0; i < fields.length; i += 2) {
|
|
69
|
+
await Promise.all(fields.slice(i, i + 2).map(collect));
|
|
70
|
+
}
|
|
71
|
+
const known = new Map();
|
|
72
|
+
const now = Date.now();
|
|
73
|
+
for (const row of rows.values()) {
|
|
74
|
+
const raw = row['info.identity'], marker = row['health.dashboardConfirmedKey'];
|
|
75
|
+
const timestamp = (value) => typeof value === 'string' &&
|
|
76
|
+
Number.isFinite(Date.parse(value)) &&
|
|
77
|
+
Date.parse(value) > 0 &&
|
|
78
|
+
Date.parse(value) <= now;
|
|
79
|
+
const interval = row['info.heartbeatInterval']; // The native runtime writes this only after BootNotification.
|
|
80
|
+
const legacy = (typeof interval === 'number' && Number.isInteger(interval) && interval >= 10 && interval <= 86400) ||
|
|
81
|
+
timestamp(row['health.lastBoot']) ||
|
|
82
|
+
timestamp(row['info.lastHeartbeat']) ||
|
|
83
|
+
timestamp(row['health.lastMeterValue']);
|
|
84
|
+
const marked = typeof marker === 'string' && /^[a-f0-9]{64}$/.test(marker);
|
|
85
|
+
if (!marked && !legacy) {
|
|
86
|
+
if (marker) {
|
|
87
|
+
complete = false;
|
|
88
|
+
}
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
const rawKey = typeof raw === 'string' && raw.length > 0 && raw.length <= 256 ? (0, exports.stationKey)(raw) : '';
|
|
92
|
+
if (marked && rawKey && rawKey !== marker) {
|
|
93
|
+
complete = false;
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
const key = marked ? marker : rawKey;
|
|
97
|
+
if (!key) {
|
|
98
|
+
complete = false;
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
if (allow.size && !allow.has(key)) {
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
if (known.has(key)) {
|
|
105
|
+
complete = false;
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
const reason = row['health.staleReason'];
|
|
109
|
+
const offline = row['health.online'] === false && (reason === 'socket-disconnected' || reason === 'no-ocpp-activity');
|
|
110
|
+
known.set(key, { key, offline });
|
|
111
|
+
}
|
|
112
|
+
return { known, complete, readFailed };
|
|
113
|
+
}
|
|
@@ -3,8 +3,11 @@ export interface ConnectionHealthOptions {
|
|
|
3
3
|
lastHeartbeatAt: number; heartbeatIntervalSec: number;
|
|
4
4
|
heartbeatTimeoutFactor: unknown; activityTimeoutSec: unknown;
|
|
5
5
|
}
|
|
6
|
+
export function hasConfirmedSessionActivity(entry: { lastBootAt?: number; lastHeartbeatAt?: number; lastStatusAt?: number; lastMeterAt?: number }): boolean;
|
|
6
7
|
export function deriveConnectionHealth(options: ConnectionHealthOptions): {
|
|
7
8
|
socketConnected: boolean; online: boolean; activityFresh: boolean; heartbeatAlive: boolean;
|
|
8
9
|
lastActivityAt: number; activityWindowMs: number; heartbeatWindowMs: number;
|
|
9
10
|
};
|
|
10
11
|
export function dataFreshForEos(online: boolean, powerFresh: boolean, safeZero: boolean): boolean;
|
|
12
|
+
|
|
13
|
+
export function activityTimeoutMs(intervalSec: unknown, heartbeatFactor: unknown, minimumSec: unknown): number;
|
|
@@ -42,6 +42,11 @@ function activityTimeoutMs(intervalSec, heartbeatFactor = 2.5, minimumSec = 90)
|
|
|
42
42
|
* disconnect. Any OCPP request/response can keep activityFresh true without
|
|
43
43
|
* falsifying heartbeatAlive.
|
|
44
44
|
*/
|
|
45
|
+
// Timestamps below are set by accepted OCPP activity. A WebSocket handshake alone has none.
|
|
46
|
+
function hasConfirmedSessionActivity(entry) {
|
|
47
|
+
return Boolean(entry && (entry.lastBootAt > 0 || entry.lastHeartbeatAt > 0 || entry.lastStatusAt > 0 || entry.lastMeterAt > 0));
|
|
48
|
+
}
|
|
49
|
+
|
|
45
50
|
function deriveConnectionHealth(options = {}) {
|
|
46
51
|
const now = Number.isFinite(Number(options.now)) ? Number(options.now) : Date.now();
|
|
47
52
|
const socketConnected = options.socketConnected === true;
|
|
@@ -253,6 +258,7 @@ module.exports = {
|
|
|
253
258
|
heartbeatTimeoutMs,
|
|
254
259
|
activityTimeoutMs,
|
|
255
260
|
deriveConnectionHealth,
|
|
261
|
+
hasConfirmedSessionActivity,
|
|
256
262
|
commandTimeoutMs,
|
|
257
263
|
isTriggerAccepted,
|
|
258
264
|
isTriggerUnsupported,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"component": "NexoWatt EOS embedded OCPP",
|
|
3
|
-
"integrationVersion": "9.0.
|
|
3
|
+
"integrationVersion": "9.0.35",
|
|
4
4
|
"moduleVersion": "0.4.4",
|
|
5
5
|
"name": "iobroker.ocpp21",
|
|
6
6
|
"version": "0.4.3",
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"StrictTypeScript hosted lifecycle/configuration/dispatch boundary under MIT",
|
|
20
20
|
"Independent OCPP worker heartbeat and per-station EOS lease preserved",
|
|
21
21
|
"Bounded network admission/frames, authorization and generation fences, scoped aliases",
|
|
22
|
-
"Native configurations, units and station controls preserved; hosted namespaces plus legacy handover"
|
|
22
|
+
"Native configurations, units and station controls preserved; hosted namespaces plus legacy handover",
|
|
23
|
+
"Read-only dashboard view of confirmed station sessions with bounded output, pseudonymous keys and restoration of confirmed stations from native state history"
|
|
23
24
|
],
|
|
24
25
|
"excludedUpstreamFiles": [
|
|
25
26
|
"node_modules",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { EventEmitter } from 'node:events';
|
|
2
2
|
export interface RuntimeEntry {
|
|
3
3
|
client: unknown; socketConnected: boolean; proto: string; rawIdentity: string;
|
|
4
|
+
dashboardPreviouslyConfirmed: boolean; lastBootAt?: number; lastMeterAt?: number; lastStatusAt?: number;
|
|
4
5
|
connectedAt: number; lastHeartbeatAt: number; heartbeatIntervalSec: number; lastMessageAt: number; lastPowerAt: number; safeZeroAt: number; chargingState: string;
|
|
5
6
|
[key: string]: unknown;
|
|
6
7
|
}
|
package/modules/ocpp/runtime.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
// Actual 0.4.3 station runtime; explicit base injection.
|
|
3
3
|
function createOcppRuntime(AdapterBase) {
|
|
4
|
-
const { randomUUID } = require('node:crypto');
|
|
4
|
+
const { randomUUID, createHash } = require('node:crypto');
|
|
5
5
|
const { OcppRpcServer } = require('./ocpp/server');
|
|
6
6
|
const { StationTelemetry, normalizeEosLimit, shouldSendLimit } = require('./ocpp/eos-contract');
|
|
7
7
|
const {
|
|
8
8
|
sanitizeStationIdentity,
|
|
9
9
|
deriveConnectionHealth,
|
|
10
|
+
hasConfirmedSessionActivity,
|
|
10
11
|
commandTimeoutMs,
|
|
11
12
|
isTriggerAccepted,
|
|
12
13
|
isTriggerUnsupported,
|
|
@@ -161,6 +162,8 @@ class NexoWattOcppAdapter extends AdapterBase {
|
|
|
161
162
|
for (const key of [...this._phaseMetricCache.keys()]) if (key.startsWith(`${identity}|`)) this._phaseMetricCache.delete(key);
|
|
162
163
|
this.runtimeIndex.set(identity, {
|
|
163
164
|
sessionId: randomUUID(),
|
|
165
|
+
// Keep the identity known across socket replacements, while requiring fresh evidence for each session.
|
|
166
|
+
dashboardPreviouslyConfirmed: old?.dashboardPreviouslyConfirmed === true || hasConfirmedSessionActivity(old),
|
|
164
167
|
proto,
|
|
165
168
|
client,
|
|
166
169
|
rawIdentity: rawIdentity || identity,
|
|
@@ -349,6 +352,19 @@ class NexoWattOcppAdapter extends AdapterBase {
|
|
|
349
352
|
entry.lastAction = String(action || '');
|
|
350
353
|
}
|
|
351
354
|
|
|
355
|
+
_rememberDashboardStation(identity, entry) {
|
|
356
|
+
if (entry.dashboardMarkerPending || entry.dashboardMarkerSaved) return;
|
|
357
|
+
entry.dashboardMarkerPending = true;
|
|
358
|
+
// This observation outlives a socket. Never restore a present-session online flag from it.
|
|
359
|
+
void this.ensureStructure(identity).then(async () => {
|
|
360
|
+
if (this.runtimeIndex.get(identity)?.rawIdentity !== entry.rawIdentity) return;
|
|
361
|
+
const key = createHash('sha256').update(entry.rawIdentity).digest('hex');
|
|
362
|
+
await this._setStateFreshAsync(`${identity}.health.dashboardConfirmedKey`, key, true, 'static');
|
|
363
|
+
entry.dashboardMarkerSaved = true;
|
|
364
|
+
}).catch(() => { /* Retry on the next confirmed packet. */ })
|
|
365
|
+
.finally(() => { entry.dashboardMarkerPending = false; });
|
|
366
|
+
}
|
|
367
|
+
|
|
352
368
|
_noteBoot(identity, intervalSec) {
|
|
353
369
|
const entry = this.runtimeIndex.get(identity);
|
|
354
370
|
if (!entry) return;
|
|
@@ -359,6 +375,7 @@ class NexoWattOcppAdapter extends AdapterBase {
|
|
|
359
375
|
entry.lastMessageAt = Math.max(entry.lastMessageAt || 0, now);
|
|
360
376
|
entry.nextRefreshAt = now + Math.max(30, Number(this.config.activeRefreshIntervalSec) || 60) * 1000;
|
|
361
377
|
entry.lastBootAt = now;
|
|
378
|
+
this._rememberDashboardStation(identity, entry);
|
|
362
379
|
entry.configurationRebootRequired = false;
|
|
363
380
|
entry.configurationAutoRefreshDone = false;
|
|
364
381
|
entry.configurationAutoRefreshAt = now + Math.max(5, Number(this.config.configurationRefreshDelaySec) || 15) * 1000;
|
|
@@ -377,6 +394,7 @@ class NexoWattOcppAdapter extends AdapterBase {
|
|
|
377
394
|
// retained only for display and must not make an old connection appear new.
|
|
378
395
|
const now = Date.now();
|
|
379
396
|
entry.lastHeartbeatAt = now;
|
|
397
|
+
this._rememberDashboardStation(identity, entry);
|
|
380
398
|
entry.lastMessageAt = Math.max(entry.lastMessageAt || 0, now);
|
|
381
399
|
entry.lastHeartbeatSourceTimestamp = timestamp || '';
|
|
382
400
|
}
|
|
@@ -453,6 +471,7 @@ class NexoWattOcppAdapter extends AdapterBase {
|
|
|
453
471
|
telemetry.meter(evseId, connectorId, values, at, sourceAt);
|
|
454
472
|
if (evseId > 0 && connectorId > 0) entry.connectors.add(`${evseId}:${connectorId}`);
|
|
455
473
|
entry.lastMeterAt = at;
|
|
474
|
+
this._rememberDashboardStation(identity, entry);
|
|
456
475
|
await this._setStateFreshAsync(`${identity}.health.lastMeterValue`, new Date(at).toISOString(), true, 'health');
|
|
457
476
|
await this._publishStationTelemetry(identity, entry);
|
|
458
477
|
}
|
|
@@ -474,6 +493,7 @@ class NexoWattOcppAdapter extends AdapterBase {
|
|
|
474
493
|
const entry = this.runtimeIndex.get(identity);
|
|
475
494
|
if (!entry || !entry.client || !entry.socketConnected) return;
|
|
476
495
|
entry.lastStatusAt = Date.now();
|
|
496
|
+
this._rememberDashboardStation(identity, entry);
|
|
477
497
|
if (evseId > 0 && connectorId > 0) entry.connectors.add(`${evseId}:${connectorId}`);
|
|
478
498
|
entry.statuses.set(`${evseId}:${connectorId}`, String(status || ''));
|
|
479
499
|
this._getStationTelemetry(identity, entry).status(evseId, connectorId, status);
|
|
@@ -487,6 +507,7 @@ class NexoWattOcppAdapter extends AdapterBase {
|
|
|
487
507
|
// in the future or far in the past and must not falsify EOS data quality.
|
|
488
508
|
const now = Date.now();
|
|
489
509
|
entry.lastMeterAt = Math.max(entry.lastMeterAt || 0, now);
|
|
510
|
+
this._rememberDashboardStation(identity, entry);
|
|
490
511
|
if (flags.hasPower) entry.lastPowerAt = Math.max(entry.lastPowerAt || 0, now);
|
|
491
512
|
if (flags.hasExportPower) entry.lastExportPowerAt = Math.max(entry.lastExportPowerAt || 0, now);
|
|
492
513
|
if (flags.hasCurrent) entry.lastCurrentAt = Math.max(entry.lastCurrentAt || 0, now);
|
|
@@ -2538,6 +2559,7 @@ class NexoWattOcppAdapter extends AdapterBase {
|
|
|
2538
2559
|
staleReason: ['string', 'text', ''],
|
|
2539
2560
|
powerSource: ['string', 'text', 'unknown-or-incomplete'],
|
|
2540
2561
|
heartbeat: ['string', 'value.time', ''],
|
|
2562
|
+
dashboardConfirmedKey: ['string', 'text', ''],
|
|
2541
2563
|
lastHeartbeatMs: ['number', 'value.time', 0],
|
|
2542
2564
|
lastSeen: ['string', 'value.time', ''],
|
|
2543
2565
|
lastSeenMs: ['number', 'value.time', 0],
|