iobroker.luxtronik2-controller 0.22.0 → 0.22.2
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/README.md +45 -12
- package/admin/jsonConfig.json +70 -7
- package/build/hupManager.js +6 -6
- package/build/hupManager.js.map +2 -2
- package/build/main.js +28 -32
- package/build/main.js.map +2 -2
- package/build/pvManager.js +24 -7
- package/build/pvManager.js.map +2 -2
- package/build/rawFunctions.js +8 -3
- package/build/rawFunctions.js.map +2 -2
- package/build/virtualStates.js +24 -8
- package/build/virtualStates.js.map +2 -2
- package/io-package.json +27 -27
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -94,10 +94,55 @@ You might see red error messages in the installation log related to `node-gyp`,
|
|
|
94
94
|
|
|
95
95
|
[Info English](documentation/readme_en.md)
|
|
96
96
|
//### **WORK IN PROGRESS**
|
|
97
|
+
|
|
98
|
+
## Changelog
|
|
99
|
+
### 0.22.2 (2026-11-01)
|
|
100
|
+
|
|
101
|
+
**🐛 Bugfixes & Tweaks**
|
|
102
|
+
|
|
103
|
+
- **Cycle Optimization & PV Integration:** Fixed an issue where the cycle optimization was blocked during an active PV boost. The adapter now correctly forces seamless transitions between heating and hot water (without compressor shutdown and anti-cycle delays) even when solar surplus is available. A new handshake mechanism ensures that PV target temperatures are immediately and safely restored after the cycle optimization resets the baseline idle defaults.
|
|
104
|
+
|
|
105
|
+
- **PV Surplus Management & Compressor Optimization:**
|
|
106
|
+
- Fixed read-only datapoint errors in `activateBoost` and `deactivateBoost` (now correctly targeting `temperature_hot_water_target`).
|
|
107
|
+
- Resolved baseline configuration mix-ups between `fusspunkt` and the heating parallel offset (`heating_temperature`).
|
|
108
|
+
- Fixed the heating saturation check (`isHzFull`) to prevent premature boost revocation.
|
|
109
|
+
- Implemented a seamless "PV-Boost Handshake" allowing cycle optimization to force hot water transitions even during active solar surplus without triggering anti-cycle compressor delays.
|
|
110
|
+
|
|
111
|
+
- **ZIP Circulation & Timer Logic:**
|
|
112
|
+
- Fixed a bug where hot water timer slots (`WW_MoSo_...`) were mistakenly backed up and overwritten instead of circulation pump slots (`Zirkulation_MoSo_...`).
|
|
113
|
+
- Improved time string conversions and state restoration robustness.
|
|
114
|
+
- **COP Calculation & Virtual States:**
|
|
115
|
+
- Fixed a UTC timezone offset in daily rollovers so COP snapshots trigger precisely at local midnight.
|
|
116
|
+
- Included defrosting cycles (`WP_BZ_akt = 4`) into the heating COP calculations and added clamping protection against negative energy deltas.
|
|
117
|
+
- Added an in-memory object cache (`ensuredObjects`) to drastically reduce redundant database write calls.
|
|
118
|
+
- Added a raw value fallback for total energy and thermal energy calculations if individual states are disabled in the object tree.
|
|
119
|
+
- **Modbus & Raw Communication Stability:**
|
|
120
|
+
- Implemented a strict serial operation queue (mutex) with a 50ms release delay in `ModbusManager` to prevent TCP port 502 connection collisions.
|
|
121
|
+
- Added a 30-second request timeout (`AbortSignal.timeout`) to DTA backups and corrected file naming for fallback paths (`dta_history`).
|
|
122
|
+
- Expanded firmware version regex in `updateManager` to support `F1.`, `WWB`, and `smo` firmware formats.
|
|
123
|
+
- Added socket `close` event listeners and safe number roundings for raw write operations.
|
|
124
|
+
- **Repository Compliance & Maintenance:**
|
|
125
|
+
- Added complete multi-language translations (i18n) for all configuration dropdown menus to meet strict ioBroker stable repository requirements.
|
|
126
|
+
- Cleaned up unpublished ghost versions from the `io-package.json` news section.
|
|
127
|
+
- Standardized the README changelog header format (`## Changelog`).
|
|
128
|
+
|
|
129
|
+
- **Repository Compliance:** Added missing multi-language translations (i18n) for all configuration dropdown menus (e.g. COP sources, PV modes) to meet strict ioBroker stable repository requirements.
|
|
130
|
+
|
|
131
|
+
### 0.22.1 (2026-10-28)
|
|
132
|
+
|
|
133
|
+
**🔧 Maintenance & Compatibility**
|
|
134
|
+
|
|
135
|
+
- **Repository Compliance:** Added missing multi-language translations (i18n) for all configuration dropdown menus (e.g. COP sources, PV modes) to meet strict ioBroker stable repository requirements.
|
|
136
|
+
- **Cleanup:** Removed unpublished ghost versions from the `io-package.json` news section and fixed markdown formatting for the changelog header in the README.
|
|
137
|
+
|
|
97
138
|
### 0.22.0 (2026-10-26)
|
|
98
139
|
|
|
99
140
|
**🐛 Performance & Tweaks**
|
|
100
141
|
|
|
142
|
+
- **Modbus Queue & Socket Protection:** Added a sequential operation queue (mutex) with a 50ms socket release delay in `ModbusManager` to prevent TCP port 502 connection collisions when polling and event-driven writes occur simultaneously.
|
|
143
|
+
- **COP Database Optimization:** Added an in-memory object cache (`ensuredObjects`) to `copManager`, eliminating redundant `setObjectNotExistsAsync` database calls during every polling cycle.
|
|
144
|
+
- **DTA Backup & Firmware Check Improvements:** Added a 30-second request timeout (`AbortSignal.timeout`) and proper `dta_history` file naming on fallback to `backupManager`, and expanded the version regex in `updateManager` to support `F1.`, `WWB`, and `smo` firmware strings.
|
|
145
|
+
|
|
101
146
|
### 0.21.1 (2026-10-26)
|
|
102
147
|
|
|
103
148
|
**🐛 Bugfixes & Tweaks**
|
|
@@ -128,18 +173,6 @@ You might see red error messages in the installation log related to `node-gyp`,
|
|
|
128
173
|
- **Unit Conversion:** The PV feed-in datapoint now natively supports kilowatts (kW) via a new toggle in the configuration UI, automatically converting it to Watts internally.
|
|
129
174
|
- **Admin UI Polish:** Replaced HTML-based information blocks in the configuration UI with native ioBroker JSON components to bypass React XSS-filtering issues and ensure clean rendering.
|
|
130
175
|
|
|
131
|
-
### 0.20.4 (2026-10-24)
|
|
132
|
-
|
|
133
|
-
**🔧 Maintenance & Compatibility**
|
|
134
|
-
|
|
135
|
-
- **Node.js Requirement:** Updated minimum Node.js requirement to `>= 22` in `package.json` and `io-package.json` to meet current adapter standards.
|
|
136
|
-
|
|
137
|
-
### 0.20.3 (2026-10-24)
|
|
138
|
-
|
|
139
|
-
**🔧 Maintenance & Compatibility**
|
|
140
|
-
|
|
141
|
-
- **Node.js Requirement:** Updated minimum Node.js requirement to `>= 22` in `package.json` and `io-package.json` to meet current adapter standards.
|
|
142
|
-
|
|
143
176
|
## License
|
|
144
177
|
|
|
145
178
|
MIT License
|
package/admin/jsonConfig.json
CHANGED
|
@@ -1731,14 +1731,32 @@
|
|
|
1731
1731
|
{
|
|
1732
1732
|
"label": {
|
|
1733
1733
|
"en": "Negative (e.g. -2500) = Feed-in",
|
|
1734
|
-
"de": "Negativ (z.B. -2500) = Einspeisung"
|
|
1734
|
+
"de": "Negativ (z.B. -2500) = Einspeisung",
|
|
1735
|
+
"ru": "Отрицательный (например, -2500) = подача",
|
|
1736
|
+
"pt": "Negativo (ex. -2500) = injeção",
|
|
1737
|
+
"nl": "Negatief (bijv. -2500) = teruglevering",
|
|
1738
|
+
"fr": "Négatif (ex. -2500) = injection",
|
|
1739
|
+
"it": "Negativo (es. -2500) = immissione",
|
|
1740
|
+
"es": "Negativo (ej. -2500) = inyección",
|
|
1741
|
+
"pl": "Ujemny (np. -2500) = wprowadzanie",
|
|
1742
|
+
"uk": "Негативний (наприклад, -2500) = подача",
|
|
1743
|
+
"zh-cn": "负值 (例如 -2500) = 馈入"
|
|
1735
1744
|
},
|
|
1736
1745
|
"value": "negative"
|
|
1737
1746
|
},
|
|
1738
1747
|
{
|
|
1739
1748
|
"label": {
|
|
1740
1749
|
"en": "Positive (e.g. 2500) = Feed-in",
|
|
1741
|
-
"de": "Positiv (z.B. 2500) = Einspeisung"
|
|
1750
|
+
"de": "Positiv (z.B. 2500) = Einspeisung",
|
|
1751
|
+
"ru": "Положительный (например, 2500) = подача",
|
|
1752
|
+
"pt": "Positivo (ex. 2500) = injeção",
|
|
1753
|
+
"nl": "Positief (bijv. 2500) = teruglevering",
|
|
1754
|
+
"fr": "Positif (ex. 2500) = injection",
|
|
1755
|
+
"it": "Positivo (es. 2500) = immissione",
|
|
1756
|
+
"es": "Positivo (ej. 2500) = inyección",
|
|
1757
|
+
"pl": "Dodatni (np. 2500) = wprowadzanie",
|
|
1758
|
+
"uk": "Позитивний (наприклад, 2500) = подача",
|
|
1759
|
+
"zh-cn": "正值 (例如 2500) = 馈入"
|
|
1742
1760
|
},
|
|
1743
1761
|
"value": "positive"
|
|
1744
1762
|
}
|
|
@@ -1813,14 +1831,32 @@
|
|
|
1813
1831
|
{
|
|
1814
1832
|
"label": {
|
|
1815
1833
|
"en": "Positive (e.g. 1500) = Charging",
|
|
1816
|
-
"de": "Positiv (z.B. 1500) = Laden"
|
|
1834
|
+
"de": "Positiv (z.B. 1500) = Laden",
|
|
1835
|
+
"ru": "Положительный (например, 1500) = Зарядка",
|
|
1836
|
+
"pt": "Positivo (ex. 1500) = Carregando",
|
|
1837
|
+
"nl": "Positief (bijv. 1500) = Opladen",
|
|
1838
|
+
"fr": "Positif (ex. 1500) = Charge",
|
|
1839
|
+
"it": "Positivo (es. 1500) = In carica",
|
|
1840
|
+
"es": "Positivo (ej. 1500) = Cargando",
|
|
1841
|
+
"pl": "Dodatni (np. 1500) = Ładowanie",
|
|
1842
|
+
"uk": "Позитивний (наприклад, 1500) = Заряджання",
|
|
1843
|
+
"zh-cn": "正值 (例如 1500) = 充电"
|
|
1817
1844
|
},
|
|
1818
1845
|
"value": "positive"
|
|
1819
1846
|
},
|
|
1820
1847
|
{
|
|
1821
1848
|
"label": {
|
|
1822
1849
|
"en": "Negative (e.g. -1500) = Charging",
|
|
1823
|
-
"de": "Negativ (z.B. -1500) = Laden"
|
|
1850
|
+
"de": "Negativ (z.B. -1500) = Laden",
|
|
1851
|
+
"ru": "Отрицательный (например, -1500) = Зарядка",
|
|
1852
|
+
"pt": "Negativo (ex. -1500) = Carregando",
|
|
1853
|
+
"nl": "Negatief (bijv. -1500) = Opladen",
|
|
1854
|
+
"fr": "Négatif (ex. -1500) = Charge",
|
|
1855
|
+
"it": "Negativo (es. -1500) = In carica",
|
|
1856
|
+
"es": "Negativo (ej. -1500) = Cargando",
|
|
1857
|
+
"pl": "Ujemny (np. -1500) = Ładowanie",
|
|
1858
|
+
"uk": "Негативний (наприклад, -1500) = Заряджання",
|
|
1859
|
+
"zh-cn": "负值 (例如 -1500) = 充电"
|
|
1824
1860
|
},
|
|
1825
1861
|
"value": "negative"
|
|
1826
1862
|
}
|
|
@@ -1919,21 +1955,48 @@
|
|
|
1919
1955
|
{
|
|
1920
1956
|
"label": {
|
|
1921
1957
|
"en": "Simultaneous (Default)",
|
|
1922
|
-
"de": "Gleichzeitig (Standard)"
|
|
1958
|
+
"de": "Gleichzeitig (Standard)",
|
|
1959
|
+
"ru": "Одновременно (по умолчанию)",
|
|
1960
|
+
"pt": "Simultâneo (Padrão)",
|
|
1961
|
+
"nl": "Gelijktijdig (Standaard)",
|
|
1962
|
+
"fr": "Simultané (Par défaut)",
|
|
1963
|
+
"it": "Simultaneo (Predefinito)",
|
|
1964
|
+
"es": "Simultáneo (Por defecto)",
|
|
1965
|
+
"pl": "Jednocześnie (Domyślnie)",
|
|
1966
|
+
"uk": "Одночасно (За замовчуванням)",
|
|
1967
|
+
"zh-cn": "同时 (默认)"
|
|
1923
1968
|
},
|
|
1924
1969
|
"value": "both"
|
|
1925
1970
|
},
|
|
1926
1971
|
{
|
|
1927
1972
|
"label": {
|
|
1928
1973
|
"en": "Hot Water first, then Heating",
|
|
1929
|
-
"de": "Warmwasser zuerst, dann Heizen"
|
|
1974
|
+
"de": "Warmwasser zuerst, dann Heizen",
|
|
1975
|
+
"ru": "Сначала горячая вода, затем отопление",
|
|
1976
|
+
"pt": "Água Quente primeiro, depois Aquecimento",
|
|
1977
|
+
"nl": "Eerst warm water, dan verwarming",
|
|
1978
|
+
"fr": "Eau chaude d'abord, puis chauffage",
|
|
1979
|
+
"it": "Prima Acqua Calda, poi Riscaldamento",
|
|
1980
|
+
"es": "Primero Agua Caliente, luego Calefacción",
|
|
1981
|
+
"pl": "Najpierw ciepła woda, potem ogrzewanie",
|
|
1982
|
+
"uk": "Спочатку гаряча вода, потім опалення",
|
|
1983
|
+
"zh-cn": "先热水,后加热"
|
|
1930
1984
|
},
|
|
1931
1985
|
"value": "ww"
|
|
1932
1986
|
},
|
|
1933
1987
|
{
|
|
1934
1988
|
"label": {
|
|
1935
1989
|
"en": "Heating first, then Hot Water",
|
|
1936
|
-
"de": "Heizen zuerst, dann Warmwasser"
|
|
1990
|
+
"de": "Heizen zuerst, dann Warmwasser",
|
|
1991
|
+
"ru": "Сначала отопление, затем горячая вода",
|
|
1992
|
+
"pt": "Aquecimento primeiro, depois Água Quente",
|
|
1993
|
+
"nl": "Eerst verwarming, dan warm water",
|
|
1994
|
+
"fr": "Chauffage d'abord, puis eau chaude",
|
|
1995
|
+
"it": "Prima Riscaldamento, poi Acqua Calda",
|
|
1996
|
+
"es": "Primero Calefacción, luego Agua Caliente",
|
|
1997
|
+
"pl": "Najpierw ogrzewanie, potem ciepła woda",
|
|
1998
|
+
"uk": "Спочатку опалення, потім гаряча вода",
|
|
1999
|
+
"zh-cn": "先加热,后热水"
|
|
1937
2000
|
},
|
|
1938
2001
|
"value": "hz"
|
|
1939
2002
|
}
|
package/build/hupManager.js
CHANGED
|
@@ -40,13 +40,13 @@ async function handleHupOptimization(adapter, istHeizen, spreizung, hupAktiv, la
|
|
|
40
40
|
} catch {
|
|
41
41
|
}
|
|
42
42
|
const now = Date.now();
|
|
43
|
-
const checkIntervalMs = ((_a = config.hup_interval_min) != null ? _a : 10) * 6e4;
|
|
43
|
+
const checkIntervalMs = Number((_a = config.hup_interval_min) != null ? _a : 10) * 6e4;
|
|
44
44
|
if (now - lastPumpOptimization > checkIntervalMs) {
|
|
45
|
-
const minSpreizung = (_b = config.hup_spreizung_min) != null ? _b : 6.5;
|
|
46
|
-
const maxSpreizung = (_c = config.hup_spreizung_max) != null ? _c : 7.5;
|
|
47
|
-
const step = (_d = config.hup_voltage_step) != null ? _d : 0.25;
|
|
48
|
-
const minVolt = (_e = config.hup_voltage_limit_min) != null ? _e : 3;
|
|
49
|
-
const maxVolt = (_f = config.hup_voltage_limit_max) != null ? _f : 10;
|
|
45
|
+
const minSpreizung = Number((_b = config.hup_spreizung_min) != null ? _b : 6.5);
|
|
46
|
+
const maxSpreizung = Number((_c = config.hup_spreizung_max) != null ? _c : 7.5);
|
|
47
|
+
const step = Number((_d = config.hup_voltage_step) != null ? _d : 0.25);
|
|
48
|
+
const minVolt = Number((_e = config.hup_voltage_limit_min) != null ? _e : 3);
|
|
49
|
+
const maxVolt = Number((_f = config.hup_voltage_limit_max) != null ? _f : 10);
|
|
50
50
|
if (spreizung < minSpreizung && hupAktiv > minVolt) {
|
|
51
51
|
const newVolt = Math.max(minVolt, Math.round((hupAktiv - step) * 100) / 100);
|
|
52
52
|
await adapter.syncConfigValue("heating_system_circ_pump_voltage_nominal", newVolt);
|
package/build/hupManager.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/hupManager.ts"],
|
|
4
|
-
"sourcesContent": ["import { writeLog } from './logger';\nimport { getDpPath } from './stateMapping';\nimport type { LuxtronikAdapter } from './types';\n\n/**\n * \u00DCbernimmt die dynamische Regelung der Heizungsumw\u00E4lzpumpe (HUP) anhand der Spreizung.\n *\n * @param adapter - Die erweiterte Adapter-Instanz\n * @param istHeizen - Boolean, ob sich die Anlage aktuell im Heizbetrieb befindet\n * @param spreizung - Die aktuell berechnete Temperaturspreizung (Vorlauf - R\u00FCcklauf)\n * @param hupAktiv - Die aktuell anliegende Nominalspannung der HUP\n * @param lastPumpOptimization - Timestamp der letzten Anpassung (f\u00FCr Intervall-Sperre)\n * @returns Den aktualisierten Timestamp der letzten Anpassung\n */\nexport async function handleHupOptimization(\n\tadapter: LuxtronikAdapter,\n\tistHeizen: boolean,\n\tspreizung: number,\n\thupAktiv: number,\n\tlastPumpOptimization: number,\n): Promise<number> {\n\tconst config = adapter.config;\n\n\t// Abbruch, wenn nicht geheizt wird oder das Feature deaktiviert ist\n\tif (!istHeizen || config.hup_optimierung_aktiv !== true) {\n\t\treturn lastPumpOptimization;\n\t}\n\n\t// Erkennung einer PWM-Pumpe. Wenn Max-Speed > 0 konfiguriert ist,\n\t// handelt es sich um eine PWM-Pumpe. Die 0-10V Optimierung ist hier nutzlos!\n\ttry {\n\t\tconst maxPwmState = await adapter.getStateAsync(getDpPath('heating_max_circ_pump_speed'));\n\t\tif (maxPwmState && typeof maxPwmState.val === 'number' && maxPwmState.val > 0) {\n\t\t\tif (adapter.isDebugLogActive) {\n\t\t\t\twriteLog('HUP: PWM-Pumpe erkannt (max_speed > 0). 0-10V Optimierung wird \u00FCbersprungen.', 'debug');\n\t\t\t}\n\t\t\treturn lastPumpOptimization; // Abbruch!\n\t\t}\n\t} catch {\n\t\t// Fehler beim Lesen ignorieren und sicherheitshalber weitermachen\n\t}\n\n\tconst now = Date.now();\n\tconst checkIntervalMs = (config.hup_interval_min ?? 10) * 60000;\n\n\t// Pr\u00FCfen, ob das Schutz-Intervall abgelaufen ist\n\tif (now - lastPumpOptimization > checkIntervalMs) {\n\t\tconst minSpreizung = config.hup_spreizung_min ?? 6.5;\n\t\tconst maxSpreizung = config.hup_spreizung_max ?? 7.5;\n\t\tconst step = config.hup_voltage_step ?? 0.25;\n\t\tconst minVolt = config.hup_voltage_limit_min ?? 3.0;\n\t\tconst maxVolt = config.hup_voltage_limit_max ?? 10.0;\n\n\t\tif (spreizung < minSpreizung && hupAktiv > minVolt) {\n\t\t\tconst newVolt = Math.max(minVolt, Math.round((hupAktiv - step) * 100) / 100);\n\t\t\tawait adapter.syncConfigValue('heating_system_circ_pump_voltage_nominal', newVolt);\n\t\t\twriteLog(\n\t\t\t\t`HUP: Temperature spread too low (${spreizung}K < ${minSpreizung}K). Scaling nominal voltage down to ${newVolt}V.`,\n\t\t\t\t'info',\n\t\t\t);\n\t\t\treturn now;\n\t\t} else if (spreizung > maxSpreizung && hupAktiv < maxVolt) {\n\t\t\tconst newVolt = Math.min(maxVolt, Math.round((hupAktiv + step) * 100) / 100);\n\t\t\tawait adapter.syncConfigValue('heating_system_circ_pump_voltage_nominal', newVolt);\n\t\t\twriteLog(\n\t\t\t\t`HUP: Temperature spread too high (${spreizung}K > ${maxSpreizung}K). Scaling nominal voltage up to ${newVolt}V.`,\n\t\t\t\t'info',\n\t\t\t);\n\t\t\treturn now;\n\t\t}\n\t}\n\n\treturn lastPumpOptimization;\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAyB;AACzB,0BAA0B;AAa1B,eAAsB,sBACrB,SACA,WACA,WACA,UACA,sBACkB;AApBnB;AAqBC,QAAM,SAAS,QAAQ;AAGvB,MAAI,CAAC,aAAa,OAAO,0BAA0B,MAAM;AACxD,WAAO;AAAA,EACR;AAIA,MAAI;AACH,UAAM,cAAc,MAAM,QAAQ,kBAAc,+BAAU,6BAA6B,CAAC;AACxF,QAAI,eAAe,OAAO,YAAY,QAAQ,YAAY,YAAY,MAAM,GAAG;AAC9E,UAAI,QAAQ,kBAAkB;AAC7B,oCAAS,mFAAgF,OAAO;AAAA,MACjG;AACA,aAAO;AAAA,IACR;AAAA,EACD,QAAQ;AAAA,EAER;AAEA,QAAM,MAAM,KAAK,IAAI;AACrB,QAAM,
|
|
4
|
+
"sourcesContent": ["import { writeLog } from './logger';\nimport { getDpPath } from './stateMapping';\nimport type { LuxtronikAdapter } from './types';\n\n/**\n * \u00DCbernimmt die dynamische Regelung der Heizungsumw\u00E4lzpumpe (HUP) anhand der Spreizung.\n *\n * @param adapter - Die erweiterte Adapter-Instanz\n * @param istHeizen - Boolean, ob sich die Anlage aktuell im Heizbetrieb befindet\n * @param spreizung - Die aktuell berechnete Temperaturspreizung (Vorlauf - R\u00FCcklauf)\n * @param hupAktiv - Die aktuell anliegende Nominalspannung der HUP\n * @param lastPumpOptimization - Timestamp der letzten Anpassung (f\u00FCr Intervall-Sperre)\n * @returns Den aktualisierten Timestamp der letzten Anpassung\n */\nexport async function handleHupOptimization(\n\tadapter: LuxtronikAdapter,\n\tistHeizen: boolean,\n\tspreizung: number,\n\thupAktiv: number,\n\tlastPumpOptimization: number,\n): Promise<number> {\n\tconst config = adapter.config;\n\n\t// Abbruch, wenn nicht geheizt wird oder das Feature deaktiviert ist\n\tif (!istHeizen || config.hup_optimierung_aktiv !== true) {\n\t\treturn lastPumpOptimization;\n\t}\n\n\t// Erkennung einer PWM-Pumpe. Wenn Max-Speed > 0 konfiguriert ist,\n\t// handelt es sich um eine PWM-Pumpe. Die 0-10V Optimierung ist hier nutzlos!\n\ttry {\n\t\tconst maxPwmState = await adapter.getStateAsync(getDpPath('heating_max_circ_pump_speed'));\n\t\tif (maxPwmState && typeof maxPwmState.val === 'number' && maxPwmState.val > 0) {\n\t\t\tif (adapter.isDebugLogActive) {\n\t\t\t\twriteLog('HUP: PWM-Pumpe erkannt (max_speed > 0). 0-10V Optimierung wird \u00FCbersprungen.', 'debug');\n\t\t\t}\n\t\t\treturn lastPumpOptimization; // Abbruch!\n\t\t}\n\t} catch {\n\t\t// Fehler beim Lesen ignorieren und sicherheitshalber weitermachen\n\t}\n\n\tconst now = Date.now();\n\tconst checkIntervalMs = Number(config.hup_interval_min ?? 10) * 60000;\n\n\t// Pr\u00FCfen, ob das Schutz-Intervall abgelaufen ist\n\tif (now - lastPumpOptimization > checkIntervalMs) {\n\t\tconst minSpreizung = Number(config.hup_spreizung_min ?? 6.5);\n\t\tconst maxSpreizung = Number(config.hup_spreizung_max ?? 7.5);\n\t\tconst step = Number(config.hup_voltage_step ?? 0.25);\n\t\tconst minVolt = Number(config.hup_voltage_limit_min ?? 3.0);\n\t\tconst maxVolt = Number(config.hup_voltage_limit_max ?? 10.0);\n\n\t\tif (spreizung < minSpreizung && hupAktiv > minVolt) {\n\t\t\tconst newVolt = Math.max(minVolt, Math.round((hupAktiv - step) * 100) / 100);\n\t\t\tawait adapter.syncConfigValue('heating_system_circ_pump_voltage_nominal', newVolt);\n\t\t\twriteLog(\n\t\t\t\t`HUP: Temperature spread too low (${spreizung}K < ${minSpreizung}K). Scaling nominal voltage down to ${newVolt}V.`,\n\t\t\t\t'info',\n\t\t\t);\n\t\t\treturn now;\n\t\t} else if (spreizung > maxSpreizung && hupAktiv < maxVolt) {\n\t\t\tconst newVolt = Math.min(maxVolt, Math.round((hupAktiv + step) * 100) / 100);\n\t\t\tawait adapter.syncConfigValue('heating_system_circ_pump_voltage_nominal', newVolt);\n\t\t\twriteLog(\n\t\t\t\t`HUP: Temperature spread too high (${spreizung}K > ${maxSpreizung}K). Scaling nominal voltage up to ${newVolt}V.`,\n\t\t\t\t'info',\n\t\t\t);\n\t\t\treturn now;\n\t\t}\n\t}\n\n\treturn lastPumpOptimization;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAyB;AACzB,0BAA0B;AAa1B,eAAsB,sBACrB,SACA,WACA,WACA,UACA,sBACkB;AApBnB;AAqBC,QAAM,SAAS,QAAQ;AAGvB,MAAI,CAAC,aAAa,OAAO,0BAA0B,MAAM;AACxD,WAAO;AAAA,EACR;AAIA,MAAI;AACH,UAAM,cAAc,MAAM,QAAQ,kBAAc,+BAAU,6BAA6B,CAAC;AACxF,QAAI,eAAe,OAAO,YAAY,QAAQ,YAAY,YAAY,MAAM,GAAG;AAC9E,UAAI,QAAQ,kBAAkB;AAC7B,oCAAS,mFAAgF,OAAO;AAAA,MACjG;AACA,aAAO;AAAA,IACR;AAAA,EACD,QAAQ;AAAA,EAER;AAEA,QAAM,MAAM,KAAK,IAAI;AACrB,QAAM,kBAAkB,QAAO,YAAO,qBAAP,YAA2B,EAAE,IAAI;AAGhE,MAAI,MAAM,uBAAuB,iBAAiB;AACjD,UAAM,eAAe,QAAO,YAAO,sBAAP,YAA4B,GAAG;AAC3D,UAAM,eAAe,QAAO,YAAO,sBAAP,YAA4B,GAAG;AAC3D,UAAM,OAAO,QAAO,YAAO,qBAAP,YAA2B,IAAI;AACnD,UAAM,UAAU,QAAO,YAAO,0BAAP,YAAgC,CAAG;AAC1D,UAAM,UAAU,QAAO,YAAO,0BAAP,YAAgC,EAAI;AAE3D,QAAI,YAAY,gBAAgB,WAAW,SAAS;AACnD,YAAM,UAAU,KAAK,IAAI,SAAS,KAAK,OAAO,WAAW,QAAQ,GAAG,IAAI,GAAG;AAC3E,YAAM,QAAQ,gBAAgB,4CAA4C,OAAO;AACjF;AAAA,QACC,oCAAoC,SAAS,OAAO,YAAY,uCAAuC,OAAO;AAAA,QAC9G;AAAA,MACD;AACA,aAAO;AAAA,IACR,WAAW,YAAY,gBAAgB,WAAW,SAAS;AAC1D,YAAM,UAAU,KAAK,IAAI,SAAS,KAAK,OAAO,WAAW,QAAQ,GAAG,IAAI,GAAG;AAC3E,YAAM,QAAQ,gBAAgB,4CAA4C,OAAO;AACjF;AAAA,QACC,qCAAqC,SAAS,OAAO,YAAY,qCAAqC,OAAO;AAAA,QAC7G;AAAA,MACD;AACA,aAAO;AAAA,IACR;AAAA,EACD;AAEA,SAAO;AACR;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/build/main.js
CHANGED
|
@@ -244,25 +244,6 @@ class Luxtronik2Controller extends utils.Adapter {
|
|
|
244
244
|
"warn"
|
|
245
245
|
);
|
|
246
246
|
}
|
|
247
|
-
for (const [key, stateDef] of Object.entries(import_stateMapping.STATE_MAPPING)) {
|
|
248
|
-
if (stateDef.isVirtual) {
|
|
249
|
-
await this.setObjectNotExistsAsync(`${stateDef.folder}.${key}`, {
|
|
250
|
-
type: "state",
|
|
251
|
-
common: {
|
|
252
|
-
name: stateDef.name,
|
|
253
|
-
type: stateDef.type,
|
|
254
|
-
role: stateDef.role,
|
|
255
|
-
read: true,
|
|
256
|
-
write: stateDef.write || false,
|
|
257
|
-
def: stateDef.def !== void 0 ? stateDef.def : null
|
|
258
|
-
},
|
|
259
|
-
native: {
|
|
260
|
-
luxWriteId: stateDef.luxWriteId || null,
|
|
261
|
-
dataSource: stateDef.dataSource || null
|
|
262
|
-
}
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
247
|
if (config.update_check_active === true) {
|
|
267
248
|
this.setTimeout(() => {
|
|
268
249
|
void (0, import_updateManager.checkFirmwareUpdate)(this);
|
|
@@ -327,14 +308,18 @@ class Luxtronik2Controller extends utils.Adapter {
|
|
|
327
308
|
this.modbusManager && this.modbusManager.isAvailable && config.modbus_active && definition.modbus && config[definition.modbus.configKey] === true
|
|
328
309
|
);
|
|
329
310
|
if ((definition.write === true || isModbusEnabled) && !definition.isVirtual && definition.luxWriteId) {
|
|
311
|
+
let appliedFactor = definition.factor;
|
|
312
|
+
if (mappingKey === "heating_system_circ_pump_voltage_nominal" || mappingKey === "heating_system_circ_pump_voltage_minimal") {
|
|
313
|
+
appliedFactor = config.hup_voltage_factor !== void 0 ? Number(config.hup_voltage_factor) : 100;
|
|
314
|
+
}
|
|
330
315
|
let valueToWrite = val;
|
|
331
316
|
if (typeof valueToWrite === "boolean") {
|
|
332
317
|
valueToWrite = valueToWrite ? 1 : 0;
|
|
333
|
-
} else if (
|
|
334
|
-
valueToWrite = val *
|
|
318
|
+
} else if (appliedFactor && typeof val === "number") {
|
|
319
|
+
valueToWrite = val * appliedFactor;
|
|
335
320
|
}
|
|
336
321
|
const isRawWrite = definition.dataSource === "raw_parameter" || definition.dataSource === "raw_value" || !definition.dataSource && /^\d+$/.test(definition.luxWriteId || "");
|
|
337
|
-
if (isRawWrite && definition.unit === "\xB0C" && typeof val === "number" && !
|
|
322
|
+
if (isRawWrite && definition.unit === "\xB0C" && typeof val === "number" && !appliedFactor) {
|
|
338
323
|
valueToWrite = val * 10;
|
|
339
324
|
}
|
|
340
325
|
try {
|
|
@@ -396,6 +381,7 @@ class Luxtronik2Controller extends utils.Adapter {
|
|
|
396
381
|
const config = this.config;
|
|
397
382
|
await this.syncConfigValue("heating_curve_end_point", (_a = config.endpunkt) != null ? _a : 23);
|
|
398
383
|
await this.syncConfigValue("heating_curve_parallel_offset", (_b = config.fusspunkt) != null ? _b : 21.7);
|
|
384
|
+
await this.syncConfigValue("heating_temperature", 0);
|
|
399
385
|
await this.syncConfigValue(
|
|
400
386
|
"heating_system_circ_pump_voltage_minimal",
|
|
401
387
|
(_c = config.sync_heating_system_circ_pump_voltage_minimal_heating) != null ? _c : 3
|
|
@@ -408,6 +394,9 @@ class Luxtronik2Controller extends utils.Adapter {
|
|
|
408
394
|
await this.syncConfigValue("returnTemperatureHysteresis", (_f = config.sync_return_temperature_hysteresis) != null ? _f : 1.5);
|
|
409
395
|
await this.syncConfigValue("zip_aktiv", (_g = config.zip_aktiv) != null ? _g : 0);
|
|
410
396
|
await this.syncConfigValue("Heizen_nach_Wasser", (_h = config.Heating_after_warmwater) != null ? _h : false);
|
|
397
|
+
if (import_pvManager.pvIsBoostActive) {
|
|
398
|
+
await (0, import_pvManager.evaluatePvBoost)(this, true);
|
|
399
|
+
}
|
|
411
400
|
} catch (err) {
|
|
412
401
|
(0, import_logger.writeLog)(`Failed to apply the baseline idle configuration defaults: ${err.message}`, "error");
|
|
413
402
|
}
|
|
@@ -450,15 +439,18 @@ class Luxtronik2Controller extends utils.Adapter {
|
|
|
450
439
|
}
|
|
451
440
|
if (bzVal !== this.lastBzVal) {
|
|
452
441
|
if (istLeerlauf) {
|
|
453
|
-
if (config.idle_defaults_aktiv === true
|
|
442
|
+
if (config.idle_defaults_aktiv === true) {
|
|
454
443
|
await this.setIdleDefaults();
|
|
455
444
|
}
|
|
456
445
|
} else if (istHeizen) {
|
|
457
|
-
if (this.lastBzVal === "1" && config.idle_defaults_aktiv === true
|
|
446
|
+
if (this.lastBzVal === "1" && config.idle_defaults_aktiv === true) {
|
|
458
447
|
await this.syncConfigValue(
|
|
459
448
|
"temperature_hot_water_target",
|
|
460
449
|
(_a = config.sync_warmwater_target_temperature) != null ? _a : 54
|
|
461
450
|
);
|
|
451
|
+
if (import_pvManager.pvIsBoostActive) {
|
|
452
|
+
await (0, import_pvManager.evaluatePvBoost)(this, true);
|
|
453
|
+
}
|
|
462
454
|
}
|
|
463
455
|
if (config.zip_optimierung_aktiv === true) {
|
|
464
456
|
await this.syncConfigValue("zip_aktiv", (_b = config.zip_aktiv) != null ? _b : 0);
|
|
@@ -552,7 +544,7 @@ class Luxtronik2Controller extends utils.Adapter {
|
|
|
552
544
|
const heatingLimit = (_t = heatingLimitState == null ? void 0 : heatingLimitState.val) != null ? _t : 0;
|
|
553
545
|
const nachWasser = nachWasserState == null ? void 0 : nachWasserState.val;
|
|
554
546
|
if (istHeizen) {
|
|
555
|
-
if (
|
|
547
|
+
if (aelterAls10 && vd1) {
|
|
556
548
|
const fusspunkt = (_u = await this.getStateAsync((0, import_stateMapping.getDpPath)("heating_curve_parallel_offset"))) == null ? void 0 : _u.val;
|
|
557
549
|
if (fusspunkt === 35) {
|
|
558
550
|
const fallbackFusspunkt = (_v = config.fusspunkt) != null ? _v : 21.7;
|
|
@@ -576,7 +568,7 @@ class Luxtronik2Controller extends utils.Adapter {
|
|
|
576
568
|
} else if (!nachWasser && config.Heating_after_warmwater === true) {
|
|
577
569
|
await this.syncConfigValue("Heizen_nach_Wasser", true);
|
|
578
570
|
}
|
|
579
|
-
if (
|
|
571
|
+
if (wwSoll - wwIst > 2 && ruecklauf >= ruecklaufSoll + heizenHysterese - 0.1) {
|
|
580
572
|
let forceSoll = wwIst + wwHysterese + 1.5;
|
|
581
573
|
if (forceSoll > 70) {
|
|
582
574
|
forceSoll = 70;
|
|
@@ -598,7 +590,7 @@ class Luxtronik2Controller extends utils.Adapter {
|
|
|
598
590
|
await (0, import_zipManager.stopZipAndDeaeration)(this);
|
|
599
591
|
}
|
|
600
592
|
}
|
|
601
|
-
if (isRegelungAktiv
|
|
593
|
+
if (isRegelungAktiv) {
|
|
602
594
|
if (wwSoll - wwIst >= wwHysterese - 1.5 && ruecklauf <= ruecklaufSoll && isHeatingAllowedByLimit) {
|
|
603
595
|
await this.syncConfigValue("heating_curve_parallel_offset", 35);
|
|
604
596
|
}
|
|
@@ -766,8 +758,8 @@ class Luxtronik2Controller extends utils.Adapter {
|
|
|
766
758
|
}
|
|
767
759
|
}
|
|
768
760
|
await Promise.all(statePromises);
|
|
769
|
-
await (0, import_virtualStates.calculateTotalThermalEnergy)(this);
|
|
770
|
-
await (0, import_virtualStates.calculateTotalEnergy)(this);
|
|
761
|
+
await (0, import_virtualStates.calculateTotalThermalEnergy)(this, rawValues);
|
|
762
|
+
await (0, import_virtualStates.calculateTotalEnergy)(this, rawValues);
|
|
771
763
|
const fehlerDp = (0, import_stateMapping.getDpPath)("Fehlerspeicher");
|
|
772
764
|
const oldFehlerState = fehlerDp ? await this.getStateAsync(fehlerDp) : null;
|
|
773
765
|
const oldFehlerVal = oldFehlerState == null ? void 0 : oldFehlerState.val;
|
|
@@ -974,15 +966,19 @@ class Luxtronik2Controller extends utils.Adapter {
|
|
|
974
966
|
return;
|
|
975
967
|
}
|
|
976
968
|
await this.setState(relativeId, { val: state.val, ack: true });
|
|
969
|
+
let appliedFactor = definition.factor;
|
|
970
|
+
if (mappingKey === "heating_system_circ_pump_voltage_nominal" || mappingKey === "heating_system_circ_pump_voltage_minimal") {
|
|
971
|
+
appliedFactor = config.hup_voltage_factor !== void 0 ? Number(config.hup_voltage_factor) : 100;
|
|
972
|
+
}
|
|
977
973
|
let valueToWrite = state.val;
|
|
978
974
|
if (typeof valueToWrite === "boolean") {
|
|
979
975
|
valueToWrite = valueToWrite ? 1 : 0;
|
|
980
976
|
} else if (definition.isDurationFormat || definition.role === "value.datetime" || definition.role === "value.time") {
|
|
981
977
|
valueToWrite = (0, import_convert.timeStringToSeconds)(state.val);
|
|
982
|
-
} else if (
|
|
983
|
-
valueToWrite = state.val *
|
|
978
|
+
} else if (appliedFactor && typeof state.val === "number") {
|
|
979
|
+
valueToWrite = state.val * appliedFactor;
|
|
984
980
|
}
|
|
985
|
-
if (definition.unit === "\xB0C" && typeof state.val === "number" && !
|
|
981
|
+
if (definition.unit === "\xB0C" && typeof state.val === "number" && !appliedFactor) {
|
|
986
982
|
valueToWrite = state.val * 10;
|
|
987
983
|
}
|
|
988
984
|
if (isModbusEnabled && definition.modbus) {
|