iobroker.luxtronik2-controller 0.8.0 → 0.9.0
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 +25 -21
- package/admin/jsonConfig.json +222 -73
- package/build/backupManager.js +97 -0
- package/build/backupManager.js.map +7 -0
- package/build/codes.js +182 -85
- package/build/codes.js.map +2 -2
- package/build/main.js +7 -4
- package/build/main.js.map +2 -2
- package/build/virtualStates.js +10 -2
- package/build/virtualStates.js.map +2 -2
- package/io-package.json +27 -27
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -79,6 +79,31 @@ Bug reports, compatibility notes for specific firmware versions, or feature requ
|
|
|
79
79
|
## Changelog
|
|
80
80
|
|
|
81
81
|
// ### **WORK IN PROGRESS**
|
|
82
|
+
### 0.9.0 (2026-09-20)
|
|
83
|
+
|
|
84
|
+
**🐛 Bugfixes**
|
|
85
|
+
🔴 **IMPORTANT:**
|
|
86
|
+
|
|
87
|
+
- **(Fixed) HUP Dynamic Voltage Control:** Fixed an issue where the digital relay state (`HUPout`) was queried instead of the actual nominal voltage (`heating_system_circ_pump_voltage_nominal`). This previously caused the calculation logic to produce target voltages below the hardware limit (e.g. 1.25V), triggering "less than min 3" validation warnings in the log.
|
|
88
|
+
- **(Fixed) Admin UI Backup Links:** Fixed multiple issues with the manual download links in the Backup tab. The IP address placeholder was corrected (from `{host}` to `${data.host}`) to resolve correctly. Additionally, `404 Not Found` errors on newer firmware versions were fixed by routing links to the root web directory (`/procdta`, `/procparam`, `/procerr`) instead of the legacy `/Webclient/` directory.
|
|
89
|
+
|
|
90
|
+
**🚀 Features & Improvements**
|
|
91
|
+
|
|
92
|
+
- **(Added) German Translations for Error & Outage Codes:** Added full German translations for all entries in `ERROR_CODES` and `OUTAGE_CODES`.
|
|
93
|
+
- **(Improved) Multi-Language History Logs:** The error log (`Fehlerspeicher`) and outage history (`Abschaltungen`) now dynamically output descriptions and fallbacks in the configured adapter language (`de` / `en`).
|
|
94
|
+
- **(Added) Backup & Diagnostics Tab:** Introduced a new tab in the adapter settings for easy access to heat pump data.
|
|
95
|
+
- **(Added) Manual Downloads:** Added direct buttons to manually download the parameter backup (`procparam`) and error log (`procerr`) via the heat pump's web server. The manual DTA download was split into two distinct steps ("1. Trigger DTA generation" and "2. Download DTA Log") to better reflect the hardware behavior.
|
|
96
|
+
- **(Added) Automated DTA Backup & Custom Storage:** Implemented a new scheduling feature (cron) to automatically trigger and download live DTA logs, saving them directly to the ioBroker file system. The default storage location is the root directory of the adapter's file system, but users can specify a custom subfolder (e.g., `backup`) which is automatically created and sanitized.
|
|
97
|
+
- **(Improved) Firmware Agnostic Backup Downloads:** The automated DTA backup manager now features an intelligent fallback mechanism. It attempts to download logs from both the root directory (`/procdta`) and the legacy subfolder (`/Webclient/procdta`), ensuring compatibility across all Luxtronik firmware versions (V1, V2, V3).
|
|
98
|
+
|
|
99
|
+
**🛠 Refactoring & Under the Hood**
|
|
100
|
+
|
|
101
|
+
- **(Development) TypeScript Definitions:** Added missing `@types/node-schedule` to the dev dependencies to resolve ESLint type-checking errors during the build process.
|
|
102
|
+
|
|
103
|
+
### 0.8.1 (2026-09-19)
|
|
104
|
+
|
|
105
|
+
- Resolve issues which are reported by repository checker
|
|
106
|
+
|
|
82
107
|
### 0.8.0 (2026-09-14)
|
|
83
108
|
|
|
84
109
|
**🚀 Features & Enhancements**
|
|
@@ -122,27 +147,6 @@ Bug reports, compatibility notes for specific firmware versions, or feature requ
|
|
|
122
147
|
|
|
123
148
|
- (Changed) Forced DHW Safety Limit: Reduced the internal safety limit for temporary hot water target adjustments during forced DHW runs from 75°C to 70°C to better protect the system's high-pressure switch.
|
|
124
149
|
|
|
125
|
-
### 0.7.1 (2026-09-07)
|
|
126
|
-
|
|
127
|
-
**Bugfixes**
|
|
128
|
-
|
|
129
|
-
- (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!
|
|
130
|
-
|
|
131
|
-
- (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).
|
|
132
|
-
|
|
133
|
-
### 0.7.0 (2026-09-04)
|
|
134
|
-
|
|
135
|
-
**Features & Changes**
|
|
136
|
-
|
|
137
|
-
- **(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.
|
|
138
|
-
- **(Changed) Disable default**: Disabled reset to default values in idle mode by default on initial start
|
|
139
|
-
- **(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.
|
|
140
|
-
- **(UI/Docs)**: Added detailed explanations and trigger rules for "Intelligent Cycle Optimization" and "Heating after hot water" directly to the admin configuration page.
|
|
141
|
-
|
|
142
|
-
**Bugfixes**
|
|
143
|
-
|
|
144
|
-
- Fixed adapter checker warning [W0066] by downgrading `@types/node` dependency to v22
|
|
145
|
-
|
|
146
150
|
## License
|
|
147
151
|
|
|
148
152
|
MIT License
|
package/admin/jsonConfig.json
CHANGED
|
@@ -126,79 +126,6 @@
|
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
|
-
"cycleOptimizationTab": {
|
|
130
|
-
"type": "panel",
|
|
131
|
-
"label": {
|
|
132
|
-
"en": "Cycle Optimization",
|
|
133
|
-
"de": "Takt-Optimierung"
|
|
134
|
-
},
|
|
135
|
-
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxwYXRoIGZpbGw9ImN1cnJlbnRDb2xvciIgZD0iTTkuNSAxNXExLjA1IDAgMS43NzUtLjcyNWw0LTRRMTYgOS41NSAxNiA4LjV0LS43MjUtMS43NzVUMTMuNSA2dC0xLjc3NS43MjVRMTAuOCA2LjQgOS45IDYuNTc1dC0xLjUyNS44dC0uOCAxLjUyNXQuMTUgMS44MjVRNyAxMS40NSA3IDEyLjV0LjcyNSAxLjc3NVQ5LjUgMTVNNiAyMnYtNC4zcS0xLjQyNS0xLjMtMi4yMTItMy4wMzdUMyAxMXEwLTMuNzUgMi42MjUtNi4zNzVUMTIgMnEzLjEyNSAwIDUuNTM4IDEuODM4dDMuMTM3IDQuNzg3bDEuMyA1LjEyNXEuMTI1LjQ3NS0uMTc1Ljg2M1QyMSAxNWgtMnYzcTAgLjgyNS0uNTg3IDEuNDEzVDE3IDIwaC0ydjJoLTJ2LTRoNHYtNWgyLjdsLS45NS0zLjg3NXEtLjU3NS0yLjI3NS0yLjQ1LTMuN1QxMiA0UTkuMSA0IDcuMDUgNi4wMjVUNSAxMC45NXEwIDEuNS42MTMgMi44NXQxLjczNyAyLjRsLjY1LjZWMjJ6bTYuMzUtOSIgLz4KPC9zdmc+Cg==",
|
|
136
|
-
"items": {
|
|
137
|
-
"informationCycleOptimization": {
|
|
138
|
-
"type": "staticText",
|
|
139
|
-
"text": {
|
|
140
|
-
"en": "By default, the Luxtronik controller treats heating and domestic hot water (DHW) cycles as separate operations. This adapter coordinates the run so the compressor transitions seamlessly into heating without shutting down.<br><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.",
|
|
141
|
-
"de": "Standardmäßig behandelt die Luxtronik-Steuerung Heiz- und Warmwassertakte strikt getrennt. Dieser Adapter koppelt die Vorgänge, sodass der Verdichter ohne Zwischenstopp direkt in den Heizbetrieb übergeht.<br><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."
|
|
142
|
-
},
|
|
143
|
-
"style": { "marginBottom": "20px", "fontSize": "14px" },
|
|
144
|
-
"xs": 12,
|
|
145
|
-
"sm": 12,
|
|
146
|
-
"md": 12,
|
|
147
|
-
"lg": 12,
|
|
148
|
-
"xl": 12
|
|
149
|
-
},
|
|
150
|
-
"regelung_aktiv": {
|
|
151
|
-
"type": "checkbox",
|
|
152
|
-
"label": {
|
|
153
|
-
"en": "Enable intelligent cycle optimization",
|
|
154
|
-
"de": "Intelligente Takt-Optimierung aktivieren"
|
|
155
|
-
},
|
|
156
|
-
"default": false,
|
|
157
|
-
"confirm": {
|
|
158
|
-
"condition": "data.regelung_aktiv === true && data.idle_defaults_aktiv !== true",
|
|
159
|
-
"title": { "en": "Important Recommendation", "de": "Wichtige Empfehlung" },
|
|
160
|
-
"text": {
|
|
161
|
-
"en": "You are activating the intelligent cycle optimization. It is highly recommended to also enable 'Force default values during idle' in the 'Idle Defaults' tab! This ensures that the heat pump returns to a safe state after the adapter intervenes.",
|
|
162
|
-
"de": "Du aktivierst die intelligente Takt-Optimierung. Es wird dringend empfohlen, im Reiter 'Leerlauf' die Option 'Standardwerte im Leerlauf erzwingen' einzuschalten! Nur so ist garantiert, dass die Wärmepumpe nach dem Eingreifen des Adapters wieder in einen sicheren Ursprungszustand zurückkehrt."
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
"xs": 12,
|
|
166
|
-
"sm": 6,
|
|
167
|
-
"md": 6,
|
|
168
|
-
"lg": 6,
|
|
169
|
-
"xl": 6
|
|
170
|
-
},
|
|
171
|
-
"Heating_after_warmwater": {
|
|
172
|
-
"type": "checkbox",
|
|
173
|
-
"label": { "en": "Heating after hot water", "de": "Heizen nach Warmwasser erzwingen" },
|
|
174
|
-
"hidden": "!data.regelung_aktiv",
|
|
175
|
-
"default": false,
|
|
176
|
-
"xs": 12,
|
|
177
|
-
"sm": 6,
|
|
178
|
-
"md": 6,
|
|
179
|
-
"lg": 6,
|
|
180
|
-
"xl": 6
|
|
181
|
-
},
|
|
182
|
-
"exampleImageCycle_de": {
|
|
183
|
-
"type": "staticImage",
|
|
184
|
-
"src": "img/Takt_Optimierung.svg",
|
|
185
|
-
"hidden": "systemConfig.language !== 'de'",
|
|
186
|
-
"style": {
|
|
187
|
-
"width": "1200px",
|
|
188
|
-
"maxWidth": "100%",
|
|
189
|
-
"height": "auto",
|
|
190
|
-
"border": "1px solid #cccccc",
|
|
191
|
-
"borderRadius": "5px",
|
|
192
|
-
"marginTop": "10px"
|
|
193
|
-
},
|
|
194
|
-
"xs": 12,
|
|
195
|
-
"sm": 12,
|
|
196
|
-
"md": 12,
|
|
197
|
-
"lg": 12,
|
|
198
|
-
"xl": 12
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
},
|
|
202
129
|
"idleTab": {
|
|
203
130
|
"type": "panel",
|
|
204
131
|
"label": {
|
|
@@ -399,6 +326,79 @@
|
|
|
399
326
|
}
|
|
400
327
|
}
|
|
401
328
|
},
|
|
329
|
+
"cycleOptimizationTab": {
|
|
330
|
+
"type": "panel",
|
|
331
|
+
"label": {
|
|
332
|
+
"en": "Cycle Optimization",
|
|
333
|
+
"de": "Takt-Optimierung"
|
|
334
|
+
},
|
|
335
|
+
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPgoJPHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIgLz4KCTxwYXRoIGZpbGw9ImN1cnJlbnRDb2xvciIgZD0iTTkuNSAxNXExLjA1IDAgMS43NzUtLjcyNWw0LTRRMTYgOS41NSAxNiA4LjV0LS43MjUtMS43NzVUMTMuNSA2dC0xLjc3NS43MjVRMTAuOCA2LjQgOS45IDYuNTc1dC0xLjUyNS44dC0uOCAxLjUyNXQuMTUgMS44MjVRNyAxMS40NSA3IDEyLjV0LjcyNSAxLjc3NVQ5LjUgMTVNNiAyMnYtNC4zcS0xLjQyNS0xLjMtMi4yMTItMy4wMzdUMyAxMXEwLTMuNzUgMi42MjUtNi4zNzVUMTIgMnEzLjEyNSAwIDUuNTM4IDEuODM4dDMuMTM3IDQuNzg3bDEuMyA1LjEyNXEuMTI1LjQ3NS0uMTc1Ljg2M1QyMSAxNWgtMnYzcTAgLjgyNS0uNTg3IDEuNDEzVDE3IDIwaC0ydjJoLTJ2LTRoNHYtNWgyLjdsLS45NS0zLjg3NXEtLjU3NS0yLjI3NS0yLjQ1LTMuN1QxMiA0UTkuMSA0IDcuMDUgNi4wMjVUNSAxMC45NXEwIDEuNS42MTMgMi44NXQxLjczNyAyLjRsLjY1LjZWMjJ6bTYuMzUtOSIgLz4KPC9zdmc+Cg==",
|
|
336
|
+
"items": {
|
|
337
|
+
"informationCycleOptimization": {
|
|
338
|
+
"type": "staticText",
|
|
339
|
+
"text": {
|
|
340
|
+
"en": "By default, the Luxtronik controller treats heating and domestic hot water (DHW) cycles as separate operations. This adapter coordinates the run so the compressor transitions seamlessly into heating without shutting down.<br><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.",
|
|
341
|
+
"de": "Standardmäßig behandelt die Luxtronik-Steuerung Heiz- und Warmwassertakte strikt getrennt. Dieser Adapter koppelt die Vorgänge, sodass der Verdichter ohne Zwischenstopp direkt in den Heizbetrieb übergeht.<br><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."
|
|
342
|
+
},
|
|
343
|
+
"style": { "marginBottom": "20px", "fontSize": "14px" },
|
|
344
|
+
"xs": 12,
|
|
345
|
+
"sm": 12,
|
|
346
|
+
"md": 12,
|
|
347
|
+
"lg": 12,
|
|
348
|
+
"xl": 12
|
|
349
|
+
},
|
|
350
|
+
"regelung_aktiv": {
|
|
351
|
+
"type": "checkbox",
|
|
352
|
+
"label": {
|
|
353
|
+
"en": "Enable intelligent cycle optimization",
|
|
354
|
+
"de": "Intelligente Takt-Optimierung aktivieren"
|
|
355
|
+
},
|
|
356
|
+
"default": false,
|
|
357
|
+
"confirm": {
|
|
358
|
+
"condition": "data.regelung_aktiv === true && data.idle_defaults_aktiv !== true",
|
|
359
|
+
"title": { "en": "Important Recommendation", "de": "Wichtige Empfehlung" },
|
|
360
|
+
"text": {
|
|
361
|
+
"en": "You are activating the intelligent cycle optimization. It is highly recommended to also enable 'Force default values during idle' in the 'Idle Defaults' tab! This ensures that the heat pump returns to a safe state after the adapter intervenes.",
|
|
362
|
+
"de": "Du aktivierst die intelligente Takt-Optimierung. Es wird dringend empfohlen, im Reiter 'Leerlauf' die Option 'Standardwerte im Leerlauf erzwingen' einzuschalten! Nur so ist garantiert, dass die Wärmepumpe nach dem Eingreifen des Adapters wieder in einen sicheren Ursprungszustand zurückkehrt."
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
"xs": 12,
|
|
366
|
+
"sm": 6,
|
|
367
|
+
"md": 6,
|
|
368
|
+
"lg": 6,
|
|
369
|
+
"xl": 6
|
|
370
|
+
},
|
|
371
|
+
"Heating_after_warmwater": {
|
|
372
|
+
"type": "checkbox",
|
|
373
|
+
"label": { "en": "Heating after hot water", "de": "Heizen nach Warmwasser erzwingen" },
|
|
374
|
+
"hidden": "!data.regelung_aktiv",
|
|
375
|
+
"default": false,
|
|
376
|
+
"xs": 12,
|
|
377
|
+
"sm": 6,
|
|
378
|
+
"md": 6,
|
|
379
|
+
"lg": 6,
|
|
380
|
+
"xl": 6
|
|
381
|
+
},
|
|
382
|
+
"exampleImageCycle_de": {
|
|
383
|
+
"type": "staticImage",
|
|
384
|
+
"src": "img/Takt_Optimierung.svg",
|
|
385
|
+
"hidden": "systemConfig.language !== 'de'",
|
|
386
|
+
"style": {
|
|
387
|
+
"width": "1200px",
|
|
388
|
+
"maxWidth": "100%",
|
|
389
|
+
"height": "auto",
|
|
390
|
+
"border": "1px solid #cccccc",
|
|
391
|
+
"borderRadius": "5px",
|
|
392
|
+
"marginTop": "10px"
|
|
393
|
+
},
|
|
394
|
+
"xs": 12,
|
|
395
|
+
"sm": 12,
|
|
396
|
+
"md": 12,
|
|
397
|
+
"lg": 12,
|
|
398
|
+
"xl": 12
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
402
|
"hupTab": {
|
|
403
403
|
"type": "panel",
|
|
404
404
|
"label": {
|
|
@@ -2892,6 +2892,155 @@
|
|
|
2892
2892
|
]
|
|
2893
2893
|
}
|
|
2894
2894
|
}
|
|
2895
|
+
},
|
|
2896
|
+
"backupTab": {
|
|
2897
|
+
"type": "panel",
|
|
2898
|
+
"label": {
|
|
2899
|
+
"en": "Backup & Diagnostics",
|
|
2900
|
+
"de": "Backup & Diagnose"
|
|
2901
|
+
},
|
|
2902
|
+
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0iY3VycmVudENvbG9yIiBkPSJNMTkgOWgtNFYzSDl2Nkg1bDcgN3pNNSAxOHYyaDE0di0yeiIvPjwvc3ZnPg==",
|
|
2903
|
+
"items": {
|
|
2904
|
+
"headerBackup": {
|
|
2905
|
+
"type": "header",
|
|
2906
|
+
"text": { "en": "Manual Download", "de": "Manueller Download" },
|
|
2907
|
+
"size": 4,
|
|
2908
|
+
"xs": 12,
|
|
2909
|
+
"sm": 12,
|
|
2910
|
+
"md": 12,
|
|
2911
|
+
"lg": 12,
|
|
2912
|
+
"xl": 12
|
|
2913
|
+
},
|
|
2914
|
+
"backupInfo": {
|
|
2915
|
+
"type": "staticText",
|
|
2916
|
+
"text": {
|
|
2917
|
+
"en": "You can download the heat pump's internal logs directly via its web interface. Trigger the DTA generation first, wait a few seconds, then download the file.",
|
|
2918
|
+
"de": "Über den internen Webserver der Luxtronik-Steuerung lassen sich System-Logs direkt herunterladen. Stoße zuerst die DTA-Generierung an, warte ein paar Sekunden und lade das Log dann herunter."
|
|
2919
|
+
},
|
|
2920
|
+
"style": { "marginBottom": "20px", "fontSize": "14px" },
|
|
2921
|
+
"xs": 12,
|
|
2922
|
+
"sm": 12,
|
|
2923
|
+
"md": 12,
|
|
2924
|
+
"lg": 12,
|
|
2925
|
+
"xl": 12
|
|
2926
|
+
},
|
|
2927
|
+
"linkNewProc": {
|
|
2928
|
+
"type": "staticLink",
|
|
2929
|
+
"label": { "en": "1. Trigger DTA", "de": "1. DTA generieren" },
|
|
2930
|
+
"href": "http://${data.host}/NewProc",
|
|
2931
|
+
"button": true,
|
|
2932
|
+
"variant": "outlined",
|
|
2933
|
+
"color": "primary",
|
|
2934
|
+
"xs": 12,
|
|
2935
|
+
"sm": 6,
|
|
2936
|
+
"md": 3,
|
|
2937
|
+
"lg": 3,
|
|
2938
|
+
"xl": 3
|
|
2939
|
+
},
|
|
2940
|
+
"linkDta": {
|
|
2941
|
+
"type": "staticLink",
|
|
2942
|
+
"label": { "en": "2. Download DTA", "de": "2. DTA herunterladen" },
|
|
2943
|
+
"href": "http://${data.host}/procdta",
|
|
2944
|
+
"button": true,
|
|
2945
|
+
"variant": "contained",
|
|
2946
|
+
"color": "primary",
|
|
2947
|
+
"xs": 12,
|
|
2948
|
+
"sm": 6,
|
|
2949
|
+
"md": 3,
|
|
2950
|
+
"lg": 3,
|
|
2951
|
+
"xl": 3
|
|
2952
|
+
},
|
|
2953
|
+
"linkParam": {
|
|
2954
|
+
"type": "staticLink",
|
|
2955
|
+
"label": { "en": "Parameter (.txt)", "de": "Parameter (.txt)" },
|
|
2956
|
+
"href": "http://${data.host}/procparam",
|
|
2957
|
+
"button": true,
|
|
2958
|
+
"variant": "outlined",
|
|
2959
|
+
"color": "primary",
|
|
2960
|
+
"xs": 12,
|
|
2961
|
+
"sm": 6,
|
|
2962
|
+
"md": 3,
|
|
2963
|
+
"lg": 3,
|
|
2964
|
+
"xl": 3
|
|
2965
|
+
},
|
|
2966
|
+
"linkErr": {
|
|
2967
|
+
"type": "staticLink",
|
|
2968
|
+
"label": { "en": "Error Log (.txt)", "de": "Fehlerspeicher (.txt)" },
|
|
2969
|
+
"href": "http://${data.host}/procerr",
|
|
2970
|
+
"button": true,
|
|
2971
|
+
"variant": "outlined",
|
|
2972
|
+
"color": "secondary",
|
|
2973
|
+
"style": { "marginBottom": "30px" },
|
|
2974
|
+
"xs": 12,
|
|
2975
|
+
"sm": 6,
|
|
2976
|
+
"md": 3,
|
|
2977
|
+
"lg": 3,
|
|
2978
|
+
"xl": 3
|
|
2979
|
+
},
|
|
2980
|
+
"divider1": {
|
|
2981
|
+
"type": "divider",
|
|
2982
|
+
"color": "primary",
|
|
2983
|
+
"style": { "marginBottom": "20px" },
|
|
2984
|
+
"xs": 12,
|
|
2985
|
+
"sm": 12,
|
|
2986
|
+
"md": 12,
|
|
2987
|
+
"lg": 12,
|
|
2988
|
+
"xl": 12
|
|
2989
|
+
},
|
|
2990
|
+
"headerAutoBackup": {
|
|
2991
|
+
"type": "header",
|
|
2992
|
+
"text": { "en": "Automated DTA Backup", "de": "Automatisches DTA-Backup" },
|
|
2993
|
+
"size": 4,
|
|
2994
|
+
"xs": 12,
|
|
2995
|
+
"sm": 12,
|
|
2996
|
+
"md": 12,
|
|
2997
|
+
"lg": 12,
|
|
2998
|
+
"xl": 12
|
|
2999
|
+
},
|
|
3000
|
+
"autoBackupActive": {
|
|
3001
|
+
"type": "checkbox",
|
|
3002
|
+
"label": {
|
|
3003
|
+
"en": "Enable automatic DTA download",
|
|
3004
|
+
"de": "Automatischen DTA-Download (Live) aktivieren"
|
|
3005
|
+
},
|
|
3006
|
+
"help": {
|
|
3007
|
+
"en": "If enabled, the adapter will automatically download the DTA log according to the schedule and save it to the ioBroker file system.",
|
|
3008
|
+
"de": "Wenn aktiviert, ruft der Adapter das DTA-Live-Log nach dem untenstehenden Zeitplan vollautomatisch ab und speichert es im ioBroker-Dateisystem."
|
|
3009
|
+
},
|
|
3010
|
+
"default": false,
|
|
3011
|
+
"xs": 12,
|
|
3012
|
+
"sm": 12,
|
|
3013
|
+
"md": 4,
|
|
3014
|
+
"lg": 4,
|
|
3015
|
+
"xl": 4
|
|
3016
|
+
},
|
|
3017
|
+
"autoBackupCron": {
|
|
3018
|
+
"type": "cron",
|
|
3019
|
+
"label": { "en": "Schedule", "de": "Zeitplan" },
|
|
3020
|
+
"default": "0 2 * * *",
|
|
3021
|
+
"hidden": "!data.autoBackupActive",
|
|
3022
|
+
"xs": 12,
|
|
3023
|
+
"sm": 12,
|
|
3024
|
+
"md": 4,
|
|
3025
|
+
"lg": 4,
|
|
3026
|
+
"xl": 4
|
|
3027
|
+
},
|
|
3028
|
+
"autoBackupPath": {
|
|
3029
|
+
"type": "text",
|
|
3030
|
+
"label": { "en": "Storage subfolder", "de": "Speicher-Unterordner" },
|
|
3031
|
+
"help": {
|
|
3032
|
+
"en": "Leave empty to save directly in the adapter's main directory, or type a subfolder name (e.g., 'backups').",
|
|
3033
|
+
"de": "Leer lassen, um direkt im Hauptverzeichnis des Adapters zu speichern. Für Unterordner einfach den Namen eintippen (z.B. 'backups')."
|
|
3034
|
+
},
|
|
3035
|
+
"placeholder": "Leer = Adapter-Verzeichnis",
|
|
3036
|
+
"hidden": "!data.autoBackupActive",
|
|
3037
|
+
"xs": 12,
|
|
3038
|
+
"sm": 12,
|
|
3039
|
+
"md": 4,
|
|
3040
|
+
"lg": 4,
|
|
3041
|
+
"xl": 4
|
|
3042
|
+
}
|
|
3043
|
+
}
|
|
2895
3044
|
}
|
|
2896
3045
|
}
|
|
2897
3046
|
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var backupManager_exports = {};
|
|
30
|
+
__export(backupManager_exports, {
|
|
31
|
+
executeDtaBackup: () => executeDtaBackup,
|
|
32
|
+
initAutoBackup: () => initAutoBackup,
|
|
33
|
+
stopAutoBackup: () => stopAutoBackup
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(backupManager_exports);
|
|
36
|
+
var schedule = __toESM(require("node-schedule"));
|
|
37
|
+
var import_logger = require("./logger");
|
|
38
|
+
let backupJob = null;
|
|
39
|
+
function initAutoBackup(adapter) {
|
|
40
|
+
const config = adapter.config;
|
|
41
|
+
stopAutoBackup();
|
|
42
|
+
if (config.autoBackupActive && config.autoBackupCron) {
|
|
43
|
+
(0, import_logger.writeLog)(`Initializing automated DTA backup with cron schedule: ${config.autoBackupCron}`, "info");
|
|
44
|
+
backupJob = schedule.scheduleJob(config.autoBackupCron, async () => {
|
|
45
|
+
await executeDtaBackup(adapter);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
async function executeDtaBackup(adapter) {
|
|
50
|
+
const config = adapter.config;
|
|
51
|
+
const ip = config.host;
|
|
52
|
+
if (!ip) {
|
|
53
|
+
(0, import_logger.writeLog)("Backup aborted: No IP address configured.", "warn");
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
(0, import_logger.writeLog)("Triggering live DTA flush on heat pump (/NewProc)...", "debug");
|
|
58
|
+
await fetch(`http://${ip}/NewProc`).catch(() => {
|
|
59
|
+
});
|
|
60
|
+
await new Promise((resolve) => setTimeout(resolve, 3e3));
|
|
61
|
+
(0, import_logger.writeLog)("Downloading latest DTA file...", "debug");
|
|
62
|
+
let response = await fetch(`http://${ip}/procdta`).catch(() => null);
|
|
63
|
+
if (!response || !response.ok) {
|
|
64
|
+
(0, import_logger.writeLog)("/procdta not found, trying fallback path /Webclient/procdta...", "debug");
|
|
65
|
+
response = await fetch(`http://${ip}/Webclient/procdta`).catch(() => null);
|
|
66
|
+
}
|
|
67
|
+
if (!response || !response.ok) {
|
|
68
|
+
throw new Error(`HTTP Error - File not found on heat pump webserver.`);
|
|
69
|
+
}
|
|
70
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
71
|
+
const buffer = Buffer.from(arrayBuffer);
|
|
72
|
+
const basePath = config.autoBackupPath ? String(config.autoBackupPath).replace(/^\/+|\/+$/g, "").trim() : "";
|
|
73
|
+
const now = /* @__PURE__ */ new Date();
|
|
74
|
+
const timestamp = now.toISOString().replace(/[:.]/g, "-").substring(0, 19);
|
|
75
|
+
const fileName = `dta_live_${timestamp}.dta`;
|
|
76
|
+
const fullPath = basePath !== "" ? `${basePath}/${fileName}` : fileName;
|
|
77
|
+
await adapter.writeFileAsync(adapter.namespace, fullPath, buffer);
|
|
78
|
+
(0, import_logger.writeLog)(`DTA Backup successfully saved as ${fullPath} in ioBroker files.`, "info");
|
|
79
|
+
} catch (err) {
|
|
80
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
81
|
+
(0, import_logger.writeLog)(`Failed to execute automated DTA backup: ${msg}`, "error");
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
function stopAutoBackup() {
|
|
85
|
+
if (backupJob) {
|
|
86
|
+
backupJob.cancel();
|
|
87
|
+
backupJob = null;
|
|
88
|
+
(0, import_logger.writeLog)("Automated DTA backup schedule stopped.", "debug");
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
92
|
+
0 && (module.exports = {
|
|
93
|
+
executeDtaBackup,
|
|
94
|
+
initAutoBackup,
|
|
95
|
+
stopAutoBackup
|
|
96
|
+
});
|
|
97
|
+
//# sourceMappingURL=backupManager.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/backupManager.ts"],
|
|
4
|
+
"sourcesContent": ["import type { AdapterInstance } from '@iobroker/adapter-core';\nimport * as schedule from 'node-schedule';\nimport { writeLog } from './logger';\n\n// Speichert den aktuellen Cronjob, um ihn beim Beenden sauber abzur\u00E4umen\nlet backupJob: schedule.Job | null = null;\n\n/**\n * Initialisiert den automatischen Backup-Zeitplan basierend auf der ioBroker-Konfiguration.\n *\n * @param adapter Die ioBroker Adapter-Instanz\n */\nexport function initAutoBackup(adapter: AdapterInstance): void {\n\tconst config = adapter.config as any;\n\n\t// Alten Job abbrechen, falls die Funktion neu aufgerufen wird\n\tstopAutoBackup();\n\n\tif (config.autoBackupActive && config.autoBackupCron) {\n\t\twriteLog(`Initializing automated DTA backup with cron schedule: ${config.autoBackupCron}`, 'info');\n\n\t\t// Neuen Cronjob anlegen\n\t\tbackupJob = schedule.scheduleJob(config.autoBackupCron, async () => {\n\t\t\tawait executeDtaBackup(adapter);\n\t\t});\n\t}\n}\n\n/**\n * F\u00FChrt den eigentlichen Download aus und speichert die Datei im ioBroker.\n *\n * @param adapter Die ioBroker Adapter-Instanz\n */\nexport async function executeDtaBackup(adapter: AdapterInstance): Promise<void> {\n\tconst config = adapter.config as any;\n\tconst ip = config.host;\n\n\tif (!ip) {\n\t\twriteLog('Backup aborted: No IP address configured.', 'warn');\n\t\treturn;\n\t}\n\n\ttry {\n\t\twriteLog('Triggering live DTA flush on heat pump (/NewProc)...', 'debug');\n\n\t\t// 1. Zwingt die Luxtronik, den aktuellen Arbeitsspeicher in die Datei zu schreiben\n\t\tawait fetch(`http://${ip}/NewProc`).catch(() => {});\n\n\t\t// Der Anlage kurz Zeit geben, die Datei auf den internen Speicher zu schreiben\n\t\tawait new Promise(resolve => setTimeout(resolve, 3000));\n\n\t\twriteLog('Downloading latest DTA file...', 'debug');\n\n\t\t// 2. Die frisch geschriebene Datei herunterladen (Versuche beide bekannten Firmware-Pfade)\n\t\tlet response = await fetch(`http://${ip}/procdta`).catch(() => null);\n\n\t\t// Fallback f\u00FCr \u00E4ltere Firmwares (Ordner: /Webclient/)\n\t\tif (!response || !response.ok) {\n\t\t\twriteLog('/procdta not found, trying fallback path /Webclient/procdta...', 'debug');\n\t\t\tresponse = await fetch(`http://${ip}/Webclient/procdta`).catch(() => null);\n\t\t}\n\n\t\tif (!response || !response.ok) {\n\t\t\tthrow new Error(`HTTP Error - File not found on heat pump webserver.`);\n\t\t}\n\n\t\t// Daten als Bin\u00E4rpuffer einlesen\n\t\tconst arrayBuffer = await response.arrayBuffer();\n\t\tconst buffer = Buffer.from(arrayBuffer);\n\n\t\t// 3. Speicherpfad aus Config holen und formatieren\n\t\t// Wenn das Feld leer ist, speichern wir direkt im Adapter-Namespace\n\t\tconst basePath = config.autoBackupPath\n\t\t\t? String(config.autoBackupPath)\n\t\t\t\t\t.replace(/^\\/+|\\/+$/g, '')\n\t\t\t\t\t.trim()\n\t\t\t: '';\n\n\t\t// 4. Dateinamen mit aktuellem Zeitstempel generieren (z.B. dta_live_2026-09-20T07-30-00.dta)\n\t\tconst now = new Date();\n\t\tconst timestamp = now.toISOString().replace(/[:.]/g, '-').substring(0, 19);\n\t\tconst fileName = `dta_live_${timestamp}.dta`;\n\n\t\t// Wenn basePath existiert, h\u00E4nge den Dateinamen an, sonst speichere direkt ins Root\n\t\tconst fullPath = basePath !== '' ? `${basePath}/${fileName}` : fileName;\n\n\t\t// 5. Im ioBroker-Dateisystem speichern (Sichtbar im Tab \"Dateien\")\n\t\tawait adapter.writeFileAsync(adapter.namespace, fullPath, buffer);\n\n\t\twriteLog(`DTA Backup successfully saved as ${fullPath} in ioBroker files.`, 'info');\n\t} catch (err: unknown) {\n\t\tconst msg = err instanceof Error ? err.message : String(err);\n\t\twriteLog(`Failed to execute automated DTA backup: ${msg}`, 'error');\n\t}\n}\n\n/**\n * Stoppt den laufenden Cronjob (wichtig f\u00FCr den Adapter-Neustart).\n */\nexport function stopAutoBackup(): void {\n\tif (backupJob) {\n\t\tbackupJob.cancel();\n\t\tbackupJob = null;\n\t\twriteLog('Automated DTA backup schedule stopped.', 'debug');\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,eAA0B;AAC1B,oBAAyB;AAGzB,IAAI,YAAiC;AAO9B,SAAS,eAAe,SAAgC;AAC9D,QAAM,SAAS,QAAQ;AAGvB,iBAAe;AAEf,MAAI,OAAO,oBAAoB,OAAO,gBAAgB;AACrD,gCAAS,yDAAyD,OAAO,cAAc,IAAI,MAAM;AAGjG,gBAAY,SAAS,YAAY,OAAO,gBAAgB,YAAY;AACnE,YAAM,iBAAiB,OAAO;AAAA,IAC/B,CAAC;AAAA,EACF;AACD;AAOA,eAAsB,iBAAiB,SAAyC;AAC/E,QAAM,SAAS,QAAQ;AACvB,QAAM,KAAK,OAAO;AAElB,MAAI,CAAC,IAAI;AACR,gCAAS,6CAA6C,MAAM;AAC5D;AAAA,EACD;AAEA,MAAI;AACH,gCAAS,wDAAwD,OAAO;AAGxE,UAAM,MAAM,UAAU,EAAE,UAAU,EAAE,MAAM,MAAM;AAAA,IAAC,CAAC;AAGlD,UAAM,IAAI,QAAQ,aAAW,WAAW,SAAS,GAAI,CAAC;AAEtD,gCAAS,kCAAkC,OAAO;AAGlD,QAAI,WAAW,MAAM,MAAM,UAAU,EAAE,UAAU,EAAE,MAAM,MAAM,IAAI;AAGnE,QAAI,CAAC,YAAY,CAAC,SAAS,IAAI;AAC9B,kCAAS,kEAAkE,OAAO;AAClF,iBAAW,MAAM,MAAM,UAAU,EAAE,oBAAoB,EAAE,MAAM,MAAM,IAAI;AAAA,IAC1E;AAEA,QAAI,CAAC,YAAY,CAAC,SAAS,IAAI;AAC9B,YAAM,IAAI,MAAM,qDAAqD;AAAA,IACtE;AAGA,UAAM,cAAc,MAAM,SAAS,YAAY;AAC/C,UAAM,SAAS,OAAO,KAAK,WAAW;AAItC,UAAM,WAAW,OAAO,iBACrB,OAAO,OAAO,cAAc,EAC3B,QAAQ,cAAc,EAAE,EACxB,KAAK,IACN;AAGH,UAAM,MAAM,oBAAI,KAAK;AACrB,UAAM,YAAY,IAAI,YAAY,EAAE,QAAQ,SAAS,GAAG,EAAE,UAAU,GAAG,EAAE;AACzE,UAAM,WAAW,YAAY,SAAS;AAGtC,UAAM,WAAW,aAAa,KAAK,GAAG,QAAQ,IAAI,QAAQ,KAAK;AAG/D,UAAM,QAAQ,eAAe,QAAQ,WAAW,UAAU,MAAM;AAEhE,gCAAS,oCAAoC,QAAQ,uBAAuB,MAAM;AAAA,EACnF,SAAS,KAAc;AACtB,UAAM,MAAM,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAC3D,gCAAS,2CAA2C,GAAG,IAAI,OAAO;AAAA,EACnE;AACD;AAKO,SAAS,iBAAuB;AACtC,MAAI,WAAW;AACd,cAAU,OAAO;AACjB,gBAAY;AACZ,gCAAS,0CAA0C,OAAO;AAAA,EAC3D;AACD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|