iobroker.nexowatt-ui 0.7.42 → 0.7.45

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.
@@ -137,6 +137,32 @@ function evcsPhrase(hasEvcs, withArticle = true) {
137
137
  return hasEvcs ? (withArticle ? 'EV-Laden, Heizstab und andere flexible Lasten' : 'EV-Laden, Heizstab und andere flexible Verbraucher') : (withArticle ? 'Heizstab und andere flexible Lasten' : 'Heizstab und andere flexible Verbraucher');
138
138
  }
139
139
 
140
+ function storageRowHasMapping(row) {
141
+ const r = (row && typeof row === 'object') ? row : {};
142
+ const keys = [
143
+ 'socId', 'socPctId', 'socStateId', 'powerId', 'powerWId', 'chargePowerId', 'dischargePowerId',
144
+ 'setPowerId', 'setChargePowerId', 'setDischargePowerId', 'onlineId', 'enabledId', 'pvPowerId',
145
+ ];
146
+ return keys.some((key) => String(r[key] === null || r[key] === undefined ? '' : r[key]).trim().length > 0);
147
+ }
148
+
149
+ function configuredStorageFarmRows(adapter) {
150
+ const cfg = (adapter && adapter.config && typeof adapter.config === 'object') ? adapter.config : {};
151
+ const sf = (cfg.storageFarm && typeof cfg.storageFarm === 'object') ? cfg.storageFarm : {};
152
+ const lists = [];
153
+ if (Array.isArray(sf.storages)) lists.push(sf.storages);
154
+ if (Array.isArray(sf.batteries)) lists.push(sf.batteries);
155
+ if (Array.isArray(cfg.storageFarmStorages)) lists.push(cfg.storageFarmStorages);
156
+ return lists.reduce((acc, list) => acc.concat(list.filter((row) => row && row.enabled !== false && storageRowHasMapping(row))), []);
157
+ }
158
+
159
+ function storageSocLooksPlausible(v) {
160
+ if (v === null || v === undefined) return false;
161
+ if (typeof v === 'string' && v.trim() === '') return false;
162
+ const n = Number(v);
163
+ return Number.isFinite(n) && n >= 0 && n <= 100;
164
+ }
165
+
140
166
  function buildPeakStateText(s, limitW, usagePct) {
141
167
  const statusRaw = String(s && s.peakStatus || '').trim();
142
168
  const suffix = statusRaw ? ` · Status ${statusRaw}` : '';
@@ -454,6 +480,8 @@ class AiAdvisorModule extends BaseModule {
454
480
  await mk('aiAdvisor.gridConnectionLimitW', 'Netzanschlusslimit', 'number', 'value.power', 'W');
455
481
  await mk('aiAdvisor.peakWarnThresholdW', 'Peak-Vorwarnschwelle', 'number', 'value.power', 'W');
456
482
  await mk('aiAdvisor.weatherSummary', 'Wetter-Prognose Zusammenfassung', 'string', 'text');
483
+ await mk('aiAdvisor.storageSocPct', 'Speicher-SoC für KI-Beratung', 'number', 'value.battery', '%');
484
+ await mk('aiAdvisor.storageSocSource', 'Speicher-SoC Quelle für KI-Beratung', 'string', 'text');
457
485
  await mk('aiAdvisor.dailyPlanText', 'KI-Tagesfahrplan Text', 'string', 'text');
458
486
  await mk('aiAdvisor.dailyPlanJson', 'KI-Tagesfahrplan JSON', 'string', 'json');
459
487
  await mk('aiAdvisor.evPlanText', 'EV-Zielplanung Text', 'string', 'text');
@@ -510,6 +538,84 @@ class AiAdvisorModule extends BaseModule {
510
538
  return fallback;
511
539
  }
512
540
 
541
+ _dpNumberFresh(key, maxAgeMs, fallback = null) {
542
+ try {
543
+ if (this.dp && typeof this.dp.getNumberFresh === 'function') {
544
+ const v = this.dp.getNumberFresh(key, maxAgeMs, null);
545
+ if (Number.isFinite(Number(v))) return Number(v);
546
+ }
547
+ } catch (_e) {}
548
+ try {
549
+ if (this.dp && typeof this.dp.getNumber === 'function') {
550
+ const v = this.dp.getNumber(key, null);
551
+ if (Number.isFinite(Number(v))) return Number(v);
552
+ }
553
+ } catch (_e2) {}
554
+ return fallback;
555
+ }
556
+
557
+ async _isStorageFarmActive() {
558
+ try {
559
+ const cfg = (this.adapter && this.adapter.config && typeof this.adapter.config === 'object') ? this.adapter.config : {};
560
+ const rows = configuredStorageFarmRows(this.adapter);
561
+ if (cfg.enableStorageFarm === true && rows.length > 0) return true;
562
+ const enabled = await this._readBool(['storageFarm.enabled'], false);
563
+ const total = await this._readNumber(['storageFarm.storagesTotal'], 0);
564
+ return enabled === true && Number.isFinite(Number(total)) && Number(total) > 0;
565
+ } catch (_e) {
566
+ return false;
567
+ }
568
+ }
569
+
570
+ async _readStorageSocPct(staleTimeoutSec = 300) {
571
+ const staleMs = Math.max(30000, Number(staleTimeoutSec || 300) * 1000);
572
+ const regularCandidates = [
573
+ // storageSoc ist der generische, im Kunden-Frontend sichtbare Speicher-SoC.
574
+ // Dieser Wert muss für die KI Vorrang haben, damit Dashboard und Beratung dieselbe Quelle nutzen.
575
+ { key: 'storageSoc', type: 'state' },
576
+ { key: 'speicher.regelung.socPct', type: 'state' },
577
+ { key: 'speicher.socPct', type: 'state' },
578
+ { key: 'batterySOC', type: 'state' },
579
+ { key: 'batterySoc', type: 'state' },
580
+ { key: 'batterySocPct', type: 'state' },
581
+ { key: 'st.socPct', type: 'dp' },
582
+ ];
583
+ const farmCandidatesOnlineFirst = [
584
+ { key: 'storageFarm.totalSocOnline', type: 'state' },
585
+ { key: 'storageFarm.totalSoc', type: 'state' },
586
+ { key: 'storageFarm.medianSoc', type: 'state' },
587
+ ];
588
+ const farmCandidatesTotalFirst = [
589
+ { key: 'storageFarm.totalSoc', type: 'state' },
590
+ { key: 'storageFarm.medianSoc', type: 'state' },
591
+ { key: 'storageFarm.totalSocOnline', type: 'state' },
592
+ ];
593
+ const readCandidate = async (entry) => {
594
+ const raw = entry.type === 'dp' ? this._dpNumberFresh(entry.key, staleMs, null) : await this._readNumber([entry.key], null);
595
+ return storageSocLooksPlausible(raw) ? Number(raw) : null;
596
+ };
597
+ const readFirst = async (list) => {
598
+ for (const entry of list) {
599
+ const value = await readCandidate(entry);
600
+ if (value !== null) return { value, source: entry.key };
601
+ }
602
+ return { value: null, source: '' };
603
+ };
604
+
605
+ const farmActive = await this._isStorageFarmActive();
606
+ const regular = await readFirst(regularCandidates);
607
+ if (farmActive) {
608
+ const socSourcesTotal = await this._readNumber(['storageFarm.socSourcesTotal'], 0);
609
+ const socSourcesOnline = await this._readNumber(['storageFarm.socSourcesOnline'], 0);
610
+ const farm = await readFirst(Number(socSourcesOnline) > 0 ? farmCandidatesOnlineFirst : farmCandidatesTotalFirst);
611
+ // Farm-Summen nur verwenden, wenn die Farm wirklich aktiv ist UND mindestens eine echte
612
+ // SoC-Quelle vorhanden ist. Sonst würde der Defaultwert storageFarm.totalSoc=0 den realen
613
+ // Einzel-Speicher-SoC überdecken. Genau das führte zur falschen KI-Meldung „Speicher liegt bei 0 %“.
614
+ if (farm.value !== null && Number(socSourcesTotal) > 0) return { value: farm.value, source: farm.source, farmActive };
615
+ }
616
+ return { value: regular.value, source: regular.source || (farmActive ? 'storageFarm:no-soc-source' : ''), farmActive };
617
+ }
618
+
513
619
  async _readString(keys, fallback = '') {
514
620
  const arr = Array.isArray(keys) ? keys : [keys];
515
621
  for (const k of arr) {
@@ -597,9 +703,12 @@ class AiAdvisorModule extends BaseModule {
597
703
  const gridImportLimitEffectiveW = await this._readNumber(['ems.core.gridImportLimitW_effective', 'chargingManagement.control.gridImportLimitW_effective'], null);
598
704
  const gridImportLimitSource = await this._readString(['ems.core.gridImportLimitW_source'], '');
599
705
 
600
- const storageSocPct = await this._readNumber(['storageFarm.totalSoc', 'speicher.regelung.socPct', 'storageSoc'], null);
601
- const storageChargeW = await this._readNumber(['ems.budget.storageChargeW', 'storageFarm.totalChargePowerW', 'storageChargePower'], 0);
602
- const storageDischargeW = await this._readNumber(['ems.budget.storageDischargeW', 'storageFarm.totalDischargePowerW', 'storageDischargePower'], 0);
706
+ const storageSocInfo = await this._readStorageSocPct((this._cfg && this._cfg().staleTimeoutSec) || 300);
707
+ const storageSocPct = storageSocInfo.value;
708
+ const storageFarmActive = !!storageSocInfo.farmActive;
709
+ const storageSocSource = storageSocInfo.source || '';
710
+ const storageChargeW = await this._readNumber(storageFarmActive ? ['storageFarm.totalChargePowerW', 'ems.budget.storageChargeW', 'storageChargePower'] : ['ems.budget.storageChargeW', 'storageChargePower', 'storageFarm.totalChargePowerW'], 0);
711
+ const storageDischargeW = await this._readNumber(storageFarmActive ? ['storageFarm.totalDischargePowerW', 'ems.budget.storageDischargeW', 'storageDischargePower'] : ['ems.budget.storageDischargeW', 'storageDischargePower', 'storageFarm.totalDischargePowerW'], 0);
603
712
 
604
713
  let evcsUsedW = await this._readNumber(['chargingManagement.control.usedW', 'evcs.totalPowerW', 'consumptionEvcs'], 0);
605
714
  const thermalUsedW = await this._readNumber(['thermal.summary.budgetUsedW'], 0);
@@ -696,6 +805,8 @@ class AiAdvisorModule extends BaseModule {
696
805
  consumptionTotalW: finiteNumber(consumptionTotalW) ? Math.max(0, num(consumptionTotalW, 0)) : null,
697
806
  productionEnergyKwh: finiteNumber(productionEnergyKwh) ? productionEnergyKwh : null,
698
807
  storageSocPct: finiteNumber(storageSocPct) ? storageSocPct : null,
808
+ storageSocSource,
809
+ storageFarmActive,
699
810
  storageChargeW: Math.max(0, num(storageChargeW, 0)),
700
811
  storageDischargeW: Math.max(0, num(storageDischargeW, 0)),
701
812
  evcsAvailable,
@@ -1111,6 +1222,8 @@ class AiAdvisorModule extends BaseModule {
1111
1222
  await this._set('aiAdvisor.gridConnectionLimitW', 0);
1112
1223
  await this._set('aiAdvisor.peakWarnThresholdW', 0);
1113
1224
  await this._set('aiAdvisor.weatherSummary', '');
1225
+ await this._set('aiAdvisor.storageSocPct', 0);
1226
+ await this._set('aiAdvisor.storageSocSource', '');
1114
1227
  await this._set('aiAdvisor.dailyPlanText', '');
1115
1228
  await this._set('aiAdvisor.dailyPlanJson', '[]');
1116
1229
  await this._set('aiAdvisor.evPlanText', '');
@@ -1203,6 +1316,8 @@ class AiAdvisorModule extends BaseModule {
1203
1316
  await this._set('aiAdvisor.gridConnectionLimitW', peakReferenceLimitW || 0);
1204
1317
  await this._set('aiAdvisor.peakWarnThresholdW', round(peakWarnThresholdW, 0) || 0);
1205
1318
  await this._set('aiAdvisor.weatherSummary', weatherSummary);
1319
+ await this._set('aiAdvisor.storageSocPct', round(snapshot.storageSocPct, 1) || 0);
1320
+ await this._set('aiAdvisor.storageSocSource', snapshot.storageSocSource || '');
1206
1321
  await this._set('aiAdvisor.dailyPlanText', dailyPlan.text || '');
1207
1322
  await this._set('aiAdvisor.dailyPlanJson', safeJson(dailyPlan.items || [], '[]'));
1208
1323
  await this._set('aiAdvisor.evPlanText', evPlanText);
package/io-package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "common": {
3
3
  "name": "nexowatt-ui",
4
- "version": "0.7.42",
4
+ "version": "0.7.45",
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.",
@@ -1759,6 +1759,14 @@
1759
1759
  "0.7.33": {
1760
1760
  "en": "Applied the new responsive cockpit design across all frontend subpages including history, settings, EVCS, SmartHome, App-Center, logic, simulation and reports.",
1761
1761
  "de": "Neues responsives Cockpit-Design auf alle Frontend-Unterseiten angewendet: History, Einstellungen, EVCS, SmartHome, App-Center, Logik, Simulation und Reports."
1762
+ },
1763
+ "0.7.43": {
1764
+ "en": "AI Advisor storage SoC source fixed: storage farm default values no longer override the real single-storage SoC. The advisor now publishes its SoC source for diagnostics and avoids false low-reserve warnings when storageFarm is not configured.",
1765
+ "de": "KI-Energieberater Speicher-SoC korrigiert: Defaultwerte der Speicherfarm überdecken den echten Einzel-Speicher-SoC nicht mehr. Der Berater veröffentlicht jetzt die verwendete SoC-Quelle zur Diagnose und vermeidet falsche Niedrigreserve-Meldungen, wenn keine Speicherfarm konfiguriert ist."
1766
+ },
1767
+ "0.7.44": {
1768
+ "en": "Publish hotfix: package metadata cleaned and conflict-marker checks hardened so npm publish no longer fails on unresolved package.json merge markers.",
1769
+ "de": "Publish-Hotfix: Paket-Metadaten bereinigt und Konfliktmarker-Prüfung gehärtet, damit npm publish nicht mehr an ungelösten package.json-Merge-Markern scheitert."
1762
1770
  }
1763
1771
  },
1764
1772
  "title": "NexoWatt UI",
@@ -1979,7 +1987,7 @@
1979
1987
  }
1980
1988
  },
1981
1989
  "instanceObjects": [],
1982
- "version": "0.7.42",
1990
+ "version": "0.7.45",
1983
1991
  "news": {
1984
1992
  "0.7.42": {
1985
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.",
@@ -3687,6 +3695,14 @@
3687
3695
  "0.7.33": {
3688
3696
  "en": "Applied the new responsive cockpit design across all frontend subpages including history, settings, EVCS, SmartHome, App-Center, logic, simulation and reports.",
3689
3697
  "de": "Neues responsives Cockpit-Design auf alle Frontend-Unterseiten angewendet: History, Einstellungen, EVCS, SmartHome, App-Center, Logik, Simulation und Reports."
3698
+ },
3699
+ "0.7.43": {
3700
+ "en": "AI Advisor storage SoC source fixed: storage farm default values no longer override the real single-storage SoC. The advisor now publishes its SoC source for diagnostics and avoids false low-reserve warnings when storageFarm is not configured.",
3701
+ "de": "KI-Energieberater Speicher-SoC korrigiert: Defaultwerte der Speicherfarm überdecken den echten Einzel-Speicher-SoC nicht mehr. Der Berater veröffentlicht jetzt die verwendete SoC-Quelle zur Diagnose und vermeidet falsche Niedrigreserve-Meldungen, wenn keine Speicherfarm konfiguriert ist."
3702
+ },
3703
+ "0.7.44": {
3704
+ "en": "Publish hotfix: package metadata cleaned and conflict-marker checks hardened so npm publish no longer fails on unresolved package.json merge markers.",
3705
+ "de": "Publish-Hotfix: Paket-Metadaten bereinigt und Konfliktmarker-Prüfung gehärtet, damit npm publish nicht mehr an ungelösten package.json-Merge-Markern scheitert."
3690
3706
  }
3691
3707
  }
3692
3708
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iobroker.nexowatt-ui",
3
- "version": "0.7.42",
3
+ "version": "0.7.45",
4
4
  "description": "Responsive NexoWatt EMS visualization adapter.",
5
5
  "author": "NexoWatt",
6
6
  "license": "Proprietary License (NPL) v1.0",
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
@@ -2721,10 +2721,12 @@ function _collectFlowPowerDpIsWFromUI() {
2721
2721
 
2722
2722
  function _mkCfgField(label, control, hint) {
2723
2723
  const wrap = document.createElement('div');
2724
+ wrap.className = 'nw-config-mini-field';
2724
2725
  wrap.style.display = 'flex';
2725
2726
  wrap.style.flexDirection = 'column';
2726
2727
  wrap.style.gap = '4px';
2727
2728
  wrap.style.minWidth = '130px';
2729
+ wrap.style.maxWidth = '100%';
2728
2730
  const lab = document.createElement('div');
2729
2731
  lab.textContent = label;
2730
2732
  lab.style.fontSize = '0.72rem';
@@ -2743,6 +2745,7 @@ function _collectFlowPowerDpIsWFromUI() {
2743
2745
 
2744
2746
  function _mkCfgGroup(title) {
2745
2747
  const wrap = document.createElement('div');
2748
+ wrap.className = 'nw-config-group';
2746
2749
  wrap.style.display = 'flex';
2747
2750
  wrap.style.flexDirection = 'column';
2748
2751
  wrap.style.gap = '8px';
@@ -2751,6 +2754,8 @@ function _collectFlowPowerDpIsWFromUI() {
2751
2754
  wrap.style.borderRadius = '12px';
2752
2755
  wrap.style.background = 'rgba(255,255,255,0.02)';
2753
2756
  wrap.style.flex = '1 1 320px';
2757
+ wrap.style.minWidth = '0';
2758
+ wrap.style.maxWidth = '100%';
2754
2759
 
2755
2760
  const head = document.createElement('div');
2756
2761
  head.textContent = title;
@@ -2771,6 +2776,7 @@ function _collectFlowPowerDpIsWFromUI() {
2771
2776
 
2772
2777
  function _mkCfgDetailsGroup(title, open = false) {
2773
2778
  const wrap = document.createElement('details');
2779
+ wrap.className = 'nw-config-group nw-config-group--details';
2774
2780
  wrap.open = !!open;
2775
2781
  wrap.style.display = 'flex';
2776
2782
  wrap.style.flexDirection = 'column';
@@ -2780,6 +2786,8 @@ function _collectFlowPowerDpIsWFromUI() {
2780
2786
  wrap.style.borderRadius = '12px';
2781
2787
  wrap.style.background = 'rgba(255,255,255,0.02)';
2782
2788
  wrap.style.flex = '1 1 320px';
2789
+ wrap.style.minWidth = '0';
2790
+ wrap.style.maxWidth = '100%';
2783
2791
 
2784
2792
  const summary = document.createElement('summary');
2785
2793
  summary.textContent = title;
@@ -2823,12 +2831,15 @@ function _collectFlowPowerDpIsWFromUI() {
2823
2831
 
2824
2832
  function _mkDeviceRow(title, subtitle, badges = []) {
2825
2833
  const row = document.createElement('div');
2826
- row.className = 'nw-config-item';
2834
+ row.className = 'nw-config-item nw-config-item--device-row';
2827
2835
  row.style.alignItems = 'start';
2836
+ row.style.minWidth = '0';
2837
+ row.style.overflow = 'hidden';
2828
2838
 
2829
2839
  const left = document.createElement('div');
2830
2840
  left.className = 'nw-config-item__left';
2831
2841
  left.style.maxWidth = '280px';
2842
+ left.style.minWidth = '0';
2832
2843
 
2833
2844
  const ttl = document.createElement('div');
2834
2845
  ttl.className = 'nw-config-item__title';
@@ -2855,6 +2866,8 @@ function _collectFlowPowerDpIsWFromUI() {
2855
2866
  right.style.flexDirection = 'column';
2856
2867
  right.style.gap = '12px';
2857
2868
  right.style.flex = '1';
2869
+ right.style.minWidth = '0';
2870
+ right.style.maxWidth = '100%';
2858
2871
 
2859
2872
  row.appendChild(left);
2860
2873
  row.appendChild(right);
@@ -3113,7 +3126,10 @@ function _collectFlowPowerDpIsWFromUI() {
3113
3126
  _mkCfgBadge(`Verdrahtet: ${wiredStages}/${dev.stageCount} Stufen`, wiredStages >= dev.stageCount ? 'ok' : 'warn'),
3114
3127
  _mkCfgBadge(`Max: ${dev.maxPowerW} W`),
3115
3128
  ];
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);
3129
+ 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);
3130
+ row.classList.add('nw-heatingrod-device-row');
3131
+ left.classList.add('nw-heatingrod-device-left');
3132
+ right.classList.add('nw-heatingrod-device-right');
3117
3133
 
3118
3134
  const info = document.createElement('div');
3119
3135
  info.className = 'nw-config-field-hint';
@@ -3146,6 +3162,7 @@ function _collectFlowPowerDpIsWFromUI() {
3146
3162
  right.appendChild(grpTiming.wrap);
3147
3163
 
3148
3164
  const stageWrap = document.createElement('div');
3165
+ stageWrap.className = 'nw-heatingrod-stage-wrap';
3149
3166
  stageWrap.style.display = 'flex';
3150
3167
  stageWrap.style.flexDirection = 'column';
3151
3168
  stageWrap.style.gap = '8px';
@@ -3153,8 +3170,12 @@ function _collectFlowPowerDpIsWFromUI() {
3153
3170
  stageWrap.style.border = '1px solid rgba(255,255,255,0.08)';
3154
3171
  stageWrap.style.borderRadius = '12px';
3155
3172
  stageWrap.style.background = 'rgba(255,255,255,0.02)';
3173
+ stageWrap.style.minWidth = '0';
3174
+ stageWrap.style.maxWidth = '100%';
3175
+ stageWrap.style.overflowX = 'auto';
3156
3176
 
3157
3177
  const stageHead = document.createElement('div');
3178
+ stageHead.className = 'nw-heatingrod-stage-head';
3158
3179
  stageHead.style.display = 'flex';
3159
3180
  stageHead.style.flexWrap = 'wrap';
3160
3181
  stageHead.style.justifyContent = 'space-between';
@@ -3172,6 +3193,7 @@ function _collectFlowPowerDpIsWFromUI() {
3172
3193
  stageWrap.appendChild(stageHead);
3173
3194
 
3174
3195
  const headRow = document.createElement('div');
3196
+ headRow.className = 'nw-heatingrod-stage-row nw-heatingrod-stage-row--head';
3175
3197
  headRow.style.display = 'grid';
3176
3198
  headRow.style.gridTemplateColumns = '100px repeat(3, minmax(120px, 1fr))';
3177
3199
  headRow.style.gap = '10px';
@@ -3189,6 +3211,7 @@ function _collectFlowPowerDpIsWFromUI() {
3189
3211
  (dev.stages || []).forEach((stage, index) => {
3190
3212
  const s = index + 1;
3191
3213
  const sRow = document.createElement('div');
3214
+ sRow.className = 'nw-heatingrod-stage-row';
3192
3215
  sRow.style.display = 'grid';
3193
3216
  sRow.style.gridTemplateColumns = '100px repeat(3, minmax(120px, 1fr))';
3194
3217
  sRow.style.gap = '10px';
@@ -3236,6 +3259,7 @@ function _collectFlowPowerDpIsWFromUI() {
3236
3259
  stageWrap.appendChild(sRow);
3237
3260
 
3238
3261
  const dpRow = document.createElement('div');
3262
+ dpRow.className = 'nw-heatingrod-stage-row nw-heatingrod-stage-dp-row';
3239
3263
  dpRow.style.display = 'grid';
3240
3264
  dpRow.style.gridTemplateColumns = '100px repeat(2, minmax(240px, 1fr))';
3241
3265
  dpRow.style.gap = '10px';
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>
@@ -44,5 +44,5 @@
44
44
  "purpose": "maskable"
45
45
  }
46
46
  ],
47
- "version": "0.7.42"
47
+ "version": "0.7.45"
48
48
  }
@@ -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
@@ -1,6 +1,6 @@
1
1
  // Increment cache name on releases so browser updates JS/HTML reliably.
2
2
  // NOTE: Keep this monotonic to force SW updates on hotfixes.
3
- const CACHE_NAME = 'nexowatt-cache-v210';
3
+ const CACHE_NAME = 'nexowatt-cache-v213';
4
4
 
5
5
  const OFFLINE_URLS = [
6
6
  './',