iobroker.nexowatt-ui 0.7.44 → 0.7.46
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/ems/modules/core-limits.js +13 -0
- package/ems/modules/heating-rod-control.js +10 -0
- package/io-package.json +2 -2
- package/main.js +27 -2
- package/package.json +1 -1
- package/www/app.js +31 -1
- package/www/ems-apps.html +1 -1
- package/www/ems-apps.js +47 -10
- package/www/logic.html +1 -1
- package/www/manifest.webmanifest +1 -1
- package/www/simulation.html +1 -1
- package/www/smarthome-config.html +1 -1
- package/www/styles.css +165 -0
- package/www/sw.js +1 -1
|
@@ -592,6 +592,19 @@ class CoreLimitsModule extends BaseModule {
|
|
|
592
592
|
}
|
|
593
593
|
}
|
|
594
594
|
|
|
595
|
+
// Guard against ghost split-battery aliases: with no direct house-load meter,
|
|
596
|
+
// discharge + NVP export would inflate house load and reduce the PV budget.
|
|
597
|
+
// This keeps signed batteryPower and direct load meters authoritative, but avoids
|
|
598
|
+
// bad powerDischarge aliases breaking Heizstab/EMS budgets.
|
|
599
|
+
try {
|
|
600
|
+
const hasDirectLoad = !!(cfg.datapoints && (String(cfg.datapoints.consumptionTotal || '').trim() || String(cfg.datapoints.housePower || '').trim()));
|
|
601
|
+
const splitBatteryConfigured = !!(cfg.datapoints && (String(cfg.datapoints.storageChargePower || '').trim() || String(cfg.datapoints.storageDischargePower || '').trim()));
|
|
602
|
+
const signedBatteryConfigured = !!(cfg.datapoints && String(cfg.datapoints.batteryPower || '').trim());
|
|
603
|
+
if (!hasDirectLoad && splitBatteryConfigured && !signedBatteryConfigured && gridExportW > 250 && storageDischargeW > 250 && storageChargeW <= 250) {
|
|
604
|
+
storageDischargeW = 0;
|
|
605
|
+
}
|
|
606
|
+
} catch (_eSanitizeStorage) {}
|
|
607
|
+
|
|
595
608
|
const evcsEnabled = cfg.enableChargingManagement !== false;
|
|
596
609
|
const thermalEnabled = cfg.enableThermalControl === true;
|
|
597
610
|
const heatingRodEnabled = cfg.enableHeatingRodControl === true;
|
|
@@ -691,6 +691,16 @@ class HeatingRodControlModule extends BaseModule {
|
|
|
691
691
|
const exportW = gridKnown ? Math.max(0, -gridW) : 0;
|
|
692
692
|
const importW = gridKnown ? Math.max(0, gridW) : 0;
|
|
693
693
|
const storage = this._readStorageSnapshot(staleMs);
|
|
694
|
+
try {
|
|
695
|
+
const appCfg = (this.adapter && this.adapter.config) ? this.adapter.config : {};
|
|
696
|
+
const hasDirectLoad = !!(appCfg.datapoints && (String(appCfg.datapoints.consumptionTotal || '').trim() || String(appCfg.datapoints.housePower || '').trim()));
|
|
697
|
+
const splitBatteryConfigured = !!(appCfg.datapoints && (String(appCfg.datapoints.storageChargePower || '').trim() || String(appCfg.datapoints.storageDischargePower || '').trim()));
|
|
698
|
+
const signedBatteryConfigured = !!(appCfg.datapoints && String(appCfg.datapoints.batteryPower || '').trim());
|
|
699
|
+
if (!hasDirectLoad && splitBatteryConfigured && !signedBatteryConfigured && exportW > 250 && storage.dischargeW > 250 && storage.chargeW <= 250) {
|
|
700
|
+
storage.dischargeW = 0;
|
|
701
|
+
storage.sanitizedExportDischarge = true;
|
|
702
|
+
}
|
|
703
|
+
} catch (_eSanitizeStorage) {}
|
|
694
704
|
|
|
695
705
|
const storageTargetSocPct = clamp(num(cfg.storageTargetSocPct, 90), 0, 100);
|
|
696
706
|
const storageReserveCfgW = Math.max(0, Math.round(num(cfg.storageReserveW, 1000)));
|
package/io-package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "nexowatt-ui",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.46",
|
|
5
5
|
"news": {
|
|
6
6
|
"0.7.42": {
|
|
7
7
|
"en": "Feature-dependent visibility fixed: EVCS/charging station and storage farm are only shown in the customer frontend when they are actually configured. Default/legacy placeholders no longer enable wallbox UI; AI Advisor suppresses EV/wallbox hints when no wallbox is available.",
|
|
@@ -1987,7 +1987,7 @@
|
|
|
1987
1987
|
}
|
|
1988
1988
|
},
|
|
1989
1989
|
"instanceObjects": [],
|
|
1990
|
-
"version": "0.7.
|
|
1990
|
+
"version": "0.7.46",
|
|
1991
1991
|
"news": {
|
|
1992
1992
|
"0.7.42": {
|
|
1993
1993
|
"en": "Feature-dependent visibility fixed: EVCS/charging station and storage farm are only shown in the customer frontend when they are actually configured. Default/legacy placeholders no longer enable wallbox UI; AI Advisor suppresses EV/wallbox hints when no wallbox is available.",
|
package/main.js
CHANGED
|
@@ -17739,6 +17739,31 @@ Technische Details: system.adapter.${c.inst}.alive=false`,
|
|
|
17739
17739
|
}
|
|
17740
17740
|
};
|
|
17741
17741
|
|
|
17742
|
+
const sanitizeSeparateBatteryFlow = (flow) => {
|
|
17743
|
+
try {
|
|
17744
|
+
if (!flow || String(flow.src || '').indexOf('chargeDischarge') < 0) return flow;
|
|
17745
|
+
const hasDirectLoad = this._nwHasMappedDatapoint('consumptionTotal') || this._nwHasMappedDatapoint('housePower');
|
|
17746
|
+
if (hasDirectLoad) return flow;
|
|
17747
|
+
const grid = this._nwResolveGridImportExportFromCache ? this._nwResolveGridImportExportFromCache() : null;
|
|
17748
|
+
const sellW = Math.max(0, Number(grid && grid.gridSellW) || 0);
|
|
17749
|
+
const dischargeW = Math.max(0, Number(flow.dischargeW) || 0);
|
|
17750
|
+
const chargeW = Math.max(0, Number(flow.chargeW) || 0);
|
|
17751
|
+
const limitW = Math.max(250, deadbandW * 10);
|
|
17752
|
+
if (sellW > limitW && dischargeW > limitW && chargeW <= limitW) {
|
|
17753
|
+
return Object.assign({}, flow, {
|
|
17754
|
+
chargeW: 0,
|
|
17755
|
+
dischargeW: 0,
|
|
17756
|
+
signedW: 0,
|
|
17757
|
+
src: String(flow.src || 'chargeDischarge') + '+sanitized-export-discharge',
|
|
17758
|
+
rejectedDischargeW: Math.round(dischargeW),
|
|
17759
|
+
sanitized: true,
|
|
17760
|
+
mirror: true
|
|
17761
|
+
});
|
|
17762
|
+
}
|
|
17763
|
+
} catch (_eSanitize) {}
|
|
17764
|
+
return flow;
|
|
17765
|
+
};
|
|
17766
|
+
|
|
17742
17767
|
// Speicherfarm already provides normalized charge/discharge totals. Keep it authoritative
|
|
17743
17768
|
// unless a signed single battery datapoint is explicitly mapped for a non-farm setup.
|
|
17744
17769
|
const sfEnabled = !!(this.stateCache && this.stateCache['storageFarm.enabled'] && this.stateCache['storageFarm.enabled'].value);
|
|
@@ -17796,7 +17821,7 @@ Technische Details: system.adapter.${c.inst}.alive=false`,
|
|
|
17796
17821
|
if (c <= deadbandW) c = 0;
|
|
17797
17822
|
if (d <= deadbandW) d = 0;
|
|
17798
17823
|
if (inv) { const t = c; c = d; d = t; }
|
|
17799
|
-
return preferBalance({
|
|
17824
|
+
return preferBalance(sanitizeSeparateBatteryFlow({
|
|
17800
17825
|
chargeW: Math.round(c),
|
|
17801
17826
|
dischargeW: Math.round(d),
|
|
17802
17827
|
signedW: Math.round(d - c),
|
|
@@ -17808,7 +17833,7 @@ Technische Details: system.adapter.${c.inst}.alive=false`,
|
|
|
17808
17833
|
storageChargePower: this._nwGetCacheAgeMs('storageChargePower', now),
|
|
17809
17834
|
storageDischargePower: this._nwGetCacheAgeMs('storageDischargePower', now),
|
|
17810
17835
|
},
|
|
17811
|
-
});
|
|
17836
|
+
}));
|
|
17812
17837
|
}
|
|
17813
17838
|
|
|
17814
17839
|
if (batterySigned !== null) {
|
package/package.json
CHANGED
package/www/app.js
CHANGED
|
@@ -2146,6 +2146,36 @@ function getNormalizedBatteryFlow() {
|
|
|
2146
2146
|
};
|
|
2147
2147
|
};
|
|
2148
2148
|
|
|
2149
|
+
const sanitizeSeparateBatteryFlow = (flow) => {
|
|
2150
|
+
try {
|
|
2151
|
+
if (!flow || String(flow.src || '').indexOf('chargeDischarge') < 0) return flow;
|
|
2152
|
+
// In a normal AC-coupled house setup a storage discharge while the NVP is
|
|
2153
|
+
// exporting and no direct house-load meter is configured is almost always a
|
|
2154
|
+
// vendor-/alias-side ghost value (seen with some nexowatt-devices powerDischarge aliases).
|
|
2155
|
+
// Without a direct load meter this value would inflate the building load and
|
|
2156
|
+
// eat the PV budget. Keep true signed batteryPower authoritative, but guard
|
|
2157
|
+
// the separate charge/discharge pair.
|
|
2158
|
+
const hasDirectLoad = isMappedDatapoint('consumptionTotal') || isMappedDatapoint('housePower');
|
|
2159
|
+
if (hasDirectLoad) return flow;
|
|
2160
|
+
const grid = getGridImportExport((k) => state && state[k] ? state[k].value : undefined);
|
|
2161
|
+
const sellW = Math.max(0, Number(grid && grid.sell) || 0);
|
|
2162
|
+
const dischargeW = Math.max(0, Number(flow.dischargeW) || 0);
|
|
2163
|
+
const chargeW = Math.max(0, Number(flow.chargeW) || 0);
|
|
2164
|
+
const limitW = Math.max(250, deadbandW * 10);
|
|
2165
|
+
if (sellW > limitW && dischargeW > limitW && chargeW <= limitW) {
|
|
2166
|
+
return Object.assign({}, flow, {
|
|
2167
|
+
chargeW: 0,
|
|
2168
|
+
dischargeW: 0,
|
|
2169
|
+
signedW: 0,
|
|
2170
|
+
src: String(flow.src || 'chargeDischarge') + '+sanitized-export-discharge',
|
|
2171
|
+
rejectedDischargeW: Math.round(dischargeW),
|
|
2172
|
+
sanitized: true,
|
|
2173
|
+
});
|
|
2174
|
+
}
|
|
2175
|
+
} catch (_e) {}
|
|
2176
|
+
return flow;
|
|
2177
|
+
};
|
|
2178
|
+
|
|
2149
2179
|
const sfEnabled = !!(state && state['storageFarm.enabled'] && state['storageFarm.enabled'].value);
|
|
2150
2180
|
if (sfEnabled) {
|
|
2151
2181
|
const fc = getFreshFlowNumber('storageFarm.totalChargePowerW');
|
|
@@ -2180,7 +2210,7 @@ function getNormalizedBatteryFlow() {
|
|
|
2180
2210
|
if (c <= deadbandW) c = 0;
|
|
2181
2211
|
if (d <= deadbandW) d = 0;
|
|
2182
2212
|
if (inv) { const t = c; c = d; d = t; }
|
|
2183
|
-
return preferBalanceDerivedBatteryFlow({ chargeW: c, dischargeW: d, signedW: d - c, src: inv ? 'chargeDischarge(inv)' : 'chargeDischarge', inverted: inv }, { deadbandW });
|
|
2213
|
+
return preferBalanceDerivedBatteryFlow(sanitizeSeparateBatteryFlow({ chargeW: c, dischargeW: d, signedW: d - c, src: inv ? 'chargeDischarge(inv)' : 'chargeDischarge', inverted: inv }), { deadbandW });
|
|
2184
2214
|
}
|
|
2185
2215
|
|
|
2186
2216
|
if (signedBattery !== null) return preferBalanceDerivedBatteryFlow(fromSigned(signedBattery, 'batterySigned'), { deadbandW });
|
package/www/ems-apps.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<meta name="apple-mobile-web-app-title" content="NexoWatt EMS">
|
|
14
14
|
<script src="/static/admin-guard.js" data-nw-admin-page="ems-apps"></script>
|
|
15
15
|
</head>
|
|
16
|
-
<body class="nw-cockpit-page nw-cockpit-skin nw-page-ems-apps">
|
|
16
|
+
<body class="nw-cockpit-page nw-cockpit-skin nw-installer-page nw-page-ems-apps">
|
|
17
17
|
<header class="topbar nw-cockpit-topbar">
|
|
18
18
|
<script>
|
|
19
19
|
(function () {
|
package/www/ems-apps.js
CHANGED
|
@@ -2547,8 +2547,10 @@ function _collectFlowPowerDpIsWFromUI() {
|
|
|
2547
2547
|
currentConfig.heatingRod = (currentConfig.heatingRod && typeof currentConfig.heatingRod === 'object') ? currentConfig.heatingRod : {};
|
|
2548
2548
|
const h = currentConfig.heatingRod;
|
|
2549
2549
|
h.devices = Array.isArray(h.devices) ? h.devices : [];
|
|
2550
|
-
|
|
2551
|
-
h.
|
|
2550
|
+
const _hrReserveRaw = Number(h.storageReserveW);
|
|
2551
|
+
h.storageReserveW = Math.max(0, Math.round(Number.isFinite(_hrReserveRaw) ? _hrReserveRaw : 1000));
|
|
2552
|
+
const _hrSocRaw = Number(h.storageTargetSocPct);
|
|
2553
|
+
h.storageTargetSocPct = Math.max(0, Math.min(100, Math.round(Number.isFinite(_hrSocRaw) ? _hrSocRaw : 90)));
|
|
2552
2554
|
const hMinPvRaw = Number(h.minPvPowerW ?? h.pvAutoMinPvPowerW ?? h.minCurrentPvW);
|
|
2553
2555
|
h.minPvPowerW = Math.max(0, Math.round(Number.isFinite(hMinPvRaw) ? hMinPvRaw : 800));
|
|
2554
2556
|
h.useBudgetGates = true;
|
|
@@ -2687,10 +2689,15 @@ function _collectFlowPowerDpIsWFromUI() {
|
|
|
2687
2689
|
if (opts.step != null) inp.step = String(opts.step);
|
|
2688
2690
|
if (opts.width) inp.style.width = opts.width;
|
|
2689
2691
|
if (opts.disabled) inp.disabled = true;
|
|
2690
|
-
|
|
2692
|
+
const commit = () => {
|
|
2691
2693
|
const v = (type === 'number') ? Number(inp.value) : (type === 'checkbox' ? !!inp.checked : inp.value);
|
|
2692
2694
|
onChange(v, inp);
|
|
2693
|
-
}
|
|
2695
|
+
};
|
|
2696
|
+
// Number/text fields must update the in-memory config immediately. Otherwise a
|
|
2697
|
+
// fast save or a reactive UI refresh can write the previous value again (e.g.
|
|
2698
|
+
// Heizstab Speicher-Reserve snapped back to the default 1000 W).
|
|
2699
|
+
inp.addEventListener('change', commit);
|
|
2700
|
+
if (type !== 'checkbox') inp.addEventListener('input', commit);
|
|
2694
2701
|
return inp;
|
|
2695
2702
|
}
|
|
2696
2703
|
|
|
@@ -2721,10 +2728,12 @@ function _collectFlowPowerDpIsWFromUI() {
|
|
|
2721
2728
|
|
|
2722
2729
|
function _mkCfgField(label, control, hint) {
|
|
2723
2730
|
const wrap = document.createElement('div');
|
|
2731
|
+
wrap.className = 'nw-config-mini-field';
|
|
2724
2732
|
wrap.style.display = 'flex';
|
|
2725
2733
|
wrap.style.flexDirection = 'column';
|
|
2726
2734
|
wrap.style.gap = '4px';
|
|
2727
2735
|
wrap.style.minWidth = '130px';
|
|
2736
|
+
wrap.style.maxWidth = '100%';
|
|
2728
2737
|
const lab = document.createElement('div');
|
|
2729
2738
|
lab.textContent = label;
|
|
2730
2739
|
lab.style.fontSize = '0.72rem';
|
|
@@ -2743,6 +2752,7 @@ function _collectFlowPowerDpIsWFromUI() {
|
|
|
2743
2752
|
|
|
2744
2753
|
function _mkCfgGroup(title) {
|
|
2745
2754
|
const wrap = document.createElement('div');
|
|
2755
|
+
wrap.className = 'nw-config-group';
|
|
2746
2756
|
wrap.style.display = 'flex';
|
|
2747
2757
|
wrap.style.flexDirection = 'column';
|
|
2748
2758
|
wrap.style.gap = '8px';
|
|
@@ -2751,6 +2761,8 @@ function _collectFlowPowerDpIsWFromUI() {
|
|
|
2751
2761
|
wrap.style.borderRadius = '12px';
|
|
2752
2762
|
wrap.style.background = 'rgba(255,255,255,0.02)';
|
|
2753
2763
|
wrap.style.flex = '1 1 320px';
|
|
2764
|
+
wrap.style.minWidth = '0';
|
|
2765
|
+
wrap.style.maxWidth = '100%';
|
|
2754
2766
|
|
|
2755
2767
|
const head = document.createElement('div');
|
|
2756
2768
|
head.textContent = title;
|
|
@@ -2771,6 +2783,7 @@ function _collectFlowPowerDpIsWFromUI() {
|
|
|
2771
2783
|
|
|
2772
2784
|
function _mkCfgDetailsGroup(title, open = false) {
|
|
2773
2785
|
const wrap = document.createElement('details');
|
|
2786
|
+
wrap.className = 'nw-config-group nw-config-group--details';
|
|
2774
2787
|
wrap.open = !!open;
|
|
2775
2788
|
wrap.style.display = 'flex';
|
|
2776
2789
|
wrap.style.flexDirection = 'column';
|
|
@@ -2780,6 +2793,8 @@ function _collectFlowPowerDpIsWFromUI() {
|
|
|
2780
2793
|
wrap.style.borderRadius = '12px';
|
|
2781
2794
|
wrap.style.background = 'rgba(255,255,255,0.02)';
|
|
2782
2795
|
wrap.style.flex = '1 1 320px';
|
|
2796
|
+
wrap.style.minWidth = '0';
|
|
2797
|
+
wrap.style.maxWidth = '100%';
|
|
2783
2798
|
|
|
2784
2799
|
const summary = document.createElement('summary');
|
|
2785
2800
|
summary.textContent = title;
|
|
@@ -2823,12 +2838,15 @@ function _collectFlowPowerDpIsWFromUI() {
|
|
|
2823
2838
|
|
|
2824
2839
|
function _mkDeviceRow(title, subtitle, badges = []) {
|
|
2825
2840
|
const row = document.createElement('div');
|
|
2826
|
-
row.className = 'nw-config-item';
|
|
2841
|
+
row.className = 'nw-config-item nw-config-item--device-row';
|
|
2827
2842
|
row.style.alignItems = 'start';
|
|
2843
|
+
row.style.minWidth = '0';
|
|
2844
|
+
row.style.overflow = 'hidden';
|
|
2828
2845
|
|
|
2829
2846
|
const left = document.createElement('div');
|
|
2830
2847
|
left.className = 'nw-config-item__left';
|
|
2831
2848
|
left.style.maxWidth = '280px';
|
|
2849
|
+
left.style.minWidth = '0';
|
|
2832
2850
|
|
|
2833
2851
|
const ttl = document.createElement('div');
|
|
2834
2852
|
ttl.className = 'nw-config-item__title';
|
|
@@ -2855,6 +2873,8 @@ function _collectFlowPowerDpIsWFromUI() {
|
|
|
2855
2873
|
right.style.flexDirection = 'column';
|
|
2856
2874
|
right.style.gap = '12px';
|
|
2857
2875
|
right.style.flex = '1';
|
|
2876
|
+
right.style.minWidth = '0';
|
|
2877
|
+
right.style.maxWidth = '100%';
|
|
2858
2878
|
|
|
2859
2879
|
row.appendChild(left);
|
|
2860
2880
|
row.appendChild(right);
|
|
@@ -3113,7 +3133,10 @@ function _collectFlowPowerDpIsWFromUI() {
|
|
|
3113
3133
|
_mkCfgBadge(`Verdrahtet: ${wiredStages}/${dev.stageCount} Stufen`, wiredStages >= dev.stageCount ? 'ok' : 'warn'),
|
|
3114
3134
|
_mkCfgBadge(`Max: ${dev.maxPowerW} W`),
|
|
3115
3135
|
];
|
|
3116
|
-
const { row, right } = _mkDeviceRow(`Slot ${slot} – ${_getFlowConsumerName(slot)}`, 'Native gestufte Heizstab-Regelung. Leistungsmessung kommt aus dem Energiefluss-Slot, die Stage-Relais/KNX-Datenpunkte werden direkt hier in der Heizstab-App gepflegt.', badges);
|
|
3136
|
+
const { row, left, right } = _mkDeviceRow(`Slot ${slot} – ${_getFlowConsumerName(slot)}`, 'Native gestufte Heizstab-Regelung. Leistungsmessung kommt aus dem Energiefluss-Slot, die Stage-Relais/KNX-Datenpunkte werden direkt hier in der Heizstab-App gepflegt.', badges);
|
|
3137
|
+
row.classList.add('nw-heatingrod-device-row');
|
|
3138
|
+
left.classList.add('nw-heatingrod-device-left');
|
|
3139
|
+
right.classList.add('nw-heatingrod-device-right');
|
|
3117
3140
|
|
|
3118
3141
|
const info = document.createElement('div');
|
|
3119
3142
|
info.className = 'nw-config-field-hint';
|
|
@@ -3146,6 +3169,7 @@ function _collectFlowPowerDpIsWFromUI() {
|
|
|
3146
3169
|
right.appendChild(grpTiming.wrap);
|
|
3147
3170
|
|
|
3148
3171
|
const stageWrap = document.createElement('div');
|
|
3172
|
+
stageWrap.className = 'nw-heatingrod-stage-wrap';
|
|
3149
3173
|
stageWrap.style.display = 'flex';
|
|
3150
3174
|
stageWrap.style.flexDirection = 'column';
|
|
3151
3175
|
stageWrap.style.gap = '8px';
|
|
@@ -3153,8 +3177,12 @@ function _collectFlowPowerDpIsWFromUI() {
|
|
|
3153
3177
|
stageWrap.style.border = '1px solid rgba(255,255,255,0.08)';
|
|
3154
3178
|
stageWrap.style.borderRadius = '12px';
|
|
3155
3179
|
stageWrap.style.background = 'rgba(255,255,255,0.02)';
|
|
3180
|
+
stageWrap.style.minWidth = '0';
|
|
3181
|
+
stageWrap.style.maxWidth = '100%';
|
|
3182
|
+
stageWrap.style.overflowX = 'auto';
|
|
3156
3183
|
|
|
3157
3184
|
const stageHead = document.createElement('div');
|
|
3185
|
+
stageHead.className = 'nw-heatingrod-stage-head';
|
|
3158
3186
|
stageHead.style.display = 'flex';
|
|
3159
3187
|
stageHead.style.flexWrap = 'wrap';
|
|
3160
3188
|
stageHead.style.justifyContent = 'space-between';
|
|
@@ -3172,6 +3200,7 @@ function _collectFlowPowerDpIsWFromUI() {
|
|
|
3172
3200
|
stageWrap.appendChild(stageHead);
|
|
3173
3201
|
|
|
3174
3202
|
const headRow = document.createElement('div');
|
|
3203
|
+
headRow.className = 'nw-heatingrod-stage-row nw-heatingrod-stage-row--head';
|
|
3175
3204
|
headRow.style.display = 'grid';
|
|
3176
3205
|
headRow.style.gridTemplateColumns = '100px repeat(3, minmax(120px, 1fr))';
|
|
3177
3206
|
headRow.style.gap = '10px';
|
|
@@ -3189,6 +3218,7 @@ function _collectFlowPowerDpIsWFromUI() {
|
|
|
3189
3218
|
(dev.stages || []).forEach((stage, index) => {
|
|
3190
3219
|
const s = index + 1;
|
|
3191
3220
|
const sRow = document.createElement('div');
|
|
3221
|
+
sRow.className = 'nw-heatingrod-stage-row';
|
|
3192
3222
|
sRow.style.display = 'grid';
|
|
3193
3223
|
sRow.style.gridTemplateColumns = '100px repeat(3, minmax(120px, 1fr))';
|
|
3194
3224
|
sRow.style.gap = '10px';
|
|
@@ -3236,6 +3266,7 @@ function _collectFlowPowerDpIsWFromUI() {
|
|
|
3236
3266
|
stageWrap.appendChild(sRow);
|
|
3237
3267
|
|
|
3238
3268
|
const dpRow = document.createElement('div');
|
|
3269
|
+
dpRow.className = 'nw-heatingrod-stage-row nw-heatingrod-stage-dp-row';
|
|
3239
3270
|
dpRow.style.display = 'grid';
|
|
3240
3271
|
dpRow.style.gridTemplateColumns = '100px repeat(2, minmax(240px, 1fr))';
|
|
3241
3272
|
dpRow.style.gap = '10px';
|
|
@@ -7708,13 +7739,19 @@ function _collectFlowPowerDpIsWFromUI() {
|
|
|
7708
7739
|
const socId = _nwGetAlias(stDev, 'r.soc');
|
|
7709
7740
|
|
|
7710
7741
|
let storageMapped = false;
|
|
7711
|
-
|
|
7742
|
+
// Prefer the single signed battery power datapoint when it is available.
|
|
7743
|
+
// It is the safest source for the VIS/EMS balance (+ Entladen / - Laden).
|
|
7744
|
+
// Some devices expose split powerCharge/powerDischarge aliases that are
|
|
7745
|
+
// control/assist values rather than the real physical battery flow. Those
|
|
7746
|
+
// can make the house load and PV budget wrong, so use them only when no
|
|
7747
|
+
// signed datapoint exists.
|
|
7748
|
+
if (signedId) {
|
|
7749
|
+
if (_nwApplyFlowDpIfEmpty('batteryPower', signedId, { powerIsW: true })) out.changed = true;
|
|
7750
|
+
storageMapped = true;
|
|
7751
|
+
} else if (chargeId && dischargeId) {
|
|
7712
7752
|
if (_nwApplyFlowDpIfEmpty('storageChargePower', chargeId, { powerIsW: true })) out.changed = true;
|
|
7713
7753
|
if (_nwApplyFlowDpIfEmpty('storageDischargePower', dischargeId, { powerIsW: true })) out.changed = true;
|
|
7714
7754
|
storageMapped = true;
|
|
7715
|
-
} else if (signedId) {
|
|
7716
|
-
if (_nwApplyFlowDpIfEmpty('batteryPower', signedId, { powerIsW: true })) out.changed = true;
|
|
7717
|
-
storageMapped = true;
|
|
7718
7755
|
}
|
|
7719
7756
|
if (socId) {
|
|
7720
7757
|
if (_nwApplyFlowDpIfEmpty('storageSoc', socId)) out.changed = true;
|
package/www/logic.html
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<script src="/static/admin-guard.js" data-nw-admin-page="logic"></script>
|
|
22
22
|
</head>
|
|
23
23
|
|
|
24
|
-
<body class="nw-cockpit-page nw-cockpit-skin nw-page-logic">
|
|
24
|
+
<body class="nw-cockpit-page nw-cockpit-skin nw-installer-page nw-page-logic">
|
|
25
25
|
<header class="topbar">
|
|
26
26
|
<div class="brand">
|
|
27
27
|
<a href="/" aria-label="NexoWatt Live"><img alt="NexoWatt" src="/static/nexowatt-logo.png"/></a>
|
package/www/manifest.webmanifest
CHANGED
package/www/simulation.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<script src="/static/admin-guard.js" data-nw-admin-page="simulation"></script>
|
|
10
10
|
</head>
|
|
11
11
|
|
|
12
|
-
<body class="nw-cockpit-page nw-cockpit-skin nw-page-simulation">
|
|
12
|
+
<body class="nw-cockpit-page nw-cockpit-skin nw-installer-page nw-page-simulation">
|
|
13
13
|
<header class="topbar nw-cockpit-topbar">
|
|
14
14
|
<script>
|
|
15
15
|
(function () {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<meta name="apple-mobile-web-app-title" content="NexoWatt EMS">
|
|
14
14
|
<script src="/static/admin-guard.js" data-nw-admin-page="smarthome-config"></script>
|
|
15
15
|
</head>
|
|
16
|
-
<body class="nw-cockpit-page nw-cockpit-skin nw-page-smarthome-config">
|
|
16
|
+
<body class="nw-cockpit-page nw-cockpit-skin nw-installer-page nw-page-smarthome-config">
|
|
17
17
|
<header class="topbar nw-cockpit-topbar">
|
|
18
18
|
<script>
|
|
19
19
|
(function () {
|
package/www/styles.css
CHANGED
|
@@ -10752,3 +10752,168 @@ body.nw-page-smarthome .nw-sh-gauge--level + .nw-sh-slider--big{
|
|
|
10752
10752
|
.nw-ai-setting-row select,
|
|
10753
10753
|
.nw-ai-setting-row input{width:100%;}
|
|
10754
10754
|
}
|
|
10755
|
+
|
|
10756
|
+
/* =====================================================================
|
|
10757
|
+
NexoWatt EMS 0.7.45 – App-Center Heizstab UI Responsiveness Hotfix
|
|
10758
|
+
===================================================================== */
|
|
10759
|
+
body.nw-page-ems-apps main.nw-appcenter-page,
|
|
10760
|
+
body.nw-page-ems-apps main.nw-page-shell{
|
|
10761
|
+
width:min(var(--nx-page-max, 1580px), calc(100vw - clamp(20px, 3vw, 54px))) !important;
|
|
10762
|
+
max-width:none !important;
|
|
10763
|
+
overflow:visible !important;
|
|
10764
|
+
}
|
|
10765
|
+
|
|
10766
|
+
body.nw-page-ems-apps .nw-smarthome-tabs{
|
|
10767
|
+
max-width:100% !important;
|
|
10768
|
+
overflow-x:auto !important;
|
|
10769
|
+
}
|
|
10770
|
+
|
|
10771
|
+
/* Der Heizstab-Konfigurator braucht wegen 1–12 Stufen und DP-Zeilen bewusst
|
|
10772
|
+
die volle Breite. Die Hinweis-Kachel rutscht unter die Gerätekarte, damit
|
|
10773
|
+
keine Eingabefelder mehr über angrenzende Karten laufen. */
|
|
10774
|
+
body.nw-page-ems-apps #nw-tabpanel-heatingrod > .nw-grid{
|
|
10775
|
+
grid-template-columns:1fr !important;
|
|
10776
|
+
align-items:start !important;
|
|
10777
|
+
}
|
|
10778
|
+
body.nw-page-ems-apps #nw-tabpanel-heatingrod .nw-card,
|
|
10779
|
+
body.nw-page-ems-apps #heatingRodDevices,
|
|
10780
|
+
body.nw-page-ems-apps #heatingRodDevices *{
|
|
10781
|
+
box-sizing:border-box !important;
|
|
10782
|
+
}
|
|
10783
|
+
body.nw-page-ems-apps #nw-tabpanel-heatingrod .nw-card{
|
|
10784
|
+
min-width:0 !important;
|
|
10785
|
+
overflow:hidden !important;
|
|
10786
|
+
}
|
|
10787
|
+
body.nw-page-ems-apps #heatingRodDevices{
|
|
10788
|
+
display:grid !important;
|
|
10789
|
+
grid-template-columns:1fr !important;
|
|
10790
|
+
gap:12px !important;
|
|
10791
|
+
min-width:0 !important;
|
|
10792
|
+
max-width:100% !important;
|
|
10793
|
+
overflow:hidden !important;
|
|
10794
|
+
}
|
|
10795
|
+
body.nw-page-ems-apps #heatingRodDevices > .nw-config-group,
|
|
10796
|
+
body.nw-page-ems-apps #heatingRodDevices > details.nw-config-group{
|
|
10797
|
+
width:100% !important;
|
|
10798
|
+
min-width:0 !important;
|
|
10799
|
+
max-width:100% !important;
|
|
10800
|
+
flex:1 1 auto !important;
|
|
10801
|
+
overflow:hidden !important;
|
|
10802
|
+
}
|
|
10803
|
+
body.nw-page-ems-apps #heatingRodDevices > .nw-config-item,
|
|
10804
|
+
body.nw-page-ems-apps #heatingRodDevices > .nw-heatingrod-device-row{
|
|
10805
|
+
width:100% !important;
|
|
10806
|
+
min-width:0 !important;
|
|
10807
|
+
max-width:100% !important;
|
|
10808
|
+
grid-template-columns:1fr !important;
|
|
10809
|
+
gap:12px !important;
|
|
10810
|
+
align-items:start !important;
|
|
10811
|
+
overflow:hidden !important;
|
|
10812
|
+
}
|
|
10813
|
+
body.nw-page-ems-apps .nw-heatingrod-device-left,
|
|
10814
|
+
body.nw-page-ems-apps .nw-heatingrod-device-right{
|
|
10815
|
+
width:100% !important;
|
|
10816
|
+
max-width:100% !important;
|
|
10817
|
+
min-width:0 !important;
|
|
10818
|
+
}
|
|
10819
|
+
body.nw-page-ems-apps .nw-heatingrod-device-left{
|
|
10820
|
+
padding-bottom:2px !important;
|
|
10821
|
+
}
|
|
10822
|
+
body.nw-page-ems-apps .nw-heatingrod-device-right{
|
|
10823
|
+
align-items:stretch !important;
|
|
10824
|
+
}
|
|
10825
|
+
body.nw-page-ems-apps .nw-heatingrod-device-right > .nw-config-group,
|
|
10826
|
+
body.nw-page-ems-apps .nw-heatingrod-device-right > details.nw-config-group{
|
|
10827
|
+
width:100% !important;
|
|
10828
|
+
min-width:0 !important;
|
|
10829
|
+
max-width:100% !important;
|
|
10830
|
+
flex:1 1 auto !important;
|
|
10831
|
+
}
|
|
10832
|
+
body.nw-page-ems-apps .nw-heatingrod-device-right > .nw-config-field-hint{
|
|
10833
|
+
max-width:100% !important;
|
|
10834
|
+
overflow-wrap:anywhere !important;
|
|
10835
|
+
}
|
|
10836
|
+
body.nw-page-ems-apps .nw-config-mini-field{
|
|
10837
|
+
min-width:min(130px, 100%) !important;
|
|
10838
|
+
max-width:100% !important;
|
|
10839
|
+
}
|
|
10840
|
+
body.nw-page-ems-apps .nw-config-group .nw-config-input,
|
|
10841
|
+
body.nw-page-ems-apps .nw-config-group .nw-config-select,
|
|
10842
|
+
body.nw-page-ems-apps .nw-config-group .nw-config-dp-input{
|
|
10843
|
+
max-width:100% !important;
|
|
10844
|
+
}
|
|
10845
|
+
|
|
10846
|
+
/* Stage-Tabelle: Desktop kompakt als Grid, bei kleiner Breite automatisch
|
|
10847
|
+
lesbar ohne Überlagerung und mit horizontaler Sicherheits-Scrollfläche. */
|
|
10848
|
+
body.nw-page-ems-apps .nw-heatingrod-stage-wrap{
|
|
10849
|
+
width:100% !important;
|
|
10850
|
+
min-width:0 !important;
|
|
10851
|
+
max-width:100% !important;
|
|
10852
|
+
overflow-x:auto !important;
|
|
10853
|
+
overflow-y:hidden !important;
|
|
10854
|
+
-webkit-overflow-scrolling:touch !important;
|
|
10855
|
+
scrollbar-width:thin !important;
|
|
10856
|
+
}
|
|
10857
|
+
body.nw-page-ems-apps .nw-heatingrod-stage-head{
|
|
10858
|
+
min-width:0 !important;
|
|
10859
|
+
max-width:100% !important;
|
|
10860
|
+
}
|
|
10861
|
+
body.nw-page-ems-apps .nw-heatingrod-stage-head .nw-config-field-hint{
|
|
10862
|
+
max-width:100% !important;
|
|
10863
|
+
overflow-wrap:anywhere !important;
|
|
10864
|
+
}
|
|
10865
|
+
body.nw-page-ems-apps .nw-heatingrod-stage-row{
|
|
10866
|
+
width:100% !important;
|
|
10867
|
+
min-width:0 !important;
|
|
10868
|
+
max-width:100% !important;
|
|
10869
|
+
grid-template-columns:minmax(78px, .55fr) repeat(3, minmax(90px, 1fr)) !important;
|
|
10870
|
+
gap:8px !important;
|
|
10871
|
+
}
|
|
10872
|
+
body.nw-page-ems-apps .nw-heatingrod-stage-dp-row{
|
|
10873
|
+
grid-template-columns:minmax(78px, .45fr) repeat(2, minmax(170px, 1fr)) !important;
|
|
10874
|
+
align-items:start !important;
|
|
10875
|
+
}
|
|
10876
|
+
body.nw-page-ems-apps .nw-heatingrod-stage-row .nw-config-input,
|
|
10877
|
+
body.nw-page-ems-apps .nw-heatingrod-stage-row .nw-config-dp-input{
|
|
10878
|
+
min-width:0 !important;
|
|
10879
|
+
width:100% !important;
|
|
10880
|
+
}
|
|
10881
|
+
body.nw-page-ems-apps .nw-heatingrod-stage-dp-row .nw-config-dp-input-wrapper{
|
|
10882
|
+
max-width:100% !important;
|
|
10883
|
+
}
|
|
10884
|
+
body.nw-page-ems-apps .nw-heatingrod-stage-dp-row .nw-config-dp-input-wrapper .nw-config-dp-input{
|
|
10885
|
+
flex:1 1 150px !important;
|
|
10886
|
+
}
|
|
10887
|
+
|
|
10888
|
+
@media (max-width: 980px){
|
|
10889
|
+
body.nw-page-ems-apps main.nw-appcenter-page,
|
|
10890
|
+
body.nw-page-ems-apps main.nw-page-shell{
|
|
10891
|
+
width:calc(100vw - 20px) !important;
|
|
10892
|
+
padding:12px !important;
|
|
10893
|
+
}
|
|
10894
|
+
body.nw-page-ems-apps .nw-heatingrod-stage-row,
|
|
10895
|
+
body.nw-page-ems-apps .nw-heatingrod-stage-dp-row{
|
|
10896
|
+
min-width:560px !important;
|
|
10897
|
+
}
|
|
10898
|
+
}
|
|
10899
|
+
@media (max-width: 640px){
|
|
10900
|
+
body.nw-page-ems-apps main.nw-appcenter-page,
|
|
10901
|
+
body.nw-page-ems-apps main.nw-page-shell{
|
|
10902
|
+
width:calc(100vw - 12px) !important;
|
|
10903
|
+
padding:8px !important;
|
|
10904
|
+
}
|
|
10905
|
+
body.nw-page-ems-apps #heatingRodDevices{
|
|
10906
|
+
gap:10px !important;
|
|
10907
|
+
}
|
|
10908
|
+
body.nw-page-ems-apps #heatingRodDevices > .nw-config-item,
|
|
10909
|
+
body.nw-page-ems-apps #heatingRodDevices > .nw-heatingrod-device-row{
|
|
10910
|
+
padding:10px !important;
|
|
10911
|
+
}
|
|
10912
|
+
body.nw-page-ems-apps .nw-heatingrod-stage-wrap{
|
|
10913
|
+
padding:10px !important;
|
|
10914
|
+
}
|
|
10915
|
+
body.nw-page-ems-apps .nw-heatingrod-stage-row,
|
|
10916
|
+
body.nw-page-ems-apps .nw-heatingrod-stage-dp-row{
|
|
10917
|
+
min-width:520px !important;
|
|
10918
|
+
}
|
|
10919
|
+
}
|
package/www/sw.js
CHANGED