iobroker.eos-admin 9.0.28 → 9.0.30
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 +12 -12
- package/README.md +9 -9
- package/adminWww/.vite/manifest.json +39 -39
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +107 -107
- package/adminWww/assets/{AdapterUpdateDialog-DBLX7GoO.js → AdapterUpdateDialog-qC6MANmq.js} +1 -1
- package/adminWww/assets/{Adapters-c250DTTU.js → Adapters-C8quekd0.js} +1 -1
- package/adminWww/assets/{ConfigManager-BBUXk8hZ.js → ConfigManager-hRZCAWRy.js} +1 -1
- package/adminWww/assets/{Enums-CWJJ2zNF.js → Enums-Dd0Z2KfV.js} +1 -1
- package/adminWww/assets/{Fields-CNefAzNH.js → Fields-WfHFtdYw.js} +1 -1
- package/adminWww/assets/{Files-Bf8oZSk6.js → Files-DyG14v5-.js} +1 -1
- package/adminWww/assets/{Hosts-8gg41ODb.js → Hosts-3pSXVMxW.js} +1 -1
- package/adminWww/assets/{Instances-PPTEPJQN.js → Instances-DT6fp_TN.js} +1 -1
- package/adminWww/assets/{Intro-9c_ynpJu.js → Intro-C6pMFhbu.js} +1 -1
- package/adminWww/assets/{Logs-Brgb9kR_.js → Logs-suepwNkZ.js} +1 -1
- package/adminWww/assets/{Objects-DHVNfs_x.js → Objects-CpjVeEjv.js} +1 -1
- package/adminWww/assets/{Overview-CgnpH8e8.js → Overview-CxZJgF7X.js} +1 -1
- package/adminWww/assets/{State-vVobamei.js → State-CUsia7sz.js} +1 -1
- package/adminWww/assets/{UsedResources-1fEUqiQ6.js → UsedResources-C3zr7pM8.js} +1 -1
- package/adminWww/assets/{Users-oRpvFtQR.js → Users-BoBSUBkO.js} +1 -1
- package/adminWww/assets/{bootstrap-st8VxLDc.js → bootstrap-CM9qXoc1.js} +3 -3
- package/adminWww/assets/{hostInit-OQMl4yOT.js → hostInit-BQPg9kSQ.js} +1 -1
- package/adminWww/assets/{icons-material-DeF0gQyK.js → icons-material-CDhwkQ0o.js} +1 -1
- package/adminWww/assets/{index-D4lV2S7J.js → index-BrXN_pu2.js} +2 -2
- package/adminWww/assets/{installSVGRenderer-1WdbDz-H.js → installSVGRenderer-BEgWxsNI.js} +1 -1
- package/adminWww/assets/{mf-entry-bootstrap-0-3b253ab0.js → mf-entry-bootstrap-0-3ef6056c.js} +2 -2
- 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.30.js +12 -0
- package/adminWww/remoteEntry.js +1 -1
- package/build/lib/eosRuntimeControl.js +21 -10
- package/build/lib/eosRuntimeControl.js.map +1 -1
- package/build/lib/eosRuntimeHealth.js +12 -9
- package/build/lib/eosRuntimeHealth.js.map +1 -1
- package/build/lib/eosSplitRuntime.js +61 -0
- package/build/lib/eosSplitRuntime.js.map +1 -0
- package/build/lib/eosTlsHttp.js +25 -0
- package/build/lib/eosTlsHttp.js.map +1 -1
- package/build/lib/eosTlsManager.js +317 -67
- package/build/lib/eosTlsManager.js.map +1 -1
- package/build/lib/eosUiProcess.js +91 -13
- package/build/lib/eosUiProcess.js.map +1 -1
- package/build/lib/eosUiProcessWorker.js +15 -8
- package/build/lib/eosUiProcessWorker.js.map +1 -1
- package/build/lib/web.js +17 -7
- package/build/lib/web.js.map +1 -1
- package/docs/README.md +3 -2
- package/docs/reports/unified-9.0.30/PRUEFBERICHT.md +37 -0
- package/docs/reports/unified-9.0.30/PRUEFERGEBNISSE.json +112 -0
- package/docs/reports/unified-9.0.30/raw/INDEX.json +137 -0
- package/docs/reports/unified-9.0.30/raw/acceptance-node22.log +30 -0
- package/docs/reports/unified-9.0.30/raw/acceptance-node24.log +11 -0
- package/docs/reports/unified-9.0.30/raw/backend.log +5 -0
- package/docs/reports/unified-9.0.30/raw/baseline-10000.json +1 -0
- package/docs/reports/unified-9.0.30/raw/baseline-50000.json +1 -0
- package/docs/reports/unified-9.0.30/raw/candidate-10000.json +1 -0
- package/docs/reports/unified-9.0.30/raw/candidate-50000.json +1 -0
- package/docs/reports/unified-9.0.30/raw/frontend.log +151 -0
- package/docs/reports/unified-9.0.30/raw/installer.log +26 -0
- package/docs/reports/unified-9.0.30/raw/lint.log +5 -0
- package/docs/reports/unified-9.0.30/raw/modules.log +5 -0
- package/docs/reports/unified-9.0.30/raw/node22-profile.json +611 -0
- package/docs/reports/unified-9.0.30/raw/node22-tests-final.log +17170 -0
- package/docs/reports/unified-9.0.30/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.30/raw/node24-profile.json +611 -0
- package/docs/reports/unified-9.0.30/raw/node24-tests-final.log +2862 -0
- package/docs/reports/unified-9.0.30/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.30/raw/npm-audit-runtime.json +77 -0
- package/docs/reports/unified-9.0.30/raw/profile-combined-node24.log +12 -0
- package/docs/reports/unified-9.0.30/raw/profile-split-node24.log +12 -0
- package/docs/reports/unified-9.0.30/raw/split-lint.log +0 -0
- package/docs/reports/unified-9.0.30/raw/typecheck.log +5 -0
- package/docs/reports/unified-9.0.30/raw/ui-runtime.log +8 -0
- package/docs/start/START_HIER_9.0.30.md +16 -0
- package/docs/unified/ARCHITECTURE.md +18 -12
- package/docs/unified/NEXOWATT_TLS_DE.md +18 -4
- package/io-package.json +12 -12
- package/modules/devices/README.md +1 -1
- package/modules/devices/lib/deviceRuntime.js +18 -14
- package/modules/devices/test/driverLoading.test.js +76 -0
- package/package.json +7 -5
- package/public/eos-runtime/index.js +7 -6
- package/public/eos-tls/index.html +96 -8
- package/public/eos-tls/index.js +194 -41
- package/release-manifests/unified/build-environment.cdx.json +6 -6
- package/release-manifests/unified/files.json +168 -107
- 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 +214 -6
- package/release-manifests/unified/runtime.cdx.json +27 -27
- package/release-manifests/unified/validation.json +15 -15
- package/tools/eos-release-check.cjs +2 -0
- package/tools/eos-release-manifest.cjs +1 -1
- package/ui/io-package.json +5 -1
- package/ui/lib/datapoint-picker.js +184 -0
- package/ui/lib/eos-presentation-routes.js +61 -0
- package/ui/lib/eos-presentation.js +140 -0
- package/ui/lib/ephemeral-cache.js +7 -4
- package/ui/main.js +5 -302
- package/ui/package.json +1 -1
- package/ui/www/manifest.webmanifest +2 -2
- package/adminWww/remoteEntry-eos-9.0.28.js +0 -12
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/** @type {Record<string,string>} */ const states = { running: 'Läuft', starting: 'Startet', stopping: 'Wird beendet',
|
|
6
6
|
stopped: 'Beendet', disabled: 'Deaktiviert', moduleDisabled: 'Modul deaktiviert', blocked: 'Start blockiert', notStarted: 'Nicht gestartet',
|
|
7
7
|
error: 'Fehler', failed: 'Fehler', backoff: 'Neustart wartet', unknown: 'Unbestätigt' };
|
|
8
|
-
/** @type {Record<string,string>} */ const labels = { admin: 'EOS Administration', ui: 'Oberfläche
|
|
8
|
+
/** @type {Record<string,string>} */ const labels = { admin: 'EOS Administration', ui: 'Oberfläche', ems: 'Energiemanagement (EMS)', devices: 'Geräte', eebus: 'EEBus', backup: 'Sicherung', ocpp: 'OCPP-Ladestationen' };
|
|
9
9
|
/** @type {Record<string,string>} */ const errors = {
|
|
10
10
|
AUTHENTICATION_REQUIRED: 'Bitte erneut bei EOS anmelden.',
|
|
11
11
|
ADMIN_REQUIRED: 'Für die Prozessbedienung ist eine Administratoranmeldung erforderlich.',
|
|
@@ -112,10 +112,11 @@
|
|
|
112
112
|
if (!entry) note.textContent = 'Prozessbedienung derzeit nicht verfügbar. Status aktualisieren.';
|
|
113
113
|
else if (entry.busy) note.textContent = 'Steuerauftrag läuft. Der bestätigte Prozessstatus wird automatisch aktualisiert.';
|
|
114
114
|
else if (entry.reason) { note.textContent = explanation(entry.reason); note.classList.add('is-blocked'); }
|
|
115
|
-
else if (id === 'ui') note.textContent = 'Deaktivieren beendet Oberfläche
|
|
115
|
+
else if (id === 'ui') note.textContent = 'Deaktivieren beendet die Oberfläche. Die Administration und diese Seite bleiben erreichbar.';
|
|
116
|
+
else if (id === 'ems') note.textContent = 'Deaktivieren hält die EMS-Regelung an. Aktivieren startet sie mit der gespeicherten Konfiguration.';
|
|
116
117
|
else note.textContent = 'Aktivieren schaltet Modul und Prozess gemeinsam ein. Deaktivieren beendet den Prozess; die Konfiguration bleibt gespeichert.';
|
|
117
118
|
card.append(actions, note);
|
|
118
|
-
if (id !== 'ui') {
|
|
119
|
+
if (id !== 'ui' && id !== 'ems') {
|
|
119
120
|
const link = document.createElement('a'); link.className = 'runtime-config-link'; link.href = `/modules/${id}/`;
|
|
120
121
|
link.textContent = 'Moduleinstellungen öffnen'; card.append(link);
|
|
121
122
|
}
|
|
@@ -127,7 +128,7 @@
|
|
|
127
128
|
/** @param {unknown} input */
|
|
128
129
|
function render(input) {
|
|
129
130
|
const value = record(input); const now = Date.now();
|
|
130
|
-
if (!Array.isArray(value.processes) || value.processes.length >
|
|
131
|
+
if (!Array.isArray(value.processes) || value.processes.length > 39 || typeof value.observedAt !== 'number' ||
|
|
131
132
|
!Number.isSafeInteger(value.observedAt) || value.observedAt > now + 5000 || now - value.observedAt > 15000) throw new Error('EOS_RUNTIME_INVALID_STATUS');
|
|
132
133
|
const fragment = document.createDocumentFragment(); const seen = new Set(); let external = false;
|
|
133
134
|
controls.clear(); csrf = typeof value.csrfToken === 'string' && value.csrfToken.length >= 16 && value.csrfToken.length <= 512 ? value.csrfToken : '';
|
|
@@ -153,7 +154,7 @@
|
|
|
153
154
|
const fields = document.createElement('dl');
|
|
154
155
|
field(fields, 'Prozessnummer (PID)', ['running', 'starting', 'stopping'].includes(state) && typeof row.pid === 'number' && row.pid > 0 ? natural(row.pid) : 'Unbekannt');
|
|
155
156
|
field(fields, isExternal ? 'Controller meldet aktiv' : id === 'ui' ? 'Oberfläche aktiv' : id === 'admin' ? 'Administration erreichbar' : 'Betrieb freigegeben', boolean(row.active, 'Ja', 'Nein'));
|
|
156
|
-
if (id === '
|
|
157
|
+
if (id === 'ems') field(fields, 'EMS bereit', boolean(row.emsReady, 'Ja', 'Nein'));
|
|
157
158
|
if (isExternal) field(fields, 'OCPP-Verbindung', boolean(row.connected, 'Verbunden', 'Getrennt'));
|
|
158
159
|
if (!isExternal && id !== 'admin') {
|
|
159
160
|
if (entry) field(fields, 'Prozessfreigabe', entry.enabled ? 'Aktiviert' : 'Deaktiviert');
|
|
@@ -179,7 +180,7 @@
|
|
|
179
180
|
}
|
|
180
181
|
fragment.append(card);
|
|
181
182
|
}
|
|
182
|
-
if (!seen.has('admin') || !seen.has('ui')) throw new Error('EOS_RUNTIME_INVALID_STATUS');
|
|
183
|
+
if (!seen.has('admin') || !seen.has('ui') || !seen.has('ems')) throw new Error('EOS_RUNTIME_INVALID_STATUS');
|
|
183
184
|
list.replaceChildren(fragment); element('observed-at').textContent = `Abfrage bestätigt: ${date(value.observedAt)}`;
|
|
184
185
|
element('external-note').textContent = external ? 'Zusätzlich vorhandene OCPP-Adapter werden separat angezeigt. Ihre Prozessnummer stammt ausschließlich aus bestätigten Controller-Meldungen. Ein gleichzeitig laufender Altadapter muss vor der Übernahme vollständig beendet sein.' : 'Das integrierte OCPP-Modul läuft als eigener EOS-Prozess. Es ist keine zusätzliche aktive OCPP-Adapterinstanz erfasst.';
|
|
185
186
|
message.textContent = 'Prozessstatus aktualisiert.'; message.className = '';
|
|
@@ -1,10 +1,98 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
|
-
<html lang="de"
|
|
2
|
+
<html lang="de">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
6
|
+
<title>NexoWatt EOS · Zertifikate</title>
|
|
7
|
+
<link rel="stylesheet" href="/modules/shared/eos-module.css">
|
|
8
|
+
<script src="./index.js" defer></script>
|
|
9
|
+
<script src="/eos-session-idle.js" defer></script>
|
|
3
10
|
</head>
|
|
4
|
-
<body class="eos-module-page"
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
<
|
|
8
|
-
<
|
|
9
|
-
<
|
|
10
|
-
</
|
|
11
|
+
<body class="eos-module-page">
|
|
12
|
+
<main class="eos-module-main">
|
|
13
|
+
<header class="eos-page-header">
|
|
14
|
+
<a class="eos-brand" href="/" aria-label="NexoWatt EOS Dashboard"><img src="/system/img/eos/nexowatt-eos-brand-wide.png" width="190" height="52" alt="NexoWatt EOS"></a>
|
|
15
|
+
<nav class="eos-module-nav" aria-label="EOS Navigation">
|
|
16
|
+
<a href="/">EOS Dashboard</a><a href="/installer/">Installer</a><a href="/system/">EOS Administration</a><a href="/modules/devices/">Geräte</a><a href="/modules/eebus/">EEBus</a><a href="/modules/backup/">Sicherung</a><a href="/security/tls/" aria-current="page">Zertifikate</a>
|
|
17
|
+
</nav>
|
|
18
|
+
</header>
|
|
19
|
+
<section class="eos-module-hero">
|
|
20
|
+
<div>
|
|
21
|
+
<h1>HTTPS-Zertifikate</h1>
|
|
22
|
+
<p>Erstelle ein Zertifikat für dieses EOS und richte das Vertrauen auf deinen Endgeräten ein.</p>
|
|
23
|
+
</div>
|
|
24
|
+
</section>
|
|
25
|
+
|
|
26
|
+
<p id="message" class="eos-message" role="status" aria-live="polite"></p>
|
|
27
|
+
|
|
28
|
+
<div class="eos-workflow-grid">
|
|
29
|
+
<section class="eos-panel">
|
|
30
|
+
<h2>1. Zertifikate erstellen</h2>
|
|
31
|
+
<form id="localForm" class="eos-stack-form">
|
|
32
|
+
<label for="names">Gerätenamen und IP-Adressen, je eine pro Zeile</label>
|
|
33
|
+
<textarea id="names" rows="5" maxlength="8192" aria-describedby="namesHint" required></textarea>
|
|
34
|
+
<p id="namesHint">Trage die Namen und festen IP-Adressen ein, über die du dieses EOS im Browser öffnest. Namensauflösung und Port 443 werden separat eingerichtet.</p>
|
|
35
|
+
<label class="eos-inline-check"><input id="replace" type="checkbox">Vorhandenen, noch nicht übernommenen Entwurf ersetzen</label>
|
|
36
|
+
<button type="submit" class="eos-primary" id="generateLocal" disabled>HTTPS-Zertifikate erstellen</button>
|
|
37
|
+
</form>
|
|
38
|
+
</section>
|
|
39
|
+
|
|
40
|
+
<section class="eos-panel">
|
|
41
|
+
<h2>2. Herunterladen und übernehmen</h2>
|
|
42
|
+
<p id="noLocalDraft">Hier erscheinen die Downloads und der Fingerabdruck nach der Erstellung.</p>
|
|
43
|
+
<div id="localDraft" hidden>
|
|
44
|
+
<p>Lade für Windows oder iPhone das öffentliche Stammzertifikat als CER-Datei herunter. Für dieses EOS kannst du das Gerätezertifikat direkt übernehmen.</p>
|
|
45
|
+
<a class="eos-download" id="localTrustDownload" download>Stammzertifikat für Endgeräte (.cer)</a>
|
|
46
|
+
<a class="eos-download" id="localRootDownload" download>Stammzertifikat (.pem)</a>
|
|
47
|
+
<a class="eos-download" id="localDeviceDownload" download>Gerätezertifikat (.pem)</a>
|
|
48
|
+
<div class="eos-stack-form">
|
|
49
|
+
<label for="localFingerprint">SHA-256-Fingerabdruck des Stammzertifikats</label>
|
|
50
|
+
<input type="text" id="localFingerprint" spellcheck="false" readonly>
|
|
51
|
+
<button type="button" id="copyFingerprint">Fingerabdruck kopieren</button>
|
|
52
|
+
</div>
|
|
53
|
+
<p id="trustChange" class="notice" hidden>Das neue Stammzertifikat unterscheidet sich vom bisher verwendeten. Installiere es vor der Übernahme auf den Endgeräten, die du weiter für den Zugriff brauchst.</p>
|
|
54
|
+
<button type="button" class="eos-primary" id="activateLocal">Für dieses EOS übernehmen</button>
|
|
55
|
+
<p>Bei der ersten Umstellung wird das Zertifikat beim nächsten regulären Adapterneustart aktiv.</p>
|
|
56
|
+
</div>
|
|
57
|
+
</section>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<section class="eos-panel">
|
|
61
|
+
<h2>Aktueller Stand</h2>
|
|
62
|
+
<dl id="status" class="eos-detail-list"></dl>
|
|
63
|
+
<button type="button" id="reload">Status aktualisieren</button>
|
|
64
|
+
<a class="eos-download" id="rootDownload" href="/api/eos/tls/root.cer" download hidden>Öffentliches Stammzertifikat des aktuellen Stands herunterladen</a>
|
|
65
|
+
</section>
|
|
66
|
+
|
|
67
|
+
<section class="eos-panel">
|
|
68
|
+
<h2>Vertrauen auf Endgeräten</h2>
|
|
69
|
+
<p>Übertrage das öffentliche Stammzertifikat aus deiner bestätigten EOS-Verwaltung auf deine Endgeräte. Bei einer Übergabe gib den Fingerabdruck auf einem separaten, vertrauenswürdigen Weg weiter.</p>
|
|
70
|
+
<p><strong>Windows:</strong> Das öffentliche Stammzertifikat nach Vergleich des Fingerabdrucks in „Vertrauenswürdige Stammzertifizierungsstellen“ importieren.</p>
|
|
71
|
+
<p><strong>iPhone / iPad:</strong> Zertifikat installieren und anschließend unter Einstellungen → Allgemein → Info → Zertifikatsvertrauenseinstellungen das volle Vertrauen aktivieren.</p>
|
|
72
|
+
<p><strong>macOS / Android / Firefox:</strong> Das Stammzertifikat im jeweiligen System- oder Browser-Zertifikatsspeicher installieren. Eigene App-Vertrauensregeln können davon abweichen.</p>
|
|
73
|
+
<p><a href="/security/trust/">Einrichtung auf diesem Gerät öffnen</a>. Dort findest du das übernommene öffentliche Stammzertifikat auch als CER-Datei.</p>
|
|
74
|
+
</section>
|
|
75
|
+
|
|
76
|
+
<details class="eos-panel" id="externalWorkflow">
|
|
77
|
+
<summary>Optional: Zertifikat von NexoWatt signieren lassen</summary>
|
|
78
|
+
<form id="requestForm" class="eos-stack-form">
|
|
79
|
+
<p>Die Anfrage verwendet die Namen und IP-Adressen aus Schritt 1. Der private Geräteschlüssel bleibt auf diesem EOS.</p>
|
|
80
|
+
<button type="submit" id="generateExternal" disabled>Anfrage für NexoWatt erstellen</button>
|
|
81
|
+
</form>
|
|
82
|
+
<p id="noExternalDraft">Erstelle eine Anfrage, um sie herunterladen und signieren lassen zu können.</p>
|
|
83
|
+
<div id="externalDraft" hidden>
|
|
84
|
+
<p><a class="eos-download" id="requestDownload" href="/api/eos/tls/request.pem" download>Zertifikatsanfrage für NexoWatt herunterladen</a></p>
|
|
85
|
+
<form id="importForm" class="eos-stack-form">
|
|
86
|
+
<label for="certificate">Gerätezertifikat mit Zwischenzertifikaten (PEM)</label>
|
|
87
|
+
<input id="certificate" type="file" accept=".pem,.crt" required>
|
|
88
|
+
<label for="root">Öffentliches Stammzertifikat (PEM)</label>
|
|
89
|
+
<input id="root" type="file" accept=".pem,.crt" required>
|
|
90
|
+
<label for="fingerprint">Unabhängig bestätigter SHA-256-Fingerabdruck der Stamm-CA</label>
|
|
91
|
+
<input id="fingerprint" type="text" maxlength="100" autocomplete="off" required>
|
|
92
|
+
<button type="submit" class="eos-primary" id="importCertificate">Prüfen und übernehmen</button>
|
|
93
|
+
</form>
|
|
94
|
+
</div>
|
|
95
|
+
</details>
|
|
96
|
+
</main>
|
|
97
|
+
</body>
|
|
98
|
+
</html>
|
package/public/eos-tls/index.js
CHANGED
|
@@ -8,70 +8,223 @@
|
|
|
8
8
|
const errors = {
|
|
9
9
|
AUTHENTICATION_REQUIRED: 'Bitte erneut bei EOS anmelden. Die Eingaben bleiben in diesem Fenster erhalten.',
|
|
10
10
|
ADMIN_REQUIRED: 'Für die Zertifikatsverwaltung ist ein Administratorkonto erforderlich.',
|
|
11
|
+
PASSWORD_CHANGE_REQUIRED: 'Ändere zuerst dein EOS-Passwort und öffne danach die Zertifikatsverwaltung erneut.',
|
|
11
12
|
AUTH_CSRF: 'Die Sicherheitsfreigabe ist abgelaufen. Status aktualisieren und erneut versuchen.',
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
EOS_TLS_INVALID_NAMES: 'Bitte gültige Gerätenamen und IP-Adressen eingeben.',
|
|
14
|
+
EOS_TLS_LOCAL_NAME_NOT_ASSIGNED: 'Die lokale Ausstellung verwendet nur Namen und IP-Adressen dieses EOS. Nutze für weitere bestätigte Namen den optionalen Weg über NexoWatt.',
|
|
15
|
+
EOS_TLS_PENDING_REQUEST_EXISTS: 'Ein Entwurf liegt bereits vor. Aktiviere zum Ersetzen das Kontrollfeld in Schritt 1.',
|
|
16
|
+
EOS_TLS_REQUEST_MISMATCH: 'Der Vorgang gehört nicht zum aktuellen Entwurf. Bitte Status aktualisieren.',
|
|
17
|
+
EOS_TLS_LOCAL_CERTIFICATE_NOT_FOUND: 'Der lokale Entwurf ist nicht mehr verfügbar. Bitte Status aktualisieren.',
|
|
14
18
|
EOS_TLS_ROOT_FINGERPRINT_MISMATCH: 'Der bestätigte Fingerabdruck passt nicht zum Stammzertifikat.',
|
|
15
19
|
EOS_TLS_SAN_MISMATCH: 'Das Zertifikat enthält nicht alle angeforderten Namen und IP-Adressen.',
|
|
16
20
|
EOS_TLS_KEY_OR_CA_MISMATCH: 'Zertifikat, Geräteschlüssel und Stamm-CA passen nicht zusammen.',
|
|
17
21
|
EOS_TLS_SERVER_USAGE_REQUIRED: 'Das Zertifikat ist nicht ausdrücklich für HTTPS-Server ausgestellt.',
|
|
18
22
|
EOS_TLS_LIFETIME_INVALID: 'Das Gerätezertifikat muss noch mindestens einen Tag gültig sein und darf höchstens 397 Tage Laufzeit haben.',
|
|
19
|
-
EOS_TLS_OPENSSL_FAILED: 'Die
|
|
23
|
+
EOS_TLS_OPENSSL_FAILED: 'Die Zertifikatsaktion ist fehlgeschlagen. Prüfe das Systemprotokoll und die OpenSSL-Verfügbarkeit.',
|
|
20
24
|
EOS_TLS_STORAGE_UNAVAILABLE: 'Der geschützte Zertifikatsspeicher ist nicht verfügbar. Bestehenden HTTPS-Zugang beibehalten und das Systemprotokoll prüfen.',
|
|
21
25
|
EOS_TLS_BUSY: 'Eine Zertifikatsaktion läuft bereits. Kurz warten und den Status aktualisieren.',
|
|
22
|
-
EOS_TLS_STORAGE_SYNC_WARNING: 'Der neue Stand wurde
|
|
23
|
-
EOS_TLS_PENDING_CLEANUP_WARNING: 'Das Zertifikat wurde übernommen
|
|
26
|
+
EOS_TLS_STORAGE_SYNC_WARNING: 'Der neue Stand wurde gespeichert, aber das Dateisystem konnte die dauerhafte Verzeichnissicherung nicht bestätigen. Datenträger und Systemprotokoll prüfen.',
|
|
27
|
+
EOS_TLS_PENDING_CLEANUP_WARNING: 'Das Zertifikat wurde übernommen. Eine verbrauchte Anfragedatei konnte noch nicht bereinigt werden und bleibt gesperrt.',
|
|
24
28
|
};
|
|
25
|
-
|
|
29
|
+
|
|
30
|
+
function message(value, error = false) {
|
|
31
|
+
byId('message').textContent = value;
|
|
32
|
+
byId('message').className = error ? 'eos-message is-error' : 'eos-message';
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function describeError(code, fallback = 'Die Zertifikatsaktion konnte nicht abgeschlossen werden.') {
|
|
36
|
+
return Object.hasOwn(errors, code) ? errors[code] : fallback;
|
|
37
|
+
}
|
|
38
|
+
|
|
26
39
|
async function api(path, data) {
|
|
40
|
+
if (data && (!csrf || state?.error)) throw new Error('Bitte zuerst den aktuellen Status laden.');
|
|
27
41
|
const controller = new AbortController();
|
|
28
|
-
const timer = setTimeout(() => controller.abort(),
|
|
42
|
+
const timer = setTimeout(() => controller.abort(), 45000);
|
|
29
43
|
try {
|
|
30
|
-
const response = await fetch(path, {
|
|
31
|
-
|
|
44
|
+
const response = await fetch(path, {
|
|
45
|
+
method: data ? 'POST' : 'GET',
|
|
46
|
+
credentials: 'same-origin',
|
|
47
|
+
cache: 'no-store',
|
|
48
|
+
redirect: 'error',
|
|
49
|
+
signal: controller.signal,
|
|
50
|
+
headers: data ? { 'Content-Type': 'application/json', 'x-nw-csrf': csrf } : {},
|
|
51
|
+
body: data ? JSON.stringify(data) : undefined,
|
|
52
|
+
});
|
|
32
53
|
const result = await response.json();
|
|
33
|
-
if (!response.ok) throw new Error(
|
|
54
|
+
if (!response.ok) throw new Error(describeError(result?.error));
|
|
34
55
|
return result;
|
|
35
|
-
} finally {
|
|
56
|
+
} finally {
|
|
57
|
+
clearTimeout(timer);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function fingerprintHex(value) {
|
|
62
|
+
if (typeof value !== 'string') return '';
|
|
63
|
+
const hex = value.replaceAll(':', '').toUpperCase();
|
|
64
|
+
return /^[A-F0-9]{64}$/.test(hex) ? hex : '';
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function currentPending() {
|
|
68
|
+
const pending = state?.pending;
|
|
69
|
+
return typeof pending?.requestId === 'string' && /^[a-f0-9]{32}$/.test(pending.requestId) ? pending : null;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function localDraft() {
|
|
73
|
+
const pending = currentPending();
|
|
74
|
+
return pending?.local === true && fingerprintHex(pending.rootFingerprint) ? pending : null;
|
|
36
75
|
}
|
|
76
|
+
|
|
77
|
+
function setActions() {
|
|
78
|
+
byId('reload').disabled = busy;
|
|
79
|
+
byId('generateLocal').disabled = busy || !csrf || !!state?.error;
|
|
80
|
+
byId('generateExternal').disabled = busy || !csrf || !!state?.error;
|
|
81
|
+
const pending = currentPending();
|
|
82
|
+
const local = localDraft();
|
|
83
|
+
byId('copyFingerprint').disabled = busy || !local;
|
|
84
|
+
byId('activateLocal').disabled = busy || !csrf || !local || !!state?.error;
|
|
85
|
+
byId('importCertificate').disabled = busy || !csrf || !pending || pending.local === true || !!state?.error;
|
|
86
|
+
}
|
|
87
|
+
|
|
37
88
|
function render(value) {
|
|
38
89
|
state = value;
|
|
39
|
-
if (value.csrfToken) csrf = value.csrfToken;
|
|
40
|
-
const status = byId('status');
|
|
90
|
+
if (typeof value.csrfToken === 'string') csrf = value.csrfToken;
|
|
91
|
+
const status = byId('status');
|
|
92
|
+
status.replaceChildren();
|
|
41
93
|
const rows = [
|
|
42
|
-
['Betrieb', value.restartRequired ? 'Zertifikat geprüft und gespeichert
|
|
43
|
-
['Aussteller', value.issuer || 'Noch kein
|
|
44
|
-
['Zertifikatskette gültig bis', value.effectiveValidTo || value.validTo || '—'],
|
|
45
|
-
['
|
|
46
|
-
['
|
|
47
|
-
['
|
|
94
|
+
['Betrieb', value.restartRequired ? 'Zertifikat geprüft und gespeichert. Aktivierung beim nächsten regulären Adapterneustart.' : value.mode === 'nexowatt-managed' ? 'Verwaltetes EOS-Zertifikat aktiv' : 'Bestehendes ioBroker-Zertifikat aktiv'],
|
|
95
|
+
['Aussteller', value.issuer || 'Noch kein EOS-Zertifikat übernommen'],
|
|
96
|
+
['Zertifikatskette gültig bis', value.effectiveValidTo || value.validTo || '—'],
|
|
97
|
+
['Zertifikatsstatus', value.valid === false ? 'Abgelaufen oder noch nicht gültig. Erneuerung erforderlich.' : value.expiresSoon ? 'Erneuerung innerhalb von 30 Tagen erforderlich.' : value.valid ? 'Zeitlich gültig' : '—'],
|
|
98
|
+
['Namen und IP-Adressen', (value.names || []).join(', ') || '—'],
|
|
99
|
+
['Stamm-CA SHA-256', value.rootFingerprint || '—'],
|
|
100
|
+
['Gerätezertifikat SHA-256', value.fingerprint || '—'],
|
|
48
101
|
];
|
|
49
|
-
for (const [name, content] of rows) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
102
|
+
for (const [name, content] of rows) {
|
|
103
|
+
const term = document.createElement('dt');
|
|
104
|
+
term.textContent = name;
|
|
105
|
+
const detail = document.createElement('dd');
|
|
106
|
+
detail.textContent = content;
|
|
107
|
+
status.append(term, detail);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const pending = currentPending();
|
|
111
|
+
const local = localDraft();
|
|
112
|
+
const external = Boolean(pending && pending.local !== true);
|
|
113
|
+
const localFingerprint = fingerprintHex(local?.rootFingerprint);
|
|
114
|
+
const activeFingerprint = fingerprintHex(value.rootFingerprint);
|
|
115
|
+
byId('localDraft').hidden = !local;
|
|
116
|
+
byId('noLocalDraft').hidden = Boolean(local);
|
|
117
|
+
byId('localFingerprint').value = localFingerprint.match(/../g)?.join(':') || '';
|
|
118
|
+
byId('trustChange').hidden = !local || !activeFingerprint || localFingerprint === activeFingerprint;
|
|
119
|
+
for (const [id, file] of [['localTrustDownload', 'root.cer'], ['localRootDownload', 'root.pem'], ['localDeviceDownload', 'device.pem']]) {
|
|
120
|
+
const link = byId(id);
|
|
121
|
+
if (local) link.href = `/api/eos/tls/local/${file}?requestId=${local.requestId}`;
|
|
122
|
+
else link.removeAttribute('href');
|
|
123
|
+
}
|
|
124
|
+
byId('rootDownload').hidden = !activeFingerprint;
|
|
125
|
+
byId('externalDraft').hidden = !external;
|
|
126
|
+
byId('noExternalDraft').hidden = external;
|
|
127
|
+
if (external) byId('externalWorkflow').open = true;
|
|
128
|
+
if (!byId('names').value) byId('names').value = (pending?.names || value.suggestedNames || []).join('\n');
|
|
129
|
+
setActions();
|
|
130
|
+
if (value.error) message(describeError(value.error), true);
|
|
131
|
+
else if (value.warnings?.length) message(value.warnings.map(code => describeError(code)).join(' '), true);
|
|
55
132
|
}
|
|
133
|
+
|
|
56
134
|
async function run(task) {
|
|
57
135
|
if (busy) return;
|
|
58
136
|
busy = true;
|
|
59
|
-
|
|
60
|
-
try {
|
|
61
|
-
|
|
137
|
+
setActions();
|
|
138
|
+
try {
|
|
139
|
+
await task();
|
|
140
|
+
} catch (error) {
|
|
141
|
+
message(error.name === 'AbortError' ? 'Zeitüberschreitung. Status aktualisieren, bevor du die Aktion erneut ausführst.' : error.message, true);
|
|
142
|
+
} finally {
|
|
143
|
+
busy = false;
|
|
144
|
+
setActions();
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function pendingInput() {
|
|
149
|
+
return {
|
|
150
|
+
names: byId('names').value.split(/[\n,]+/).map(value => value.trim()).filter(Boolean),
|
|
151
|
+
replace: byId('replace').checked,
|
|
152
|
+
};
|
|
62
153
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
154
|
+
|
|
155
|
+
function showActivation(value) {
|
|
156
|
+
render(value);
|
|
157
|
+
if (value.error || value.warnings?.length) return;
|
|
158
|
+
message(value.restartRequired
|
|
159
|
+
? 'Gespeichert. Beim nächsten regulären Adapterneustart wird das Zertifikat aktiv.'
|
|
160
|
+
: 'Das Zertifikat ist jetzt aktiv. Richte das Vertrauen auf deinen Endgeräten ein.');
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
byId('reload').addEventListener('click', () => {
|
|
164
|
+
void run(async () => {
|
|
165
|
+
const value = await api('/api/eos/tls');
|
|
166
|
+
render(value);
|
|
167
|
+
if (!value.error && !value.warnings?.length) message('Status aktualisiert.');
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
byId('localForm').addEventListener('submit', event => {
|
|
171
|
+
event.preventDefault();
|
|
172
|
+
void run(async () => {
|
|
173
|
+
const value = await api('/api/eos/tls/local', pendingInput());
|
|
174
|
+
render(value);
|
|
175
|
+
byId('replace').checked = false;
|
|
176
|
+
if (localDraft() && !value.error && !value.warnings?.length) message('Zertifikate und Fingerabdruck stehen in Schritt 2 bereit.');
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
byId('copyFingerprint').addEventListener('click', async () => {
|
|
180
|
+
const field = byId('localFingerprint');
|
|
181
|
+
if (busy || !field.value) return;
|
|
182
|
+
try {
|
|
183
|
+
await navigator.clipboard.writeText(field.value);
|
|
184
|
+
message('SHA-256-Fingerabdruck kopiert.');
|
|
185
|
+
} catch {
|
|
186
|
+
field.focus();
|
|
187
|
+
field.select();
|
|
188
|
+
message('Der Fingerabdruck ist markiert. Kopiere ihn über die Tastatur oder das Auswahlmenü.');
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
byId('activateLocal').addEventListener('click', () => {
|
|
192
|
+
void run(async () => {
|
|
193
|
+
const local = localDraft();
|
|
194
|
+
if (!local) throw new Error('Bitte zuerst HTTPS-Zertifikate erstellen.');
|
|
195
|
+
showActivation(await api('/api/eos/tls/local/activate', {
|
|
196
|
+
requestId: local.requestId,
|
|
197
|
+
rootFingerprint: byId('localFingerprint').value,
|
|
198
|
+
}));
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
byId('requestForm').addEventListener('submit', event => {
|
|
202
|
+
event.preventDefault();
|
|
203
|
+
void run(async () => {
|
|
204
|
+
if (!byId('names').reportValidity()) return;
|
|
205
|
+
const value = await api('/api/eos/tls/request', pendingInput());
|
|
206
|
+
render(value);
|
|
207
|
+
byId('replace').checked = false;
|
|
208
|
+
if (!value.error && !value.warnings?.length) message('Anfrage erstellt. Lade sie herunter und lasse sie von NexoWatt signieren.');
|
|
209
|
+
});
|
|
210
|
+
});
|
|
211
|
+
byId('importForm').addEventListener('submit', event => {
|
|
212
|
+
event.preventDefault();
|
|
213
|
+
void run(async () => {
|
|
214
|
+
const pending = currentPending();
|
|
215
|
+
if (!pending || pending.local === true) throw new Error('Bitte zuerst eine Anfrage für NexoWatt erstellen.');
|
|
216
|
+
const certificate = byId('certificate').files[0];
|
|
217
|
+
const root = byId('root').files[0];
|
|
218
|
+
if (!certificate || !root || certificate.size > 48000 || root.size > 16000) throw new Error('Bitte gültige PEM-Dateien auswählen (Gerätekette bis 48 kB, Stammzertifikat bis 16 kB).');
|
|
219
|
+
const value = await api('/api/eos/tls/certificate', {
|
|
220
|
+
requestId: pending.requestId,
|
|
221
|
+
certificate: await certificate.text(),
|
|
222
|
+
rootCertificate: await root.text(),
|
|
223
|
+
rootFingerprint: byId('fingerprint').value.trim(),
|
|
224
|
+
});
|
|
225
|
+
showActivation(value);
|
|
226
|
+
byId('importForm').reset();
|
|
227
|
+
});
|
|
228
|
+
});
|
|
76
229
|
void run(async () => { render(await api('/api/eos/tls')); });
|
|
77
230
|
})();
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json",
|
|
3
3
|
"bomFormat": "CycloneDX",
|
|
4
4
|
"specVersion": "1.5",
|
|
5
|
-
"serialNumber": "urn:uuid:
|
|
5
|
+
"serialNumber": "urn:uuid:da70298e-9e1a-4d31-9196-c4ffd65dc39a",
|
|
6
6
|
"version": 1,
|
|
7
7
|
"metadata": {
|
|
8
|
-
"timestamp": "2026-11-
|
|
8
|
+
"timestamp": "2026-11-26T09:57:27.766Z",
|
|
9
9
|
"lifecycles": [
|
|
10
10
|
{
|
|
11
11
|
"phase": "pre-build"
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"component": {
|
|
22
|
-
"bom-ref": "iobroker.eos-admin@9.0.
|
|
22
|
+
"bom-ref": "iobroker.eos-admin@9.0.30",
|
|
23
23
|
"type": "library",
|
|
24
24
|
"name": "iobroker.eos-admin",
|
|
25
|
-
"version": "9.0.
|
|
25
|
+
"version": "9.0.30",
|
|
26
26
|
"scope": "required",
|
|
27
27
|
"author": "NexoWatt",
|
|
28
28
|
"description": "NexoWatt EOS: licensed local energy management, dashboard and ioBroker system administration in one adapter.",
|
|
29
|
-
"purl": "pkg:npm/iobroker.eos-admin@9.0.
|
|
29
|
+
"purl": "pkg:npm/iobroker.eos-admin@9.0.30",
|
|
30
30
|
"properties": [],
|
|
31
31
|
"externalReferences": []
|
|
32
32
|
}
|
|
@@ -26355,7 +26355,7 @@
|
|
|
26355
26355
|
],
|
|
26356
26356
|
"dependencies": [
|
|
26357
26357
|
{
|
|
26358
|
-
"ref": "iobroker.eos-admin@9.0.
|
|
26358
|
+
"ref": "iobroker.eos-admin@9.0.30",
|
|
26359
26359
|
"dependsOn": [
|
|
26360
26360
|
"@iobroker/adapter-core@3.4.3",
|
|
26361
26361
|
"@iobroker/plugin-docker@1.2.1",
|