iobroker.eos-admin 9.0.17 → 9.0.18

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.
Files changed (139) hide show
  1. package/NEXOWATT_EOS_BUILD_INFO.json +12 -14
  2. package/README.md +5 -3
  3. package/START_HIER_9.0.18.md +47 -0
  4. package/adminWww/.vite/manifest.json +39 -39
  5. package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +107 -107
  6. package/adminWww/assets/{AdapterUpdateDialog-Cpo3dAfY.js → AdapterUpdateDialog-ByJk9Cxj.js} +1 -1
  7. package/adminWww/assets/{Adapters-n2ukPDdC.js → Adapters-V2JtEPZX.js} +1 -1
  8. package/adminWww/assets/{ConfigManager-BVZ6_Ebo.js → ConfigManager-BKcdyJnN.js} +1 -1
  9. package/adminWww/assets/{Enums-CQ6yHG2W.js → Enums-ChbfAWzp.js} +1 -1
  10. package/adminWww/assets/{Fields-CaJqzoW-.js → Fields-DzaVXEvg.js} +1 -1
  11. package/adminWww/assets/{Files-DfvpKGa3.js → Files-CRpIXj4X.js} +1 -1
  12. package/adminWww/assets/{Hosts-3xLBsdG6.js → Hosts-rOgfd2wo.js} +1 -1
  13. package/adminWww/assets/{Instances-B7hKEhyw.js → Instances-BxLhJ6Pb.js} +1 -1
  14. package/adminWww/assets/{Intro-BV4kYZdT.js → Intro-BOql527d.js} +1 -1
  15. package/adminWww/assets/{Logs-DpL9eY69.js → Logs-WUUDY7a4.js} +1 -1
  16. package/adminWww/assets/{Objects-dN06jhQk.js → Objects-DYaZkCK7.js} +1 -1
  17. package/adminWww/assets/{Overview-Lip63_ej.js → Overview-C6hiiPbm.js} +1 -1
  18. package/adminWww/assets/{State-BSO2X_xN.js → State-AH43l7fG.js} +1 -1
  19. package/adminWww/assets/{UsedResources-DvqzszKI.js → UsedResources-jhsRMH4X.js} +1 -1
  20. package/adminWww/assets/{Users-Csqd1xA-.js → Users-D9wyLyJ1.js} +1 -1
  21. package/adminWww/assets/{bootstrap-C3HM8kNL.js → bootstrap-gVLo1K_2.js} +3 -3
  22. package/adminWww/assets/{hostInit-DdxBUeXQ.js → hostInit-Dt_M-NAC.js} +1 -1
  23. package/adminWww/assets/{icons-material-D1Tb_725.js → icons-material-DuVW_EUA.js} +1 -1
  24. package/adminWww/assets/{index-BOujTMyH.js → index-B1cnPkSO.js} +2 -2
  25. package/adminWww/assets/{installSVGRenderer-BZyrUVAo.js → installSVGRenderer-GvgHjubR.js} +1 -1
  26. package/adminWww/assets/{mf-entry-bootstrap-0-3418586b.js → mf-entry-bootstrap-0-6b32b635.js} +2 -2
  27. package/adminWww/index.html +23 -23
  28. package/adminWww/mf-manifest.json +1 -1
  29. package/adminWww/mf-stats.json +1 -1
  30. package/adminWww/remoteEntry-eos-9.0.18.js +12 -0
  31. package/adminWww/remoteEntry.js +1 -1
  32. package/build/lib/eosDeviceEmsPlan.js +739 -0
  33. package/build/lib/eosDeviceEmsPlan.js.map +1 -0
  34. package/build/lib/eosDeviceEmsService.js +377 -0
  35. package/build/lib/eosDeviceEmsService.js.map +1 -0
  36. package/build/lib/eosModuleHost.js +53 -2
  37. package/build/lib/eosModuleHost.js.map +1 -1
  38. package/build/lib/eosModuleHttp.js +1 -1
  39. package/build/lib/eosModuleHttp.js.map +1 -1
  40. package/build/lib/web.js +15 -0
  41. package/build/lib/web.js.map +1 -1
  42. package/docs/reports/unified-9.0.18/ALIAS_V1_COVERAGE.json +5056 -0
  43. package/docs/reports/unified-9.0.18/ALIAS_V1_VERTRAG.md +257 -0
  44. package/docs/reports/unified-9.0.18/ANFORDERUNGEN.md +55 -0
  45. package/docs/reports/unified-9.0.18/CUSTOMER_TARIFF_REVIEW.md +33 -0
  46. package/docs/reports/unified-9.0.18/GERAETE_EMS_EINRICHTUNG.md +86 -0
  47. package/docs/reports/unified-9.0.18/INSTALLER_LIFECYCLE_REVIEW.md +29 -0
  48. package/docs/reports/unified-9.0.18/KUNDENTARIF_EINRICHTUNG.md +27 -0
  49. package/docs/reports/unified-9.0.18/PRUEFBERICHT.md +87 -0
  50. package/docs/reports/unified-9.0.18/UNABHAENGIGER_REVIEW.md +63 -0
  51. package/docs/reports/unified-9.0.18/raw/INDEX.json +331 -0
  52. package/docs/reports/unified-9.0.18/raw/audit-full.log +345 -0
  53. package/docs/reports/unified-9.0.18/raw/audit-full.result.json +14 -0
  54. package/docs/reports/unified-9.0.18/raw/audit-runtime.log +23 -0
  55. package/docs/reports/unified-9.0.18/raw/audit-runtime.result.json +15 -0
  56. package/docs/reports/unified-9.0.18/raw/backend-final.log +5 -0
  57. package/docs/reports/unified-9.0.18/raw/backend-final.result.json +14 -0
  58. package/docs/reports/unified-9.0.18/raw/frontend-build.log +152 -0
  59. package/docs/reports/unified-9.0.18/raw/frontend-build.result.json +14 -0
  60. package/docs/reports/unified-9.0.18/raw/installer-build.log +26 -0
  61. package/docs/reports/unified-9.0.18/raw/installer-build.result.json +14 -0
  62. package/docs/reports/unified-9.0.18/raw/keygen-source.json +6 -0
  63. package/docs/reports/unified-9.0.18/raw/lint-final.log +5 -0
  64. package/docs/reports/unified-9.0.18/raw/lint-final.result.json +14 -0
  65. package/docs/reports/unified-9.0.18/raw/modules-build.log +5 -0
  66. package/docs/reports/unified-9.0.18/raw/modules-build.result.json +14 -0
  67. package/docs/reports/unified-9.0.18/raw/node22-tests-final.log +9859 -0
  68. package/docs/reports/unified-9.0.18/raw/node22-tests-final.result.json +13 -0
  69. package/docs/reports/unified-9.0.18/raw/node22-typecheck-final.log +7 -0
  70. package/docs/reports/unified-9.0.18/raw/node22-typecheck-final.result.json +14 -0
  71. package/docs/reports/unified-9.0.18/raw/node22-version.log +1 -0
  72. package/docs/reports/unified-9.0.18/raw/node24-tests-final.log +1663 -0
  73. package/docs/reports/unified-9.0.18/raw/node24-tests-final.result.json +13 -0
  74. package/docs/reports/unified-9.0.18/raw/node24-typecheck-final.log +5 -0
  75. package/docs/reports/unified-9.0.18/raw/node24-typecheck-final.result.json +14 -0
  76. package/docs/reports/unified-9.0.18/raw/node24-version.log +1 -0
  77. package/docs/reports/unified-9.0.18/raw/sbom-runtime.log +7 -0
  78. package/docs/reports/unified-9.0.18/raw/sbom-runtime.result.json +14 -0
  79. package/docs/reports/unified-9.0.18/raw/sbom-vendor-check.log +1 -0
  80. package/docs/reports/unified-9.0.18/raw/sbom-vendor-check.result.json +14 -0
  81. package/docs/reports/unified-9.0.18/raw/ui-docs-check.log +6 -0
  82. package/docs/reports/unified-9.0.18/raw/ui-docs-check.result.json +14 -0
  83. package/docs/reports/unified-9.0.18/raw/ui-runtime-final.log +7 -0
  84. package/docs/reports/unified-9.0.18/raw/ui-runtime-final.result.json +14 -0
  85. package/docs/reports/unified-9.0.18/raw/ui-runtime-sync.log +6 -0
  86. package/docs/reports/unified-9.0.18/raw/ui-runtime-sync.result.json +14 -0
  87. package/docs/reports/unified-9.0.18/raw/ui-sbom-check.log +6 -0
  88. package/docs/reports/unified-9.0.18/raw/ui-sbom-check.result.json +14 -0
  89. package/docs/reports/unified-9.0.18/raw/ui-sbom-final.log +14 -0
  90. package/docs/reports/unified-9.0.18/raw/ui-sbom-final.result.json +14 -0
  91. package/docs/reports/unified-9.0.18/raw/ui-secret-final.log +6 -0
  92. package/docs/reports/unified-9.0.18/raw/ui-secret-final.result.json +14 -0
  93. package/docs/reports/unified-9.0.18/raw/ui-security-final.log +8 -0
  94. package/docs/reports/unified-9.0.18/raw/ui-security-final.result.json +14 -0
  95. package/io-package.json +8 -8
  96. package/modules/devices/admin/alias-contract-v1.json +189 -0
  97. package/modules/devices/admin/ems-assignment.d.ts +10 -0
  98. package/modules/devices/admin/ems-assignment.js +194 -0
  99. package/modules/devices/admin/host-bridge.js +47 -0
  100. package/modules/devices/admin/index.html +19 -1
  101. package/modules/devices/admin/index_m.js +73 -1
  102. package/modules/devices/admin/style.css +15 -0
  103. package/modules/devices/checks/emsAssignment.check.js +128 -0
  104. package/modules/devices/eslint.hosted.config.mjs +1 -1
  105. package/modules/devices/index.js +11 -0
  106. package/modules/devices/lib/alias-contract-v1.json +189 -0
  107. package/modules/devices/lib/aliasContract.js +7 -1
  108. package/modules/devices/lib/device-alias-semantics-v1.json +1605 -0
  109. package/modules/devices/lib/deviceAliasSemantics.js +109 -0
  110. package/modules/devices/lib/deviceRuntime.js +3 -0
  111. package/modules/devices/test/aliasContractV1.test.js +1 -1
  112. package/modules/devices/test/deviceAliasSemantics.test.js +163 -0
  113. package/modules/devices/test/emsAssignmentUi.test.js +190 -0
  114. package/modules/devices/tsconfig.alias-semantics.json +17 -0
  115. package/modules/devices/tsconfig.ems-ui.json +9 -0
  116. package/package.json +9 -7
  117. package/release-manifests/unified/build-environment.cdx.json +6 -6
  118. package/release-manifests/unified/files.json +194 -85
  119. package/release-manifests/unified/frontend.cdx.json +6 -6
  120. package/release-manifests/unified/installer.cdx.json +6 -6
  121. package/release-manifests/unified/obsolete-admin-assets.json +84 -0
  122. package/release-manifests/unified/runtime.cdx.json +23 -23
  123. package/release-manifests/unified/validation.json +15 -15
  124. package/tools/eos-release-check.cjs +1 -1
  125. package/tools/eos-release-manifest.cjs +5 -5
  126. package/ui/docs/security/eslint-reviewed-findings.json +32 -18
  127. package/ui/ems/datapoints.js +22 -1
  128. package/ui/ems/modules/tariff-provider.js +232 -54
  129. package/ui/io-package.json +5 -1
  130. package/ui/lib/customer-tariff.js +241 -0
  131. package/ui/lib/installer-lifecycle.js +87 -0
  132. package/ui/main.js +203 -117
  133. package/ui/package.json +8 -4
  134. package/ui/www/customer-tariff.css +21 -0
  135. package/ui/www/customer-tariff.js +333 -0
  136. package/ui/www/ems-apps.js +16 -6
  137. package/ui/www/manifest.webmanifest +2 -2
  138. package/ui/www/settings.html +45 -0
  139. package/adminWww/remoteEntry-eos-9.0.17.js +0 -12
