iobroker.luxtronik2-controller 0.6.6 → 0.7.1

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 CHANGED
@@ -79,77 +79,41 @@ Bug reports, compatibility notes for specific firmware versions, or feature requ
79
79
  ## Changelog
80
80
 
81
81
  // ### **WORK IN PROGRESS**
82
- ### 0.6.6 (2026-08-31)
83
-
84
- - review / fix findings reported by claude based checker.
85
- - Extended minimum limit for `temperature_outdoor_min` from -20°C to -25°C
86
- - Lowered minimum allowed value for `heating_curve_parallel_offset` (base point) from 20°C to 15°C
87
- - Disabled dynamic cycle optimization / regulation by default on initial start
82
+ ### 0.7.1 (2026-09-07)
88
83
 
89
- ### 0.6.5 (2026-08-07)
90
-
91
- - review / fix findings reported by claude based checker.
84
+ **Bugfixes**
92
85
 
93
- ### 0.6.4 (2026-07-23)
86
+ - (Fixed) Status Display: Fixed a logical evaluation bug where the operating state "Heating" (Code 0) was incorrectly overwritten and displayed as "No demand" (Code 5). Thanks to @michiproep for reporting!
94
87
 
95
- - Refactoring
88
+ - (Fixed) Temperature Values: Fixed a related issue where temperature readings of exactly 0 °C (e.g., average temperature, return target temperature, cooling release) were incorrectly replaced by internal fallback values (e.g., 1.5 °C).
96
89
 
97
- ### 0.6.3 (2026-07-23)
90
+ ### 0.7.0 (2026-09-04)
98
91
 
99
- **Features & Enhancements**
92
+ **Features & Changes**
100
93
 
101
- - **External Actor Support for ZIP (100% Flash Safe):** Added the ultimate hardware protection feature. Users can now configure a list of external actors (e.g., Shelly or Zigbee relays) via their object IDs in the Admin UI. When motion is detected, the adapter switches these relays directly, completely bypassing the heat pump and reducing Luxtronik EEPROM write cycles to absolute zero.
102
- - **External Actor Schedule Compliance:** External ZIP actors now dynamically respect the Luxtronik ZIP time tables (Week, 5+2, or Individual days). Motion triggers will be cleanly ignored if they occur outside the permitted time windows, unless the user explicitly checks the "Disable Hardware ZIP Timers" option in the configuration.
103
- - **Hot Water Sync for External Actors:** The adapter now automatically activates external circulation pump relays when the heat pump begins a hot water generation cycle, maximizing comfort at the tap with zero impact on flash memory wear.
104
- - **Global EEPROM Flash Protection (Read-Before-Write):** Implemented a global interceptor for all hardware write commands (`writePumpSafe`). The adapter now caches the current heat pump parameters in real-time and strictly blocks any duplicate or redundant write requests before they are sent over the network.
105
- - **Automated Hardware-Safe ZIP Defaults:** The adapter can now automatically enforce hardware-safe circulation pump schedules upon startup. Accounts for Luxtronik firmware behavior by intelligently setting the first start block to `00:01:00` (60 seconds) to prevent invalid zero-run rejections, while keeping ON-time at `0 min` and OFF-time at `60 min`.
106
- - **Admin UI - Flash Wear Statistics & Guidance:** Expanded the ZIP configuration page with detailed educational information. Added hard data explaining that internal ZIP control causes between 4 and 14 physical write operations per activation, highly recommending the new external actor setup.
107
- - **Write Cycle Monitoring:** Introduced two new virtual data points under System Info (`write_cycles_today` and `write_cycles_total`) to transparently track physical write operations sent to the heat pump. The daily counter automatically resets every night at midnight.
108
- - **Cooling Extension & Intelligent Status:** Comprehensive integration of new cooling data points (e.g., `cooling_status`, `cooling_configured`, `opStateCooling`). Added the dynamically calculated `opStateCoolingString`.
109
- - **Admin UI - Notification Testing:** Added a dedicated "Send Test Message" button to the configuration interface to easily verify Telegram and ioBroker Notification Center setups directly from the UI.
110
- - **Hardened ZIP Macro Execution:** Reaffirmed and secured the ZIP demand-driven macro to exclusively use the deaeration program (Entlüftungsprogramm).
111
- - **New Flow Rate Datapoints:** Added flow rate tracking for the heat source (`flow_rate_heat_source`, ID 173) and cooling (`flow_rate_cooling`, ID 254) to the state mapping.
112
- - **Extended Admin UI:** All newly added cooling data points and the heat source flow rate can now be individually enabled or disabled via new checkboxes in the adapter configuration (`jsonConfig.json`).
113
- - **New Hardware Supported:** Officially added the MSW2-9S heat pump to the model recognition (`HP_TYPES`).
94
+ - **(Changed) Cycle Optimization & Forced Hot Water**: To force a hot water cycle, the adapter now temporarily increases the hot water target temperature instead of modifying the hysteresis. This crucial safety improvement allows users to manually revert changes directly on the heat pump display without needing an installer password.
95
+ - **(Changed) Disable default**: Disabled reset to default values in idle mode by default on initial start
96
+ - **(Removed) Hysteresis Protection**: Removed all dynamic manipulations of the hot water hysteresis (e.g., during idle or active DHW cycles) to ensure installer-level settings remain untouched.
97
+ - **(UI/Docs)**: Added detailed explanations and trigger rules for "Intelligent Cycle Optimization" and "Heating after hot water" directly to the admin configuration page.
114
98
 
115
99
  **Bugfixes**
116
100
 
