iobroker.eos-admin 9.0.36 → 9.0.39
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 -10
- package/README.md +23 -3
- package/adminWww/.vite/manifest.json +39 -39
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +107 -107
- package/adminWww/assets/{AdapterUpdateDialog-D2nDWE_N.js → AdapterUpdateDialog-DDmYbnK4.js} +1 -1
- package/adminWww/assets/{Adapters-D0sVqNBU.js → Adapters-73Uo4VUy.js} +1 -1
- package/adminWww/assets/{ConfigManager-Zm7UoaaN.js → ConfigManager-DoFx_j4o.js} +1 -1
- package/adminWww/assets/{Enums-BGL7pR-O.js → Enums-BRQSAW9I.js} +1 -1
- package/adminWww/assets/{Fields-A8J3u1yq.js → Fields-pcmISvLk.js} +1 -1
- package/adminWww/assets/{Files-CQPjCvW6.js → Files-E8-7c9Ab.js} +1 -1
- package/adminWww/assets/{Hosts-CxzkkNBj.js → Hosts-D4a3shrq.js} +1 -1
- package/adminWww/assets/{Instances-eEbEukDh.js → Instances-ByxEHRoo.js} +1 -1
- package/adminWww/assets/{Intro-I_Tknp0E.js → Intro-DFriWa6g.js} +1 -1
- package/adminWww/assets/{Logs-C3GPz61Q.js → Logs-BXR0h5Sz.js} +1 -1
- package/adminWww/assets/{Objects-DDnisxNB.js → Objects-h6jg_6uT.js} +1 -1
- package/adminWww/assets/{Overview-BpZFdEmp.js → Overview-B39PiMGJ.js} +1 -1
- package/adminWww/assets/{State-DY6Nw0SB.js → State-CqF2ARx_.js} +1 -1
- package/adminWww/assets/{UsedResources-CtUpdP2b.js → UsedResources-CnbnoF3d.js} +1 -1
- package/adminWww/assets/{Users-DcqlSfc5.js → Users-BQik0rIi.js} +1 -1
- package/adminWww/assets/{bootstrap-Didkuj-F.js → bootstrap-Dllnekqb.js} +3 -3
- package/adminWww/assets/{hostInit-Chrs-wsg.js → hostInit-CQbS-SCS.js} +1 -1
- package/adminWww/assets/{icons-material-SqwOQW6y.js → icons-material-rYFYu2DM.js} +1 -1
- package/adminWww/assets/{index-CpDo61Mz.js → index-BzbVZbb2.js} +2 -2
- package/adminWww/assets/{installSVGRenderer-DZMZ3pJw.js → installSVGRenderer-DbH6B8B8.js} +1 -1
- package/adminWww/assets/{mf-entry-bootstrap-0-b0c4981a.js → mf-entry-bootstrap-0-4dee1225.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.39.js +12 -0
- package/adminWww/remoteEntry.js +1 -1
- package/build/lib/eosLegacyMigration.js +351 -60
- package/build/lib/eosLegacyMigration.js.map +1 -1
- package/build/lib/eosLegacySource.js +172 -0
- package/build/lib/eosLegacySource.js.map +1 -0
- package/build/lib/eosModuleHost.js +38 -1
- package/build/lib/eosModuleHost.js.map +1 -1
- package/build/lib/eosModuleHttp.js +55 -8
- package/build/lib/eosModuleHttp.js.map +1 -1
- package/build/lib/eosRuntimeControl.js +3 -1
- package/build/lib/eosRuntimeControl.js.map +1 -1
- package/build/main.js +1 -1
- package/build/main.js.map +1 -1
- package/docs/README.md +3 -0
- package/docs/reports/EMS_ZIELLADEN_2026-11-28.md +45 -0
- package/docs/reports/unified-9.0.37/PRUEFBERICHT.md +59 -0
- package/docs/reports/unified-9.0.37/PRUEFERGEBNISSE.json +112 -0
- package/docs/reports/unified-9.0.37/raw/INDEX.json +232 -0
- package/docs/reports/unified-9.0.37/raw/backend.log +5 -0
- package/docs/reports/unified-9.0.37/raw/core-final-node22.log +1439 -0
- package/docs/reports/unified-9.0.37/raw/core-final-node24.log +1381 -0
- package/docs/reports/unified-9.0.37/raw/dashboard-935-screenshot.json +15 -0
- package/docs/reports/unified-9.0.37/raw/dashboard-de-en-nl.json +1059 -0
- package/docs/reports/unified-9.0.37/raw/ems-ui-nvp-integration.json +245 -0
- package/docs/reports/unified-9.0.37/raw/farm-and-dashboard-935.json +11 -0
- package/docs/reports/unified-9.0.37/raw/farm-tracking-source-tests.log +80 -0
- package/docs/reports/unified-9.0.37/raw/fixtures-verification.log +39 -0
- package/docs/reports/unified-9.0.37/raw/frontend.log +160 -0
- package/docs/reports/unified-9.0.37/raw/installer.log +26 -0
- package/docs/reports/unified-9.0.37/raw/lint.log +45 -0
- package/docs/reports/unified-9.0.37/raw/measure-storage-display.cjs +47 -0
- package/docs/reports/unified-9.0.37/raw/modules.log +5 -0
- package/docs/reports/unified-9.0.37/raw/node22-isolated-start-deadlines.log +28 -0
- package/docs/reports/unified-9.0.37/raw/node22-migration.log +1329 -0
- package/docs/reports/unified-9.0.37/raw/node22-mira.log +222 -0
- package/docs/reports/unified-9.0.37/raw/node22-parallel-initial.log +13278 -0
- package/docs/reports/unified-9.0.37/raw/node22-startzeiten.json +21 -0
- package/docs/reports/unified-9.0.37/raw/node22-system-status.log +639 -0
- package/docs/reports/unified-9.0.37/raw/node22-tests-final.log +18494 -0
- package/docs/reports/unified-9.0.37/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.37/raw/node24-migration.log +1301 -0
- package/docs/reports/unified-9.0.37/raw/node24-mira.log +41 -0
- package/docs/reports/unified-9.0.37/raw/node24-system-status.log +111 -0
- package/docs/reports/unified-9.0.37/raw/node24-tests-final.log +3080 -0
- package/docs/reports/unified-9.0.37/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.37/raw/npm-runtime-audit.json +77 -0
- package/docs/reports/unified-9.0.37/raw/platform-acl-node22.log +98 -0
- package/docs/reports/unified-9.0.37/raw/platform-acl-node24.log +22 -0
- package/docs/reports/unified-9.0.37/raw/platform-nginx-node22.json +21 -0
- package/docs/reports/unified-9.0.37/raw/platform-nginx-node24.json +21 -0
- package/docs/reports/unified-9.0.37/raw/qa-source-check.log +2 -0
- package/docs/reports/unified-9.0.37/raw/release-metadata.log +13 -0
- package/docs/reports/unified-9.0.37/raw/sbom.log +8 -0
- package/docs/reports/unified-9.0.37/raw/speicher-warnschwelle-integration.json +172 -0
- package/docs/reports/unified-9.0.37/raw/sse-backpressure-9.0.35.log +1 -0
- package/docs/reports/unified-9.0.37/raw/sse-backpressure-9.0.37.log +1 -0
- package/docs/reports/unified-9.0.37/raw/storage-display-memory-node22.json +19 -0
- package/docs/reports/unified-9.0.37/raw/storage-display-memory-node24.json +19 -0
- package/docs/reports/unified-9.0.37/raw/typecheck.log +5 -0
- package/docs/reports/unified-9.0.37/raw/ui-runtime.log +7 -0
- package/docs/reports/unified-9.0.38/PRUEFBERICHT.md +51 -0
- package/docs/reports/unified-9.0.38/PRUEFERGEBNISSE.json +112 -0
- package/docs/reports/unified-9.0.38/raw/INDEX.json +272 -0
- package/docs/reports/unified-9.0.38/raw/backend.log +5 -0
- package/docs/reports/unified-9.0.38/raw/core-final-node22.log +1439 -0
- package/docs/reports/unified-9.0.38/raw/core-final-node24.log +1381 -0
- package/docs/reports/unified-9.0.38/raw/dashboard-de-en-nl.json +1044 -0
- package/docs/reports/unified-9.0.38/raw/field-upgrade-936-node22.log +21 -0
- package/docs/reports/unified-9.0.38/raw/field-upgrade-936-node24.log +10 -0
- package/docs/reports/unified-9.0.38/raw/fixtures-verification.log +39 -0
- package/docs/reports/unified-9.0.38/raw/frontend.log +152 -0
- package/docs/reports/unified-9.0.38/raw/installer.log +26 -0
- package/docs/reports/unified-9.0.38/raw/legacy-historian-provenance.json +44 -0
- package/docs/reports/unified-9.0.38/raw/legacy-history-built-influx.log +10 -0
- package/docs/reports/unified-9.0.38/raw/legacy-history-misbinding-937.log +1 -0
- package/docs/reports/unified-9.0.38/raw/legacy-history-providers-node22.log +326 -0
- package/docs/reports/unified-9.0.38/raw/legacy-history-providers-node24.log +58 -0
- package/docs/reports/unified-9.0.38/raw/legacy-history-real-influx.log +10 -0
- package/docs/reports/unified-9.0.38/raw/legacy-history-source-comparison.json +12 -0
- package/docs/reports/unified-9.0.38/raw/legacy-template-interfaces.json +21 -0
- package/docs/reports/unified-9.0.38/raw/lint.log +45 -0
- package/docs/reports/unified-9.0.38/raw/migration-admin-browser-node22.log +86 -0
- package/docs/reports/unified-9.0.38/raw/migration-admin-browser-node24.log +84 -0
- package/docs/reports/unified-9.0.38/raw/migration-live-children-node22.log +20 -0
- package/docs/reports/unified-9.0.38/raw/migration-live-children-node24.log +9 -0
- package/docs/reports/unified-9.0.38/raw/migration-process-admin-node22.log +831 -0
- package/docs/reports/unified-9.0.38/raw/migration-process-admin-node24.log +144 -0
- package/docs/reports/unified-9.0.38/raw/modules.log +5 -0
- package/docs/reports/unified-9.0.38/raw/node22-initial-destination-channel.log +13298 -0
- package/docs/reports/unified-9.0.38/raw/node22-migration.log +1443 -0
- package/docs/reports/unified-9.0.38/raw/node22-mira.log +222 -0
- package/docs/reports/unified-9.0.38/raw/node22-system-status.log +639 -0
- package/docs/reports/unified-9.0.38/raw/node22-tests-final.log +18620 -0
- package/docs/reports/unified-9.0.38/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.38/raw/node24-migration.log +1411 -0
- package/docs/reports/unified-9.0.38/raw/node24-mira.log +41 -0
- package/docs/reports/unified-9.0.38/raw/node24-system-status.log +111 -0
- package/docs/reports/unified-9.0.38/raw/node24-tests-final.log +3102 -0
- package/docs/reports/unified-9.0.38/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.38/raw/npm-runtime-audit.json +77 -0
- package/docs/reports/unified-9.0.38/raw/platform-acl-node22.log +98 -0
- package/docs/reports/unified-9.0.38/raw/platform-acl-node24.log +22 -0
- package/docs/reports/unified-9.0.38/raw/platform-nginx-node22.json +21 -0
- package/docs/reports/unified-9.0.38/raw/platform-nginx-node24.json +21 -0
- package/docs/reports/unified-9.0.38/raw/qa-source-check.log +2 -0
- package/docs/reports/unified-9.0.38/raw/release-metadata.log +13 -0
- package/docs/reports/unified-9.0.38/raw/sbom.log +8 -0
- package/docs/reports/unified-9.0.38/raw/source-shape-node22.log +438 -0
- package/docs/reports/unified-9.0.38/raw/source-shape-node24.log +78 -0
- package/docs/reports/unified-9.0.38/raw/target-owner-bootstrap-node22.log +509 -0
- package/docs/reports/unified-9.0.38/raw/target-owner-bootstrap-node24.log +92 -0
- package/docs/reports/unified-9.0.38/raw/typecheck.log +5 -0
- package/docs/reports/unified-9.0.38/raw/ui-runtime.log +7 -0
- package/docs/reports/unified-9.0.39/PRUEFBERICHT.md +48 -0
- package/docs/reports/unified-9.0.39/raw/INDEX.json +51 -0
- package/docs/reports/unified-9.0.39/raw/node22-tests-final.log +18189 -0
- package/docs/reports/unified-9.0.39/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.39/raw/node24-tests-final.log +3129 -0
- package/docs/reports/unified-9.0.39/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.39/raw/npm-runtime-audit.json +77 -0
- package/docs/reports/unified-9.0.39/raw/overnight-simulation.json +117 -0
- package/docs/start/START_HIER_9.0.37.md +38 -0
- package/docs/start/START_HIER_9.0.38.md +21 -0
- package/docs/start/START_HIER_9.0.39.md +14 -0
- package/docs/unified/BESTANDSUEBERNAHME_9_0_7.md +2 -0
- package/docs/unified/DEVELOPMENT_FINDINGS.md +3 -1
- package/docs/unified/SECURITY_CRA.md +6 -0
- package/io-package.json +16 -16
- package/modules/ocpp/README.md +2 -0
- package/modules/ocpp/ocpp/common.js +64 -40
- package/modules/ocpp/ocpp/eos-contract.js +8 -3
- package/modules/ocpp/runtime.js +10 -5
- package/modules/ocpp/test/eos-contract.test.js +67 -0
- package/modules/ocpp/test/hosted.test.cjs +29 -1
- package/package.json +12 -4
- package/public/eos-migration/index.html +11 -4
- package/public/eos-migration/index.js +156 -18
- package/release-manifests/unified/build-environment.cdx.json +6 -6
- package/release-manifests/unified/files.json +290 -164
- 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 +249 -0
- package/release-manifests/unified/runtime.cdx.json +27 -27
- package/release-manifests/unified/validation.json +17 -17
- package/tools/eos-release-manifest.cjs +3 -1
- package/ui/docs/STATES_AND_DATAPOINTS_DE.md +132 -0
- package/ui/ems/engine.js +5 -3
- package/ui/ems/evcs-control-mapping.js +13 -1
- package/ui/ems/modules/charging-management.js +40 -76
- package/ui/ems/modules/para14a.js +8 -3
- package/ui/ems/modules/storage-control.js +10 -5
- package/ui/ems/services/admin-overview-publisher.js +13 -7
- package/ui/ems/services/charging-management-audit.js +32 -1
- package/ui/ems/services/forecast-aware-target-planner.js +12 -5
- package/ui/ems/services/forecast-target-runtime-bridge.js +12 -5
- package/ui/io-package.json +13 -1
- package/ui/lib/charging-point-identity.js +91 -16
- package/ui/lib/hosted-adapter.js +35 -1
- package/ui/lib/notification-mail.js +95 -8
- package/ui/main.js +407 -61
- package/ui/package.json +1 -1
- package/ui/www/app.js +104 -89
- package/ui/www/charging-diagnostics-appcenter.js +12 -7
- package/ui/www/dashboard-lp-status.js +19 -12
- package/ui/www/evcs.js +71 -98
- package/ui/www/i18n/en.json +15 -0
- package/ui/www/i18n/nl.json +15 -0
- package/ui/www/live-display.js +145 -27
- package/ui/www/manifest.webmanifest +2 -2
- package/ui/www/storagefarm-dispatch.js +59 -8
- package/ui/www/storagefarm-summary.css +3 -1
- package/ui/www/storagefarm.html +2 -0
- package/adminWww/remoteEntry-eos-9.0.36.js +0 -12
package/modules/ocpp/runtime.js
CHANGED
|
@@ -135,9 +135,11 @@ class NexoWattOcppAdapter extends AdapterBase {
|
|
|
135
135
|
this._freshStateCache.get(identity).set(rel, { val, ack: !!ack, category, updatedAt: Date.now() });
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
async _setStateFreshAsync(id, val, ack = true, category = 'status') {
|
|
138
|
+
async _setStateFreshAsync(id, val, ack = true, category = 'status', sourceAt) {
|
|
139
139
|
const rel = this._stripNs(id);
|
|
140
|
-
|
|
140
|
+
const state = { val, ack: !!ack };
|
|
141
|
+
if (Number.isSafeInteger(sourceAt) && sourceAt > 0) state.ts = sourceAt;
|
|
142
|
+
await this.setStateAsync(rel, state);
|
|
141
143
|
this._cacheFreshState(rel, val, ack, category);
|
|
142
144
|
}
|
|
143
145
|
|
|
@@ -415,7 +417,7 @@ class NexoWattOcppAdapter extends AdapterBase {
|
|
|
415
417
|
Math.max(30, Number(this.config.socMaxAgeSec) || 300) * 1000, this.config.zeroPowerWhenIdle !== false);
|
|
416
418
|
await this.ensureStructure(identity);
|
|
417
419
|
if (this.runtimeIndex.get(identity) !== entry || !entry.client || !entry.socketConnected) return;
|
|
418
|
-
const write = (key, val, category = 'health') => this._setStateFreshAsync(`${identity}.${key}`, val, true, category);
|
|
420
|
+
const write = (key, val, category = 'health', sourceAt) => this._setStateFreshAsync(`${identity}.${key}`, val, true, category, sourceAt);
|
|
419
421
|
// Invalidate before changing the value; consumers must never see a partial sum as fresh.
|
|
420
422
|
const power = snapshot.result.powerW;
|
|
421
423
|
const allowed = this.config.zeroPowerWhenIdle !== false;
|
|
@@ -443,8 +445,11 @@ class NexoWattOcppAdapter extends AdapterBase {
|
|
|
443
445
|
if (prior && prior.at === item.at && prior.sourceAt === item.sourceAt && prior.val === item.val && prior.category === item.category) continue;
|
|
444
446
|
if (item.category === 'safeZero' && prior?.category === 'safeZero' && prior.val === item.val) continue;
|
|
445
447
|
await this.ensureMeasurement(identity, key);
|
|
446
|
-
|
|
447
|
-
|
|
448
|
+
// ioBroker consumers read state.ts for freshness, including after a delayed
|
|
449
|
+
// publication. A measured aggregate is only as recent as its oldest input.
|
|
450
|
+
const measuredAt = item.category === 'safeZero' ? undefined : item.sourceAt;
|
|
451
|
+
await write(`measurements.${key}`, item.val, item.category || 'realtime', measuredAt);
|
|
452
|
+
if (key === 'socPercent') await write('vehicle.socPercent', item.val, 'soc', measuredAt);
|
|
448
453
|
last.set(key, item);
|
|
449
454
|
}
|
|
450
455
|
for (const [key, val] of Object.entries({
|
|
@@ -32,6 +32,33 @@ test('per-outlet transaction stop does not stop another charging transaction',()
|
|
|
32
32
|
assert.equal(t.snapshot(now,ttl,ttl).active,true);
|
|
33
33
|
t.transaction({type:'Stop',txId:'wrong',evseId:1,connectorId:1,chargingState:'Idle'});assert.equal(t.snapshot(now,ttl,ttl).active,true);
|
|
34
34
|
});
|
|
35
|
+
for (const protocol of ['ocpp2.0.1', 'ocpp2.1']) {
|
|
36
|
+
test(`${protocol}: omitted chargingState belongs only to the same active transaction`, () => {
|
|
37
|
+
for (const oldState of ['SuspendedEV', 'Charging']) {
|
|
38
|
+
const telemetry = new StationTelemetry(protocol, ['1:1']);
|
|
39
|
+
const snapshot = () => telemetry.snapshot(now, ttl, ttl);
|
|
40
|
+
const event = (type, txId, seqNo, state) => telemetry.transaction({
|
|
41
|
+
type, txId, seqNo, evseId: 1, connectorId: 1, chargingState: state,
|
|
42
|
+
});
|
|
43
|
+
event('Start', 'first', 0, oldState);
|
|
44
|
+
event('Update', 'first', 1);
|
|
45
|
+
assert.equal(snapshot().chargingState, oldState);
|
|
46
|
+
event('Stop', 'first', 2);
|
|
47
|
+
assert.equal(snapshot().active, false);
|
|
48
|
+
assert.equal(snapshot().chargingState, 'Idle');
|
|
49
|
+
event('Update', 'first', 3, 'Charging');
|
|
50
|
+
assert.equal(snapshot().active, false, 'a delayed update cannot reopen the ended session');
|
|
51
|
+
event('Start', 'second', 0);
|
|
52
|
+
assert.equal(snapshot().active, true);
|
|
53
|
+
assert.equal(snapshot().chargingState, '', 'the new session has not reported a charging state');
|
|
54
|
+
event('Stop', 'first', 3, 'SuspendedEV');
|
|
55
|
+
assert.equal(snapshot().active, true, 'late event from the old transaction is ignored');
|
|
56
|
+
event('Update', 'second', 1, 'SuspendedEV');
|
|
57
|
+
event('Update', 'second', 2);
|
|
58
|
+
assert.equal(snapshot().chargingState, 'SuspendedEV', 'a pause in the current session is retained');
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
35
62
|
test('old and repeated source timestamps do not renew samples',()=>{
|
|
36
63
|
const t=new StationTelemetry('ocpp1.6',['1:1']);t.meter(1,1,{powerW:sample(5000)},now,now);
|
|
37
64
|
t.meter(1,1,{powerW:sample(9000)},now+500,now-100);assert.equal(t.snapshot(now+500,ttl,ttl).result.powerW.val,5000);
|
|
@@ -65,3 +92,43 @@ test('real MeterValues handler normalizes kW and multiplier and rejects old samp
|
|
|
65
92
|
await applyMeterValues(ctx,'cp',1,0,[{timestamp:new Date(Date.now()-300000).toISOString(),sampledValue:[{measurand:'Power.Active.Import',value:5,unitOfMeasure:{unit:'kW'}}]}],'ocpp2.1');
|
|
66
93
|
assert.equal(received.length,1);
|
|
67
94
|
});
|
|
95
|
+
|
|
96
|
+
test('a mixed MeterValues call keeps the fresh 11 kW at its source time when later frames contain only counters', async () => {
|
|
97
|
+
const { applyMeterValues } = require('../ocpp/common');
|
|
98
|
+
const received = [];
|
|
99
|
+
const telemetry = new StationTelemetry('ocpp1.6', ['1:1']);
|
|
100
|
+
const ctx = {
|
|
101
|
+
config: { telemetryMaxAgeSec: 90 },
|
|
102
|
+
states: {
|
|
103
|
+
ensureMeasurementState: async (id, key) => `${id}.measurements.${key}`,
|
|
104
|
+
ensureTextMeasurementState: async (id, key) => `${id}.measurements.${key}`,
|
|
105
|
+
},
|
|
106
|
+
setStateFreshAsync: async () => {},
|
|
107
|
+
runtime: { publishScopedMeter: async (_id, evse, connector, values, at, sourceAt) => {
|
|
108
|
+
received.push(values);
|
|
109
|
+
telemetry.meter(evse, connector, values, at, sourceAt);
|
|
110
|
+
} },
|
|
111
|
+
};
|
|
112
|
+
const receivedAt = Date.now();
|
|
113
|
+
const time = offset => new Date(receivedAt + offset).toISOString();
|
|
114
|
+
const power = (phase, value) => ({ measurand: 'Power.Active.Import', value, phase, unit: 'W' });
|
|
115
|
+
await applyMeterValues(ctx, 'cp', 1, 1, [
|
|
116
|
+
{ timestamp: time(-1000), sampledValue: [{ value: '60000', unit: 'Wh' }] },
|
|
117
|
+
{ timestamp: time(-5000), sampledValue: [power('L1', '3600'), power('L2', '3700'), power('L3', '3700')] },
|
|
118
|
+
{ timestamp: time(-120000), sampledValue: [power(undefined, '0')] },
|
|
119
|
+
{ timestamp: time(-9000), sampledValue: [power(undefined, '4200')] },
|
|
120
|
+
{ timestamp: time(-1000), sampledValue: [
|
|
121
|
+
{ measurand: 'Power.Active.Import', value: '22', unit: 'Wh' },
|
|
122
|
+
{ measurand: 'Power.Active.Import', value: false, unit: 'W' },
|
|
123
|
+
{ measurand: 'Power.Active.Import', value: '4', multiplier: true, unit: 'W' },
|
|
124
|
+
] },
|
|
125
|
+
], 'ocpp1.6');
|
|
126
|
+
assert.equal(received.length, 1);
|
|
127
|
+
const first = telemetry.snapshot(receivedAt, ttl, ttl);
|
|
128
|
+
assert.equal(first.result.energyWh.val, 60000);
|
|
129
|
+
assert.equal(first.result.powerW?.val, 11000);
|
|
130
|
+
assert.equal(first.result.powerW.sourceAt, receivedAt - 5000);
|
|
131
|
+
assert.equal(first.result.powerW.source, 'single-outlet');
|
|
132
|
+
assert.equal(telemetry.snapshot(receivedAt + ttl - 4999, ttl, ttl).result.powerW, undefined);
|
|
133
|
+
assert.equal(telemetry.snapshot(receivedAt + ttl, ttl, ttl).result.energyWh.val, 60000);
|
|
134
|
+
});
|
|
@@ -47,7 +47,7 @@ function fixture(namespace = 'eos-admin.0.ocpp') {
|
|
|
47
47
|
const previous = objects.get(id) || {};
|
|
48
48
|
objects.set(id, { ...previous, ...patch, native: { ...previous.native, ...patch.native }, common: { ...previous.common, ...patch.common } });
|
|
49
49
|
},
|
|
50
|
-
async setStateAsync(id, state) { states.set(id, {
|
|
50
|
+
async setStateAsync(id, state) { states.set(id, { ts: Date.now(), q: 0, ...state }); },
|
|
51
51
|
async setStateChangedAsync(id, state) { return this.setStateAsync(id, state); },
|
|
52
52
|
async subscribeStatesAsync() {}, async unsubscribeStatesAsync() {}, async delObjectAsync(id) { objects.delete(id); },
|
|
53
53
|
};
|
|
@@ -103,6 +103,34 @@ for (const protocol of ['ocpp1.6','ocpp2.0.1','ocpp2.1']) {
|
|
|
103
103
|
assert.equal(f.states.get('info.runtimeAlive').val, false);
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
|
+
for (const [protocol, namespace] of [['ocpp1.6', 'ocpp21.2'], ['ocpp2.0.1', 'eos-admin.0.ocpp']]) {
|
|
107
|
+
test(`hosted ${protocol} keeps measured 11 kW and its device timestamp alongside later energy`, async t => {
|
|
108
|
+
const f = await startStation(t, protocol, namespace);
|
|
109
|
+
const sourceTime = Date.now() - 6000;
|
|
110
|
+
const counterTime = sourceTime + 2500;
|
|
111
|
+
const v16 = protocol === 'ocpp1.6';
|
|
112
|
+
const scope = v16 ? { connectorId: 1 } : { evseId: 1 };
|
|
113
|
+
const counter = at => ({ timestamp: new Date(at).toISOString(), sampledValue: [
|
|
114
|
+
v16 ? { value: '60000', unit: 'Wh' } : { value: 60000, unitOfMeasure: { unit: 'Wh' } },
|
|
115
|
+
] });
|
|
116
|
+
const power = v16 ? { value: '11', unit: 'kW' } : { value: 11, unitOfMeasure: { unit: 'kW' } };
|
|
117
|
+
await f.client.call('MeterValues', { ...scope, meterValue: [
|
|
118
|
+
counter(counterTime),
|
|
119
|
+
{ timestamp: new Date(sourceTime).toISOString(), sampledValue: [{ measurand: 'Power.Active.Import', ...power }] },
|
|
120
|
+
] });
|
|
121
|
+
const actual = await until(() => f.states.get('cp.measurements.powerW'), state => state?.val === 11000);
|
|
122
|
+
assert.equal(actual.ts, sourceTime);
|
|
123
|
+
await until(() => f.states.get('cp.health.dataFresh'), state => state?.val === true);
|
|
124
|
+
assert.equal(f.states.get('cp.health.lastPowerValue').val, new Date(sourceTime).toISOString());
|
|
125
|
+
assert.equal(f.states.get('cp.measurements.energyWh').ts, counterTime);
|
|
126
|
+
const laterCounter = Date.now();
|
|
127
|
+
await f.client.call('MeterValues', { ...scope, meterValue: [counter(laterCounter)] });
|
|
128
|
+
await until(() => f.states.get('cp.measurements.energyWh'), state => state?.ts === laterCounter);
|
|
129
|
+
assert.equal(f.states.get('cp.measurements.powerW').ts, sourceTime);
|
|
130
|
+
assert.deepEqual(f.limits, []);
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
106
134
|
test('legacy namespace retains native station IDs and needs no separate adapter instance', async t => {
|
|
107
135
|
const f = await startStation(t, 'ocpp1.6', 'ocpp21.2');
|
|
108
136
|
assert.equal(f.module.getStatus().namespace, 'ocpp21.2');
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iobroker.eos-admin",
|
|
3
3
|
"description": "NexoWatt EOS: licensed local energy management, dashboard and ioBroker system administration in one adapter.",
|
|
4
|
-
"version": "9.0.
|
|
4
|
+
"version": "9.0.39",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"bluefox <dogafox@gmail.com>",
|
|
7
7
|
"apollon77",
|
|
@@ -244,7 +244,15 @@
|
|
|
244
244
|
"docs/start/START_HIER_9.0.35.md",
|
|
245
245
|
"docs/reports/unified-9.0.35/",
|
|
246
246
|
"docs/start/START_HIER_9.0.36.md",
|
|
247
|
-
"docs/reports/unified-9.0.36/"
|
|
247
|
+
"docs/reports/unified-9.0.36/",
|
|
248
|
+
"docs/start/START_HIER_9.0.37.md",
|
|
249
|
+
"docs/reports/unified-9.0.37/",
|
|
250
|
+
"docs/start/START_HIER_9.0.38.md",
|
|
251
|
+
"docs/reports/unified-9.0.38/",
|
|
252
|
+
"docs/start/START_HIER_9.0.39.md",
|
|
253
|
+
"docs/reports/unified-9.0.39/",
|
|
254
|
+
"docs/reports/EMS_ZIELLADEN_2026-11-28.md",
|
|
255
|
+
"ui/docs/STATES_AND_DATAPOINTS_DE.md"
|
|
248
256
|
],
|
|
249
257
|
"scripts": {
|
|
250
258
|
"start": "cd src-admin && npm run start",
|
|
@@ -255,7 +263,7 @@
|
|
|
255
263
|
"build:ui-runtime": "node ui/scripts/build-smarthome-markdown.cjs && node ui/scripts/build-ts-runtime-executables.js",
|
|
256
264
|
"lint-backend": "eslint -c eslint.config.mjs src && npm run lint:unified",
|
|
257
265
|
"lint": "npm run lint-backend && cd src-admin && npm run lint",
|
|
258
|
-
"test:unified": "node --test --test-timeout=180000 --test-concurrency=4 test/eos-idle*.test.cjs test/eos-unified*.test.cjs test/eos-hosted-boundary-http.test.cjs test/eos-license*.test.cjs ui/test/unified/*.test.cjs test/eos-access-diagnostics.test.cjs test/eos-ingress-renderer.test.cjs test/eos-sbom-vendored.test.cjs test/eos-system-license-ui.test.cjs test/eos-history-deadline.test.cjs test/eos-socket-threshold.test.cjs test/eos-history-api-stability.test.cjs test/eos-ephemeral-cache.test.cjs test/eos-tls-management.test.cjs test/eos-tls-ui.test.cjs test/eos-tls-issuer-files.test.cjs test/eos-publish-prepare.test.cjs test/eos-publish-prepare-security.test.cjs test/eos-release-evidence.test.cjs test/eos-parallel-admin-objects.test.cjs test/eos-coexistence-recovery.test.cjs test/eos-socket-secret.test.cjs test/eos-role-policy.test.cjs test/eos-device-ems*.test.cjs test/eos-installer-lifecycle.test.cjs test/eos-customer-tariff*.test.cjs test/eos-ems-reconfiguration.test.cjs test/eos-ems-process-isolation.test.cjs test/eos-power-measurements.test.cjs test/eos-mennekes-control.test.cjs test/eos-devices-start-lifecycle.test.cjs test/eos-storage-farm-overview.test.cjs test/eos-storagefarm-overview-ui.test.cjs test/eos-storagefarm-review.test.cjs test/eos-tariff*.test.cjs test/eos-history-measurement-integrity.test.cjs test/eos-ems-failed-init.test.cjs test/eos-live-display-regression.test.cjs test/eos-history-chart-gaps.test.cjs test/eos-history-negative-pricing.test.cjs test/eos-storagefarm-dispatch-diagnostics.test.cjs test/eos-storagefarm-controller-dispatch.test.cjs test/eos-storagefarm-dispatch-ui.test.cjs test/eos-storage-command-ack.test.cjs test/eos-device-command-subscriptions.test.cjs test/eos-influx*.test.cjs test/eos-history-setup-ui.test.cjs test/eos-login-pwa-branding.test.cjs test/eos-pwa-anonymous-https.test.cjs test/eos-upload-admission.test.cjs test/eos-ems-nvp-recovery.test.cjs test/eos-storagefarm-concurrency.test.cjs test/eos-customer-update*.test.cjs test/eos-history-backup-scope.test.cjs test/eos-postgres*.test.cjs test/eos-ems-control-datapoints.test.cjs test/eos-runtime-interop.test.cjs test/eos-derived-flow-integrity.test.cjs test/eos-storage-nullable-flow.test.cjs test/eos-energyflow-cadence.test.cjs test/eos-core-pv-input-integrity.test.cjs test/eos-evcs*.test.cjs test/eos-ui-process.test.cjs test/eos-runtime-health.test.cjs test/eos-ocpp*.test.cjs test/eos-kiosk*.test.cjs test/eos-ui-process-review.test.cjs test/eos-ui-operational-process-review.test.cjs test/eos-ui-secret-codec.test.cjs test/eos-runtime-control*.test.cjs test/eos-ui-config*.test.cjs test/eos-charging-*.test.cjs test/eos-nvp-933-safety.test.cjs test/eos-prime-mover-pulse-recovery.test.cjs test/eos-sgready-interlock.test.cjs test/eos-mira-*.test.cjs test/eos-dashboard-*.test.cjs test/eos-supervisor-notifications.test.cjs ui/scripts/verify-stable-1.0.7-notifications.cjs",
|
|
266
|
+
"test:unified": "node --test --test-timeout=180000 --test-concurrency=4 test/eos-idle*.test.cjs test/eos-unified*.test.cjs test/eos-hosted-boundary-http.test.cjs test/eos-license*.test.cjs ui/test/unified/*.test.cjs test/eos-access-diagnostics.test.cjs test/eos-ingress-renderer.test.cjs test/eos-sbom-vendored.test.cjs test/eos-system-license-ui.test.cjs test/eos-history-deadline.test.cjs test/eos-socket-threshold.test.cjs test/eos-history-api-stability.test.cjs test/eos-ephemeral-cache.test.cjs test/eos-tls-management.test.cjs test/eos-tls-ui.test.cjs test/eos-tls-issuer-files.test.cjs test/eos-publish-prepare.test.cjs test/eos-publish-prepare-security.test.cjs test/eos-release-evidence.test.cjs test/eos-parallel-admin-objects.test.cjs test/eos-coexistence-recovery.test.cjs test/eos-migration-field-versions.test.cjs test/eos-socket-secret.test.cjs test/eos-role-policy.test.cjs test/eos-device-ems*.test.cjs test/eos-installer-lifecycle.test.cjs test/eos-customer-tariff*.test.cjs test/eos-ems-reconfiguration.test.cjs test/eos-ems-process-isolation.test.cjs test/eos-power-measurements.test.cjs test/eos-mennekes-control.test.cjs test/eos-devices-start-lifecycle.test.cjs test/eos-storage-farm-overview.test.cjs test/eos-storagefarm-overview-ui.test.cjs test/eos-storagefarm-review.test.cjs test/eos-tariff*.test.cjs test/eos-history-measurement-integrity.test.cjs test/eos-ems-failed-init.test.cjs test/eos-live-display-regression.test.cjs test/eos-history-chart-gaps.test.cjs test/eos-history-negative-pricing.test.cjs test/eos-storagefarm-dispatch-diagnostics.test.cjs test/eos-storagefarm-controller-dispatch.test.cjs test/eos-storagefarm-dispatch-ui.test.cjs test/eos-storage-command-ack.test.cjs test/eos-device-command-subscriptions.test.cjs test/eos-influx*.test.cjs test/eos-history-setup-ui.test.cjs test/eos-login-pwa-branding.test.cjs test/eos-pwa-anonymous-https.test.cjs test/eos-upload-admission.test.cjs test/eos-ems-nvp-recovery.test.cjs test/eos-storagefarm-concurrency.test.cjs test/eos-customer-update*.test.cjs test/eos-history-backup-scope.test.cjs test/eos-postgres*.test.cjs test/eos-ems-control-datapoints.test.cjs test/eos-runtime-interop.test.cjs test/eos-derived-flow-integrity.test.cjs test/eos-storage-nullable-flow.test.cjs test/eos-energyflow-cadence.test.cjs test/eos-core-pv-input-integrity.test.cjs test/eos-evcs*.test.cjs test/eos-ui-process.test.cjs test/eos-runtime-health.test.cjs test/eos-ocpp*.test.cjs test/eos-kiosk*.test.cjs test/eos-ui-process-review.test.cjs test/eos-ui-operational-process-review.test.cjs test/eos-ui-secret-codec.test.cjs test/eos-runtime-control*.test.cjs test/eos-ui-config*.test.cjs test/eos-charging-*.test.cjs test/eos-nvp-933-safety.test.cjs test/eos-prime-mover-pulse-recovery.test.cjs test/eos-sgready-interlock.test.cjs test/eos-mira-*.test.cjs test/eos-dashboard-*.test.cjs test/eos-supervisor-notifications.test.cjs ui/scripts/verify-stable-1.0.7-notifications.cjs",
|
|
259
267
|
"check:unified": "node tools/eos-release-check.cjs",
|
|
260
268
|
"seal:unified": "node tools/eos-release-manifest.cjs --write",
|
|
261
269
|
"prepack": "node tools/eos-prepare-publish.cjs && node tools/eos-release-check.cjs",
|
|
@@ -283,7 +291,7 @@
|
|
|
283
291
|
},
|
|
284
292
|
"nexowattReleasePolicy": {
|
|
285
293
|
"distTag": "next",
|
|
286
|
-
"purpose": "NexoWatt EOS 9.0.
|
|
294
|
+
"purpose": "NexoWatt EOS 9.0.39 test build for overnight EV charging, saved charging preferences and EMS diagnostics after migration"
|
|
287
295
|
},
|
|
288
296
|
"publisher": "NexoWatt",
|
|
289
297
|
"nexowattUpstream": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
</header>
|
|
19
19
|
<section class="eos-module-hero" aria-labelledby="page-title">
|
|
20
20
|
<div><small>NexoWatt EOS · Bestehende Anlagen</small><h1 id="page-title">Bestandsübernahme</h1>
|
|
21
|
-
<p>
|
|
21
|
+
<p>Einstellungen und Datenpunktzuordnungen aus bestehenden ioBroker-Instanzen übernehmen.</p></div>
|
|
22
22
|
<span class="eos-module-badge">Einstellungen und Datenpunkte erhalten</span>
|
|
23
23
|
</section>
|
|
24
24
|
<p id="request-message" role="status" aria-live="polite" class="eos-message">Status wird geladen …</p>
|
|
@@ -26,8 +26,15 @@
|
|
|
26
26
|
<section class="eos-panel" aria-labelledby="status-heading">
|
|
27
27
|
<small class="eos-eyebrow">Aktueller Stand</small><h2 id="status-heading">Übernahme wird geprüft</h2>
|
|
28
28
|
<p id="phase-description"></p><p id="unchanged-notice" class="notice" hidden></p>
|
|
29
|
-
<dl class="eos-detail-list"><dt>Letzte Änderung</dt><dd id="updated-at">–</dd><dt>Meldung</dt><dd id="status-code">–</dd></dl>
|
|
30
|
-
<p id="reason-description"></p><p id="scope-description" hidden></p
|
|
29
|
+
<dl class="eos-detail-list"><dt>Letzte Änderung</dt><dd id="updated-at">–</dd><dt id="code-label">Meldung</dt><dd id="status-code">–</dd></dl>
|
|
30
|
+
<p id="reason-description"></p><p id="scope-description" hidden></p>
|
|
31
|
+
<div id="start-controls" hidden>
|
|
32
|
+
<p id="start-description">EOS prüft die erfassten Instanzen erneut. Sind alle Voraussetzungen erfüllt, beendet EOS laufende Altinstanzen kontrolliert und übernimmt die Konfiguration. Während der Übergabe kann die Regelung kurz pausieren.</p>
|
|
33
|
+
<label id="activate-devices-field" class="eos-inline-check" hidden><input id="activate-devices" type="checkbox"> Integriertes Gerätemodul nach der Übernahme freigeben</label>
|
|
34
|
+
<button id="start" class="eos-primary" type="button" aria-describedby="start-description" disabled>Übernahme prüfen und starten</button>
|
|
35
|
+
</div>
|
|
36
|
+
<button id="refresh" type="button">Status aktualisieren</button>
|
|
37
|
+
<p id="operation-message" role="status" aria-live="polite"></p>
|
|
31
38
|
</section>
|
|
32
39
|
<section class="eos-panel" aria-labelledby="sources-heading">
|
|
33
40
|
<small class="eos-eyebrow">Bisherige Adapter</small><h2 id="sources-heading">Erfasste Instanzen</h2>
|
|
@@ -37,6 +44,6 @@
|
|
|
37
44
|
<section class="eos-panel"><small class="eos-eyebrow">Weiteres Vorgehen</small><h2>Was dieser Status bedeutet</h2>
|
|
38
45
|
<p>EOS prüft vor der Übergabe Versionen, Einstellungen, Zugangsdaten und den bisherigen Betrieb. Kann ein Bestandteil nicht sicher übernommen werden, zeigt diese Seite den Grund. Bereits vorhandene EOS-Konfigurationen werden nicht automatisch überschrieben.</p>
|
|
39
46
|
<p>Bei abgeschlossener Übernahme bleiben die bisherigen Datenpunktnamen, Zuordnungen und Historieneinstellungen erhalten. Die alten Adapter bleiben installiert. EOS beendet sie kontrolliert, bevor die integrierten Module übernehmen.</p>
|
|
40
|
-
<p>
|
|
47
|
+
<p>Auch deaktivierte Altinstanzen können ihre gespeicherten Einstellungen liefern. Sie bleiben installiert. Historienzuordnungen, etwa für InfluxDB, verwenden weiterhin die bisherigen Datenpunktnamen.</p>
|
|
41
48
|
</section>
|
|
42
49
|
</main></body></html>
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
(() => {
|
|
3
3
|
const phases = {
|
|
4
4
|
IDLE: ['Prüfung vorbereitet', 'Der Übernahmestatus wird beim Start von EOS ermittelt.'],
|
|
5
|
-
DISABLED: ['Automatische Übernahme ausgeschaltet', '
|
|
6
|
-
LICENSE_REQUIRED: ['Systemfreigabe erforderlich', 'Für die
|
|
5
|
+
DISABLED: ['Automatische Übernahme ausgeschaltet', 'Der automatische Start der Übernahme ist in den EOS-Einstellungen deaktiviert.'],
|
|
6
|
+
LICENSE_REQUIRED: ['Systemfreigabe erforderlich', 'Für die Übernahme fehlt eine gültige zentrale EOS-Systemfreigabe.'],
|
|
7
7
|
NOT_NEEDED: ['Keine Übernahme erforderlich', 'Bei der Prüfung wurden keine zu übernehmenden Altadapter gefunden.'],
|
|
8
8
|
BLOCKED: ['Übernahme nicht gestartet', 'Die Vorprüfung konnte keine vollständige und sichere Übergabe bestätigen. Der Grund steht unten.'],
|
|
9
9
|
PREPARED: ['Übernahme vorbereitet', 'Die Vorprüfung ist abgeschlossen. EOS bereitet die kontrollierte Übergabe vor.'],
|
|
@@ -16,13 +16,27 @@
|
|
|
16
16
|
NOT_AVAILABLE: ['Status nicht verfügbar', 'Der Übernahmestatus steht zurzeit nicht zur Verfügung.'],
|
|
17
17
|
};
|
|
18
18
|
const reasons = {
|
|
19
|
-
EOS_MIGRATION_LICENSE_REQUIRED: 'Die
|
|
19
|
+
EOS_MIGRATION_LICENSE_REQUIRED: 'Die zentrale EOS-Lizenz aktivieren und hier den Status aktualisieren. Sobald die Übernahme freigegeben ist, kann die Vorprüfung gestartet werden.',
|
|
20
|
+
EOS_MIGRATION_REVIEW_READY: 'Die Systemfreigabe ist gültig. Die Übernahme der bisherigen Instanzen kann jetzt gestartet werden.',
|
|
21
|
+
EOS_MIGRATION_JOURNAL_PRESENT: 'EOS hat einen bereits gespeicherten Übergabestand gefunden. Den aktuellen Stand und die vorhandene Sicherung prüfen.',
|
|
20
22
|
EOS_MIGRATION_RESTART_REQUIRED: 'EOS fordert für die Bestandsprüfung einmalig einen automatischen Adapterneustart an. Bleibt dieser Status dauerhaft bestehen, die EOS-Adapterinstanz einmal in ioBroker neu starten.',
|
|
21
23
|
EOS_MIGRATION_PROTECTED_FIELDS_UNAVAILABLE: 'ioBroker gibt geschützte Zugangsdaten oder Schlüssel eines Altadapters nicht frei. Für eine vollständige Übernahme ist eine freigegebene Übergabe dieser Daten erforderlich; leere Ersatzwerte werden nicht eingesetzt.',
|
|
22
|
-
EOS_MIGRATION_SOURCE_VERSION: 'Die
|
|
24
|
+
EOS_MIGRATION_SOURCE_VERSION: 'Die Versionsangaben einer Altinstanz konnten für diesen Übergabeweg nicht bestätigt werden. In ioBroker unter „Adapter“ und „Instanzen“ die installierten Stände der angegebenen Quelle vergleichen.',
|
|
25
|
+
EOS_MIGRATION_SOURCE_IDENTITY: 'Die Kennung der Altinstanz passt nicht zu ihrem Adapter. In ioBroker die angezeigte Instanz und ihren installierten Adapter prüfen.',
|
|
26
|
+
EOS_MIGRATION_UI_CONFIG_SHAPE: 'EOS kann das Format der gespeicherten UI-Konfiguration nicht zuordnen. Die Konfiguration dieser Altinstanz und ihre Sicherung vergleichen.',
|
|
27
|
+
EOS_MIGRATION_DEVICES_CONFIG_SHAPE: 'EOS kann das Format der gespeicherten Geräteliste nicht zuordnen. In der Altinstanz die Gerätekonfiguration und ihre Sicherung prüfen.',
|
|
28
|
+
EOS_MIGRATION_MODULE_FORMAT_UNVERIFIED: 'Für das gespeicherte Format dieses Moduls ist keine vollständige Übernahme bestätigt. Den angegebenen Adapter und seine gesicherte Konfiguration prüfen.',
|
|
29
|
+
EOS_DEVICES_UNKNOWN_TEMPLATE: 'Mindestens eine gespeicherte Gerätevorlage fehlt im EOS-Katalog. Die Vorlagen der angegebenen Altinstanz mit dem Katalog unter Geräte abgleichen.',
|
|
30
|
+
EOS_DEVICES_TEMPLATE_PROTOCOL: 'Eine Gerätevorlage unterstützt das hinterlegte Protokoll nicht. In der angegebenen Altinstanz die Vorlage und das Geräteprotokoll vergleichen.',
|
|
31
|
+
EOS_DEVICES_CONFIG_PROTOCOL: 'Ein gespeichertes Geräteprotokoll wird nicht unterstützt. Das Protokoll der Geräte in der Altinstanz prüfen.',
|
|
32
|
+
EOS_DEVICES_LEGACY_CONFIG_CONFLICT: 'Die beiden gespeicherten Gerätelisten der Altinstanz unterscheiden sich. Anhand der Sicherung klären, welche Zuordnung aktuell ist.',
|
|
33
|
+
EOS_DEVICES_CONFIG_JSON: 'Die gespeicherte Geräteliste kann nicht gelesen werden. Die Gerätekonfiguration der Altinstanz mit ihrer Sicherung vergleichen.',
|
|
34
|
+
EOS_DEVICES_CONFIG_ID: 'Eine Gerätekennung ist ungültig. In der angegebenen Altinstanz die Gerätekennungen prüfen.',
|
|
35
|
+
EOS_DEVICES_DUPLICATE_ID: 'Eine Gerätekennung ist mehrfach vergeben. In der angegebenen Altinstanz die Zuordnung dieser Geräte klären.',
|
|
36
|
+
EOS_MIGRATION_CONFIG_INVALID: 'Die Konfigurationsprüfung ist fehlgeschlagen. Die angegebene Quelle in ioBroker öffnen und die betroffenen Einstellungen prüfen.',
|
|
23
37
|
EOS_MIGRATION_DESTINATION_MISSING: 'Ein bereits übernommener Einstellungsbestand fehlt. Vor dem Start muss die vollständige Sicherung der gemeinsamen Konfiguration wiederhergestellt werden.',
|
|
24
38
|
EOS_MIGRATION_DESTINATION_BINDING: 'Die gespeicherten Moduleinstellungen passen nicht zum bestätigten Übernahmestand. Bitte die Sicherung und Zuordnung der bisherigen Instanzen prüfen.',
|
|
25
|
-
EOS_MIGRATION_DISABLED_UI_REVIEW: 'Die bisherige Oberfläche ist deaktiviert. In ioBroker den
|
|
39
|
+
EOS_MIGRATION_DISABLED_UI_REVIEW: 'Die bisherige Oberfläche ist deaktiviert. In ioBroker den Stillstand dieser Instanz und die Erreichbarkeit ihres Hosts prüfen. EOS prüft auch die vorhandene Zielkonfiguration.',
|
|
26
40
|
EOS_MIGRATION_DESTINATION_CONFIGURED: 'Für diesen Bereich bestehen bereits EOS-Einstellungen. Quell- und Zielkonfiguration anhand einer Sicherung vergleichen, bevor eine Übernahme geplant wird.',
|
|
27
41
|
EOS_MIGRATION_DESTINATION_STATES: 'Im gemeinsamen EOS bestehen bereits Datenpunkte für diesen Bereich. Eine automatische Zusammenführung wird nicht vorgenommen.',
|
|
28
42
|
EOS_MIGRATION_AMBIGUOUS: 'Es wurden mehrere Instanzen desselben Altadapters gefunden. Vor der Übernahme muss die gewünschte Zuordnung geklärt werden.',
|
|
@@ -55,20 +69,93 @@
|
|
|
55
69
|
const labels = { ui: 'EOS Oberfläche und Regelung', devices: 'Geräte', eebus: 'EEBus', backup: 'Sicherung', ocpp: 'OCPP-Ladestationen' };
|
|
56
70
|
const sourceNames = { ui: 'nexowatt-ui', devices: 'nexowatt-devices', eebus: 'eebus', backup: 'nexowatt-backup', ocpp: 'ocpp21' };
|
|
57
71
|
const element = id => document.getElementById(id);
|
|
58
|
-
let busy = false;
|
|
72
|
+
let busy = false, permitted = false, canActivateDevices = false, running = false;
|
|
73
|
+
let csrf = '', revision = '', pollUntil = 0, timer = null;
|
|
74
|
+
const operationErrors = {
|
|
75
|
+
AUTH_CSRF: 'Die Sitzungsfreigabe ist abgelaufen. Den Status aktualisieren und die Auswahl erneut prüfen.',
|
|
76
|
+
AUTH_ORIGIN: 'Bitte die Übernahme direkt im freigegebenen EOS-Adminzugang öffnen.',
|
|
77
|
+
PASSWORD_CHANGE_REQUIRED: 'Vor der Übernahme das Administrationskennwort ändern und erneut anmelden.',
|
|
78
|
+
EOS_MIGRATION_BUSY: 'Eine Übernahme oder Prozessänderung läuft bereits. Status aktualisieren und den Abschluss abwarten.',
|
|
79
|
+
EOS_MIGRATION_REVISION_CONFLICT: 'Der Übernahmestand hat sich geändert. Status aktualisieren und die dort angebotene Aktion prüfen.',
|
|
80
|
+
EOS_MIGRATION_ACTION_UNAVAILABLE: 'Der Start ist aktuell nicht freigegeben. Status aktualisieren und die angezeigte Voraussetzung prüfen.',
|
|
81
|
+
EOS_MIGRATION_REQUEST_INVALID: 'Die Auswahl passt nicht mehr zum aktuellen Bestand. Status aktualisieren und die Auswahl erneut prüfen.',
|
|
82
|
+
};
|
|
83
|
+
function updateButtons() {
|
|
84
|
+
element('refresh').disabled = busy;
|
|
85
|
+
element('start-controls').hidden = !permitted;
|
|
86
|
+
element('start').disabled = busy || !permitted;
|
|
87
|
+
element('activate-devices-field').hidden = !permitted || !canActivateDevices;
|
|
88
|
+
element('activate-devices').disabled = busy || !permitted || !canActivateDevices;
|
|
89
|
+
}
|
|
90
|
+
function stopTimer() {
|
|
91
|
+
if (timer !== null) clearTimeout(timer);
|
|
92
|
+
timer = null;
|
|
93
|
+
}
|
|
94
|
+
function pollWhileRunning() {
|
|
95
|
+
stopTimer();
|
|
96
|
+
if (!running) { pollUntil = 0; return; }
|
|
97
|
+
if (!pollUntil) pollUntil = Date.now() + 240000;
|
|
98
|
+
if (Date.now() >= pollUntil) element('operation-message').textContent = 'Der Abschluss ist noch unbestätigt. Mit „Status aktualisieren“ den aktuellen Stand abrufen.';
|
|
99
|
+
else if (!document.hidden) timer = setTimeout(() => void refresh(), 3000);
|
|
100
|
+
}
|
|
101
|
+
function version(value) {
|
|
102
|
+
return typeof value === 'string' && value.length <= 80 && /^\d+\.\d+\.\d+(?:-[A-Za-z0-9.-]+)?(?:\+[A-Za-z0-9.-]+)?$/.test(value) ? value : '';
|
|
103
|
+
}
|
|
104
|
+
function sourceDetails(source, phase) {
|
|
105
|
+
const details = [source.namespacePreserved === true ? 'bisherige Datenpunktnamen beibehalten' : 'bisherige Instanz erfasst'];
|
|
106
|
+
if (typeof source.enabled === 'boolean') {
|
|
107
|
+
const original = ['PREPARED','STOPPING','TRANSFERRED','COMMITTED','ROLLING_BACK','ROLLED_BACK','ROLLBACK_REQUIRED'].includes(phase);
|
|
108
|
+
details.push((original ? 'vor der Übernahme ' : 'Altinstanz ') + (source.enabled ? 'aktiviert' : 'deaktiviert'));
|
|
109
|
+
}
|
|
110
|
+
const installed = version(source.sourceVersion), instance = version(source.instanceVersion), adapter = version(source.adapterVersion);
|
|
111
|
+
if (installed) details.push('Gefundene Version ' + installed);
|
|
112
|
+
if (instance && adapter && instance !== adapter) details.push('Instanz meldet ' + instance + ', Adapter meldet ' + adapter);
|
|
113
|
+
else if (!installed && instance) details.push('Instanz meldet ' + instance);
|
|
114
|
+
else if (!installed && adapter) details.push('Adapter meldet ' + adapter);
|
|
115
|
+
if (source.versionCode === 'EOS_MIGRATION_VERSION_INVALID') details.push('Versionsangabe nicht lesbar');
|
|
116
|
+
else if (!installed && !instance && !adapter && Object.hasOwn(source, 'sourceVersion')) details.push('Versionsangabe fehlt');
|
|
117
|
+
if ((source.id === 'ui' || source.id === 'devices') && ['EOS_MIGRATION_VERSION_MISSING','EOS_MIGRATION_VERSION_DIFFERENT','EOS_MIGRATION_VERSION_INVALID'].includes(source.versionCode)) {
|
|
118
|
+
details.push('Die gespeicherte Konfiguration entscheidet über die Übernahme');
|
|
119
|
+
}
|
|
120
|
+
if (source.id === 'devices' && ['TRANSFERRED','COMMITTED'].includes(phase) && typeof source.targetEnabled === 'boolean') {
|
|
121
|
+
details.push(source.targetEnabled ? 'integriertes Gerätemodul freigegeben' : 'integriertes Gerätemodul deaktiviert');
|
|
122
|
+
}
|
|
123
|
+
return ' · ' + details.join(' · ');
|
|
124
|
+
}
|
|
59
125
|
function render(value) {
|
|
60
126
|
const phase = typeof value?.phase === 'string' && Object.hasOwn(phases, value.phase) ? value.phase : 'NOT_AVAILABLE';
|
|
61
127
|
const code = typeof value?.code === 'string' && /^[A-Z][A-Z0-9_]{0,79}$/.test(value.code) ? value.code : '';
|
|
62
|
-
const
|
|
128
|
+
const op = value?.operation;
|
|
129
|
+
const nextRevision = typeof value?.revision === 'string' && /^[a-f0-9-]{36}$/.test(value.revision) ? value.revision : '';
|
|
130
|
+
csrf = typeof value?.csrfToken === 'string' && value.csrfToken.length <= 512 && /^[a-zA-Z0-9+_/=-]+$/.test(value.csrfToken) ? value.csrfToken : '';
|
|
131
|
+
running = op?.state === 'running' || ['PREPARED', 'STOPPING', 'TRANSFERRED', 'ROLLING_BACK'].includes(phase);
|
|
132
|
+
permitted = value?.canStart === true && !!nextRevision && !!csrf && ['idle','complete','failed'].includes(op?.state) &&
|
|
133
|
+
['BLOCKED','DISABLED','NOT_NEEDED','LICENSE_REQUIRED'].includes(phase);
|
|
134
|
+
canActivateDevices = permitted && value?.canActivateDevices === true;
|
|
135
|
+
if (revision !== nextRevision || !canActivateDevices) element('activate-devices').checked = false;
|
|
136
|
+
revision = nextRevision;
|
|
137
|
+
const operationMessage = element('operation-message');
|
|
138
|
+
const opCode = typeof op?.code === 'string' && /^[A-Z][A-Z0-9_]{0,79}$/.test(op.code) ? op.code : '';
|
|
139
|
+
operationMessage.textContent = running ? 'Der Übernahmeauftrag läuft. EOS aktualisiert die Anzeige während der Durchführung.'
|
|
140
|
+
: op?.state === 'failed' && opCode && opCode !== code ? (reasons[opCode] || 'Der Übernahmeauftrag wurde mit ' + opCode + ' beendet.') : '';
|
|
141
|
+
const rechecking = op?.state === 'running' && ['BLOCKED','DISABLED','NOT_NEEDED','LICENSE_REQUIRED'].includes(phase);
|
|
142
|
+
const [heading, description] = rechecking
|
|
143
|
+
? ['Vorprüfung läuft', 'EOS prüft die erfassten Altinstanzen erneut. Bis zum Ergebnis zeigt die Instanzliste den zuletzt geprüften Stand.']
|
|
144
|
+
: phase === 'LICENSE_REQUIRED' && permitted
|
|
145
|
+
? ['Systemfreigabe erteilt', 'EOS kann die bisherigen Adapter jetzt prüfen.']
|
|
146
|
+
: phase === 'LICENSE_REQUIRED' && code === 'EOS_MIGRATION_RESTART_REQUIRED'
|
|
63
147
|
? ['Automatischer Neustart zur Bestandsprüfung', 'Die zentrale Systemfreigabe ist gültig. EOS prüft den Bestand beim nächsten Adapterstart.']
|
|
64
148
|
: phases[phase];
|
|
65
149
|
element('status-heading').textContent = heading;
|
|
66
150
|
element('phase-description').textContent = description;
|
|
151
|
+
element('code-label').textContent = rechecking ? 'Meldung der letzten Prüfung' : 'Meldung';
|
|
67
152
|
element('status-code').textContent = code || 'Keine zusätzliche Meldung';
|
|
68
|
-
element('reason-description').textContent =
|
|
153
|
+
element('reason-description').textContent = permitted && phase === 'LICENSE_REQUIRED'
|
|
154
|
+
? 'Die Systemfreigabe ist jetzt gültig. Die Übernahme kann hier erneut geprüft und gestartet werden.'
|
|
155
|
+
: code ? (reasons[code] || 'Die Übernahmeprüfung meldet den oben angegebenen Grund. Bitte die betroffene Instanz prüfen.') : '';
|
|
69
156
|
const time = Number.isSafeInteger(value?.updatedAt) && value.updatedAt > 0 && value.updatedAt <= 8640000000000000 ? value.updatedAt : null;
|
|
70
157
|
element('updated-at').textContent = time ? new Date(time).toLocaleString('de-DE') : 'Noch nicht gespeichert';
|
|
71
|
-
const unchanged = value?.existingAdaptersUnchanged === true && ['BLOCKED', 'DISABLED', 'LICENSE_REQUIRED', 'NOT_NEEDED'].includes(phase);
|
|
158
|
+
const unchanged = !rechecking && value?.existingAdaptersUnchanged === true && ['BLOCKED', 'DISABLED', 'LICENSE_REQUIRED', 'NOT_NEEDED'].includes(phase);
|
|
72
159
|
element('unchanged-notice').hidden = !unchanged;
|
|
73
160
|
element('unchanged-notice').textContent = unchanged ? 'Die automatische Übernahme hat keine bisherigen Adapter angehalten oder deren Einstellungen verändert.' : '';
|
|
74
161
|
const processLabels = { ui: 'Oberfläche', ems: 'EMS', devices: 'Geräte', eebus: 'EEBus', backup: 'Sicherung', ocpp: 'OCPP-Ladestationen' };
|
|
@@ -87,35 +174,86 @@
|
|
|
87
174
|
const name = document.createElement('strong'); name.textContent = `${labels[source.id]}: `;
|
|
88
175
|
const id = document.createElement('code'); id.textContent = source.source;
|
|
89
176
|
const note = document.createElement('span');
|
|
90
|
-
note.textContent = source
|
|
177
|
+
note.textContent = sourceDetails(source, phase);
|
|
91
178
|
row.append(name, id, note);
|
|
179
|
+
if (phase === 'COMMITTED' && source.id === 'devices' && source.enabled === false && source.targetEnabled !== true) {
|
|
180
|
+
const controls = document.createElement('a'); controls.href = '/runtime/';
|
|
181
|
+
controls.textContent = source.targetEnabled === false ? 'Gerätemodul in der Prozessverwaltung aktivieren' : 'Gerätefreigabe in der Prozessverwaltung prüfen';
|
|
182
|
+
row.append(document.createElement('br'), controls);
|
|
183
|
+
}
|
|
92
184
|
const issue = issues.find(item => item?.id === source.id && item.source === source.source &&
|
|
93
185
|
typeof item.code === 'string' && /^[A-Z][A-Z0-9_]{0,79}$/.test(item.code));
|
|
94
186
|
if (issue) {
|
|
95
187
|
const reason = document.createElement('p'); reason.className = 'notice';
|
|
96
|
-
reason.textContent =
|
|
188
|
+
reason.textContent = `${issue.code}. ${reasons[issue.code] || 'Die Konfiguration dieser Altinstanz prüfen.'}`;
|
|
97
189
|
list.append(row, reason);
|
|
98
190
|
} else list.append(row);
|
|
99
191
|
count++;
|
|
100
192
|
}
|
|
101
193
|
if (!count) { const empty = document.createElement('p'); empty.textContent = 'Für diesen Status sind keine Instanzen erfasst.'; list.append(empty); }
|
|
194
|
+
updateButtons();
|
|
102
195
|
}
|
|
103
196
|
async function refresh() {
|
|
104
197
|
if (busy) return;
|
|
105
|
-
|
|
198
|
+
stopTimer();
|
|
199
|
+
busy = true; updateButtons();
|
|
106
200
|
const message = element('request-message'); message.textContent = 'Status wird geladen …'; message.className = 'eos-message';
|
|
201
|
+
let watch = running;
|
|
107
202
|
try {
|
|
108
203
|
const response = await fetch('/api/eos/migration', { credentials: 'same-origin', cache: 'no-store', signal: AbortSignal.timeout(10000) });
|
|
109
|
-
if (response.status === 401
|
|
110
|
-
|
|
204
|
+
if (response.status === 401 || response.status === 403) {
|
|
205
|
+
watch = false;
|
|
206
|
+
throw new Error(response.status === 401 ? 'Bitte erneut bei EOS anmelden, um den Übernahmestatus zu sehen.'
|
|
207
|
+
: 'Der Übernahmestatus ist nur für die EOS-Administration freigegeben.');
|
|
208
|
+
}
|
|
111
209
|
if (!response.ok) throw new Error('Der Übernahmestatus ist vorübergehend nicht verfügbar.');
|
|
112
|
-
render(await response.json()); message.textContent = 'Status aktualisiert.
|
|
210
|
+
render(await response.json()); message.textContent = 'Status aktualisiert.';
|
|
113
211
|
} catch (error) {
|
|
114
212
|
render({ phase: 'NOT_AVAILABLE' });
|
|
115
|
-
|
|
213
|
+
running = watch;
|
|
214
|
+
message.textContent = watch ? 'Der aktuelle Auftragsstand ist nicht erreichbar. EOS fragt den Status erneut ab.'
|
|
215
|
+
: error instanceof Error ? error.message : 'Status konnte nicht geladen werden.';
|
|
216
|
+
message.className = 'eos-message is-error';
|
|
217
|
+
} finally { busy = false; updateButtons(); pollWhileRunning(); }
|
|
218
|
+
}
|
|
219
|
+
async function start() {
|
|
220
|
+
if (busy || !permitted || !csrf || !revision) return;
|
|
221
|
+
const activateDevices = canActivateDevices && element('activate-devices').checked === true;
|
|
222
|
+
busy = true; stopTimer(); updateButtons();
|
|
223
|
+
const message = element('request-message');
|
|
224
|
+
message.className = 'eos-message'; message.textContent = 'Übernahmeauftrag wird gesendet …';
|
|
225
|
+
try {
|
|
226
|
+
const response = await fetch('/api/eos/migration/start', {
|
|
227
|
+
method: 'POST', credentials: 'same-origin', cache: 'no-store', signal: AbortSignal.timeout(10000),
|
|
228
|
+
headers: { 'Content-Type':'application/json', 'x-nw-csrf':csrf },
|
|
229
|
+
body: JSON.stringify({ expectedRevision:revision, activateDevices }),
|
|
230
|
+
});
|
|
231
|
+
const result = await response.json();
|
|
232
|
+
if (response.status !== 202) {
|
|
233
|
+
const code = typeof result?.error === 'string' && /^[A-Z][A-Z0-9_]{0,79}$/.test(result.error) ? result.error : '';
|
|
234
|
+
const note = Object.hasOwn(operationErrors, code) ? operationErrors[code] : reasons[code];
|
|
235
|
+
throw new Error(note || (response.status === 401 ? 'Bitte erneut bei EOS anmelden.'
|
|
236
|
+
: response.status === 403 ? 'Für den Übernahmestart ist eine Administratoranmeldung erforderlich.'
|
|
237
|
+
: response.status === 409 ? 'Der Übernahmestand hat sich geändert oder ein Auftrag läuft bereits. Status aktualisieren und den aktuellen Stand prüfen.'
|
|
238
|
+
: 'Der Übernahmestart wurde nicht bestätigt. Bitte den aktuellen Status abrufen.'));
|
|
239
|
+
}
|
|
240
|
+
render(result); message.textContent = 'Übernahmeauftrag angenommen.';
|
|
241
|
+
} catch (error) {
|
|
242
|
+
// Missing confirmation is not a failed cutover. Never replay a start
|
|
243
|
+
// after a timeout; a fresh status read is required before another click.
|
|
244
|
+
permitted = false; canActivateDevices = false; csrf = ''; revision = '';
|
|
116
245
|
message.className = 'eos-message is-error';
|
|
117
|
-
|
|
246
|
+
message.textContent = error instanceof Error && error.name === 'Error' ? error.message
|
|
247
|
+
: 'Die Bestätigung des Übernahmestarts fehlt. Bitte den aktuellen Status abrufen.';
|
|
248
|
+
} finally { busy = false; updateButtons(); pollWhileRunning(); }
|
|
118
249
|
}
|
|
119
|
-
element('refresh').addEventListener('click', () => void refresh());
|
|
250
|
+
element('refresh').addEventListener('click', () => { pollUntil = 0; void refresh(); });
|
|
251
|
+
element('start').addEventListener('click', () => void start());
|
|
252
|
+
document.addEventListener('visibilitychange', () => {
|
|
253
|
+
if (document.hidden) stopTimer();
|
|
254
|
+
else if (running) void refresh();
|
|
255
|
+
});
|
|
256
|
+
window.addEventListener('pagehide', stopTimer);
|
|
257
|
+
window.addEventListener('pageshow', event => { if (event.persisted) void refresh(); });
|
|
120
258
|
void refresh();
|
|
121
259
|
})();
|
|
@@ -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:6c8e239e-f4a4-48eb-be2f-e64885a88422",
|
|
6
6
|
"version": 1,
|
|
7
7
|
"metadata": {
|
|
8
|
-
"timestamp": "2026-11-
|
|
8
|
+
"timestamp": "2026-11-28T07:48:22.892Z",
|
|
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.39",
|
|
23
23
|
"type": "library",
|
|
24
24
|
"name": "iobroker.eos-admin",
|
|
25
|
-
"version": "9.0.
|
|
25
|
+
"version": "9.0.39",
|
|
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.39",
|
|
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.39",
|
|
26359
26359
|
"dependsOn": [
|
|
26360
26360
|
"@iobroker/adapter-core@3.4.3",
|
|
26361
26361
|
"@iobroker/plugin-docker@1.2.1",
|