iobroker.eos-admin 9.0.26 → 9.0.28
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 +9 -15
- package/README.md +17 -227
- package/adminWww/.vite/manifest.json +194 -203
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +13887 -13897
- package/adminWww/assets/{AdapterUpdateDialog-DIjnNZ5k.js → AdapterUpdateDialog-DBLX7GoO.js} +5 -5
- package/adminWww/assets/{Adapters-D8UOQg1q.js → Adapters-c250DTTU.js} +5 -5
- package/adminWww/assets/AddLink-0L0E-LsA.js +1 -0
- package/adminWww/assets/ColorLens-DA51K29x.js +1 -0
- package/adminWww/assets/ConfigManager-BBUXk8hZ.js +1 -0
- package/adminWww/assets/Enums-CWJJ2zNF.js +92 -0
- package/adminWww/assets/Fields-CNefAzNH.js +1 -0
- package/adminWww/assets/FileCopy-B16lEuur.js +1 -0
- package/adminWww/assets/Files-Bf8oZSk6.js +1 -0
- package/adminWww/assets/{Hosts-BToJLy61.js → Hosts-8gg41ODb.js} +6 -6
- package/adminWww/assets/Instances-PPTEPJQN.js +4 -0
- package/adminWww/assets/Intro-9c_ynpJu.js +2 -0
- package/adminWww/assets/Lens-9lkeoWGk.js +1 -0
- package/adminWww/assets/LinearScale-Be5h2beh.js +1 -0
- package/adminWww/assets/{Logs-xdFVJ6fZ.js → Logs-Brgb9kR_.js} +2 -2
- package/adminWww/assets/North-C2whbHM-.js +1 -0
- package/adminWww/assets/{Objects-DhyJ5eAY.js → Objects-DHVNfs_x.js} +4 -4
- package/adminWww/assets/Overview-CgnpH8e8.js +3 -0
- package/adminWww/assets/PersonOff-DqBq0Fho.js +1 -0
- package/adminWww/assets/PlaylistAdd-O8k92YBd.js +1 -0
- package/adminWww/assets/State-vVobamei.js +1 -0
- package/adminWww/assets/UsedResources-1fEUqiQ6.js +2 -0
- package/adminWww/assets/Users-oRpvFtQR.js +1 -0
- package/adminWww/assets/{bootstrap-BU7j1Fe_.js → bootstrap-st8VxLDc.js} +25 -25
- package/adminWww/assets/date-fns-C1dqkno9.js +1 -0
- package/adminWww/assets/{hostInit-Cgee6juw.js → hostInit-OQMl4yOT.js} +1 -1
- package/adminWww/assets/icons-material-DeF0gQyK.js +1 -0
- package/adminWww/assets/{index-BUZf1ftI.js → index-D4lV2S7J.js} +2 -2
- package/adminWww/assets/{installSVGRenderer-CcjgaxiA.js → installSVGRenderer-1WdbDz-H.js} +1 -1
- package/adminWww/assets/isSameWeek-Crh37s7U.js +1 -0
- package/adminWww/assets/isWithinInterval-Bo1WiDfq.js +1 -0
- package/adminWww/assets/locale-hLcz_Xh2.js +1 -0
- package/adminWww/assets/{mf-entry-bootstrap-0-96d40e57.js → mf-entry-bootstrap-0-3b253ab0.js} +2 -2
- package/adminWww/assets/sentry-DwQQLI7N.js +1 -0
- package/adminWww/assets/startOfWeek-DJph8SIW.js +1 -0
- package/adminWww/index.html +23 -23
- package/adminWww/mf-manifest.json +1 -1
- package/adminWww/mf-stats.json +1 -1
- package/adminWww/remoteEntry-eos-9.0.28.js +12 -0
- 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/DOKUMENTATION_9.0.27.md +7 -0
- package/docs/README.md +13 -0
- package/docs/UMSORTIERTE_DATEIEN.tsv +153 -0
- package/docs/reports/unified-9.0.14/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.16/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.17/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.18/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.21/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.22/PRUEFBERICHT.md +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/docs/reports/unified-9.0.28/PRUEFBERICHT.md +40 -0
- package/docs/reports/unified-9.0.28/PRUEFERGEBNISSE.json +112 -0
- package/docs/reports/unified-9.0.28/raw/INDEX.json +87 -0
- package/docs/reports/unified-9.0.28/raw/backend.log +5 -0
- package/docs/reports/unified-9.0.28/raw/frontend.log +151 -0
- package/docs/reports/unified-9.0.28/raw/installer.log +26 -0
- package/docs/reports/unified-9.0.28/raw/lint.log +5 -0
- package/docs/reports/unified-9.0.28/raw/modules.log +5 -0
- package/docs/reports/unified-9.0.28/raw/node22-tests-final.log +17060 -0
- package/docs/reports/unified-9.0.28/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.28/raw/node24-tests-final.log +2845 -0
- package/docs/reports/unified-9.0.28/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.28/raw/npm-audit-runtime.json +77 -0
- package/docs/reports/unified-9.0.28/raw/runtime-mirror-check.log +1 -0
- package/docs/reports/unified-9.0.28/raw/typecheck.log +5 -0
- package/docs/reports/unified-9.0.28/raw/ui-runtime.log +7 -0
- package/docs/reports/unified-9.0.4/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.5/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.6/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.7/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.8/PRUEFBERICHT.md +1 -1
- package/docs/reports/unified-9.0.9/PRUEFBERICHT.md +1 -1
- package/{START_HIER_9.0.1.md → docs/start/START_HIER_9.0.1.md} +5 -5
- package/{START_HIER_9.0.10.md → docs/start/START_HIER_9.0.10.md} +1 -1
- package/{START_HIER_9.0.11.md → docs/start/START_HIER_9.0.11.md} +1 -1
- package/{START_HIER_9.0.12.md → docs/start/START_HIER_9.0.12.md} +1 -1
- package/{START_HIER_9.0.13.md → docs/start/START_HIER_9.0.13.md} +2 -2
- package/{START_HIER_9.0.14.md → docs/start/START_HIER_9.0.14.md} +1 -1
- package/{START_HIER_9.0.15.md → docs/start/START_HIER_9.0.15.md} +2 -2
- package/{START_HIER_9.0.16.md → docs/start/START_HIER_9.0.16.md} +1 -1
- package/{START_HIER_9.0.17.md → docs/start/START_HIER_9.0.17.md} +2 -2
- package/{START_HIER_9.0.18.md → docs/start/START_HIER_9.0.18.md} +4 -4
- package/{START_HIER_9.0.19.md → docs/start/START_HIER_9.0.19.md} +2 -2
- package/{START_HIER_9.0.2.md → docs/start/START_HIER_9.0.2.md} +2 -2
- package/{START_HIER_9.0.20.md → docs/start/START_HIER_9.0.20.md} +1 -1
- package/{START_HIER_9.0.21.md → docs/start/START_HIER_9.0.21.md} +1 -1
- package/{START_HIER_9.0.22.md → docs/start/START_HIER_9.0.22.md} +4 -4
- package/{START_HIER_9.0.24.md → docs/start/START_HIER_9.0.24.md} +1 -1
- package/{START_HIER_9.0.25.md → docs/start/START_HIER_9.0.25.md} +1 -1
- package/{START_HIER_9.0.26.md → docs/start/START_HIER_9.0.26.md} +1 -1
- package/docs/start/START_HIER_9.0.27.md +33 -0
- package/docs/start/START_HIER_9.0.28.md +20 -0
- package/{START_HIER_9.0.3.md → docs/start/START_HIER_9.0.3.md} +3 -3
- package/{START_HIER_9.0.4.md → docs/start/START_HIER_9.0.4.md} +3 -3
- package/{START_HIER_9.0.5.md → docs/start/START_HIER_9.0.5.md} +2 -2
- package/{START_HIER_9.0.6.md → docs/start/START_HIER_9.0.6.md} +3 -3
- package/{START_HIER_9.0.7.md → docs/start/START_HIER_9.0.7.md} +4 -4
- package/{START_HIER_9.0.8.md → docs/start/START_HIER_9.0.8.md} +3 -3
- package/{START_HIER_9.0.9.md → docs/start/START_HIER_9.0.9.md} +1 -1
- package/docs/unified/ARCHITECTURE.md +37 -1
- package/docs/unified/BESTANDSUEBERNAHME_9_0_7.md +1 -1
- package/docs/unified/INSTALL_PUBLISH.md +2 -2
- package/io-package.json +12 -12
- package/modules/devices/admin/ems-assignment.js +1 -0
- package/package.json +38 -34
- package/release-manifests/unified/build-environment.cdx.json +6 -6
- package/release-manifests/unified/files.json +378 -146
- 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 +171 -6
- package/release-manifests/unified/runtime.cdx.json +28 -28
- package/release-manifests/unified/validation.json +15 -15
- package/tools/eos-release-manifest.cjs +2 -2
- package/ui/io-package.json +5 -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/lib/smarthome-device-detection.js +177 -4
- package/ui/main.js +171 -95
- 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
- package/ui/www/smarthome-config-workspace.css +7 -0
- package/ui/www/smarthome-config.html +4 -4
- package/ui/www/smarthome-config.js +178 -163
- package/ui/www/smarthome-device-config.js +131 -6
- package/ui/www/smarthome-setup.js +252 -59
- package/adminWww/assets/AccessTime-CuR73YC3.js +0 -1
- package/adminWww/assets/ConfigManager-CAvT_4-g.js +0 -1
- package/adminWww/assets/Enums-CrNUOX0d.js +0 -92
- package/adminWww/assets/Fields-D-0qFiqr.js +0 -1
- package/adminWww/assets/Files-BL8kvaeC.js +0 -1
- package/adminWww/assets/Instances-Dlrp1KGP.js +0 -4
- package/adminWww/assets/Intro-5EbxvP4X.js +0 -2
- package/adminWww/assets/KeyboardArrowRight-ifvmV1ZL.js +0 -1
- package/adminWww/assets/MoreHoriz-CS7nODK8.js +0 -1
- package/adminWww/assets/Overview-BspgcFB7.js +0 -3
- package/adminWww/assets/Pageview-wzrLQZ-j.js +0 -1
- package/adminWww/assets/PersonOff-YtHcY0sV.js +0 -1
- package/adminWww/assets/Star-D8VNXawT.js +0 -1
- package/adminWww/assets/State-CJ1mKH_U.js +0 -1
- package/adminWww/assets/UsedResources-BMiCxqWH.js +0 -2
- package/adminWww/assets/Users-DrlJHRa5.js +0 -1
- package/adminWww/assets/ViewCompact-D7bHgn99.js +0 -1
- package/adminWww/assets/ViewSidebar-CjClbCI5.js +0 -1
- package/adminWww/assets/WifiTethering-DJ9VO12W.js +0 -1
- package/adminWww/assets/date-fns-BtR4dG_j.js +0 -1
- package/adminWww/assets/en-US-BjjaEI6N.js +0 -1
- package/adminWww/assets/icons-material-C0U9EKON.js +0 -1
- package/adminWww/assets/isSameWeek-WMSJR5Qs.js +0 -1
- package/adminWww/assets/locale-DN6Bdkdt.js +0 -1
- package/adminWww/assets/sentry-CPzCHrwe.js +0 -1
- package/adminWww/assets/setYear-DDSuW45e.js +0 -1
- package/adminWww/remoteEntry-eos-9.0.26.js +0 -12
- /package/{START_HIER_9.0.23.md → docs/start/START_HIER_9.0.23.md} +0 -0
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:2e8e4d4b14ec885e68c7127c75bee1f355db2521addbf8e46c94a91bfd462f27
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -42,7 +42,7 @@ const { executeLegacyDeviceWrite } = require('./lib/smarthome-device-legacy');
|
|
|
42
42
|
const { normalizeCustomView } = require('./lib/smarthome-custom-contract');
|
|
43
43
|
const { normalizeDeviceControls, getControlProfiles } = require('./lib/smarthome-device-controls');
|
|
44
44
|
const { registerSmartHomeDeviceApi, createDeviceSnapshotReader, buildDeviceControls } = require('./lib/smarthome-device-api');
|
|
45
|
-
const { cleanControls, extendSuggestion, DetectionError, DetectionScan, DETECTION_LIMITS, detectionNow, detectionSnapshot } = require('./lib/smarthome-device-detection');
|
|
45
|
+
const { cleanControls, extendSuggestion, collectKeywordDetectionCandidates, keywordReviewSuggestion, DetectionError, DetectionScan, DETECTION_LIMITS, detectionNow, detectionSnapshot } = require('./lib/smarthome-device-detection');
|
|
46
46
|
const { smartHomeEnabled, registerSmartHomeActivationApi } = require('./lib/smarthome-activation');
|
|
47
47
|
const { readPreservedUiStates, parseInstallerConfigState } = require('./lib/preserved-ui-config');
|
|
48
48
|
const { createRuntimeFileSender, runtimeProxyPrefix, rewriteRuntimeProxyHtml, isHttpsRuntimeProxy } = require('./lib/runtime-proxy-html');
|
|
@@ -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
|
|
@@ -14761,7 +14777,7 @@ const nwShcfgTdMergeSuggestion = (current, next) => {
|
|
|
14761
14777
|
* Zusammenhang: Teil von Adapterkern: Lifecycle, Webserver, API, States, EMS-Engine; Aufrufstellen und abhängige States/APIs beim Ändern mitprüfen.
|
|
14762
14778
|
* TypeScript: Parameter, Rückgabewert und verwendete Config-/State-Objekte später explizit typisieren.
|
|
14763
14779
|
*/
|
|
14764
|
-
const nwShcfgTdBuildSuggestion = async ({ control, rootId, objects, configuredIds, config }) => {
|
|
14780
|
+
const nwShcfgTdBuildSuggestion = async ({ control, rootId, objects, configuredIds, config, keywordState = false }) => {
|
|
14765
14781
|
if (!control || !control.type) return null;
|
|
14766
14782
|
const detectorType = String(control.type || '').trim();
|
|
14767
14783
|
const targetType = NW_SHCFG_TD_TYPE_MAP[detectorType];
|
|
@@ -14778,7 +14794,7 @@ const nwShcfgTdBuildSuggestion = async ({ control, rootId, objects, configuredId
|
|
|
14778
14794
|
const states = Array.from(stateMap.values());
|
|
14779
14795
|
if (!states.length) return null;
|
|
14780
14796
|
|
|
14781
|
-
const sourceId = nwShcfgTdBestSourceId(objects, rootId, control) || String(rootId || '').trim();
|
|
14797
|
+
const sourceId = (keywordState ? rootId : nwShcfgTdBestSourceId(objects, rootId, control)) || String(rootId || '').trim();
|
|
14782
14798
|
const sourceObj = sourceId ? objects[sourceId] : null;
|
|
14783
14799
|
const sourceType = String((sourceObj && sourceObj.type) || (objects[rootId] && objects[rootId].type) || 'state').trim() || 'state';
|
|
14784
14800
|
const sourceName = nwShcfgTdNormName(sourceObj && sourceObj.common && sourceObj.common.name) || (sourceId ? sourceId.split('.').slice(-1)[0] : 'Gerät');
|
|
@@ -15046,6 +15062,7 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
15046
15062
|
scan.check('roots', roots.length);
|
|
15047
15063
|
const detector = new NwChannelDetector();
|
|
15048
15064
|
const suggestionsBySignature = new Map();
|
|
15065
|
+
const coveredStateIds = new Set(configuredIds);
|
|
15049
15066
|
let matchedRoots = 0;
|
|
15050
15067
|
|
|
15051
15068
|
let scanIndex = 0;
|
|
@@ -15075,6 +15092,7 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
15075
15092
|
for (const control of controls) {
|
|
15076
15093
|
const suggestion = await nwShcfgTdBuildSuggestion({ control, rootId, objects, configuredIds, config: cfg });
|
|
15077
15094
|
if (!suggestion) continue;
|
|
15095
|
+
for (const state of suggestion.states || []) coveredStateIds.add(state.id);
|
|
15078
15096
|
const signature = suggestion.controlId || suggestion.signature || suggestion.id;
|
|
15079
15097
|
const merged = nwShcfgTdMergeSuggestion(suggestionsBySignature.get(signature), suggestion);
|
|
15080
15098
|
suggestionsBySignature.set(signature, merged);
|
|
@@ -15082,7 +15100,33 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
15082
15100
|
}
|
|
15083
15101
|
}
|
|
15084
15102
|
|
|
15103
|
+
// Supplement the existing detector using the same snapshot and deadline.
|
|
15104
|
+
// A keyword match cannot combine separate group addresses or create a device command.
|
|
15105
|
+
const reviewSuggestions = [];
|
|
15106
|
+
const keywordLimit = Math.min(512, DETECTION_LIMITS.suggestions - suggestionsBySignature.size);
|
|
15107
|
+
let extraCount = 0;
|
|
15108
|
+
let extraSuggestionsLimited = false;
|
|
15109
|
+
for await (const candidate of collectKeywordDetectionCandidates(objects, keys, new Set(roots), coveredStateIds, scan)) {
|
|
15110
|
+
if (extraCount >= keywordLimit) {
|
|
15111
|
+
extraSuggestionsLimited = true;
|
|
15112
|
+
break;
|
|
15113
|
+
}
|
|
15114
|
+
extraCount += 1;
|
|
15115
|
+
if (candidate.control) {
|
|
15116
|
+
const suggestion = await nwShcfgTdBuildSuggestion({
|
|
15117
|
+
control: candidate.control, rootId: candidate.sourceId, objects, configuredIds, config: cfg, keywordState: true,
|
|
15118
|
+
});
|
|
15119
|
+
if (suggestion) {
|
|
15120
|
+
const signature = suggestion.controlId || suggestion.signature || suggestion.id;
|
|
15121
|
+
if (!suggestionsBySignature.has(signature)) suggestionsBySignature.set(signature, suggestion);
|
|
15122
|
+
continue;
|
|
15123
|
+
}
|
|
15124
|
+
}
|
|
15125
|
+
reviewSuggestions.push(keywordReviewSuggestion(candidate));
|
|
15126
|
+
}
|
|
15127
|
+
|
|
15085
15128
|
const suggestions = reconcileSmartHomeImportSuggestions(Array.from(suggestionsBySignature.values()), objects, cfg)
|
|
15129
|
+
.concat(reviewSuggestions)
|
|
15086
15130
|
.map((entry) => {
|
|
15087
15131
|
if (entry && entry.signature) delete entry.signature;
|
|
15088
15132
|
return entry;
|
|
@@ -15113,6 +15157,7 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
15113
15157
|
complete: true,
|
|
15114
15158
|
objectCount: keys.length,
|
|
15115
15159
|
elapsedMs: Math.round(scan.elapsedMs),
|
|
15160
|
+
...(extraSuggestionsLimited ? { extraSuggestionsLimited: true } : {}),
|
|
15116
15161
|
...(suggestions.length ? {} : { emptyReason: roots.length ? 'NO_MATCHES' : 'NO_CANDIDATES' }),
|
|
15117
15162
|
},
|
|
15118
15163
|
suggestions,
|
|
@@ -15417,6 +15462,19 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
15417
15462
|
const qRaw = (req.query && req.query.q) || '';
|
|
15418
15463
|
const q = (typeof qRaw === 'string' ? qRaw : String(qRaw || '')).trim();
|
|
15419
15464
|
const qLower = (q || '').toLowerCase();
|
|
15465
|
+
const direction = req.query?.direction;
|
|
15466
|
+
const allowedTypes = new Set(['boolean', 'number', 'string']);
|
|
15467
|
+
function csvFilter(value, maxItems, validator) {
|
|
15468
|
+
if (value === undefined) return new Set();
|
|
15469
|
+
if (typeof value !== 'string' || !value || value.length > 1024) return null;
|
|
15470
|
+
const entries = value.split(',');
|
|
15471
|
+
return entries.length <= maxItems && entries.every(validator) ? new Set(entries) : null;
|
|
15472
|
+
}
|
|
15473
|
+
const types = csvFilter(req.query?.types, 3, value => allowedTypes.has(value));
|
|
15474
|
+
const roles = csvFilter(req.query?.roles, 16, value => /^[a-zA-Z][a-zA-Z0-9_.-]{0,63}$/.test(value));
|
|
15475
|
+
if ((direction !== undefined && direction !== 'read' && direction !== 'write') || !types || !roles) {
|
|
15476
|
+
return res.status(400).json({ ok: false, error: 'EOS_DP_FILTER_INVALID' });
|
|
15477
|
+
}
|
|
15420
15478
|
|
|
15421
15479
|
const limitRaw = (req.query && req.query.limit) || '';
|
|
15422
15480
|
let limit = parseInt(limitRaw, 10);
|
|
@@ -15461,6 +15519,8 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
15461
15519
|
type: obj.common.type || '',
|
|
15462
15520
|
|
|
15463
15521
|
unit: obj.common.unit || '',
|
|
15522
|
+
read: obj.common.read === true,
|
|
15523
|
+
write: obj.common.write === true,
|
|
15464
15524
|
|
|
15465
15525
|
idLower: String(id).toLowerCase(),
|
|
15466
15526
|
|
|
@@ -15535,6 +15595,8 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
15535
15595
|
*/
|
|
15536
15596
|
function pushItem(it) {
|
|
15537
15597
|
if (!it || !it.id || seen.has(it.id)) return;
|
|
15598
|
+
if (direction && it[direction] !== true) return;
|
|
15599
|
+
if (types.size && !types.has(it.type)) return;
|
|
15538
15600
|
seen.add(it.id);
|
|
15539
15601
|
results.push({
|
|
15540
15602
|
id: it.id,
|
|
@@ -15542,9 +15604,24 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
15542
15604
|
role: it.role,
|
|
15543
15605
|
type: it.type,
|
|
15544
15606
|
unit: it.unit,
|
|
15607
|
+
read: it.read,
|
|
15608
|
+
write: it.write,
|
|
15545
15609
|
});
|
|
15546
15610
|
}
|
|
15547
15611
|
|
|
15612
|
+
function matchesQuery(it) {
|
|
15613
|
+
return !qLower || it.idLower.includes(qLower) || it.nameLower.includes(qLower)
|
|
15614
|
+
|| (direction && typeof it.role === 'string' && it.role.toLowerCase().includes(qLower));
|
|
15615
|
+
}
|
|
15616
|
+
// Reserve the first results for the requested function even with
|
|
15617
|
+
// thousands of other devices in earlier branches of the object tree.
|
|
15618
|
+
if (roles.size) {
|
|
15619
|
+
for (const it of items) {
|
|
15620
|
+
if (roles.has(it.role) && matchesQuery(it)) pushItem(it);
|
|
15621
|
+
if (results.length >= limit) return res.json({ ok: true, results });
|
|
15622
|
+
}
|
|
15623
|
+
}
|
|
15624
|
+
|
|
15548
15625
|
if (!qLower) {
|
|
15549
15626
|
// Browse-Mode: zeige zuerst typische Admin-Bereiche
|
|
15550
15627
|
const preferredPrefixes = ['0_userdata.0.', 'alias.0.', 'javascript.0.'];
|
|
@@ -15568,7 +15645,7 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
15568
15645
|
}
|
|
15569
15646
|
|
|
15570
15647
|
for (const it of items) {
|
|
15571
|
-
if (
|
|
15648
|
+
if (matchesQuery(it)) {
|
|
15572
15649
|
pushItem(it);
|
|
15573
15650
|
if (results.length >= limit) break;
|
|
15574
15651
|
}
|
|
@@ -15852,6 +15929,7 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
15852
15929
|
// KI‑Energieberater
|
|
15853
15930
|
aiAdvisor: (n.aiAdvisor && typeof n.aiAdvisor === 'object') ? n.aiAdvisor : undefined,
|
|
15854
15931
|
energyWallet: (n.energyWallet && typeof n.energyWallet === 'object') ? n.energyWallet : {},
|
|
15932
|
+
tariffProvider: (n.tariffProvider && typeof n.tariffProvider === 'object') ? this._nwDeepClone(n.tariffProvider) : {},
|
|
15855
15933
|
energyLedger: (n.energyLedger && typeof n.energyLedger === 'object') ? n.energyLedger : { enabled: false },
|
|
15856
15934
|
chargeKiosk: (n.chargeKiosk && typeof n.chargeKiosk === 'object') ? n.chargeKiosk : { enabled: false, displayBasePath: '/display/station/', stations: [] },
|
|
15857
15935
|
meshMicrogrid: (n.meshMicrogrid && typeof n.meshMicrogrid === 'object') ? n.meshMicrogrid : { enabled: false, mode: 'diagnostic', clusterId: 'cluster_01', clusterName: 'Lokaler Energieverbund', gridLimitW: 0, nodes: [] },
|
|
@@ -16200,6 +16278,14 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
16200
16278
|
if (_nwTariffSecretKeys.has(String(key)) && String(creds[key] || '').trim()) creds[key] = '__KEEP__';
|
|
16201
16279
|
}
|
|
16202
16280
|
}
|
|
16281
|
+
// Request headers/bodies may embed arbitrary authentication values.
|
|
16282
|
+
// Keep the entire configured value server-side instead of guessing keys.
|
|
16283
|
+
const custom = clone?.tariffProvider?.customRest;
|
|
16284
|
+
if (custom && typeof custom === 'object') {
|
|
16285
|
+
for (const key of ['headersJson', 'body']) {
|
|
16286
|
+
if (custom[key] !== undefined && custom[key] !== null && custom[key] !== '') custom[key] = '__KEEP__';
|
|
16287
|
+
}
|
|
16288
|
+
}
|
|
16203
16289
|
return clone;
|
|
16204
16290
|
};
|
|
16205
16291
|
const stripRetainedTariffCredentials = (patch) => {
|
|
@@ -16207,20 +16293,7 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
16207
16293
|
if (clean.tariffProvider) delete clean.tariffProvider.retainedProviderCredentials;
|
|
16208
16294
|
return clean;
|
|
16209
16295
|
};
|
|
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
|
-
};
|
|
16296
|
+
const _nwMergeTariffProviderSecrets = mergeInstallerTariffSecrets;
|
|
16224
16297
|
|
|
16225
16298
|
/** Neue/geänderte Stations-Bearer verlangen ein langes URL-sicheres Format.
|
|
16226
16299
|
* Unveränderte Alt-Tokens bleiben bis zur bewussten Neuverknüpfung verwendbar;
|
|
@@ -16305,8 +16378,16 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
16305
16378
|
} catch (error) { return historyFailure(res, error); }
|
|
16306
16379
|
finally { endMeshAppSave(mutation); }
|
|
16307
16380
|
});
|
|
16381
|
+
// A reachable shell is not evidence that the stored Installer configuration
|
|
16382
|
+
// has loaded. Never publish a default snapshot/revision or accept its edit.
|
|
16383
|
+
const requireInstallerConfigLoaded = (_req, res, next) => {
|
|
16384
|
+
if (this._nwInstallerConfigHydrated === true) return next();
|
|
16385
|
+
sendNoStore(res);
|
|
16386
|
+
const loading = ['idle', 'starting'].includes(this._hostedStartup?.state);
|
|
16387
|
+
return res.status(503).json({ ok: false, error: loading ? 'EOS_INSTALLER_CONFIG_LOADING' : 'EOS_INSTALLER_CONFIG_UNAVAILABLE' });
|
|
16388
|
+
};
|
|
16308
16389
|
// 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) => {
|
|
16390
|
+
app.get('/api/installer/config', requireInstaller, requireInstallerConfigLoaded, async (_req, res) => {
|
|
16310
16391
|
try {
|
|
16311
16392
|
sendNoStore(res);
|
|
16312
16393
|
// A license can be saved through the Admin tab while the App-Center is already open.
|
|
@@ -16349,7 +16430,7 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
16349
16430
|
});
|
|
16350
16431
|
|
|
16351
16432
|
// 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) => {
|
|
16433
|
+
app.post('/api/installer/config', requireInstaller, requireInstallerConfigLoaded, async (req, res) => {
|
|
16353
16434
|
const meshSaveToken = beginMeshAppSave();
|
|
16354
16435
|
if (!meshSaveToken) return res.status(409).json({ error: 'Konfiguration wird bereits gespeichert.' });
|
|
16355
16436
|
try {
|
|
@@ -16431,6 +16512,22 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
16431
16512
|
mergedPatch = (norm && norm.patch) ? norm.patch : mergedPatch;
|
|
16432
16513
|
} catch (_e) {}
|
|
16433
16514
|
|
|
16515
|
+
// An explicit EMS deletion must survive the next background OCPP scan.
|
|
16516
|
+
// Compute this from the authoritative before/after rows under the same
|
|
16517
|
+
// revision lock; never trust a form's copied exclusion metadata.
|
|
16518
|
+
const beforeOcppEdit = this.nwApplyInstallerPatchToRuntimeConfig(this.config || {}, basePatch);
|
|
16519
|
+
const explicitOcppRows = safePatch.settingsConfig && typeof safePatch.settingsConfig === 'object'
|
|
16520
|
+
&& Object.prototype.hasOwnProperty.call(safePatch.settingsConfig, 'evcsList');
|
|
16521
|
+
const beforeHasOcppExclusions = Object.prototype.hasOwnProperty.call(beforeOcppEdit.settingsConfig || {}, 'ocppExcludedStationRoots');
|
|
16522
|
+
const ocppExclusions = explicitOcppRows
|
|
16523
|
+
? prepareOcppDiscoveryExclusions(beforeOcppEdit, this.nwApplyInstallerPatchToRuntimeConfig(this.config || {}, mergedPatch))
|
|
16524
|
+
: (beforeHasOcppExclusions ? this._nwDeepClone(beforeOcppEdit.settingsConfig.ocppExcludedStationRoots) : []);
|
|
16525
|
+
if ((Array.isArray(ocppExclusions) && ocppExclusions.length) || beforeHasOcppExclusions) {
|
|
16526
|
+
mergedPatch.settingsConfig = { ...mergedPatch.settingsConfig, ocppExcludedStationRoots: ocppExclusions };
|
|
16527
|
+
} else if (mergedPatch.settingsConfig && typeof mergedPatch.settingsConfig === 'object') {
|
|
16528
|
+
delete mergedPatch.settingsConfig.ocppExcludedStationRoots;
|
|
16529
|
+
}
|
|
16530
|
+
|
|
16434
16531
|
if (Object.prototype.hasOwnProperty.call(safePatch, 'nvpTopology')) {
|
|
16435
16532
|
const desired = safePatch.nvpTopology;
|
|
16436
16533
|
if (JSON.stringify(desired) === JSON.stringify(currentNvpConfig(this))) {
|
|
@@ -16696,6 +16793,15 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
16696
16793
|
finalPatch = (norm && norm.patch) ? norm.patch : finalPatch;
|
|
16697
16794
|
} catch (_e) {}
|
|
16698
16795
|
|
|
16796
|
+
// An explicit backup restore retains its saved removal choices. Validate
|
|
16797
|
+
// their shape/size before provisioning or stopping writers; rows restored
|
|
16798
|
+
// by that same backup are an explicit re-import of those identities.
|
|
16799
|
+
const restoredOcppConfig = this.nwApplyInstallerPatchToRuntimeConfig(baseNative, finalPatch);
|
|
16800
|
+
const restoredOcppExclusions = prepareOcppDiscoveryExclusions(restoredOcppConfig, restoredOcppConfig);
|
|
16801
|
+
if (Object.prototype.hasOwnProperty.call(restoredOcppConfig.settingsConfig || {}, 'ocppExcludedStationRoots')) {
|
|
16802
|
+
finalPatch.settingsConfig = { ...finalPatch.settingsConfig, ocppExcludedStationRoots: restoredOcppExclusions };
|
|
16803
|
+
}
|
|
16804
|
+
|
|
16699
16805
|
if (Object.prototype.hasOwnProperty.call(safePatch, 'nvpTopology')) {
|
|
16700
16806
|
const desired = safePatch.nvpTopology;
|
|
16701
16807
|
if (JSON.stringify(desired) === JSON.stringify(currentNvpConfig(this))) {
|
|
@@ -16966,70 +17072,37 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
16966
17072
|
? Math.max(1, Math.min(50, Math.round(Number(q.max))))
|
|
16967
17073
|
: 50;
|
|
16968
17074
|
|
|
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)));
|
|
17075
|
+
// Use the exact same validated contract and source lifecycle as the
|
|
17076
|
+
// background registration. Retained objects from a deleted standalone
|
|
17077
|
+
// adapter are not another charger and must not be offered again here.
|
|
17078
|
+
const [compactObjects, compactMetadata, compactSources] = await Promise.all([
|
|
17079
|
+
this._nwReadOcppDiscoveryObjects(), this._nwReadOcppDiscoveryMetadata(), this._nwReadOcppDiscoverySources(),
|
|
17080
|
+
]);
|
|
17081
|
+
const compactStations = filterOcppDiscoverySources(
|
|
17082
|
+
collectOcppStations(compactObjects, compactMetadata, this.hostNamespace), compactSources, this.hostNamespace);
|
|
17083
|
+
const compactConnectors = compactStations.map(station => ({
|
|
17084
|
+
// Legacy response field denotes physical identity only; clients must
|
|
17085
|
+
// not use it as an automatic station/group assignment.
|
|
17086
|
+
stationKey: station.root,
|
|
17087
|
+
adapterInstance: station.adapterInstance,
|
|
17088
|
+
connectorNo: 1,
|
|
17089
|
+
base: station.root,
|
|
17090
|
+
name: station.name,
|
|
17091
|
+
ids: { ...station.ids },
|
|
17092
|
+
energyTotalInputIsWh: false,
|
|
17093
|
+
energyUnit: station.ids.energyTotalId ? 'kWh' : '',
|
|
17094
|
+
telemetryProfile: 'nexowattocpp',
|
|
17095
|
+
controlPreference: 'powerW',
|
|
17096
|
+
contractVersion: 'nexowatt-ocpp21-0.4-native',
|
|
17097
|
+
adapterKind: 'nexowatt-ocpp21-native-compact',
|
|
17098
|
+
missing: [...station.missing],
|
|
17099
|
+
ocppDiscovery: {
|
|
17100
|
+
source: 'nexowatt-ocpp21', stationRoot: station.root, contract: 'nexowatt-ocpp21-0.4-native',
|
|
17101
|
+
controlScope: 'station', connectorCount: station.connectorCount, evseCount: station.evseCount,
|
|
17102
|
+
topologySource: station.topologySource, connectors: station.connectors,
|
|
17103
|
+
code: station.missing.length ? 'CONTRACT_INCOMPLETE' : 'COMMISSIONING_REQUIRED', autoCreated: true,
|
|
17104
|
+
},
|
|
17105
|
+
}));
|
|
17033
17106
|
if (compactConnectors.length > 0) {
|
|
17034
17107
|
return res.json({
|
|
17035
17108
|
ok: true,
|
|
@@ -18493,6 +18566,8 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
18493
18566
|
role: obj.common.role || '',
|
|
18494
18567
|
type: obj.common.type || '',
|
|
18495
18568
|
unit: obj.common.unit || '',
|
|
18569
|
+
read: obj.common.read === true,
|
|
18570
|
+
write: obj.common.write === true,
|
|
18496
18571
|
idLower: String(id).toLowerCase(),
|
|
18497
18572
|
nameLower: String(name).toLowerCase(),
|
|
18498
18573
|
});
|
|
@@ -18552,6 +18627,7 @@ app.get('/api/smarthome/type-detect', requireDpDiscovery, async (req, res) => {
|
|
|
18552
18627
|
role: it ? it.role : '',
|
|
18553
18628
|
type: it ? it.type : '',
|
|
18554
18629
|
unit: it ? it.unit : '',
|
|
18630
|
+
...(it ? { read: it.read, write: it.write } : {}),
|
|
18555
18631
|
});
|
|
18556
18632
|
}
|
|
18557
18633
|
|
package/ui/package.json
CHANGED