117
- - **Motion Sensor Cooldown Logic:** Fixed an issue where the 10-minute anti-cycling cooldown for motion sensors was perpetually stuck when using external relays. The logic now correctly monitors the virtual `Activate_Zip` state's timestamp instead of the bypassed internal `ZIPout` state.
118
- - **Virtual State Reset:** Fixed a bug where the `Activate_Zip` button/state remained `true` after an external relay timer expired, which broke subsequent cooldown calculations. It now cleanly resets to `false` when the run cycle finishes.
119
- - **External Actor State Detection:** Fixed a logic flaw where the adapter incorrectly checked the internal heat pump state (`ZIPout`) instead of the external relay state to determine if the circulation pump was already running. It now dynamically checks `getForeignStateAsync` for configured actors, cleanly preventing redundant switch commands and allowing silent timer extensions if motion is re-detected.
120
- - **Timer Formatting in Objects:** Fixed a bug where timer schedules (Heating, Hot Water, Circulation) were incorrectly displayed as raw seconds (e.g., `60` or `0`). Applied the internal duration formatter (`isDurationFormat: true`) globally so all time tables natively and persistently display as `HH:MM:SS` (e.g., `00:01:00`) in the ioBroker object tree.
121
- - **Admin UI i18n Compliance:** Fixed missing language definitions (E5611) in the `jsonConfig.json` dropdown menus to strictly comply with the latest ioBroker repository checks.
122
- - **TypeScript/Linter Strictness:** Fixed strictly typed linter errors (e.g., `@typescript-eslint/no-floating-promises`, `no-redundant-type-constituents`, and template literal typings) by correctly handling asynchronous database calls, replacing `any` with `unknown`, and strictly casting types.
123
- - **Missing Imports:** Resolved compilation errors regarding missing helper functions (e.g., `getDpPath`) during module refactoring.
124
- - **Cooling Operating Hours:** Fixed the `hours_cooling` datapoint. The value is now correctly read from real-time telemetry data (`raw_value`), resolving an issue where the timestamp "Jan 1, 1970" was incorrectly shown.
125
- - **Config Cleanup:** Fixed an incorrect identifier in the admin UI (changed `sync_Gerätezeit` to `sync_deviceTime`) and removed unused/dead checkboxes.
101
+ - Fixed adapter checker warning [W0066] by downgrading `@types/node` dependency to v22
126
102
 
127
- **Technical Changes (Under the Hood)**
128
-
129
- - **Separation of Concerns (zipManager):** Completely refactored the motion sensor and circulation pump logic. Extracted the event handling and startup initialization out of `main.ts` into `zipManager.ts`. It now also dynamically handles iterations over arrays of external actors.
130
- - **Network Queue Isolation:** Extracted the core transmission queue (`queueWrite`, `processQueue`) from the main adapter class into `rawFunctions.ts`, achieving 100% isolation of TCP/WebSocket network logic from ioBroker state management.
131
- - **Comprehensive Code Refactoring (DRY):** Created dedicated `convert.ts` and `utils.ts` modules to centralize time string formatting (`timeStringToSeconds`, `formatTimerSecondsToTime`) and generic helper functions (`getNumber`, `delay`).
132
- - **Global Time Refactoring:** Centralized the duration and time calculation for status texts in the `updateStatusStrings` function.
133
- - **i18n Support for State Names:** Updated the internal state definition (`name: string | { en: string; de?: string }`) to fully support translation objects, allowing natively translated datapoint names in the ioBroker object tree.
134
-
135
- ### 0.6.2 (2026-07-17)
136
-
137
- **Added**
103
+ ### 0.6.6 (2026-08-31)
138
104
 
139
- - Bilingual support (i18n): Full support for English and German (adapter settings, state names, dropdown menus, and dynamic status texts).
140
- - Language selection: Added a new dropdown menu in the adapter settings to freely choose the preferred output language for the ioBroker object tree.
141
- - Firmware 3.x compatibility: Implemented an intelligent fallback system that dynamically calculates the status texts (heatpump_state_string) and runtime (heatpump_duration) from the main operating state. This is required because modern Luxtronik controllers no longer transmit the old LCD text lines.
105
+ - review / fix findings reported by claude based checker.
106
+ - Extended minimum limit for `temperature_outdoor_min` from -20°C to -25°C
107
+ - Lowered minimum allowed value for `heating_curve_parallel_offset` (base point) from 20°C to 15°C
108
+ - Disabled dynamic cycle optimization / regulation by default on initial start
142
109
 
143
- **Fixed**
110
+ ### 0.6.5 (2026-08-07)
144
111
 
145
- - Incorrect heating state (Frost protection): Fixed an issue where a switched-off heating system was incorrectly displayed as "Frost protection". The code now evaluates the correct index for the heating operating state (opStateHeating / 125) instead of incorrectly calculating it via the parameter.
146
- - Timer display: Restored the clean HH:MM:SS formatting in the ioBroker UI without the annoying "s" (seconds) by introducing an internal isDurationFormat flag.
147
- - Timer glitch fixed: When the compressor is idle, 00:00:01 (1 second) was often incorrectly displayed. This is now cleanly filtered to 00:00:00.
148
- - ioBroker Repo-Checker warnings: Added the missing write: true property to the timer table selection states (role: "level") to fix the E1011 error.
112
+ - review / fix findings reported by claude based checker.
149
113
 
150
- **Technical**
114
+ ### 0.6.4 (2026-07-23)
151
115
 
152
- - Fixed ESLint warnings (dot-notation) for object properties.
116
+ - Refactoring
153
117
 
154
118
  ## License
155
119
 
@@ -80,10 +80,13 @@
80
80
  "lg": 12,
81
81
  "xl": 12
82
82
  },