@@ -0,0 +1,109 @@
1
+ // @ts-check
2
+ 'use strict';
3
+
4
+ /** @typedef {{dpId:string, type:string, unit:string, rw:string, source:Record<string, unknown>, transform:string}} Binding */
5
+ /** @typedef {{id?:string, type?:string, unit?:string, rw?:string, source?:Record<string, unknown>}} Datapoint */
6
+ /** @typedef {{id?:string, category?:string, datapoints?:Datapoint[]}} Template */
7
+ /** @typedef {{status:'available'|'unavailable', reason:string, dpId?:string}} Coverage */
8
+ /** @typedef {{relId:string, name:string, role:string, type:string, unit:string, rw:string, kind:string, dpId:string, fromDevice:(value:unknown)=>number|null, semanticSource:string, deviceReadOnly:true}} SemanticDefinition */
9
+
10
+ /** @type {{schemaVersion:number, aliases:Record<string,string>, profiles:Record<string,Record<string,Binding>>}} */
11
+ const policy = require('./device-alias-semantics-v1.json');
12
+ const STORAGE_CATEGORIES = new Set(['ESS', 'BATTERY', 'BATTERY_INVERTER']);
13
+
14
+ /** Deterministic structural comparison; a custom profile cannot inherit a builtin binding by ID alone.
15
+ * @param {unknown} actual @param {unknown} expected @returns {boolean}
16
+ */
17
+ function sameDescriptor(actual, expected) {
18
+ if (actual === expected) return true;
19
+ if (actual === null || expected === null || typeof actual !== 'object' || typeof expected !== 'object') return false;
20
+ if (Array.isArray(actual) || Array.isArray(expected)) {
21
+ return Array.isArray(actual) && Array.isArray(expected) && actual.length === expected.length &&
22
+ actual.every((value, index) => sameDescriptor(value, expected[index]));
23
+ }
24
+ const left = /** @type {Record<string, unknown>} */ (actual);
25
+ const right = /** @type {Record<string, unknown>} */ (expected);
26
+ const keys = Object.keys(right);
27
+ return Object.keys(left).length === keys.length && keys.every(key =>
28
+ Object.prototype.hasOwnProperty.call(left, key) && sameDescriptor(left[key], right[key]));
29
+ }
30
+
31
+ /** Only an actual read descriptor establishes a Modbus target readback.
32
+ * @param {Record<string, unknown>} source @returns {boolean}
33
+ */
34
+ function hasDeviceRead(source) {
35
+ if (source.kind !== 'modbus') return false;
36
+ const candidate = source.read;
37
+ const read = candidate && typeof candidate === 'object' && !Array.isArray(candidate)
38
+ ? /** @type {Record<string, unknown>} */ (candidate) : source;
39
+ return (read.fc === 3 || read.fc === 4) && Number.isInteger(read.address) && Number(read.address) >= 0;
40
+ }
41
+
42
+ /** @param {Binding} binding @param {Datapoint|undefined} dp @param {string} path @returns {string|null} */
43
+ function unavailableReason(binding, dp, path) {
44
+ if (!dp) return 'sourceMissing';
45
+ if (dp.type !== 'number' || dp.rw === 'wo' || (dp.rw !== 'ro' && dp.rw !== 'rw')) return 'sourceNotReadable';
46
+ if (dp.type !== binding.type || dp.unit !== binding.unit || dp.rw !== binding.rw ||
47
+ !sameDescriptor(dp.source, binding.source)) return 'sourceDescriptorChanged';
48
+ if (dp.unit !== 'W' && dp.unit !== 'kW') return 'sourceUnitUnsupported';
49
+ if (path === 'r.powerSetpointReadbackW' && !hasDeviceRead(binding.source)) return 'deviceReadbackUnavailable';
50
+ if (!['identity', 'negate', 'negativeMagnitude', 'positiveMagnitude'].includes(binding.transform)) return 'sourceTransformUnsupported';
51
+ return null;
52
+ }
53
+
54
+ /** Keep invalid telemetry invalid, rather than converting null/string/NaN to a plausible measurement.
55
+ * @param {unknown} value @param {string} transform @returns {number|null}
56
+ */
57
+ function transformValue(value, transform) {
58
+ if (typeof value !== 'number' || !Number.isFinite(value)) return null;
59
+ if (transform === 'negativeMagnitude' || transform === 'positiveMagnitude') {
60
+ if (value < 0) return null;
61
+ return transform === 'negativeMagnitude' && value !== 0 ? -value : value;
62
+ }
63
+ return transform === 'negate' && value !== 0 ? -value : value;
64
+ }
65
+
66
+ /** Additional semantics never replace historic aliases or create a write capability.
67
+ * @param {{baseId:string, template?:Template, getDpById?:(id:string)=>Datapoint|undefined}} options
68
+ * @returns {{definitions:SemanticDefinition[], coverage:Record<string,Coverage>}}
69
+ */
70
+ function buildSemanticAliasDefinitions(options) {
71
+ const { baseId, template, getDpById } = options;
72
+ /** @type {SemanticDefinition[]} */
73
+ const definitions = [];
74
+ /** @type {Record<string,Coverage>} */
75
+ const coverage = {};
76
+ if (!template || !STORAGE_CATEGORIES.has(String(template.category || '').toUpperCase())) return { definitions, coverage };
77
+ const profile = policy.profiles[String(template.id || '')] || {};
78
+ for (const [path, name] of Object.entries(policy.aliases)) {
79
+ const binding = profile[path];
80
+ if (!binding) {
81
+ coverage[path] = { status: 'unavailable', reason: 'noVerifiedSourceBinding' };
82
+ continue;
83
+ }
84
+ const dp = typeof getDpById === 'function' ? getDpById(binding.dpId)
85
+ : (template.datapoints || []).find(item => item.id === binding.dpId);
86
+ const reason = unavailableReason(binding, dp, path);
87
+ if (reason) {
88
+ coverage[path] = { status: 'unavailable', reason, dpId: binding.dpId };
89
+ continue;
90
+ }
91
+ definitions.push({
92
+ relId: `${baseId}.aliases.${path}`,
93
+ name,
94
+ role: 'value.power',
95
+ type: 'number',
96
+ unit: binding.unit,
97
+ rw: 'ro',
98
+ kind: 'dp',
99
+ dpId: binding.dpId,
100
+ fromDevice: value => transformValue(value, binding.transform),
101
+ semanticSource: binding.dpId,
102
+ deviceReadOnly: true,
103
+ });
104
+ coverage[path] = { status: 'available', reason: 'sourceDescriptorVerified', dpId: binding.dpId };
105
+ }
106
+ return { definitions, coverage };
107
+ }
108
+
109
+ module.exports = { buildSemanticAliasDefinitions, sameDescriptor };
@@ -9401,6 +9401,9 @@ class DeviceRuntime {
9401
9401
  try {
9402
9402
  if (!isCurrent()) return;
9403
9403
  if (!def || def.kind !== 'dp') continue;
9404
+ // A write acknowledgement is not device feedback. Additive semantic
9405
+ // readback aliases only change when the driver actually reads the source.
9406
+ if (def.deviceReadOnly === true) continue;
9404
9407
  // A Modbus write response confirms transmission, not the charger's
9405
9408
  // applied limit. Keep DEPower readback aliases tied to real polling.
9406
9409
  if (this.template?.driverHints?.oemModbusV1003 && def.rw !== 'rw' && def.rw !== 'wo') continue;
@@ -168,7 +168,7 @@ test('all 195 templates satisfy the canonical path, type, role and unit contract
168
168
  }
169
169
  }
170
170
 
171
- assert.equal(standardAliasCount, 2463); // 2454 existing + 7 VARTA error codes + 2 temperatures
171
+ assert.equal(standardAliasCount, 2552); // 2463 existing + 89 source-bound read-only semantic aliases
172
172
  assert.deepEqual(Object.fromEntries([...classCounts.entries()].sort()), {
173
173
  battery: 12,
174
174
  batteryInverter: 3,
@@ -0,0 +1,163 @@
1
+ 'use strict';
2
+
3
+ const test = require('node:test');
4
+ const assert = require('node:assert/strict');
5
+ const Module = require('node:module');
6
+ const templates = require('../lib/templates.json').templates;
7
+ const policy = require('../lib/device-alias-semantics-v1.json');
8
+ const { buildSemanticAliasDefinitions } = require('../lib/deviceAliasSemantics');
9
+ const { buildManifest, cloneStandardDefinition } = require('../lib/aliasContract');
10
+
11
+ function loadRuntime() {
12
+ const original = Module._load;
13
+ Module._load = function (request, parent, isMain) {
14
+ if (request === 'modbus-serial') return class ModbusRTU {};
15
+ if (request === 'serialport') return { SerialPort: class SerialPort {} };
16
+ if (request === 'mqtt') return { connect() { throw new Error('unexpected MQTT connection'); } };
17
+ if (request === 'axios') return {};
18
+ return original.call(this, request, parent, isMain);
19
+ };
20
+ try { return require('../lib/deviceRuntime').DeviceRuntime; }
21
+ finally { Module._load = original; }
22
+ }
23
+ const DeviceRuntime = loadRuntime();
24
+
25
+ function runtimeFor(id) {
26
+ const template = templates.find(item => item.id === id);
27
+ assert.ok(template, id);
28
+ const adapter = { log: { debug() {}, info() {}, warn() {}, error() {} } };
29
+ const runtime = new DeviceRuntime(adapter, { id: 'audit', templateId: id, category: template.category, connection: {} }, template, {});
30
+ for (const dp of template.datapoints) runtime.dpById.set(dp.id, dp);
31
+ const defs = runtime._buildAliasDefinitions();
32
+ runtime.aliasDefs = defs;
33
+ return { runtime, template, defs, byPath: new Map(defs.map(def => [def.relId.replace('devices.audit.aliases.', ''), def])) };
34
+ }
35
+
36
+ test('all 195 profiles retain existing aliases; new semantics are additive, source-bound and read-only', () => {
37
+ let additions = 0;
38
+ const coveredProfiles = new Set();
39
+ for (const template of templates) {
40
+ const { runtime, defs, byPath } = runtimeFor(template.id);
41
+ const expected = buildSemanticAliasDefinitions({ baseId: runtime.baseId, template });
42
+ for (const def of expected.definitions) {
43
+ const path = def.relId.replace('devices.audit.aliases.', '');
44
+ const actual = byPath.get(`v1.${path}`);
45
+ assert.ok(actual, `${template.id}: ${path}`);
46
+ assert.equal(actual.rw, 'ro');
47
+ assert.equal(actual.unit, 'W');
48
+ assert.equal(actual.writeDpId, undefined);
49
+ assert.equal(actual.preferCommandValue, undefined);
50
+ assert.equal(byPath.has(path), false, `new canonical alias must not add/replace legacy: ${template.id}/${path}`);
51
+ assert.equal(actual.fromDevice(null), null);
52
+ assert.equal(actual.fromDevice('1'), null);
53
+ assert.equal(actual.fromDevice(NaN), null);
54
+ assert.equal(actual.fromDevice(Infinity), null);
55
+ additions++;
56
+ coveredProfiles.add(template.id);
57
+ }
58
+ // Every pre-existing canonical path is still built from its exact legacy
59
+ // definition, with the same target, access mode and canonical unit conversion.
60
+ const checked = new Set();
61
+ for (const def of defs.filter(item => !item.relId.includes('.aliases.v1.'))) {
62
+ const normal = cloneStandardDefinition(def, { baseId: runtime.baseId, deviceClass: runtime.aliasDeviceClass, getDpById: id => runtime.dpById.get(id) });
63
+ if (!normal || checked.has(normal.relId)) continue;
64
+ checked.add(normal.relId);
65
+ const actual = defs.find(item => item.relId === normal.relId);
66
+ assert.ok(actual, `${template.id}/${normal.relId}`);
67
+ for (const key of ['dpId', 'writeDpId', 'rw', 'type', 'role', 'unit', 'kind']) assert.equal(actual[key], normal[key], `${template.id}/${key}`);
68
+ }
69
+ const manifest = buildManifest(runtime.aliasContractInfo, template, runtime.cfg);
70
+ assert.deepEqual(manifest.semanticCoverage, expected.coverage);
71
+ assert.deepEqual(runtime.aliasContractInfo.missingRequired, []);
72
+ }
73
+ assert.equal(templates.length, 195);
74
+ assert.equal(additions, 89);
75
+ assert.equal(coveredProfiles.size, 25);
76
+ });
77
+
78
+ test('FENECON keeps battery power separate from ESS converter/DC PV and does not fabricate 706 readback', () => {
79
+ const { byPath } = runtimeFor('ess.fenecon.FeneconHomeEssImpl');
80
+ const expected = {
81
+ 'r.essActivePower': 'eSS0_ACTIVE_POWER', 'r.nvpPower': 'gRID_POWER',
82
+ 'r.consumptionTotal': 'lOAD_POWER', 'r.minPowerSetpointW': 'mIN_POWER_SETPOINT',
83
+ 'r.maxPowerSetpointW': 'mAX_POWER_SETPOINT', 'r.pvPowerDc': 'pV_DC_POWER',
84
+ 'r.pvPowerAc': 'pV_AC_POWER', 'r.pvPowerTotal': 'pV_POWER_SUM',
85
+ };
86
+ for (const [path, dpId] of Object.entries(expected)) {
87
+ const def = byPath.get(`v1.${path}`);
88
+ assert.equal(def.dpId, dpId);
89
+ assert.equal(def.fromDevice(2.5), 2500);
90
+ assert.equal(def.fromDevice(-2.5), -2500);
91
+ }
92
+ assert.equal(byPath.has('v1.r.powerSetpointReadbackW'), false);
93
+ assert.equal(byPath.get('v1.ctrl.powerSetpointW').writeDpId, 'sET_ACTIVE_POWER');
94
+ assert.equal(byPath.get('v1.ctrl.gridSetpointW').writeDpId, 'sET_GRID_ACTIVE_POWER');
95
+ });
96
+
97
+ test('both SolaX profiles share W units and signed limits, with genuine readable target and no invented grid target', () => {
98
+ for (const [id, scale] of [['ess.solax.Ems1000ModbusTcp', 1000], ['ess.solax.SolaXHybridX1X3Ess', 1]]) {
99
+ const { byPath } = runtimeFor(id);
100
+ assert.equal(byPath.get('v1.r.minPowerSetpointW').fromDevice(2), -2 * scale);
101
+ assert.equal(byPath.get('v1.r.maxPowerSetpointW').fromDevice(3), 3 * scale);
102
+ assert.equal(byPath.get('v1.r.minPowerSetpointW').fromDevice(-2), null);
103
+ assert.equal(byPath.get('v1.r.maxPowerSetpointW').fromDevice(-2), null);
104
+ assert.equal(byPath.get('v1.r.powerSetpointReadbackW').fromDevice(-4), -4 * scale);
105
+ assert.equal(byPath.get('v1.r.powerSetpointReadbackW').dpId, 'sET_ACTIVE_POWER');
106
+ assert.equal(byPath.has('v1.ctrl.gridSetpointW'), false);
107
+ assert.equal(byPath.has('v1.r.nvpPower'), false, 'unverified grid sign must not become an automatic NVP source');
108
+ assert.equal(byPath.has('v1.r.pvPowerAc'), false);
109
+ assert.equal(byPath.has('v1.r.pvPowerDc'), false);
110
+ }
111
+ });
112
+
113
+ test('readback is actual polling data and cannot acknowledge queued or failed commands', async () => {
114
+ const { runtime } = runtimeFor('ess.solax.Ems1000ModbusTcp');
115
+ const writes = new Map();
116
+ runtime._setStateCached = async (id, value) => writes.set(id, value);
117
+ runtime._lastCommandedValueByDpId.set('sET_ACTIVE_POWER', 9);
118
+ const id = 'devices.audit.aliases.v1.r.powerSetpointReadbackW';
119
+ await runtime._ackWrittenValue(runtime.dpById.get('sET_ACTIVE_POWER'), 9);
120
+ assert.equal(writes.has(id), false, 'write acknowledgement must not synthesize a device readback');
121
+ await runtime._updateAliases({ sET_ACTIVE_POWER: 2 }, { connected: true });
122
+ assert.equal(writes.get(id), 2000);
123
+ writes.clear();
124
+ await runtime._ackWrittenValue(runtime.dpById.get('sET_ACTIVE_POWER'), 8);
125
+ assert.equal(writes.has(id), false);
126
+ await runtime._updateAliases({ sOC: 50 }, { connected: true });
127
+ assert.equal(writes.has(id), false);
128
+ });
129
+
130
+ test('VARTA sign conversion and DEYE MPPT aggregation remain canonical without new control capability', () => {
131
+ const varta = runtimeFor('ess.varta.pulseNeo.modbusTcpV14').byPath;
132
+ assert.equal(varta.get('v1.r.essActivePower').fromDevice(1400), -1400);
133
+ assert.equal(varta.get('v1.r.nvpPower').fromDevice(-900), 900);
134
+ assert.equal(varta.get('v1.r.pvPowerAc').dpId, 'pV_POWER');
135
+ const deye = runtimeFor('ess.deye.threePhaseHv.modbusRtu').byPath;
136
+ assert.equal(deye.get('v1.r.pvPowerDc').dpId, 'canonical.pvPower');
137
+ assert.equal(deye.has('v1.ctrl.powerSetpointW'), false);
138
+ assert.equal(deye.has('v1.r.powerSetpointReadbackW'), false);
139
+ });
140
+
141
+ test('unknown, write-only, missing, remapped and differently scaled sources remain unavailable', () => {
142
+ const original = templates.find(item => item.id === 'ess.solax.SolaXHybridX1X3Ess');
143
+ for (const mutate of [
144
+ t => { t.id = 'custom.storage'; },
145
+ t => { t.datapoints = t.datapoints.filter(dp => dp.id !== 'sET_ACTIVE_POWER'); },
146
+ t => { t.datapoints.find(dp => dp.id === 'sET_ACTIVE_POWER').rw = 'wo'; },
147
+ t => { t.datapoints.find(dp => dp.id === 'sET_ACTIVE_POWER').unit = 'kW'; },
148
+ t => { t.datapoints.find(dp => dp.id === 'sET_ACTIVE_POWER').source.read.address = 999; },
149
+ t => { delete t.datapoints.find(dp => dp.id === 'sET_ACTIVE_POWER').source.read; },
150
+ ]) {
151
+ const template = structuredClone(original);
152
+ mutate(template);
153
+ const result = buildSemanticAliasDefinitions({ baseId: 'devices.custom', template });
154
+ assert.equal(result.coverage['r.powerSetpointReadbackW'].status, 'unavailable');
155
+ assert.equal(result.definitions.some(def => def.relId.endsWith('.powerSetpointReadbackW')), false);
156
+ }
157
+ for (const [id, profile] of Object.entries(policy.profiles)) {
158
+ for (const binding of Object.values(profile)) assert.ok(binding.source, `${id}/${binding.dpId}`);
159
+ }
160
+ const fox = runtimeFor('ess.foxess.FoxESSH3Ess').byPath;
161
+ assert.equal(fox.has('v1.r.minPowerSetpointW'), false, 'assumed FoxESS direction is not a verified signed bound');
162
+ assert.equal(fox.has('v1.r.maxPowerSetpointW'), false);
163
+ });
@@ -0,0 +1,190 @@
1
+ /* Copyright (c) 2026 NexoWatt. Confidential and proprietary. */
2
+ 'use strict';
3
+ const test = require('node:test');
4
+ const assert = require('node:assert/strict');
5
+ const vm = require('node:vm');
6
+ const fs = require('node:fs');
7
+ const path = require('node:path');
8
+ const { validateConfig } = require('..');
9
+ const source = fs.readFileSync(path.join(__dirname, '../admin/ems-assignment.js'), 'utf8');
10
+
11
+ function browser() {
12
+ class Element { constructor() { this.dataset = {}; this.textContent = ''; } }
13
+ const summary = new Element();
14
+ const row = new Element(); row.dataset = { eosEmsId: 'evcs1', eosEmsMode: 'auto', eosEmsEnabled: 'true' };
15
+ const window = {};
16
+ vm.runInNewContext(source, { window, HTMLElement: Element, document: { getElementById: () => summary, querySelectorAll: () => [row] } });
17
+ return { api: window.EosDeviceEms, row, summary };
18
+ }
19
+ const device = { id: 'evcs1', templateId: 'fixture.template', protocol: 'modbusTcp', enabled: true, connection: { host: '192.0.2.50' } };
20
+ const saved = ems => validateConfig({ enabled: true, devices: [{ ...device, ems }] }).devices[0].ems;
21
+
22
+ test('known charging profiles show automatic assignment while storage and meters offer explicit role selection', () => {
23
+ const { api } = browser();
24
+ assert.deepEqual(Array.from(api.modes('EVCS'), item => item.value), ['auto', 'monitor', 'manual']);
25
+ assert.match(api.help('EVCS', 'auto', ''), /automatisch unter Ladepunkte/);
26
+ assert.doesNotMatch(api.help('DC_CHARGER', 'auto', ''), /automatisch unter Ladepunkte/);
27
+ assert.ok(api.modes('ESS').some(item => item.value === 'singleStorage'));
28
+ assert.ok(api.modes('ESS').some(item => item.value === 'storageFarm'));
29
+ assert.ok(api.modes('METER').some(item => item.value === 'gridMeter'));
30
+ assert.ok(api.modes('METER').some(item => item.value === 'generationMeter'));
31
+ assert.ok(api.modes('METER').some(item => item.value === 'consumptionMeter'));
32
+ assert.ok(api.modes('PV_INVERTER').some(item => item.value === 'pvInverter'));
33
+ });
34
+
35
+ test('energy flow choices are the six existing generation fields and ten consumers, without invented aggregation', () => {
36
+ const { api } = browser();
37
+ assert.deepEqual(Array.from(api.targets('pvInverter'), item => item.value), [0, 1, 2, 3, 4, 5]);
38
+ assert.deepEqual(Array.from(api.targets('generationMeter'), item => item.value), [0, 1, 2, 3, 4, 5]);
39
+ assert.deepEqual(Array.from(api.targets('consumptionMeter'), item => item.value), [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
40
+ assert.equal(api.targets('storageFarm').length, 0);
41
+ assert.match(api.help('METER', 'generationMeter', ''), /nicht doppelt/);
42
+ assert.match(api.help('ESS', 'singleStorage', 'M1'), /keine automatische Steuerfreigabe/);
43
+ });
44
+
45
+ for (const intent of [
46
+ { mode: 'auto' }, { mode: 'monitor' }, { mode: 'manual' },
47
+ { mode: 'singleStorage', scope: 'M0' }, { mode: 'storageFarm', scope: 'M1' },
48
+ { mode: 'gridMeter', scope: 'M1' }, { mode: 'generationMeter', flowSlot: 0 },
49
+ { mode: 'pvInverter', flowSlot: 5 }, { mode: 'consumptionMeter', flowSlot: 10 },
50
+ ]) test(`device config round-trip preserves EMS intent ${JSON.stringify(intent)}`, () => assert.deepEqual(saved(intent), intent));
51
+
52
+ for (const intent of [
53
+ null, [], { mode: 'runHardware' }, { mode: 'auto', command: 'run' },
54
+ { mode: 'singleStorage' }, { mode: 'gridMeter', scope: 'M2' },
55
+ { mode: 'auto', scope: 0 }, { mode: 'auto', group: '../foreign' },
56
+ { mode: 'generationMeter', flowSlot: 6 }, { mode: 'pvInverter', flowSlot: '1' },
57
+ { mode: 'pvInverter', flowSlot: 0.5 }, { mode: 'consumptionMeter', flowSlot: 0 },
58
+ { mode: 'consumptionMeter', flowSlot: 11 }, { mode: 'consumptionMeter' },
59
+ ]) test(`malformed EMS intent is rejected before save: ${JSON.stringify(intent)}`, () => assert.throws(() => saved(intent), /EOS_DEVICES_EMS_/));
60
+
61
+ test('updating an older device preserves existing fields and does not invent an EMS intent', () => {
62
+ const original = { ...device, futureSetting: { x: 4 } };
63
+ const normalized = validateConfig({ devices: [original] });
64
+ assert.deepEqual(normalized.devices[0], original);
65
+ assert.equal(normalized.devices[0].ems, undefined);
66
+ });
67
+
68
+ test('public mapping status is plain text, identifies commissioning and never claims hardware activation', () => {
69
+ const { api, row, summary } = browser();
70
+ api.render({ state: 'ready', statuses: [{ deviceId: 'evcs1', status: 'mapped', code: 'COMMISSIONING_REQUIRED' }] });
71
+ assert.match(row.textContent, /Zugeordnet/);
72
+ assert.match(row.textContent, /Betriebsfreigabe/);
73
+ assert.match(summary.textContent, /1 Gerät\(e\) zugeordnet/);
74
+ api.render({ state: 'ready', statuses: [{ deviceId: 'evcs1', status: 'conflict', code: '<img src=x onerror=alert(1)>' }] });
75
+ assert.equal(row.dataset.state, 'conflict');
76
+ assert.doesNotMatch(row.textContent, /<img/);
77
+ assert.match(row.textContent, /bleibt erhalten/);
78
+ assert.match(summary.textContent, /1 Zuordnungskonflikt/);
79
+ });
80
+
81
+ test('pending and stopped status do not overwrite the device draft or masquerade as a failed save', () => {
82
+ const { api, summary } = browser();
83
+ const draft = { name: 'Unstored name', ems: { mode: 'storageFarm', scope: 'M0' } };
84
+ const before = structuredClone(draft);
85
+ api.render({ state: 'error', statuses: [] });
86
+ assert.match(summary.textContent, /Geräte gespeichert/);
87
+ assert.deepEqual(draft, before);
88
+ api.render({ state: 'stopped', statuses: [] });
89
+ assert.match(summary.textContent, /pausiert/);
90
+ api.render({ state: 'ready', statuses: [{ deviceId: 'evcs1', status: 'mapped' }] });
91
+ assert.equal(api.describe('evcs1', { mode: 'auto' }, false).status, 'disabled');
92
+ });
93
+
94
+ test('partial mappings remain visibly incomplete and occupied targets explain the preserved mapping', () => {
95
+ const { api, row, summary } = browser();
96
+ api.render({ state: 'ready', statuses: [{ devId: 'evcs1', status: 'mapped', code: 'MAPPING_INCOMPLETE', missing: ['powerId', 'onlineId|heartbeatId', '<script>secret</script>'] }] });
97
+ assert.equal(row.dataset.state, 'pending');
98
+ assert.match(row.textContent, /Teilweise zugeordnet/);
99
+ assert.match(row.textContent, /Fehlt: Leistungsmesswert, Verbindungsstatus/);
100
+ assert.doesNotMatch(row.textContent, /<script>/);
101
+ assert.match(summary.textContent, /0 Gerät\(e\) zugeordnet · 1 unvollständig/);
102
+ assert.equal(summary.dataset.state, 'pending');
103
+ api.render({ state: 'ready', statuses: [{ devId: 'evcs1', status: 'conflict', code: 'MEASUREMENT_ALREADY_ASSIGNED' }] });
104
+ assert.match(row.textContent, /Doppelzählung vermeiden/);
105
+ api.render({ state: 'ready', statuses: [{ devId: 'evcs1', status: 'manual', code: 'MONITOR_ONLY' }] });
106
+ assert.match(row.textContent, /automatisch verwaltete Steuereinträge deaktiviert/);
107
+ assert.match(api.help('ESS', 'monitor', ''), /Andere manuelle Einträge bleiben unverändert/);
108
+ assert.match(api.help('ESS', 'monitor', ''), /spätere Betriebsfreigabe erfolgt manuell/);
109
+ assert.match(api.help('ESS', 'manual', ''), /beendet keine bestehende Regelung/);
110
+ });
111
+
112
+ test('optional manufacturer readback is distinguished from required missing data', () => {
113
+ const { api, row, summary } = browser();
114
+ api.render({ state: 'ready', statuses: [{ devId: 'evcs1', status: 'mapped', code: 'COMMISSIONING_REQUIRED', optionalMissing: ['feneconActualSetpointId', '<img>'] }] });
115
+ assert.equal(row.dataset.state, 'mapped');
116
+ assert.match(row.textContent, /Optional nicht verfügbar: Rückmeldung des tatsächlich angewendeten Sollwerts/);
117
+ assert.doesNotMatch(row.textContent, /<img>|Fehlt:/);
118
+ assert.match(summary.textContent, /1 Gerät\(e\) zugeordnet/);
119
+ });
120
+
121
+ test('profile-independent optional aliases and numeric mapping errors remain clear for every manufacturer', () => {
122
+ const { api, row } = browser();
123
+ api.render({ state: 'ready', statuses: [{ devId: 'evcs1', status: 'mapped', code: 'COMMISSIONING_REQUIRED',
124
+ optionalMissing: ['r.pvPowerDc', 'futureVendorExtraId', 'feneconNvpPowerObjectId'] }] });
125
+ assert.equal(row.dataset.state, 'mapped');
126
+ assert.match(row.textContent, /PV-Leistung DC/); assert.match(row.textContent, /Netzanschlussleistung/);
127
+ assert.match(row.textContent, /1 weitere profilabhängige Datenpunkt-Zuordnung/);
128
+ assert.doesNotMatch(row.textContent, /futureVendor|feneconNvp/);
129
+ api.render({ state: 'ready', statuses: [{ devId: 'evcs1', status: 'mapped', code: 'MAPPING_INCOMPLETE', missing: ['invalid:pvPowerId'] }] });
130
+ assert.equal(row.dataset.state, 'pending');
131
+ assert.match(row.textContent, /Eine Zahl ersetzt keinen Datenpunkt/);
132
+ assert.match(row.textContent, /Betriebsfreigabe|erforderliche Datenpunkte/);
133
+ api.render({ state: 'ready', statuses: [{ devId: 'evcs1', status: 'mapped', code: 'MAPPING_INCOMPLETE', missing: ['review:feneconGridSetpointObjectId'] }] });
134
+ assert.match(row.textContent, /Regelungsart.*ausdrücklich prüfen/);
135
+ assert.match(row.textContent, /bisherige Direktregelung bleibt erhalten/);
136
+ });
137
+
138
+ async function pollingFixture() {
139
+ const elements = new Map(); const timers = new Map(); const events = new Map();
140
+ let timerId = 0; let loads = 0; let reads = 0; let renders = 0;
141
+ let draft = {}; let onChange = () => {};
142
+ const node = id => {
143
+ if (!elements.has(id)) elements.set(id, { textContent: '', dataset: {}, events: {}, addEventListener(name, handler) { this.events[name] = handler; } });
144
+ return elements.get(id);
145
+ };
146
+ const context = { Error, AbortSignal, Promise, window: {
147
+ EosDeviceEms: { render() { renders++; } },
148
+ setTimeout(callback) { const id = ++timerId; timers.set(id, callback); return id; },
149
+ clearTimeout(id) { timers.delete(id); }, addEventListener(name, callback) { events.set(name, callback); },
150
+ }, document: { hidden: false, getElementById: node, querySelectorAll: () => [], addEventListener(name, callback) { events.set(name, callback); } },
151
+ async load(config, changed) { loads++; draft = structuredClone(config); onChange = changed; },
152
+ save(callback) { callback(draft); },
153
+ async fetch(_url, options) {
154
+ assert.equal(options.method, undefined, 'status polling never sends a mutation'); reads++;
155
+ return { status: 200, ok: true, json: async () => ({ config: { enabled: true, devices: [{ id: 'evcs1', name: 'Stored' }] },
156
+ csrfToken: 'fixture-csrf', configurationReady: true, emsCommissioning: { state: 'pending', statuses: [] } }) };
157
+ } };
158
+ vm.runInNewContext(fs.readFileSync(path.join(__dirname, '../admin/host-bridge.js'), 'utf8'), context);
159
+ events.get('DOMContentLoaded')();
160
+ const settle = async () => { for (let i = 0; i < 10; i++) await new Promise(resolve => setImmediate(resolve)); };
161
+ await settle();
162
+ return { node, events, timers, loads: () => loads, reads: () => reads, renders: () => renders, draft: () => draft,
163
+ changed() { onChange(true); }, settle,
164
+ async tick() { const entry = timers.entries().next().value; assert.ok(entry); timers.delete(entry[0]); entry[1](); await settle(); },
165
+ };
166
+ }
167
+
168
+ test('bounded status polling and explicit refresh preserve unsaved device and EMS selections', async () => {
169
+ const f = await pollingFixture();
170
+ f.draft().devices[0].name = 'Customer draft';
171
+ f.draft().devices[0].ems = { mode: 'storageFarm', scope: 'M0' }; f.changed();
172
+ for (let i = 0; i < 12; i++) await f.tick();
173
+ assert.equal(f.reads(), 13, 'one initial read and twelve bounded status polls');
174
+ assert.equal(f.timers.size, 0, 'no endless polling after pending budget expires');
175
+ assert.equal(f.loads(), 1, 'polling never reloads the editable configuration');
176
+ assert.equal(f.renders(), 13);
177
+ f.node('eosEmsRefresh').events.click(); await f.settle();
178
+ assert.equal(f.loads(), 1); assert.equal(f.reads(), 14);
179
+ assert.equal(f.draft().devices[0].name, 'Customer draft');
180
+ assert.deepEqual(f.draft().devices[0].ems, { mode: 'storageFarm', scope: 'M0' });
181
+ assert.equal(f.node('eosModuleStatus').textContent, 'Ungespeicherte Änderungen.');
182
+ });
183
+
184
+ test('leaving the devices page cancels its pending EMS status poll', async () => {
185
+ const f = await pollingFixture();
186
+ assert.equal(f.timers.size, 1);
187
+ f.events.get('pagehide')();
188
+ assert.equal(f.timers.size, 0);
189
+ assert.equal(f.reads(), 1);
190
+ });
@@ -0,0 +1,17 @@
1
+ {
2
+ "compilerOptions": {
3
+ "allowJs": true,
4
+ "checkJs": true,
5
+ "noEmit": true,
6
+ "strict": true,
7
+ "noUncheckedIndexedAccess": true,
8
+ "exactOptionalPropertyTypes": true,
9
+ "target": "ES2022",
10
+ "module": "node16",
11
+ "moduleResolution": "node16",
12
+ "resolveJsonModule": true,
13
+ "skipLibCheck": true,
14
+ "types": ["node"]
15
+ },
16
+ "files": ["lib/deviceAliasSemantics.js"]
17
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "compilerOptions": {
3
+ "allowJs": true, "checkJs": true, "noEmit": true, "strict": true,
4
+ "noUncheckedIndexedAccess": true, "exactOptionalPropertyTypes": true,
5
+ "target": "ES2022", "module": "ESNext", "lib": ["ES2022", "DOM", "DOM.Iterable"],
6
+ "types": [], "skipLibCheck": true
7
+ },
8
+ "files": ["admin/ems-assignment.js", "admin/ems-assignment.d.ts"]
9
+ }
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.17",
4
+ "version": "9.0.18",
5
5
  "contributors": [
6
6
  "bluefox <dogafox@gmail.com>",
7
7
  "apollon77",
@@ -197,7 +197,9 @@
197
197
  "docs/reports/unified-9.0.16/",
198
198
  "START_HIER_9.0.17.md",
199
199
  "docs/reports/unified-9.0.17/",
200
- "tools/eos-coexistence-recovery.cjs"
200
+ "tools/eos-coexistence-recovery.cjs",
201
+ "START_HIER_9.0.18.md",
202
+ "docs/reports/unified-9.0.18/"
201
203
  ],
202
204
  "scripts": {
203
205
  "start": "cd src-admin && npm run start",
@@ -208,7 +210,7 @@
208
210
  "build:ui-runtime": "node ui/scripts/build-smarthome-markdown.cjs && node ui/scripts/build-ts-runtime-executables.js",
209
211
  "lint-backend": "eslint -c eslint.config.mjs src && npm run lint:unified",
210
212
  "lint": "npm run lint-backend && cd src-admin && npm run lint",
211
- "test:unified": "node --test 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-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",
213
+ "test:unified": "node --test 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-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",
212
214
  "check:unified": "node tools/eos-release-check.cjs",
213
215
  "seal:unified": "node tools/eos-release-manifest.cjs --write",
214
216
  "prepack": "node tools/eos-prepare-publish.cjs && node tools/eos-release-check.cjs",
@@ -218,10 +220,10 @@
218
220
  "test:retained": "node --test test/eos-session-security.test.cjs test/eos-web-resources.test.cjs test/eos-auth-regressions.test.cjs",
219
221
  "test:package": "node --test test/eos-unified-metadata.test.cjs",
220
222
  "test:integration": "mocha test/integration-unified.cjs --exit",
221
- "typecheck": "tsc -p tsconfig.build.json --noEmit && tsc -p ui/tsconfig.ephemeral-cache.json && tsc -p ui/tsconfig.hosted-adapter.json && tsc -p modules/eebus/tsconfig.json --noEmit && tsc -p modules/backup/tsconfig.json --noEmit && tsc -p ui/tsconfig.smarthome-activation.json && tsc -p ui/tsconfig.ui-auth-frontend.json && tsc -p ui/tsconfig.preserved-ui-config.json && tsc -p ui/tsconfig.smarthome-feedback.json && tsc -p ui/tsconfig.smarthome-touch.json && tsc -p ui/tsconfig.smarthome-presentation.json && tsc -p ui/tsconfig.smarthome-device-controls.json && tsc -p ui/tsconfig.smarthome-device-api.json && tsc -p ui/tsconfig.smarthome-device-detection.json && tsc -p ui/tsconfig.smarthome-device-config.json && tsc -p ui/tsconfig.smarthome-device-controls-browser.json && tsc -p ui/tsconfig.smarthome-custom-views.json && tsc -p ui/tsconfig.smarthome-custom-contract.json && tsc -p ui/tsconfig.smarthome-custom-config.json && tsc -p ui/tsconfig.smarthome-device-legacy.json && tsc -p ui/tsconfig.smarthome-device-aliases.json && tsc -p ui/tsconfig.smarthome-alias-config.json && tsc -p ui/tsconfig.smarthome-device-categories.json && tsc -p ui/tsconfig.smarthome-layout-editor.json && tsc -p ui/tsconfig.hosted-runtime-stop.json && tsc -p ui/tsconfig.smarthome-setup.json && tsc -p ui/tsconfig.hosted-startup-status.json",
223
+ "typecheck": "tsc -p tsconfig.build.json --noEmit && tsc -p ui/tsconfig.ephemeral-cache.json && tsc -p ui/tsconfig.hosted-adapter.json && tsc -p modules/eebus/tsconfig.json --noEmit && tsc -p modules/backup/tsconfig.json --noEmit && tsc -p ui/tsconfig.smarthome-activation.json && tsc -p ui/tsconfig.ui-auth-frontend.json && tsc -p ui/tsconfig.preserved-ui-config.json && tsc -p ui/tsconfig.smarthome-feedback.json && tsc -p ui/tsconfig.smarthome-touch.json && tsc -p ui/tsconfig.smarthome-presentation.json && tsc -p ui/tsconfig.smarthome-device-controls.json && tsc -p ui/tsconfig.smarthome-device-api.json && tsc -p ui/tsconfig.smarthome-device-detection.json && tsc -p ui/tsconfig.smarthome-device-config.json && tsc -p ui/tsconfig.smarthome-device-controls-browser.json && tsc -p ui/tsconfig.smarthome-custom-views.json && tsc -p ui/tsconfig.smarthome-custom-contract.json && tsc -p ui/tsconfig.smarthome-custom-config.json && tsc -p ui/tsconfig.smarthome-device-legacy.json && tsc -p ui/tsconfig.smarthome-device-aliases.json && tsc -p ui/tsconfig.smarthome-alias-config.json && tsc -p ui/tsconfig.smarthome-device-categories.json && tsc -p ui/tsconfig.smarthome-layout-editor.json && tsc -p ui/tsconfig.hosted-runtime-stop.json && tsc -p ui/tsconfig.smarthome-setup.json && tsc -p ui/tsconfig.hosted-startup-status.json && tsc -p tsconfig.eos-device-ems.json && tsc -p modules/devices/tsconfig.ems-ui.json && tsc -p ui/tsconfig.installer-lifecycle.json && tsc -p ui/tsconfig.customer-tariff.json && tsc -p ui/tsconfig.customer-tariff-ui.json && tsc -p modules/devices/tsconfig.alias-semantics.json",
222
224
  "build:installer": "npm --prefix ui/src-admin-tab run build",
223
225
  "sbom": "npm sbom --sbom-format=cyclonedx > release-manifests/unified/build-environment.cdx.json && node tools/eos-sbom-vendored.cjs",
224
- "lint:unified": "eslint -c eslint.unified.config.mjs src/lib/eosUnifiedBoundary.js src/lib/eosSessionSecurity.js src/lib/eosCookieNamespace.js src/lib/eosNewsSecurity.js src/lib/eosRolePolicy.js src/lib/eosSocketSecret.js src/lib/eosUnifiedOwnership.js src/lib/eosLicenseCore.js src/lib/eosLicensePolicy.js src/lib/eosLicenseService.js src/lib/eosLicenseTrust.js src/lib/eosLicenseHttp.js tools/eos-release-check.cjs tools/eos-prepare-publish.cjs tools/eos-release-evidence.cjs tools/eos-release-manifest.cjs tools/eos-migration-plan.cjs tools/eos-access-diagnostics.cjs tools/eos-coexistence-recovery.cjs deploy/render-ingress.cjs tools/eos-sbom-vendored.cjs src/lib/eosModuleHost.js src/lib/eosModuleHttp.js src/lib/eosModuleConfigStore.js src/lib/eosLegacyMigration.js tools/eos-tls-issuer.cjs && eslint -c modules/backup/eslint.config.mjs modules/backup/src && eslint -c ui/eslint.smarthome-activation.config.mjs ui/src-ts/runtime-executables/lib/smarthome-activation.ts && eslint -c ui/eslint.preserved-ui-config.config.mjs ui/src-ts/runtime-executables/lib/preserved-ui-config.ts && eslint -c ui/eslint.smarthome-feedback.config.mjs ui/src-ts/runtime-executables/www/smarthome-feedback.ts && eslint -c ui/eslint.smarthome-touch.config.mjs ui/src-ts/runtime-executables/www/smarthome-touch.ts && eslint -c ui/eslint.smarthome-presentation.config.mjs ui/src-ts/runtime-executables/www/smarthome-presentation.ts && eslint -c ui/eslint.smarthome-device-controls.config.mjs ui/src-ts/runtime-executables/lib/smarthome-device-controls.ts && eslint -c ui/eslint.smarthome-device-api.config.mjs ui/src-ts/runtime-executables/lib/smarthome-device-api.ts && eslint -c ui/eslint.smarthome-device-detection.config.mjs ui/src-ts/runtime-executables/lib/smarthome-device-detection.ts && eslint -c ui/eslint.smarthome-device-config.config.mjs ui/src-ts/runtime-executables/www/smarthome-device-config.ts && eslint -c ui/eslint.smarthome-device-controls-browser.config.mjs ui/src-ts/runtime-executables/www/smarthome-device-controls.ts && eslint -c ui/eslint.smarthome-custom-views.config.mjs ui/src-ts/runtime-executables/www/smarthome-custom-views.ts && eslint -c ui/eslint.smarthome-custom-contract.config.mjs ui/src-ts/runtime-executables/lib/smarthome-custom-contract.ts && eslint -c ui/eslint.smarthome-custom-config.config.mjs ui/src-ts/runtime-executables/www/smarthome-custom-config.ts && eslint -c ui/eslint.smarthome-device-legacy.config.mjs ui/src-ts/runtime-executables/lib/smarthome-device-legacy.ts && eslint -c ui/eslint.smarthome-device-aliases.config.mjs ui/src-ts/runtime-executables/lib/smarthome-device-aliases.ts && eslint -c ui/eslint.smarthome-alias-config.config.mjs ui/src-ts/runtime-executables/www/smarthome-alias-config.ts && eslint -c ui/eslint.smarthome-device-categories.config.mjs ui/src-ts/runtime-executables/www/smarthome-device-categories.ts && eslint -c ui/eslint.smarthome-layout-editor.config.mjs ui/src-ts/runtime-executables/www/smarthome-layout-editor.ts && eslint -c ui/eslint.hosted-runtime-stop.config.mjs ui/src-ts/runtime-executables/lib/hosted-runtime-stop.ts && eslint -c ui/eslint.hosted-adapter.config.mjs ui/src-ts/runtime-executables/lib/hosted-adapter.ts && eslint -c ui/eslint.smarthome-setup.config.mjs ui/src-ts/runtime-executables/www/smarthome-setup.ts && eslint -c ui/eslint.hosted-startup-status.config.mjs ui/src-ts/runtime-executables/lib/hosted-startup-status.ts && eslint -c ui/eslint.eos-session-idle.config.mjs ui/src-ts/runtime-executables/www/eos-session-idle.ts",
226
+ "lint:unified": "eslint -c eslint.unified.config.mjs src/lib/eosUnifiedBoundary.js src/lib/eosSessionSecurity.js src/lib/eosCookieNamespace.js src/lib/eosNewsSecurity.js src/lib/eosRolePolicy.js src/lib/eosSocketSecret.js src/lib/eosUnifiedOwnership.js src/lib/eosLicenseCore.js src/lib/eosLicensePolicy.js src/lib/eosLicenseService.js src/lib/eosLicenseTrust.js src/lib/eosLicenseHttp.js tools/eos-release-check.cjs tools/eos-prepare-publish.cjs tools/eos-release-evidence.cjs tools/eos-release-manifest.cjs tools/eos-migration-plan.cjs tools/eos-access-diagnostics.cjs tools/eos-coexistence-recovery.cjs deploy/render-ingress.cjs tools/eos-sbom-vendored.cjs src/lib/eosDeviceEmsPlan.js src/lib/eosDeviceEmsService.js src/lib/eosModuleHost.js src/lib/eosModuleHttp.js src/lib/eosModuleConfigStore.js src/lib/eosLegacyMigration.js tools/eos-tls-issuer.cjs && eslint -c modules/backup/eslint.config.mjs modules/backup/src && eslint -c ui/eslint.smarthome-activation.config.mjs ui/src-ts/runtime-executables/lib/smarthome-activation.ts && eslint -c ui/eslint.preserved-ui-config.config.mjs ui/src-ts/runtime-executables/lib/preserved-ui-config.ts && eslint -c ui/eslint.smarthome-feedback.config.mjs ui/src-ts/runtime-executables/www/smarthome-feedback.ts && eslint -c ui/eslint.smarthome-touch.config.mjs ui/src-ts/runtime-executables/www/smarthome-touch.ts && eslint -c ui/eslint.smarthome-presentation.config.mjs ui/src-ts/runtime-executables/www/smarthome-presentation.ts && eslint -c ui/eslint.smarthome-device-controls.config.mjs ui/src-ts/runtime-executables/lib/smarthome-device-controls.ts && eslint -c ui/eslint.smarthome-device-api.config.mjs ui/src-ts/runtime-executables/lib/smarthome-device-api.ts && eslint -c ui/eslint.smarthome-device-detection.config.mjs ui/src-ts/runtime-executables/lib/smarthome-device-detection.ts && eslint -c ui/eslint.smarthome-device-config.config.mjs ui/src-ts/runtime-executables/www/smarthome-device-config.ts && eslint -c ui/eslint.smarthome-device-controls-browser.config.mjs ui/src-ts/runtime-executables/www/smarthome-device-controls.ts && eslint -c ui/eslint.smarthome-custom-views.config.mjs ui/src-ts/runtime-executables/www/smarthome-custom-views.ts && eslint -c ui/eslint.smarthome-custom-contract.config.mjs ui/src-ts/runtime-executables/lib/smarthome-custom-contract.ts && eslint -c ui/eslint.smarthome-custom-config.config.mjs ui/src-ts/runtime-executables/www/smarthome-custom-config.ts && eslint -c ui/eslint.smarthome-device-legacy.config.mjs ui/src-ts/runtime-executables/lib/smarthome-device-legacy.ts && eslint -c ui/eslint.smarthome-device-aliases.config.mjs ui/src-ts/runtime-executables/lib/smarthome-device-aliases.ts && eslint -c ui/eslint.smarthome-alias-config.config.mjs ui/src-ts/runtime-executables/www/smarthome-alias-config.ts && eslint -c ui/eslint.smarthome-device-categories.config.mjs ui/src-ts/runtime-executables/www/smarthome-device-categories.ts && eslint -c ui/eslint.smarthome-layout-editor.config.mjs ui/src-ts/runtime-executables/www/smarthome-layout-editor.ts && eslint -c ui/eslint.hosted-runtime-stop.config.mjs ui/src-ts/runtime-executables/lib/hosted-runtime-stop.ts && eslint -c ui/eslint.hosted-adapter.config.mjs ui/src-ts/runtime-executables/lib/hosted-adapter.ts && eslint -c ui/eslint.smarthome-setup.config.mjs ui/src-ts/runtime-executables/www/smarthome-setup.ts && eslint -c ui/eslint.hosted-startup-status.config.mjs ui/src-ts/runtime-executables/lib/hosted-startup-status.ts && eslint -c ui/eslint.eos-session-idle.config.mjs ui/src-ts/runtime-executables/www/eos-session-idle.ts && eslint -c modules/devices/eslint.hosted.config.mjs modules/devices/admin/ems-assignment.js && eslint -c ui/eslint.installer-lifecycle.config.mjs ui/src-ts/runtime-executables/lib/installer-lifecycle.ts && eslint -c ui/eslint.customer-tariff.config.mjs ui/src-ts/runtime-executables/lib/customer-tariff.ts && eslint -c ui/eslint.customer-tariff-ui.config.mjs ui/src-ts/runtime-executables/www/customer-tariff.ts && eslint -c modules/devices/eslint.hosted.config.mjs modules/devices/lib/deviceAliasSemantics.js",
225
227
  "test:modules": "node --test test/eos-hosted-eebus-bridge.test.cjs test/eos-module*.test.cjs test/eos-discovery.test.cjs modules/devices/test/*.test.* modules/eebus/test/*.test.* && node --test modules/eebus/test/config.js modules/eebus/test/cls-control-parser.js modules/eebus/test/nexowatt-bridge.js modules/eebus/test/implementation-result-order.js && node --test modules/backup/test/*.test.cjs",
226
228
  "build:modules": "tsc -p modules/eebus/tsconfig.json && tsc -p modules/backup/tsconfig.json"
227
229
  },
@@ -235,7 +237,7 @@
235
237
  },
236
238
  "nexowattReleasePolicy": {
237
239
  "distTag": "next",
238
- "purpose": "Isolate EOS browser sessions from ioBroker Admin, stop automatic foreign ACL and metadata maintenance, and preserve standard Backitup coexistence; see START_HIER_9.0.17.md."
240
+ "purpose": "Device commissioning with preserved customer configuration, automatic Alias V1 EMS mappings and explicit energy-flow roles; see START_HIER_9.0.18.md."
239
241
  },
240
242
  "publisher": "NexoWatt",
241
243
  "nexowattUpstream": {
@@ -246,6 +248,6 @@
246
248
  "purpose": "Admin 8 migration baseline; EOS modifications and security backports are tracked separately."
247
249
  },
248
250
  "nexowattRelease": {
249
- "purpose": "Isolate EOS browser sessions from ioBroker Admin, stop automatic foreign ACL and metadata maintenance, and preserve standard Backitup coexistence; see START_HIER_9.0.17.md."
251
+ "purpose": "Device commissioning with preserved customer configuration, automatic Alias V1 EMS mappings and explicit energy-flow roles; see START_HIER_9.0.18.md."
250
252
  }
251
253
  }