iobroker.luxtronik2-controller 0.18.0 → 0.18.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 +22 -32
- package/admin/jsonConfig.json +2 -2
- package/build/objectManager.js +1 -1
- package/build/objectManager.js.map +2 -2
- package/build/scripts/generateConfig.js +2 -2
- package/build/scripts/generateConfig.js.map +1 -1
- package/io-package.json +28 -41
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,13 +17,13 @@ This ioBroker adapter enables the local control and monitoring of heat pumps wit
|
|
|
17
17
|
|
|
18
18
|
This project builds upon the preliminary work of existing open-source projects. Special thanks go to:
|
|
19
19
|
|
|
20
|
-
[Bouni](https://github.com/bouni/luxtronik-2) Whose pioneering work and code developments form the essential foundation for communication with Luxtronik controllers.
|
|
20
|
+
* **[Bouni](https://github.com/bouni/luxtronik-2):** Whose pioneering work and code developments form the essential foundation for communication with Luxtronik controllers.
|
|
21
|
+
* **[Coolchip](https://github.com/coolchip/luxtronik2):** For the fundamental reverse engineering of the Luxtronik network protocol.
|
|
22
|
+
* **[UncleSamSwiss](https://github.com/UncleSamSwiss/ioBroker.luxtronik2):** For the original ioBroker adapter.
|
|
23
|
+
* **[BenPru](https://github.com/BenPru/luxtronik) & rhammen:** A special thanks to BenPru and rhammen for their continuous further development regarding the access and control of the Luxtronik controller. Without their dedication, efforts, and ideas, this adapter would not have reached the advanced state it is in today.*(If you appreciate their work, feel free to buy them a coffee! ☕) [BenPru](https://github.com/sponsors/BenPru) [rhammen](https://github.com/sponsors/rhammen)*
|
|
21
24
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
[UncleSamSwiss:](https://github.com/UncleSamSwiss/ioBroker.luxtronik2) For the original ioBroker adapter.
|
|
25
|
-
|
|
26
|
-
Innovations in this version: The luxtronik2-controller natively integrates TCP communication (Port 8888 / 8889) and does not rely on external libraries. Additionally, controlling macros, a logic for compressor protection, and automated datapoint management were implemented.
|
|
25
|
+
**Innovations in this version:**
|
|
26
|
+
The luxtronik2-controller natively integrates TCP communication (Port 8888 / 8889) and does not rely on external libraries. Additionally, controlling macros, a logic for compressor protection, and automated datapoint management were implemented.
|
|
27
27
|
|
|
28
28
|
### Features
|
|
29
29
|
|
|
@@ -86,6 +86,22 @@ Bug reports, compatibility notes for specific firmware versions, or feature requ
|
|
|
86
86
|
## Changelog
|
|
87
87
|
|
|
88
88
|
// ### **WORK IN PROGRESS**
|
|
89
|
+
### 0.18.2 (2026-10-17)
|
|
90
|
+
|
|
91
|
+
**🔧 Maintenance & Repository Compliance**
|
|
92
|
+
|
|
93
|
+
- **Core Dependency Update:** Raised minimum required `js-controller` dependency to `>=7.0.7` in `io-package.json` to ensure compatibility with modern ioBroker environments (resolves E1057).
|
|
94
|
+
- **Full i18n Localization for Admin UI:** Added complete multi-language label sets (`ru`, `pt`, `nl`, `fr`, `it`, `es`, `pl`, `uk`, `zh-cn`) for COP power and thermal source selection dropdowns in `jsonConfig.json` (resolves W5611).
|
|
95
|
+
- **Package News Cleanup:** Removed unreleased intermediate tags (`0.17.0`, `0.16.1`) from `common.news` in `io-package.json` to align strictly with published NPM releases (resolves W2004).
|
|
96
|
+
- **CI/CD Security Compliance:** Updated GitHub auto-merge workflows for Dependabot to adhere to GitHub's updated `pull_request_target` execution policies (PR #90 / Issue #89).
|
|
97
|
+
- **Code Modernization:** Migrated built-in Node.js module imports to use the explicit `node:` protocol prefix (e.g. `node:fs`, `node:path`).
|
|
98
|
+
|
|
99
|
+
### 0.18.1 (2026-10-13)
|
|
100
|
+
|
|
101
|
+
**🐛 Bugfixes**
|
|
102
|
+
|
|
103
|
+
- **COP Database Persistence:** Fixed a critical bug in the object manager's cleanup routine (`cleanupStates`). The internal database folder (`hidden.cop_buckets`) was missing from the exclusion list and got aggressively deleted upon every adapter restart, resulting in wiped COP histories and `(null)` values. The hidden states are now strictly protected against the cleanup process, ensuring long-term persistence for energy calculations.
|
|
104
|
+
|
|
89
105
|
### 0.18.0 (2026-10-12)
|
|
90
106
|
|
|
91
107
|
**🚀 Features & Enhancements**
|
|
@@ -115,32 +131,6 @@ Bug reports, compatibility notes for specific firmware versions, or feature requ
|
|
|
115
131
|
|
|
116
132
|
- **Log copManager:** Fixed an issue regarding the log output in the COP calculation engine.
|
|
117
133
|
|
|
118
|
-
### 0.17.1 (2026-10-11)
|
|
119
|
-
|
|
120
|
-
#### 🛠 Bugfixes & Enhancements
|
|
121
|
-
|
|
122
|
-
- **Code Quality & CI/CD:** Fixed ESLint `no-prototype-builtins` pipeline failures in `objectManager.ts` by replacing direct `.hasOwnProperty()` calls with safe `Object.prototype.hasOwnProperty.call()` methods.
|
|
123
|
-
|
|
124
|
-
### 0.17.0 (2026-10-11)
|
|
125
|
-
|
|
126
|
-
#### 🚀 Features
|
|
127
|
-
|
|
128
|
-
- **COP & Efficiency Calculator:** Introduced a comprehensive COP (Coefficient of Performance) calculation engine to track heat pump efficiency.
|
|
129
|
-
- **External Smart Meter Support:** Users can now choose to use internal Luxtronik estimates or link high-precision external sensors (e.g., Shelly 3EM or M-Bus heat meters) via ioBroker Object IDs for power consumption and thermal energy generation.
|
|
130
|
-
- **Granular Live Metrics:** The adapter now dynamically analyzes the active operating state to split and calculate live daily COP values for "Total", "Heating", and "Hot Water" independently.
|
|
131
|
-
- **Persistent Time Rollovers:** Implemented a robust "snapshot" system with absolute virtual counters. The adapter automatically detects day, month, and year rollovers to persist data and guarantee accurate long-term calculations, even across adapter restarts or ioBroker reboots.
|
|
132
|
-
- **Dedicated Efficiency UI:** Added a new "Efficiency / COP" configuration tab to easily manage energy data sources and toggle the calculation engine.
|
|
133
|
-
- **Connection & Polling Status:** Added a new system datapoint `info.lastUpdate`. This state continuously tracks the exact timestamp of the last successful data retrieval, making it easy to monitor the adapter's health and polling activity in visualisations like VIS or Lovelace.
|
|
134
|
-
|
|
135
|
-
#### 🛠 Bugfixes & Enhancements
|
|
136
|
-
|
|
137
|
-
- **Object Tree Creation:** Fixed an issue where hidden data buckets for the COP calculation were not created because parent directories were missing.
|
|
138
|
-
- **Timestamp Formatting:** Resolved a strict type mismatch error in the ioBroker log by correctly formatting `info.lastUpdate` as an ISO string instead of a numeric timestamp.
|
|
139
|
-
- **State Properties & Code Quality:** Resolved strict TypeScript and ESLint warnings (missing JSDoc annotations, missing read/write object definitions) in the new COP manager.
|
|
140
|
-
- **Modernized ioBroker API:** Replaced deprecated `setStateAsync` method calls with the modern, promise-based `setState` standard across the COP calculation engine.
|
|
141
|
-
- **Config UI Sorting:** Ensured the newly generated configuration tabs maintain a logical and consistent order across rebuilds.
|
|
142
|
-
- **Internal Mapping:** Restructured the `info` folder mapping to cleanly accommodate adapter-level metadata alongside hardware telemetry.
|
|
143
|
-
|
|
144
134
|
## License
|
|
145
135
|
|
|
146
136
|
MIT License
|
package/admin/jsonConfig.json
CHANGED
|
@@ -660,8 +660,8 @@
|
|
|
660
660
|
"infoHup": {
|
|
661
661
|
"type": "staticText",
|
|
662
662
|
"text": {
|
|
663
|
-
"en": "Dynamic voltage control for 0–10V
|
|
664
|
-
"de": "Dynamische Spannungsregelung für steuerbare 0–10V
|
|
663
|
+
"en": "Dynamic voltage control for controllable 0–10V heating circulating pumps (HUP). (Note: PWM pumps are automatically detected and bypassed).<br><br><b>⚠️ Important Prerequisites:</b><br>1. <b>Hardware Check:</b> Only enable this if your pump is actually controlled via an analog 0-10V signal from the Luxtronik controller. If your system is configured for PWM, the adapter will automatically detect this and safely disable the regulation.<br>2. <b>System Types:</b> The ideal spread depends entirely on your heating system. Underfloor heating (FBH) typically requires 3 to 5 K, whereas traditional radiators often run optimally between 7 to 10 K.<br>3. <b>Voltage Scale:</b> Ensure you select the correct hardware multiplier for your firmware version below.",
|
|
664
|
+
"de": "Dynamische Spannungsregelung für steuerbare 0–10V Heizungsumwälzpumpen (HUP). (Hinweis: PWM-Pumpen werden automatisch erkannt und übersprungen).<br><br><b>⚠️ Wichtige Voraussetzungen:</b><br>1. <b>Hardware-Check:</b> Aktiviere dies nur, wenn deine Pumpe wirklich über ein analoges 0-10V Signal vom Luxtronik-Regler gesteuert wird. Falls deine Anlage auf PWM konfiguriert ist, erkennt der Adapter dies automatisch und deaktiviert diese Regelung sicherheitshalber.<br>2. <b>Anlagentyp:</b> Die optimale Spreizung ist extrem individuell. Eine Fußbodenheizung (FBH) benötigt meist 3 bis 5 Kelvin, Radiatoren oft 7 bis 10 Kelvin.<br>3. <b>Spannungsfaktor:</b> Wähle unten zwingend die korrekte Hardware-Skalierung passend zu deiner Firmware."
|
|
665
665
|
},
|
|
666
666
|
"style": {
|
|
667
667
|
"marginBottom": "20px",
|
package/build/objectManager.js
CHANGED
|
@@ -126,7 +126,7 @@ async function cleanupStates(adapter) {
|
|
|
126
126
|
const obj = objects[fullId];
|
|
127
127
|
if (obj && obj.type === "state") {
|
|
128
128
|
const localId = fullId.replace(`${adapter.namespace}.`, "");
|
|
129
|
-
if (localId.startsWith("Custom.")) {
|
|
129
|
+
if (localId.startsWith("Custom.") || localId.startsWith("hidden.")) {
|
|
130
130
|
continue;
|
|
131
131
|
}
|
|
132
132
|
if (!activeStateIds.has(localId)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/objectManager.ts"],
|
|
4
|
-
"sourcesContent": ["import { writeLog } from './logger';\nimport { STATE_MAPPING } from './stateMapping';\nimport type { LuxtronikAdapter } from './types';\n\n/**\n * Definition eines Datenpunktes f\u00FCr das dynamische Mapping.\n * Steuert, wie Objekte im ioBroker-Baum angelegt werden.\n */\nexport interface StateDefinition {\n\t/** Der Klartext-Name des Datenpunkts */\n\tname: string | { en: string; de?: string };\n\t/** Der ioBroker-Datentyp (z. B. 'number', 'string', 'boolean' oder 'json') */\n\ttype: ioBroker.CommonType | 'json';\n\t/** Die ioBroker-Rolle (z. B. 'value.temperature', 'button', 'text') */\n\trole: string;\n\t/** Optionale physikalische Einheit (z. B. '\u00B0C', 'kWh', 's') */\n\tunit?: string;\n\t/** Gibt an, ob der Datenpunkt vom ioBroker gelesen werden kann */\n\tread?: boolean;\n\t/** Gibt an, ob der Datenpunkt vom ioBroker beschreibbar ist */\n\twrite?: boolean;\n\t/** Optionaler minimal zul\u00E4ssiger Wert */\n\tmin?: number;\n\t/** Optionaler maximal zul\u00E4ssiger Wert */\n\tmax?: number;\n\t/** Optionaler Standardwert bei Neuerstellung des Datenpunkts */\n\tdef?: any;\n\t/** Optionales Werte-Mapping f\u00FCr Status-Texte (unterst\u00FCtzt nun i18n) */\n\tstates?: Record<string, Record<number, string>> | Record<number, string>;\n\t/** Das Verzeichnis/Ordnerstruktur im ioBroker-Objektbaum */\n\tfolder: string;\n\t/** Die ID oder der Index, die zum Schreiben/Lesen an die Luxtronik gesendet wird */\n\tluxWriteId?: string | number;\n\t/** Gibt an, ob dieser Datenpunkt systemrelevant und zwingend erforderlich ist */\n\trequired?: boolean;\n\t/** Steuert die interne Formatierung von rohen Sekunden zu HH:MM:SS */\n\tisDurationFormat?: boolean;\n\t/** Definiert die interne Herkunft der Daten f\u00FCr das Mapping */\n\tdataSource?: 'raw_parameter' | 'raw_value' | 'parameter' | 'value' | 'additional';\n\t/** Optionaler Index aus Befehl 3005 (Visibilities), der steuert, ob dieser Datenpunkt sichtbar ist */\n\tvisiIndex?: number;\n}\n\n/**\n * Konfiguration eines benutzerdefinierten Datenpunktes aus den Adapter-Einstellungen.\n */\nexport interface CustomStateConfig {\n\t/** Gibt an, ob der benutzerdefinierte Datenpunkt aktiv ist */\n\tactive: boolean;\n\t/** Die Luxtronik-ID des abzufragenden Parameters oder Wertes */\n\tluxId?: number;\n\t/** Der vom Benutzer vergebene Klartext-Name */\n\tname: string;\n\t/** Die Quelle der Daten ('parameter' oder 'value') */\n\tsource: 'parameter' | 'value';\n\t/** Der gew\u00FCnschte Zieldatentyp im ioBroker */\n\ttype: 'number' | 'boolean' | 'datetime' | 'string';\n\t/** Optionaler Multiplikator zur Umrechnung (z. B. 0.1 f\u00FCr Temperaturen) */\n\tfactor?: number | null;\n\t/** Optionale physikalische Einheit */\n\tunit?: string;\n}\n\n/**\n * Zuweisung von Datenpunkt-Pr\u00E4fixen zu den jeweiligen Konfigurations-Checkboxen.\n */\nconst PREFIX_MAPPING: [string, string][] = [\n\t['HZ_MoSo_', 'sync_heatingOperationTimerTableWeek'],\n\t['HZ_MoFr_', 'sync_heatingOperationTimerTable52MonFri'],\n\t['HZ_SaSo_', 'sync_heatingOperationTimerTable52MonFri'],\n\t['HZ_Montag_', 'sync_heatingOperationTimerTableDayMonday'],\n\t['HZ_Dienstag_', 'sync_heatingOperationTimerTableDayTuesday'],\n\t['HZ_Mittwoch_', 'sync_heatingOperationTimerTableDayWednesday'],\n\t['HZ_Donnerstag_', 'sync_heatingOperationTimerTableDayThursday'],\n\t['HZ_Freitag_', 'sync_heatingOperationTimerTableDayFriday'],\n\t['HZ_Samstag_', 'sync_heatingOperationTimerTableDaySaturday'],\n\t['HZ_Sonntag_', 'sync_heatingOperationTimerTableDaySunday'],\n\t['WW_MoSo_', 'sync_hotWaterTableWeek'],\n\t['WW_MoFr_', 'sync_hotWaterTable52MonFri'],\n\t['WW_SaSo_', 'sync_hotWaterTable52MonFri'],\n\t['WW_Montag_', 'sync_hotWaterTableDayMonday'],\n\t['WW_Dienstag_', 'sync_hotWaterTableDayTuesday'],\n\t['WW_Mittwoch_', 'sync_hotWaterTableDayWednesday'],\n\t['WW_Donnerstag_', 'sync_hotWaterTableDayThursday'],\n\t['WW_Freitag_', 'sync_hotWaterTableDayFriday'],\n\t['WW_Samstag_', 'sync_hotWaterTableDaySaturday'],\n\t['WW_Sonntag_', 'sync_hotWaterTableDaySunday'],\n\t['Zirkulation_MoSo_', 'sync_hotWaterCircPumpTimerTableWeek'],\n\t['Zirkulation_MoFr_', 'sync_hotWaterCircPumpTimerTable52MonFri'],\n\t['Zirkulation_SaSo_', 'sync_hotWaterCircPumpTimerTable52MonFri'],\n\t['Zirkulation_Montag_', 'sync_hotWaterCircPumpTimerTableDayMonday'],\n\t['Zirkulation_Dienstag_', 'sync_hotWaterCircPumpTimerTableDayTuesday'],\n\t['Zirkulation_Mittwoch_', 'sync_hotWaterCircPumpTimerTableDayWednesday'],\n\t['Zirkulation_Donnerstag_', 'sync_hotWaterCircPumpTimerTableDayThursday'],\n\t['Zirkulation_Freitag_', 'sync_hotWaterCircPumpTimerTableDayFriday'],\n\t['Zirkulation_Samstag_', 'sync_hotWaterCircPumpTimerTableDaySaturday'],\n\t['Zirkulation_Sonntag_', 'sync_hotWaterCircPumpTimerTableDaySunday'],\n];\n\n/**\n * Pr\u00FCft anhand der Adapter-Konfiguration, ob ein bestimmter Datenpunkt angelegt werden soll.\n *\n * @param key Der Schl\u00FCssel des Datenpunkts aus dem Mapping.\n * @param definition Die Struktur-Definition des Datenpunkts.\n * @param config Die aktuelle Adapter-Konfiguration.\n * @param visibilities Array der Sichtbarkeiten (Visibilities) via CMD 3005.\n * @returns True, wenn der Datenpunkt aktiviert ist und angelegt werden soll.\n */\nexport function isStateEnabled(\n\tkey: string,\n\tdefinition: StateDefinition,\n\tconfig: Record<string, any>,\n\tvisibilities: number[] = [],\n): boolean {\n\tif (definition.required) {\n\t\treturn true;\n\t}\n\n\t// 1. MASTER-KATEGORIE PR\u00DCFEN (Dynamisch!)\n\tconst parts = definition.folder.split('.');\n\tconst mainCategory = parts.length > 1 ? `${parts[0]}.${parts[1]}` : parts[0];\n\tconst catId = mainCategory.replace(/[^a-zA-Z0-9]/g, '_').toLowerCase();\n\n\tconst masterKey = `sync_category_${catId}`;\n\tif (\n\t\tObject.prototype.hasOwnProperty.call(config, masterKey) &&\n\t\t(config[masterKey] === false || String(config[masterKey]) === 'false')\n\t) {\n\t\treturn false;\n\t}\n\n\t// 2. INDIVIDUELLEN DATENPUNKT PR\u00DCFEN\n\tconst configKey = `sync_${key}`;\n\tif (\n\t\tObject.prototype.hasOwnProperty.call(config, configKey) &&\n\t\t(config[configKey] === false || String(config[configKey]) === 'false')\n\t) {\n\t\treturn false;\n\t}\n\n\tfor (const [prefix, mapKey] of PREFIX_MAPPING) {\n\t\tif (key.startsWith(prefix)) {\n\t\t\tif (Object.prototype.hasOwnProperty.call(config, mapKey) && config[mapKey] === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\t// =========================================================\n\t// DYNAMISCHE SICHTBARKEITSPR\u00DCFUNG (BENPRU 3005 MAPPING)\n\t// =========================================================\n\tif (config.filter_visibility !== false && visibilities.length > 0) {\n\t\tif (definition.visiIndex !== undefined) {\n\t\t\tif (visibilities[definition.visiIndex] === 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tif (definition.folder && definition.folder.includes('Cooling') && visibilities[5] === 0) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t// Fallback Check\n\tif (\n\t\tObject.prototype.hasOwnProperty.call(config, key) &&\n\t\t(config[key] === false || config[`sync_${key}`] === false)\n\t) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\n/**\n * Zeichen-Mapping zum Ersetzen von Umlauten und Sonderzeichen in IDs.\n */\nconst CHAR_MAP: Record<string, string> = {\n\t\u00E4: 'ae',\n\t\u00F6: 'oe',\n\t\u00FC: 'ue',\n\t\u00C4: 'Ae',\n\t\u00D6: 'Oe',\n\t\u00DC: 'Ue',\n\t\u00DF: 'ss',\n};\n\n/**\n * Bereinigt Klartext-Namen so, dass sie als g\u00FCltige ioBroker-IDs verwendet werden k\u00F6nnen.\n *\n * @param name Der zu bereinigende Ursprungsname.\n * @returns Der bereinigte, ID-sichere Name.\n */\nexport function sanitizeName(name: string): string {\n\treturn name\n\t\t.replace(/[\u00E4\u00F6\u00FC\u00C4\u00D6\u00DC\u00DF]/g, match => CHAR_MAP[match])\n\t\t.replace(/[^a-zA-Z0-9_]/g, '_')\n\t\t.replace(/_+/g, '_')\n\t\t.replace(/^_|_$/g, '');\n}\n\n/**\n * Sucht und l\u00F6scht Datenpunkte aus dem ioBroker-Baum, die in den Adapter-Einstellungen deaktiviert wurden.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @returns Ein Promise, das nach Abschluss der Bereinigung aufgel\u00F6st wird.\n */\nexport async function cleanupStates(adapter: LuxtronikAdapter): Promise<void> {\n\tconst config = adapter.config;\n\tconst activeStateIds = new Set<string>();\n\n\tfor (const [key, def] of Object.entries(STATE_MAPPING)) {\n\t\tconst definition = def as StateDefinition;\n\t\tif (isStateEnabled(key, definition, config, adapter.currentVisibilities || [])) {\n\t\t\tactiveStateIds.add(`${definition.folder}.${key}`);\n\t\t}\n\t}\n\n\ttry {\n\t\tconst objects = await adapter.getAdapterObjectsAsync();\n\t\tlet deletedCount = 0;\n\n\t\tfor (const fullId in objects) {\n\t\t\tconst obj = objects[fullId];\n\t\t\tif (obj && obj.type === 'state') {\n\t\t\t\tconst localId = fullId.replace(`${adapter.namespace}.`, '');\n\t\t\t\tif (localId.startsWith('Custom.')) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (!activeStateIds.has(localId)) {\n\t\t\t\t\t// SEQUENZIELLES L\u00D6SCHEN (Sch\u00FCtzt die ioBroker Datenbank vor Overload)\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait adapter.delStateAsync(localId);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// Ignorieren, falls State bereits nicht mehr existiert\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait adapter.delObjectAsync(localId);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// Ignorieren, falls Objekt bereits nicht mehr existiert\n\t\t\t\t\t}\n\n\t\t\t\t\tadapter.createdStates.delete(localId);\n\t\t\t\t\twriteLog(`Datapoint '${localId}' rigorously removed.`, 'debug');\n\t\t\t\t\tdeletedCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (deletedCount > 0) {\n\t\t\twriteLog(`${deletedCount} old datapoints cleaned up.`, 'info');\n\t\t}\n\t} catch (err: unknown) {\n\t\tconst msg = err instanceof Error ? err.message : String(err);\n\t\twriteLog(`Error cleaning up old datapoints: ${msg}`, 'error');\n\t}\n}\n\n/**\n * Sucht und l\u00F6scht leere Ordner und Kan\u00E4le aus dem ioBroker-Baum, die keine Datenpunkte mehr enthalten.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @returns Ein Promise, das nach Abschluss der Bereinigung aufgel\u00F6st wird.\n */\nexport async function cleanupEmptyFolders(adapter: LuxtronikAdapter): Promise<void> {\n\ttry {\n\t\tconst objects = await adapter.getAdapterObjectsAsync();\n\t\tconst allIds = Object.keys(objects);\n\n\t\tconst folderIds = allIds.filter(id => {\n\t\t\tconst type = objects[id]?.type;\n\t\t\treturn type === 'channel' || type === 'folder' || type === 'device';\n\t\t});\n\n\t\tfolderIds.sort((a, b) => b.length - a.length);\n\n\t\tconst existingParents = new Set<string>();\n\t\tfor (const id of allIds) {\n\t\t\tlet parent = id;\n\t\t\twhile (parent.includes('.')) {\n\t\t\t\tparent = parent.substring(0, parent.lastIndexOf('.'));\n\t\t\t\texistingParents.add(parent);\n\t\t\t}\n\t\t}\n\n\t\tlet deletedCount = 0;\n\n\t\tfor (const fullId of folderIds) {\n\t\t\tif (fullId === adapter.namespace) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (!existingParents.has(fullId)) {\n\t\t\t\tconst localId = fullId.replace(`${adapter.namespace}.`, '');\n\t\t\t\ttry {\n\t\t\t\t\tawait adapter.delObjectAsync(localId);\n\t\t\t\t} catch {\n\t\t\t\t\t// ignore\n\t\t\t\t}\n\t\t\t\twriteLog(`Empty folder '${localId}' cleaned up.`, 'debug');\n\t\t\t\tdeletedCount++;\n\t\t\t}\n\t\t}\n\n\t\tif (deletedCount > 0) {\n\t\t\twriteLog(`${deletedCount} empty folders removed from object tree.`, 'info');\n\t\t}\n\t} catch (err: unknown) {\n\t\tconst msg = err instanceof Error ? err.message : String(err);\n\t\twriteLog(`Error cleaning up empty folders: ${msg}`, 'error');\n\t}\n}\n\n/**\n * Bereinigt benutzerdefinierte Datenpunkte aus dem Custom-Ordner, die in den Einstellungen entfernt wurden.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @returns Ein Promise, das nach Abschluss der Bereinigung aufgel\u00F6st wird.\n */\nexport async function cleanupCustomStates(adapter: LuxtronikAdapter): Promise<void> {\n\tconst config = adapter.config;\n\tconst customStates = (config.custom_states as CustomStateConfig[]) || [];\n\n\tconst activeIds = new Set(\n\t\tcustomStates\n\t\t\t.filter(c => c.active && c.luxId !== undefined && c.name)\n\t\t\t.map(c => `Custom.${sanitizeName(c.name)}`),\n\t);\n\n\ttry {\n\t\tconst objects = await adapter.getAdapterObjectsAsync();\n\t\tlet deletedCount = 0;\n\n\t\tfor (const id in objects) {\n\t\t\tif (id.startsWith(`${adapter.namespace}.Custom.`)) {\n\t\t\t\tconst shortId = id.replace(`${adapter.namespace}.`, '');\n\t\t\t\tif (shortId === 'Custom') {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (!activeIds.has(shortId)) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait adapter.delStateAsync(shortId);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// ignore\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait adapter.delObjectAsync(shortId);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// ignore\n\t\t\t\t\t}\n\t\t\t\t\tadapter.createdStates.delete(shortId);\n\t\t\t\t\twriteLog(`Custom datapoint '${shortId}' removed.`, 'debug');\n\t\t\t\t\tdeletedCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (deletedCount > 0) {\n\t\t\twriteLog(`${deletedCount} custom values cleaned up.`, 'info');\n\t\t}\n\t} catch (err: unknown) {\n\t\tconst msg = err instanceof Error ? err.message : String(err);\n\t\twriteLog(`Error cleaning up custom values: ${msg}`, 'error');\n\t}\n}\n\n/**\n * Pr\u00FCft und erzeugt alle im Mapping konfigurierten Standard-Datenpunkte im ioBroker-Baum.\n * Aktualisiert zudem fehlerhafte oder ge\u00E4nderte Eigenschaften existierender Objekte.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @returns Ein Promise, das nach Abschluss der Erstellung aufgel\u00F6st wird.\n */\nexport async function ensureAllObjectsExist(adapter: LuxtronikAdapter): Promise<void> {\n\tconst config = adapter.config;\n\n\t// Sprachauswahl aus den Settings (Fallback auf 'en')\n\tconst lang = config.language === 'de' ? 'de' : 'en';\n\n\ttry {\n\t\tconst existingObjects = await adapter.getAdapterObjectsAsync();\n\n\t\tfor (const [key, def] of Object.entries(STATE_MAPPING)) {\n\t\t\tconst definition = def as StateDefinition;\n\t\t\tif (!isStateEnabled(key, definition, config, adapter.currentVisibilities || [])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst stateId = `${definition.folder}.${key}`;\n\t\t\tconst fullId = `${adapter.namespace}.${stateId}`;\n\n\t\t\tlet targetType: ioBroker.CommonType = definition.type === 'json' ? 'string' : definition.type;\n\n\t\t\tif (definition.role && ['value.datetime', 'value.time', 'date'].includes(definition.role)) {\n\t\t\t\ttargetType = 'string';\n\t\t\t}\n\n\t\t\t// SPRACHWEICHE F\u00DCR DIE VALUES / DROPDOWNS\n\t\t\tlet resolvedStates: Record<string, string> | undefined = undefined;\n\t\t\tif (definition.states) {\n\t\t\t\tif ('en' in definition.states || 'de' in definition.states) {\n\t\t\t\t\tresolvedStates = (definition.states as any)[lang] || (definition.states as any).en;\n\t\t\t\t} else {\n\t\t\t\t\tresolvedStates = definition.states as Record<string, string>;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst commonDef: ioBroker.StateCommon = {\n\t\t\t\tname: definition.name,\n\t\t\t\ttype: targetType,\n\t\t\t\trole: definition.role,\n\t\t\t\tunit: definition.unit || '',\n\t\t\t\tread: definition.role === 'button' ? false : true,\n\t\t\t\twrite: definition.write || false,\n\t\t\t\tmin: definition.min,\n\t\t\t\tmax: definition.max,\n\t\t\t\tstates: resolvedStates,\n\t\t\t};\n\n\t\t\tconst existingObj = existingObjects[fullId];\n\n\t\t\tif (!existingObj) {\n\t\t\t\tconst folderParts = definition.folder.split('.');\n\t\t\t\tlet currentFolder = '';\n\t\t\t\tfor (const part of folderParts) {\n\t\t\t\t\tcurrentFolder = currentFolder === '' ? part : `${currentFolder}.${part}`;\n\t\t\t\t\tawait adapter.setObjectNotExistsAsync(currentFolder, {\n\t\t\t\t\t\ttype: currentFolder.includes('.') ? 'channel' : 'folder',\n\t\t\t\t\t\tcommon: { name: part },\n\t\t\t\t\t\tnative: {},\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tawait adapter.setObjectNotExistsAsync(stateId, { type: 'state', common: commonDef, native: {} });\n\t\t\t} else {\n\t\t\t\tlet needsUpdate = false;\n\t\t\t\tconst existingCommon = existingObj.common as Record<string, any>;\n\n\t\t\t\tif (\n\t\t\t\t\texistingCommon.type !== targetType ||\n\t\t\t\t\texistingCommon.role !== definition.role ||\n\t\t\t\t\t(existingCommon.unit || '') !== (definition.unit || '') ||\n\t\t\t\t\tJSON.stringify(existingCommon.name) !== JSON.stringify(definition.name) ||\n\t\t\t\t\texistingCommon.read !== commonDef.read ||\n\t\t\t\t\texistingCommon.write !== (definition.write || false) ||\n\t\t\t\t\texistingCommon.min !== definition.min ||\n\t\t\t\t\texistingCommon.max !== definition.max ||\n\t\t\t\t\tJSON.stringify(existingCommon.states) !== JSON.stringify(resolvedStates)\n\t\t\t\t) {\n\t\t\t\t\tneedsUpdate = true;\n\t\t\t\t}\n\n\t\t\t\tif (needsUpdate) {\n\t\t\t\t\tawait adapter.extendObject(stateId, { type: 'state', common: commonDef });\n\t\t\t\t\twriteLog(`Properties of '${stateId}' synchronized (Repair).`, 'debug');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (definition.write) {\n\t\t\t\tadapter.subscribeStates(stateId);\n\t\t\t}\n\n\t\t\tadapter.createdStates.add(stateId);\n\n\t\t\tif (definition.folder === 'Actions') {\n\t\t\t\tconst currentState = await adapter.getStateAsync(stateId);\n\t\t\t\tif (!currentState) {\n\t\t\t\t\tawait adapter.setStateAsync(stateId, {\n\t\t\t\t\t\tval: definition.def !== undefined ? definition.def : false,\n\t\t\t\t\t\tack: true,\n\t\t\t\t\t});\n\t\t\t\t} else if (currentState.ack === false) {\n\t\t\t\t\tconst valToSet = definition.role === 'button' ? false : currentState.val;\n\t\t\t\t\tawait adapter.setStateAsync(stateId, { val: valToSet, ack: true });\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} catch (err: unknown) {\n\t\tconst msg = err instanceof Error ? err.message : String(err);\n\t\twriteLog(`Error during object validation: ${msg}`, 'error');\n\t}\n}\n\n/**\n * Erzeugt die vom Benutzer in der Konfiguration definierten Custom-Datenpunkte.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @returns Ein Promise, das nach Abschluss der Erstellung aufgel\u00F6st wird.\n */\nexport async function ensureCustomObjectsExist(adapter: LuxtronikAdapter): Promise<void> {\n\tconst config = adapter.config;\n\tconst customStates = (config.custom_states as CustomStateConfig[]) || [];\n\n\tif (customStates.some(c => c.active)) {\n\t\tawait adapter.setObjectNotExistsAsync('Custom', {\n\t\t\ttype: 'channel',\n\t\t\tcommon: { name: 'Custom values' },\n\t\t\tnative: {},\n\t\t});\n\t}\n\n\tfor (const custom of customStates) {\n\t\tif (!custom.active || custom.luxId === undefined || !custom.name) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst stateId = `Custom.${sanitizeName(custom.name)}`;\n\t\tlet role = 'state';\n\t\tconst targetType: ioBroker.CommonType = custom.type === 'datetime' ? 'string' : custom.type;\n\t\tconst isWritable = custom.source === 'parameter';\n\n\t\tif (custom.type === 'number') {\n\t\t\trole = 'value';\n\t\t} else if (custom.type === 'string') {\n\t\t\trole = 'text';\n\t\t} else if (custom.type === 'boolean') {\n\t\t\trole = isWritable ? 'switch' : 'sensor.switch';\n\t\t} else if (custom.type === 'datetime') {\n\t\t\trole = 'value.time';\n\t\t}\n\n\t\tconst objDef = {\n\t\t\ttype: 'state' as const,\n\t\t\tcommon: {\n\t\t\t\tname: custom.name,\n\t\t\t\ttype: targetType,\n\t\t\t\trole: role,\n\t\t\t\tunit: custom.unit || '',\n\t\t\t\tread: true,\n\t\t\t\twrite: isWritable,\n\t\t\t},\n\t\t\tnative: {\n\t\t\t\tluxId: custom.luxId,\n\t\t\t\tsource: custom.source,\n\t\t\t\tfactor: custom.factor || null,\n\t\t\t\tcustomType: custom.type,\n\t\t\t},\n\t\t};\n\n\t\tif (!adapter.createdStates.has(stateId)) {\n\t\t\tawait adapter.setObjectNotExistsAsync(stateId, objDef);\n\t\t\tadapter.createdStates.add(stateId);\n\t\t}\n\t\tawait adapter.extendObject(stateId, { common: objDef.common, native: objDef.native });\n\n\t\tif (isWritable) {\n\t\t\tadapter.subscribeStates(stateId);\n\t\t}\n\t}\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAyB;AACzB,0BAA8B;AAiE9B,MAAM,iBAAqC;AAAA,EAC1C,CAAC,YAAY,qCAAqC;AAAA,EAClD,CAAC,YAAY,yCAAyC;AAAA,EACtD,CAAC,YAAY,yCAAyC;AAAA,EACtD,CAAC,cAAc,0CAA0C;AAAA,EACzD,CAAC,gBAAgB,2CAA2C;AAAA,EAC5D,CAAC,gBAAgB,6CAA6C;AAAA,EAC9D,CAAC,kBAAkB,4CAA4C;AAAA,EAC/D,CAAC,eAAe,0CAA0C;AAAA,EAC1D,CAAC,eAAe,4CAA4C;AAAA,EAC5D,CAAC,eAAe,0CAA0C;AAAA,EAC1D,CAAC,YAAY,wBAAwB;AAAA,EACrC,CAAC,YAAY,4BAA4B;AAAA,EACzC,CAAC,YAAY,4BAA4B;AAAA,EACzC,CAAC,cAAc,6BAA6B;AAAA,EAC5C,CAAC,gBAAg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AM,UAAU,MAAM,QAAQ,uBAAuB;AACrD,QAAI,eAAe;AAEnB,eAAW,UAAU,SAAS;AAC7B,YAAM,MAAM,QAAQ,MAAM;AAC1B,UAAI,OAAO,IAAI,SAAS,SAAS;AAChC,cAAM,UAAU,OAAO,QAAQ,GAAG,QAAQ,SAAS,KAAK,EAAE;
|
|
4
|
+
"sourcesContent": ["import { writeLog } from './logger';\nimport { STATE_MAPPING } from './stateMapping';\nimport type { LuxtronikAdapter } from './types';\n\n/**\n * Definition eines Datenpunktes f\u00FCr das dynamische Mapping.\n * Steuert, wie Objekte im ioBroker-Baum angelegt werden.\n */\nexport interface StateDefinition {\n\t/** Der Klartext-Name des Datenpunkts */\n\tname: string | { en: string; de?: string };\n\t/** Der ioBroker-Datentyp (z. B. 'number', 'string', 'boolean' oder 'json') */\n\ttype: ioBroker.CommonType | 'json';\n\t/** Die ioBroker-Rolle (z. B. 'value.temperature', 'button', 'text') */\n\trole: string;\n\t/** Optionale physikalische Einheit (z. B. '\u00B0C', 'kWh', 's') */\n\tunit?: string;\n\t/** Gibt an, ob der Datenpunkt vom ioBroker gelesen werden kann */\n\tread?: boolean;\n\t/** Gibt an, ob der Datenpunkt vom ioBroker beschreibbar ist */\n\twrite?: boolean;\n\t/** Optionaler minimal zul\u00E4ssiger Wert */\n\tmin?: number;\n\t/** Optionaler maximal zul\u00E4ssiger Wert */\n\tmax?: number;\n\t/** Optionaler Standardwert bei Neuerstellung des Datenpunkts */\n\tdef?: any;\n\t/** Optionales Werte-Mapping f\u00FCr Status-Texte (unterst\u00FCtzt nun i18n) */\n\tstates?: Record<string, Record<number, string>> | Record<number, string>;\n\t/** Das Verzeichnis/Ordnerstruktur im ioBroker-Objektbaum */\n\tfolder: string;\n\t/** Die ID oder der Index, die zum Schreiben/Lesen an die Luxtronik gesendet wird */\n\tluxWriteId?: string | number;\n\t/** Gibt an, ob dieser Datenpunkt systemrelevant und zwingend erforderlich ist */\n\trequired?: boolean;\n\t/** Steuert die interne Formatierung von rohen Sekunden zu HH:MM:SS */\n\tisDurationFormat?: boolean;\n\t/** Definiert die interne Herkunft der Daten f\u00FCr das Mapping */\n\tdataSource?: 'raw_parameter' | 'raw_value' | 'parameter' | 'value' | 'additional';\n\t/** Optionaler Index aus Befehl 3005 (Visibilities), der steuert, ob dieser Datenpunkt sichtbar ist */\n\tvisiIndex?: number;\n}\n\n/**\n * Konfiguration eines benutzerdefinierten Datenpunktes aus den Adapter-Einstellungen.\n */\nexport interface CustomStateConfig {\n\t/** Gibt an, ob der benutzerdefinierte Datenpunkt aktiv ist */\n\tactive: boolean;\n\t/** Die Luxtronik-ID des abzufragenden Parameters oder Wertes */\n\tluxId?: number;\n\t/** Der vom Benutzer vergebene Klartext-Name */\n\tname: string;\n\t/** Die Quelle der Daten ('parameter' oder 'value') */\n\tsource: 'parameter' | 'value';\n\t/** Der gew\u00FCnschte Zieldatentyp im ioBroker */\n\ttype: 'number' | 'boolean' | 'datetime' | 'string';\n\t/** Optionaler Multiplikator zur Umrechnung (z. B. 0.1 f\u00FCr Temperaturen) */\n\tfactor?: number | null;\n\t/** Optionale physikalische Einheit */\n\tunit?: string;\n}\n\n/**\n * Zuweisung von Datenpunkt-Pr\u00E4fixen zu den jeweiligen Konfigurations-Checkboxen.\n */\nconst PREFIX_MAPPING: [string, string][] = [\n\t['HZ_MoSo_', 'sync_heatingOperationTimerTableWeek'],\n\t['HZ_MoFr_', 'sync_heatingOperationTimerTable52MonFri'],\n\t['HZ_SaSo_', 'sync_heatingOperationTimerTable52MonFri'],\n\t['HZ_Montag_', 'sync_heatingOperationTimerTableDayMonday'],\n\t['HZ_Dienstag_', 'sync_heatingOperationTimerTableDayTuesday'],\n\t['HZ_Mittwoch_', 'sync_heatingOperationTimerTableDayWednesday'],\n\t['HZ_Donnerstag_', 'sync_heatingOperationTimerTableDayThursday'],\n\t['HZ_Freitag_', 'sync_heatingOperationTimerTableDayFriday'],\n\t['HZ_Samstag_', 'sync_heatingOperationTimerTableDaySaturday'],\n\t['HZ_Sonntag_', 'sync_heatingOperationTimerTableDaySunday'],\n\t['WW_MoSo_', 'sync_hotWaterTableWeek'],\n\t['WW_MoFr_', 'sync_hotWaterTable52MonFri'],\n\t['WW_SaSo_', 'sync_hotWaterTable52MonFri'],\n\t['WW_Montag_', 'sync_hotWaterTableDayMonday'],\n\t['WW_Dienstag_', 'sync_hotWaterTableDayTuesday'],\n\t['WW_Mittwoch_', 'sync_hotWaterTableDayWednesday'],\n\t['WW_Donnerstag_', 'sync_hotWaterTableDayThursday'],\n\t['WW_Freitag_', 'sync_hotWaterTableDayFriday'],\n\t['WW_Samstag_', 'sync_hotWaterTableDaySaturday'],\n\t['WW_Sonntag_', 'sync_hotWaterTableDaySunday'],\n\t['Zirkulation_MoSo_', 'sync_hotWaterCircPumpTimerTableWeek'],\n\t['Zirkulation_MoFr_', 'sync_hotWaterCircPumpTimerTable52MonFri'],\n\t['Zirkulation_SaSo_', 'sync_hotWaterCircPumpTimerTable52MonFri'],\n\t['Zirkulation_Montag_', 'sync_hotWaterCircPumpTimerTableDayMonday'],\n\t['Zirkulation_Dienstag_', 'sync_hotWaterCircPumpTimerTableDayTuesday'],\n\t['Zirkulation_Mittwoch_', 'sync_hotWaterCircPumpTimerTableDayWednesday'],\n\t['Zirkulation_Donnerstag_', 'sync_hotWaterCircPumpTimerTableDayThursday'],\n\t['Zirkulation_Freitag_', 'sync_hotWaterCircPumpTimerTableDayFriday'],\n\t['Zirkulation_Samstag_', 'sync_hotWaterCircPumpTimerTableDaySaturday'],\n\t['Zirkulation_Sonntag_', 'sync_hotWaterCircPumpTimerTableDaySunday'],\n];\n\n/**\n * Pr\u00FCft anhand der Adapter-Konfiguration, ob ein bestimmter Datenpunkt angelegt werden soll.\n *\n * @param key Der Schl\u00FCssel des Datenpunkts aus dem Mapping.\n * @param definition Die Struktur-Definition des Datenpunkts.\n * @param config Die aktuelle Adapter-Konfiguration.\n * @param visibilities Array der Sichtbarkeiten (Visibilities) via CMD 3005.\n * @returns True, wenn der Datenpunkt aktiviert ist und angelegt werden soll.\n */\nexport function isStateEnabled(\n\tkey: string,\n\tdefinition: StateDefinition,\n\tconfig: Record<string, any>,\n\tvisibilities: number[] = [],\n): boolean {\n\tif (definition.required) {\n\t\treturn true;\n\t}\n\n\t// 1. MASTER-KATEGORIE PR\u00DCFEN (Dynamisch!)\n\tconst parts = definition.folder.split('.');\n\tconst mainCategory = parts.length > 1 ? `${parts[0]}.${parts[1]}` : parts[0];\n\tconst catId = mainCategory.replace(/[^a-zA-Z0-9]/g, '_').toLowerCase();\n\n\tconst masterKey = `sync_category_${catId}`;\n\tif (\n\t\tObject.prototype.hasOwnProperty.call(config, masterKey) &&\n\t\t(config[masterKey] === false || String(config[masterKey]) === 'false')\n\t) {\n\t\treturn false;\n\t}\n\n\t// 2. INDIVIDUELLEN DATENPUNKT PR\u00DCFEN\n\tconst configKey = `sync_${key}`;\n\tif (\n\t\tObject.prototype.hasOwnProperty.call(config, configKey) &&\n\t\t(config[configKey] === false || String(config[configKey]) === 'false')\n\t) {\n\t\treturn false;\n\t}\n\n\tfor (const [prefix, mapKey] of PREFIX_MAPPING) {\n\t\tif (key.startsWith(prefix)) {\n\t\t\tif (Object.prototype.hasOwnProperty.call(config, mapKey) && config[mapKey] === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\n\t// =========================================================\n\t// DYNAMISCHE SICHTBARKEITSPR\u00DCFUNG (BENPRU 3005 MAPPING)\n\t// =========================================================\n\tif (config.filter_visibility !== false && visibilities.length > 0) {\n\t\tif (definition.visiIndex !== undefined) {\n\t\t\tif (visibilities[definition.visiIndex] === 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tif (definition.folder && definition.folder.includes('Cooling') && visibilities[5] === 0) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t// Fallback Check\n\tif (\n\t\tObject.prototype.hasOwnProperty.call(config, key) &&\n\t\t(config[key] === false || config[`sync_${key}`] === false)\n\t) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\n/**\n * Zeichen-Mapping zum Ersetzen von Umlauten und Sonderzeichen in IDs.\n */\nconst CHAR_MAP: Record<string, string> = {\n\t\u00E4: 'ae',\n\t\u00F6: 'oe',\n\t\u00FC: 'ue',\n\t\u00C4: 'Ae',\n\t\u00D6: 'Oe',\n\t\u00DC: 'Ue',\n\t\u00DF: 'ss',\n};\n\n/**\n * Bereinigt Klartext-Namen so, dass sie als g\u00FCltige ioBroker-IDs verwendet werden k\u00F6nnen.\n *\n * @param name Der zu bereinigende Ursprungsname.\n * @returns Der bereinigte, ID-sichere Name.\n */\nexport function sanitizeName(name: string): string {\n\treturn name\n\t\t.replace(/[\u00E4\u00F6\u00FC\u00C4\u00D6\u00DC\u00DF]/g, match => CHAR_MAP[match])\n\t\t.replace(/[^a-zA-Z0-9_]/g, '_')\n\t\t.replace(/_+/g, '_')\n\t\t.replace(/^_|_$/g, '');\n}\n\n/**\n * Sucht und l\u00F6scht Datenpunkte aus dem ioBroker-Baum, die in den Adapter-Einstellungen deaktiviert wurden.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @returns Ein Promise, das nach Abschluss der Bereinigung aufgel\u00F6st wird.\n */\nexport async function cleanupStates(adapter: LuxtronikAdapter): Promise<void> {\n\tconst config = adapter.config;\n\tconst activeStateIds = new Set<string>();\n\n\tfor (const [key, def] of Object.entries(STATE_MAPPING)) {\n\t\tconst definition = def as StateDefinition;\n\t\tif (isStateEnabled(key, definition, config, adapter.currentVisibilities || [])) {\n\t\t\tactiveStateIds.add(`${definition.folder}.${key}`);\n\t\t}\n\t}\n\n\ttry {\n\t\tconst objects = await adapter.getAdapterObjectsAsync();\n\t\tlet deletedCount = 0;\n\n\t\tfor (const fullId in objects) {\n\t\t\tconst obj = objects[fullId];\n\t\t\tif (obj && obj.type === 'state') {\n\t\t\t\tconst localId = fullId.replace(`${adapter.namespace}.`, '');\n\t\t\t\t// 'hidden.' Ordner vom L\u00F6schen ausschlie\u00DFen (sch\u00FCtzt unsere COP-Datenbank)\n\t\t\t\tif (localId.startsWith('Custom.') || localId.startsWith('hidden.')) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (!activeStateIds.has(localId)) {\n\t\t\t\t\t// SEQUENZIELLES L\u00D6SCHEN (Sch\u00FCtzt die ioBroker Datenbank vor Overload)\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait adapter.delStateAsync(localId);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// Ignorieren, falls State bereits nicht mehr existiert\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait adapter.delObjectAsync(localId);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// Ignorieren, falls Objekt bereits nicht mehr existiert\n\t\t\t\t\t}\n\n\t\t\t\t\tadapter.createdStates.delete(localId);\n\t\t\t\t\twriteLog(`Datapoint '${localId}' rigorously removed.`, 'debug');\n\t\t\t\t\tdeletedCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (deletedCount > 0) {\n\t\t\twriteLog(`${deletedCount} old datapoints cleaned up.`, 'info');\n\t\t}\n\t} catch (err: unknown) {\n\t\tconst msg = err instanceof Error ? err.message : String(err);\n\t\twriteLog(`Error cleaning up old datapoints: ${msg}`, 'error');\n\t}\n}\n\n/**\n * Sucht und l\u00F6scht leere Ordner und Kan\u00E4le aus dem ioBroker-Baum, die keine Datenpunkte mehr enthalten.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @returns Ein Promise, das nach Abschluss der Bereinigung aufgel\u00F6st wird.\n */\nexport async function cleanupEmptyFolders(adapter: LuxtronikAdapter): Promise<void> {\n\ttry {\n\t\tconst objects = await adapter.getAdapterObjectsAsync();\n\t\tconst allIds = Object.keys(objects);\n\n\t\tconst folderIds = allIds.filter(id => {\n\t\t\tconst type = objects[id]?.type;\n\t\t\treturn type === 'channel' || type === 'folder' || type === 'device';\n\t\t});\n\n\t\tfolderIds.sort((a, b) => b.length - a.length);\n\n\t\tconst existingParents = new Set<string>();\n\t\tfor (const id of allIds) {\n\t\t\tlet parent = id;\n\t\t\twhile (parent.includes('.')) {\n\t\t\t\tparent = parent.substring(0, parent.lastIndexOf('.'));\n\t\t\t\texistingParents.add(parent);\n\t\t\t}\n\t\t}\n\n\t\tlet deletedCount = 0;\n\n\t\tfor (const fullId of folderIds) {\n\t\t\tif (fullId === adapter.namespace) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (!existingParents.has(fullId)) {\n\t\t\t\tconst localId = fullId.replace(`${adapter.namespace}.`, '');\n\t\t\t\ttry {\n\t\t\t\t\tawait adapter.delObjectAsync(localId);\n\t\t\t\t} catch {\n\t\t\t\t\t// ignore\n\t\t\t\t}\n\t\t\t\twriteLog(`Empty folder '${localId}' cleaned up.`, 'debug');\n\t\t\t\tdeletedCount++;\n\t\t\t}\n\t\t}\n\n\t\tif (deletedCount > 0) {\n\t\t\twriteLog(`${deletedCount} empty folders removed from object tree.`, 'info');\n\t\t}\n\t} catch (err: unknown) {\n\t\tconst msg = err instanceof Error ? err.message : String(err);\n\t\twriteLog(`Error cleaning up empty folders: ${msg}`, 'error');\n\t}\n}\n\n/**\n * Bereinigt benutzerdefinierte Datenpunkte aus dem Custom-Ordner, die in den Einstellungen entfernt wurden.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @returns Ein Promise, das nach Abschluss der Bereinigung aufgel\u00F6st wird.\n */\nexport async function cleanupCustomStates(adapter: LuxtronikAdapter): Promise<void> {\n\tconst config = adapter.config;\n\tconst customStates = (config.custom_states as CustomStateConfig[]) || [];\n\n\tconst activeIds = new Set(\n\t\tcustomStates\n\t\t\t.filter(c => c.active && c.luxId !== undefined && c.name)\n\t\t\t.map(c => `Custom.${sanitizeName(c.name)}`),\n\t);\n\n\ttry {\n\t\tconst objects = await adapter.getAdapterObjectsAsync();\n\t\tlet deletedCount = 0;\n\n\t\tfor (const id in objects) {\n\t\t\tif (id.startsWith(`${adapter.namespace}.Custom.`)) {\n\t\t\t\tconst shortId = id.replace(`${adapter.namespace}.`, '');\n\t\t\t\tif (shortId === 'Custom') {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (!activeIds.has(shortId)) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait adapter.delStateAsync(shortId);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// ignore\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait adapter.delObjectAsync(shortId);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t// ignore\n\t\t\t\t\t}\n\t\t\t\t\tadapter.createdStates.delete(shortId);\n\t\t\t\t\twriteLog(`Custom datapoint '${shortId}' removed.`, 'debug');\n\t\t\t\t\tdeletedCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (deletedCount > 0) {\n\t\t\twriteLog(`${deletedCount} custom values cleaned up.`, 'info');\n\t\t}\n\t} catch (err: unknown) {\n\t\tconst msg = err instanceof Error ? err.message : String(err);\n\t\twriteLog(`Error cleaning up custom values: ${msg}`, 'error');\n\t}\n}\n\n/**\n * Pr\u00FCft und erzeugt alle im Mapping konfigurierten Standard-Datenpunkte im ioBroker-Baum.\n * Aktualisiert zudem fehlerhafte oder ge\u00E4nderte Eigenschaften existierender Objekte.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @returns Ein Promise, das nach Abschluss der Erstellung aufgel\u00F6st wird.\n */\nexport async function ensureAllObjectsExist(adapter: LuxtronikAdapter): Promise<void> {\n\tconst config = adapter.config;\n\n\t// Sprachauswahl aus den Settings (Fallback auf 'en')\n\tconst lang = config.language === 'de' ? 'de' : 'en';\n\n\ttry {\n\t\tconst existingObjects = await adapter.getAdapterObjectsAsync();\n\n\t\tfor (const [key, def] of Object.entries(STATE_MAPPING)) {\n\t\t\tconst definition = def as StateDefinition;\n\t\t\tif (!isStateEnabled(key, definition, config, adapter.currentVisibilities || [])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst stateId = `${definition.folder}.${key}`;\n\t\t\tconst fullId = `${adapter.namespace}.${stateId}`;\n\n\t\t\tlet targetType: ioBroker.CommonType = definition.type === 'json' ? 'string' : definition.type;\n\n\t\t\tif (definition.role && ['value.datetime', 'value.time', 'date'].includes(definition.role)) {\n\t\t\t\ttargetType = 'string';\n\t\t\t}\n\n\t\t\t// SPRACHWEICHE F\u00DCR DIE VALUES / DROPDOWNS\n\t\t\tlet resolvedStates: Record<string, string> | undefined = undefined;\n\t\t\tif (definition.states) {\n\t\t\t\tif ('en' in definition.states || 'de' in definition.states) {\n\t\t\t\t\tresolvedStates = (definition.states as any)[lang] || (definition.states as any).en;\n\t\t\t\t} else {\n\t\t\t\t\tresolvedStates = definition.states as Record<string, string>;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst commonDef: ioBroker.StateCommon = {\n\t\t\t\tname: definition.name,\n\t\t\t\ttype: targetType,\n\t\t\t\trole: definition.role,\n\t\t\t\tunit: definition.unit || '',\n\t\t\t\tread: definition.role === 'button' ? false : true,\n\t\t\t\twrite: definition.write || false,\n\t\t\t\tmin: definition.min,\n\t\t\t\tmax: definition.max,\n\t\t\t\tstates: resolvedStates,\n\t\t\t};\n\n\t\t\tconst existingObj = existingObjects[fullId];\n\n\t\t\tif (!existingObj) {\n\t\t\t\tconst folderParts = definition.folder.split('.');\n\t\t\t\tlet currentFolder = '';\n\t\t\t\tfor (const part of folderParts) {\n\t\t\t\t\tcurrentFolder = currentFolder === '' ? part : `${currentFolder}.${part}`;\n\t\t\t\t\tawait adapter.setObjectNotExistsAsync(currentFolder, {\n\t\t\t\t\t\ttype: currentFolder.includes('.') ? 'channel' : 'folder',\n\t\t\t\t\t\tcommon: { name: part },\n\t\t\t\t\t\tnative: {},\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tawait adapter.setObjectNotExistsAsync(stateId, { type: 'state', common: commonDef, native: {} });\n\t\t\t} else {\n\t\t\t\tlet needsUpdate = false;\n\t\t\t\tconst existingCommon = existingObj.common as Record<string, any>;\n\n\t\t\t\tif (\n\t\t\t\t\texistingCommon.type !== targetType ||\n\t\t\t\t\texistingCommon.role !== definition.role ||\n\t\t\t\t\t(existingCommon.unit || '') !== (definition.unit || '') ||\n\t\t\t\t\tJSON.stringify(existingCommon.name) !== JSON.stringify(definition.name) ||\n\t\t\t\t\texistingCommon.read !== commonDef.read ||\n\t\t\t\t\texistingCommon.write !== (definition.write || false) ||\n\t\t\t\t\texistingCommon.min !== definition.min ||\n\t\t\t\t\texistingCommon.max !== definition.max ||\n\t\t\t\t\tJSON.stringify(existingCommon.states) !== JSON.stringify(resolvedStates)\n\t\t\t\t) {\n\t\t\t\t\tneedsUpdate = true;\n\t\t\t\t}\n\n\t\t\t\tif (needsUpdate) {\n\t\t\t\t\tawait adapter.extendObject(stateId, { type: 'state', common: commonDef });\n\t\t\t\t\twriteLog(`Properties of '${stateId}' synchronized (Repair).`, 'debug');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (definition.write) {\n\t\t\t\tadapter.subscribeStates(stateId);\n\t\t\t}\n\n\t\t\tadapter.createdStates.add(stateId);\n\n\t\t\tif (definition.folder === 'Actions') {\n\t\t\t\tconst currentState = await adapter.getStateAsync(stateId);\n\t\t\t\tif (!currentState) {\n\t\t\t\t\tawait adapter.setStateAsync(stateId, {\n\t\t\t\t\t\tval: definition.def !== undefined ? definition.def : false,\n\t\t\t\t\t\tack: true,\n\t\t\t\t\t});\n\t\t\t\t} else if (currentState.ack === false) {\n\t\t\t\t\tconst valToSet = definition.role === 'button' ? false : currentState.val;\n\t\t\t\t\tawait adapter.setStateAsync(stateId, { val: valToSet, ack: true });\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} catch (err: unknown) {\n\t\tconst msg = err instanceof Error ? err.message : String(err);\n\t\twriteLog(`Error during object validation: ${msg}`, 'error');\n\t}\n}\n\n/**\n * Erzeugt die vom Benutzer in der Konfiguration definierten Custom-Datenpunkte.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @returns Ein Promise, das nach Abschluss der Erstellung aufgel\u00F6st wird.\n */\nexport async function ensureCustomObjectsExist(adapter: LuxtronikAdapter): Promise<void> {\n\tconst config = adapter.config;\n\tconst customStates = (config.custom_states as CustomStateConfig[]) || [];\n\n\tif (customStates.some(c => c.active)) {\n\t\tawait adapter.setObjectNotExistsAsync('Custom', {\n\t\t\ttype: 'channel',\n\t\t\tcommon: { name: 'Custom values' },\n\t\t\tnative: {},\n\t\t});\n\t}\n\n\tfor (const custom of customStates) {\n\t\tif (!custom.active || custom.luxId === undefined || !custom.name) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst stateId = `Custom.${sanitizeName(custom.name)}`;\n\t\tlet role = 'state';\n\t\tconst targetType: ioBroker.CommonType = custom.type === 'datetime' ? 'string' : custom.type;\n\t\tconst isWritable = custom.source === 'parameter';\n\n\t\tif (custom.type === 'number') {\n\t\t\trole = 'value';\n\t\t} else if (custom.type === 'string') {\n\t\t\trole = 'text';\n\t\t} else if (custom.type === 'boolean') {\n\t\t\trole = isWritable ? 'switch' : 'sensor.switch';\n\t\t} else if (custom.type === 'datetime') {\n\t\t\trole = 'value.time';\n\t\t}\n\n\t\tconst objDef = {\n\t\t\ttype: 'state' as const,\n\t\t\tcommon: {\n\t\t\t\tname: custom.name,\n\t\t\t\ttype: targetType,\n\t\t\t\trole: role,\n\t\t\t\tunit: custom.unit || '',\n\t\t\t\tread: true,\n\t\t\t\twrite: isWritable,\n\t\t\t},\n\t\t\tnative: {\n\t\t\t\tluxId: custom.luxId,\n\t\t\t\tsource: custom.source,\n\t\t\t\tfactor: custom.factor || null,\n\t\t\t\tcustomType: custom.type,\n\t\t\t},\n\t\t};\n\n\t\tif (!adapter.createdStates.has(stateId)) {\n\t\t\tawait adapter.setObjectNotExistsAsync(stateId, objDef);\n\t\t\tadapter.createdStates.add(stateId);\n\t\t}\n\t\tawait adapter.extendObject(stateId,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A,QACf,QAAQ,OAAO,UAAU;AAAA,QACzB,YAAY,OAAO;AAAA,MACpB;AAAA,IACD;AAEA,QAAI,CAAC,QAAQ,cAAc,IAAI,OAAO,GAAG;AACxC,YAAM,QAAQ,wBAAwB,SAAS,MAAM;AACrD,cAAQ,cAAc,IAAI,OAAO;AAAA,IAClC;AACA,UAAM,QAAQ,aAAa,SAAS,EAAE,QAAQ,OAAO,QAAQ,QAAQ,OAAO,OAAO,CAAC;AAEpF,QAAI,YAAY;AACf,cAAQ,gBAAgB,OAAO;AAAA,IAChC;AAAA,EACD;AACD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -21,13 +21,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
21
21
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
22
|
mod
|
|
23
23
|
));
|
|
24
|
-
var fs = __toESM(require("fs"));
|
|
24
|
+
var fs = __toESM(require("node:fs"));
|
|
25
25
|
var import_actions = require("../mapping/actions");
|
|
26
26
|
var import_info = require("../mapping/info");
|
|
27
27
|
var import_settings = require("../mapping/settings");
|
|
28
28
|
var import_tablesInfo = require("../mapping/tablesInfo");
|
|
29
29
|
var import_tablesSettings = require("../mapping/tablesSettings");
|
|
30
|
-
var path = __toESM(require("path"));
|
|
30
|
+
var path = __toESM(require("node:path"));
|
|
31
31
|
const allMappings = {
|
|
32
32
|
...import_info.INFO_MAPPING,
|
|
33
33
|
...import_settings.SETTINGS_MAPPING,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/scripts/generateConfig.ts"],
|
|
4
|
-
"sourcesContent": ["import * as fs from 'fs';\nimport { ACTIONS_MAPPING } from '../mapping/actions';\nimport { INFO_MAPPING } from '../mapping/info';\nimport { SETTINGS_MAPPING } from '../mapping/settings';\nimport { TABLESINFO_MAPPING } from '../mapping/tablesInfo';\nimport { TABLESSETTINGS_MAPPING } from '../mapping/tablesSettings';\n\nconst allMappings = {\n\t...INFO_MAPPING,\n\t...SETTINGS_MAPPING,\n\t...ACTIONS_MAPPING,\n\t...TABLESINFO_MAPPING,\n\t...TABLESSETTINGS_MAPPING,\n};\n\nconst panels: Record<string, any> = {};\n\n// Hilfsfunktion: Macht aus \"Information.01_Temperatures\" -> \"information_01_temperatures\"\nfunction getCategoryId(folder: string): string {\n\treturn folder.replace(/[^a-zA-Z0-9]/g, '_').toLowerCase();\n}\n\nfor (const [key, def] of Object.entries(allMappings)) {\n\t// Gruppierung nach Hauptkategorien (z.B. \"Settings.02_Heating\")\n\tconst parts = def.folder.split('.');\n\tconst mainCategory = parts.length > 1 ? `${parts[0]}.${parts[1]}` : parts[0];\n\tconst catId = getCategoryId(mainCategory);\n\tconst panelKey = `panel_${catId}`;\n\n\tif (!panels[panelKey]) {\n\t\tpanels[panelKey] = {\n\t\t\ttype: 'panel',\n\t\t\tlabel: { en: mainCategory.replace(/_/g, ' '), de: mainCategory.replace(/_/g, ' ') },\n\t\t\tcollapsable: true,\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 12,\n\t\t\tlg: 12,\n\t\t\txl: 12,\n\t\t\titems: {},\n\t\t};\n\n\t\t// Master-Schalter f\u00FCr die Kategorie\n\t\tpanels[panelKey].items[`sync_category_${catId}`] = {\n\t\t\ttype: 'checkbox',\n\t\t\tlabel: {\n\t\t\t\ten: `\uD83C\uDF1F Enable entire category: ${mainCategory.replace(/_/g, ' ')}`,\n\t\t\t\tde: `\uD83C\uDF1F Komplette Kategorie aktivieren: ${mainCategory.replace(/_/g, ' ')}`,\n\t\t\t},\n\t\t\tdefault: true,\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 12,\n\t\t\tlg: 12,\n\t\t\txl: 12,\n\t\t};\n\n\t\t// Trennstrich\n\t\tpanels[panelKey].items[`divider_${catId}`] = {\n\t\t\ttype: 'divider',\n\t\t\tcolor: 'primary',\n\t\t\tstyle: { marginBottom: '15px', marginTop: '5px' },\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 12,\n\t\t\tlg: 12,\n\t\t\txl: 12,\n\t\t};\n\t}\n\n\tlet nameEn = typeof def.name === 'string' ? def.name : def.name.en;\n\tlet nameDe = typeof def.name === 'string' ? def.name : def.name.de || def.name.en;\n\n\tif (def.required) {\n\t\tnameEn += ' (System critical)';\n\t\tnameDe += ' (Systemrelevant)';\n\t}\n\n\t// Einzelne Checkbox f\u00FCr den Datenpunkt generieren\n\tpanels[panelKey].items[`sync_${key}`] = {\n\t\ttype: 'checkbox',\n\t\tlabel: { en: nameEn, de: nameDe },\n\t\tdefault: true,\n\t\t// Wenn required, ist es ausgegraut. Ansonsten ist es abh\u00E4ngig vom Master-Schalter!\n\t\tdisabled: def.required ? true : `!data.sync_category_${catId}`,\n\t\txs: 12, // Smartphone: 1 untereinander (12/12)\n\t\tsm: 6, // Tablet/kleine Fenster: 2 nebeneinander (6/12)\n\t\tmd: 3, // Desktop: 4 nebeneinander (3/12)\n\t\tlg: 3, // Gro\u00DFer Monitor: 4 nebeneinander\n\t\txl: 3, // Ultrawide: 4 nebeneinander\n\t};\n}\n\nconst objectsSettings = {\n\ttype: 'panel',\n\tlabel: { en: 'Datapoints / Objects', de: 'Datenpunkte / Objekte' },\n\ticon: \"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z'/%3E%3C/svg%3E\",\n\titems: {\n\t\tinfo_text: {\n\t\t\ttype: 'staticText',\n\t\t\ttext: {\n\t\t\t\ten: 'Select which datapoints should be created and updated...',\n\t\t\t\tde: 'W\u00E4hle hier aus, welche Datenpunkte in ioBroker erzeugt und aktualisiert werden sollen. Systemkritische Datenpunkte (ausgegraut) werden automatisch immer erzeugt.',\n\t\t\t},\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 12,\n\t\t\tlg: 12,\n\t\t\txl: 12,\n\t\t},\n\t\tfilter_visibility: {\n\t\t\ttype: 'checkbox',\n\t\t\tlabel: {\n\t\t\t\ten: 'Automatically hide unsupported hardware parameters',\n\t\t\t\tde: 'Nicht unterst\u00FCtzte Hardware-Parameter automatisch ausblenden',\n\t\t\t},\n\t\t\tdefault: true,\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 12,\n\t\t\tlg: 12,\n\t\t\txl: 12,\n\t\t},\n\t\t...panels, // F\u00FCgt alle generierten Panels ein\n\t},\n};\n\n// ... (oberer Teil mit den Schleifen f\u00FCr objectsSettings bleibt wie er ist) ...\n\nconst copTab = {\n\ttype: 'panel',\n\tlabel: { en: 'Efficiency / COP', de: 'Effizienz / COP' },\n\t// Dein gew\u00FCnschtes Icon:\n\ticon: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMzIgMzIiPgoJPHBhdGggZD0iTTAgMGgzMnYzMkgweiIgZmlsbD0ibm9uZSIgLz4KCTxwYXRoIGZpbGw9ImN1cnJlbnRDb2xvciIgZD0iTTI4IDI4VjE1aC0ydjEzaC00VjE3aC0ydjExaC00di05aC0ydjloLTR2LTdIOHY3SDRWMkgydjI2YzAgMS4xLjkgMiAyIDJoMjZ2LTJ6bTAtMjR2N2gtMlY3LjQybC04LjI5IDguMjljLS4yLjE5LS40NS4yOS0uNzEuMjlzLS41MS0uMS0uNzEtLjI5TDEyIDExLjQxbC00LjI5IDQuM2wtMS40Mi0xLjQybDUtNWMuMzktLjM5IDEuMDMtLjM5IDEuNDIgMGw0LjI5IDQuM0wyNC41OCA2SDIxVjR6IiAvPgo8L3N2Zz4K',\n\titems: {\n\t\tinfoCop: {\n\t\t\ttype: 'staticText',\n\t\t\ttext: {\n\t\t\t\ten: 'Calculate the Coefficient of Performance (COP / JAZ) of your heat pump over various timeframes (24h, 7d, 1m, 1y). You can use the internal heat pump meters or link accurate external smart meters (e.g. Shelly 3EM).',\n\t\t\t\tde: 'Berechne die Arbeitszahl (COP / JAZ) deiner W\u00E4rmepumpe \u00FCber verschiedene Zeitr\u00E4ume (Heute, 7 Tage, Monat, Jahr). Du kannst daf\u00FCr die internen Sch\u00E4tzwerte der Anlage nutzen oder hochpr\u00E4zise externe Z\u00E4hler (z.B. Shelly 3EM) verlinken.',\n\t\t\t},\n\t\t\tstyle: { marginBottom: '20px', fontSize: '14px' },\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 12,\n\t\t\tlg: 12,\n\t\t\txl: 12,\n\t\t},\n\t\tcop_calculation_active: {\n\t\t\ttype: 'checkbox',\n\t\t\tlabel: { en: 'Enable COP / Efficiency calculation', de: 'COP / Effizienz-Berechnung aktivieren' },\n\t\t\tdefault: false,\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 12,\n\t\t\tlg: 12,\n\t\t\txl: 12,\n\t\t},\n\t\tdivider_cop1: {\n\t\t\ttype: 'divider',\n\t\t\tcolor: 'primary',\n\t\t\tstyle: { marginBottom: '15px', marginTop: '15px' },\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 12,\n\t\t\tlg: 12,\n\t\t\txl: 12,\n\t\t},\n\t\theaderPower: {\n\t\t\ttype: 'header',\n\t\t\ttext: { en: '1. Electrical Energy (Power Consumption)', de: '1. Elektrische Energie (Stromverbrauch)' },\n\t\t\tsize: 4,\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 12,\n\t\t\tlg: 12,\n\t\t\txl: 12,\n\t\t},\n\t\tcop_source_power: {\n\t\t\ttype: 'select',\n\t\t\tlabel: { en: 'Data source for power consumption', de: 'Datenquelle f\u00FCr Stromverbrauch' },\n\t\t\tdisabled: '!data.cop_calculation_active',\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tlabel: { en: 'Internal (Luxtronik estimates)', de: 'Intern (Luxtronik Sch\u00E4tzwerte)' },\n\t\t\t\t\tvalue: 'internal',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: { en: 'External Object ID (e.g. Shelly)', de: 'Externe Objekt-ID (z.B. Shelly)' },\n\t\t\t\t\tvalue: 'external',\n\t\t\t\t},\n\t\t\t],\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 6,\n\t\t\tlg: 6,\n\t\t\txl: 6,\n\t\t},\n\t\tcop_oid_power_total: {\n\t\t\ttype: 'objectId',\n\t\t\tlabel: { en: 'Select External Meter OID (Total kWh)', de: 'Externen Z\u00E4hler OID w\u00E4hlen (Gesamt kWh)' },\n\t\t\thidden: \"data.cop_source_power !== 'external'\",\n\t\t\tdisabled: '!data.cop_calculation_active',\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 6,\n\t\t\tlg: 6,\n\t\t\txl: 6,\n\t\t},\n\t\theaderThermal: {\n\t\t\ttype: 'header',\n\t\t\ttext: { en: '2. Thermal Energy (Heat Generation)', de: '2. Thermische Energie (W\u00E4rmeerzeugung)' },\n\t\t\tsize: 4,\n\t\t\tstyle: { marginTop: '20px' },\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 12,\n\t\t\tlg: 12,\n\t\t\txl: 12,\n\t\t},\n\t\tcop_source_thermal: {\n\t\t\ttype: 'select',\n\t\t\tlabel: { en: 'Data source for thermal generation', de: 'Datenquelle f\u00FCr W\u00E4rmeerzeugung' },\n\t\t\tdisabled: '!data.cop_calculation_active',\n\t\t\toptions: [\n\t\t\t\t{ label: { en: 'Internal (Luxtronik meters)', de: 'Intern (Luxtronik Z\u00E4hler)' }, value: 'internal' },\n\t\t\t\t{\n\t\t\t\t\tlabel: { en: 'External Object ID (e.g. M-Bus meter)', de: 'Externe Objekt-ID (z.B. M-Bus Z\u00E4hler)' },\n\t\t\t\t\tvalue: 'external',\n\t\t\t\t},\n\t\t\t],\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 6,\n\t\t\tlg: 6,\n\t\t\txl: 6,\n\t\t},\n\t\tcop_oid_thermal_total: {\n\t\t\ttype: 'objectId',\n\t\t\tlabel: { en: 'Select External Heat Meter OID (Total kWh)', de: 'Externen WMZ OID w\u00E4hlen (Gesamt kWh)' },\n\t\t\thidden: \"data.cop_source_thermal !== 'external'\",\n\t\t\tdisabled: '!data.cop_calculation_active',\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 6,\n\t\t\tlg: 6,\n\t\t\txl: 6,\n\t\t},\n\t},\n};\n\nimport * as path from 'path';\nconst configPath = path.resolve(process.cwd(), 'admin/jsonConfig.json');\n\ntry {\n\tconst currentConfig = JSON.parse(fs.readFileSync(configPath, 'utf8'));\n\n\t// Wir bauen ein komplett neues Objekt f\u00FCr die Tabs, um die Reihenfolge zu kontrollieren\n\tconst newItems: Record<string, any> = {};\n\n\tfor (const key of Object.keys(currentConfig.items)) {\n\t\t// Sobald wir beim 3. Tab (Takt-Optimierung) ankommen, mogeln wir unseren COP-Tab davor!\n\t\tif (key === 'cycleOptimizationTab') {\n\t\t\tnewItems.copTab = copTab;\n\t\t}\n\n\t\tif (key === 'objectsSettings') {\n\t\t\tnewItems[key] = objectsSettings; // Generierte Datenpunkte patchen\n\t\t} else if (key !== 'copTab') {\n\t\t\t// Alte Tabs r\u00FCberkopieren (verhindert Duplikate, falls copTab vorher am Ende stand)\n\t\t\tnewItems[key] = currentConfig.items[key];\n\t\t}\n\t}\n\n\t// Falls 'cycleOptimizationTab' warum auch immer nicht existiert, h\u00E4ngen wir es sicherheitshalber an\n\tif (!newItems.copTab) {\n\t\tnewItems.copTab = copTab;\n\t}\n\n\tcurrentConfig.items = newItems;\n\n\tfs.writeFileSync(configPath, JSON.stringify(currentConfig, null, '\\t'));\n\tconsole.log('\u2705 admin/jsonConfig.json wurde erfolgreich automatisch gepatcht und sortiert!');\n} catch (err) {\n\tconsole.error('\u274C Fehler beim Patchen der jsonConfig.json:', err);\n}\n"],
|
|
4
|
+
"sourcesContent": ["import * as fs from 'node:fs';\nimport { ACTIONS_MAPPING } from '../mapping/actions';\nimport { INFO_MAPPING } from '../mapping/info';\nimport { SETTINGS_MAPPING } from '../mapping/settings';\nimport { TABLESINFO_MAPPING } from '../mapping/tablesInfo';\nimport { TABLESSETTINGS_MAPPING } from '../mapping/tablesSettings';\n\nconst allMappings = {\n\t...INFO_MAPPING,\n\t...SETTINGS_MAPPING,\n\t...ACTIONS_MAPPING,\n\t...TABLESINFO_MAPPING,\n\t...TABLESSETTINGS_MAPPING,\n};\n\nconst panels: Record<string, any> = {};\n\n// Hilfsfunktion: Macht aus \"Information.01_Temperatures\" -> \"information_01_temperatures\"\nfunction getCategoryId(folder: string): string {\n\treturn folder.replace(/[^a-zA-Z0-9]/g, '_').toLowerCase();\n}\n\nfor (const [key, def] of Object.entries(allMappings)) {\n\t// Gruppierung nach Hauptkategorien (z.B. \"Settings.02_Heating\")\n\tconst parts = def.folder.split('.');\n\tconst mainCategory = parts.length > 1 ? `${parts[0]}.${parts[1]}` : parts[0];\n\tconst catId = getCategoryId(mainCategory);\n\tconst panelKey = `panel_${catId}`;\n\n\tif (!panels[panelKey]) {\n\t\tpanels[panelKey] = {\n\t\t\ttype: 'panel',\n\t\t\tlabel: { en: mainCategory.replace(/_/g, ' '), de: mainCategory.replace(/_/g, ' ') },\n\t\t\tcollapsable: true,\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 12,\n\t\t\tlg: 12,\n\t\t\txl: 12,\n\t\t\titems: {},\n\t\t};\n\n\t\t// Master-Schalter f\u00FCr die Kategorie\n\t\tpanels[panelKey].items[`sync_category_${catId}`] = {\n\t\t\ttype: 'checkbox',\n\t\t\tlabel: {\n\t\t\t\ten: `\uD83C\uDF1F Enable entire category: ${mainCategory.replace(/_/g, ' ')}`,\n\t\t\t\tde: `\uD83C\uDF1F Komplette Kategorie aktivieren: ${mainCategory.replace(/_/g, ' ')}`,\n\t\t\t},\n\t\t\tdefault: true,\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 12,\n\t\t\tlg: 12,\n\t\t\txl: 12,\n\t\t};\n\n\t\t// Trennstrich\n\t\tpanels[panelKey].items[`divider_${catId}`] = {\n\t\t\ttype: 'divider',\n\t\t\tcolor: 'primary',\n\t\t\tstyle: { marginBottom: '15px', marginTop: '5px' },\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 12,\n\t\t\tlg: 12,\n\t\t\txl: 12,\n\t\t};\n\t}\n\n\tlet nameEn = typeof def.name === 'string' ? def.name : def.name.en;\n\tlet nameDe = typeof def.name === 'string' ? def.name : def.name.de || def.name.en;\n\n\tif (def.required) {\n\t\tnameEn += ' (System critical)';\n\t\tnameDe += ' (Systemrelevant)';\n\t}\n\n\t// Einzelne Checkbox f\u00FCr den Datenpunkt generieren\n\tpanels[panelKey].items[`sync_${key}`] = {\n\t\ttype: 'checkbox',\n\t\tlabel: { en: nameEn, de: nameDe },\n\t\tdefault: true,\n\t\t// Wenn required, ist es ausgegraut. Ansonsten ist es abh\u00E4ngig vom Master-Schalter!\n\t\tdisabled: def.required ? true : `!data.sync_category_${catId}`,\n\t\txs: 12, // Smartphone: 1 untereinander (12/12)\n\t\tsm: 6, // Tablet/kleine Fenster: 2 nebeneinander (6/12)\n\t\tmd: 3, // Desktop: 4 nebeneinander (3/12)\n\t\tlg: 3, // Gro\u00DFer Monitor: 4 nebeneinander\n\t\txl: 3, // Ultrawide: 4 nebeneinander\n\t};\n}\n\nconst objectsSettings = {\n\ttype: 'panel',\n\tlabel: { en: 'Datapoints / Objects', de: 'Datenpunkte / Objekte' },\n\ticon: \"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='M4 6h16v2H4zm0 5h16v2H4zm0 5h16v2H4z'/%3E%3C/svg%3E\",\n\titems: {\n\t\tinfo_text: {\n\t\t\ttype: 'staticText',\n\t\t\ttext: {\n\t\t\t\ten: 'Select which datapoints should be created and updated...',\n\t\t\t\tde: 'W\u00E4hle hier aus, welche Datenpunkte in ioBroker erzeugt und aktualisiert werden sollen. Systemkritische Datenpunkte (ausgegraut) werden automatisch immer erzeugt.',\n\t\t\t},\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 12,\n\t\t\tlg: 12,\n\t\t\txl: 12,\n\t\t},\n\t\tfilter_visibility: {\n\t\t\ttype: 'checkbox',\n\t\t\tlabel: {\n\t\t\t\ten: 'Automatically hide unsupported hardware parameters',\n\t\t\t\tde: 'Nicht unterst\u00FCtzte Hardware-Parameter automatisch ausblenden',\n\t\t\t},\n\t\t\tdefault: true,\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 12,\n\t\t\tlg: 12,\n\t\t\txl: 12,\n\t\t},\n\t\t...panels, // F\u00FCgt alle generierten Panels ein\n\t},\n};\n\n// ... (oberer Teil mit den Schleifen f\u00FCr objectsSettings bleibt wie er ist) ...\n\nconst copTab = {\n\ttype: 'panel',\n\tlabel: { en: 'Efficiency / COP', de: 'Effizienz / COP' },\n\t// Dein gew\u00FCnschtes Icon:\n\ticon: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMzIgMzIiPgoJPHBhdGggZD0iTTAgMGgzMnYzMkgweiIgZmlsbD0ibm9uZSIgLz4KCTxwYXRoIGZpbGw9ImN1cnJlbnRDb2xvciIgZD0iTTI4IDI4VjE1aC0ydjEzaC00VjE3aC0ydjExaC00di05aC0ydjloLTR2LTdIOHY3SDRWMkgydjI2YzAgMS4xLjkgMiAyIDJoMjZ2LTJ6bTAtMjR2N2gtMlY3LjQybC04LjI5IDguMjljLS4yLjE5LS40NS4yOS0uNzEuMjlzLS41MS0uMS0uNzEtLjI5TDEyIDExLjQxbC00LjI5IDQuM2wtMS40Mi0xLjQybDUtNWMuMzktLjM5IDEuMDMtLjM5IDEuNDIgMGw0LjI5IDQuM0wyNC41OCA2SDIxVjR6IiAvPgo8L3N2Zz4K',\n\titems: {\n\t\tinfoCop: {\n\t\t\ttype: 'staticText',\n\t\t\ttext: {\n\t\t\t\ten: 'Calculate the Coefficient of Performance (COP / JAZ) of your heat pump over various timeframes (24h, 7d, 1m, 1y). You can use the internal heat pump meters or link accurate external smart meters (e.g. Shelly 3EM).',\n\t\t\t\tde: 'Berechne die Arbeitszahl (COP / JAZ) deiner W\u00E4rmepumpe \u00FCber verschiedene Zeitr\u00E4ume (Heute, 7 Tage, Monat, Jahr). Du kannst daf\u00FCr die internen Sch\u00E4tzwerte der Anlage nutzen oder hochpr\u00E4zise externe Z\u00E4hler (z.B. Shelly 3EM) verlinken.',\n\t\t\t},\n\t\t\tstyle: { marginBottom: '20px', fontSize: '14px' },\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 12,\n\t\t\tlg: 12,\n\t\t\txl: 12,\n\t\t},\n\t\tcop_calculation_active: {\n\t\t\ttype: 'checkbox',\n\t\t\tlabel: { en: 'Enable COP / Efficiency calculation', de: 'COP / Effizienz-Berechnung aktivieren' },\n\t\t\tdefault: false,\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 12,\n\t\t\tlg: 12,\n\t\t\txl: 12,\n\t\t},\n\t\tdivider_cop1: {\n\t\t\ttype: 'divider',\n\t\t\tcolor: 'primary',\n\t\t\tstyle: { marginBottom: '15px', marginTop: '15px' },\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 12,\n\t\t\tlg: 12,\n\t\t\txl: 12,\n\t\t},\n\t\theaderPower: {\n\t\t\ttype: 'header',\n\t\t\ttext: { en: '1. Electrical Energy (Power Consumption)', de: '1. Elektrische Energie (Stromverbrauch)' },\n\t\t\tsize: 4,\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 12,\n\t\t\tlg: 12,\n\t\t\txl: 12,\n\t\t},\n\t\tcop_source_power: {\n\t\t\ttype: 'select',\n\t\t\tlabel: { en: 'Data source for power consumption', de: 'Datenquelle f\u00FCr Stromverbrauch' },\n\t\t\tdisabled: '!data.cop_calculation_active',\n\t\t\toptions: [\n\t\t\t\t{\n\t\t\t\t\tlabel: { en: 'Internal (Luxtronik estimates)', de: 'Intern (Luxtronik Sch\u00E4tzwerte)' },\n\t\t\t\t\tvalue: 'internal',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: { en: 'External Object ID (e.g. Shelly)', de: 'Externe Objekt-ID (z.B. Shelly)' },\n\t\t\t\t\tvalue: 'external',\n\t\t\t\t},\n\t\t\t],\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 6,\n\t\t\tlg: 6,\n\t\t\txl: 6,\n\t\t},\n\t\tcop_oid_power_total: {\n\t\t\ttype: 'objectId',\n\t\t\tlabel: { en: 'Select External Meter OID (Total kWh)', de: 'Externen Z\u00E4hler OID w\u00E4hlen (Gesamt kWh)' },\n\t\t\thidden: \"data.cop_source_power !== 'external'\",\n\t\t\tdisabled: '!data.cop_calculation_active',\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 6,\n\t\t\tlg: 6,\n\t\t\txl: 6,\n\t\t},\n\t\theaderThermal: {\n\t\t\ttype: 'header',\n\t\t\ttext: { en: '2. Thermal Energy (Heat Generation)', de: '2. Thermische Energie (W\u00E4rmeerzeugung)' },\n\t\t\tsize: 4,\n\t\t\tstyle: { marginTop: '20px' },\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 12,\n\t\t\tlg: 12,\n\t\t\txl: 12,\n\t\t},\n\t\tcop_source_thermal: {\n\t\t\ttype: 'select',\n\t\t\tlabel: { en: 'Data source for thermal generation', de: 'Datenquelle f\u00FCr W\u00E4rmeerzeugung' },\n\t\t\tdisabled: '!data.cop_calculation_active',\n\t\t\toptions: [\n\t\t\t\t{ label: { en: 'Internal (Luxtronik meters)', de: 'Intern (Luxtronik Z\u00E4hler)' }, value: 'internal' },\n\t\t\t\t{\n\t\t\t\t\tlabel: { en: 'External Object ID (e.g. M-Bus meter)', de: 'Externe Objekt-ID (z.B. M-Bus Z\u00E4hler)' },\n\t\t\t\t\tvalue: 'external',\n\t\t\t\t},\n\t\t\t],\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 6,\n\t\t\tlg: 6,\n\t\t\txl: 6,\n\t\t},\n\t\tcop_oid_thermal_total: {\n\t\t\ttype: 'objectId',\n\t\t\tlabel: { en: 'Select External Heat Meter OID (Total kWh)', de: 'Externen WMZ OID w\u00E4hlen (Gesamt kWh)' },\n\t\t\thidden: \"data.cop_source_thermal !== 'external'\",\n\t\t\tdisabled: '!data.cop_calculation_active',\n\t\t\txs: 12,\n\t\t\tsm: 12,\n\t\t\tmd: 6,\n\t\t\tlg: 6,\n\t\t\txl: 6,\n\t\t},\n\t},\n};\n\nimport * as path from 'node:path';\nconst configPath = path.resolve(process.cwd(), 'admin/jsonConfig.json');\n\ntry {\n\tconst currentConfig = JSON.parse(fs.readFileSync(configPath, 'utf8'));\n\n\t// Wir bauen ein komplett neues Objekt f\u00FCr die Tabs, um die Reihenfolge zu kontrollieren\n\tconst newItems: Record<string, any> = {};\n\n\tfor (const key of Object.keys(currentConfig.items)) {\n\t\t// Sobald wir beim 3. Tab (Takt-Optimierung) ankommen, mogeln wir unseren COP-Tab davor!\n\t\tif (key === 'cycleOptimizationTab') {\n\t\t\tnewItems.copTab = copTab;\n\t\t}\n\n\t\tif (key === 'objectsSettings') {\n\t\t\tnewItems[key] = objectsSettings; // Generierte Datenpunkte patchen\n\t\t} else if (key !== 'copTab') {\n\t\t\t// Alte Tabs r\u00FCberkopieren (verhindert Duplikate, falls copTab vorher am Ende stand)\n\t\t\tnewItems[key] = currentConfig.items[key];\n\t\t}\n\t}\n\n\t// Falls 'cycleOptimizationTab' warum auch immer nicht existiert, h\u00E4ngen wir es sicherheitshalber an\n\tif (!newItems.copTab) {\n\t\tnewItems.copTab = copTab;\n\t}\n\n\tcurrentConfig.items = newItems;\n\n\tfs.writeFileSync(configPath, JSON.stringify(currentConfig, null, '\\t'));\n\tconsole.log('\u2705 admin/jsonConfig.json wurde erfolgreich automatisch gepatcht und sortiert!');\n} catch (err) {\n\tconsole.error('\u274C Fehler beim Patchen der jsonConfig.json:', err);\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAoB;AACpB,qBAAgC;AAChC,kBAA6B;AAC7B,sBAAiC;AACjC,wBAAmC;AACnC,4BAAuC;AAsPvC,WAAsB;AApPtB,MAAM,cAAc;AAAA,EACnB,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACJ;AAEA,MAAM,SAA8B,CAAC;AAGrC,SAAS,cAAc,QAAwB;AAC9C,SAAO,OAAO,QAAQ,iBAAiB,GAAG,EAAE,YAAY;AACzD;AAEA,WAAW,CAAC,KAAK,GAAG,KAAK,OAAO,QAAQ,WAAW,GAAG;AAErD,QAAM,QAAQ,IAAI,OAAO,MAAM,GAAG;AAClC,QAAM,eAAe,MAAM,SAAS,IAAI,GAAG,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,KAAK,MAAM,CAAC;AAC3E,QAAM,QAAQ,cAAc,YAAY;AACxC,QAAM,WAAW,SAAS,KAAK;AAE/B,MAAI,CAAC,OAAO,QAAQ,GAAG;AACtB,WAAO,QAAQ,IAAI;AAAA,MAClB,MAAM;AAAA,MACN,OAAO,EAAE,IAAI,aAAa,QAAQ,MAAM,GAAG,GAAG,IAAI,aAAa,QAAQ,MAAM,GAAG,EAAE;AAAA,MAClF,aAAa;AAAA,MACb,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,I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8C,GAAG;AAChE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/io-package.json
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
3
|
"name": "luxtronik2-controller",
|
|
4
|
-
"version": "0.18.
|
|
4
|
+
"version": "0.18.2",
|
|
5
5
|
"news": {
|
|
6
|
+
"0.18.2": {
|
|
7
|
+
"en": "*🔧 Maintenance & Repository Compliance**\n\n**Core Dependency Update:** Raised minimum required `js-controller` dependency to `>=7.0.7` in `io-package.json` to ensure compatibility with modern ioBroker environments (resolves E1057).\n**Full i18n Localization for Admin UI:** Added complete multi-language label sets (`ru`, `pt`, `nl`, `fr`, `it`, `es`, `pl`, `uk`, `zh-cn`) for COP power and thermal source selection dropdowns in `jsonConfig.json` (resolves W5611).\n**Package News Cleanup:** Removed unreleased intermediate tags (`0.17.0`, `0.16.1`) from `common.news` in `io-package.json` to align strictly with published NPM releases (resolves W2004).\n**CI/CD Security Compliance:** Updated GitHub auto-merge workflows for Dependabot to adhere to GitHub's updated `pull_request_target` execution policies (PR #90 / Issue #89).\n**Code Modernization:** Migrated built-in Node.js module imports to use the explicit `node:` protocol prefix (e.g. `node:fs`, `node:path`).",
|
|
8
|
+
"de": "* 🔧 Wartung und Repository-Konformität**\n\n**Update zur Kernabhängigkeit: ** Die Mindestabhängigkeit von `js-controller`` in `io-package.json` wurde auf `>=7.0.7` erhöht, um mit modernen ioBroker-Umgebungen kompatibel zu sein (löst E1057).\n**Vollständige i18n-Lokalisierung für Admin-UI: ** Vollständige mehrsprachige Labelsets (`ru`, `pt`, `nl`, `fr`, `it`, `es`, `pl`, `uk`, `zh-cn`) in `JSONConfig.json` hinzugefügt (löst W5611).\n**Package News Cleanup: ** Unveröffentlichte Zwischen-Tags (`0.17.0`, `0.16.1`) von `common.news` in `io-package.json` entfernt, um sie genau an NPM-Releases anzupassen (löst W2004).\n**CI/CD-Sicherheit: ** GitHub-Auto-Merge-Workflows für Dependabot wurden an GitHubs neue `pull_request_target`-Regeln angepasst (PR #90/Issue #89).\n**Code-Modernisierung: ** Integrierte Node.js Modulimporte auf das explizite `node: `-Protokollpräfix migriert (z. B. `node:fs`, `node:path`).",
|
|
9
|
+
"ru": "* 🔧 Техническое обслуживание и соответствие требованиям репозитория**\n\n**Обновление основных зависимостей: ** Минимальная требуемая зависимость `js-controller` увеличена до `>=7.0.7` в `io-package.json` для обеспечения совместимости с современными средами IOBroker (исправлено E1057).\n**Полная локализация i18n для пользовательского интерфейса администратора: ** Добавлены полные многоязычные наборы меток (`ru`, `pt`, `nl`, `fr`, `it`, `es`, `pl`, `uk`, `zh-cn`) для выпадающих списков выбора питания и источника тепла COP в `JsonConfig.json` (разрешение W5611).\n**Очистка новостей о пакетах: ** Удалены неопубликованные промежуточные теги (`0.17.0`, `0.16.1») из `common.news` в `io-package.json`, чтобы строго соответствовать опубликованным выпускам NPM (резолюция W2004).\n**Соответствие требованиям безопасности CI/CD: ** Обновлены рабочие процессы автоматического объединения GitHub для Dependabot в соответствии с обновленными политиками выполнения GitHub `pull_request_target` (PR #90/Issue #89).\n**Модернизация кода: ** Перемещен импорт встроенного модуля Node.js для использования явного префикса протокола `node:` (например, `node:fs`, `node:path`).",
|
|
10
|
+
"pt": "* 🔧 Manutenção e conformidade do repositório**\n\n**Atualização de dependência básica: ** Aumentou a dependência mínima de `js-controller` para `>=7.0.7` em `io-package.json` para garantir compatibilidade com ambientes IOBroker modernos (resolve E1057).\n**Localização i18n completa para Admin UI: ** Foram adicionados rótulos completos em vários idiomas (`ru`, `pt`, `nl`, `fr`, `it`, `es`, `pl`, `uk`, `zh-cn`) para seleção de fonte térmica e de energia COP em `JSONConfig.json` (resolve W5611).\n**Limpeza de notícias do pacote: ** Removemos tags intermediárias inéditas (`0.17.0`, `0.16.1`) de `common.news` em `io-package.json` para alinhar com versões publicadas do NPM (resolve W2004).\n**Conformidade de segurança CI/CD: ** Fluxos de trabalho de mesclagem automática do GitHub para Dependabot aderir às políticas de execução `pull_request_target` do GitHub (PR #90/Issue #89).\n**Modernização de código: ** Importações do módulo Node.js embutido migrado para usar o prefixo explícito `node: `(ex: `node:fs`, `node:path`).",
|
|
11
|
+
"nl": "* 🔧 Onderhoud en naleving van de opslagplaats**\n\n**Core-afhankelijkheidsupdate: ** Verhoogd de minimaal vereiste `js-controller` afhankelijkheid naar `>=7.0.7` in `io-package.json` om compatibiliteit met moderne IOBroker-omgevingen te garanderen (lost E1057 op).\n**Volledige i18n-lokalisatie voor Admin UI: ** Complete meertalige labelsets toegevoegd (`ru`, `pt`, `nl`, `fr`, `it`, `es`, `pl`, `uk`, `zh-cn`) voor keuzelijsten voor COP-voeding en thermische bronselectie in `JSONConfig.json` (lost W5611 op).\n**Package News Cleanup: ** Niet eerder uitgebrachte tussentijdse tags (`0.17.0`, `0.16.1`) verwijderd uit `common.news` in `io-package.json` om ze strikt aan te passen aan gepubliceerde NPM-releases (lost W2004 op).\n**Conformiteit met CI/CD-beveiliging: ** Bijgewerkte GitHub-workflows voor automatische samenvoeging zodat Dependabot kan voldoen aan het bijgewerkte uitvoeringsbeleid van `pull_request_target` van GitHub (PR #90 /Issue #89).\n**Modernisering van de code: ** De ingebouwde module Node.js wordt geïmporteerd om het expliciete protocolvoorvoegsel „node:” te gebruiken (bijv. `node:fs`, `node:path`).",
|
|
12
|
+
"fr": "* 🔧 Maintenance et conformité du dépôt**\n\n**Core Dependency Update :** Augmentation de la dépendance minimale requise à « js-controller » à « >=7.0.7 » dans « io-package.json » afin de garantir la compatibilité avec les environnements IObroker modernes (résolution E1057).\n**Localisation complète d'i18n pour l'interface d'administration :** Ajout de jeux d'étiquettes multilingues complets (« ru », « pt », « nl », « fr », « it », « es », « pl », « uk », « zh-cn ») pour les listes déroulantes de sélection de l'alimentation COP et des sources thermiques dans « JSONConfig.json » (résout W5611).\n**Package News Cleanup :** Suppression des tags intermédiaires inédits (« 0.17.0 », « 0.16.1 ») de « common.news » dans « io-package.json » pour s'aligner strictement sur les versions publiées de NPM (résout W2004).\n**Conformité à la sécurité CI/CD :** Mise à jour des flux de fusion automatique de GitHub pour que Dependabot respecte les règles d'exécution « pull_request_target » de GitHub (PR #90/Issue #89).\n**Modernisation du code :** Le module Node.js intégré a migré pour utiliser le préfixe explicite du protocole node : (par exemple node:fs, node:path).",
|
|
13
|
+
"it": "* 🔧 Manutenzione e conformità del deposito**\n\n**Core Dependency Update: ** Aumentata la dipendenza minima `js-controller` a `>=7.0.7` in `io-package.json` per garantire la compatibilità con i moderni ambienti IOBroker (risolve E1057).\n**Localizzazione i18n completa per l'interfaccia utente di amministrazione: ** Aggiunti set completi di etichette multilingue (ru`, `pt`, `nl`, fr`, `it`, `es`, `pl`, `uk`, `zh-cn`) per i menu COP power e thermal source in `JSONConfig.json` (risolve W5611).\n**Package News Cleanup: ** Rimossi i tag intermedi inediti (`0.17.0`, `0.16.1`) da `common.news` in `io-package.json` per allinearli alle versioni NPM pubblicate (risolve W2004).\n**Conformità alla sicurezza CI/CD: ** Flussi di lavoro di fusione automatica di GitHub aggiornati per aderire alle policy di esecuzione `pull_request_target` di GitHub (PR #90/Issue #89).\n**Modernizzazione del codice: ** Il modulo Node.js integrato migrato utilizza il prefisso esplicito `node: `(es. `node:fs`, `node:path`).",
|
|
14
|
+
"es": "* 🔧 Mantenimiento y cumplimiento del repositorio**\n\n**Actualización de dependencia básica: ** Se elevó la dependencia mínima requerida de «js-controller» a >=7.0.7 en «io-package.json» para garantizar la compatibilidad con los entornos modernos de IOBroker (resuelve el E1057).\n**Localización completa del i18n para la interfaz de usuario de administrador: ** Se han añadido conjuntos completos de etiquetas multilingües (`ru`, `pt`, `nl`, `fr`, `it`, `es`, `pl`, `uk`, `zh-cn`) para los menús desplegables de potencia y fuentes térmicas de COP en `JsonConfig.json` (resuelve el W5611).\n**Package News Cleanup: ** Se han eliminado las etiquetas intermedias inéditas (0.17.0, 0.16.1) de common.news en io-package.json para alinearlas estrictamente con las versiones publicadas de NPM (resuelve W2004).\n**Cumplimiento de seguridad de CI/CD: ** Se han actualizado los flujos de trabajo de fusión automática de GitHub para que el Dependabot cumpla con las políticas de ejecución de «pull_request_target» de GitHub (PR #90/Issue #89).\n**Modernización del código: ** Se migraron las importaciones del módulo Node.js integrado para usar el prefijo de protocolo `node: `explícito (p. ej., `node:fs`, `node:path).",
|
|
15
|
+
"pl": "* 🔧 Zgodność z konserwacją i repozytorium**\n\n**Aktualizacja podstawowej zależności: ** Podniesiono minimalną wymaganą zależność `js-controller` do `>=7.0.7` w `io-package.json` w celu zapewnienia zgodności z nowoczesnymi środowiskami ioBroker (rozwiązuje E1057).\n**Pełna lokalizacja i18n dla interfejsu administratora: ** Dodano kompletne wielojęzyczne zestawy etykiet (`ru`, `pt`, `nl`, `fr`, `it`, `es`, `pl`, `uk`, `zh-cn`) dla menu rozwijanego wyboru zasilania COP i źródła termicznego w `JSONConfig.json` (rozwiązuje W5611).\n**Czyszczenie wiadomości pakietu: ** Usunięto niepublikowane znaczniki pośrednie (`0.17.0`, `0.16.1`) z `common.news` w `io-package.json` w celu ścisłego dopasowania do opublikowanych wersji NPM (rozwiązuje W2004).\n**Zgodność z zabezpieczeniami CI/CD: ** Zaktualizowano przepływy pracy automatycznego scalania GitHub dla Dependabot, aby były zgodne ze zaktualizowanymi zasadami wykonania `pull_request_target` GitHub (PR #90/Issue #89).\n**Modernizacja kodu: ** Migrowany wbudowany import modułu Node.js w celu użycia jawnego prefiksu protokołu `node: `(np. `node:fs`, `node:path`).",
|
|
16
|
+
"uk": "* 🔧 Технічне обслуговування та відповідність сховища**\n\n**Оновлення залежності ядра: ** Підвищено мінімальну необхідну залежність `js-controller` до `>=7.0.7` у `io-package.json` для забезпечення сумісності з сучасними середовищами IObroker (вирішує E1057).\n**Повна локалізація i18n для інтерфейсу адміністратора: ** Додано повні багатомовні набори міток (`ru`, `pt`, `nl`, `fr`, `it`, `es`, `pl`, `uk`, `zh-cn`) для випадаючих списків вибору живлення COP та теплового джерела в `JsonConfig.json` (вирішує W5611).\n**Очищення новин пакета: ** Видалено невипущені проміжні теги (`0.17.0`, `0.16.1`) з `common.news` у `io-package.json` для суворого узгодження з опублікованими випусками NPM (вирішує W2004).\n**Відповідність безпеки CI/CD: ** Оновлені робочі процеси автоматичного об'єднання GitHub для Dependabot, щоб дотримуватися оновленої політики виконання GitHub `pull_request_target` (PR #90/Випуск #89).\n**Модернізація коду: ** Перенесено імпорт вбудованого модуля Node.js для використання явного префікса протоколу `node: `(наприклад, `node:fs`, `node:path`).",
|
|
17
|
+
"zh-cn": "* 🔧 维护和存储库合规性**\n\n**核心依赖关系更新:** 在 io-package.json 中将 “js-controller” 所需的最低依赖关系提高到 `>=7.0.7`,以确保与现代 IOBroker 环境兼容(已解决 E1057)。\n**管理员用户界面的完整 i18n 本地化:** 在 `jsonConfig.json` 中为 COP 电源和热源选择下拉菜单添加了完整的多语言标签集(`ru`、`pt`、`nl`、`fr`、`it`、`es`、`pl`、`uk`、`zh-cn`)(已解决 W5611)。\n**Package News Cleanup:** 从 `io-package.json` 的 `common.news` 中删除了未发布的中间标签(`0.17.0`,`0.16.1`),以严格与已发布的 NPM 版本保持一致(已解决 W2004)。\n**CI/CD 安全合规性:** 更新了 Dependabot 的 GitHub 自动合并工作流程,以遵守 GitHub 更新后的 `pull_request_target` 执行政策(PR #90/问题 #89)。\n**代码现代化:** 迁移了内置 Node.js 模块导入,以使用明确的 `node: `协议前缀(例如 `node: fs`、`node: path`)。"
|
|
18
|
+
},
|
|
19
|
+
"0.18.1": {
|
|
20
|
+
"en": "*🐛 Bugfixes**\n\n**COP Database Persistence:** Fixed a critical bug in the object manager's cleanup routine (`cleanupStates`). The internal database folder (`hidden.cop_buckets`) was missing from the exclusion list and got aggressively deleted upon every adapter restart, resulting in wiped COP histories and `(null)` values. The hidden states are now strictly protected against the cleanup process, ensuring long-term persistence for energy calculations.",
|
|
21
|
+
"de": "* 🐛 Bugfixes**\n\n**COP Database Persistence: ** Kritischer Bug im Objektmanager behoben (`CleanupStates`). Der interne Datenbankordner (`hidden.cop_buckets`) fehlte in der Ausschlussliste und wurde bei jedem Adapter-Neustart gelöscht, wodurch COP-Historien und `(Null)` Werte gelöscht wurden. Die versteckten Staaten sind jetzt strikt vor der Säuberung geschützt, was Energieberechnungen langfristig ermöglicht.",
|
|
22
|
+
"ru": "* 🐛 Исправления ошибок**\n\n**Сохранность базы данных COP: ** Исправлена критическая ошибка в процедуре очистки диспетчера объектов (`CleanupStates`). Внутренняя папка базы данных (`hidden.cop_buckets`) отсутствовала в списке исключений и активно удалялась при каждом перезапуске адаптера, в результате чего история COP и значения «(null)» стирались. Скрытые состояния теперь строго защищены от процесса очистки, что обеспечивает долгосрочную сохранность расчетов энергопотребления.",
|
|
23
|
+
"pt": "* 🐛 Correções**\n\n**COP Database Persistence: ** Corrigido um bug crítico na rotina de limpeza do gerenciador de objetos. A pasta interna do banco de dados (`hidden.cop_buckets`) não aparecia na lista de exclusão e era apagada a cada reinicialização do adaptador, apagando históricos COP e valores `(nulos)`. Os estados ocultos agora são protegidos contra o processo de limpeza, garantindo a durabilidade dos cálculos de energia.",
|
|
24
|
+
"nl": "* 🐛 Opgeloste fouten**\n\n**PERSISTENTIE VAN DE COP-database: ** Er is een kritieke fout opgelost in de opruimingsroutine van de objectbeheerder (`CleanUpStates`). De interne databasemap (`hidden.cop_buckets`) ontbrak in de lijst met uitsluitingen en werd agressief verwijderd bij elke herstart van de adapter, wat resulteerde in gewiste COP-geschiedenissen en waarden van `(null)`. De verborgen staten zijn nu strikt beschermd tegen het opruimingsproces, waardoor energieberekeningen op lange termijn kunnen worden volgehouden.",
|
|
25
|
+
"fr": "* 🐛 Bugcorrects**\n\n**Persistance de la base de données COP :** Correction d'un bug dans la routine de nettoyage du gestionnaire d'objets. Le dossier interne de la base de données (« hidden.cop_buckets ») ne figurait pas dans la liste d'exclusion et a été supprimé à chaque redémarrage de l'adaptateur, effaçant ainsi l'historique des COP et les valeurs « (null) ». Les états cachés sont désormais strictement protégés contre le processus de nettoyage, ce qui garantit la pérennité des calculs énergétiques.",
|
|
26
|
+
"it": "* 🐛 Bugfix**\n\n**Persistenza del database COP: ** Risolto un bug critico nella routine di pulizia del gestore oggetti La cartella interna del database (`hidden.cop_buckets`) mancava dall'elenco delle esclusioni e veniva eliminata a ogni riavvio dell'adattatore, cancellando la cronologia COP e i valori `null`. Gli stati nascosti sono ora protetti dal processo di pulizia, garantendo calcoli energetici duraturi.",
|
|
27
|
+
"es": "* 🐛 Correcciones**\n\n**Persistencia de la base de datos COP: ** Se ha corregido un error crítico en la rutina de limpieza del gestor de objetos. La carpeta interna de la base de datos (`hidden.cop_buckets`) no figuraba en la lista de exclusiones y se eliminaba de forma agresiva cada vez que se reiniciaba el adaptador, lo que borraba los historiales de COP y los valores `(null)`. Los estados ocultos están ahora estrictamente protegidos contra el proceso de limpieza, lo que garantiza la persistencia a largo plazo de los cálculos de energía.",
|
|
28
|
+
"pl": "* 🐛 Poprawki błędów**\n\n**Trwałość bazy danych COP: ** Naprawiono krytyczny błąd w procedurze czyszczenia menedżera obiektów (`CleanupStates`). Wewnętrzny folder bazy danych (`hidden.cop_buckets`) brakował na liście wykluczeń i był agresywnie usuwany przy każdym ponownym uruchomieniu adaptera, co skutkowało wyczyszczonymi historiami COP i wartościami `(null)`. Ukryte stany są teraz ściśle chronione przed procesem oczyszczania, zapewniając długoterminową trwałość obliczeń energii.",
|
|
29
|
+
"uk": "* 🐛 Виправлення вадь**\n\n**Постійність бази даних COP: ** Виправлена критична помилка в процедурі очищення менеджера об'єктів (`CleanupState`). Внутрішня тека бази даних (`hidden.cop_buckets`) була відсутня у списку виключень і була агресивно видалена при кожному перезапуску адаптера, що призвело до видалення історій COP та значень `(null)`. Приховані стани тепер суворо захищені від процесу очищення, забезпечуючи довгострокову стійкість для розрахунків енергії.",
|
|
30
|
+
"zh-cn": "* 🐛 错误修复**\n\n**COP 数据库持久性:** 修复了对象管理器清理例程 (`cleanupStates`) 中的一个严重错误。内部数据库文件夹(`hidden.cop_buckets`)不在例外列表中,并且在每次适配器重启时都会被大量删除,从而导致 COP 历史记录和 `(空)`值被擦除。现在,隐藏状态受到严格保护,免受清理过程的影响,从而确保了能量计算的长期持续性。"
|
|
31
|
+
},
|
|
6
32
|
"0.18.0": {
|
|
7
33
|
"en": "*🚀 Features & Enhancements**\n\n**Smart PWM Pump Detection:** The `hupManager` now automatically detects whether the heating circulation pump (HUP) is controlled via a PWM signal (verified by checking if `heating_max_circ_pump_speed > 0%`). If this is the case, the obsolete dynamic 0-10V voltage optimization is automatically bypassed. This saves system resources and prevents unnecessary write commands to the Luxtronik controller.\n\n*🐛 Bugfixes**\n\n**HUP Voltage Validation Fixed:** Fixed an issue where ioBroker threw a warning (\"nur zwischen 3 und 10 V erlaubt\") in the log for HUP voltage values below 3V. The object definitions for minimum and nominal voltage have been explicitly updated to `min: 0` and `max: 10`. This successfully overwrites lingering cache limits in the ioBroker database and allows the pump to transition into 0V standby mode without throwing errors.",
|
|
8
34
|
"de": "* 🚀 Funktionen & Erweiterungen**\n\n**Intelligente PWM-Pumpenerkennung: ** Der `HupManager` erkennt jetzt automatisch, ob die Heizungsumwälzpumpe (HUP) über ein PWM-Signal gesteuert wird (prüft, ob `heating_max_circ_pump_speed > 0% `ist). In dem Fall wird die veraltete dynamische 0-10V-Spannungsoptimierung automatisch umgangen. Das spart Systemressourcen und vermeidet unnötige Schreibbefehle an den Luxtronik-Controller.\n\n* 🐛 Bugfixes**\n\n**HUP-Spannungsvalidierung behoben: ** Es wurde ein Fehler behoben, bei dem ioBroker eine Warnung („nur zwischen 3 und 10 V erlaubt“) ausgab. Die Objektdefinitionen für Mindest- und Nennspannung wurden explizit auf `min: 0` und `max: 10` aktualisiert. Das überschreibt erfolgreich die Cache-Limits in der ioBroker-Datenbank und die Pumpe wechselt fehlerfrei in den 0V-Standby-Modus.",
|
|
@@ -54,45 +80,6 @@
|
|
|
54
80
|
"pl": "#### 🛠 Poprawki błędów i ulepszenia\n\n- **akość kodu i CI/CD:** Naprawiono awarie rurociągu eSlint `no-prototype-builtins` w `ObjectManager.ts` zastępując bezpośrednie wywołania `.hasOwnProperty () `bezpiecznymi metodami `Object.prototype.hasOwnProperty.call ()`. ",
|
|
55
81
|
"uk": "#### 🛠 Виправлення помилок та вдосконалення\n\n- **кість коду та CI/CD:** Виправлено помилки конвеєра ESLint `no-prototype-builtins` у `ObjectManager.ts` шляхом заміни прямих викликів `.hasOwnProperty () `безпечними методами `Object.prototype.hasOwnProperty.call ()`. ",
|
|
56
82
|
"zh-cn": "#### 🛠 错误修复和增强\n\n-**代码质量和 CI/CD:** 通过使用安全的 `Object.prototype.hasownProperty.call () `方法替换直接调用 `ObjectManager.ts` 中的 ESLint `no-prototype.builtins` 管道故障。"
|
|
57
|
-
},
|
|
58
|
-
"0.17.0": {
|
|
59
|
-
"en": "#### 🚀 Features\n\n- **COP & Efficiency Calculator:** Introduced a comprehensive COP (Coefficient of Performance) calculation engine to track heat pump efficiency.\n- **External Smart Meter Support:** Users can now choose to use internal Luxtronik estimates or link high-precision external sensors (e.g., Shelly 3EM or M-Bus heat meters) via ioBroker Object IDs for power consumption and thermal energy generation.\n- **Granular Live Metrics:** The adapter now dynamically analyzes the active operating state to split and calculate live daily COP values for \"Total\", \"Heating\", and \"Hot Water\" independently.\n- **Persistent Time Rollovers:** Implemented a robust \"snapshot\" system with absolute virtual counters. The adapter automatically detects day, month, and year rollovers to persist data and guarantee accurate long-term calculations, even across adapter restarts or ioBroker reboots.\n- **Dedicated Efficiency UI:** Added a new \"Efficiency / COP\" configuration tab to easily manage energy data sources and toggle the calculation engine.\n- **Connection & Polling Status:** Added a new system datapoint `info.lastUpdate`. This state continuously tracks the exact timestamp of the last successful data retrieval, making it easy to monitor the adapter's health and polling activity in visualisations like VIS or Lovelace.\n\n#### 🛠 Bugfixes & Enhancements\n\n- **Object Tree Creation:** Fixed an issue where hidden data buckets for the COP calculation were not created because parent directories were missing.\n- **Timestamp Formatting:** Resolved a strict type mismatch error in the ioBroker log by correctly formatting `info.lastUpdate` as an ISO string instead of a numeric timestamp.\n- **State Properties & Code Quality:** Resolved strict TypeScript and ESLint warnings (missing JSDoc annotations, missing read/write object definitions) in the new COP manager.\n- **Modernized ioBroker API:** Replaced deprecated `setStateAsync` method calls with the modern, promise-based `setState` standard across the COP calculation engine.\n- **Config UI Sorting:** Ensured the newly generated configuration tabs maintain a logical and consistent order across rebuilds.\n- **Internal Mapping:** Restructured the `info` folder mapping to cleanly accommodate adapter-level metadata alongside hardware telemetry.",
|
|
60
|
-
"de": "#### 🚀 Merkmale\n\n- **OP- und Effizienzrechner:** Es wurde ein umfassendes Modul zur Berechnung des Wirkungsgrads von Wärmepumpen eingeführt. \n- **upport für externe Smart Meter:** Benutzer können nun interne Luxtronik-Schätzungen verwenden oder hochpräzise externe Sensoren (z. B. Shelly 3EM oder M-Bus) über ioBroker Object IDs für Stromverbrauch und Wärmeerzeugung verbinden. \n- **ranular Live Metrics:** Der Adapter analysiert nun dynamisch den Betriebszustand und berechnet die täglichen Live-COP-Werte für „Total“, „Heating“ und „Hot Water“ unabhängig. \n- **ersistent Time Rollovers:** Ein robustes Snapshot-System mit absoluten virtuellen Zählern. Der Adapter erkennt automatisch Tag, Monat und Jahr, um Daten beizubehalten und auch bei Adapterneustarts oder ioBroker-Neustarts genaue Berechnungen zu garantieren. \n- **igene Effizienz-UI:** Neuer Tab „Effizienz/COP“ hinzugefügt, um Energiedatenquellen zu verwalten und die Rechenmaschine umzuschalten. \n- **erbindungs- und Abfragestatus:** Neues Systemdatum `Info.LastUpdate` hinzugefügt. Dieser Status verfolgt ständig den exakten Zeitstempel des letzten Datenabrufs, sodass der Zustand des Adapters in Visualisierungen wie VIS oder Lovelace leicht überwacht werden kann. \n\n#### 🛠 Bugfixes & Verbesserungen\n\n- **bjektbaum erstellen:** Es wurde ein Fehler behoben, bei dem keine übergeordneten Ordner für die COP-Berechnung erstellt wurden. \n- **imestamp-Format:** Es wurde ein strikter Typfehler im ioBroker-Log behoben, indem `Info.LastUpdate` korrekt als ISO-String statt numerisch formatiert wurde. \n- **tate Properties & Code Quality:** Strikte TypeScript- und ESLint-Warnungen (fehlende JSDoc-Annotationen, Lese-/Schreib-Objektdefinitionen) im neuen COP-Manager behoben. \n- **odernisierte IOBroker-API:** Die veralteten `setStateAsync`-Methodenaufrufe wurden in der COP-Rechenmaschine durch `setState`-Standard ersetzt. \n- **ortierung der Konfigurationsoberfläche:** Sortiert die neu generierten Konfigurations-Tabs bei allen Rebuilds. \n- **nternes Mapping:** Die Ordnerzuweisung `info` wurde neu strukturiert, um Adaptermetrie und Hardware-Telemetrie abzudecken. ",
|
|
61
|
-
"ru": "#### 🚀 Функции\n\n- **алькулятор КПД и эффективности:** Представлен комплексный механизм расчета коэффициента полезного действия (COP) для отслеживания эффективности теплового насоса. \n- **оддержка внешних интеллектуальных счетчиков:** Теперь пользователи могут использовать внутренние оценки Luxtronik или подключать высокоточные внешние датчики (например, теплосчетчики Shelly 3EM или M-Bus) к идентификаторам объектов IOBroker для энергопотребления и выработки тепловой энергии. \n- **етализированные метрики в реальном времени:** Адаптер теперь динамически анализирует активное рабочее состояние для независимого разделения и вычисления ежедневных значений COP в реальном времени для «всего», «отопления» и «горячей воды». \n- **остоянные переносы времени:** Внедрена надежная система «снимков» с абсолютными виртуальными счетчиками. Адаптер автоматически определяет перенос даты, месяца и года, что позволяет сохранять данные и обеспечивать точность расчетов в долгосрочной перспективе даже при перезагрузке адаптера или перезагрузке IOBroker. \n- **пециальный пользовательский интерфейс по эффективности:** Добавлена новая вкладка конфигурации «Эффективность/COP», позволяющая легко управлять источниками данных об энергопотреблении и переключать механизм вычислений. \n- **остояние подключения и опроса:** Добавлена новая системная точка данных `Info.LastUpdate`. Это состояние непрерывно отслеживает точное время последнего успешного извлечения данных, что позволяет легко отслеживать состояние адаптера и активность опросов в таких визуализациях, как VIS или Lovelace. \n\n#### 🛠 Исправления ошибок и улучшения\n\n- **оздание дерева объектов:** Исправлена ошибка, из-за которой скрытые сегменты данных для расчета COP не создавались из-за отсутствия родительских каталогов. \n- **орматирование отметок времени:** Исправлена ошибка строгого несоответствия типов в журнале IOBroker, правильно отформатировав `Info.lastUpdate` как строку ISO вместо числовой метки времени. \n- **войства состояния и качество кода:** Исправлены строгие предупреждения TypeScript и ESLint (отсутствие аннотаций JSDoc, отсутствие определений объектов для чтения/записи) в новом диспетчере COP. \n- **одернизированный API IOBroker:** В вычислительном движке COP устаревшие вызовы методов `setStateAsync` заменены современным стандартом setState, основанным на обещаниях. \n- **ортировка пользовательского интерфейса конфигурации:** Обеспечивает сохранение логического и согласованного порядка вновь созданных вкладок конфигурации при повторных сборках. \n- **нутреннее сопоставление:** Изменена структура сопоставления папок «info» для точного размещения метаданных на уровне адаптера и аппаратной телеметрии. ",
|
|
62
|
-
"pt": "#### 🚀 Recursos\n\n- **alculadora de COP e eficiência:** Introduziu um mecanismo abrangente de cálculo de COP para rastrear a eficiência da bomba de calor. \n- **uporte externo de Smart Meter:** Agora, os usuários podem usar estimativas internas da Luxtronik ou conectar sensores externos de alta precisão (ex., Shelly 3EM ou M-Bus) via IOBroker Object IDs para consumo e geração de energia térmica. \n- **étricas granulares ao vivo:** O adaptador agora analisa dinamicamente o estado ativo para dividir e calcular os valores COP diários para “Total”, “Aquecimento” e “Água Quente”. \n- **ersistent Time Rollovers:** Implementou um robusto sistema de “snapshot” com contadores virtuais. O adaptador detecta automaticamente as mudanças de dia, mês e ano para manter os dados e garantir cálculos precisos a longo prazo, mesmo em reinicializações ou IOBroker. \n- **I de eficiência dedicada:** Foi adicionada a nova guia “Eficiência/COP” para gerenciar fontes de dados de energia e ativar o motor de cálculo. \n- **tatus de conexão e pesquisa:** Novo datapoint `info.lastUpdate`. Esse estado rastreia continuamente a data exata da última recuperação bem-sucedida, facilitando o monitoramento da saúde e da pesquisa do adaptador em visualizações como VIS ou Lovelace. \n\n#### 🛠 Correções e melhorias\n\n- **riação da Árvore de Objetos:** Foi corrigido um problema em que os blocos de dados ocultos para o cálculo da COP não eram criados por falta de diretórios. \n- **ormatação de data e hora:** Resolveu um erro estrito de incompatibilidade de tipos no log do IOBroker ao formatar `info.lastUpdate` como string ISO em vez de numérico. \n- **tate Properties & Code Quality:** Resolveu avisos estritos de TypeScript e ESLint (anotações JSDoc e definições de objetos de leitura/gravação) no novo gerenciador COP. \n- **PI IOBroker modernizada:** Substituiu as chamadas obsoletas do método `setStateAsync` pelo moderno padrão `setState` baseado em promessas no mecanismo de cálculo do COP. \n- **onfig UI Sorting:** Garante uma ordem lógica e consistente nas novas abas de configuração. \n- **apeamento interno:** Reestruturou a pasta `info` para acomodar metadados de adaptador e telemetria de hardware. ",
|
|
63
|
-
"nl": "#### 🚀 Kenmerken\n\n- **OP- en efficiëntiecalculator:** Introduceerde een uitgebreide COP-berekeningsengine (Coëfficiënt van Prestatie) om het rendement van de warmtepomp bij te houden. \n- **xterne ondersteuning voor slimme meters:** Gebruikers kunnen er nu voor kiezen om interne Luxtronik-schattingen te gebruiken of om uiterst nauwkeurige externe sensoren (zoals Shelly 3EM- of M-Bus-warmtemeters) te koppelen via IOBroker Object ID's voor het energieverbruik en de opwekking van thermische energie. \n- **edetailleerde live statistieken:** De adapter analyseert nu dynamisch de actieve bedrijfstoestand om de actuele dagelijkse COP-waarden voor „Totaal”, „Verwarming” en „Warm water” onafhankelijk van elkaar te splitsen en te berekenen. \n- **ersistent Time Rollovers:** Implementeerde een robuust „snapshotsysteem” met absolute virtuele tellers. De adapter detecteert automatisch rollovers van dagen, maanden en jaren om gegevens bij te houden en nauwkeurige berekeningen op lange termijn te garanderen, zelfs wanneer de adapter opnieuw wordt opgestart of ioBroker opnieuw wordt opgestart. \n- **peciale gebruikersinterface voor efficiëntie:** Een nieuw configuratietabblad „Efficiëntie/COP” toegevoegd om eenvoudig energiegegevensbronnen te beheren en de rekenmachine in te schakelen. \n- **tatus van verbinding en peiling:** Een nieuw systeemdatapunt `Info.LastUpdate` toegevoegd. Deze status houdt continu het exacte tijdstip bij van de laatste succesvolle gegevensopname, waardoor het eenvoudig is om de status van de adapter en de polling-activiteit te controleren in visualisaties zoals VIS of Lovelace. \n\n#### 🛠 Oplossingen en verbeteringen\n\n- **bjectstructuur aanmaken:** Probleem opgelost waarbij verborgen gegevensemmers voor de COP-berekening niet werden aangemaakt omdat de bovenliggende mappen ontbraken. \n- **ijdstempelopmaak:** Er is een fout opgelost die strikt niet overeenkwam met het type in het IOBroker-logboek door `Info.LastUpdate` correct te formatteren als een ISO-tekenreeks in plaats van een numeriek tijdstempel. \n- **tatuseigenschappen en codekwaliteit:** Strikte TypeScript- en ESLint-waarschuwingen (ontbrekende JSDoc-annotaties, ontbrekende definities van lees-/schrijfobjecten) opgelost in de nieuwe COP-manager. \n- **emoderniseerde IOBroker API:** Vervangen van verouderde aanroepen van de `SetStateAsync` methode door de moderne, op beloften gebaseerde `setState` standaard in de COP-berekeningsengine. \n- **ortering van de gebruikersinterface van de configuratie:** Zorgde ervoor dat de nieuw gegenereerde configuratietabbladen een logische en consistente volgorde behouden bij alle herbouwingen. \n- **nterne toewijzing:** De maptoewijzing van de `info` is geherstructureerd om naast hardwaretelemetrie ook metagegevens op adapterniveau overzichtelijk onder te brengen. ",
|
|
64
|
-
"fr": "#### 🚀 Fonctions\n\n- **Calculateur de COP et d'efficacité :** A introduit un moteur de calcul complet du COP (coefficient de performance) pour suivre l'efficacité des pompes à chaleur.\n- **Prise en charge des compteurs intelligents externes :** Les utilisateurs peuvent désormais utiliser des estimations internes de Luxtronik ou relier des capteurs externes de haute précision (par exemple, des compteurs de chaleur Shelly 3EM ou M-Bus) via IObroker Object ID.\n- **Granular Live Metrics :** L'adaptateur analyse désormais l'état de fonctionnement actif de manière dynamique et calcule les COP quotidiens en temps réel pour « Total », « Chauffage » et « Eau chaude ».\n- **Permanent Time Rollovers :** Mise en place d'un solide système de « snapshots » avec compteurs virtuels absolus. L'adaptateur détecte automatiquement les reports de jour, de mois et d'année pour conserver les données et garantir des calculs précis à long terme, même en cas de redémarrage ou d'IObroker.\n- **Interface utilisateur dédiée :** Ajout d'un nouvel onglet « Efficience/COP » pour gérer facilement les sources de données énergétiques et activer le moteur de calcul.\n- **État de la connexion et du sondage :** Ajout du point de données « Info.LastUpdate ». Cet état suit en continu l'horodatage exact de la dernière récupération de données, ce qui permet de suivre facilement l'état de l'adaptateur et les sondages dans des visualisations comme VIS ou Lovelace.\n\n#### 🛠 Corrections et améliorations\n\n- **Création d'une arborescence d'objets :** Correction d'un bug qui empêchait de créer des compartiments de données cachés pour le calcul du COP.\n- **Formatage de l'horodatage :** Correction d'une erreur de type dans le journal IOBroker en formatant correctement « Info.LastUpdate » en chaîne ISO au lieu d'un horodatage numérique.\n- **Propriétés de l'état et qualité du code :** Résolution des avertissements TypeScript et ESLint (annotations JSDoc manquantes, définitions d'objets en lecture/écriture) dans le nouveau gestionnaire COP.\n- **API IOBroker modernisée :** Les appels à la méthode obsolète « SetStateAsync » ont été remplacés par la norme moderne basée sur les promesses du moteur de calcul COP.\n- **Tri de l'interface utilisateur :** Les nouveaux onglets de configuration conservent un ordre logique et cohérent lors des rebuilds.\n- **Cartographie interne :** Restructuration du dossier « info » pour y intégrer les métadonnées de l'adaptateur et la télémétrie matérielle.",
|
|
65
|
-
"it": "#### 🚀 Funzioni\n\n- **OP & Efficiency Calculator:** Introdotto un motore completo di calcolo del COP per monitorare l'efficienza della pompa di calore. \n- **upporto Smart Meter esterno:** Gli utenti possono ora scegliere di utilizzare stime interne Luxtronik o collegare sensori esterni ad alta precisione (ad esempio, contatori di calore Shelly 3EM o M-Bus) tramite IOBroker Object ID. \n- **etriche live granulari:** L'adattatore ora analizza dinamicamente lo stato operativo attivo per dividere e calcolare i COP giornalieri per «Totale», «Riscaldamento» e «Acqua calda». \n- **ersistent Time Rollover:** Implementato un robusto sistema «snapshot» con contatori virtuali. L'adattatore rileva automaticamente i rollover di giorno, mese e anno per mantenere i dati e garantire calcoli accurati a lungo termine, anche dopo riavvii o IOBroker. \n- **nterfaccia utente dedicata:** Aggiunta una nuova scheda «Efficienza/COP» per gestire facilmente le fonti di dati energetici e attivare il motore di calcolo. \n- **tato connessione e polling:** Aggiunto un nuovo datapoint `Info.lastUpdate`. Questo stato traccia sempre l'ora esatta dell'ultimo recupero dei dati, facilitando il monitoraggio dello stato e dei sondaggi dell'adattatore in visualizzazioni come VIS o Lovelace. \n\n#### 🛠 Bug fix e migliorie\n\n- **reazione albero oggetti:** Risolto un problema che impediva la creazione di bucket di dati nascosti per il calcolo del COP \n- **ormattazione timestamp:** Risolto un errore di mancata corrispondenza di tipo nel log di IOBroker formattando `info.lastUpdate` come stringa ISO anziché numerica. \n- **roprietà di stato e qualità del codice:** Risolti i rigidi avvisi TypeScript ed ESLint (annotazioni JSDoc mancanti, definizioni di oggetti in lettura/scrittura) nel nuovo COP manager. \n- **PI IOBroker modernizzata:** Ha sostituito le chiamate al metodo `setStateAsync` obsolete con il moderno standard `setState` basato su promesse nel motore di calcolo COP. \n- **rdinamento dell'interfaccia utente:** Le nuove schede di configurazione hanno un ordine logico e coerente tra le ricostruzioni. \n- **appatura interna:** Ha ristrutturato la cartella `info` per includere i metadati a livello di adattatore e la telemetria hardware. ",
|
|
66
|
-
"es": "#### 🚀 Funciones\n\n- **alculadora de COP y eficiencia:** Introdujo un completo motor de cálculo del COP (coeficiente de rendimiento) para rastrear la eficiencia de las bombas de calor. \n- **oporte externo de contadores inteligentes:** Los usuarios ahora pueden optar por usar estimaciones internas de Luxtronik o vincular sensores externos de alta precisión (por ejemplo, contadores de calor Shelly 3EM o M-Bus) a través de ID de objeto de ioBroker para el consumo de energía y la generación de energía térmica. \n- **étricas granulares:** El adaptador ahora analiza dinámicamente el estado operativo activo para dividir y calcular los valores de COP diarios de «total», «calefacción» y «agua caliente» de forma independiente. \n- **ersistent Time Rollovers:** Se implementó un sólido sistema de «instantáneas» con contadores virtuales absolutos. El adaptador detecta automáticamente las transferencias de días, meses y años para conservar los datos y garantizar cálculos precisos a largo plazo, incluso al reiniciar el adaptador o ioBroker. \n- **nterfaz de eficiencia dedicada:** Se ha añadido una nueva pestaña de configuración «Eficiencia/COP» para gestionar fácilmente las fuentes de datos de energía y cambiar el motor de cálculo. \n- **stado de conexión y sondeo:** Se ha añadido un nuevo punto de datos del sistema Info.LastUpdate Este estado rastrea continuamente la fecha exacta de la última recuperación exitosa de datos, lo que facilita la monitorización del estado del adaptador y la actividad de sondeo en visualizaciones como VIS o Lovelace. \n\n#### 🛠 Corrección de errores y mejoras\n\n- **reación del árbol de objetos:** Se solucionó un problema por el que no se creaban cubos de datos ocultos para el cálculo del COP porque faltaban los directorios principales. \n- **ormato de marca de hora:** Se resolvió un error estricto de discordancia de tipos en el registro de IOBroker al formatear correctamente `info.LastUpdate` como cadena ISO en lugar de marca de hora numérica. \n- **ropiedades del estado y calidad del código:** Se han resuelto las advertencias estrictas de TypeScript y ESLint (faltan anotaciones de JSDoc, definiciones de objetos de lectura/escritura) en el nuevo gestor de COP. \n- **PI de IOBroker modernizada:** Se sustituyeron las llamadas al método `setStateAsync` obsoletas por el moderno estándar `setState` basado en promesas en el motor de cálculo de COP. \n- **lasificación de la interfaz de usuario:** Se aseguró de que las pestañas de configuración recién generadas mantengan un orden lógico y coherente en las recompilaciones \n- **apeo interno:** Reestructuró el mapeo de carpetas «info» para incluir sin problemas los metadatos del adaptador y la telemetría del hardware. ",
|
|
67
|
-
"pl": "#### 🚀 Funkcje\n\n- **alkulator COP i wydajności:** Wprowadzono kompleksowy silnik obliczeniowy COP (współczynnik wydajności) do śledzenia wydajności pompy ciepła. \n- **bsługa zewnętrznych inteligentnych liczników:** Użytkownicy mogą teraz wybrać użycie wewnętrznych szacunków Luxtronik lub połączyć precyzyjne czujniki zewnętrzne (np. ciepłomierze Shelly 3EM lub M-Bus) za pomocą identyfikatorów obiektów ioBroker do zużycia energii i wytwarzania energii cieplnej. \n- **ranular Live Metrics:** Adapter teraz dynamicznie analizuje aktywny stan pracy, aby niezależnie podzielić i obliczyć bieżące dzienne wartości COP dla „Całkowita”, „Ogrzewanie” i „Gorąca woda”. \n- **rwałe przewracania czasu:** Zaimplementowano solidny system „migawki” z absolutnymi wirtualnymi licznikami. Adapter automatycznie wykrywa zmiany w dniu, miesiącu i roku, aby zachować dane i zagwarantować dokładne obliczenia długoterminowe, nawet podczas ponownego uruchamiania adaptera lub ponownego uruchamiania systemu iOBroker. \n- **edykowany interfejs efektywności:** Dodano nową zakładkę konfiguracji „Efektywność/COP”, aby łatwo zarządzać źródłami danych energii i przełączać silnik obliczeniowy. \n- **tatus połączenia i głosowania:** Dodano nowy punkt danych systemowych `Info.lastUpdate`. Ten stan stale śledzi dokładny znacznik czasu ostatniego pomyślnego pobierania danych, co ułatwia monitorowanie stanu adaptera i aktywności ankietowania w wizualizacjach, takich jak VIS lub Lovelace. \n\n#### 🛠 Poprawki błędów i ulepszenia\n\n- **worzenie drzewa obiektów:** Naprawiono błąd, który powodował, że ukryte wiadra danych dla obliczeń COP nie były tworzone, ponieważ brakowało katalogów nadrzędnych. \n- **ormatowanie znacznika czasowego:** Rozwiązano błąd ścisłego niedopasowania typu w dzienniku ioBroker poprzez poprawne sformatowanie `info.lastUpdate` jako ciąg znaku ISO zamiast numerycznego znacznika czasowego. \n- **łaściwości stanu i jakość kodu:** Rozwiązano ścisłe ostrzeżenia TypeScript i eSlint (brak adnotacji JSDoc, brakujące definicje obiektów odczytu/zapisu) w nowym menedżerze COP. \n- **modernizowany interfejs API ioBroker:** Zastąpiono przestarzałe wywołania metody `setStateSync` nowoczesnym, opartym na obietnicach standardem `setState` w całym silniku obliczeniowym COP. \n- **ortowanie interfejsu użytkownika konfiguracji:** Zapewniono, że nowo wygenerowane karty konfiguracji zachowują logiczną i spójną kolejność podczas przebudowy. \n- **apowanie wewnętrzne:** Zmieniono strukturę mapowania folderów `info`, aby pomieścić metadane na poziomie adaptera wraz ze sprzętową telemetrią. ",
|
|
68
|
-
"uk": "#### 🚀 Особливості\n\n- **алькулятор COP та ефективності:** Введено комплексний розрахунковий двигун COP (коефіцієнт продуктивності) для відстеження ефективності теплового насоса. \n- **ідтримка зовнішнього розумного лічильника:** Тепер користувачі можуть використовувати внутрішні оцінки Luxtronik або зв'язати високоточні зовнішні датчики (наприклад, лічильники тепла Shelly 3EM або M-Bus) через ідентифікатори об'єктів IObroker для споживання енергії та генерації теплової енергії. \n- **ранульовані показники в реальному часі:** Тепер адаптер динамічно аналізує активний робочий стан, щоб розділити та обчислити щоденні значення COP в реальному часі для «Total», «Heating» та «Hot Water» незалежно. \n- **остійні перекиди часу:** Реалізована надійна система «знімків» з абсолютними віртуальними лічильниками. Адаптер автоматично визначає переломи дня, місяця та року, щоб зберегти дані та гарантувати точні довгострокові розрахунки навіть під час перезапуску адаптера або перезавантаження IObroker. \n- **пеціальний інтерфейс ефективності:** Додано нову вкладку конфігурації «Ефективність/ COP» для легкого управління джерелами даних про енергію та перемикання обчислювального механізму. \n- **татус підключення та опитування:** Додано нову системну точку даних `Info.lastUpdate`. Цей стан безперервно відстежує точну мітку часу останнього успішного пошуку даних, що полегшує моніторинг стану адаптера та активності опитування у візуалізаціях, таких як VIS або Lovelace. \n\n#### 🛠 Виправлення помилок та вдосконалення\n\n- **творення дерева об'єктів:** Виправлена проблема, коли приховані відра даних для обчислення COP не створювалися, оскільки батьківські каталоги відсутні. \n- **орматування міток часу:** Вирішено сувору помилку невідповідності типів у журналі IObroker шляхом правильного форматування `Info.lastUpdate` як рядок ISO замість числової мітки часу. \n- **ластивості стану та якість коду:** Вирішено суворі попередження TypeScript та ESLint (відсутні анотації JSDoc, відсутні визначення об'єктів читання/запису) у новому менеджері COP. \n- **одернізований API IObroker:** Замінено застарілі виклики методу `SetStateAsync` сучасним стандартом `SetState`, заснованим на обіцянках, у системі обчислення COP. \n- **ортування інтерфейсу конфігурації:** Забезпечено, що нещодавно створені вкладки конфігурації підтримують логічний та послідовний порядок у перебудовах. \n- **нутрішнє відображення:** Реструктуризовано відображення папок `info` для чистого розміщення метаданих рівня адаптера поряд із апаратною телеметрією. ",
|
|
69
|
-
"zh-cn": "#### 🚀 功能\n\n-**COP 和效率计算器:** 引入了全面的 COP(性能系数)计算引擎来跟踪热泵效率。\n-**外部智能电表支持:**用户现在可以选择使用Luxtronik内部估算值或通过IOBroker对象ID连接高精度外部传感器(例如Shelly 3EM或M-Bus热量表),用于功耗和热能发电。\n-**精细实时指标:**适配器现在可以动态分析活动运行状态,以单独拆分和计算 “总计”、“供热” 和 “热水” 的每日实时COP值。\n-**持续时间翻转:**使用绝对虚拟计数器实现了强大的 “快照” 系统。即使在适配器重启或 IOBroker 重启期间,适配器也会自动检测日、月和年的滚动以保存数据并保证长期计算的准确性。\n-**专用效率用户界面:**添加了新的 “效率/COP” 配置选项卡,可轻松管理能源数据源和切换计算引擎。\n-**连接和轮询状态:** 添加了新的系统数据点 `info.lastUpdate`。这种状态会持续跟踪上次成功检索数据的确切时间戳,从而可以轻松地在 VIS 或 Lovelace 等可视化中监控适配器的运行状况和轮询活动。\n\n#### 🛠 错误修复和增强\n\n-**创建对象树:**修复了由于缺少父目录而未创建用于 COP 计算的隐藏数据桶的问题。\n-**时间戳格式:**通过将`info.lastUpdate`正确格式化为ISO字符串而不是数字时间戳,解决了IOBroker日志中严重的类型不匹配错误。\n-**状态属性和代码质量:** 解决了新 COP 管理器中严格的 TypeScript 和 ESLint 警告(缺少 JSDoc 注释、缺少读/写对象定义)。\n-**现代化的 ioBroker API:** 将整个 COP 计算引擎中过时的 “setStateAsync” 方法调用替换为基于承诺的现代 “setState” 标准。\n-**Config UI 排序:** 确保新生成的配置选项卡在重建过程中保持逻辑一致的顺序。\n-**内部映射:**重组了 “info” 文件夹映射,以完全容纳适配器级元数据和硬件遥测。"
|
|
70
|
-
},
|
|
71
|
-
"0.16.1": {
|
|
72
|
-
"en": "#### 🚀 Features\n\n- **Enhanced UI Layout:** Improved the \"Datapoints\" settings tab layout to display up to 4 items side-by-side on larger screens for a better overview and improved usability.\n\n#### 🛠 Bugfixes & Enhancements\n\n- **State Cleanup Logic Fixed:** Resolved an issue where unchecked datapoints (e.g., Room Thermostats) were not removed from the ioBroker object tree. The `isStateEnabled` logic now correctly handles `undefined` config states for dynamically generated checkboxes.",
|
|
73
|
-
"de": "#### 🚀 Merkmale\n\n- **erbessertes UI-Layout:** Das Tab-Layout „Datenpunkte“ wurde verbessert, sodass bis zu 4 Elemente übersichtlicher und benutzerfreundlicher angezeigt werden. \n\n#### 🛠 Bugfixes & Verbesserungen\n\n- **tate Cleanup Logic behoben:** Ungeprüfte Datenpunkte (z. B. Raumthermostate) wurden nicht aus dem ioBroker-Objektbaum entfernt. Die `isStateEnabled`-Logik behandelt jetzt `undefinierte` Konfigurationsstatus für dynamisch generierte Checkboxen. ",
|
|
74
|
-
"ru": "#### 🚀 Функции\n\n- **лучшенная компоновка пользовательского интерфейса:** Улучшена компоновка вкладок настроек «Datapoints»: теперь на больших экранах можно отображать до 4 объектов рядом друг с другом для лучшего обзора и удобства использования. \n\n#### 🛠 Исправления ошибок и улучшения\n\n- **справлена логика очистки состояния:** Устранена проблема, из-за которой непроверенные точки данных (например, комнатные термостаты) не удалялись из дерева объектов IOBroker. Логика IsStateEnabled теперь корректно обрабатывает «неопределенное» состояние конфигурации динамически генерируемых флажков. ",
|
|
75
|
-
"pt": "#### 🚀 Recursos\n\n- **ayout de UI aprimorado:** O layout da guia “Pontos de dados” foi aprimorado para exibir até 4 itens lado a lado em telas maiores para melhor visão geral e usabilidade. \n\n#### 🛠 Correções e melhorias\n\n- **ógica de limpeza de estado corrigida:** Resolveu um problema que impedia a remoção de pontos de dados não verificados da árvore de objetos IOBroker. A lógica `isStateEnabled` agora trata corretamente os estados `undefined` para checkboxes gerados dinamicamente. ",
|
|
76
|
-
"nl": "#### 🚀 Kenmerken\n\n- **erbeterde UI-indeling:** Verbeterde tabindeling met instellingen voor „Datapunten” om tot 4 items naast elkaar weer te geven op grotere schermen voor een beter overzicht en verbeterde bruikbaarheid. \n\n#### 🛠 Oplossingen en verbeteringen\n\n- **tate Cleanup Logic opgelost:** Er is een probleem opgelost waarbij niet-aangevinkte datapunten (bijvoorbeeld kamerthermostaten) niet werden verwijderd uit de objectenstructuur van IOBroker. De `IsStateEnabled` logica verwerkt nu correct `ongedefinieerde` configuratiestatussen voor dynamisch gegenereerde selectievakjes. ",
|
|
77
|
-
"fr": "#### 🚀 Fonctions\n\n- **Interface utilisateur améliorée :** La disposition de l'onglet « Points de données » a été améliorée pour afficher jusqu'à 4 éléments côte à côte sur des écrans plus grands.\n\n#### 🛠 Corrections et améliorations\n\n- **State Cleanup Logic a été corrigée :** Problème résolu : les points de données non cochés (thermostats d'ambiance, par exemple) n'étaient pas supprimés. La logique « IsStateEnabled » gère désormais correctement les états de configuration « indéfinis » des cases à cocher.",
|
|
78
|
-
"it": "#### 🚀 Funzioni\n\n- **ayout dell'interfaccia utente migliorato:** La scheda «Datapoints» mostra fino a 4 elementi fianco a fianco su schermi più grandi per una migliore panoramica e usabilità. \n\n#### 🛠 Bug fix e migliorie\n\n- **tate Cleanup Logic Fixed:** Risolto un problema che impediva la rimozione dei datapoint non controllati dall'albero degli oggetti IOBroker. La logica `isStateEnabled` ora gestisce correttamente gli stati di configurazione indefiniti per le caselle dinamiche. ",
|
|
79
|
-
"es": "#### 🚀 Funciones\n\n- **iseño de interfaz de usuario mejorado:** Se ha mejorado el diseño de las pestañas de «Puntos de datos» para mostrar hasta 4 elementos uno al lado del otro en pantallas grandes, lo que mejora la usabilidad. \n\n#### 🛠 Corrección de errores y mejoras\n\n- **e corrigió la lógica de limpieza del estado:** Se resolvió un problema por el que los puntos de datos no marcados (p. ej., los termostatos de sala) no se eliminaban del árbol de objetos de ioBroker. La lógica `isStateEnabled` gestiona ahora correctamente los estados de configuración «indefinidos» de las casillas generadas dinámicamente. ",
|
|
80
|
-
"pl": "#### 🚀 Funkcje\n\n- **lepszony układ interfejsu użytkownika:** Ulepszono układ zakładki ustawień „Punkty danych”, aby wyświetlać do 4 elementów obok siebie na większych ekranach, aby uzyskać lepszy przegląd i lepszą użyteczność. \n\n#### 🛠 Poprawki błędów i ulepszenia\n\n- **aprawiono logikę czyszczenia stanu:** Rozwiązano problem polegający na tym, że niezaznaczone punkty danych (np. termostaty pokojowe) nie zostały usunięte z drzewa obiektów ioBroker. Logika `IsStateEnabled` poprawnie obsługuje stany konfiguracji `undefinied` dla dynamicznie generowanych pól wyboru. ",
|
|
81
|
-
"uk": "#### 🚀 Особливості\n\n- **Розширений макет інтерфейсу користувача:** Покращено макет вкладки налаштувань «Datappoints» для відображення до 4 елементів поруч на великих екранах для кращого огляду та покращення зручності використання. \n\n#### 🛠 Виправлення помилок та вдосконалення\n\n- **огіка очищення стану виправлена:** Вирішено проблему, через яку неперевірені точки даних (наприклад, кімнатні термостати) не були видалені з дерева об'єктів IObroker. Логіка `IsStateEnabled` тепер правильно обробляє стани конфігурації `undefined` для динамічно створених прапорців. ",
|
|
82
|
-
"zh-cn": "#### 🚀 功能\n\n-**增强的用户界面布局:**改进了 “DataPoints” 设置选项卡布局,可在较大的屏幕上并排显示多达 4 个项目,以提供更好的概览和更高的可用性。\n\n#### 🛠 错误修复和增强\n\n-**状态清理逻辑已修复:** 解决了未选中的数据点(例如房间恒温器)未从 IOBroker 对象树中移除的问题。现在,`isStateEnabled` 逻辑可以正确处理动态生成的复选框的 “未定义” 配置状态。"
|
|
83
|
-
},
|
|
84
|
-
"0.16.0": {
|
|
85
|
-
"en": "#### 🚀 Features\n\n- **Dynamic Admin UI Generation:** The \"Datapoints / Objects\" configuration tab in the adapter settings is now fully auto-generated during the build process (`prebuild`). This ensures the UI is always 100% in sync with the underlying TypeScript state mappings.\n- **Category Master Switches:** Added master toggle switches to the adapter settings. Users can now enable or disable entire hardware categories (e.g., Solar, Cooling, Ventilation) with a single click. This keeps the ioBroker object tree clean and significantly reduces unnecessary polling for unused features.\n- **Dynamic Protection for Critical States:** System-critical datapoints are now protected dynamically via a `required: true` flag in the codebase. They are permanently locked (grayed out) in the UI and cannot be accidentally deleted or disabled by the user or the visibility filter.\n\n#### 🛠 Bugfixes & Enhancements\n\n- **Cycle Optimization Logic (Hot Water):** Fixed a logic flaw where the adapter erroneously applied an artificial hot water target temperature increase while the heat pump was already actively running a hot water cycle. The trigger is now strictly limited to the end of regular heating cycles.\n- **Build Process Optimized:** Integrated the UI generation script (`generateConfig.ts`) seamlessly into the NPM `prebuild` lifecycle, automatically patching the `jsonConfig.json` before typescript compilation.",
|
|
86
|
-
"de": "#### 🚀 Merkmale\n\n- **ynamische Admin-UI-Generierung:** Der Tab „Datenpunkte/Objekte“ in den Adaptereinstellungen wird jetzt vollautomatisch generiert (`Prebuild`). Dadurch ist die UI immer zu 100% mit den TypeScript-State-Mappings synchron. \n- **ategorie Hauptschalter:** Zu den Adaptereinstellungen hinzugefügt. Nutzer können nun ganze Gerätekategorien (z. B. Solar, Kühlung, Lüftung) mit einem Klick ein- oder ausschalten. Das hält den ioBroker-Objektbaum sauber und vermeidet unnötige Abfragen unbenutzter Funktionen. \n- **ynamischer Schutz für kritische Zustände:** Systemkritische Datenpunkte werden jetzt dynamisch durch ein `required: true`-Flag in der Codebasis geschützt. Sie sind in der UI dauerhaft gesperrt und können vom Benutzer oder Sichtfilter nicht gelöscht oder deaktiviert werden. \n\n#### 🛠 Bugfixes & Verbesserungen\n\n- **Logik zur Zyklusoptimierung (Warmwasser) :** Es wurde ein Logikfehler behoben, bei dem der Adapter fälschlicherweise die Solltemperatur künstlich erhöhte, während die Wärmepumpe aktiv war. Der Auslöser ist nun auf das Ende regulärer Heizzyklen begrenzt.\n- **uild Process Optimized:** Integrierte das UI-Generierungsskript (`generateConfig.ts`) nahtlos in den NPM-Prebuild-Lifecycle und patcht automatisch `JSONConfig.json` vor der Typoskriptkompilierung. ",
|
|
87
|
-
"ru": "#### 🚀 Функции\n\n- **инамическая генерация пользовательского интерфейса администратора:** Вкладка конфигурации «Точки данных/объекты» в настройках адаптера теперь полностью генерируется автоматически в процессе сборки (`prebuild`). Это гарантирует, что пользовательский интерфейс всегда на 100% синхронизирован с базовыми сопоставлениями состояний TypeScript. \n- **сновные переключатели категории:** В настройки адаптера добавлены главные переключатели. Теперь пользователи могут включать или отключать целые категории оборудования (например, солнечные батареи, системы охлаждения, вентиляции) одним щелчком мыши. Это позволяет сохранить дерево объектов IOBroker в чистоте и значительно сократить количество ненужных запросов на наличие неиспользуемых функций. \n- **инамическая защита критических состояний:** Критические точки данных системы теперь динамически защищены с помощью флага «required: true» в кодовой базе. Они навсегда заблокированы (выделены серым цветом) в пользовательском интерфейсе и не могут быть случайно удалены или отключены пользователем или фильтром видимости. \n\n#### 🛠 Исправления ошибок и улучшения\n\n- **Логика оптимизации цикла (горячая вода) :** Исправлена логическая ошибка, из-за которой адаптер ошибочно искусственно повышал целевую температуру горячей воды, когда тепловой насос уже активно запускал цикл горячей воды. Теперь срабатывание триггера строго ограничено окончанием обычных циклов нагрева.\n- **птимизирован процесс сборки:** Скрипт генерации пользовательского интерфейса (`generateConfig.ts`) органично интегрирован в жизненный цикл NPM `prebuild`, автоматически исправляя `jsonConfig.json` перед компиляцией машинописного текста. ",
|
|
88
|
-
"pt": "#### 🚀 Recursos\n\n- **eração dinâmica de UI de administrador:** A guia “Datapoints/Objetos” no adaptador agora é gerada automaticamente durante o processo de compilação (`prebuild`). Isso garante que a UI esteja 100 %s incronizada com os mapeamentos de estado do TypeScript. \n- **ategoria:** Adicionamos chaves mestras às configurações do adaptador. Agora, você pode ativar ou desativar categorias inteiras de hardware (solar, refrigeração) com um clique. Isso mantém a árvore de objetos do IOBroker limpa e reduz a pesquisa desnecessária de recursos não usados. \n- **roteção dinâmica:** Os pontos de dados críticos do sistema agora são protegidos dinamicamente por um sinalizador `required: true` na base de código. Eles ficam permanentemente acinzentados na UI e não podem ser excluídos ou desativados pelo usuário ou pelo filtro de visibilidade. \n\n#### 🛠 Correções e melhorias\n\n- **Lógica de otimização do ciclo (água quente) :** Corrigida uma falha lógica em que o adaptador aplicava erroneamente um aumento artificial de temperatura alvo de água quente enquanto a bomba de calor já estava ativa. O gatilho agora é limitado ao fim dos ciclos normais de aquecimento.\n- **rocesso de compilação otimizado:** Integrou o script de geração de UI (`generateConfig.ts`) ao ciclo de vida `prebuild` do NPM, corrigindo automaticamente o `JSONConfig.json` antes da compilação. ",
|
|
89
|
-
"nl": "#### 🚀 Kenmerken\n\n- **ynamic Admin UI Generation:** Het configuratietabblad „Datapoints/Objects” in de adapterinstellingen wordt nu volledig automatisch gegenereerd tijdens het bouwproces (`prebuild`). Dit zorgt ervoor dat de gebruikersinterface altijd 100 %s ynchroon loopt met de onderliggende TypeScript-toestandstoewijzingen. \n- **ategorie Hoofdschakelaars:** Hoofdschakelaars toegevoegd aan de adapterinstellingen. Gebruikers kunnen nu met één klik hele hardwarecategorieën (bijv. zonne-energie, koeling, ventilatie) in- of uitschakelen. Zo blijft de objectenstructuur van ioBroker schoon en wordt het aantal onnodige peilingen voor ongebruikte functies aanzienlijk beperkt. \n- **ynamische beveiliging voor kritieke toestanden:** Systeemkritieke datapunten worden nu dynamisch beschermd via een `required: true` vlag in de codebase. Ze zijn permanent vergrendeld (grijs weergegeven) in de gebruikersinterface en kunnen niet per ongeluk worden verwijderd of uitgeschakeld door de gebruiker of het zichtbaarheidsfilter. \n\n#### 🛠 Oplossingen en verbeteringen\n\n- **Logica voor cyclusoptimalisatie (warm water) :** Er is een logische fout opgelost waarbij de adapter ten onrechte een kunstmatige verhoging van de doeltemperatuur voor warm water toepaste terwijl de warmtepomp al actief bezig was met een warmwatercyclus. De trigger is nu strikt beperkt tot het einde van de normale verwarmingscycli.\n- **eoptimaliseerd bouwproces:** Integreerde het UI-generatiescript (`GenerateConfig.ts`) naadloos in de NPM-levenscyclus van de `prebuild`, waarbij het `JSONConfig.json` automatisch werd gepatcht voordat het typoscript werd gecompileerd. ",
|
|
90
|
-
"fr": "#### 🚀 Fonctions\n\n- **Génération d'une interface d'administration dynamique :** L'onglet de configuration « Datapoints/Objects » des paramètres de l'adaptateur est désormais généré automatiquement (« prebuild »). L'interface utilisateur est ainsi synchronisée à 100 % avec les mappages d'état TypeScript.\n- **Catégorie Interrupteurs principaux :** Ajout de commutateurs principaux aux réglages de l'adaptateur. Les utilisateurs peuvent désormais activer ou désactiver des catégories de matériel (solaire, climatisation, etc.) en un clic. Cela permet de nettoyer l'arborescence d'objets d'IOBroker et de réduire les requêtes inutiles.\n- **Protection dynamique des états critiques :** Les points de données critiques du système sont désormais protégés dynamiquement via un indicateur « required : true ». Ils sont définitivement grisés dans l'interface utilisateur et ne peuvent être supprimés ou désactivés par erreur ni par le filtre de visibilité.\n\n#### 🛠 Corrections et améliorations\n\n- **Logique d'optimisation du cycle (eau chaude) :** Correction d'un défaut logique qui empêchait l'adaptateur d'augmenter artificiellement la température cible de l'eau chaude alors que la pompe à chaleur était déjà active. Le déclencheur est désormais limité à la fin des cycles de chauffage normaux.\n- **Processus de construction optimisé :** A intégré le script de génération d'interface utilisateur (`GenerateConfig.ts`) au cycle de vie `prebuild` de NPM, en patchant automatiquement le `JSONConfig.JSON` avant la compilation dactylographiée.",
|
|
91
|
-
"it": "#### 🚀 Funzioni\n\n- **enerazione dinamica dell'interfaccia utente di amministrazione:** La scheda «Datapoints/Objects» nelle impostazioni dell'adattatore è ora generata automaticamente. Ciò assicura che l'UI sia sempre sincronizzata al 100% con le mappature di stato TypeScript. \n- **witch master di categoria:** Aggiunti master alle impostazioni dell'adattatore. Gli utenti possono ora attivare o disattivare intere categorie hardware (ad es. solare) con un solo clic. Ciò mantiene pulito l'albero degli oggetti IOBroker e riduce notevolmente i polling inutili. \n- **rotezione dinamica per stati critici:** I punti dati critici del sistema sono ora protetti dinamicamente tramite un flag `required: true` nel codebase. Sono permanentemente bloccati nell'interfaccia utente e non possono essere eliminati o disattivati dall'utente o dal filtro. \n\n#### 🛠 Bug fix e migliorie\n\n- **Logica di ottimizzazione del ciclo (acqua calda) :** Risolto un difetto logico in cui l'adattatore aumentava erroneamente la temperatura nominale dell'acqua calda mentre la pompa di calore era già attiva. Il trigger è ora limitato alla fine dei normali cicli di riscaldamento.\n- **rocesso di build ottimizzato:** Ha integrato lo script di generazione dell'interfaccia utente (`generateConfig.ts`) nel ciclo di vita `prebuild` di NPM, patchando automaticamente `JSONConfig.json` ",
|
|
92
|
-
"es": "#### 🚀 Funciones\n\n- **eneración de interfaz de usuario de administración dinámica:** La pestaña de configuración «puntos de datos/objetos» del adaptador ahora se genera automáticamente durante el proceso de creación («precompilación»). Esto garantiza que la UI esté siempre sincronizada al 100% con los mapas de estado de TypeScript. \n- **ategoría conmutadores maestros:** Se han añadido conmutadores maestros a la configuración del adaptador. Los usuarios ahora pueden activar o desactivar todas las categorías de hardware (solar, refrigeración, ventilación) con un solo clic. Esto mantiene limpio el árbol de objetos de ioBroker y reduce considerablemente el sondeo de funciones no utilizadas. \n- **rotección dinámica para estados críticos:** Los puntos de datos críticos del sistema ahora se protegen dinámicamente con un indicador «required: true» en la base de código. Están bloqueados permanentemente en la interfaz de usuario y el usuario o el filtro de visibilidad no pueden eliminarlos ni deshabilitarlos accidentalmente. \n\n#### 🛠 Corrección de errores y mejoras\n\n- **Lógica de optimización del ciclo (agua caliente) :** Se ha corregido un error lógico en el que el adaptador aplicaba por error un aumento de temperatura objetivo del agua caliente artificial cuando la bomba de calor ya estaba en marcha. El gatillo ahora se limita estrictamente al final de los ciclos de calefacción.\n- **roceso de creación optimizado:** Integró el script de generación de la interfaz de usuario (`GenerateConfig.ts) sin problemas en el ciclo de vida de «precompilación» de NPM, parcheando automáticamente el `JSONConfig.json` antes de compilar el script mecanografiado. ",
|
|
93
|
-
"pl": "#### 🚀 Funkcje\n\n- **ynamiczne generowanie interfejsu administratora:** Karta konfiguracji „Punkty danych/Obiekty” w ustawieniach adaptera jest teraz w pełni automatycznie generowana podczas procesu kompilacji (`prebuild`). Dzięki temu interfejs użytkownika jest zawsze w 100% zsynchronizowany z podstawowymi mapowaniami stanu TypeScript. \n- **rzełączniki główne kategorii:** Dodano główne przełączniki do ustawień adaptera. Użytkownicy mogą teraz włączyć lub wyłączyć całe kategorie sprzętu (np. Solar, Chłodzenie, Wentylacja) jednym kliknięciem. Dzięki temu drzewo obiektów ioBroker jest czyste i znacznie ogranicza niepotrzebne wyszukiwanie nieużywanych funkcji. \n- **ynamiczna ochrona stanów krytycznych:** Krytyczne dla systemu punkty danych są teraz chronione dynamicznie za pomocą flagi „required: true” w bazie kodu. Są one trwale zablokowane (wyszarzone) w interfejsie użytkownika i nie mogą być przypadkowo usunięte ani wyłączone przez użytkownika lub filtr widoczności. \n\n#### 🛠 Poprawki błędów i ulepszenia\n\n- **Logika optymalizacji cyklu (gorąca woda) :** Naprawiono błąd logiczny polegający na tym, że adapter błędnie zastosował sztuczny wzrost temperatury docelowej ciepłej wody, gdy pompa ciepła już aktywnie uruchamiała cykl ciepłej wody. Wyzwalacz jest teraz ściśle ograniczony do końca regularnych cykli grzewczych.\n- **optymalizowany proces kompilacji:** Bezproblemowo zintegrowany skrypt generowania interfejsu użytkownika („GenerateConfig.ts”) z cyklem życia NPM `prebuild`, automatycznie poprawiając plik `JSONConfig.json` przed kompilacją typescript. ",
|
|
94
|
-
"uk": "#### 🚀 Особливості\n\n- **инамічне генерування інтерфейсу адміністратора:** Вкладка конфігурації «Datappoints/Objects» в налаштуваннях адаптера тепер повністю автоматично генерується під час процесу збирання (`prebuild`). Це гарантує, що інтерфейс користувача завжди на 100% синхронізований з основними відображеннями станів TypeScript. \n- **атегорія Головних перемикачів:** Додані головні тумблери до налаштувань адаптера. Тепер користувачі можуть увімкнути або вимкнути цілі категорії обладнання (наприклад, сонячне світло, охолодження, вентиляція) одним клацанням миші. Це зберігає дерево об'єктів IObroker чистим і значно зменшує непотрібне опитування для невикористаних функцій. \n- **инамічний захист для критичних станів:** Системні критичні точки даних тепер захищені динамічно за допомогою прапорця `required: true` у кодовій базі. Вони назавжди заблоковані (сірі) в інтерфейсі користувача і не можуть бути випадково видалені або вимкнені користувачем або фільтром видимості. \n\n#### 🛠 Виправлення помилок та вдосконалення\n\n- **Логіка оптимізації циклу (гаряча вода) :** Виправлено логічний недолік, коли адаптер помилково застосував штучне підвищення цільової температури гарячої води, поки тепловий насос вже активно працював цикл гарячої води. Тригер тепер строго обмежений закінченням регулярних циклів нагріву.\n- **роцес збирання оптимізовано:** Безперешкодно інтегрував скрипт генерації інтерфейсу користувача (`GenerateConfig.ts`) у життєвий цикл NPM `prebuild`, автоматично виправляючи `JsonConfig.json` перед компіляцією TypeScript. ",
|
|
95
|
-
"zh-cn": "#### 🚀 功能\n\n-**动态管理用户界面生成:** 适配器设置中的 “数据点/对象” 配置选项卡现在在构建过程中完全自动生成(`prebuild`)。这样可以确保用户界面始终与底层的TypeScript状态映射100%同步。\n-**类别主开关:**在适配器设置中添加了主拨动开关。用户现在只需单击一下即可启用或禁用整个硬件类别(例如太阳能、制冷、通风)。这样可以保持 IOBroker 对象树干净,并显著减少对未使用功能的不必要轮询。\n-**关键状态动态保护:** 系统关键数据点现在通过代码库中的 “required: true” 标志进行动态保护。它们在用户界面中被永久锁定(显示为灰色),不会被用户或可见性过滤器意外删除或禁用。\n\n#### 🛠 错误修复和增强\n\n-**循环优化逻辑(热水):** 修复了一个逻辑缺陷,即在热泵已经在积极运行热水循环时,适配器错误地应用了人造热水目标温度升高。现在,触发器严格限于常规加热周期的结束。\n-**构建过程优化:** 将用户界面生成脚本(`generateConfig.ts`)无缝集成到NPM `预编译`生命周期中,在打字稿编译之前自动修补 `jsonConfig.json`。"
|
|
96
83
|
}
|
|
97
84
|
},
|
|
98
85
|
"titleLang": {
|
|
@@ -156,7 +143,7 @@
|
|
|
156
143
|
},
|
|
157
144
|
"dependencies": [
|
|
158
145
|
{
|
|
159
|
-
"js-controller": ">=
|
|
146
|
+
"js-controller": ">=7.0.7"
|
|
160
147
|
}
|
|
161
148
|
],
|
|
162
149
|
"globalDependencies": [
|