83
- "abstandRegelung2": {
83
+ "informationCycleOptimization": {
84
84
  "type": "staticText",
85
- "text": "",
86
- "style": { "height": "20px" },
85
+ "text": {
86
+ "en": "By default, the Luxtronik controller treats heating and domestic hot water (DHW) cycles as separate operations, shutting down the compressor between them even if heating demand is imminent. Since frequent compressor starts cause mechanical wear and reduce energy efficiency, this adapter provides an intelligent cycle optimization:<br><br>• <b>Combined Cycles:</b> If heating demand exists or is imminent when hot water preparation finishes, the adapter coordinates the run so the compressor transitions seamlessly into heating without shutting down.<br>➔ <i>Trigger rule:</i> If <b>(DHW Target - DHW Actual) ≥ (DHW Hysteresis - 1.5 K)</b> and <b>Heating Return ≤ Return Target</b> and outdoor heating threshold is not active, heating is triggered directly with Return Target temporarily set to 35°C to force compressor operation (the previously configured Return Target is automatically restored after 10 minutes).<br>• <b>Dynamic Parameter Control:</b> Temporarily adjusts parameters (e.g. heating curve base point or pump voltages) during active cycles to support demand-driven operation.<br>• <b>Automatic Idle Reset:</b> Once the heat pump returns to idle, all modified parameters are automatically reverted to your defined default values below.<br><br>💡 <b>Tip! Safe Operation & Wear Protection</b><br>To prevent EEPROM/flash wear on your Luxtronik controller, parameters are only updated when an actual state change requires it. The fallback to default values in idle ensures the heat pump always returns to a clean, safe operating state.<br><br><b>Info:</b> If you adjust heating or hot water setpoints directly on the heat pump display while optimization is active, the adapter may revert them to the configured default values once the heat pump enters idle.",
87
+ "de": "Standardmäßig behandelt die Luxtronik-Steuerung Heiz- und Warmwassertakte strikt getrennt und schaltet den Verdichter dazwischen ab – selbst wenn unmittelbar danach Heizbedarf besteht. Da häufige Verdichterstarts den Verschleiß erhöhen und Effizienz kosten, bietet dieser Adapter eine intelligente Takt-Optimierung:<br><br>• <b>Kombinierte Takte:</b> Steht nach der Warmwasserbereitung Heizbedarf an, koppelt der Adapter die Vorgänge, sodass der Verdichter ohne Zwischenstopp direkt in den Heizbetrieb übergeht.<br>➔ <i>Auslöser-Regel:</i> Wenn <b>(WW Soll - WW Ist) ≥ (WW Hysterese - 1,5 K)</b> und <b>Heizung Rücklauf ≤ Rücklauf Soll</b> und die Heizgrenze nicht aktiv ist, wird direkt der Heizbetrieb gestartet und der Rücklauf-Sollwert temporär auf 35°C gesetzt, um das Heizen zu erzwingen (die zuvor eingestellte Rücklauf-Solltemperatur wird nach 10 Minuten automatisch wieder zurückgesetzt).<br>• <b>Dynamische Parameteranpassung:</b> Passt Betriebswerte (wie Fußpunkt oder Pumpenspannungen) während aktiver Takte bedarfsgerecht an.<br>• <b>Automatischer Leerlauf-Reset:</b> Sobald die Wärmepumpe wieder im Leerlauf (Idle) steht, werden alle temporär veränderten Parameter selbstständig auf die unten definierten Vorgabewerte zurückgesetzt.<br><br>💡 <b>Tipp! Anlagensicherheit & Flash-Schutz</b><br>Um den internen Flash-Speicher (EEPROM) der Luxtronik zu schonen, werden Schreibzugriffe auf ein Minimum begrenzt und nur bei tatsächlichen Statuswechseln ausgeführt. Das Erzwingen der Vorgabewerte im Leerlauf stellt sicher, dass die Anlage immer in einen definierten Ausgangszustand zurückkehrt.<br><br><b>Info:</b> Werden Parameter während einer aktiven Regelung direkt am Display der Wärmepumpe geändert, setzt der Adapter diese im Leerlauf wieder auf die hier hinterlegten Standardwerte zurück."
88
+ },
89
+ "style": { "height": "230px" },
87
90
  "xs": 12,
88
91
  "sm": 12,
89
92
  "md": 12,
@@ -141,6 +144,24 @@
141
144
  "lg": 4,
142
145
  "xl": 4
143
146
  },
147
+ "Heating_after_warmwater": {
148
+ "type": "checkbox",
149
+ "label": {
150
+ "en": "Heating after hot water",
151
+ "de": "Heizen nach Warmwasser"
152
+ },
153
+ "help": {
154
+ "en": "Temporarily increases the return target temperature to 35°C for 10 minutes to force heating after hot water (provided a heating cycle was started beforehand).",
155
+ "de": "Erhöht die Rücklauf-Solltemperatur für 10 Minuten auf 35°C, damit Heizen nach Warmwasser erzwungen wird (sofern zuvor mit einem Heiztakt begonnen worden ist)."
156
+ },
157
+ "disabled": "!data.regelung_aktiv",
158
+ "default": false,
159
+ "xs": 12,
160
+ "sm": 6,
161
+ "md": 4,
162
+ "lg": 4,
163
+ "xl": 4
164
+ },
144
165
  "abstandRegelung3": {
145
166
  "type": "staticText",
146
167
  "text": "",
@@ -161,7 +182,7 @@
161
182
  "en": "Automatically resets changed parameters (e.g. base point, HUP voltage) during idle",
162
183
  "de": "Setzt veränderte Parameter (z.B. Fußpunkt, HUP-Spannung) im Leerlauf selbstständig zurück"
163
184
  },
164
- "default": true,
185
+ "default": false,
165
186
  "xs": 12,
166
187
  "sm": 6,
167
188
  "md": 4,
@@ -251,20 +272,7 @@
251
272
  "lg": 6,
252
273
  "xl": 6
253
274
  },
