iobroker.nexowatt-ui 0.7.47 → 0.7.49
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/io-package.json +14 -2
- package/main.js +113 -95
- package/package.json +1 -1
- package/www/app.js +32 -25
- package/www/history.html +18 -14
- package/www/history.js +4 -0
- package/www/manifest.webmanifest +1 -1
- package/www/smarthome.html +1 -1
- package/www/smarthome.js +11 -0
- package/www/styles.css +358 -0
- package/www/sw.js +1 -1
package/io-package.json
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "nexowatt-ui",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.49",
|
|
5
5
|
"news": {
|
|
6
|
+
"0.7.49": {
|
|
7
|
+
"en": "Mobile VIS hotfix: History controls no longer overflow on smartphones; SmartHome uses a reliable mobile drawer/loading state.",
|
|
8
|
+
"de": "Mobile-VIS-Hotfix: History-Bedienleiste läuft auf Smartphones nicht mehr seitlich weg; SmartHome nutzt einen zuverlässigen mobilen Drawer/Ladezustand."
|
|
9
|
+
},
|
|
10
|
+
"0.7.48": {
|
|
11
|
+
"en": "Hotfix: core energy-flow datapoints are no longer discarded as stale, storage split/signed DPs remain authoritative, and balance-derived battery values are only used when no storage DP is configured.",
|
|
12
|
+
"de": "Hotfix: Kern-Datenpunkte im Energiefluss werden nicht mehr wegen altem Zeitstempel verworfen, getrennte/signed Speicher-DPs bleiben autoritativ und berechnete Speicherwerte werden nur genutzt, wenn kein Speicher-DP konfiguriert ist."
|
|
13
|
+
},
|
|
6
14
|
"0.7.47": {
|
|
7
15
|
"en": "Energy-flow datapoint resolver fixed: split charge/discharge datapoints and signed battery power are supported consistently again; calculated fallback is only used when a fresh measurement source is missing. Heating-rod reserve inputs are flushed before save.",
|
|
8
16
|
"de": "Energiefluss-Datenpunktauflösung korrigiert: getrennte Lade-/Entlade-Datenpunkte und signed Batterie-Leistung werden wieder konsistent unterstützt; der rechnerische Fallback greift nur, wenn keine frische Messquelle vorhanden ist. Heizstab-Reservefelder werden vor dem Speichern direkt übernommen."
|
|
@@ -1991,8 +1999,12 @@
|
|
|
1991
1999
|
}
|
|
1992
2000
|
},
|
|
1993
2001
|
"instanceObjects": [],
|
|
1994
|
-
"version": "0.7.
|
|
2002
|
+
"version": "0.7.49",
|
|
1995
2003
|
"news": {
|
|
2004
|
+
"0.7.49": {
|
|
2005
|
+
"en": "Mobile VIS hotfix: History controls no longer overflow on smartphones; SmartHome uses a reliable mobile drawer/loading state.",
|
|
2006
|
+
"de": "Mobile-VIS-Hotfix: History-Bedienleiste läuft auf Smartphones nicht mehr seitlich weg; SmartHome nutzt einen zuverlässigen mobilen Drawer/Ladezustand."
|
|
2007
|
+
},
|
|
1996
2008
|
"0.7.42": {
|
|
1997
2009
|
"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.",
|
|
1998
2010
|
"de": "Anlagenabhängige Sichtbarkeit korrigiert: EVCS/Ladestation und Speicherfarm erscheinen im Kunden-Frontend nur noch, wenn sie wirklich konfiguriert sind. Default-/Legacy-Placeholder aktivieren keine Wallbox-Anzeige mehr; KI-Empfehlungen verzichten ohne Wallbox auf EV-/Wallbox-Hinweise."
|
package/main.js
CHANGED
|
@@ -17617,28 +17617,60 @@ Technische Details: system.adapter.${c.inst}.alive=false`,
|
|
|
17617
17617
|
}
|
|
17618
17618
|
}
|
|
17619
17619
|
|
|
17620
|
+
_nwStorageFarmIsActiveFromCache() {
|
|
17621
|
+
try {
|
|
17622
|
+
const cfg = this.config || {};
|
|
17623
|
+
const sf = (cfg.storageFarm && typeof cfg.storageFarm === 'object') ? cfg.storageFarm : {};
|
|
17624
|
+
const rows = Array.isArray(sf.storages) ? sf.storages : [];
|
|
17625
|
+
const configured = rows.some(r => r && typeof r === 'object' && r.enabled !== false);
|
|
17626
|
+
if (!cfg.enableStorageFarm || !configured) return false;
|
|
17627
|
+
|
|
17628
|
+
const rec = this.stateCache && this.stateCache['storageFarm.enabled'];
|
|
17629
|
+
if (rec && rec.value === false) return false;
|
|
17630
|
+
|
|
17631
|
+
const totalRec = this.stateCache && this.stateCache['storageFarm.storagesTotal'];
|
|
17632
|
+
if (totalRec && totalRec.value !== undefined && totalRec.value !== null) {
|
|
17633
|
+
const total = Number(totalRec.value);
|
|
17634
|
+
if (Number.isFinite(total) && total <= 0) return false;
|
|
17635
|
+
}
|
|
17636
|
+
return true;
|
|
17637
|
+
} catch (_e) {
|
|
17638
|
+
return false;
|
|
17639
|
+
}
|
|
17640
|
+
}
|
|
17641
|
+
|
|
17620
17642
|
_nwResolveBatteryFlowFromCache(opts = {}) {
|
|
17621
17643
|
const now = Number.isFinite(Number(opts.now)) ? Number(opts.now) : Date.now();
|
|
17622
17644
|
const maxAgeMs = opts.maxAgeMs === undefined ? this._nwLiveInputMaxAgeMs() : opts.maxAgeMs;
|
|
17623
17645
|
const deadbandW = Number.isFinite(Number(opts.deadbandW)) ? Math.max(0, Number(opts.deadbandW)) : 25;
|
|
17646
|
+
const strictStale = opts.strictStale === true;
|
|
17624
17647
|
|
|
17625
17648
|
const dps = (this.config && this.config.datapoints && typeof this.config.datapoints === 'object') ? this.config.datapoints : {};
|
|
17626
17649
|
const idOf = (key) => String(dps[key] || '').trim();
|
|
17627
17650
|
const chargeMapped = !!idOf('storageChargePower');
|
|
17628
17651
|
const dischargeMapped = !!idOf('storageDischargePower');
|
|
17629
17652
|
const batteryMapped = !!idOf('batteryPower');
|
|
17653
|
+
const anyStorageMapped = chargeMapped || dischargeMapped || batteryMapped;
|
|
17630
17654
|
const sameChargeDischargeId = !!(chargeMapped && dischargeMapped && idOf('storageChargePower') === idOf('storageDischargePower'));
|
|
17631
17655
|
const inv = this._nwIsBatterySignInverted();
|
|
17632
17656
|
|
|
17633
|
-
|
|
17634
|
-
|
|
17635
|
-
|
|
17636
|
-
|
|
17637
|
-
const
|
|
17657
|
+
// Wichtig: Gemappte Kern-DPs werden als Quelle der Wahrheit behandelt, auch wenn
|
|
17658
|
+
// sich der Wert lange nicht geändert hat. Viele ioBroker-Adapter aktualisieren bei
|
|
17659
|
+
// konstant 0 W nur lc/ts selten oder gar nicht. Diese 0-Werte dürfen deshalb nicht
|
|
17660
|
+
// als "fehlend" verworfen und durch eine Bilanzrechnung ersetzt werden.
|
|
17661
|
+
const readMapped = (key, onlyIfMapped, raw = false) => {
|
|
17638
17662
|
if (onlyIfMapped && !idOf(key)) return null;
|
|
17639
|
-
return
|
|
17663
|
+
return raw
|
|
17664
|
+
? this._nwGetRawNumberFromCache(key, strictStale ? maxAgeMs : null, null, now)
|
|
17665
|
+
: this._nwGetNumberFromCacheFresh(key, strictStale ? maxAgeMs : null, null, now);
|
|
17640
17666
|
};
|
|
17641
17667
|
|
|
17668
|
+
const ageInfo = () => ({
|
|
17669
|
+
batteryPower: this._nwGetCacheAgeMs('batteryPower', now),
|
|
17670
|
+
storageChargePower: this._nwGetCacheAgeMs('storageChargePower', now),
|
|
17671
|
+
storageDischargePower: this._nwGetCacheAgeMs('storageDischargePower', now),
|
|
17672
|
+
});
|
|
17673
|
+
|
|
17642
17674
|
const fromSigned = (signedRaw, src, opts2 = {}) => {
|
|
17643
17675
|
let signed = Number(signedRaw);
|
|
17644
17676
|
if (!Number.isFinite(signed)) signed = 0;
|
|
@@ -17654,24 +17686,22 @@ Technische Details: system.adapter.${c.inst}.alive=false`,
|
|
|
17654
17686
|
inverted: inv,
|
|
17655
17687
|
fromSigned: true,
|
|
17656
17688
|
mirror: opts2.mirror !== false,
|
|
17657
|
-
|
|
17658
|
-
|
|
17659
|
-
storageChargePower: this._nwGetCacheAgeMs('storageChargePower', now),
|
|
17660
|
-
storageDischargePower: this._nwGetCacheAgeMs('storageDischargePower', now),
|
|
17661
|
-
},
|
|
17689
|
+
derived: false,
|
|
17690
|
+
staleMs: ageInfo(),
|
|
17662
17691
|
};
|
|
17663
17692
|
};
|
|
17664
17693
|
|
|
17665
17694
|
const fromBalance = () => {
|
|
17666
17695
|
try {
|
|
17667
17696
|
const balanceDeadbandW = Math.max(180, deadbandW);
|
|
17668
|
-
if (this.
|
|
17697
|
+
if (this._nwStorageFarmIsActiveFromCache && this._nwStorageFarmIsActiveFromCache()) return null;
|
|
17669
17698
|
|
|
17670
17699
|
const soc = this._nwGetNumberFromCache('storageSoc');
|
|
17671
17700
|
if (!Number.isFinite(Number(soc))) return null;
|
|
17672
17701
|
|
|
17673
|
-
// Nur
|
|
17674
|
-
//
|
|
17702
|
+
// Nur wenn eine echte Verbrauchsleistung als DP gemappt ist, kann Speicherleistung
|
|
17703
|
+
// zuverlässig aus der Bilanz abgeleitet werden. Sonst wäre consumptionTotal ggf.
|
|
17704
|
+
// bereits aus derselben Bilanz erzeugt und die Rechnung zirkulär.
|
|
17675
17705
|
const hasDirectLoad = this._nwHasMappedDatapoint('consumptionTotal') || this._nwHasMappedDatapoint('housePower');
|
|
17676
17706
|
if (!hasDirectLoad) return null;
|
|
17677
17707
|
|
|
@@ -17712,41 +17742,22 @@ Technische Details: system.adapter.${c.inst}.alive=false`,
|
|
|
17712
17742
|
src: 'balanceDerived',
|
|
17713
17743
|
inverted: false,
|
|
17714
17744
|
fromSigned: false,
|
|
17745
|
+
derived: true,
|
|
17715
17746
|
mirror: true,
|
|
17716
|
-
staleMs: {
|
|
17717
|
-
balance: 0,
|
|
17718
|
-
batteryPower: this._nwGetCacheAgeMs('batteryPower', now),
|
|
17719
|
-
storageChargePower: this._nwGetCacheAgeMs('storageChargePower', now),
|
|
17720
|
-
storageDischargePower: this._nwGetCacheAgeMs('storageDischargePower', now),
|
|
17721
|
-
},
|
|
17747
|
+
staleMs: Object.assign({ balance: 0 }, ageInfo()),
|
|
17722
17748
|
};
|
|
17723
17749
|
} catch (_eBalance) {
|
|
17724
17750
|
return null;
|
|
17725
17751
|
}
|
|
17726
17752
|
};
|
|
17727
17753
|
|
|
17728
|
-
|
|
17729
|
-
|
|
17730
|
-
|
|
17731
|
-
|
|
17732
|
-
if (!missingLike) return current;
|
|
17733
|
-
const derived = fromBalance();
|
|
17734
|
-
if (!derived) return current;
|
|
17735
|
-
return Object.assign({}, derived, {
|
|
17736
|
-
src: String(derived.src || 'balanceDerived') + (current && current.incomplete ? '+missing-side' : ''),
|
|
17737
|
-
fallbackFor: srcCur || 'missing'
|
|
17738
|
-
});
|
|
17739
|
-
} catch (_ePrefer) {
|
|
17740
|
-
return current;
|
|
17741
|
-
}
|
|
17742
|
-
};
|
|
17743
|
-
|
|
17744
|
-
// Speicherfarm already provides normalized charge/discharge totals. Keep it authoritative
|
|
17745
|
-
// unless a signed single battery datapoint is explicitly mapped for a non-farm setup.
|
|
17746
|
-
const sfEnabled = !!(this.stateCache && this.stateCache['storageFarm.enabled'] && this.stateCache['storageFarm.enabled'].value);
|
|
17754
|
+
// Speicherfarm nur dann als Quelle verwenden, wenn sie in der Admin-Konfiguration
|
|
17755
|
+
// wirklich aktiv ist und konfigurierte Speicher enthält. Ein alter stateCache-Wert
|
|
17756
|
+
// "storageFarm.enabled=true" darf normale Einzelanlagen nicht übernehmen.
|
|
17757
|
+
const sfEnabled = this._nwStorageFarmIsActiveFromCache && this._nwStorageFarmIsActiveFromCache();
|
|
17747
17758
|
if (sfEnabled) {
|
|
17748
|
-
const farmCharge =
|
|
17749
|
-
const farmDischarge =
|
|
17759
|
+
const farmCharge = readMapped('storageFarm.totalChargePowerW', false, false);
|
|
17760
|
+
const farmDischarge = readMapped('storageFarm.totalDischargePowerW', false, false);
|
|
17750
17761
|
if (farmCharge !== null || farmDischarge !== null) {
|
|
17751
17762
|
let c = Math.max(0, Math.abs(Number(farmCharge || 0)));
|
|
17752
17763
|
let d = Math.max(0, Math.abs(Number(farmDischarge || 0)));
|
|
@@ -17758,6 +17769,7 @@ Technische Details: system.adapter.${c.inst}.alive=false`,
|
|
|
17758
17769
|
src: inv ? 'storageFarm(inv)' : 'storageFarm',
|
|
17759
17770
|
inverted: inv,
|
|
17760
17771
|
fromSigned: false,
|
|
17772
|
+
derived: false,
|
|
17761
17773
|
mirror: true,
|
|
17762
17774
|
staleMs: {
|
|
17763
17775
|
farmCharge: this._nwGetCacheAgeMs('storageFarm.totalChargePowerW', now),
|
|
@@ -17767,30 +17779,19 @@ Technische Details: system.adapter.${c.inst}.alive=false`,
|
|
|
17767
17779
|
}
|
|
17768
17780
|
}
|
|
17769
17781
|
|
|
17770
|
-
const batterySigned = batteryMapped ?
|
|
17771
|
-
const chargeRaw = chargeMapped ?
|
|
17772
|
-
const dischargeRaw = dischargeMapped ?
|
|
17782
|
+
const batterySigned = batteryMapped ? readMapped('batteryPower', true, true) : null;
|
|
17783
|
+
const chargeRaw = chargeMapped ? readMapped('storageChargePower', true, true) : null;
|
|
17784
|
+
const dischargeRaw = dischargeMapped ? readMapped('storageDischargePower', true, true) : null;
|
|
17773
17785
|
|
|
17774
|
-
//
|
|
17775
|
-
// updateValue() normalizes their public state values to magnitudes, so the private raw cache is used here.
|
|
17786
|
+
// Beide Split-Felder auf denselben DP gemappt = tatsächlich ein signed DP.
|
|
17776
17787
|
if (sameChargeDischargeId && chargeRaw !== null) {
|
|
17777
|
-
return
|
|
17778
|
-
}
|
|
17779
|
-
|
|
17780
|
-
// Canonical single signed DP fallback: exactly like NVP signed handling.
|
|
17781
|
-
// Use it when no separate channels are mapped, when separate channels are missing/stale,
|
|
17782
|
-
// or when stale/legacy mirrored values would otherwise show both directions at once.
|
|
17783
|
-
const separateAvailable = (chargeRaw !== null || dischargeRaw !== null);
|
|
17784
|
-
const publicCharge = chargeMapped ? fresh('storageChargePower', true) : null;
|
|
17785
|
-
const publicDischarge = dischargeMapped ? fresh('storageDischargePower', true) : null;
|
|
17786
|
-
const bothPublicDirections = (Number(publicCharge || 0) > deadbandW && Number(publicDischarge || 0) > deadbandW);
|
|
17787
|
-
const bothEqualish = bothPublicDirections && Math.abs(Math.abs(Number(publicCharge || 0)) - Math.abs(Number(publicDischarge || 0))) <= Math.max(2, deadbandW);
|
|
17788
|
-
|
|
17789
|
-
if (batterySigned !== null && (!separateAvailable || bothEqualish || (!chargeMapped && !dischargeMapped))) {
|
|
17790
|
-
return preferBalance(fromSigned(batterySigned, bothEqualish ? 'batterySignedOverrideDual' : 'batterySigned', { mirror: true }));
|
|
17788
|
+
return fromSigned(chargeRaw, 'sameChargeDischargeSigned', { mirror: true });
|
|
17791
17789
|
}
|
|
17792
17790
|
|
|
17793
|
-
|
|
17791
|
+
// Getrennte Lade-/Entlade-DPs sind autoritativ. Eine fehlende Seite wird als 0 W
|
|
17792
|
+
// behandelt; sie wird nicht durch Bilanzwerte ersetzt. Das schützt Historie und
|
|
17793
|
+
// Regelung vor verfälschten Speicherwerten bei konstantem/stalem 0-Wert.
|
|
17794
|
+
if (chargeRaw !== null || dischargeRaw !== null) {
|
|
17794
17795
|
let c = chargeRaw !== null ? Math.abs(Number(chargeRaw)) : 0;
|
|
17795
17796
|
let d = dischargeRaw !== null ? Math.abs(Number(dischargeRaw)) : 0;
|
|
17796
17797
|
if (!Number.isFinite(c)) c = 0;
|
|
@@ -17798,41 +17799,43 @@ Technische Details: system.adapter.${c.inst}.alive=false`,
|
|
|
17798
17799
|
if (c <= deadbandW) c = 0;
|
|
17799
17800
|
if (d <= deadbandW) d = 0;
|
|
17800
17801
|
if (inv) { const t = c; c = d; d = t; }
|
|
17801
|
-
|
|
17802
|
-
return preferBalance({
|
|
17802
|
+
return {
|
|
17803
17803
|
chargeW: Math.round(c),
|
|
17804
17804
|
dischargeW: Math.round(d),
|
|
17805
17805
|
signedW: Math.round(d - c),
|
|
17806
17806
|
src: inv ? 'chargeDischarge(inv)' : 'chargeDischarge',
|
|
17807
17807
|
inverted: inv,
|
|
17808
17808
|
fromSigned: false,
|
|
17809
|
-
|
|
17810
|
-
|
|
17811
|
-
staleMs:
|
|
17812
|
-
|
|
17813
|
-
storageDischargePower: this._nwGetCacheAgeMs('storageDischargePower', now),
|
|
17814
|
-
},
|
|
17815
|
-
});
|
|
17809
|
+
derived: false,
|
|
17810
|
+
mirror: false,
|
|
17811
|
+
staleMs: ageInfo(),
|
|
17812
|
+
};
|
|
17816
17813
|
}
|
|
17817
17814
|
|
|
17815
|
+
// Signed Batterie-DP ist der Fallback, wenn keine Split-DPs einen Wert liefern.
|
|
17818
17816
|
if (batterySigned !== null) {
|
|
17819
|
-
return
|
|
17817
|
+
return fromSigned(batterySigned, 'batterySigned', { mirror: true });
|
|
17818
|
+
}
|
|
17819
|
+
|
|
17820
|
+
// Rechen-Fallback nur, wenn überhaupt kein Speicher-DP konfiguriert ist.
|
|
17821
|
+
// Wenn ein Speicher-DP konfiguriert, aber aktuell nicht lesbar ist, zeigen wir keinen
|
|
17822
|
+
// geratenen Wert, damit Historie/Regelung nicht verfälscht werden.
|
|
17823
|
+
if (!anyStorageMapped) {
|
|
17824
|
+
const derived = fromBalance();
|
|
17825
|
+
if (derived) return derived;
|
|
17820
17826
|
}
|
|
17821
17827
|
|
|
17822
|
-
return
|
|
17828
|
+
return {
|
|
17823
17829
|
chargeW: 0,
|
|
17824
17830
|
dischargeW: 0,
|
|
17825
17831
|
signedW: 0,
|
|
17826
|
-
src:
|
|
17832
|
+
src: anyStorageMapped ? 'mapped-missing' : 'missing',
|
|
17827
17833
|
inverted: inv,
|
|
17828
17834
|
fromSigned: false,
|
|
17829
|
-
|
|
17830
|
-
|
|
17831
|
-
|
|
17832
|
-
|
|
17833
|
-
storageDischargePower: this._nwGetCacheAgeMs('storageDischargePower', now),
|
|
17834
|
-
},
|
|
17835
|
-
});
|
|
17835
|
+
derived: false,
|
|
17836
|
+
mirror: !anyStorageMapped,
|
|
17837
|
+
staleMs: ageInfo(),
|
|
17838
|
+
};
|
|
17836
17839
|
}
|
|
17837
17840
|
|
|
17838
17841
|
_nwResolveGridImportExportFromCache() {
|
|
@@ -18032,7 +18035,7 @@ Technische Details: system.adapter.${c.inst}.alive=false`,
|
|
|
18032
18035
|
// In Farm-/DC-Speicher-Setups kommt ein Teil der PV-Leistung direkt aus den Speichersystemen (DC-PV).
|
|
18033
18036
|
// Diese Summe wird unter storageFarm.totalPvPowerW bereitgestellt und soll auch in der Historie/Abrechnung
|
|
18034
18037
|
// zur PV-Erzeugung addiert werden (mit einfacher Double-Count-Heuristik analog zum Energiefluss-Monitor).
|
|
18035
|
-
const sfEnabled = !!this._nwGetNumberFromCache('storageFarm.enabled');
|
|
18038
|
+
const sfEnabled = this._nwStorageFarmIsActiveFromCache ? this._nwStorageFarmIsActiveFromCache() : !!this._nwGetNumberFromCache('storageFarm.enabled');
|
|
18036
18039
|
const pvFarmW = this._nwGetNumberFromCache('storageFarm.totalPvPowerW');
|
|
18037
18040
|
if (sfEnabled && Number.isFinite(pvFarmW) && pvFarmW > 0) {
|
|
18038
18041
|
const farmAbs = Math.abs(pvFarmW);
|
|
@@ -19110,7 +19113,7 @@ Technische Details: system.adapter.${c.inst}.alive=false`,
|
|
|
19110
19113
|
}
|
|
19111
19114
|
|
|
19112
19115
|
// --- PV (DC) from Speicherfarm (optional) ---
|
|
19113
|
-
const sfEnabled = !!(this.stateCache?.['storageFarm.enabled'] && this.stateCache['storageFarm.enabled'].value);
|
|
19116
|
+
const sfEnabled = this._nwStorageFarmIsActiveFromCache ? this._nwStorageFarmIsActiveFromCache() : !!(this.stateCache?.['storageFarm.enabled'] && this.stateCache['storageFarm.enabled'].value);
|
|
19114
19117
|
let pvDcW = 0;
|
|
19115
19118
|
if (sfEnabled) {
|
|
19116
19119
|
const dc = this._nwGetNumberFromCache('storageFarm.totalPvPowerW');
|
|
@@ -19352,27 +19355,42 @@ Technische Details: system.adapter.${c.inst}.alive=false`,
|
|
|
19352
19355
|
}
|
|
19353
19356
|
}
|
|
19354
19357
|
|
|
19355
|
-
// 4)
|
|
19356
|
-
//
|
|
19357
|
-
//
|
|
19358
|
+
// 4) Mirror normalized storage values only where it is safe:
|
|
19359
|
+
// - signed DP -> public split states (when split DPs are not mapped)
|
|
19360
|
+
// - storage farm / calculated fallback -> public states (when no real split DP owns them)
|
|
19361
|
+
// - same DP in charge+discharge fields -> overwrite both with the normalized split
|
|
19362
|
+
// Real separate charge/discharge DPs are never overwritten by a fallback calculation.
|
|
19358
19363
|
try {
|
|
19359
19364
|
const dps = (this.config && this.config.datapoints) || {};
|
|
19360
19365
|
const chargeMapped = !!String(dps.storageChargePower || '').trim();
|
|
19361
19366
|
const dischargeMapped = !!String(dps.storageDischargePower || '').trim();
|
|
19367
|
+
const batteryMapped = !!String(dps.batteryPower || '').trim();
|
|
19362
19368
|
const samePair = chargeMapped && dischargeMapped && String(dps.storageChargePower || '').trim() === String(dps.storageDischargePower || '').trim();
|
|
19363
|
-
const
|
|
19369
|
+
const src = String(storageFlow && storageFlow.src || '');
|
|
19370
|
+
const fromSignedOnly = !!(storageFlow && storageFlow.fromSigned && !chargeMapped && !dischargeMapped);
|
|
19371
|
+
const fromFarmOrBalance = !!(storageFlow && (src.indexOf('storageFarm') === 0 || src.indexOf('balanceDerived') === 0));
|
|
19372
|
+
const noSplitMapped = !chargeMapped && !dischargeMapped;
|
|
19373
|
+
const shouldMirrorBoth = !!(samePair || fromSignedOnly || (noSplitMapped && fromFarmOrBalance));
|
|
19374
|
+
const shouldZeroMissingSide = !!(storageFlow && !storageFlow.derived && (chargeMapped !== dischargeMapped));
|
|
19364
19375
|
const chargeRound = Math.round(chargeW);
|
|
19365
19376
|
const dischargeRound = Math.round(dischargeW);
|
|
19366
|
-
|
|
19367
|
-
const
|
|
19368
|
-
|
|
19369
|
-
|
|
19370
|
-
|
|
19371
|
-
|
|
19372
|
-
|
|
19377
|
+
const updateLocal = (k, v) => {
|
|
19378
|
+
const cur = Number(this.stateCache?.[k]?.value);
|
|
19379
|
+
if (!Number.isFinite(cur) || cur !== v) this.updateValue(k, v, ts, { raw: false });
|
|
19380
|
+
};
|
|
19381
|
+
if (shouldMirrorBoth) {
|
|
19382
|
+
updateLocal('storageChargePower', chargeRound);
|
|
19383
|
+
updateLocal('storageDischargePower', dischargeRound);
|
|
19384
|
+
} else if (shouldZeroMissingSide) {
|
|
19385
|
+
if (!chargeMapped) updateLocal('storageChargePower', chargeRound);
|
|
19386
|
+
if (!dischargeMapped) updateLocal('storageDischargePower', dischargeRound);
|
|
19387
|
+
}
|
|
19388
|
+
// batteryPower is an internal signed convenience value when no signed DP is mapped.
|
|
19389
|
+
// It may be derived from valid split DPs, farm totals or a calculated fallback, but
|
|
19390
|
+
// it must never overwrite a configured signed battery DP.
|
|
19391
|
+
if (!batteryMapped) {
|
|
19373
19392
|
const signedRound = Math.round(dischargeW - chargeW);
|
|
19374
|
-
|
|
19375
|
-
if (!Number.isFinite(curB) || curB !== signedRound) this.updateValue('batteryPower', signedRound, ts, { raw: false });
|
|
19393
|
+
updateLocal('batteryPower', signedRound);
|
|
19376
19394
|
}
|
|
19377
19395
|
} catch (_eStorageMirror) {}
|
|
19378
19396
|
}
|
package/package.json
CHANGED
package/www/app.js
CHANGED
|
@@ -2040,6 +2040,12 @@ function getFreshFlowNumber(key, opts = {}) {
|
|
|
2040
2040
|
return n;
|
|
2041
2041
|
}
|
|
2042
2042
|
|
|
2043
|
+
function getStableFlowNumber(key, opts = {}) {
|
|
2044
|
+
// Kern-Energiefluss-DPs dürfen nicht als fehlend gelten, nur weil ein konstanter
|
|
2045
|
+
// Wert (typisch 0 W bei Speicher Laden/Entladen) lange nicht geändert wurde.
|
|
2046
|
+
return getFreshFlowNumber(key, Object.assign({}, opts, { maxAgeMs: null }));
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2043
2049
|
function getConfiguredDatapointId(key) {
|
|
2044
2050
|
try {
|
|
2045
2051
|
const cfg = window.__nwCfg || {};
|
|
@@ -2057,7 +2063,7 @@ function getBalanceDerivedBatteryFlow(opts = {}) {
|
|
|
2057
2063
|
const read = (k) => st && st[k] ? st[k].value : undefined;
|
|
2058
2064
|
|
|
2059
2065
|
// In Speicherfarm-Anlagen sind die Farm-Summen die Quelle der Wahrheit.
|
|
2060
|
-
if (
|
|
2066
|
+
if (nwStorageFarmFeatureFromConfig(window.__nwCfg || {}, st)) return null;
|
|
2061
2067
|
|
|
2062
2068
|
const soc = coerceNumber(read('storageSoc') ?? read('batterySOC'));
|
|
2063
2069
|
if (soc === null) return null;
|
|
@@ -2132,6 +2138,7 @@ function getNormalizedBatteryFlow() {
|
|
|
2132
2138
|
const chargeMapped = !!chargeId;
|
|
2133
2139
|
const dischargeMapped = !!dischargeId;
|
|
2134
2140
|
const batteryMapped = !!batteryId;
|
|
2141
|
+
const anyStorageMapped = chargeMapped || dischargeMapped || batteryMapped;
|
|
2135
2142
|
const samePair = !!(chargeMapped && dischargeMapped && chargeId === dischargeId);
|
|
2136
2143
|
|
|
2137
2144
|
const fromSigned = (raw, src) => {
|
|
@@ -2145,59 +2152,59 @@ function getNormalizedBatteryFlow() {
|
|
|
2145
2152
|
signedW: signed,
|
|
2146
2153
|
src,
|
|
2147
2154
|
inverted: inv,
|
|
2155
|
+
fromSigned: true,
|
|
2156
|
+
derived: false,
|
|
2148
2157
|
};
|
|
2149
2158
|
};
|
|
2150
2159
|
|
|
2151
|
-
const sfEnabled =
|
|
2160
|
+
const sfEnabled = nwStorageFarmFeatureFromConfig(window.__nwCfg || {}, state || window.latestState || {});
|
|
2152
2161
|
if (sfEnabled) {
|
|
2153
|
-
const fc =
|
|
2154
|
-
const fd =
|
|
2162
|
+
const fc = getStableFlowNumber('storageFarm.totalChargePowerW');
|
|
2163
|
+
const fd = getStableFlowNumber('storageFarm.totalDischargePowerW');
|
|
2155
2164
|
if (fc !== null || fd !== null) {
|
|
2156
2165
|
let c = Math.max(0, Math.abs(Number(fc || 0)));
|
|
2157
2166
|
let d = Math.max(0, Math.abs(Number(fd || 0)));
|
|
2158
2167
|
if (inv) { const t = c; c = d; d = t; }
|
|
2159
2168
|
if (c <= deadbandW) c = 0;
|
|
2160
2169
|
if (d <= deadbandW) d = 0;
|
|
2161
|
-
return { chargeW: c, dischargeW: d, signedW: d - c, src: inv ? 'storageFarm(inv)' : 'storageFarm', inverted: inv };
|
|
2170
|
+
return { chargeW: c, dischargeW: d, signedW: d - c, src: inv ? 'storageFarm(inv)' : 'storageFarm', inverted: inv, fromSigned: false, derived: false };
|
|
2162
2171
|
}
|
|
2163
2172
|
}
|
|
2164
2173
|
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
const
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
const separateAvailable = (charge !== null || discharge !== null);
|
|
2172
|
-
const bothDirections = Math.abs(Number(charge || 0)) > deadbandW && Math.abs(Number(discharge || 0)) > deadbandW;
|
|
2173
|
-
const bothEqualish = bothDirections && Math.abs(Math.abs(Number(charge || 0)) - Math.abs(Number(discharge || 0))) <= Math.max(2, deadbandW);
|
|
2174
|
+
// Gemappte Speicher-DPs stabil lesen: ein unveränderter 0-Wert darf nicht wegen
|
|
2175
|
+
// seines Alters verworfen und durch eine Bilanzrechnung ersetzt werden.
|
|
2176
|
+
const signedBattery = batteryMapped ? getStableFlowNumber('batteryPower') : null;
|
|
2177
|
+
const charge = chargeMapped ? getStableFlowNumber('storageChargePower') : null;
|
|
2178
|
+
const discharge = dischargeMapped ? getStableFlowNumber('storageDischargePower') : null;
|
|
2174
2179
|
|
|
2175
|
-
if (
|
|
2176
|
-
return preferBalanceDerivedBatteryFlow(fromSigned(signedBattery, bothEqualish ? 'batterySignedOverrideDual' : 'batterySigned'), { deadbandW });
|
|
2177
|
-
}
|
|
2180
|
+
if (samePair && charge !== null) return fromSigned(charge, 'sameChargeDischargeSigned');
|
|
2178
2181
|
|
|
2179
|
-
if (
|
|
2182
|
+
if (charge !== null || discharge !== null) {
|
|
2180
2183
|
let c = Math.max(0, Math.abs(Number(charge || 0)));
|
|
2181
2184
|
let d = Math.max(0, Math.abs(Number(discharge || 0)));
|
|
2182
2185
|
if (c <= deadbandW) c = 0;
|
|
2183
2186
|
if (d <= deadbandW) d = 0;
|
|
2184
2187
|
if (inv) { const t = c; c = d; d = t; }
|
|
2185
|
-
|
|
2186
|
-
return preferBalanceDerivedBatteryFlow({ chargeW: c, dischargeW: d, signedW: d - c, src: inv ? 'chargeDischarge(inv)' : 'chargeDischarge', inverted: inv, incomplete: !completePair }, { deadbandW });
|
|
2188
|
+
return { chargeW: c, dischargeW: d, signedW: d - c, src: inv ? 'chargeDischarge(inv)' : 'chargeDischarge', inverted: inv, fromSigned: false, derived: false };
|
|
2187
2189
|
}
|
|
2188
2190
|
|
|
2189
|
-
if (signedBattery !== null) return
|
|
2191
|
+
if (signedBattery !== null) return fromSigned(signedBattery, 'batterySigned');
|
|
2190
2192
|
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
+
// Rechen-Fallback nur bei wirklich nicht konfiguriertem Speicher-DP.
|
|
2194
|
+
if (!anyStorageMapped) {
|
|
2195
|
+
const derived = getBalanceDerivedBatteryFlow({ deadbandW: Math.max(180, deadbandW) });
|
|
2196
|
+
if (derived) return derived;
|
|
2197
|
+
}
|
|
2193
2198
|
|
|
2199
|
+
return { chargeW: 0, dischargeW: 0, signedW: 0, src: anyStorageMapped ? 'mapped-missing' : 'missing', inverted: inv, fromSigned: false, derived: false };
|
|
2200
|
+
}
|
|
2194
2201
|
function render() {
|
|
2195
2202
|
const s = state;
|
|
2196
2203
|
|
|
2197
2204
|
const d = (k) => s[k]?.value;
|
|
2198
2205
|
|
|
2199
2206
|
// Top ring values: map PV, Grid, Load, Bat flows to percent of max for visualization
|
|
2200
|
-
const sfEnabled =
|
|
2207
|
+
const sfEnabled = nwStorageFarmFeatureFromConfig(window.__nwCfg || {}, s || state || {});
|
|
2201
2208
|
const pvMapped = isMappedDatapoint('pvPower') || isMappedDatapoint('productionTotal');
|
|
2202
2209
|
|
|
2203
2210
|
// PV (W): primary from mapped PV datapoint; fallback to productionTotal if used as power DP.
|
|
@@ -6026,7 +6033,7 @@ function updateEnergyWeb() {
|
|
|
6026
6033
|
const s = window.latestState || {};
|
|
6027
6034
|
|
|
6028
6035
|
// Raw datapoints (1:1)
|
|
6029
|
-
const sfEnabled =
|
|
6036
|
+
const sfEnabled = nwStorageFarmFeatureFromConfig(window.__nwCfg || {}, s || state || {});
|
|
6030
6037
|
const pvMapped = isMappedDatapoint('pvPower') || isMappedDatapoint('productionTotal');
|
|
6031
6038
|
|
|
6032
6039
|
// PV (W): primary from mapped PV datapoint; fallback to productionTotal if used as power DP.
|
package/www/history.html
CHANGED
|
@@ -194,24 +194,28 @@
|
|
|
194
194
|
<button class="btn sm" type="button" onclick="window.location.href='year-report.html'">Jahresreport</button>
|
|
195
195
|
</div>
|
|
196
196
|
</section>
|
|
197
|
-
<div class="toolbar">
|
|
198
|
-
<div class="range">
|
|
197
|
+
<div class="toolbar history-toolbar">
|
|
198
|
+
<div class="range history-toolbar__range" aria-label="Zeitraum">
|
|
199
199
|
<button class="btn sm range-btn active" data-range="day">Tag</button>
|
|
200
200
|
<button class="btn sm range-btn" data-range="week">Woche</button>
|
|
201
201
|
<button class="btn sm range-btn" data-range="month">Monat</button>
|
|
202
202
|
<button class="btn sm range-btn" data-range="year">Jahr</button>
|
|
203
203
|
</div>
|
|
204
|
-
<
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
204
|
+
<div class="history-toolbar__date">
|
|
205
|
+
<button id="navPrev" class="btn sm" title="Zurück" aria-label="Vorheriger Zeitraum">◀</button>
|
|
206
|
+
<label><span>Datum</span><input type="date" id="day"></label>
|
|
207
|
+
<button id="navNext" class="btn sm" title="Weiter" aria-label="Nächster Zeitraum">▶</button>
|
|
208
|
+
</div>
|
|
209
|
+
<div class="history-toolbar__actions" aria-label="Aktionen">
|
|
210
|
+
<button id="resetZoomBtn" class="btn sm hidden" title="Zoom zurücksetzen">Zoom zurück</button>
|
|
211
|
+
<button id="stackToggle" class="btn sm active" title="Stapel/Fläche an/aus">Stapel</button>
|
|
212
|
+
<!-- Zeitfilter bleiben intern erhalten (für Zoom/Reset), werden aber nicht mehr im UI gezeigt -->
|
|
213
|
+
<label class="hidden">Von: <input type="datetime-local" id="from"></label>
|
|
214
|
+
<label class="hidden">Bis: <input type="datetime-local" id="to"></label>
|
|
215
|
+
<button id="loadBtn" class="btn sm">Laden</button>
|
|
216
|
+
<button id="evcsReportBtn" class="btn sm hidden" data-feature="evcs">EVCS PDF</button>
|
|
217
|
+
<button id="yearReportBtn" class="btn sm">Jahresreport</button>
|
|
218
|
+
</div>
|
|
215
219
|
</div>
|
|
216
220
|
<canvas id="chart"></canvas>
|
|
217
221
|
<div class="legend" id="mainLegend">
|
|
@@ -220,7 +224,7 @@
|
|
|
220
224
|
<div class="lg" data-series="dchg" data-label="Entladung"><div class="sw dchg"></div><span>Entladung</span></div>
|
|
221
225
|
<div class="lg" data-series="sell" data-label="Einspeisung"><div class="sw sell"></div><span>Einspeisung</span></div>
|
|
222
226
|
<div class="lg" data-series="buy" data-label="Bezug"><div class="sw buy"></div><span>Bezug</span></div>
|
|
223
|
-
<div class="lg" data-series="evcs" data-label="E‑Mobilität"><div class="sw evcs"></div><span>E‑Mobilität</span></div>
|
|
227
|
+
<div class="lg hidden" data-feature="evcs" data-series="evcs" data-label="E‑Mobilität"><div class="sw evcs"></div><span>E‑Mobilität</span></div>
|
|
224
228
|
<div class="lg" data-series="load" data-label="Verbrauch"><div class="sw load"></div><span>Verbrauch</span></div>
|
|
225
229
|
<div class="lg" data-series="soc" data-label="Ladezustand"><div class="sw soc"></div><span>Ladezustand</span></div>
|
|
226
230
|
</div>
|
package/www/history.js
CHANGED
|
@@ -2260,12 +2260,16 @@ async function load(force = false){
|
|
|
2260
2260
|
const evcsAvailable = ((Number(sc.evcsConfiguredCount || 0) || (Array.isArray(sc.evcsList) ? sc.evcsList.filter(function(r){ if(!r || r.enabled === false) return false; return ['powerId','energyTotalId','energySessionId','statusId','activeId','onlineId','setCurrentAId','setPowerWId','enableWriteId','lockWriteId','rfidReadId','vehicleSocId'].some(function(k){ return String(r[k] || '').trim(); }); }).length : 0)) > 0);
|
|
2261
2261
|
const c = evcsAvailable ? Math.max(0, Math.round(Number(sc.evcsCount) || 0)) : 0;
|
|
2262
2262
|
const showEvcs = evcsAvailable && c >= 2;
|
|
2263
|
+
const showEvcsHistory = evcsAvailable && c >= 1;
|
|
2263
2264
|
const l = document.getElementById('menuEvcsLink');
|
|
2264
2265
|
if (l) l.classList.toggle('hidden', !showEvcs);
|
|
2265
2266
|
const t = document.getElementById('tabEvcs');
|
|
2266
2267
|
if (t) t.classList.toggle('hidden', !showEvcs);
|
|
2267
2268
|
const n = document.getElementById('nav-evcs');
|
|
2268
2269
|
if (n) n.classList.toggle('hidden', !showEvcs);
|
|
2270
|
+
document.querySelectorAll('[data-feature="evcs"]').forEach(function(el){
|
|
2271
|
+
el.classList.toggle('hidden', !showEvcsHistory);
|
|
2272
|
+
});
|
|
2269
2273
|
const sh = !!((cfg.smartHome && cfg.smartHome.enabled) || cfg.smartHomeEnabled);
|
|
2270
2274
|
const sl = document.getElementById('menuSmartHomeLink');
|
|
2271
2275
|
if (sl) sl.classList.toggle('hidden', !sh);
|
package/www/manifest.webmanifest
CHANGED
package/www/smarthome.html
CHANGED
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
|
|
82
82
|
<!-- Filter-/Chip-Leiste bewusst entfernt (Endkunden-UI soll clean bleiben). -->
|
|
83
83
|
|
|
84
|
-
<div id="nw-smarthome-empty" class="nw-sh-empty"
|
|
84
|
+
<div id="nw-smarthome-empty" class="nw-sh-empty nw-sh-empty--loading">SmartHome wird geladen …</div>
|
|
85
85
|
<div id="nw-smarthome-rooms" class="nw-sh-rooms"></div>
|
|
86
86
|
</section>
|
|
87
87
|
</div>
|
package/www/smarthome.js
CHANGED
|
@@ -3238,11 +3238,14 @@ function nwShowEmptyState(show, ctx) {
|
|
|
3238
3238
|
if (!empty) return;
|
|
3239
3239
|
|
|
3240
3240
|
if (!show) {
|
|
3241
|
+
empty.classList.remove('nw-sh-empty--loading');
|
|
3241
3242
|
empty.style.display = 'none';
|
|
3242
3243
|
empty.textContent = '';
|
|
3243
3244
|
return;
|
|
3244
3245
|
}
|
|
3245
3246
|
|
|
3247
|
+
empty.classList.remove('nw-sh-empty--loading');
|
|
3248
|
+
|
|
3246
3249
|
const enabled = (typeof ctx?.enabled === 'boolean')
|
|
3247
3250
|
? ctx.enabled
|
|
3248
3251
|
: (typeof nwSmartHomeEnabled === 'boolean' ? nwSmartHomeEnabled : null);
|
|
@@ -8359,6 +8362,14 @@ async function nwReloadDevices(opts) {
|
|
|
8359
8362
|
nwApplyFiltersAndRender();
|
|
8360
8363
|
} catch (e) {
|
|
8361
8364
|
console.error('SmartHome reload error:', e);
|
|
8365
|
+
nwShowEmptyState(true, { enabled: nwSmartHomeEnabled, reason: 'load-error' });
|
|
8366
|
+
const empty = document.getElementById('nw-smarthome-empty');
|
|
8367
|
+
if (empty) {
|
|
8368
|
+
empty.innerHTML = [
|
|
8369
|
+
'⚠️ <b>SmartHome-Daten konnten nicht geladen werden.</b><br/>',
|
|
8370
|
+
'<span style="opacity:0.85">Bitte Verbindung/API prüfen und die Seite neu laden.</span>'
|
|
8371
|
+
].join('');
|
|
8372
|
+
}
|
|
8362
8373
|
} finally {
|
|
8363
8374
|
nwReloadInFlight = false;
|
|
8364
8375
|
}
|
package/www/styles.css
CHANGED
|
@@ -10917,3 +10917,361 @@ body.nw-page-ems-apps .nw-heatingrod-stage-dp-row .nw-config-dp-input-wrapper .n
|
|
|
10917
10917
|
min-width:520px !important;
|
|
10918
10918
|
}
|
|
10919
10919
|
}
|
|
10920
|
+
|
|
10921
|
+
/* =====================================================================
|
|
10922
|
+
NexoWatt EMS 0.7.49 – Mobile VIS Hotfix
|
|
10923
|
+
- History toolbar ohne horizontales Wegscrollen auf Smartphone
|
|
10924
|
+
- SmartHome Mobile Drawer/Content wird zuverlässig sichtbar
|
|
10925
|
+
- EVCS-History-Aktionen nur anzeigen, wenn wirklich Ladepunkte vorhanden sind
|
|
10926
|
+
===================================================================== */
|
|
10927
|
+
body.nw-page-history,
|
|
10928
|
+
body.nw-page-smarthome{
|
|
10929
|
+
overflow-x:hidden !important;
|
|
10930
|
+
}
|
|
10931
|
+
|
|
10932
|
+
/* History: strukturiert statt langer, horizontaler Button-Leiste. */
|
|
10933
|
+
body.nw-page-history .history-toolbar,
|
|
10934
|
+
body.nw-cockpit-page.nw-page-history .history-toolbar{
|
|
10935
|
+
display:grid !important;
|
|
10936
|
+
grid-template-columns:minmax(260px, auto) minmax(280px, 1fr) minmax(260px, auto) !important;
|
|
10937
|
+
align-items:center !important;
|
|
10938
|
+
gap:10px !important;
|
|
10939
|
+
overflow:visible !important;
|
|
10940
|
+
flex-wrap:unset !important;
|
|
10941
|
+
}
|
|
10942
|
+
body.nw-page-history .history-toolbar__range,
|
|
10943
|
+
body.nw-cockpit-page.nw-page-history .history-toolbar__range,
|
|
10944
|
+
body.nw-page-history .history-toolbar__date,
|
|
10945
|
+
body.nw-cockpit-page.nw-page-history .history-toolbar__date,
|
|
10946
|
+
body.nw-page-history .history-toolbar__actions,
|
|
10947
|
+
body.nw-cockpit-page.nw-page-history .history-toolbar__actions{
|
|
10948
|
+
min-width:0 !important;
|
|
10949
|
+
width:100% !important;
|
|
10950
|
+
}
|
|
10951
|
+
body.nw-page-history .history-toolbar__range,
|
|
10952
|
+
body.nw-cockpit-page.nw-page-history .history-toolbar__range{
|
|
10953
|
+
display:grid !important;
|
|
10954
|
+
grid-template-columns:repeat(4, minmax(0, 1fr)) !important;
|
|
10955
|
+
gap:8px !important;
|
|
10956
|
+
}
|
|
10957
|
+
body.nw-page-history .history-toolbar__date,
|
|
10958
|
+
body.nw-cockpit-page.nw-page-history .history-toolbar__date{
|
|
10959
|
+
display:grid !important;
|
|
10960
|
+
grid-template-columns:44px minmax(160px, 1fr) 44px !important;
|
|
10961
|
+
gap:8px !important;
|
|
10962
|
+
align-items:stretch !important;
|
|
10963
|
+
}
|
|
10964
|
+
body.nw-page-history .history-toolbar__date label,
|
|
10965
|
+
body.nw-cockpit-page.nw-page-history .history-toolbar__date label{
|
|
10966
|
+
display:grid !important;
|
|
10967
|
+
grid-template-columns:auto minmax(0, 1fr) !important;
|
|
10968
|
+
gap:8px !important;
|
|
10969
|
+
align-items:center !important;
|
|
10970
|
+
width:100% !important;
|
|
10971
|
+
min-width:0 !important;
|
|
10972
|
+
}
|
|
10973
|
+
body.nw-page-history .history-toolbar__date label span,
|
|
10974
|
+
body.nw-cockpit-page.nw-page-history .history-toolbar__date label span{
|
|
10975
|
+
font-size:12px !important;
|
|
10976
|
+
font-weight:850 !important;
|
|
10977
|
+
color:rgba(203,213,225,.78) !important;
|
|
10978
|
+
white-space:nowrap !important;
|
|
10979
|
+
}
|
|
10980
|
+
body.nw-page-history .history-toolbar__actions,
|
|
10981
|
+
body.nw-cockpit-page.nw-page-history .history-toolbar__actions{
|
|
10982
|
+
display:flex !important;
|
|
10983
|
+
justify-content:flex-end !important;
|
|
10984
|
+
gap:8px !important;
|
|
10985
|
+
flex-wrap:wrap !important;
|
|
10986
|
+
}
|
|
10987
|
+
body.nw-page-history .history-toolbar .btn,
|
|
10988
|
+
body.nw-cockpit-page.nw-page-history .history-toolbar .btn{
|
|
10989
|
+
min-height:38px !important;
|
|
10990
|
+
min-width:0 !important;
|
|
10991
|
+
display:inline-flex !important;
|
|
10992
|
+
align-items:center !important;
|
|
10993
|
+
justify-content:center !important;
|
|
10994
|
+
white-space:nowrap !important;
|
|
10995
|
+
}
|
|
10996
|
+
body.nw-page-history .history-toolbar input[type="date"],
|
|
10997
|
+
body.nw-cockpit-page.nw-page-history .history-toolbar input[type="date"]{
|
|
10998
|
+
min-width:0 !important;
|
|
10999
|
+
width:100% !important;
|
|
11000
|
+
}
|
|
11001
|
+
|
|
11002
|
+
@media (max-width: 1060px){
|
|
11003
|
+
body.nw-page-history .history-toolbar,
|
|
11004
|
+
body.nw-cockpit-page.nw-page-history .history-toolbar{
|
|
11005
|
+
grid-template-columns:1fr !important;
|
|
11006
|
+
}
|
|
11007
|
+
body.nw-page-history .history-toolbar__actions,
|
|
11008
|
+
body.nw-cockpit-page.nw-page-history .history-toolbar__actions{
|
|
11009
|
+
justify-content:stretch !important;
|
|
11010
|
+
}
|
|
11011
|
+
body.nw-page-history .history-toolbar__actions > .btn,
|
|
11012
|
+
body.nw-cockpit-page.nw-page-history .history-toolbar__actions > .btn{
|
|
11013
|
+
flex:1 1 140px !important;
|
|
11014
|
+
}
|
|
11015
|
+
}
|
|
11016
|
+
|
|
11017
|
+
@media (max-width: 640px){
|
|
11018
|
+
body.nw-page-history .hist-wrap,
|
|
11019
|
+
body.nw-cockpit-page.nw-page-history .hist-wrap{
|
|
11020
|
+
width:100% !important;
|
|
11021
|
+
max-width:100% !important;
|
|
11022
|
+
padding:8px !important;
|
|
11023
|
+
}
|
|
11024
|
+
body.nw-page-history .nw-page-hero,
|
|
11025
|
+
body.nw-cockpit-page.nw-page-history .nw-page-hero{
|
|
11026
|
+
padding:14px !important;
|
|
11027
|
+
border-radius:20px !important;
|
|
11028
|
+
}
|
|
11029
|
+
body.nw-page-history .nw-page-hero h1,
|
|
11030
|
+
body.nw-page-history .nw-page-hero h2,
|
|
11031
|
+
body.nw-cockpit-page.nw-page-history .nw-page-hero h1,
|
|
11032
|
+
body.nw-cockpit-page.nw-page-history .nw-page-hero h2{
|
|
11033
|
+
font-size:clamp(26px, 8.2vw, 34px) !important;
|
|
11034
|
+
line-height:1.04 !important;
|
|
11035
|
+
}
|
|
11036
|
+
body.nw-page-history .nw-page-hero__actions,
|
|
11037
|
+
body.nw-cockpit-page.nw-page-history .nw-page-hero__actions{
|
|
11038
|
+
display:grid !important;
|
|
11039
|
+
grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
|
|
11040
|
+
gap:8px !important;
|
|
11041
|
+
width:100% !important;
|
|
11042
|
+
}
|
|
11043
|
+
body.nw-page-history .nw-page-hero__actions .btn,
|
|
11044
|
+
body.nw-cockpit-page.nw-page-history .nw-page-hero__actions .btn{
|
|
11045
|
+
min-height:46px !important;
|
|
11046
|
+
border-radius:16px !important;
|
|
11047
|
+
}
|
|
11048
|
+
body.nw-page-history .history-toolbar,
|
|
11049
|
+
body.nw-cockpit-page.nw-page-history .history-toolbar{
|
|
11050
|
+
padding:12px !important;
|
|
11051
|
+
border-radius:20px !important;
|
|
11052
|
+
overflow:visible !important;
|
|
11053
|
+
}
|
|
11054
|
+
body.nw-page-history .history-toolbar__range,
|
|
11055
|
+
body.nw-cockpit-page.nw-page-history .history-toolbar__range{
|
|
11056
|
+
grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
|
|
11057
|
+
}
|
|
11058
|
+
body.nw-page-history .history-toolbar__date,
|
|
11059
|
+
body.nw-cockpit-page.nw-page-history .history-toolbar__date{
|
|
11060
|
+
grid-template-columns:46px minmax(0, 1fr) 46px !important;
|
|
11061
|
+
}
|
|
11062
|
+
body.nw-page-history .history-toolbar__date label,
|
|
11063
|
+
body.nw-cockpit-page.nw-page-history .history-toolbar__date label{
|
|
11064
|
+
grid-template-columns:1fr !important;
|
|
11065
|
+
gap:5px !important;
|
|
11066
|
+
}
|
|
11067
|
+
body.nw-page-history .history-toolbar__actions,
|
|
11068
|
+
body.nw-cockpit-page.nw-page-history .history-toolbar__actions{
|
|
11069
|
+
display:grid !important;
|
|
11070
|
+
grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
|
|
11071
|
+
gap:8px !important;
|
|
11072
|
+
}
|
|
11073
|
+
body.nw-page-history .history-toolbar__actions > .btn,
|
|
11074
|
+
body.nw-cockpit-page.nw-page-history .history-toolbar__actions > .btn{
|
|
11075
|
+
width:100% !important;
|
|
11076
|
+
min-height:46px !important;
|
|
11077
|
+
border-radius:16px !important;
|
|
11078
|
+
padding:0 10px !important;
|
|
11079
|
+
}
|
|
11080
|
+
body.nw-page-history .legend,
|
|
11081
|
+
body.nw-cockpit-page.nw-page-history .legend{
|
|
11082
|
+
display:grid !important;
|
|
11083
|
+
grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
|
|
11084
|
+
gap:8px !important;
|
|
11085
|
+
}
|
|
11086
|
+
body.nw-page-history .legend .lg,
|
|
11087
|
+
body.nw-cockpit-page.nw-page-history .legend .lg{
|
|
11088
|
+
min-width:0 !important;
|
|
11089
|
+
justify-content:center !important;
|
|
11090
|
+
padding:8px 10px !important;
|
|
11091
|
+
overflow:hidden !important;
|
|
11092
|
+
}
|
|
11093
|
+
body.nw-page-history .legend .lg span,
|
|
11094
|
+
body.nw-cockpit-page.nw-page-history .legend .lg span{
|
|
11095
|
+
overflow:hidden !important;
|
|
11096
|
+
text-overflow:ellipsis !important;
|
|
11097
|
+
white-space:nowrap !important;
|
|
11098
|
+
}
|
|
11099
|
+
}
|
|
11100
|
+
|
|
11101
|
+
@media (max-width: 390px){
|
|
11102
|
+
body.nw-page-history .history-toolbar__actions,
|
|
11103
|
+
body.nw-cockpit-page.nw-page-history .history-toolbar__actions,
|
|
11104
|
+
body.nw-page-history .legend,
|
|
11105
|
+
body.nw-cockpit-page.nw-page-history .legend{
|
|
11106
|
+
grid-template-columns:1fr !important;
|
|
11107
|
+
}
|
|
11108
|
+
}
|
|
11109
|
+
|
|
11110
|
+
/* SmartHome Mobile: Der linke Bereich ist auf Smartphone ein Drawer, nicht
|
|
11111
|
+
Teil des Seitenflusses. So verschwindet die eigentliche Geräteansicht nicht
|
|
11112
|
+
unter einer großen leeren Fläche. */
|
|
11113
|
+
#nw-smarthome-empty.nw-sh-empty--loading{
|
|
11114
|
+
display:block !important;
|
|
11115
|
+
min-height:96px !important;
|
|
11116
|
+
padding:18px !important;
|
|
11117
|
+
color:rgba(226,232,240,.86) !important;
|
|
11118
|
+
}
|
|
11119
|
+
|
|
11120
|
+
@media (max-width: 900px){
|
|
11121
|
+
body.nw-page-smarthome main.nw-page-shell,
|
|
11122
|
+
body.nw-cockpit-page.nw-page-smarthome main.nw-page-shell{
|
|
11123
|
+
width:100% !important;
|
|
11124
|
+
max-width:100% !important;
|
|
11125
|
+
padding:8px !important;
|
|
11126
|
+
gap:12px !important;
|
|
11127
|
+
overflow:hidden !important;
|
|
11128
|
+
}
|
|
11129
|
+
body.nw-page-smarthome #nw-smarthome-root,
|
|
11130
|
+
body.nw-cockpit-page.nw-page-smarthome #nw-smarthome-root{
|
|
11131
|
+
min-height:0 !important;
|
|
11132
|
+
width:100% !important;
|
|
11133
|
+
padding:0 !important;
|
|
11134
|
+
overflow:visible !important;
|
|
11135
|
+
}
|
|
11136
|
+
body.nw-page-smarthome .nw-sh-layout,
|
|
11137
|
+
body.nw-cockpit-page.nw-page-smarthome .nw-sh-layout{
|
|
11138
|
+
display:block !important;
|
|
11139
|
+
grid-template-columns:1fr !important;
|
|
11140
|
+
gap:0 !important;
|
|
11141
|
+
min-width:0 !important;
|
|
11142
|
+
width:100% !important;
|
|
11143
|
+
}
|
|
11144
|
+
body.nw-page-smarthome .nw-sh-main,
|
|
11145
|
+
body.nw-cockpit-page.nw-page-smarthome .nw-sh-main{
|
|
11146
|
+
display:block !important;
|
|
11147
|
+
width:100% !important;
|
|
11148
|
+
min-width:0 !important;
|
|
11149
|
+
min-height:0 !important;
|
|
11150
|
+
padding:0 !important;
|
|
11151
|
+
}
|
|
11152
|
+
body.nw-page-smarthome .nw-sh-topbar,
|
|
11153
|
+
body.nw-cockpit-page.nw-page-smarthome .nw-sh-topbar{
|
|
11154
|
+
display:flex !important;
|
|
11155
|
+
flex-direction:row !important;
|
|
11156
|
+
align-items:center !important;
|
|
11157
|
+
justify-content:space-between !important;
|
|
11158
|
+
width:100% !important;
|
|
11159
|
+
min-height:54px !important;
|
|
11160
|
+
margin:0 0 12px !important;
|
|
11161
|
+
padding:10px 12px !important;
|
|
11162
|
+
border-radius:18px !important;
|
|
11163
|
+
}
|
|
11164
|
+
body.nw-page-smarthome .nw-sh-topbar-title,
|
|
11165
|
+
body.nw-cockpit-page.nw-page-smarthome .nw-sh-topbar-title{
|
|
11166
|
+
min-width:0 !important;
|
|
11167
|
+
text-align:right !important;
|
|
11168
|
+
}
|
|
11169
|
+
body.nw-page-smarthome #nwShPageTitle,
|
|
11170
|
+
body.nw-cockpit-page.nw-page-smarthome #nwShPageTitle{
|
|
11171
|
+
overflow:hidden !important;
|
|
11172
|
+
text-overflow:ellipsis !important;
|
|
11173
|
+
white-space:nowrap !important;
|
|
11174
|
+
font-size:1rem !important;
|
|
11175
|
+
}
|
|
11176
|
+
body.nw-page-smarthome .nw-sh-nav-toggle,
|
|
11177
|
+
body.nw-cockpit-page.nw-page-smarthome .nw-sh-nav-toggle{
|
|
11178
|
+
display:inline-flex !important;
|
|
11179
|
+
align-items:center !important;
|
|
11180
|
+
justify-content:center !important;
|
|
11181
|
+
width:42px !important;
|
|
11182
|
+
height:42px !important;
|
|
11183
|
+
min-width:42px !important;
|
|
11184
|
+
min-height:42px !important;
|
|
11185
|
+
padding:0 !important;
|
|
11186
|
+
}
|
|
11187
|
+
body.nw-page-smarthome .nw-sh-sidebar,
|
|
11188
|
+
body.nw-cockpit-page.nw-page-smarthome .nw-sh-sidebar{
|
|
11189
|
+
position:fixed !important;
|
|
11190
|
+
z-index:2300 !important;
|
|
11191
|
+
top:var(--topbar-h, 64px) !important;
|
|
11192
|
+
bottom:0 !important;
|
|
11193
|
+
left:0 !important;
|
|
11194
|
+
width:min(86vw, 330px) !important;
|
|
11195
|
+
max-width:330px !important;
|
|
11196
|
+
max-height:none !important;
|
|
11197
|
+
overflow:auto !important;
|
|
11198
|
+
-webkit-overflow-scrolling:touch !important;
|
|
11199
|
+
transform:translateX(-110%) !important;
|
|
11200
|
+
transition:transform 190ms ease !important;
|
|
11201
|
+
border-radius:0 22px 22px 0 !important;
|
|
11202
|
+
box-shadow:20px 0 60px rgba(0,0,0,.42) !important;
|
|
11203
|
+
}
|
|
11204
|
+
body.nw-page-smarthome .nw-sh-sidebar.nw-sh-sidebar--open,
|
|
11205
|
+
body.nw-cockpit-page.nw-page-smarthome .nw-sh-sidebar.nw-sh-sidebar--open{
|
|
11206
|
+
transform:translateX(0) !important;
|
|
11207
|
+
}
|
|
11208
|
+
body.nw-page-smarthome .nw-sh-overlay,
|
|
11209
|
+
body.nw-cockpit-page.nw-page-smarthome .nw-sh-overlay{
|
|
11210
|
+
position:fixed !important;
|
|
11211
|
+
inset:var(--topbar-h, 64px) 0 0 0 !important;
|
|
11212
|
+
z-index:2290 !important;
|
|
11213
|
+
background:rgba(0,0,0,.56) !important;
|
|
11214
|
+
backdrop-filter:blur(3px) !important;
|
|
11215
|
+
}
|
|
11216
|
+
body.nw-page-smarthome .nw-sh-rooms,
|
|
11217
|
+
body.nw-cockpit-page.nw-page-smarthome .nw-sh-rooms{
|
|
11218
|
+
display:block !important;
|
|
11219
|
+
width:100% !important;
|
|
11220
|
+
min-width:0 !important;
|
|
11221
|
+
}
|
|
11222
|
+
body.nw-page-smarthome .nw-sh-empty,
|
|
11223
|
+
body.nw-cockpit-page.nw-page-smarthome .nw-sh-empty{
|
|
11224
|
+
display:block;
|
|
11225
|
+
width:100% !important;
|
|
11226
|
+
min-height:auto !important;
|
|
11227
|
+
padding:16px !important;
|
|
11228
|
+
border-radius:18px !important;
|
|
11229
|
+
}
|
|
11230
|
+
body.nw-page-smarthome .nw-sh-floor,
|
|
11231
|
+
body.nw-page-smarthome .nw-sh-room,
|
|
11232
|
+
body.nw-page-smarthome .nw-sh-home__info,
|
|
11233
|
+
body.nw-page-smarthome .nw-sh-home__section,
|
|
11234
|
+
body.nw-cockpit-page.nw-page-smarthome .nw-sh-floor,
|
|
11235
|
+
body.nw-cockpit-page.nw-page-smarthome .nw-sh-room,
|
|
11236
|
+
body.nw-cockpit-page.nw-page-smarthome .nw-sh-home__info,
|
|
11237
|
+
body.nw-cockpit-page.nw-page-smarthome .nw-sh-home__section{
|
|
11238
|
+
width:100% !important;
|
|
11239
|
+
min-width:0 !important;
|
|
11240
|
+
margin-inline:0 !important;
|
|
11241
|
+
}
|
|
11242
|
+
}
|
|
11243
|
+
|
|
11244
|
+
@media (max-width: 520px){
|
|
11245
|
+
body.nw-page-smarthome .nw-page-hero,
|
|
11246
|
+
body.nw-cockpit-page.nw-page-smarthome .nw-page-hero{
|
|
11247
|
+
width:100% !important;
|
|
11248
|
+
padding:16px !important;
|
|
11249
|
+
border-radius:20px !important;
|
|
11250
|
+
}
|
|
11251
|
+
body.nw-page-smarthome .nw-page-hero h1,
|
|
11252
|
+
body.nw-page-smarthome .nw-page-hero h2,
|
|
11253
|
+
body.nw-cockpit-page.nw-page-smarthome .nw-page-hero h1,
|
|
11254
|
+
body.nw-cockpit-page.nw-page-smarthome .nw-page-hero h2{
|
|
11255
|
+
font-size:clamp(28px, 8.6vw, 36px) !important;
|
|
11256
|
+
line-height:1.04 !important;
|
|
11257
|
+
}
|
|
11258
|
+
body.nw-page-smarthome .nw-page-hero p,
|
|
11259
|
+
body.nw-page-smarthome .nw-page-hero__subtitle,
|
|
11260
|
+
body.nw-cockpit-page.nw-page-smarthome .nw-page-hero p,
|
|
11261
|
+
body.nw-cockpit-page.nw-page-smarthome .nw-page-hero__subtitle{
|
|
11262
|
+
font-size:15px !important;
|
|
11263
|
+
line-height:1.42 !important;
|
|
11264
|
+
}
|
|
11265
|
+
body.nw-page-smarthome .nw-sh-grid,
|
|
11266
|
+
body.nw-cockpit-page.nw-page-smarthome .nw-sh-grid,
|
|
11267
|
+
body.nw-page-smarthome .nw-sh-home__floors,
|
|
11268
|
+
body.nw-cockpit-page.nw-page-smarthome .nw-sh-home__floors{
|
|
11269
|
+
display:grid !important;
|
|
11270
|
+
grid-template-columns:1fr !important;
|
|
11271
|
+
gap:10px !important;
|
|
11272
|
+
}
|
|
11273
|
+
body.nw-page-smarthome .nw-sh-tile,
|
|
11274
|
+
body.nw-cockpit-page.nw-page-smarthome .nw-sh-tile{
|
|
11275
|
+
min-height:138px !important;
|
|
11276
|
+
}
|
|
11277
|
+
}
|
package/www/sw.js
CHANGED