iobroker.eos-admin 9.0.33 → 9.0.34
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 +10 -11
- package/README.md +7 -9
- package/adminWww/.vite/manifest.json +233 -224
- package/adminWww/NEXOWATT_EOS_FRONTEND_MANIFEST.json +13897 -13887
- package/adminWww/assets/AccessTime-CuR73YC3.js +1 -0
- package/adminWww/assets/{AdapterUpdateDialog-DBUqmmyD.js → AdapterUpdateDialog-5L75o18m.js} +5 -5
- package/adminWww/assets/{Adapters-dDEp7o5h.js → Adapters-FcghjF7E.js} +5 -5
- package/adminWww/assets/ConfigManager-BnHarBfH.js +1 -0
- package/adminWww/assets/Enums-BjLbLLQL.js +92 -0
- package/adminWww/assets/Fields-DDE1hVOa.js +1 -0
- package/adminWww/assets/Files-CDjnR4q6.js +1 -0
- package/adminWww/assets/{Hosts-CwU1LujG.js → Hosts-CJKQaNrD.js} +6 -6
- package/adminWww/assets/Instances-DZNl369k.js +4 -0
- package/adminWww/assets/Intro-CjAmMGDB.js +2 -0
- package/adminWww/assets/KeyboardArrowRight-ifvmV1ZL.js +1 -0
- package/adminWww/assets/{Logs-B5SpNqHq.js → Logs-rUAV7SwM.js} +2 -2
- package/adminWww/assets/MoreHoriz-CS7nODK8.js +1 -0
- package/adminWww/assets/{Objects-COg_cFkz.js → Objects-CqOH6rT_.js} +4 -4
- package/adminWww/assets/Overview-BOtXqsMy.js +3 -0
- package/adminWww/assets/Pageview-wzrLQZ-j.js +1 -0
- package/adminWww/assets/PersonOff-YtHcY0sV.js +1 -0
- package/adminWww/assets/Star-D8VNXawT.js +1 -0
- package/adminWww/assets/State-C8ncThop.js +1 -0
- package/adminWww/assets/UsedResources-lUYJqy4F.js +2 -0
- package/adminWww/assets/Users-CK1Cax82.js +1 -0
- package/adminWww/assets/ViewCompact-D7bHgn99.js +1 -0
- package/adminWww/assets/ViewSidebar-CjClbCI5.js +1 -0
- package/adminWww/assets/WifiTethering-DJ9VO12W.js +1 -0
- package/adminWww/assets/{bootstrap-Dwfxhm2V.js → bootstrap-CC0Qr-kr.js} +25 -25
- package/adminWww/assets/date-fns-BtR4dG_j.js +1 -0
- package/adminWww/assets/en-US-BjjaEI6N.js +1 -0
- package/adminWww/assets/{hostInit-3BbTwhaZ.js → hostInit-DqGL6nY8.js} +1 -1
- package/adminWww/assets/icons-material-07rWS63O.js +1 -0
- package/adminWww/assets/{index-nddph2Sl.js → index-BhhkToP2.js} +2 -2
- package/adminWww/assets/{installSVGRenderer-CPDIwFAL.js → installSVGRenderer-B4-7lSQZ.js} +1 -1
- package/adminWww/assets/isSameWeek-WMSJR5Qs.js +1 -0
- package/adminWww/assets/locale-DN6Bdkdt.js +1 -0
- package/adminWww/assets/{mf-entry-bootstrap-0-d1f0f40f.js → mf-entry-bootstrap-0-1afd2287.js} +2 -2
- package/adminWww/assets/sentry-CPzCHrwe.js +1 -0
- package/adminWww/assets/setYear-DDSuW45e.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.34.js +12 -0
- package/adminWww/remoteEntry.js +1 -1
- package/build/lib/eosDeviceEmsPlan.js +285 -9
- package/build/lib/eosDeviceEmsPlan.js.map +1 -1
- package/build/lib/eosDeviceEmsService.js +29 -2
- package/build/lib/eosDeviceEmsService.js.map +1 -1
- package/docs/README.md +2 -2
- package/docs/reports/unified-9.0.34/PRUEFBERICHT.md +40 -0
- package/docs/reports/unified-9.0.34/PRUEFERGEBNISSE.json +112 -0
- package/docs/reports/unified-9.0.34/raw/INDEX.json +137 -0
- package/docs/reports/unified-9.0.34/raw/backend.log +5 -0
- package/docs/reports/unified-9.0.34/raw/dashboard-interval.json +108 -0
- package/docs/reports/unified-9.0.34/raw/fixtures-verification.log +44 -0
- package/docs/reports/unified-9.0.34/raw/frontend.log +152 -0
- package/docs/reports/unified-9.0.34/raw/installer.log +26 -0
- package/docs/reports/unified-9.0.34/raw/lint.log +45 -0
- package/docs/reports/unified-9.0.34/raw/mira-dashboard-browser.json +1 -0
- package/docs/reports/unified-9.0.34/raw/mira-devices-browser.log +9 -0
- package/docs/reports/unified-9.0.34/raw/mira-memory-process.json +379 -0
- package/docs/reports/unified-9.0.34/raw/modules.log +5 -0
- package/docs/reports/unified-9.0.34/raw/node22-mira.log +216 -0
- package/docs/reports/unified-9.0.34/raw/node22-protocol-to-ems.log +8 -0
- package/docs/reports/unified-9.0.34/raw/node22-tests-final.log +17850 -0
- package/docs/reports/unified-9.0.34/raw/node22-version.log +1 -0
- package/docs/reports/unified-9.0.34/raw/node24-mira.log +40 -0
- package/docs/reports/unified-9.0.34/raw/node24-protocol-to-ems.log +6 -0
- package/docs/reports/unified-9.0.34/raw/node24-tests-final.log +2973 -0
- package/docs/reports/unified-9.0.34/raw/node24-version.log +1 -0
- package/docs/reports/unified-9.0.34/raw/protocol-to-ems.cjs +364 -0
- package/docs/reports/unified-9.0.34/raw/release-metadata.log +13 -0
- package/docs/reports/unified-9.0.34/raw/sbom.log +8 -0
- package/docs/reports/unified-9.0.34/raw/typecheck.log +5 -0
- package/docs/reports/unified-9.0.34/raw/ui-runtime.log +8 -0
- package/docs/start/START_HIER_9.0.34.md +25 -0
- package/io-package.json +8 -8
- package/modules/devices/admin/alias-contract-v1.json +22 -0
- package/modules/devices/admin/ems-assignment.js +6 -1
- package/modules/devices/admin/host-bridge.js +2 -0
- package/modules/devices/admin/index.html +16 -0
- package/modules/devices/admin/index_m.js +168 -9
- package/modules/devices/admin/templates.json +976 -0
- package/modules/devices/checks/emsAssignment.check.js +52 -2
- package/modules/devices/index.js +5 -1
- package/modules/devices/lib/alias-contract-v1.json +22 -0
- package/modules/devices/lib/deviceRuntime.js +17 -7
- package/modules/devices/lib/drivers/modbus.js +1 -1
- package/modules/devices/lib/drivers/modbusRtuBus.js +7 -1
- package/modules/devices/lib/drivers/ovumMira.js +148 -0
- package/modules/devices/lib/ovumMiraAliases.js +61 -0
- package/modules/devices/lib/ovumMiraConnection.js +32 -0
- package/modules/devices/lib/templates.json +976 -0
- package/modules/devices/test/aliasContractV1.test.js +4 -4
- package/modules/devices/test/deviceAliasSemantics.test.js +2 -2
- package/modules/devices/test/fixtures/approved-additive-templates.json +3 -1
- package/modules/devices/test/ovumMiraPairing.test.js +76 -0
- package/modules/devices/test/ovumMiraTemplates.test.js +110 -0
- package/modules/devices/test/ovumMiraTransport.test.js +162 -0
- package/package.json +6 -4
- package/release-manifests/unified/build-environment.cdx.json +6 -6
- package/release-manifests/unified/files.json +155 -112
- 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 +83 -0
- package/release-manifests/unified/runtime.cdx.json +27 -27
- package/release-manifests/unified/validation.json +15 -15
- package/tools/eos-release-manifest.cjs +1 -1
- package/ui/ems/consumers/ovum-mira.js +164 -0
- package/ui/ems/modules/para14a.js +3 -2
- package/ui/ems/modules/stage-a-diagnostics.js +4 -2
- package/ui/ems/modules/thermal-control.js +91 -10
- package/ui/io-package.json +5 -1
- package/ui/lib/installer-lifecycle.js +11 -2
- package/ui/main.js +37 -7
- package/ui/package.json +1 -1
- package/ui/www/app.js +32 -14
- package/ui/www/ems-apps.js +28 -9
- package/ui/www/licenses/smarthome-markdown-components.json +156 -156
- package/ui/www/manifest.webmanifest +2 -2
- package/adminWww/assets/AddLink-0L0E-LsA.js +0 -1
- package/adminWww/assets/ColorLens-DA51K29x.js +0 -1
- package/adminWww/assets/ConfigManager-DbqTWi2N.js +0 -1
- package/adminWww/assets/Enums-DjldGElU.js +0 -92
- package/adminWww/assets/Fields-0GsPCJeU.js +0 -1
- package/adminWww/assets/FileCopy-B16lEuur.js +0 -1
- package/adminWww/assets/Files-COnUtEbg.js +0 -1
- package/adminWww/assets/Instances-CUX5mxMQ.js +0 -4
- package/adminWww/assets/Intro-BhQmHn3A.js +0 -2
- package/adminWww/assets/Lens-9lkeoWGk.js +0 -1
- package/adminWww/assets/LinearScale-Be5h2beh.js +0 -1
- package/adminWww/assets/North-C2whbHM-.js +0 -1
- package/adminWww/assets/Overview-CitzUjBF.js +0 -3
- package/adminWww/assets/PersonOff-DqBq0Fho.js +0 -1
- package/adminWww/assets/PlaylistAdd-O8k92YBd.js +0 -1
- package/adminWww/assets/State-D5ljzf-T.js +0 -1
- package/adminWww/assets/UsedResources-BY_NF2wB.js +0 -2
- package/adminWww/assets/Users-Cu93_-VF.js +0 -1
- package/adminWww/assets/date-fns-C1dqkno9.js +0 -1
- package/adminWww/assets/icons-material-DjqX0l_7.js +0 -1
- package/adminWww/assets/isSameWeek-Crh37s7U.js +0 -1
- package/adminWww/assets/isWithinInterval-Bo1WiDfq.js +0 -1
- package/adminWww/assets/locale-hLcz_Xh2.js +0 -1
- package/adminWww/assets/sentry-DwQQLI7N.js +0 -1
- package/adminWww/assets/startOfWeek-DJph8SIW.js +0 -1
- package/adminWww/remoteEntry-eos-9.0.33.js +0 -12
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026 NexoWatt. All rights reserved.
|
|
3
|
+
* Confidential and Proprietary.
|
|
4
|
+
* Use, modification or distribution without express written permission is prohibited.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
|
+
*
|
|
9
|
+
* Quelle: src-ts/runtime-executables/ems/consumers/ovum-mira.ts
|
|
10
|
+
* Quell-Hash: sha256:17cf0153c25d5b054aeab130c8f881a243a8649826396e999a0e5a1076f78640
|
|
11
|
+
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
|
+
*
|
|
13
|
+
* Zweck:
|
|
14
|
+
* Diese JavaScript-Datei ist das ausführbare Build-Artefakt für ems/consumers/ovum-mira.js.
|
|
15
|
+
* Die fachliche Bearbeitung erfolgt ab 0.7.131 in der TypeScript-Quelle.
|
|
16
|
+
* Ab 0.7.132 sind doppelte Legacy-JS-Bäume wie .nwcore entfernt.
|
|
17
|
+
*
|
|
18
|
+
* Pflege-Regel:
|
|
19
|
+
* 1. Änderung zuerst in src-ts/runtime-executables/ vornehmen.
|
|
20
|
+
* 2. npm run sync:ts-runtime-executables ausführen.
|
|
21
|
+
* 3. npm run test:runtime-executables prüfen.
|
|
22
|
+
*/
|
|
23
|
+
'use strict';
|
|
24
|
+
|
|
25
|
+
const { withActuatorShadowContext, priorityForOwner } = require('../services/actuator-shadow-arbiter');
|
|
26
|
+
const { liveSafetyEnvelope, evaluateFlexibleLoadRequest, commitFlexibleLoadDecision } = require('../services/safety-envelope');
|
|
27
|
+
|
|
28
|
+
const MAX_READING_AGE_MS = 30000;
|
|
29
|
+
|
|
30
|
+
function miraBinding(row, powerId, bindings, slot) {
|
|
31
|
+
const ending = '.aliases.v1.ctrl.pvStatus';
|
|
32
|
+
if (typeof row.miraPvStatusId !== 'string' || !row.miraPvStatusId.endsWith(ending)) return null;
|
|
33
|
+
const base = row.miraPvStatusId.slice(0, -ending.length);
|
|
34
|
+
if (!base || typeof powerId !== 'string' || !powerId.endsWith('.aliases.v1.r.power')
|
|
35
|
+
|| row.miraPowerTargetId !== base + '.aliases.v1.ctrl.pvPowerTargetW'
|
|
36
|
+
|| row.miraPvStatusReadId !== base + '.aliases.v1.r.pvStatus'
|
|
37
|
+
|| row.miraPowerTargetReadId !== base + '.aliases.v1.r.pvPowerTargetW') return null;
|
|
38
|
+
const hsm = bindings?.[base];
|
|
39
|
+
const wpmBase = powerId.slice(0, -'.aliases.v1.r.power'.length);
|
|
40
|
+
const wpm = bindings?.[wpmBase];
|
|
41
|
+
if (row._eosDevice?.baseId !== base || row._eosDevice?.mode !== 'mira'
|
|
42
|
+
|| hsm?.deviceTemplateId !== 'heat.ovum.mira.hsm' || hsm?.activationRequested !== true
|
|
43
|
+
|| !Number.isSafeInteger(hsm.miraCommissionedMaxW) || hsm.miraCommissionedMaxW <= 0
|
|
44
|
+
|| hsm.miraCommissionedMaxW > 10000000 || wpm?.target !== 'consumer' + slot + 'Power') return null;
|
|
45
|
+
return { base, maxW: hsm.miraCommissionedMaxW, mode: row.miraPvStatusId, watts: row.miraPowerTargetId,
|
|
46
|
+
modeRead: row.miraPvStatusReadId, wattsRead: row.miraPowerTargetReadId };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
async function registerMiraDevice(dp, d) {
|
|
50
|
+
if (!dp || !d.miraBinding || d.miraKeys || d.miraConflict || !d.miraSourcesConfirmed || !d.enabled) return;
|
|
51
|
+
const keys = {};
|
|
52
|
+
for (const [role, direction] of [['mode','out'], ['watts','out'], ['modeRead','in'], ['wattsRead','in']]) {
|
|
53
|
+
const key = 'th.' + d.id + '.mira.' + role;
|
|
54
|
+
await dp.upsert({ key, objectId: d.miraBinding[role], direction, unit: role.startsWith('watts') ? 'W' : '',
|
|
55
|
+
dataType: 'number', deadband: 0 });
|
|
56
|
+
keys[role] = key;
|
|
57
|
+
}
|
|
58
|
+
d.miraKeys = keys;
|
|
59
|
+
d.miraCommands = {};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Read the original controller sample. An outgoing state or a device heartbeat is not register feedback.
|
|
63
|
+
function miraSample(dp, key, now) {
|
|
64
|
+
const ts = key && dp.getVerifiedMeasurementTimestampMs(key, now);
|
|
65
|
+
if (!Number.isFinite(ts) || ts <= 0 || ts > now || now - ts > MAX_READING_AGE_MS) return null;
|
|
66
|
+
const value = dp.getNumber(key, null);
|
|
67
|
+
return typeof value === 'number' && Number.isFinite(value) ? { value, ts } : null;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function currentRegister(d, role, sample) {
|
|
71
|
+
const last = d.miraCommands[role];
|
|
72
|
+
return sample && (!last || sample.ts >= last.ts) ? sample.value : null;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// One asynchronous device command per tick. Repeated writes use the existing bounded actuator contract.
|
|
76
|
+
async function requestRegister(thermal, d, role, value, sample, now) {
|
|
77
|
+
const id = 'thermal:' + d.id + ':mira:' + role;
|
|
78
|
+
const contract = thermal._actuatorContract;
|
|
79
|
+
const cfg = thermal._contractCfg(d, true);
|
|
80
|
+
const decision = contract.prepare(id, value, now, cfg);
|
|
81
|
+
const actual = currentRegister(d, role, sample);
|
|
82
|
+
const last = d.miraCommands[role];
|
|
83
|
+
if (actual === value && (!last || value === last.value)) return contract.confirmFromReadback(id, value, actual, true, now);
|
|
84
|
+
if (!decision.allowed) return contract.result(id, now);
|
|
85
|
+
const key = d.miraKeys[role];
|
|
86
|
+
const owner = 'thermal.' + d.id;
|
|
87
|
+
const result = await withActuatorShadowContext(thermal.adapter, {
|
|
88
|
+
owner, module: 'thermalControl', priority: priorityForOwner(owner), leaseMs: 20000,
|
|
89
|
+
enforceAuthority: true, releaseAuthority: role === 'mode' && value === 0, kind: 'thermal-mira',
|
|
90
|
+
}, () => thermal.dp.writeNumber(key, value, false));
|
|
91
|
+
// Includes uncertain transport failures: a late pre-command sample must never authorize boost.
|
|
92
|
+
d.miraCommands[role] = { value, ts: now };
|
|
93
|
+
return contract.complete(id, value, result === true, null, actual, now, cfg);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function miraSafetyGrant(thermal, d, requestedW, measuredW, now) {
|
|
97
|
+
const adapter = thermal.adapter;
|
|
98
|
+
// The productive EMS always supplies a generation and independent physical NVP measurements.
|
|
99
|
+
if (!adapter?._emsSafetyCycle || measuredW === null || requestedW <= 0) return null;
|
|
100
|
+
const envelope = liveSafetyEnvelope(adapter, thermal.dp, { now, generation: adapter._emsSafetyCycle.generation });
|
|
101
|
+
if (!envelope || !envelope.valid) return null;
|
|
102
|
+
return evaluateFlexibleLoadRequest(adapter, {
|
|
103
|
+
key: 'thermal:' + d.id, app: 'thermal', deviceKey: d.id, requestedW, currentActualW: measuredW,
|
|
104
|
+
currentActualFresh: true, phaseCount: Math.max(1, Math.min(3, Number(envelope.phase?.requiredCount) || 3)),
|
|
105
|
+
voltageV: Number(envelope.phase?.voltageV) || 230, deviceCapW: d.maxPowerW, now,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
async function regulateMira(thermal, d, options) {
|
|
110
|
+
const now = Date.now();
|
|
111
|
+
const measured = miraSample(thermal.dp, d.pWKey, now);
|
|
112
|
+
const measuredW = measured && measured.value >= 0 ? measured.value : null;
|
|
113
|
+
const result = { applied: false, targetW: 0, usedW: measuredW ?? 0, owned: false, status: 'mira_not_commissioned' };
|
|
114
|
+
if (!d.miraKeys || !d.miraSourcesConfirmed || !d.enabled || d.miraConflict) return result;
|
|
115
|
+
// During manual operation relinquish only a boost that this worker had actually requested.
|
|
116
|
+
if (options.manual && !d.miraBoostIssued) return { ...result, status: 'mira_manual' };
|
|
117
|
+
const mode = miraSample(thermal.dp, d.miraKeys.modeRead, now);
|
|
118
|
+
const watts = miraSample(thermal.dp, d.miraKeys.wattsRead, now);
|
|
119
|
+
const actualMode = currentRegister(d, 'mode', mode);
|
|
120
|
+
const actualWatts = currentRegister(d, 'watts', watts);
|
|
121
|
+
const hasFeedback = !!mode && [0, 1, 2].includes(mode.value) && !!watts && Number.isInteger(watts.value) && watts.value >= 0;
|
|
122
|
+
const requestedW = Math.floor(Math.max(0, Math.min(d.maxPowerW, d.miraBinding.maxW, options.requestedW)));
|
|
123
|
+
const grant = hasFeedback && !options.manual && !thermal._isPara14aActive()
|
|
124
|
+
? miraSafetyGrant(thermal, d, requestedW, measuredW, now) : null;
|
|
125
|
+
const allowedW = Math.max(0, Math.floor(Math.min(requestedW, grant?.allowedW || 0)));
|
|
126
|
+
const lastWatts = d.miraCommands.watts;
|
|
127
|
+
const lastMode = d.miraCommands.mode;
|
|
128
|
+
const boostPossible = actualMode === 1 || (actualMode === null && lastMode?.value === 1);
|
|
129
|
+
const needsReduction = boostPossible && Math.max(watts?.value || 0, lastWatts?.value || 0) > allowedW;
|
|
130
|
+
let r;
|
|
131
|
+
if (!allowedW || needsReduction) {
|
|
132
|
+
// 0 returns temperature control to MIRA. It neither stops the compressor nor demonstrates a load reduction.
|
|
133
|
+
r = await requestRegister(thermal, d, 'mode', 0, mode, now);
|
|
134
|
+
if (r.confirmed) d.miraBoostIssued = false;
|
|
135
|
+
result.status = r.confirmed ? 'mira_local_control' : 'mira_neutral_' + r.status;
|
|
136
|
+
if (requestedW > 0 && (!hasFeedback || measuredW === null)) result.status = 'mira_missing_feedback_' + result.status;
|
|
137
|
+
} else {
|
|
138
|
+
// A smaller confirmed target may activate while the PV grant is increasing. Never enable a target
|
|
139
|
+
// above the current grant. Updating an already active target still requires fresh HSM readback.
|
|
140
|
+
const staged = actualMode !== 1 && lastWatts?.value > 0 && lastWatts.value <= allowedW;
|
|
141
|
+
const desired = staged ? lastWatts.value : allowedW;
|
|
142
|
+
result.targetW = desired;
|
|
143
|
+
if (actualWatts !== desired || (lastWatts && lastWatts.value !== desired)) {
|
|
144
|
+
r = await requestRegister(thermal, d, 'watts', desired, watts, now);
|
|
145
|
+
result.status = 'mira_target_' + r.status;
|
|
146
|
+
} else {
|
|
147
|
+
d.miraBoostIssued = true;
|
|
148
|
+
r = await requestRegister(thermal, d, 'mode', 1, mode, now);
|
|
149
|
+
result.owned = r.confirmed && !options.boost;
|
|
150
|
+
result.applied = r.confirmed;
|
|
151
|
+
result.status = r.confirmed ? 'mira_pv_readback' : 'mira_pv_' + r.status;
|
|
152
|
+
}
|
|
153
|
+
// Reserve the permitted demand while the two register writes are in flight. Neither the grant
|
|
154
|
+
// nor the MIRA register echoes is promoted to a physical reduction in accepted-power-effects.
|
|
155
|
+
commitFlexibleLoadDecision(thermal.adapter, grant, true);
|
|
156
|
+
result.usedW = Math.max(result.usedW, desired);
|
|
157
|
+
}
|
|
158
|
+
result.accepted = r.accepted;
|
|
159
|
+
result.applied = result.applied || (allowedW === 0 && r.confirmed);
|
|
160
|
+
await thermal._publishThermalContract(d, 'thermal.' + d.id, r);
|
|
161
|
+
return result;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
module.exports = { miraBinding, registerMiraDevice, regulateMira, miraSample };
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
8
|
*
|
|
9
9
|
* Quelle: src-ts/runtime-executables/ems/modules/para14a.ts
|
|
10
|
-
* Quell-Hash: sha256:
|
|
10
|
+
* Quell-Hash: sha256:9f7a9f836cb28da9b5419fc822da6b223f48f6c74421539f1448106af11998e1
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -1031,7 +1031,8 @@ class Para14aModule extends BaseModule {
|
|
|
1031
1031
|
const thermalCfg = root.thermal && typeof root.thermal === 'object' ? root.thermal : {};
|
|
1032
1032
|
const rows = Array.isArray(thermalCfg.devices) ? thermalCfg.devices : [];
|
|
1033
1033
|
rows.forEach((row, index) => {
|
|
1034
|
-
|
|
1034
|
+
// The MIRA PV request delegates control back to its local heat curve and cannot promise a hard cap.
|
|
1035
|
+
if (!row || row.enabled !== true || row.ovumMira === true) return;
|
|
1035
1036
|
const slot = safeSlot(row.slot ?? row.consumerSlot, index + 1);
|
|
1036
1037
|
const slotCfg = flowConsumers[slot - 1] && typeof flowConsumers[slot - 1] === 'object'
|
|
1037
1038
|
? flowConsumers[slot - 1]
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
8
|
*
|
|
9
9
|
* Quelle: src-ts/runtime-executables/ems/modules/stage-a-diagnostics.ts
|
|
10
|
-
* Quell-Hash: sha256:
|
|
10
|
+
* Quell-Hash: sha256:0ca3286ca23dbb9360f7cde905e26b38e36ddab99221175fffb4d6d9ad36e544
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -47,7 +47,7 @@ const ACTUATOR_FIELDS = new Set([
|
|
|
47
47
|
'e3dcPowerLimitsUsedObjectId', 'e3dcMaxChargePowerObjectId',
|
|
48
48
|
'e3dcMaxDischargePowerObjectId', 'setSignedPowerId',
|
|
49
49
|
'setChargePowerId', 'setDischargePowerId', 'switchWriteId', 'setpointWriteId',
|
|
50
|
-
'sgReadyAWriteId', 'sgReadyBWriteId', 'sgReady1WriteId', 'sgReady2WriteId',
|
|
50
|
+
'sgReadyAWriteId', 'sgReadyBWriteId', 'sgReady1WriteId', 'sgReady2WriteId', 'miraPvStatusId', 'miraPowerTargetId',
|
|
51
51
|
'writeId', 'writeObjectId', 'writeDp', 'dpWriteId',
|
|
52
52
|
'stageWriteId', 'setpointId', 'outputObjectId', 'commandObjectId', 'commandStateId',
|
|
53
53
|
'enableId', 'startWriteId', 'stopWriteId', 'runWriteId', 'startObjectId',
|
|
@@ -89,6 +89,8 @@ function ownerFromPath(path, row) {
|
|
|
89
89
|
return `storageFarm.${rowId || raw}`;
|
|
90
90
|
if (lower.includes('storage'))
|
|
91
91
|
return `storage.${rowId || raw}`;
|
|
92
|
+
if (lower.includes('thermal') && row?.ovumMira === true && Number.isInteger(row.slot))
|
|
93
|
+
return `thermal.c${row.slot}`;
|
|
92
94
|
if (lower.includes('thermal'))
|
|
93
95
|
return `thermal.${rowId || raw}`;
|
|
94
96
|
if (lower.includes('heatingrod'))
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
8
|
*
|
|
9
9
|
* Quelle: src-ts/runtime-executables/ems/modules/thermal-control.ts
|
|
10
|
-
* Quell-Hash: sha256:
|
|
10
|
+
* Quell-Hash: sha256:22a3be98230f58eece31013022c5f131d8e066abec396596b0ee8b2eaf687ff2
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
const { BaseModule } = require('./base');
|
|
77
77
|
const { resolveThermalStrategyOverlay } = require('../services/operating-strategy-runtime');
|
|
78
78
|
const { applySetpoint } = require('../consumers');
|
|
79
|
+
const { miraBinding, registerMiraDevice, regulateMira, miraSample } = require('../consumers/ovum-mira');
|
|
79
80
|
const { withActuatorShadowContext, priorityForOwner } = require('../services/actuator-shadow-arbiter');
|
|
80
81
|
const { ActuatorCommandContract } = require('../services/actuator-command-contract');
|
|
81
82
|
const { recordAcceptedPowerTarget } = require('../services/accepted-power-effects');
|
|
@@ -291,10 +292,13 @@ class ThermalControlModule extends BaseModule {
|
|
|
291
292
|
const modeRaw = String(r.mode || 'pvAuto').trim().toLowerCase();
|
|
292
293
|
const mode = (modeRaw === 'manual' || modeRaw === 'off') ? modeRaw : 'pvAuto';
|
|
293
294
|
|
|
294
|
-
const
|
|
295
|
+
const ovumMira = r.ovumMira === true;
|
|
296
|
+
const type = ovumMira ? 'power' : normalizeType(r.type || r.deviceType || r.kind);
|
|
295
297
|
const profile = normalizeProfile(r.profile, type);
|
|
296
298
|
|
|
297
|
-
const maxPowerW =
|
|
299
|
+
const maxPowerW = ovumMira
|
|
300
|
+
? (Number.isSafeInteger(r.maxPowerW) && r.maxPowerW > 0 && r.maxPowerW <= 2147483647 ? r.maxPowerW : 0)
|
|
301
|
+
: clamp(num(r.maxPowerW, 2500), 0, 1e12);
|
|
298
302
|
const startSurplusW = clamp(num(r.startSurplusW, 800), 0, 1e12);
|
|
299
303
|
const stopSurplusW = clamp(num(r.stopSurplusW, 300), 0, 1e12);
|
|
300
304
|
const minOnSec = clamp(num(r.minOnSec, 300), 0, 86400);
|
|
@@ -306,7 +310,7 @@ class ThermalControlModule extends BaseModule {
|
|
|
306
310
|
if (slotTypeRaw === 'heatingrod' || slotTypeRaw === 'heating_rod' || slotTypeRaw === 'heating-rod' || slotTypeRaw === 'heizstab' || slotTypeRaw === 'rod' || slotTypeRaw === 'immersion') {
|
|
307
311
|
continue;
|
|
308
312
|
}
|
|
309
|
-
const ctrl = (slotCfg.ctrl && typeof slotCfg.ctrl === 'object') ? slotCfg.ctrl : {};
|
|
313
|
+
const ctrl = (!ovumMira && slotCfg.ctrl && typeof slotCfg.ctrl === 'object') ? slotCfg.ctrl : {};
|
|
310
314
|
|
|
311
315
|
const name = String(r.name || slotCfg.name || '').trim() || `Thermal ${slot}`;
|
|
312
316
|
|
|
@@ -379,6 +383,9 @@ class ThermalControlModule extends BaseModule {
|
|
|
379
383
|
maxRetries,
|
|
380
384
|
faultLockSec,
|
|
381
385
|
|
|
386
|
+
ovumMira,
|
|
387
|
+
miraSourcesConfirmed: ovumMira && maxPowerW > 0 && r.miraSourcesConfirmed === true,
|
|
388
|
+
miraBinding: ovumMira ? miraBinding(r, powerId, this.adapter.config.eosDeviceEms?.bindings, slot) : null,
|
|
382
389
|
powerId,
|
|
383
390
|
switchWriteId,
|
|
384
391
|
setpointWriteId,
|
|
@@ -412,6 +419,14 @@ class ThermalControlModule extends BaseModule {
|
|
|
412
419
|
return String(a.name || '').localeCompare(String(b.name || ''));
|
|
413
420
|
});
|
|
414
421
|
|
|
422
|
+
// A hydraulic module represents one system. Ambiguous control assignments cannot write.
|
|
423
|
+
const miraOwners = new Map();
|
|
424
|
+
for (const d of out) {
|
|
425
|
+
if (!d.enabled || !d.miraSourcesConfirmed || !d.miraBinding) continue;
|
|
426
|
+
const previous = miraOwners.get(d.miraBinding.base);
|
|
427
|
+
if (previous) previous.miraConflict = d.miraConflict = true;
|
|
428
|
+
else miraOwners.set(d.miraBinding.base, d);
|
|
429
|
+
}
|
|
415
430
|
this._devices = out;
|
|
416
431
|
}
|
|
417
432
|
|
|
@@ -624,6 +639,8 @@ const mk = async (id, name, type, role, unit = undefined) => {
|
|
|
624
639
|
d.pWKey = k;
|
|
625
640
|
}
|
|
626
641
|
|
|
642
|
+
if (d.ovumMira) await registerMiraDevice(this.dp, d);
|
|
643
|
+
|
|
627
644
|
// DP mapping (actuation)
|
|
628
645
|
if (this.dp && d.switchWriteId) {
|
|
629
646
|
const k = `th.${d.id}.en`;
|
|
@@ -667,9 +684,28 @@ const mk = async (id, name, type, role, unit = undefined) => {
|
|
|
667
684
|
if (!Array.isArray(this._devices) || !this._devices.length) this._buildDevicesFromConfig();
|
|
668
685
|
const failures = [];
|
|
669
686
|
let attempted = 0;
|
|
687
|
+
let miraReleases = 0;
|
|
688
|
+
let miraMeasuredW = 0;
|
|
670
689
|
|
|
671
690
|
for (const d of this._devices || []) {
|
|
672
691
|
try {
|
|
692
|
+
if (d.ovumMira) {
|
|
693
|
+
await registerMiraDevice(this.dp, d);
|
|
694
|
+
if (!d.miraKeys) continue;
|
|
695
|
+
const mode = String(this.dp.getRaw(d.userModeKey, '') || '').toLowerCase();
|
|
696
|
+
const manual = ['manual', 'manuell'].includes(mode) || ((!mode || mode === 'inherit') && d.mode === 'manual')
|
|
697
|
+
|| this.dp.getBoolean(d.userEnabledKey, true) === false || this._readOverrideForDevice(d, Date.now()).manualActive;
|
|
698
|
+
if (manual && !d.miraBoostIssued) continue;
|
|
699
|
+
attempted++;
|
|
700
|
+
miraReleases++;
|
|
701
|
+
const release = await regulateMira(this, d, { requestedW: 0 });
|
|
702
|
+
miraMeasuredW += release.usedW;
|
|
703
|
+
if (!release.applied) failures.push(d.id + ':' + release.status);
|
|
704
|
+
await this._setStateIfChanged(`thermal.devices.${d.id}.applied`, release.applied);
|
|
705
|
+
await this._setStateIfChanged(`thermal.devices.${d.id}.targetW`, 0);
|
|
706
|
+
await this._setStateIfChanged(`thermal.devices.${d.id}.status`, release.status);
|
|
707
|
+
continue;
|
|
708
|
+
}
|
|
673
709
|
if (this.dp && typeof this.dp.upsert === 'function') {
|
|
674
710
|
if (d.switchWriteId && !d.enableKey) {
|
|
675
711
|
d.enableKey = `th.${d.id}.en`;
|
|
@@ -731,12 +767,15 @@ const mk = async (id, name, type, role, unit = undefined) => {
|
|
|
731
767
|
}
|
|
732
768
|
}
|
|
733
769
|
try {
|
|
734
|
-
await this._setStateIfChanged('thermal.summary.appliedTotalW',
|
|
770
|
+
await this._setStateIfChanged('thermal.summary.appliedTotalW', Math.round(miraMeasuredW));
|
|
735
771
|
await this._setStateIfChanged('thermal.summary.budgetUsedW', 0);
|
|
736
|
-
|
|
772
|
+
const status = miraReleases ? (failures.length ? 'module-disabled-release-pending' : 'module-disabled-mira-local-control')
|
|
773
|
+
: (attempted ? 'module-disabled-safe-stop' : 'module-disabled-no-actuators');
|
|
774
|
+
await this._setStateIfChanged('thermal.summary.status', status);
|
|
737
775
|
} catch (_diagnosticError) {}
|
|
738
776
|
if (failures.length) throw new Error(`thermal-safe-stop-failed:${failures.join(',')}`);
|
|
739
|
-
return { ok: true, attempted, stopped: attempted }
|
|
777
|
+
return miraReleases ? { ok: true, attempted, stopped: attempted - miraReleases, miraNeutral: miraReleases }
|
|
778
|
+
: { ok: true, attempted, stopped: attempted };
|
|
740
779
|
}
|
|
741
780
|
|
|
742
781
|
/**
|
|
@@ -1495,6 +1534,7 @@ const mk = async (id, name, type, role, unit = undefined) => {
|
|
|
1495
1534
|
|
|
1496
1535
|
let appliedTotalW = 0;
|
|
1497
1536
|
let budgetUsedW = 0;
|
|
1537
|
+
let miraPvReserveW = 0;
|
|
1498
1538
|
const ctx = { dp: this.dp, adapter: this.adapter };
|
|
1499
1539
|
// Der Core darf nur aktuelle PV-Automatiklast in sein PV-Budget
|
|
1500
1540
|
// zurückrechnen. Dieser Modusnachweis ist getrennt von der direkten
|
|
@@ -1579,7 +1619,11 @@ const mk = async (id, name, type, role, unit = undefined) => {
|
|
|
1579
1619
|
// Read measured power if mapped
|
|
1580
1620
|
let measuredW = null;
|
|
1581
1621
|
if (this.dp && d.pWKey && this.dp.getEntry && this.dp.getEntry(d.pWKey)) {
|
|
1582
|
-
measuredW = this.dp.getNumber(d.pWKey, null);
|
|
1622
|
+
measuredW = d.ovumMira ? (miraSample(this.dp, d.pWKey, now)?.value ?? null) : this.dp.getNumber(d.pWKey, null);
|
|
1623
|
+
if (d.ovumMira && (measuredW === null || measuredW < 0)) {
|
|
1624
|
+
measuredW = null;
|
|
1625
|
+
await this._setStateIfChanged(`thermal.devices.${d.id}.measuredW`, null);
|
|
1626
|
+
}
|
|
1583
1627
|
if (typeof measuredW === 'number' && Number.isFinite(measuredW)) {
|
|
1584
1628
|
await this._setStateIfChanged(`thermal.devices.${d.id}.measuredW`, Math.round(measuredW));
|
|
1585
1629
|
}
|
|
@@ -1590,13 +1634,50 @@ const mk = async (id, name, type, role, unit = undefined) => {
|
|
|
1590
1634
|
// Manuell, Aus und Boost bleiben Hauslast. Der Core prüft zusätzlich
|
|
1591
1635
|
// die Frische dieses Nachweises und des gemappten Leistungszählers.
|
|
1592
1636
|
this.adapter._zeroExportPvOwnedThermal[d.id] = {
|
|
1593
|
-
owned: effectiveEnabled && effectiveMode === 'pvAuto' && !ov.boostActive && !ov.manualActive,
|
|
1637
|
+
owned: !d.ovumMira && effectiveEnabled && effectiveMode === 'pvAuto' && !ov.boostActive && !ov.manualActive,
|
|
1594
1638
|
ts: now,
|
|
1595
1639
|
};
|
|
1596
1640
|
await this._setStateIfChanged(`thermal.devices.${d.id}.boostActive`, !!ov.boostActive);
|
|
1597
1641
|
await this._setStateIfChanged(`thermal.devices.${d.id}.boostUntil`, ov.boostUntil ? Math.round(ov.boostUntil) : 0);
|
|
1598
1642
|
await this._setStateIfChanged(`thermal.devices.${d.id}.manualUntil`, ov.manualUntil ? Math.round(ov.manualUntil) : 0);
|
|
1599
1643
|
|
|
1644
|
+
if (d.ovumMira) {
|
|
1645
|
+
const boost = effectiveEnabled && ov.boostActive && d.boostEnabled;
|
|
1646
|
+
const manual = !effectiveEnabled || (!boost && (ov.manualActive || effectiveMode === 'manual'));
|
|
1647
|
+
let requestedW = 0;
|
|
1648
|
+
if (effectiveEnabled && !manual && !para14aActive) {
|
|
1649
|
+
if (boost) {
|
|
1650
|
+
requestedW = Math.min(d.boostPowerW, d.maxPowerW);
|
|
1651
|
+
} else if (effectiveMode === 'pvAuto') {
|
|
1652
|
+
let availableW = availableForAutomationW();
|
|
1653
|
+
if (pv.source === 'ems.budget.tariffNegative') {
|
|
1654
|
+
// A cheap-import grant alone is not a MIRA surplus request.
|
|
1655
|
+
const pvGrant = this.adapter._emsBudget?.getPvGrant?.({key: 'thermal', requestedW: availableW});
|
|
1656
|
+
availableW = Math.min(availableW, Math.max(0, num(pvGrant?.grantW, 0) - miraPvReserveW));
|
|
1657
|
+
}
|
|
1658
|
+
const band = this._computeBandDesiredOn(d.id, availableW, d.startSurplusW, d.stopSurplusW);
|
|
1659
|
+
const action = String(strategyOverlay.action || 'standard').toLowerCase();
|
|
1660
|
+
const pause = strategyOverlay.fallbackPause === true || (strategyOverlay.active && ['pause', 'off', 'disable', 'block'].includes(action));
|
|
1661
|
+
const on = this._hysteresisOnOff(d.id, !pause && band, d.minOnSec, d.minOffSec);
|
|
1662
|
+
requestedW = !pause && on ? Math.min(availableW, d.maxPowerW) : 0;
|
|
1663
|
+
if (strategyOverlay.active && typeof strategyOverlay.requestedPowerW === 'number') {
|
|
1664
|
+
requestedW = Math.min(requestedW, Math.max(0, strategyOverlay.requestedPowerW));
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
}
|
|
1668
|
+
const mira = await regulateMira(this, d, { requestedW, manual, boost });
|
|
1669
|
+
this.adapter._zeroExportPvOwnedThermal[d.id].owned = mira.owned;
|
|
1670
|
+
const usedW = consumeControlledW(mira.usedW);
|
|
1671
|
+
appliedTotalW += measuredW === null ? 0 : Math.max(0, Math.round(measuredW));
|
|
1672
|
+
budgetUsedW += usedW;
|
|
1673
|
+
if (!boost && !manual && mira.targetW > 0) miraPvReserveW += usedW;
|
|
1674
|
+
await this._setStateIfChanged(`thermal.devices.${d.id}.targetW`, mira.targetW);
|
|
1675
|
+
await this._setStateIfChanged(`thermal.devices.${d.id}.applied`, mira.applied);
|
|
1676
|
+
await this._setStateIfChanged(`thermal.devices.${d.id}.status`, mira.status);
|
|
1677
|
+
await this._setStateIfChanged(`thermal.devices.${d.id}.override`, manual ? 'manual' : (boost ? 'boost' : ''));
|
|
1678
|
+
continue;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1600
1681
|
const heldManualContext = !effectiveEnabled
|
|
1601
1682
|
|| (ov.manualActive && !ov.boostActive)
|
|
1602
1683
|
|| effectiveMode === 'manual';
|
|
@@ -2021,7 +2102,7 @@ const mk = async (id, name, type, role, unit = undefined) => {
|
|
|
2021
2102
|
priority: 200,
|
|
2022
2103
|
requestedW: used,
|
|
2023
2104
|
reserveW: used,
|
|
2024
|
-
pvReserveW: tariffImportPreferred ?
|
|
2105
|
+
pvReserveW: tariffImportPreferred ? Math.min(used, miraPvReserveW) : used,
|
|
2025
2106
|
pvOnly: !tariffImportPreferred,
|
|
2026
2107
|
mode: tariffImportPreferred ? 'tariffNegative' : 'pvAuto',
|
|
2027
2108
|
});
|
package/ui/io-package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "nexowatt-ui",
|
|
4
|
-
"version": "9.0.
|
|
4
|
+
"version": "9.0.34",
|
|
5
5
|
"news": {
|
|
6
|
+
"9.0.34": {
|
|
7
|
+
"de": "OVUM MIRA ab Firmware 1.1.3 über Modbus einrichten, elektrische Wärmepumpenleistung im Energiefluss anzeigen und die PV-Anforderung an den Hydraulikregler übergeben.",
|
|
8
|
+
"en": "Connect OVUM MIRA from firmware 1.1.3 via Modbus, display electrical heat-pump power in the energy flow and send PV requests to the hydraulic controller."
|
|
9
|
+
},
|
|
6
10
|
"9.0.33": {
|
|
7
11
|
"de": "EMS prüft Bestätigung, Qualität und Alter der Netzanschlussmessung vor der Leistungsfreigabe. Verbesserungen an Energiefluss und Regelung bei Mess- und Kommunikationsstörungen.",
|
|
8
12
|
"en": "The EMS checks acknowledgement, quality and age of grid measurements before granting power. Improves energy flow and control when measurements or communications fail."
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* AUTO-GENERATED RUNTIME FILE - NICHT MANUELL BEARBEITEN.
|
|
8
8
|
*
|
|
9
9
|
* Quelle: src-ts/runtime-executables/lib/installer-lifecycle.ts
|
|
10
|
-
* Quell-Hash: sha256:
|
|
10
|
+
* Quell-Hash: sha256:b7631ce1e2cbbf152a346196d3f9f5e2a6cadcb731a71b99a1b91b8e9207bac8
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -145,7 +145,7 @@ function activeDeviceProfileReferences(value) {
|
|
|
145
145
|
const singleActive = active('storage', 'enableStorageControl') && !(record(singleStorage._eosDevice).v === 1 && singleStorage.enabled === false);
|
|
146
146
|
const read = new Set();
|
|
147
147
|
const write = new Set();
|
|
148
|
-
const writeKey = /(?:write|^set|^target|^output(?:Object)?Id$|^(?:pv)?feedInLimit|^pvLimit|^runObjectId$|^maxChargeObjectId$|^maxDischargeObjectId$|^phaseSwitchId$|^chargeEnableObjectId$|^dischargeEnableObjectId$|^feneconGridSetpoint|^e3dcSetPower|^enableId$)/i;
|
|
148
|
+
const writeKey = /(?:^mira(?:PvStatus|PowerTarget)Id$|write|^set|^target|^output(?:Object)?Id$|^(?:pv)?feedInLimit|^pvLimit|^runObjectId$|^maxChargeObjectId$|^maxDischargeObjectId$|^phaseSwitchId$|^chargeEnableObjectId$|^dischargeEnableObjectId$|^feneconGridSetpoint|^e3dcSetPower|^enableId$)/i;
|
|
149
149
|
let visited = 0;
|
|
150
150
|
const walk = (item, depth = 0) => {
|
|
151
151
|
if (depth > 12 || ++visited > 20000)
|
|
@@ -203,6 +203,15 @@ function activeDeviceProfileReferences(value) {
|
|
|
203
203
|
// These global measurement keys are real runtime fallbacks for enabled
|
|
204
204
|
// battery/charging controllers, not merely display references in that case.
|
|
205
205
|
const controllerMeasurementKeys = [];
|
|
206
|
+
const thermalDevices = record(config.thermal).devices;
|
|
207
|
+
if (active('thermal', 'enableThermalControl') && Array.isArray(thermalDevices)) {
|
|
208
|
+
for (const item of thermalDevices) {
|
|
209
|
+
const row = record(item);
|
|
210
|
+
if (row.ovumMira === true && row.enabled === true && typeof row.slot === 'number' && Number.isInteger(row.slot) && row.slot >= 1 && row.slot <= 10) {
|
|
211
|
+
controllerMeasurementKeys.push(`consumer${row.slot}Power`);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
206
215
|
if (singleActive)
|
|
207
216
|
controllerMeasurementKeys.push('batteryPower', 'storageChargePower', 'storageDischargePower', 'storageSoc', 'storageCapacityKwh');
|
|
208
217
|
if (singleActive || active('storagefarm', 'enableStorageFarm') || active('charging', 'enableChargingManagement'))
|
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:2316c9c2553f364bf54c35a456deb0345dc306a146b2d649e6c341b77f0413b2
|
|
11
11
|
* Erzeugung: npm run sync:ts-runtime-executables
|
|
12
12
|
*
|
|
13
13
|
* Zweck:
|
|
@@ -176,6 +176,16 @@ const {
|
|
|
176
176
|
} = require('./lib/smarthome-contract');
|
|
177
177
|
|
|
178
178
|
// Abschnitt: Kleine HTTP-/Auth-Helfer. Diese Funktionen werden von Login-, Lizenz- und Installer-Endpunkten genutzt.
|
|
179
|
+
/** The MIRA controller accepts PV requests only after device commissioning.
|
|
180
|
+
* Quick controls change EMS intent. They never address MIRA registers directly.
|
|
181
|
+
*/
|
|
182
|
+
function miraFlowControlReady(device) {
|
|
183
|
+
return device?.ovumMira === true && device.enabled === true && device.miraSourcesConfirmed === true
|
|
184
|
+
&& Number.isSafeInteger(device.maxPowerW) && device.maxPowerW > 0
|
|
185
|
+
&& [device.miraPvStatusId, device.miraPvStatusReadId, device.miraPowerTargetId, device.miraPowerTargetReadId]
|
|
186
|
+
.every(id => typeof id === 'string' && id.trim().length > 0);
|
|
187
|
+
}
|
|
188
|
+
|
|
179
189
|
/**
|
|
180
190
|
* Code-Teil: parseCookies
|
|
181
191
|
* Zweck: Parst Rohdaten in ein sicheres internes Format.
|
|
@@ -4986,7 +4996,7 @@ class NexoWattVis extends HostedAdapter {
|
|
|
4986
4996
|
assertReady();
|
|
4987
4997
|
if (typeof this._bridge.deviceEmsPlan !== 'function') throw new Error('EOS_DEVICE_EMS_UNAVAILABLE');
|
|
4988
4998
|
const effective = this.nwApplyInstallerPatchToRuntimeConfig(this.config || {}, this._nwInstallerConfigPatch || {});
|
|
4989
|
-
const allowedApps = ['charging', 'storage', 'storagefarm'].filter(id => this._nwLicenseAllowsAppId(id));
|
|
4999
|
+
const allowedApps = ['charging', 'storage', 'storagefarm', 'thermal'].filter(id => this._nwLicenseAllowsAppId(id));
|
|
4990
5000
|
const plan = await this._bridge.deviceEmsPlan({ config: effective, devices, allowedApps });
|
|
4991
5001
|
assertReady();
|
|
4992
5002
|
if (!plan.changed && !this._nwDeviceEmsApplyPending) return { changed: false, statuses: plan.statuses };
|
|
@@ -23426,10 +23436,10 @@ app.get('/config', async (req, res) => {
|
|
|
23426
23436
|
// Wir geben bewusst nur Metadaten (Name + Slot + gemappt?) zurück – keine Fremd-State-IDs.
|
|
23427
23437
|
flowSlots: (() => {
|
|
23428
23438
|
// Energy-flow: optional slots
|
|
23429
|
-
// Consumers: max
|
|
23439
|
+
// Consumers: max 10
|
|
23430
23440
|
// Producers: reduced to max 5
|
|
23431
23441
|
const SLOT_COUNT_BY_KIND = {
|
|
23432
|
-
consumers:
|
|
23442
|
+
consumers: 10,
|
|
23433
23443
|
producers: 5,
|
|
23434
23444
|
};
|
|
23435
23445
|
const dps = (cfg && cfg.datapoints && typeof cfg.datapoints === 'object') ? cfg.datapoints : {};
|
|
@@ -23625,6 +23635,18 @@ app.get('/config', async (req, res) => {
|
|
|
23625
23635
|
if (!dev) dev = tlist.find(r => r && Math.round(Number(r.slot ?? r.consumerSlot ?? 0)) === idx) || null;
|
|
23626
23636
|
const holdMin = Math.max(0, Math.round(Number(t.manualHoldMin ?? 20)));
|
|
23627
23637
|
meta.manualHoldMin = holdMin;
|
|
23638
|
+
if (dev?.ovumMira === true) {
|
|
23639
|
+
meta.controlKind = 'thermal';
|
|
23640
|
+
meta.ovumMira = true;
|
|
23641
|
+
meta.enabled = miraFlowControlReady(dev) && slotType === 'heatPump';
|
|
23642
|
+
meta.hasSwitch = false;
|
|
23643
|
+
meta.hasSetpoint = false;
|
|
23644
|
+
meta.hasSgReady = false;
|
|
23645
|
+
meta.hasBoost = meta.enabled && dev.boostEnabled !== false;
|
|
23646
|
+
meta.boostMinutes = meta.hasBoost ? Math.max(0, Number(dev.boostDurationMin ?? 30)) : null;
|
|
23647
|
+
meta.max = dev.maxPowerW;
|
|
23648
|
+
return meta;
|
|
23649
|
+
}
|
|
23628
23650
|
if (dev && dev.boostEnabled !== false && enabled) {
|
|
23629
23651
|
meta.hasBoost = true;
|
|
23630
23652
|
const mins = Math.max(0, Math.round(Number(dev.boostDurationMin ?? 30)));
|
|
@@ -25623,6 +25645,13 @@ settingsConfig: {
|
|
|
25623
25645
|
};
|
|
25624
25646
|
|
|
25625
25647
|
// Boost override – local runtime override, no direct foreign DP.
|
|
25648
|
+
const miraDevice = kind === 'consumers' ? resolveThermalDev() : null;
|
|
25649
|
+
if (miraDevice?.ovumMira === true) {
|
|
25650
|
+
if (slotType !== 'heatPump' || !cfg.enableThermalControl || !miraFlowControlReady(miraDevice)) {
|
|
25651
|
+
return res.status(409).json({ ok: false, error: 'not_ready' });
|
|
25652
|
+
}
|
|
25653
|
+
if (prop === 'setpoint' || prop === 'switch') return res.status(409).json({ ok: false, error: 'ems_owned' });
|
|
25654
|
+
}
|
|
25626
25655
|
if (prop === 'boost') {
|
|
25627
25656
|
if (kind !== 'consumers') return res.status(400).json({ ok: false, error: 'bad request' });
|
|
25628
25657
|
const idLocal = `c${idx}`;
|
|
@@ -26324,7 +26353,8 @@ settingsConfig: {
|
|
|
26324
26353
|
const effectiveMode = (userMode !== 'inherit') ? userMode : cfgMode;
|
|
26325
26354
|
|
|
26326
26355
|
out.thermal = {
|
|
26327
|
-
available: true,
|
|
26356
|
+
available: dev.ovumMira === true ? miraFlowControlReady(dev) && slotType === 'heatPump' : true,
|
|
26357
|
+
ovumMira: dev.ovumMira === true,
|
|
26328
26358
|
cfgEnabled: !!cfgEnabled,
|
|
26329
26359
|
cfgMode,
|
|
26330
26360
|
userEnabled: !!userEnabled,
|
|
@@ -26334,8 +26364,8 @@ settingsConfig: {
|
|
|
26334
26364
|
modes: [
|
|
26335
26365
|
{ value: 'inherit', label: 'System' },
|
|
26336
26366
|
{ value: 'pvAuto', label: 'Auto (PV)' },
|
|
26337
|
-
{ value: 'manual', label: 'Manuell' },
|
|
26338
|
-
{ value: 'off', label: 'Aus' },
|
|
26367
|
+
{ value: 'manual', label: dev.ovumMira === true ? 'Geräteregelung' : 'Manuell' },
|
|
26368
|
+
{ value: 'off', label: dev.ovumMira === true ? 'PV-Anforderung aus' : 'Aus' },
|
|
26339
26369
|
],
|
|
26340
26370
|
};
|
|
26341
26371
|
}
|
package/ui/package.json
CHANGED