254
- "Heating_after_warmwater": {
255
- "type": "checkbox",
256
- "label": {
257
- "en": "Heating after hot water",
258
- "de": "Heizen nach Warmwasser"
259
- },
260
- "disabled": "!data.regelung_aktiv",
261
- "default": true,
262
- "xs": 12,
263
- "sm": 12,
264
- "md": 12,
265
- "lg": 12,
266
- "xl": 12
267
- },
275
+
268
276
  "headerWater": {
269
277
  "type": "header",
270
278
  "text": {
@@ -29,20 +29,20 @@ const CONSTANTS = {
29
29
  /** Status-Code für den Ruhezustand der Anlage */
30
30
  STATE_IDLE: 5,
31
31
  /** Befehlswert für den Fußpunkt beim Zwangsheizen */
32
- FORCE_HEATING_OFFSET: 35,
33
- /** Temporäre Hysterese für die Zwangswarmwasserbereitung */
34
- FORCE_WW_HYSTERESIS: 1
32
+ FORCE_HEATING_OFFSET: 35
35
33
  };
36
34
  async function handleZwangswarmwasser(adapter, id) {
37
35
  try {
38
36
  const localId = id.replace(`${adapter.namespace}.`, "");
39
37
  await adapter.setState(localId, { val: false, ack: true });
40
- const [wwIstState, wwSollState] = await Promise.all([
38
+ const [wwIstState, wwSollState, wwHystereseState] = await Promise.all([
41
39
  adapter.getStateAsync((0, import_stateMapping.getDpPath)("Wamwassertemperatur_Ist")),
42
- adapter.getStateAsync((0, import_stateMapping.getDpPath)("Wamwassertemperatur_Soll"))
40
+ adapter.getStateAsync((0, import_stateMapping.getDpPath)("Wamwassertemperatur_Soll")),
41
+ adapter.getStateAsync((0, import_stateMapping.getDpPath)("hotWaterTemperatureHysteresis"))
43
42
  ]);
44
43
  const wwIst = (0, import_utils.getNumber)(wwIstState);
45
44
  const wwSoll = (0, import_utils.getNumber)(wwSollState);
45
+ const wwHysterese = (0, import_utils.getNumber)(wwHystereseState, 2);
46
46
  if (wwIst >= wwSoll - 1) {
47
47
  (0, import_logger.writeLog)(
48
48
  `Forced hot water: Ignored - Actual (${wwIst}\xB0C) is already sufficient (Target: ${wwSoll}\xB0C).`,
@@ -50,9 +50,15 @@ async function handleZwangswarmwasser(adapter, id) {
50
50
  );
51
51
  return;
52
52
  }
53
- await adapter.syncConfigValue("hotWaterTemperatureHysteresis", CONSTANTS.FORCE_WW_HYSTERESIS);
53
+ let forceSoll = wwIst + wwHysterese + 1.5;
54
+ const MAX_WW_TEMP = 70;
55
+ if (forceSoll > MAX_WW_TEMP) {
56
+ forceSoll = MAX_WW_TEMP;
57
+ }
58
+ forceSoll = Math.round(forceSoll * 10) / 10;
59
+ await adapter.syncConfigValue("warmwater_temperature", forceSoll);
54
60
  (0, import_logger.writeLog)(
55
- `Forced hot water: Triggered - Actual (${wwIst}\xB0C) < Target-1 (${wwSoll - 1}\xB0C). Hysteresis temporarily set to ${CONSTANTS.FORCE_WW_HYSTERESIS}K.`,
61
+ `Forced hot water: Triggered - Actual (${wwIst}\xB0C) < Target-1 (${wwSoll - 1}\xB0C). Target temperature temporarily set to ${forceSoll}\xB0C.`,
56
62
  "info"
57
63
  );
58
64
  } catch (err) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/actionHandlers.ts"],
4
- "sourcesContent": ["import type { AdapterInstance } from '@iobroker/adapter-core';\nimport { writeLog } from './logger';\nimport { getDpPath } from './stateMapping';\nimport { getNumber } from './utils';\n\n// =========================================================\n// TYPEN & KONSTANTEN\n// =========================================================\n\n/**\n * Erweitert die ioBroker Adapter-Instanz um die spezifischen Methoden f\u00FCr Aktionen.\n */\nexport interface ActionAdapter extends AdapterInstance {\n\t/** Synchronisiert einen Wert mit der W\u00E4rmepumpe */\n\tsyncConfigValue: (key: string, value: any) => Promise<void>;\n}\n\nconst CONSTANTS = {\n\t/** Status-Code f\u00FCr den Ruhezustand der Anlage */\n\tSTATE_IDLE: 5,\n\t/** Befehlswert f\u00FCr den Fu\u00DFpunkt beim Zwangsheizen */\n\tFORCE_HEATING_OFFSET: 35,\n\t/** Tempor\u00E4re Hysterese f\u00FCr die Zwangswarmwasserbereitung */\n\tFORCE_WW_HYSTERESIS: 1,\n};\n\n// =========================================================\n// AKTIONEN\n// =========================================================\n\n/**\n * Erzwingt die Warmwasserbereitung durch tempor\u00E4re Manipulation der Hysterese.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @param id Die ID des ausl\u00F6senden Datenpunkts.\n */\nexport async function handleZwangswarmwasser(adapter: ActionAdapter, id: string): Promise<void> {\n\ttry {\n\t\tconst localId = id.replace(`${adapter.namespace}.`, '');\n\t\tawait adapter.setState(localId, { val: false, ack: true });\n\n\t\tconst [wwIstState, wwSollState] = await Promise.all([\n\t\t\tadapter.getStateAsync(getDpPath('Wamwassertemperatur_Ist')),\n\t\t\tadapter.getStateAsync(getDpPath('Wamwassertemperatur_Soll')),\n\t\t]);\n\n\t\tconst wwIst = getNumber(wwIstState);\n\t\tconst wwSoll = getNumber(wwSollState);\n\n\t\tif (wwIst >= wwSoll - 1) {\n\t\t\twriteLog(\n\t\t\t\t`Forced hot water: Ignored - Actual (${wwIst}\u00B0C) is already sufficient (Target: ${wwSoll}\u00B0C).`,\n\t\t\t\t'info',\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tawait adapter.syncConfigValue('hotWaterTemperatureHysteresis', CONSTANTS.FORCE_WW_HYSTERESIS);\n\t\twriteLog(\n\t\t\t`Forced hot water: Triggered - Actual (${wwIst}\u00B0C) < Target-1 (${wwSoll - 1}\u00B0C). Hysteresis temporarily set to ${CONSTANTS.FORCE_WW_HYSTERESIS}K.`,\n\t\t\t'info',\n\t\t);\n\t} catch (err: unknown) {\n\t\tconst msg = err instanceof Error ? err.message : String(err);\n\t\twriteLog(`Forced hot water: Error during execution - ${msg}`, 'error');\n\t}\n}\n\n/**\n * Erzwingt den Heizbetrieb durch tempor\u00E4re Erh\u00F6hung des Fu\u00DFpunktes.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @param id Die ID des ausl\u00F6senden Datenpunkts.\n */\nexport async function handleZwangsheizen(adapter: ActionAdapter, id: string): Promise<void> {\n\ttry {\n\t\tconst localId = id.replace(`${adapter.namespace}.`, '');\n\t\tawait adapter.setState(localId, { val: false, ack: true });\n\n\t\tconst [bzState, ruecklaufState, ruecklaufSollState, hystereseState] = await Promise.all([\n\t\t\tadapter.getStateAsync(getDpPath('WP_BZ_akt')),\n\t\t\tadapter.getStateAsync(getDpPath('temperature_return')),\n\t\t\tadapter.getStateAsync(getDpPath('temperature_target_return')),\n\t\t\tadapter.getStateAsync(getDpPath('returnTemperatureHysteresis')),\n\t\t]);\n\n\t\tconst bzVal = getNumber(bzState, -1);\n\t\tconst ruecklauf = getNumber(ruecklaufState);\n\t\tconst ruecklaufSoll = getNumber(ruecklaufSollState);\n\t\tconst hysterese = getNumber(hystereseState);\n\n\t\tif (bzVal !== CONSTANTS.STATE_IDLE) {\n\t\t\twriteLog(`Forced heating: Ignored - System is not idle (Status: ${bzVal}).`, 'info');\n\t\t\treturn;\n\t\t}\n\n\t\tif (ruecklauf >= ruecklaufSoll + hysterese) {\n\t\t\twriteLog(\n\t\t\t\t`Forced heating: Ignored - Return temperature high enough (${ruecklauf}\u00B0C >= ${ruecklaufSoll + hysterese}\u00B0C).`,\n\t\t\t\t'info',\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tawait adapter.syncConfigValue('heating_curve_parallel_offset', CONSTANTS.FORCE_HEATING_OFFSET);\n\t\twriteLog(\n\t\t\t`Forced heating: Triggered - Base point temporarily set to ${CONSTANTS.FORCE_HEATING_OFFSET}\u00B0C.`,\n\t\t\t'info',\n\t\t);\n\t} catch (err: unknown) {\n\t\tconst msg = err instanceof Error ? err.message : String(err);\n\t\twriteLog(`Forced heating: Error during execution - ${msg}`, 'error');\n\t}\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAAyB;AACzB,0BAA0B;AAC1B,mBAA0B;AAc1B,MAAM,YAAY;AAAA;AAAA,EAEjB,YAAY;AAAA;AAAA,EAEZ,sBAAsB;AAAA;AAAA,EAEtB,qBAAqB;AACtB;AAYA,eAAsB,uBAAuB,SAAwB,IAA2B;AAC/F,MAAI;AACH,UAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,SAAS,KAAK,EAAE;AACtD,UAAM,QAAQ,SAAS,SAAS,EAAE,KAAK,OAAO,KAAK,KAAK,CAAC;AAEzD,UAAM,CAAC,YAAY,WAAW,IAAI,MAAM,QAAQ,IAAI;AAAA,MACnD,QAAQ,kBAAc,+BAAU,yBAAyB,CAAC;AAAA,MAC1D,QAAQ,kBAAc,+BAAU,0BAA0B,CAAC;AAAA,IAC5D,CAAC;AAED,UAAM,YAAQ,wBAAU,UAAU;AAClC,UAAM,aAAS,wBAAU,WAAW;AAEpC,QAAI,SAAS,SAAS,GAAG;AACxB;AAAA,QACC,uCAAuC,KAAK,yCAAsC,MAAM;AAAA,QACxF;AAAA,MACD;AACA;AAAA,IACD;AAEA,UAAM,QAAQ,gBAAgB,iCAAiC,UAAU,mBAAmB;AAC5F;AAAA,MACC,yCAAyC,KAAK,sBAAmB,SAAS,CAAC,yCAAsC,UAAU,mBAAmB;AAAA,MAC9I;AAAA,IACD;AAAA,EACD,SAAS,KAAc;AACtB,UAAM,MAAM,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAC3D,gCAAS,8CAA8C,GAAG,IAAI,OAAO;AAAA,EACtE;AACD;AAQA,eAAsB,mBAAmB,SAAwB,IAA2B;AAC3F,MAAI;AACH,UAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,SAAS,KAAK,EAAE;AACtD,UAAM,QAAQ,SAAS,SAAS,EAAE,KAAK,OAAO,KAAK,KAAK,CAAC;AAEzD,UAAM,CAAC,SAAS,gBAAgB,oBAAoB,cAAc,IAAI,MAAM,QAAQ,IAAI;AAAA,MACvF,QAAQ,kBAAc,+BAAU,WAAW,CAAC;AAAA,MAC5C,QAAQ,kBAAc,+BAAU,oBAAoB,CAAC;AAAA,MACrD,QAAQ,kBAAc,+BAAU,2BAA2B,CAAC;AAAA,MAC5D,QAAQ,kBAAc,+BAAU,6BAA6B,CAAC;AAAA,IAC/D,CAAC;AAED,UAAM,YAAQ,wBAAU,SAAS,EAAE;AACnC,UAAM,gBAAY,wBAAU,cAAc;AAC1C,UAAM,oBAAgB,wBAAU,kBAAkB;AAClD,UAAM,gBAAY,wBAAU,cAAc;AAE1C,QAAI,UAAU,UAAU,YAAY;AACnC,kCAAS,yDAAyD,KAAK,MAAM,MAAM;AACnF;AAAA,IACD;AAEA,QAAI,aAAa,gBAAgB,WAAW;AAC3C;AAAA,QACC,6DAA6D,SAAS,YAAS,gBAAgB,SAAS;AAAA,QACxG;AAAA,MACD;AACA;AAAA,IACD;AAEA,UAAM,QAAQ,gBAAgB,iCAAiC,UAAU,oBAAoB;AAC7F;AAAA,MACC,6DAA6D,UAAU,oBAAoB;AAAA,MAC3F;AAAA,IACD;AAAA,EACD,SAAS,KAAc;AACtB,UAAM,MAAM,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAC3D,gCAAS,4CAA4C,GAAG,IAAI,OAAO;AAAA,EACpE;AACD;",
4
+ "sourcesContent": ["import type { AdapterInstance } from '@iobroker/adapter-core';\nimport { writeLog } from './logger';\nimport { getDpPath } from './stateMapping';\nimport { getNumber } from './utils';\n\n// =========================================================\n// TYPEN & KONSTANTEN\n// =========================================================\n\n/**\n * Erweitert die ioBroker Adapter-Instanz um die spezifischen Methoden f\u00FCr Aktionen.\n */\nexport interface ActionAdapter extends AdapterInstance {\n\t/** Synchronisiert einen Wert mit der W\u00E4rmepumpe */\n\tsyncConfigValue: (key: string, value: any) => Promise<void>;\n}\n\nconst CONSTANTS = {\n\t/** Status-Code f\u00FCr den Ruhezustand der Anlage */\n\tSTATE_IDLE: 5,\n\t/** Befehlswert f\u00FCr den Fu\u00DFpunkt beim Zwangsheizen */\n\tFORCE_HEATING_OFFSET: 35,\n};\n\n// =========================================================\n// AKTIONEN\n// =========================================================\n\n/**\n * Erzwingt die Warmwasserbereitung durch tempor\u00E4re Erh\u00F6hung des Sollwerts.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @param id Die ID des ausl\u00F6senden Datenpunkts.\n */\nexport async function handleZwangswarmwasser(adapter: ActionAdapter, id: string): Promise<void> {\n\ttry {\n\t\tconst localId = id.replace(`${adapter.namespace}.`, '');\n\t\tawait adapter.setState(localId, { val: false, ack: true });\n\n\t\t// Hysterese zus\u00E4tzlich auslesen, um den perfekten Zielwert zu berechnen\n\t\tconst [wwIstState, wwSollState, wwHystereseState] = await Promise.all([\n\t\t\tadapter.getStateAsync(getDpPath('Wamwassertemperatur_Ist')),\n\t\t\tadapter.getStateAsync(getDpPath('Wamwassertemperatur_Soll')),\n\t\t\tadapter.getStateAsync(getDpPath('hotWaterTemperatureHysteresis')),\n\t\t]);\n\n\t\tconst wwIst = getNumber(wwIstState);\n\t\tconst wwSoll = getNumber(wwSollState);\n\t\tconst wwHysterese = getNumber(wwHystereseState, 2); // Fallback auf 2K, falls nicht gefunden\n\n\t\tif (wwIst >= wwSoll - 1) {\n\t\t\twriteLog(\n\t\t\t\t`Forced hot water: Ignored - Actual (${wwIst}\u00B0C) is already sufficient (Target: ${wwSoll}\u00B0C).`,\n\t\t\t\t'info',\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\t// Neuen Sollwert berechnen: Ist-Wert + aktuelle Hysterese + 1.5K Puffer\n\t\tlet forceSoll = wwIst + wwHysterese + 1.5;\n\n\t\t// Sicherheitspr\u00FCfung: Maximaltemperatur kappen, um Regler-Fehler zu vermeiden\n\t\tconst MAX_WW_TEMP = 70;\n\t\tif (forceSoll > MAX_WW_TEMP) {\n\t\t\tforceSoll = MAX_WW_TEMP;\n\t\t}\n\n\t\t// Auf eine Nachkommastelle runden f\u00FCr saubere \u00DCbergabe\n\t\tforceSoll = Math.round(forceSoll * 10) / 10;\n\n\t\t// Statt der Hysterese wird nun der Warmwasser-Sollwert \u00FCberschrieben\n\t\tawait adapter.syncConfigValue('warmwater_temperature', forceSoll);\n\n\t\twriteLog(\n\t\t\t`Forced hot water: Triggered - Actual (${wwIst}\u00B0C) < Target-1 (${wwSoll - 1}\u00B0C). Target temperature temporarily set to ${forceSoll}\u00B0C.`,\n\t\t\t'info',\n\t\t);\n\t} catch (err: unknown) {\n\t\tconst msg = err instanceof Error ? err.message : String(err);\n\t\twriteLog(`Forced hot water: Error during execution - ${msg}`, 'error');\n\t}\n}\n\n/**\n * Erzwingt den Heizbetrieb durch tempor\u00E4re Erh\u00F6hung des Fu\u00DFpunktes.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @param id Die ID des ausl\u00F6senden Datenpunkts.\n */\nexport async function handleZwangsheizen(adapter: ActionAdapter, id: string): Promise<void> {\n\ttry {\n\t\tconst localId = id.replace(`${adapter.namespace}.`, '');\n\t\tawait adapter.setState(localId, { val: false, ack: true });\n\n\t\tconst [bzState, ruecklaufState, ruecklaufSollState, hystereseState] = await Promise.all([\n\t\t\tadapter.getStateAsync(getDpPath('WP_BZ_akt')),\n\t\t\tadapter.getStateAsync(getDpPath('temperature_return')),\n\t\t\tadapter.getStateAsync(getDpPath('temperature_target_return')),\n\t\t\tadapter.getStateAsync(getDpPath('returnTemperatureHysteresis')),\n\t\t]);\n\n\t\tconst bzVal = getNumber(bzState, -1);\n\t\tconst ruecklauf = getNumber(ruecklaufState);\n\t\tconst ruecklaufSoll = getNumber(ruecklaufSollState);\n\t\tconst hysterese = getNumber(hystereseState);\n\n\t\tif (bzVal !== CONSTANTS.STATE_IDLE) {\n\t\t\twriteLog(`Forced heating: Ignored - System is not idle (Status: ${bzVal}).`, 'info');\n\t\t\treturn;\n\t\t}\n\n\t\tif (ruecklauf >= ruecklaufSoll + hysterese) {\n\t\t\twriteLog(\n\t\t\t\t`Forced heating: Ignored - Return temperature high enough (${ruecklauf}\u00B0C >= ${ruecklaufSoll + hysterese}\u00B0C).`,\n\t\t\t\t'info',\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tawait adapter.syncConfigValue('heating_curve_parallel_offset', CONSTANTS.FORCE_HEATING_OFFSET);\n\t\twriteLog(\n\t\t\t`Forced heating: Triggered - Base point temporarily set to ${CONSTANTS.FORCE_HEATING_OFFSET}\u00B0C.`,\n\t\t\t'info',\n\t\t);\n\t} catch (err: unknown) {\n\t\tconst msg = err instanceof Error ? err.message : String(err);\n\t\twriteLog(`Forced heating: Error during execution - ${msg}`, 'error');\n\t}\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oBAAyB;AACzB,0BAA0B;AAC1B,mBAA0B;AAc1B,MAAM,YAAY;AAAA;AAAA,EAEjB,YAAY;AAAA;AAAA,EAEZ,sBAAsB;AACvB;AAYA,eAAsB,uBAAuB,SAAwB,IAA2B;AAC/F,MAAI;AACH,UAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,SAAS,KAAK,EAAE;AACtD,UAAM,QAAQ,SAAS,SAAS,EAAE,KAAK,OAAO,KAAK,KAAK,CAAC;AAGzD,UAAM,CAAC,YAAY,aAAa,gBAAgB,IAAI,MAAM,QAAQ,IAAI;AAAA,MACrE,QAAQ,kBAAc,+BAAU,yBAAyB,CAAC;AAAA,MAC1D,QAAQ,kBAAc,+BAAU,0BAA0B,CAAC;AAAA,MAC3D,QAAQ,kBAAc,+BAAU,+BAA+B,CAAC;AAAA,IACjE,CAAC;AAED,UAAM,YAAQ,wBAAU,UAAU;AAClC,UAAM,aAAS,wBAAU,WAAW;AACpC,UAAM,kBAAc,wBAAU,kBAAkB,CAAC;AAEjD,QAAI,SAAS,SAAS,GAAG;AACxB;AAAA,QACC,uCAAuC,KAAK,yCAAsC,MAAM;AAAA,QACxF;AAAA,MACD;AACA;AAAA,IACD;AAGA,QAAI,YAAY,QAAQ,cAAc;AAGtC,UAAM,cAAc;AACpB,QAAI,YAAY,aAAa;AAC5B,kBAAY;AAAA,IACb;AAGA,gBAAY,KAAK,MAAM,YAAY,EAAE,IAAI;AAGzC,UAAM,QAAQ,gBAAgB,yBAAyB,SAAS;AAEhE;AAAA,MACC,yCAAyC,KAAK,sBAAmB,SAAS,CAAC,iDAA8C,SAAS;AAAA,MAClI;AAAA,IACD;AAAA,EACD,SAAS,KAAc;AACtB,UAAM,MAAM,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAC3D,gCAAS,8CAA8C,GAAG,IAAI,OAAO;AAAA,EACtE;AACD;AAQA,eAAsB,mBAAmB,SAAwB,IAA2B;AAC3F,MAAI;AACH,UAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,SAAS,KAAK,EAAE;AACtD,UAAM,QAAQ,SAAS,SAAS,EAAE,KAAK,OAAO,KAAK,KAAK,CAAC;AAEzD,UAAM,CAAC,SAAS,gBAAgB,oBAAoB,cAAc,IAAI,MAAM,QAAQ,IAAI;AAAA,MACvF,QAAQ,kBAAc,+BAAU,WAAW,CAAC;AAAA,MAC5C,QAAQ,kBAAc,+BAAU,oBAAoB,CAAC;AAAA,MACrD,QAAQ,kBAAc,+BAAU,2BAA2B,CAAC;AAAA,MAC5D,QAAQ,kBAAc,+BAAU,6BAA6B,CAAC;AAAA,IAC/D,CAAC;AAED,UAAM,YAAQ,wBAAU,SAAS,EAAE;AACnC,UAAM,gBAAY,wBAAU,cAAc;AAC1C,UAAM,oBAAgB,wBAAU,kBAAkB;AAClD,UAAM,gBAAY,wBAAU,cAAc;AAE1C,QAAI,UAAU,UAAU,YAAY;AACnC,kCAAS,yDAAyD,KAAK,MAAM,MAAM;AACnF;AAAA,IACD;AAEA,QAAI,aAAa,gBAAgB,WAAW;AAC3C;AAAA,QACC,6DAA6D,SAAS,YAAS,gBAAgB,SAAS;AAAA,QACxG;AAAA,MACD;AACA;AAAA,IACD;AAEA,UAAM,QAAQ,gBAAgB,iCAAiC,UAAU,oBAAoB;AAC7F;AAAA,MACC,6DAA6D,UAAU,oBAAoB;AAAA,MAC3F;AAAA,IACD;AAAA,EACD,SAAS,KAAc;AACtB,UAAM,MAAM,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAC3D,gCAAS,4CAA4C,GAAG,IAAI,OAAO;AAAA,EACpE;AACD;",
6
6
  "names": []
7
7
  }
package/build/main.js CHANGED
@@ -243,7 +243,7 @@ class Luxtronik2Controller extends utils.Adapter {
243
243
  * @returns A promise that resolves when all default configuration tasks resolve.
244
244
  */
245
245
  async setIdleDefaults() {
246
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
246
+ var _a, _b, _c, _d, _e, _f, _g, _h;
247
247
  try {
248
248
  const config = this.config;
249
249
  await this.syncConfigValue("heating_curve_end_point", (_a = config.endpunkt) != null ? _a : 23);
@@ -257,13 +257,9 @@ class Luxtronik2Controller extends utils.Adapter {
257
257
  (_d = config.sync_heating_system_circ_pump_voltage_nominal_heating) != null ? _d : 7
258
258
  );
259
259
  await this.syncConfigValue("warmwater_temperature", (_e = config.sync_warmwater_target_temperature) != null ? _e : 54);
260
- await this.syncConfigValue(
261
- "hotWaterTemperatureHysteresis",
262
- (_f = config.sync_hotwater_temperature_hysteresis) != null ? _f : 10
263
- );
264
- await this.syncConfigValue("returnTemperatureHysteresis", (_g = config.sync_return_temperature_hysteresis) != null ? _g : 1.5);
265
- await this.syncConfigValue("zip_aktiv", (_h = config.zip_aktiv) != null ? _h : 0);
266
- await this.syncConfigValue("Heizen_nach_Wasser", (_i = config.Heating_after_warmwater) != null ? _i : false);
260
+ await this.syncConfigValue("returnTemperatureHysteresis", (_f = config.sync_return_temperature_hysteresis) != null ? _f : 1.5);
261
+ await this.syncConfigValue("zip_aktiv", (_g = config.zip_aktiv) != null ? _g : 0);
262
+ await this.syncConfigValue("Heizen_nach_Wasser", (_h = config.Heating_after_warmwater) != null ? _h : false);
267
263
  } catch (err) {
268
264
  (0, import_logger.writeLog)(`Failed to apply the baseline idle configuration defaults: ${err.message}`, "error");
269
265
  }
@@ -290,7 +286,7 @@ class Luxtronik2Controller extends utils.Adapter {
290
286
  * @returns A promise that resolves when the execution cycle finishes.
291
287
  */
292
288
  async runOptimizationSchedule() {
293
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
289
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
294
290
  try {
295
291
  const config = this.config;
296
292
  const bzState = await this.getStateAsync((0, import_stateMapping.getDpPath)("WP_BZ_akt"));
@@ -324,10 +320,6 @@ class Luxtronik2Controller extends utils.Adapter {
324
320
  }
325
321
  } else if (istWarmwasser) {
326
322
  if (config.zip_optimierung_aktiv !== false) {
327
- await this.syncConfigValue(
328
- "hotWaterTemperatureHysteresis",
329
- (_e = config.sync_hotwater_temperature_hysteresis) != null ? _e : 2
330
- );
331
323
  const actors = config.actors || [];
332
324
  const validActors = actors.filter(
333
325
  (a) => a.zip_external_relay_id && a.zip_external_relay_id.trim() !== ""
@@ -338,16 +330,16 @@ class Luxtronik2Controller extends utils.Adapter {
338
330
  "[ZIP] Externe Aktoren gefunden. Starte Zirkulation synchron zur Warmwasserbereitung."
339
331
  );
340
332
  }
341
- await this.syncConfigValue("zip_aktiv", (_f = config.zip_aktiv_ww) != null ? _f : 120);
333
+ await this.syncConfigValue("zip_aktiv", (_e = config.zip_aktiv_ww) != null ? _e : 120);
342
334
  await this.setOwnStateIfDifferent((0, import_stateMapping.getDpPath)("Activate_Zip"), true, false);
343
335
  }
344
336
  await this.syncConfigValue(
345
337
  "heating_system_circ_pump_voltage_minimal",
346
- (_g = config.sync_heating_system_circ_pump_voltage_minimal_water) != null ? _g : 3
338
+ (_f = config.sync_heating_system_circ_pump_voltage_minimal_water) != null ? _f : 3
347
339
  );
348
340
  await this.syncConfigValue(
349
341
  "heating_system_circ_pump_voltage_nominal",
350
- (_h = config.sync_heating_system_circ_pump_voltage_nominal_water) != null ? _h : 10
342
+ (_g = config.sync_heating_system_circ_pump_voltage_nominal_water) != null ? _g : 10
351
343
  );
352
344
  }
353
345
  } else if (istAbtauen) {
@@ -387,25 +379,25 @@ class Luxtronik2Controller extends utils.Adapter {
387
379
  this.getStateAsync((0, import_stateMapping.getDpPath)("heatingLimit")),
388
380
  this.istBetriebszustandAelterAls10Min()
389
381
  ]);
390
- const wwSoll = (_i = wwSollState == null ? void 0 : wwSollState.val) != null ? _i : 0;
391
- const wwIst = (_j = wwIstState == null ? void 0 : wwIstState.val) != null ? _j : 0;
392
- const ruecklauf = (_k = ruecklaufState == null ? void 0 : ruecklaufState.val) != null ? _k : 0;
393
- const spreizung = (_l = spreizungState == null ? void 0 : spreizungState.val) != null ? _l : 0;
382
+ const wwSoll = (_h = wwSollState == null ? void 0 : wwSollState.val) != null ? _h : 0;
383
+ const wwIst = (_i = wwIstState == null ? void 0 : wwIstState.val) != null ? _i : 0;
384
+ const ruecklauf = (_j = ruecklaufState == null ? void 0 : ruecklaufState.val) != null ? _j : 0;
385
+ const spreizung = (_k = spreizungState == null ? void 0 : spreizungState.val) != null ? _k : 0;
394
386
  const heatingStateStr = String((heatingStateStrState == null ? void 0 : heatingStateStrState.val) || "").trim();
395
387
  const vd1 = (vd1State == null ? void 0 : vd1State.val) === 1;
396
- const wwHysterese = (_m = wwHystereseState == null ? void 0 : wwHystereseState.val) != null ? _m : 0;
397
- const ruecklaufSoll = (_n = ruecklaufSollState == null ? void 0 : ruecklaufSollState.val) != null ? _n : 0;
398
- const hupAktiv = (_o = hupAktivState == null ? void 0 : hupAktivState.val) != null ? _o : 0;
399
- const heizenHysterese = (_p = heizenHystereseState == null ? void 0 : heizenHystereseState.val) != null ? _p : 0;
400
- const mitteltemperatur = (_q = mitteltempState == null ? void 0 : mitteltempState.val) != null ? _q : 0;
401
- const thresholdHeatingLimit = (_r = thresholdHeatingLimitstate == null ? void 0 : thresholdHeatingLimitstate.val) != null ? _r : 0;
402
- const heatingLimit = (_s = heatingLimitState == null ? void 0 : heatingLimitState.val) != null ? _s : 0;
388
+ const wwHysterese = (_l = wwHystereseState == null ? void 0 : wwHystereseState.val) != null ? _l : 0;
389
+ const ruecklaufSoll = (_m = ruecklaufSollState == null ? void 0 : ruecklaufSollState.val) != null ? _m : 0;
390
+ const hupAktiv = (_n = hupAktivState == null ? void 0 : hupAktivState.val) != null ? _n : 0;
391
+ const heizenHysterese = (_o = heizenHystereseState == null ? void 0 : heizenHystereseState.val) != null ? _o : 0;
392
+ const mitteltemperatur = (_p = mitteltempState == null ? void 0 : mitteltempState.val) != null ? _p : 0;
393
+ const thresholdHeatingLimit = (_q = thresholdHeatingLimitstate == null ? void 0 : thresholdHeatingLimitstate.val) != null ? _q : 0;
394
+ const heatingLimit = (_r = heatingLimitState == null ? void 0 : heatingLimitState.val) != null ? _r : 0;
403
395
  const nachWasser = nachWasserState == null ? void 0 : nachWasserState.val;
404
396
  if (istHeizen) {
405
397
  if (config.regelung_aktiv !== false && aelterAls10 && vd1) {
406
- const fusspunkt = (_t = await this.getStateAsync((0, import_stateMapping.getDpPath)("heating_curve_parallel_offset"))) == null ? void 0 : _t.val;
398
+ const fusspunkt = (_s = await this.getStateAsync((0, import_stateMapping.getDpPath)("heating_curve_parallel_offset"))) == null ? void 0 : _s.val;
407
399
  if (fusspunkt === 35) {
408
- const fallbackFusspunkt = (_u = config.fusspunkt) != null ? _u : 21.7;
400
+ const fallbackFusspunkt = (_t = config.fusspunkt) != null ? _t : 21.7;
409
401
  await this.syncConfigValue("heating_curve_parallel_offset", fallbackFusspunkt);
410
402
  }
411
403
  }
@@ -430,16 +422,13 @@ class Luxtronik2Controller extends utils.Adapter {
430
422
  }
431
423
  }
432
424
  if (config.regelung_aktiv !== false) {
433
- if (ruecklauf >= ruecklaufSoll + heizenHysterese - 0.1) {
434
- if (aelterAls10) {
435
- await this.syncConfigValue("Heizen_nach_Wasser", false);
436
- }
437
- } else if (!nachWasser && config.Heating_after_warmwater === true) {
438
- await this.syncConfigValue("Heizen_nach_Wasser", true);
439
- }
440
425
  if (wwSoll - wwIst > 2 && ruecklauf >= ruecklaufSoll + heizenHysterese - 0.1) {
441
- const fallbackHyst = (_v = config.sync_hotwater_temperature_hysteresis) != null ? _v : 2;
442
- await this.syncConfigValue("hotWaterTemperatureHysteresis", fallbackHyst);
426
+ let forceSoll = wwIst + wwHysterese + 1.5;
427
+ if (forceSoll > 75) {
428
+ forceSoll = 75;
429
+ }
430
+ forceSoll = Math.round(forceSoll * 10) / 10;
431
+ await this.syncConfigValue("warmwater_temperature", forceSoll);
443
432
  }
444
433
  }
445
434
  }