iobroker.eos-admin 9.0.26 → 9.0.27
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 -15
- package/START_HIER_9.0.27.md +33 -0
- package/adminWww/.vite/manifest.json +114 -114
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +13759 -13759
- package/adminWww/assets/{AdapterUpdateDialog-DIjnNZ5k.js → AdapterUpdateDialog-L3aqW3ID.js} +1 -1
- package/adminWww/assets/{Adapters-D8UOQg1q.js → Adapters-Db3kbmAj.js} +1 -1
- package/adminWww/assets/{ConfigManager-CAvT_4-g.js → ConfigManager-D33l1qlC.js} +1 -1
- package/adminWww/assets/{Enums-CrNUOX0d.js → Enums-HlPEZ4AF.js} +1 -1
- package/adminWww/assets/{Fields-D-0qFiqr.js → Fields-BWBgNDOp.js} +1 -1
- package/adminWww/assets/{Files-BL8kvaeC.js → Files-BYaJp3AG.js} +1 -1
- package/adminWww/assets/{Hosts-BToJLy61.js → Hosts-DimiJ78g.js} +1 -1
- package/adminWww/assets/{Instances-Dlrp1KGP.js → Instances-C5kAjcqw.js} +1 -1
- package/adminWww/assets/{Intro-5EbxvP4X.js → Intro-B8keS0Ph.js} +1 -1
- package/adminWww/assets/{Logs-xdFVJ6fZ.js → Logs-D9dqF5Ag.js} +1 -1
- package/adminWww/assets/{Objects-DhyJ5eAY.js → Objects-oliB7_Se.js} +1 -1
- package/adminWww/assets/{Overview-BspgcFB7.js → Overview-BmjcCFve.js} +1 -1
- package/adminWww/assets/{State-CJ1mKH_U.js → State-DQz1O54D.js} +1 -1
- package/adminWww/assets/{UsedResources-BMiCxqWH.js → UsedResources-DOAuH0-U.js} +1 -1
- package/adminWww/assets/{Users-DrlJHRa5.js → Users-Dv1iXiRk.js} +1 -1
- package/adminWww/assets/{bootstrap-BU7j1Fe_.js → bootstrap-BVw0diuj.js} +3 -3
- package/adminWww/assets/{hostInit-Cgee6juw.js → hostInit-C_7OBoza.js} +1 -1
- package/adminWww/assets/{icons-material-C0U9EKON.js → icons-material-Apny8Mbp.js} +1 -1
- package/adminWww/assets/{index-BUZf1ftI.js → index-DwDSxDMx.js} +2 -2
- package/adminWww/assets/{installSVGRenderer-CcjgaxiA.js → installSVGRenderer--VTzKbml.js} +1 -1
- package/adminWww/assets/{mf-entry-bootstrap-0-96d40e57.js → mf-entry-bootstrap-0-6f3e4c6b.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.26.js → remoteEntry-eos-9.0.27.js} +1 -1
- package/adminWww/remoteEntry.js +1 -1
- package/build/lib/eosDeviceEmsPlan.js +24 -1
- package/build/lib/eosDeviceEmsPlan.js.map +1 -1
- package/build/lib/eosModuleHost.js +66 -3
- package/build/lib/eosModuleHost.js.map +1 -1
- package/docs/reports/unified-9.0.27/ABHAENGIGKEITEN.md +27 -0
- package/docs/reports/unified-9.0.27/PRUEFBERICHT.md +68 -0
- package/docs/reports/unified-9.0.27/PRUEFERGEBNISSE.json +292 -0
- package/docs/reports/unified-9.0.27/SICHERHEITSBETRACHTUNG.md +26 -0
- package/docs/reports/unified-9.0.27/TIBBER_NEUSTART.md +23 -0
- package/docs/reports/unified-9.0.27/UPDATE_WIEDERANLAUF.md +46 -0
- package/docs/reports/unified-9.0.27/raw/INDEX.json +347 -0
- package/docs/reports/unified-9.0.27/raw/admin-build-mirror-review.json +75 -0
- package/docs/reports/unified-9.0.27/raw/ajv-production-reachability.json +35 -0
- package/docs/reports/unified-9.0.27/raw/backend-build.log +5 -0
- package/docs/reports/unified-9.0.27/raw/baseline-devices.log +138 -0
- package/docs/reports/unified-9.0.27/raw/baseline-module-startup.log +82 -0
- package/docs/reports/unified-9.0.27/raw/baseline-ocpp-contract.log +93 -0
- package/docs/reports/unified-9.0.27/raw/baseline-ocpp-frontend.log +255 -0
- package/docs/reports/unified-9.0.27/raw/baseline-repository-tools.log +84 -0
- package/docs/reports/unified-9.0.27/raw/browser-blocked.log +38 -0
- package/docs/reports/unified-9.0.27/raw/controller-725-reproduction-node24.log +4 -0
- package/docs/reports/unified-9.0.27/raw/devices-child-rpc-diagnostic.log +34 -0
- package/docs/reports/unified-9.0.27/raw/devices-filter-without-readiness.log +15 -0
- package/docs/reports/unified-9.0.27/raw/devices-final-web-filtered-node22.log +107 -0
- package/docs/reports/unified-9.0.27/raw/devices-final-web-filtered-node24.log +26 -0
- package/docs/reports/unified-9.0.27/raw/eos-update-path-node24.log +52 -0
- package/docs/reports/unified-9.0.27/raw/frontend-build.log +152 -0
- package/docs/reports/unified-9.0.27/raw/influx/provenance.json +42 -0
- package/docs/reports/unified-9.0.27/raw/installer-build.log +26 -0
- package/docs/reports/unified-9.0.27/raw/lint.log +5 -0
- package/docs/reports/unified-9.0.27/raw/modules-build.log +5 -0
- package/docs/reports/unified-9.0.27/raw/node22-tests-final.log +16976 -0
- package/docs/reports/unified-9.0.27/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.27/raw/node24-tests-final.log +2831 -0
- package/docs/reports/unified-9.0.27/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.27/raw/npm-audit-development.json +398 -0
- package/docs/reports/unified-9.0.27/raw/npm-audit-production.json +77 -0
- package/docs/reports/unified-9.0.27/raw/npm-production-ajv-tree.json +33 -0
- package/docs/reports/unified-9.0.27/raw/npm-production-ajv-tree.stderr +1 -0
- package/docs/reports/unified-9.0.27/raw/npm926-dateivergleich.json +6 -0
- package/docs/reports/unified-9.0.27/raw/production-audit-review.json +30 -0
- package/docs/reports/unified-9.0.27/raw/release-targeted.log +118 -0
- package/docs/reports/unified-9.0.27/raw/restart-regressions-node22.log +361 -0
- package/docs/reports/unified-9.0.27/raw/sbom-generation.json +11 -0
- package/docs/reports/unified-9.0.27/raw/source-fixtures.json +30 -0
- package/docs/reports/unified-9.0.27/raw/targeted-ocpp-frontend.log +26 -0
- package/docs/reports/unified-9.0.27/raw/test-environment.json +24 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/REVIEW.md +40 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/appcenter-overwrite-patched-scratch.log +11 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/appcenter-overwrite-repro.log +33 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/customer-tariff-lint.log +0 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/customer-tariff-typecheck.log +0 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/process-disk-restart-node24.log +10 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/roundtrip-built-diagnostic.log +58 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/roundtrip-built-ipc-counts.log +45 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/roundtrip-built-node24.log +42 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/roundtrip-final-node22.log +134 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/roundtrip-final-node24.log +28 -0
- package/docs/reports/unified-9.0.27/raw/tibber/backend/roundtrip-source-node22-diagnostic.log +220 -0
- package/docs/reports/unified-9.0.27/raw/tibber/independent/tariff-background-hydration-review.log +1 -0
- package/docs/reports/unified-9.0.27/raw/tibber/independent/tibber-header-object-mask-review.log +1 -0
- package/docs/reports/unified-9.0.27/raw/tibber/independent/tibber-independent-frontend-review.log +14 -0
- package/docs/reports/unified-9.0.27/raw/tibber/independent/tibber-independent-scope-review.log +1 -0
- package/docs/reports/unified-9.0.27/raw/tibber/independent/tibber-mapping-targeted-node24.log +2184 -0
- package/docs/reports/unified-9.0.27/raw/tibber/independent/tibber-parent-persistence-review.log +20 -0
- package/docs/reports/unified-9.0.27/raw/tibber/tariff-review/appcenter-tariff-roundtrip-baseline.log +57 -0
- package/docs/reports/unified-9.0.27/raw/tibber/tariff-review/customer-editor-final.log +24 -0
- package/docs/reports/unified-9.0.27/raw/tibber/tariff-review/frontend-guard-baseline.log +303 -0
- package/docs/reports/unified-9.0.27/raw/tibber/tariff-review/frontend-guard-final.log +14 -0
- package/docs/reports/unified-9.0.27/raw/tibber-appcenter-baseline.log +33 -0
- package/docs/reports/unified-9.0.27/raw/tibber-background-hydration-baseline.log +1 -0
- package/docs/reports/unified-9.0.27/raw/tibber-form-baseline.log +57 -0
- package/docs/reports/unified-9.0.27/raw/tibber-mapping-targeted-node24.log +2184 -0
- package/docs/reports/unified-9.0.27/raw/tibber-minimal-fix-isolation.log +11 -0
- package/docs/reports/unified-9.0.27/raw/typecheck.log +5 -0
- package/docs/reports/unified-9.0.27/raw/ui-build.log +7 -0
- package/io-package.json +8 -8
- package/modules/devices/admin/ems-assignment.js +1 -0
- package/package.json +7 -8
- package/release-manifests/unified/build-environment.cdx.json +6 -6
- package/release-manifests/unified/files.json +162 -73
- package/release-manifests/unified/obsolete-admin-assets.json +82 -0
- package/release-manifests/unified/runtime.cdx.json +28 -28
- package/release-manifests/unified/validation.json +15 -15
- package/tools/eos-release-manifest.cjs +1 -1
- package/ui/io-package.json +1 -1
- package/ui/lib/customer-tariff.js +73 -1
- package/ui/lib/installer-lifecycle.js +5 -3
- package/ui/lib/ocpp-auto-discovery.js +53 -6
- package/ui/main.js +103 -91
- package/ui/package.json +1 -1
- package/ui/www/ems-apps.js +188 -130
- package/ui/www/licenses/smarthome-markdown-components.json +156 -156
- package/ui/www/manifest.webmanifest +2 -2
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
8
|
*
|
|
9
9
|
* Quelle: src-ts/runtime-executables/lib/installer-lifecycle.ts
|
|
10
|
-
* Quell-Hash: sha256:
|
|
10
|
+
* Quell-Hash: sha256:b6fb03d371839579e04a18d6a993414a41fdca9588fd143722c6174b39eae153
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -64,9 +64,11 @@ function installerRevision(patch) {
|
|
|
64
64
|
* Once present, a missing or stale token must never replace a newer nonempty row list. */
|
|
65
65
|
function assertInstallerRevision(expected, patch) {
|
|
66
66
|
const bindings = record(record(record(patch).eosDeviceEms).bindings);
|
|
67
|
-
const
|
|
67
|
+
const settings = record(record(patch).settingsConfig);
|
|
68
|
+
const ocppRows = settings.evcsList;
|
|
68
69
|
const required = Object.keys(bindings).length > 0 || (Array.isArray(ocppRows)
|
|
69
|
-
&& ocppRows.some(row => record(record(row).ocppDiscovery).source === 'nexowatt-ocpp21'))
|
|
70
|
+
&& ocppRows.some(row => record(record(row).ocppDiscovery).source === 'nexowatt-ocpp21'))
|
|
71
|
+
|| (Array.isArray(settings.ocppExcludedStationRoots) && settings.ocppExcludedStationRoots.length > 0);
|
|
70
72
|
if ((expected === undefined || expected === null) && !required)
|
|
71
73
|
return;
|
|
72
74
|
if (typeof expected !== 'string' || !/^[a-f0-9]{64}$/.test(expected) || expected !== installerRevision(patch)) {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
8
|
*
|
|
9
9
|
* Quelle: src-ts/runtime-executables/lib/ocpp-auto-discovery.ts
|
|
10
|
-
* Quell-Hash: sha256:
|
|
10
|
+
* Quell-Hash: sha256:1636f107ac3883c9b85c81d8d7420a18a269a588cc6fb986a3ea433a901720a9
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -29,6 +29,7 @@ exports.ocppNamespace = ocppNamespace;
|
|
|
29
29
|
exports.ocppDiscoveryPatterns = ocppDiscoveryPatterns;
|
|
30
30
|
exports.collectOcppStations = collectOcppStations;
|
|
31
31
|
exports.filterOcppDiscoverySources = filterOcppDiscoverySources;
|
|
32
|
+
exports.prepareOcppDiscoveryExclusions = prepareOcppDiscoveryExclusions;
|
|
32
33
|
exports.normalizeOcppDiscovery = normalizeOcppDiscovery;
|
|
33
34
|
exports.planOcppDiscovery = planOcppDiscovery;
|
|
34
35
|
exports.OCPP_NATIVE_CONTRACT = 'nexowatt-ocpp21-0.4-native';
|
|
@@ -183,16 +184,52 @@ function filterOcppDiscoverySources(stations, sourceInput, hostNamespace) {
|
|
|
183
184
|
namespaces.add(id.slice('system.adapter.'.length));
|
|
184
185
|
}
|
|
185
186
|
if (typeof hostNamespace === 'string' && /^eos-admin\.\d+$/.test(hostNamespace)) {
|
|
186
|
-
namespaces.add(`${hostNamespace}.ocpp`);
|
|
187
187
|
const hosted = text(source.hostedNamespace, 120);
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
// A migrated hosted module owns its preserved namespace, not both the
|
|
189
|
+
// preserved and default trees. Old native objects may still be retained.
|
|
190
|
+
namespaces.add(/^ocpp21\.\d{1,8}$/.test(hosted) ? hosted : `${hostNamespace}.ocpp`);
|
|
190
191
|
}
|
|
191
192
|
return stations.filter(station => namespaces.has(station.adapterInstance));
|
|
192
193
|
}
|
|
193
194
|
function rootsOf(row) {
|
|
194
195
|
return [...new Set([...ID_FIELDS.map(key => ocppStationRoot(row[key])), ocppStationRoot(record(row.ocppDiscovery).stationRoot)].filter(Boolean))];
|
|
195
196
|
}
|
|
197
|
+
/** An explicit EMS removal suppresses registration, never the OCPP connection.
|
|
198
|
+
* This small persisted list survives restart. Only an explicit row re-import
|
|
199
|
+
* removes its entry; automatic scans do not modify the user's removal choice. */
|
|
200
|
+
function excludedRoots(configInput) {
|
|
201
|
+
const input = record(record(configInput).settingsConfig).ocppExcludedStationRoots;
|
|
202
|
+
if (input === undefined)
|
|
203
|
+
return new Set();
|
|
204
|
+
if (!Array.isArray(input) || input.length > MAX_STATIONS || input.some(root => typeof root !== 'string' || root.length > 200 || !root || ocppStationRoot(root) !== root)) {
|
|
205
|
+
throw fail('EOS_OCPP_EXCLUSIONS_INVALID');
|
|
206
|
+
}
|
|
207
|
+
return new Set(input);
|
|
208
|
+
}
|
|
209
|
+
/** Server-side only, inside the installer revision/mutation lock. Client-supplied
|
|
210
|
+
* exclusion metadata is ignored; previous saved rows and the explicit new rows
|
|
211
|
+
* establish deletion/re-import intent without trusting names or UI station groups. */
|
|
212
|
+
function prepareOcppDiscoveryExclusions(previousInput, nextInput) {
|
|
213
|
+
const rowsOf = (value) => {
|
|
214
|
+
const rows = record(record(value).settingsConfig).evcsList;
|
|
215
|
+
if (rows === undefined)
|
|
216
|
+
return [];
|
|
217
|
+
if (!Array.isArray(rows) || rows.length > MAX_ROWS || rows.some(row => row === null || typeof row !== 'object' || Array.isArray(row)))
|
|
218
|
+
throw fail('EOS_OCPP_CONFIG_INVALID');
|
|
219
|
+
return rows.map(record);
|
|
220
|
+
};
|
|
221
|
+
const exclusions = excludedRoots(previousInput);
|
|
222
|
+
const previous = new Set(rowsOf(previousInput).flatMap(rootsOf));
|
|
223
|
+
const next = new Set(rowsOf(nextInput).flatMap(rootsOf));
|
|
224
|
+
for (const root of previous)
|
|
225
|
+
if (!next.has(root))
|
|
226
|
+
exclusions.add(root);
|
|
227
|
+
for (const root of next)
|
|
228
|
+
exclusions.delete(root);
|
|
229
|
+
if (exclusions.size > MAX_STATIONS)
|
|
230
|
+
throw fail('EOS_OCPP_EXCLUSIONS_LIMIT');
|
|
231
|
+
return [...exclusions].sort();
|
|
232
|
+
}
|
|
196
233
|
/** Only bounded discovery metadata crosses the normalized runtime configuration. */
|
|
197
234
|
function normalizeOcppDiscovery(value) {
|
|
198
235
|
const input = record(value);
|
|
@@ -230,6 +267,7 @@ function knownAliasEquivalent(field, current, canonical, root) {
|
|
|
230
267
|
function planOcppDiscovery(configInput, stations, options = {}) {
|
|
231
268
|
const config = record(configInput);
|
|
232
269
|
const settings = record(config.settingsConfig);
|
|
270
|
+
const exclusions = excludedRoots(config);
|
|
233
271
|
const limit = options.maxRows ?? MAX_ROWS;
|
|
234
272
|
if (!Number.isInteger(limit) || limit < 0)
|
|
235
273
|
throw fail('EOS_OCPP_LICENSE_LIMIT_INVALID');
|
|
@@ -244,6 +282,12 @@ function planOcppDiscovery(configInput, stations, options = {}) {
|
|
|
244
282
|
if (stations.length > MAX_STATIONS)
|
|
245
283
|
throw fail('EOS_OCPP_DISCOVERY_STATION_LIMIT');
|
|
246
284
|
for (const station of stations) {
|
|
285
|
+
if (exclusions.has(station.root)) {
|
|
286
|
+
statuses.push({ root: station.root, adapterInstance: station.adapterInstance, rowIndex: null,
|
|
287
|
+
code: 'USER_EXCLUDED', connectorCount: station.connectorCount, evseCount: station.evseCount,
|
|
288
|
+
topologySource: station.topologySource, missing: station.missing });
|
|
289
|
+
continue;
|
|
290
|
+
}
|
|
247
291
|
const found = rows.map((row, index) => ({ row, index })).filter(item => rootsOf(item.row).includes(station.root));
|
|
248
292
|
const existing = found[0];
|
|
249
293
|
let code = station.missing.length ? 'CONTRACT_INCOMPLETE' : 'MAPPED';
|
|
@@ -257,9 +301,12 @@ function planOcppDiscovery(configInput, stations, options = {}) {
|
|
|
257
301
|
const index = existing ? existing.index : rows.length;
|
|
258
302
|
// Partial registration is visible, with every verified field filled now; retry completes it later.
|
|
259
303
|
if (!blocked) {
|
|
260
|
-
|
|
304
|
+
// stationKey belongs to the installer's station/group allocation.
|
|
305
|
+
// Physical discovery identity lives in ocppDiscovery.stationRoot;
|
|
306
|
+
// registration must not allocate a station page or electrical group.
|
|
307
|
+
const next = existing ? { ...existing.row } : { enabled: false, name: station.name, connectorNo: 1 };
|
|
261
308
|
const autoCreated = !existing || record(next.ocppDiscovery).autoCreated === true;
|
|
262
|
-
const manualMonitor = !!existing &&
|
|
309
|
+
const manualMonitor = !!existing && next.enabled !== false
|
|
263
310
|
&& empty(next.setCurrentAId) && empty(next.setPowerWId);
|
|
264
311
|
for (const [key, id] of Object.entries(station.ids)) {
|
|
265
312
|
// Discovering an existing monitor must not authorize a first command writer.
|
package/ui/main.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
8
|
*
|
|
9
9
|
* Quelle: src-ts/runtime-executables/main.ts
|
|
10
|
-
* Quell-Hash: sha256:
|
|
10
|
+
* Quell-Hash: sha256:0929d163c13709fb7736ba4c35a32374a1524032791acc8fb6be5a51a94957c2
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -59,7 +59,7 @@ const { installerRevision, assertInstallerRevision, provisionInstallerObjects, a
|
|
|
59
59
|
const { buildFarmOverview } = require('./lib/storage-farm-overview');
|
|
60
60
|
const { readFlowMeasurement, sumFlowMeasurements } = require('./lib/flow-measurement');
|
|
61
61
|
const { tariffDisplayConfig, tariffPriceNumber } = require('./lib/tariff-price');
|
|
62
|
-
const { customerTariffView, prepareCustomerTariffChange } = require('./lib/customer-tariff');
|
|
62
|
+
const { customerTariffView, prepareCustomerTariffChange, mergeInstallerTariffSecrets } = require('./lib/customer-tariff');
|
|
63
63
|
const { InfluxDirectClient } = require('./lib/influx-direct');
|
|
64
64
|
const { InfluxHistoryRuntime } = require('./lib/influx-history-runtime');
|
|
65
65
|
const { PostgresHistoryClient, loadPostgresProfile } = require('./lib/postgres-history');
|
|
@@ -81,7 +81,7 @@ const { buildStationDisplayPresentation } = require('./lib/station-display-prese
|
|
|
81
81
|
const tariffProviderRegistry = require('./ems/services/tariff-provider-registry');
|
|
82
82
|
const { normalizeEvcsEnergyTotalKwh } = require('./ems/services/evcs-unit-conversion');
|
|
83
83
|
const { validateEvcsElectricalConfig } = require('./lib/evcs-electrical-limits');
|
|
84
|
-
const { OcppAutoDiscovery,
|
|
84
|
+
const { OcppAutoDiscovery, collectOcppStations, filterOcppDiscoverySources, planOcppDiscovery, prepareOcppDiscoveryExclusions, normalizeOcppDiscovery, ocppDiscoveryPatterns } = require('./lib/ocpp-auto-discovery');
|
|
85
85
|
const { beginChargingControlWrite, bindChargingPointIdentityBaseline, chargingPointLayoutChanged, remapChargingPointDefaultModes, publicChargingControlIdentity, assertChargingControlIdentity } = require('./lib/charging-point-identity');
|
|
86
86
|
const { remapChargingStationAssignments } = require('./lib/charging-station-identity');
|
|
87
87
|
const { NotificationMail, validAddress } = require('./lib/notification-mail');
|
|
@@ -4974,6 +4974,7 @@ class NexoWattVis extends HostedAdapter {
|
|
|
4974
4974
|
const assertReady = () => {
|
|
4975
4975
|
if (this._nwShuttingDown || this._bridge.canWrite() !== true) throw new Error('EOS_UI_OWNERSHIP_REQUIRED');
|
|
4976
4976
|
if (!['ready', 'degraded'].includes(this._hostedStartup?.state)) throw new Error('EOS_UI_STARTING');
|
|
4977
|
+
if (this._nwInstallerConfigHydrated !== true) throw new Error('EOS_UI_CONFIG_NOT_READY');
|
|
4977
4978
|
if (!centralLicenseSnapshot(this._bridge).ok) throw new Error('EOS_LICENSE_REQUIRED');
|
|
4978
4979
|
};
|
|
4979
4980
|
assertReady();
|
|
@@ -5022,6 +5023,7 @@ class NexoWattVis extends HostedAdapter {
|
|
|
5022
5023
|
const assertReady = () => {
|
|
5023
5024
|
if (this._nwShuttingDown || this._bridge.canWrite() !== true) throw new Error('EOS_UI_OWNERSHIP_REQUIRED');
|
|
5024
5025
|
if (!['ready', 'degraded'].includes(this._hostedStartup?.state)) throw new Error('EOS_UI_STARTING');
|
|
5026
|
+
if (this._nwInstallerConfigHydrated !== true) throw new Error('EOS_UI_CONFIG_NOT_READY');
|
|
5025
5027
|
if (!centralLicenseSnapshot(this._bridge).ok) throw new Error('EOS_LICENSE_REQUIRED');
|
|
5026
5028
|
};
|
|
5027
5029
|
assertReady();
|
|
@@ -5056,18 +5058,32 @@ class NexoWattVis extends HostedAdapter {
|
|
|
5056
5058
|
} finally { this._nwEndInstallerConfigMutation(token); }
|
|
5057
5059
|
}
|
|
5058
5060
|
|
|
5061
|
+
async _nwReadOcppDiscoveryObjects() {
|
|
5062
|
+
return Object.assign({}, ...await Promise.all(ocppDiscoveryPatterns(this.hostNamespace)
|
|
5063
|
+
.map(pattern => this.getForeignObjectsAsync(pattern, 'state'))));
|
|
5064
|
+
}
|
|
5065
|
+
|
|
5066
|
+
async _nwReadOcppDiscoveryMetadata() {
|
|
5067
|
+
return Object.assign({}, ...await Promise.all(ocppDiscoveryPatterns(this.hostNamespace)
|
|
5068
|
+
.map(pattern => this.getForeignStatesAsync(`${pattern}.info.*`))));
|
|
5069
|
+
}
|
|
5070
|
+
|
|
5071
|
+
async _nwReadOcppDiscoverySources() {
|
|
5072
|
+
return {
|
|
5073
|
+
instances: await this.getObjectViewAsync('system', 'instance', {
|
|
5074
|
+
startkey: 'system.adapter.ocpp21.', endkey: 'system.adapter.ocpp21.\u9999', limit: 129,
|
|
5075
|
+
}),
|
|
5076
|
+
hostedNamespace: this._bridge.getRuntimeReadiness?.()?.hostedOcppNamespace,
|
|
5077
|
+
};
|
|
5078
|
+
}
|
|
5079
|
+
|
|
5059
5080
|
_nwStartOcppAutoDiscovery() {
|
|
5060
5081
|
if (this._nwShuttingDown || this._ocppAutoDiscovery) return;
|
|
5061
5082
|
this._ocppAutoDiscovery = new OcppAutoDiscovery({
|
|
5062
5083
|
hostNamespace: this.hostNamespace,
|
|
5063
|
-
readObjects:
|
|
5064
|
-
readMetadata:
|
|
5065
|
-
readSources:
|
|
5066
|
-
instances: await this.getObjectViewAsync('system', 'instance', {
|
|
5067
|
-
startkey: 'system.adapter.ocpp21.', endkey: 'system.adapter.ocpp21.\u9999', limit: 129,
|
|
5068
|
-
}),
|
|
5069
|
-
hostedNamespace: this._bridge.getRuntimeReadiness?.()?.hostedOcppNamespace,
|
|
5070
|
-
}),
|
|
5084
|
+
readObjects: () => this._nwReadOcppDiscoveryObjects(),
|
|
5085
|
+
readMetadata: () => this._nwReadOcppDiscoveryMetadata(),
|
|
5086
|
+
readSources: () => this._nwReadOcppDiscoverySources(),
|
|
5071
5087
|
subscribe: () => Promise.all(ocppDiscoveryPatterns(this.hostNamespace).map(pattern => this.subscribeForeignStatesAsync(`${pattern}.info.*`))),
|
|
5072
5088
|
reconcile: stations => this.reconcileOcppDiscovery(stations),
|
|
5073
5089
|
canRun: () => !this._nwShuttingDown && this._bridge.canWrite() === true
|
|
@@ -15852,6 +15868,7 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
15852
15868
|
// KI‑Energieberater
|
|
15853
15869
|
aiAdvisor: (n.aiAdvisor && typeof n.aiAdvisor === 'object') ? n.aiAdvisor : undefined,
|
|
15854
15870
|
energyWallet: (n.energyWallet && typeof n.energyWallet === 'object') ? n.energyWallet : {},
|
|
15871
|
+
tariffProvider: (n.tariffProvider && typeof n.tariffProvider === 'object') ? this._nwDeepClone(n.tariffProvider) : {},
|
|
15855
15872
|
energyLedger: (n.energyLedger && typeof n.energyLedger === 'object') ? n.energyLedger : { enabled: false },
|
|
15856
15873
|
chargeKiosk: (n.chargeKiosk && typeof n.chargeKiosk === 'object') ? n.chargeKiosk : { enabled: false, displayBasePath: '/display/station/', stations: [] },
|
|
15857
15874
|
meshMicrogrid: (n.meshMicrogrid && typeof n.meshMicrogrid === 'object') ? n.meshMicrogrid : { enabled: false, mode: 'diagnostic', clusterId: 'cluster_01', clusterName: 'Lokaler Energieverbund', gridLimitW: 0, nodes: [] },
|
|
@@ -16200,6 +16217,14 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
16200
16217
|
if (_nwTariffSecretKeys.has(String(key)) && String(creds[key] || '').trim()) creds[key] = '__KEEP__';
|
|
16201
16218
|
}
|
|
16202
16219
|
}
|
|
16220
|
+
// Request headers/bodies may embed arbitrary authentication values.
|
|
16221
|
+
// Keep the entire configured value server-side instead of guessing keys.
|
|
16222
|
+
const custom = clone?.tariffProvider?.customRest;
|
|
16223
|
+
if (custom && typeof custom === 'object') {
|
|
16224
|
+
for (const key of ['headersJson', 'body']) {
|
|
16225
|
+
if (custom[key] !== undefined && custom[key] !== null && custom[key] !== '') custom[key] = '__KEEP__';
|
|
16226
|
+
}
|
|
16227
|
+
}
|
|
16203
16228
|
return clone;
|
|
16204
16229
|
};
|
|
16205
16230
|
const stripRetainedTariffCredentials = (patch) => {
|
|
@@ -16207,20 +16232,7 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
16207
16232
|
if (clean.tariffProvider) delete clean.tariffProvider.retainedProviderCredentials;
|
|
16208
16233
|
return clean;
|
|
16209
16234
|
};
|
|
16210
|
-
const _nwMergeTariffProviderSecrets =
|
|
16211
|
-
const next = this._nwDeepClone(incoming || {}) || {};
|
|
16212
|
-
const prev = existing && typeof existing === 'object' ? existing : {};
|
|
16213
|
-
next.credentials = next.credentials && typeof next.credentials === 'object' ? next.credentials : {};
|
|
16214
|
-
const prevCreds = prev.credentials && typeof prev.credentials === 'object' ? prev.credentials : {};
|
|
16215
|
-
for (const key of _nwTariffSecretKeys) {
|
|
16216
|
-
const raw = next.credentials[key];
|
|
16217
|
-
if (raw === '__KEEP__' || raw === undefined || raw === null) {
|
|
16218
|
-
if (prevCreds[key] !== undefined) next.credentials[key] = prevCreds[key];
|
|
16219
|
-
else delete next.credentials[key];
|
|
16220
|
-
}
|
|
16221
|
-
}
|
|
16222
|
-
return next;
|
|
16223
|
-
};
|
|
16235
|
+
const _nwMergeTariffProviderSecrets = mergeInstallerTariffSecrets;
|
|
16224
16236
|
|
|
16225
16237
|
/** Neue/geänderte Stations-Bearer verlangen ein langes URL-sicheres Format.
|
|
16226
16238
|
* Unveränderte Alt-Tokens bleiben bis zur bewussten Neuverknüpfung verwendbar;
|
|
@@ -16305,8 +16317,16 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
16305
16317
|
} catch (error) { return historyFailure(res, error); }
|
|
16306
16318
|
finally { endMeshAppSave(mutation); }
|
|
16307
16319
|
});
|
|
16320
|
+
// A reachable shell is not evidence that the stored Installer configuration
|
|
16321
|
+
// has loaded. Never publish a default snapshot/revision or accept its edit.
|
|
16322
|
+
const requireInstallerConfigLoaded = (_req, res, next) => {
|
|
16323
|
+
if (this._nwInstallerConfigHydrated === true) return next();
|
|
16324
|
+
sendNoStore(res);
|
|
16325
|
+
const loading = ['idle', 'starting'].includes(this._hostedStartup?.state);
|
|
16326
|
+
return res.status(503).json({ ok: false, error: loading ? 'EOS_INSTALLER_CONFIG_LOADING' : 'EOS_INSTALLER_CONFIG_UNAVAILABLE' });
|
|
16327
|
+
};
|
|
16308
16328
|
// API-Kommentar: GET-Route. Zweck: stellt einen Web-/API-Endpunkt bereit. Zusammenhang: Frontend-Dateien in www/* können diesen Endpunkt direkt nutzen. Route/Handler: '/api/installer/config', requireInstaller, async (_req, res) => {
|
|
16309
|
-
app.get('/api/installer/config', requireInstaller, async (_req, res) => {
|
|
16329
|
+
app.get('/api/installer/config', requireInstaller, requireInstallerConfigLoaded, async (_req, res) => {
|
|
16310
16330
|
try {
|
|
16311
16331
|
sendNoStore(res);
|
|
16312
16332
|
// A license can be saved through the Admin tab while the App-Center is already open.
|
|
@@ -16349,7 +16369,7 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
16349
16369
|
});
|
|
16350
16370
|
|
|
16351
16371
|
// API-Kommentar: POST-Route. Zweck: stellt einen Web-/API-Endpunkt bereit. Zusammenhang: Frontend-Dateien in www/* können diesen Endpunkt direkt nutzen. Route/Handler: '/api/installer/config', requireInstaller, async (req, res) => {
|
|
16352
|
-
app.post('/api/installer/config', requireInstaller, async (req, res) => {
|
|
16372
|
+
app.post('/api/installer/config', requireInstaller, requireInstallerConfigLoaded, async (req, res) => {
|
|
16353
16373
|
const meshSaveToken = beginMeshAppSave();
|
|
16354
16374
|
if (!meshSaveToken) return res.status(409).json({ error: 'Konfiguration wird bereits gespeichert.' });
|
|
16355
16375
|
try {
|
|
@@ -16431,6 +16451,22 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
16431
16451
|
mergedPatch = (norm && norm.patch) ? norm.patch : mergedPatch;
|
|
16432
16452
|
} catch (_e) {}
|
|
16433
16453
|
|
|
16454
|
+
// An explicit EMS deletion must survive the next background OCPP scan.
|
|
16455
|
+
// Compute this from the authoritative before/after rows under the same
|
|
16456
|
+
// revision lock; never trust a form's copied exclusion metadata.
|
|
16457
|
+
const beforeOcppEdit = this.nwApplyInstallerPatchToRuntimeConfig(this.config || {}, basePatch);
|
|
16458
|
+
const explicitOcppRows = safePatch.settingsConfig && typeof safePatch.settingsConfig === 'object'
|
|
16459
|
+
&& Object.prototype.hasOwnProperty.call(safePatch.settingsConfig, 'evcsList');
|
|
16460
|
+
const beforeHasOcppExclusions = Object.prototype.hasOwnProperty.call(beforeOcppEdit.settingsConfig || {}, 'ocppExcludedStationRoots');
|
|
16461
|
+
const ocppExclusions = explicitOcppRows
|
|
16462
|
+
? prepareOcppDiscoveryExclusions(beforeOcppEdit, this.nwApplyInstallerPatchToRuntimeConfig(this.config || {}, mergedPatch))
|
|
16463
|
+
: (beforeHasOcppExclusions ? this._nwDeepClone(beforeOcppEdit.settingsConfig.ocppExcludedStationRoots) : []);
|
|
16464
|
+
if ((Array.isArray(ocppExclusions) && ocppExclusions.length) || beforeHasOcppExclusions) {
|
|
16465
|
+
mergedPatch.settingsConfig = { ...mergedPatch.settingsConfig, ocppExcludedStationRoots: ocppExclusions };
|
|
16466
|
+
} else if (mergedPatch.settingsConfig && typeof mergedPatch.settingsConfig === 'object') {
|
|
16467
|
+
delete mergedPatch.settingsConfig.ocppExcludedStationRoots;
|
|
16468
|
+
}
|
|
16469
|
+
|
|
16434
16470
|
if (Object.prototype.hasOwnProperty.call(safePatch, 'nvpTopology')) {
|
|
16435
16471
|
const desired = safePatch.nvpTopology;
|
|
16436
16472
|
if (JSON.stringify(desired) === JSON.stringify(currentNvpConfig(this))) {
|
|
@@ -16696,6 +16732,15 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
16696
16732
|
finalPatch = (norm && norm.patch) ? norm.patch : finalPatch;
|
|
16697
16733
|
} catch (_e) {}
|
|
16698
16734
|
|
|
16735
|
+
// An explicit backup restore retains its saved removal choices. Validate
|
|
16736
|
+
// their shape/size before provisioning or stopping writers; rows restored
|
|
16737
|
+
// by that same backup are an explicit re-import of those identities.
|
|
16738
|
+
const restoredOcppConfig = this.nwApplyInstallerPatchToRuntimeConfig(baseNative, finalPatch);
|
|
16739
|
+
const restoredOcppExclusions = prepareOcppDiscoveryExclusions(restoredOcppConfig, restoredOcppConfig);
|
|
16740
|
+
if (Object.prototype.hasOwnProperty.call(restoredOcppConfig.settingsConfig || {}, 'ocppExcludedStationRoots')) {
|
|
16741
|
+
finalPatch.settingsConfig = { ...finalPatch.settingsConfig, ocppExcludedStationRoots: restoredOcppExclusions };
|
|
16742
|
+
}
|
|
16743
|
+
|
|
16699
16744
|
if (Object.prototype.hasOwnProperty.call(safePatch, 'nvpTopology')) {
|
|
16700
16745
|
const desired = safePatch.nvpTopology;
|
|
16701
16746
|
if (JSON.stringify(desired) === JSON.stringify(currentNvpConfig(this))) {
|
|
@@ -16966,70 +17011,37 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
16966
17011
|
? Math.max(1, Math.min(50, Math.round(Number(q.max))))
|
|
16967
17012
|
: 50;
|
|
16968
17013
|
|
|
16969
|
-
//
|
|
16970
|
-
//
|
|
16971
|
-
//
|
|
16972
|
-
|
|
16973
|
-
|
|
16974
|
-
|
|
16975
|
-
|
|
16976
|
-
compactObjects
|
|
16977
|
-
|
|
16978
|
-
|
|
16979
|
-
|
|
16980
|
-
|
|
16981
|
-
|
|
16982
|
-
|
|
16983
|
-
|
|
16984
|
-
|
|
16985
|
-
|
|
16986
|
-
|
|
16987
|
-
|
|
16988
|
-
|
|
16989
|
-
|
|
16990
|
-
|
|
16991
|
-
|
|
16992
|
-
|
|
16993
|
-
|
|
16994
|
-
|
|
16995
|
-
|
|
16996
|
-
|
|
16997
|
-
|
|
16998
|
-
|
|
16999
|
-
|
|
17000
|
-
energyTotalId,
|
|
17001
|
-
statusId: compactPick(nativeId('info.status')),
|
|
17002
|
-
chargingStateId: compactPick(nativeId('transactions.chargingState')),
|
|
17003
|
-
activeId: compactPick(nativeId('transactions.transactionActive')),
|
|
17004
|
-
vehicleConnectedId: '',
|
|
17005
|
-
chargeDemandId: '',
|
|
17006
|
-
heartbeatId: compactPick(nativeId('health.lastSeenMs')),
|
|
17007
|
-
onlineId: compactPick(nativeId('info.socketConnected')),
|
|
17008
|
-
dataFreshId: compactPick(nativeId('health.dataFresh')),
|
|
17009
|
-
setCurrentAId: '',
|
|
17010
|
-
setPowerWId: compactPick(nativeId('control.chargeLimit')),
|
|
17011
|
-
enableWriteId: compactPick(nativeId('control.availability')),
|
|
17012
|
-
vehicleSocId: compactPick(nativeId('measurements.socPercent'), nativeId('vehicle.socPercent')),
|
|
17013
|
-
rfidReadId: compactPick(nativeId('info.rfid')),
|
|
17014
|
-
currentId: compactPick(nativeId('measurements.currentA')),
|
|
17015
|
-
};
|
|
17016
|
-
if (!Object.values(ids).some(value => String(value || '').trim())) continue;
|
|
17017
|
-
compactConnectors.push({
|
|
17018
|
-
stationKey: nativeRoot,
|
|
17019
|
-
adapterInstance: ocppNamespace(nativeRoot),
|
|
17020
|
-
connectorNo: 1,
|
|
17021
|
-
base: nativeRoot,
|
|
17022
|
-
name: group.station,
|
|
17023
|
-
ids,
|
|
17024
|
-
energyTotalInputIsWh: !!energyWhId && !energyKWhId,
|
|
17025
|
-
energyUnit: energyKWhId ? 'kWh' : (energyWhId ? 'Wh' : ''),
|
|
17026
|
-
telemetryProfile: 'nexowattocpp',
|
|
17027
|
-
controlPreference: 'powerW',
|
|
17028
|
-
contractVersion: 'nexowatt-ocpp21-0.4-native',
|
|
17029
|
-
adapterKind: 'nexowatt-ocpp21-native-compact',
|
|
17030
|
-
});
|
|
17031
|
-
}
|
|
17032
|
-
compactConnectors.sort((a, b) => String(a.stationKey).localeCompare(String(b.stationKey)));
|
|
17014
|
+
// Use the exact same validated contract and source lifecycle as the
|
|
17015
|
+
// background registration. Retained objects from a deleted standalone
|
|
17016
|
+
// adapter are not another charger and must not be offered again here.
|
|
17017
|
+
const [compactObjects, compactMetadata, compactSources] = await Promise.all([
|
|
17018
|
+
this._nwReadOcppDiscoveryObjects(), this._nwReadOcppDiscoveryMetadata(), this._nwReadOcppDiscoverySources(),
|
|
17019
|
+
]);
|
|
17020
|
+
const compactStations = filterOcppDiscoverySources(
|
|
17021
|
+
collectOcppStations(compactObjects, compactMetadata, this.hostNamespace), compactSources, this.hostNamespace);
|
|
17022
|
+
const compactConnectors = compactStations.map(station => ({
|
|
17023
|
+
// Legacy response field denotes physical identity only; clients must
|
|
17024
|
+
// not use it as an automatic station/group assignment.
|
|
17025
|
+
stationKey: station.root,
|
|
17026
|
+
adapterInstance: station.adapterInstance,
|
|
17027
|
+
connectorNo: 1,
|
|
17028
|
+
base: station.root,
|
|
17029
|
+
name: station.name,
|
|
17030
|
+
ids: { ...station.ids },
|
|
17031
|
+
energyTotalInputIsWh: false,
|
|
17032
|
+
energyUnit: station.ids.energyTotalId ? 'kWh' : '',
|
|
17033
|
+
telemetryProfile: 'nexowattocpp',
|
|
17034
|
+
controlPreference: 'powerW',
|
|
17035
|
+
contractVersion: 'nexowatt-ocpp21-0.4-native',
|
|
17036
|
+
adapterKind: 'nexowatt-ocpp21-native-compact',
|
|
17037
|
+
missing: [...station.missing],
|
|
17038
|
+
ocppDiscovery: {
|
|
17039
|
+
source: 'nexowatt-ocpp21', stationRoot: station.root, contract: 'nexowatt-ocpp21-0.4-native',
|
|
17040
|
+
controlScope: 'station', connectorCount: station.connectorCount, evseCount: station.evseCount,
|
|
17041
|
+
topologySource: station.topologySource, connectors: station.connectors,
|
|
17042
|
+
code: station.missing.length ? 'CONTRACT_INCOMPLETE' : 'COMMISSIONING_REQUIRED', autoCreated: true,
|
|
17043
|
+
},
|
|
17044
|
+
}));
|
|
17033
17045
|
if (compactConnectors.length > 0) {
|
|
17034
17046
|
return res.json({
|
|
17035
17047
|
ok: true,
|
package/ui/package.json
CHANGED