iobroker.luxtronik2-controller 0.23.0 → 0.23.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 +13 -15
- package/build/copManager.js +103 -93
- package/build/copManager.js.map +2 -2
- package/io-package.json +27 -27
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -96,6 +96,19 @@ You might see red error messages in the installation log related to `node-gyp`,
|
|
|
96
96
|
//### **WORK IN PROGRESS**
|
|
97
97
|
|
|
98
98
|
## Changelog
|
|
99
|
+
### 0.23.2 (2026-11-07)
|
|
100
|
+
|
|
101
|
+
- **COP & Efficiency Calculation (`copManager.ts`):**
|
|
102
|
+
- **Isolated Counter Tracking:** Introduced dedicated reference states for Total, Heating, and Hot Water counters (`last_raw_power_*` and `last_raw_thermal_*`). Each counter is now compared strictly against its own previous value, completely preventing cross-mode "ghost deltas" and astronomical COP spikes during cycle transitions.
|
|
103
|
+
- **Automatic Total-Delta Fallback:** Added seamless fallback detection for controllers with firmware bugs (e.g., Novelan LAV) where mode-specific counters like `energy_warmwater` remain permanently at `0`. If a specific counter reports a delta of `0` during an active cycle, the adapter automatically uses the live delta of the corresponding total counter (`energy_total` / `thermalenergy_total`) without requiring manual configuration workarounds.
|
|
104
|
+
|
|
105
|
+
### 0.23.1 (2026-11-07)
|
|
106
|
+
|
|
107
|
+
- **COP & Efficiency Calculation Fix (`copManager.ts`):**
|
|
108
|
+
- **Fixed Astronomical COP Values:** Resolved a critical bug where the internal calculation logic switched between specific and total energy counters, causing massive "ghost deltas" and resulting in astronomical COP values (e.g., > 1000).
|
|
109
|
+
- **Restored Robust Routing:** The adapter now strictly and safely relies on the continuous total counters (`energy_total` and `thermalenergy_total`). It calculates the delta over the polling interval and dynamically routes it into the Heating or Hot Water buckets based on the active operating state.
|
|
110
|
+
- _Note:_ Users facing the hardware bug where the heat pump does not track DHW power internally should select "External Object ID" in the adapter settings and link their `energy_total` datapoint as a workaround.
|
|
111
|
+
|
|
99
112
|
### 0.23.0 (2026-11-07)
|
|
100
113
|
|
|
101
114
|
**🐛 Bugfixes & Tweaks**
|
|
@@ -121,21 +134,6 @@ You might see red error messages in the installation log related to `node-gyp`,
|
|
|
121
134
|
- **Zero-Drift Baseline Calculation:** Rewrote the PV boost baseline logic in `pvManager.ts`. The adapter no longer reads live datapoint states to calculate the boost, but strictly enforces the configured baseline values (`sync_warmwater_target_temperature` and `0K` for heating). This permanently resolves the "snowball effect" where the hot water target could incrementally drift up to the 70 °C safety limit.
|
|
122
135
|
- **Cycle Coupling Handshake:** Enhanced the intelligent cycle optimization (`main.ts`) during active PV surplus. At the end of a heating cycle, the adapter now seamlessly couples a hot water cycle and intelligently enforces the PV boost target (e.g., 60 °C) to maximize solar self-consumption, without interfering with the strict baseline logic.
|
|
123
136
|
|
|
124
|
-
### 0.22.6 (2026-11-05)
|
|
125
|
-
|
|
126
|
-
**🐛 Bugfixes**
|
|
127
|
-
|
|
128
|
-
- **Cycle Optimization & Hardware Sync (`main.ts`):**
|
|
129
|
-
- **Pre-Heating & Heating Limit Type Fix:** Fixed strict type comparison bugs (`boolean` vs. `number`) when evaluating `heatingLimit` and `VD1out` (`vd1`). Previously, boolean state values caused `isHeatingAllowedByLimit` and `vd1` to evaluate to `false`, which blocked pre-heating before hot water generation (raising `heating_curve_parallel_offset` to 35 °C), prevented the 10-minute base point reset, and skipped HUP voltage optimization.
|
|
130
|
-
- **Raw Data Fallbacks (`rawValues` / `rawParams`):** Added direct fallbacks to raw heat pump telemetry and parameter arrays in `runOptimizationSchedule` so cycle optimization, HUP control, and heating limit checks remain fully functional even if individual datapoints (`thresholdHeatingLimit`, `Mitteltemperatur`, `heatingLimit`, `VD1out`, etc.) are disabled in the ioBroker object tree.
|
|
131
|
-
- **Hardware Out-of-Sync Verification:** Enhanced `syncConfigValue` to verify target values against the live hardware parameter cache (`currentRawParams`), ensuring parameters are reliably written to the controller even if the local ioBroker state is disabled or out of sync with the heat pump.
|
|
132
|
-
|
|
133
|
-
### 0.22.5 (2026-11-01)
|
|
134
|
-
|
|
135
|
-
**🔧 Maintenance & Compatibility**
|
|
136
|
-
|
|
137
|
-
- **Repository Compliance:** Added missing multi-language translations (i18n) for all configuration dropdown menus (e.g. COP sources, PV modes) to meet strict ioBroker stable repository requirements.
|
|
138
|
-
|
|
139
137
|
## License
|
|
140
138
|
|
|
141
139
|
MIT License
|
package/build/copManager.js
CHANGED
|
@@ -39,123 +39,133 @@ async function processCopData(adapter, bzVal) {
|
|
|
39
39
|
}
|
|
40
40
|
try {
|
|
41
41
|
(0, import_logger.writeLog)(`COP Manager gestartet. Modus: ${bzVal}`, "debug");
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
const isExternalPower = config.cop_source_power === "external" && Boolean(config.cop_oid_power_total);
|
|
43
|
+
const isExternalThermal = config.cop_source_thermal === "external" && Boolean(config.cop_oid_thermal_total);
|
|
44
|
+
let currentPowerTotal = 0;
|
|
45
|
+
let currentPowerHeating = 0;
|
|
46
|
+
let currentPowerWater = 0;
|
|
47
|
+
if (isExternalPower) {
|
|
45
48
|
const state = await adapter.getForeignStateAsync(config.cop_oid_power_total);
|
|
46
49
|
if (state && typeof state.val === "number") {
|
|
47
|
-
|
|
48
|
-
currentPowerTotalFallback = state.val;
|
|
50
|
+
currentPowerTotal = state.val;
|
|
49
51
|
}
|
|
50
52
|
} else {
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
const [sTotal, sHeat, sWater] = await Promise.all([
|
|
54
|
+
adapter.getStateAsync((0, import_stateMapping.getDpPath)("energy_total")),
|
|
55
|
+
adapter.getStateAsync((0, import_stateMapping.getDpPath)("energy_heating")),
|
|
56
|
+
adapter.getStateAsync((0, import_stateMapping.getDpPath)("energy_warmwater"))
|
|
57
|
+
]);
|
|
58
|
+
if (sTotal && typeof sTotal.val === "number") {
|
|
59
|
+
currentPowerTotal = sTotal.val;
|
|
55
60
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
61
|
+
if (sHeat && typeof sHeat.val === "number") {
|
|
62
|
+
currentPowerHeating = sHeat.val;
|
|
63
|
+
}
|
|
64
|
+
if (sWater && typeof sWater.val === "number") {
|
|
65
|
+
currentPowerWater = sWater.val;
|
|
59
66
|
}
|
|
60
67
|
}
|
|
61
|
-
let
|
|
62
|
-
|
|
68
|
+
let currentThermalTotal = 0;
|
|
69
|
+
let currentThermalHeating = 0;
|
|
70
|
+
let currentThermalWater = 0;
|
|
71
|
+
if (isExternalThermal) {
|
|
63
72
|
const state = await adapter.getForeignStateAsync(config.cop_oid_thermal_total);
|
|
64
73
|
if (state && typeof state.val === "number") {
|
|
65
|
-
|
|
74
|
+
currentThermalTotal = state.val;
|
|
66
75
|
}
|
|
67
76
|
} else {
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
77
|
+
const [sTotal, sHeat, sWater] = await Promise.all([
|
|
78
|
+
adapter.getStateAsync((0, import_stateMapping.getDpPath)("thermalenergy_total")),
|
|
79
|
+
adapter.getStateAsync((0, import_stateMapping.getDpPath)("thermalenergy_heating")),
|
|
80
|
+
adapter.getStateAsync((0, import_stateMapping.getDpPath)("thermalenergy_warmwater"))
|
|
81
|
+
]);
|
|
82
|
+
if (sTotal && typeof sTotal.val === "number") {
|
|
83
|
+
currentThermalTotal = sTotal.val;
|
|
72
84
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
const rawPowerTotalId = "hidden.cop_buckets.last_raw_power_total_fallback";
|
|
76
|
-
const rawThermalId = "hidden.cop_buckets.last_raw_thermal";
|
|
77
|
-
if (!isInitialized) {
|
|
78
|
-
await ensureCopObject(adapter, rawPowerId, {
|
|
79
|
-
type: "state",
|
|
80
|
-
common: { name: "Last Raw Power", type: "number", role: "value", read: true, write: false },
|
|
81
|
-
native: {}
|
|
82
|
-
});
|
|
83
|
-
await ensureCopObject(adapter, rawPowerTotalId, {
|
|
84
|
-
type: "state",
|
|
85
|
-
common: {
|
|
86
|
-
name: "Last Raw Power Total Fallback",
|
|
87
|
-
type: "number",
|
|
88
|
-
role: "value",
|
|
89
|
-
read: true,
|
|
90
|
-
write: false
|
|
91
|
-
},
|
|
92
|
-
native: {}
|
|
93
|
-
});
|
|
94
|
-
await ensureCopObject(adapter, rawThermalId, {
|
|
95
|
-
type: "state",
|
|
96
|
-
common: { name: "Last Raw Thermal", type: "number", role: "value", read: true, write: false },
|
|
97
|
-
native: {}
|
|
98
|
-
});
|
|
99
|
-
const lastPowerStateInit = await adapter.getStateAsync(rawPowerId);
|
|
100
|
-
const lastPowerTotalStateInit = await adapter.getStateAsync(rawPowerTotalId);
|
|
101
|
-
const lastThermalStateInit = await adapter.getStateAsync(rawThermalId);
|
|
102
|
-
if (!lastPowerStateInit || lastPowerStateInit.val === null) {
|
|
103
|
-
await adapter.setState(rawPowerId, { val: currentPower, ack: true });
|
|
85
|
+
if (sHeat && typeof sHeat.val === "number") {
|
|
86
|
+
currentThermalHeating = sHeat.val;
|
|
104
87
|
}
|
|
105
|
-
if (
|
|
106
|
-
|
|
88
|
+
if (sWater && typeof sWater.val === "number") {
|
|
89
|
+
currentThermalWater = sWater.val;
|
|
107
90
|
}
|
|
108
|
-
|
|
109
|
-
|
|
91
|
+
}
|
|
92
|
+
const rawPowerTotalId = "hidden.cop_buckets.last_raw_power";
|
|
93
|
+
const rawPowerHeatId = "hidden.cop_buckets.last_raw_power_heating";
|
|
94
|
+
const rawPowerWaterId = "hidden.cop_buckets.last_raw_power_water";
|
|
95
|
+
const rawThermalTotalId = "hidden.cop_buckets.last_raw_thermal";
|
|
96
|
+
const rawThermalHeatId = "hidden.cop_buckets.last_raw_thermal_heating";
|
|
97
|
+
const rawThermalWaterId = "hidden.cop_buckets.last_raw_thermal_water";
|
|
98
|
+
const rawTrackers = [
|
|
99
|
+
{ id: rawPowerTotalId, name: "Last Raw Power Total", current: currentPowerTotal },
|
|
100
|
+
{ id: rawPowerHeatId, name: "Last Raw Power Heating", current: currentPowerHeating },
|
|
101
|
+
{ id: rawPowerWaterId, name: "Last Raw Power Water", current: currentPowerWater },
|
|
102
|
+
{ id: rawThermalTotalId, name: "Last Raw Thermal Total", current: currentThermalTotal },
|
|
103
|
+
{ id: rawThermalHeatId, name: "Last Raw Thermal Heating", current: currentThermalHeating },
|
|
104
|
+
{ id: rawThermalWaterId, name: "Last Raw Thermal Water", current: currentThermalWater }
|
|
105
|
+
];
|
|
106
|
+
if (!isInitialized) {
|
|
107
|
+
for (const tracker of rawTrackers) {
|
|
108
|
+
await ensureCopObject(adapter, tracker.id, {
|
|
109
|
+
type: "state",
|
|
110
|
+
common: { name: tracker.name, type: "number", role: "value", read: true, write: false },
|
|
111
|
+
native: {}
|
|
112
|
+
});
|
|
113
|
+
const stateInit = await adapter.getStateAsync(tracker.id);
|
|
114
|
+
if (!stateInit || stateInit.val === null) {
|
|
115
|
+
await adapter.setState(tracker.id, { val: tracker.current, ack: true });
|
|
116
|
+
}
|
|
110
117
|
}
|
|
111
118
|
isInitialized = true;
|
|
112
119
|
await handleTimeRollover(adapter);
|
|
113
120
|
return;
|
|
114
121
|
}
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
122
|
+
const readAndCalcDelta = async (id, currentVal) => {
|
|
123
|
+
const lastState = await adapter.getStateAsync(id);
|
|
124
|
+
const lastVal = lastState && typeof lastState.val === "number" ? lastState.val : currentVal;
|
|
125
|
+
const delta = Math.max(0, currentVal - lastVal);
|
|
126
|
+
if (currentVal !== lastVal) {
|
|
127
|
+
await adapter.setState(id, { val: currentVal, ack: true });
|
|
128
|
+
}
|
|
129
|
+
return delta;
|
|
130
|
+
};
|
|
131
|
+
const deltaPowerTotal = await readAndCalcDelta(rawPowerTotalId, currentPowerTotal);
|
|
132
|
+
const deltaPowerHeating = await readAndCalcDelta(rawPowerHeatId, currentPowerHeating);
|
|
133
|
+
const deltaPowerWater = await readAndCalcDelta(rawPowerWaterId, currentPowerWater);
|
|
134
|
+
const deltaThermalTotal = await readAndCalcDelta(rawThermalTotalId, currentThermalTotal);
|
|
135
|
+
const deltaThermalHeating = await readAndCalcDelta(rawThermalHeatId, currentThermalHeating);
|
|
136
|
+
const deltaThermalWater = await readAndCalcDelta(rawThermalWaterId, currentThermalWater);
|
|
137
|
+
await handleTimeRollover(adapter);
|
|
138
|
+
let modeDeltaPower = 0;
|
|
139
|
+
let modeDeltaThermal = 0;
|
|
140
|
+
if (bzVal === "0" || bzVal === "4") {
|
|
141
|
+
modeDeltaPower = isExternalPower ? deltaPowerTotal : deltaPowerHeating > 0 ? deltaPowerHeating : deltaPowerTotal;
|
|
142
|
+
modeDeltaThermal = isExternalThermal ? deltaThermalTotal : deltaThermalHeating > 0 ? deltaThermalHeating : deltaThermalTotal;
|
|
143
|
+
if (modeDeltaPower > 0 || modeDeltaThermal > 0) {
|
|
144
|
+
await addDeltaToBucket(adapter, "Heating", modeDeltaPower, modeDeltaThermal);
|
|
145
|
+
}
|
|
146
|
+
} else if (bzVal === "1") {
|
|
147
|
+
modeDeltaPower = isExternalPower ? deltaPowerTotal : deltaPowerWater > 0 ? deltaPowerWater : deltaPowerTotal;
|
|
148
|
+
modeDeltaThermal = isExternalThermal ? deltaThermalTotal : deltaThermalWater > 0 ? deltaThermalWater : deltaThermalTotal;
|
|
149
|
+
if (!isExternalPower && deltaPowerWater === 0 && deltaPowerTotal > 0) {
|
|
127
150
|
(0, import_logger.writeLog)(
|
|
128
|
-
`[COP]
|
|
151
|
+
`[COP] WW-Stromz\xE4hler meldet 0 Delta. Nutze Delta von energy_total (${deltaPowerTotal} kWh) als Fallback.`,
|
|
129
152
|
"debug"
|
|
130
153
|
);
|
|
131
154
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
await adapter.setState(rawPowerTotalId, { val: currentPowerTotalFallback, ack: true });
|
|
138
|
-
}
|
|
139
|
-
if (currentThermal < lastThermal) {
|
|
140
|
-
await adapter.setState(rawThermalId, { val: currentThermal, ack: true });
|
|
141
|
-
}
|
|
142
|
-
if (deltaPower > 0 || bzVal === "1" && deltaPower === 0) {
|
|
143
|
-
await adapter.setState(rawPowerId, { val: currentPower, ack: true });
|
|
144
|
-
}
|
|
145
|
-
if (deltaThermal > 0) {
|
|
146
|
-
await adapter.setState(rawThermalId, { val: currentThermal, ack: true });
|
|
147
|
-
}
|
|
148
|
-
if (currentPowerTotalFallback > lastPowerTotal) {
|
|
149
|
-
await adapter.setState(rawPowerTotalId, { val: currentPowerTotalFallback, ack: true });
|
|
150
|
-
}
|
|
151
|
-
await handleTimeRollover(adapter);
|
|
152
|
-
if (deltaPower > 0 || deltaThermal > 0) {
|
|
153
|
-
await addDeltaToBucket(adapter, "Total", deltaPower, deltaThermal);
|
|
154
|
-
if (bzVal === "0" || bzVal === "4") {
|
|
155
|
-
await addDeltaToBucket(adapter, "Heating", deltaPower, deltaThermal);
|
|
156
|
-
} else if (bzVal === "1") {
|
|
157
|
-
await addDeltaToBucket(adapter, "HotWater", deltaPower, deltaThermal);
|
|
155
|
+
if (!isExternalThermal && deltaThermalWater === 0 && deltaThermalTotal > 0) {
|
|
156
|
+
(0, import_logger.writeLog)(
|
|
157
|
+
`[COP] WW-W\xE4rmez\xE4hler meldet 0 Delta. Nutze Delta von thermalenergy_total (${deltaThermalTotal} kWh) als Fallback.`,
|
|
158
|
+
"debug"
|
|
159
|
+
);
|
|
158
160
|
}
|
|
161
|
+
if (modeDeltaPower > 0 || modeDeltaThermal > 0) {
|
|
162
|
+
await addDeltaToBucket(adapter, "HotWater", modeDeltaPower, modeDeltaThermal);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
const totalBucketPower = deltaPowerTotal > 0 ? deltaPowerTotal : modeDeltaPower;
|
|
166
|
+
const totalBucketThermal = deltaThermalTotal > 0 ? deltaThermalTotal : modeDeltaThermal;
|
|
167
|
+
if (totalBucketPower > 0 || totalBucketThermal > 0) {
|
|
168
|
+
await addDeltaToBucket(adapter, "Total", totalBucketPower, totalBucketThermal);
|
|
159
169
|
}
|
|
160
170
|
await calculateAndWriteCop(adapter, "Total");
|
|
161
171
|
await calculateAndWriteCop(adapter, "Heating");
|
package/build/copManager.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/copManager.ts"],
|
|
4
|
-
"sourcesContent": ["import { writeLog } from './logger';\nimport { getDpPath } from './stateMapping';\nimport type { LuxtronikAdapter } from './types';\n\nlet isInitialized = false;\n/** Cache f\u00FCr bereits angelegte Datenbank-Objekte zur Vermeidung unn\u00F6tiger DB-Zugriffe */\nconst ensuredObjects = new Set<string>();\n\n/**\n * Stellt einmalig pro Adapter-Laufzeit sicher, dass ein internes COP-Objekt existiert.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @param id Die Objekt-ID.\n * @param obj Die Objekt-Definition.\n */\nasync function ensureCopObject(adapter: LuxtronikAdapter, id: string, obj: ioBroker.SettableObject): Promise<void> {\n\tif (ensuredObjects.has(id)) {\n\t\treturn;\n\t}\n\tawait adapter.setObjectNotExistsAsync(id, obj);\n\tensuredObjects.add(id);\n}\n\n/**\n * Verarbeitet die COP-Daten und berechnet Live-Werte anhand von absoluten Z\u00E4hlern und Snapshots.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @param bzVal Der aktuelle Betriebszustand der W\u00E4rmepumpe als String.\n * @returns Ein Promise, das nach Abschluss der Berechnung aufgel\u00F6st wird.\n */\nexport async function processCopData(adapter: LuxtronikAdapter, bzVal: string): Promise<void> {\n\tconst config = adapter.config as any;\n\tif (!config.cop_calculation_active) {\n\t\treturn;\n\t}\n\n\ttry {\n\t\twriteLog(`COP Manager gestartet. Modus: ${bzVal}`, 'debug');\n\n\t\t// 1. STROMVERBRAUCH ABRUFEN (inkl. Gesamt-Z\u00E4hler als Fallback f\u00FCr WW)\n\t\tlet currentPower = 0;\n\t\tlet currentPowerTotalFallback = 0;\n\n\t\tif (config.cop_source_power === 'external' && config.cop_oid_power_total) {\n\t\t\tconst state = await adapter.getForeignStateAsync(config.cop_oid_power_total);\n\t\t\tif (state && typeof state.val === 'number') {\n\t\t\t\tcurrentPower = state.val;\n\t\t\t\tcurrentPowerTotalFallback = state.val;\n\t\t\t}\n\t\t} else {\n\t\t\t// INTERN: Hole spezifischen Z\u00E4hler je nach Betriebsart (Heizen/WW)\n\t\t\tconst dpSuffix = bzVal === '1' ? 'energy_warmwater' : 'energy_heating';\n\t\t\tconst stateSpecific = await adapter.getStateAsync(getDpPath(dpSuffix));\n\t\t\tif (stateSpecific && typeof stateSpecific.val === 'number') {\n\t\t\t\tcurrentPower = stateSpecific.val;\n\t\t\t}\n\n\t\t\t// Zus\u00E4tzlich IMMER den Gesamtz\u00E4hler als Fallback auslesen\n\t\t\tconst stateTotal = await adapter.getStateAsync(getDpPath('energy_total'));\n\t\t\tif (stateTotal && typeof stateTotal.val === 'number') {\n\t\t\t\tcurrentPowerTotalFallback = stateTotal.val;\n\t\t\t}\n\t\t}\n\n\t\t// 2. W\u00C4RMEMENGE ABRUFEN\n\t\tlet currentThermal = 0;\n\t\tif (config.cop_source_thermal === 'external' && config.cop_oid_thermal_total) {\n\t\t\tconst state = await adapter.getForeignStateAsync(config.cop_oid_thermal_total);\n\t\t\tif (state && typeof state.val === 'number') {\n\t\t\t\tcurrentThermal = state.val;\n\t\t\t}\n\t\t} else {\n\t\t\t// INTERN: Hole spezifischen W\u00E4rmemengenz\u00E4hler je nach Betriebsart\n\t\t\tconst dpSuffix = bzVal === '1' ? 'thermalenergy_warmwater' : 'thermalenergy_heating';\n\t\t\tconst state = await adapter.getStateAsync(getDpPath(dpSuffix));\n\t\t\tif (state && typeof state.val === 'number') {\n\t\t\t\tcurrentThermal = state.val;\n\t\t\t}\n\t\t}\n\n\t\t// --- ABSOLUT SICHERE INITIALISIERUNG AUS DER DATENBANK ---\n\t\tconst rawPowerId = 'hidden.cop_buckets.last_raw_power';\n\t\tconst rawPowerTotalId = 'hidden.cop_buckets.last_raw_power_total_fallback';\n\t\tconst rawThermalId = 'hidden.cop_buckets.last_raw_thermal';\n\n\t\tif (!isInitialized) {\n\t\t\tawait ensureCopObject(adapter, rawPowerId, {\n\t\t\t\ttype: 'state',\n\t\t\t\tcommon: { name: 'Last Raw Power', type: 'number', role: 'value', read: true, write: false },\n\t\t\t\tnative: {},\n\t\t\t});\n\t\t\tawait ensureCopObject(adapter, rawPowerTotalId, {\n\t\t\t\ttype: 'state',\n\t\t\t\tcommon: {\n\t\t\t\t\tname: 'Last Raw Power Total Fallback',\n\t\t\t\t\ttype: 'number',\n\t\t\t\t\trole: 'value',\n\t\t\t\t\tread: true,\n\t\t\t\t\twrite: false,\n\t\t\t\t},\n\t\t\t\tnative: {},\n\t\t\t});\n\t\t\tawait ensureCopObject(adapter, rawThermalId, {\n\t\t\t\ttype: 'state',\n\t\t\t\tcommon: { name: 'Last Raw Thermal', type: 'number', role: 'value', read: true, write: false },\n\t\t\t\tnative: {},\n\t\t\t});\n\n\t\t\tconst lastPowerStateInit = await adapter.getStateAsync(rawPowerId);\n\t\t\tconst lastPowerTotalStateInit = await adapter.getStateAsync(rawPowerTotalId);\n\t\t\tconst lastThermalStateInit = await adapter.getStateAsync(rawThermalId);\n\n\t\t\tif (!lastPowerStateInit || lastPowerStateInit.val === null) {\n\t\t\t\tawait adapter.setState(rawPowerId, { val: currentPower, ack: true });\n\t\t\t}\n\t\t\tif (!lastPowerTotalStateInit || lastPowerTotalStateInit.val === null) {\n\t\t\t\tawait adapter.setState(rawPowerTotalId, { val: currentPowerTotalFallback, ack: true });\n\t\t\t}\n\t\t\tif (!lastThermalStateInit || lastThermalStateInit.val === null) {\n\t\t\t\tawait adapter.setState(rawThermalId, { val: currentThermal, ack: true });\n\t\t\t}\n\n\t\t\tisInitialized = true;\n\t\t\tawait handleTimeRollover(adapter);\n\t\t\treturn;\n\t\t}\n\n\t\t// 3. LETZTE Z\u00C4HLERST\u00C4NDE AUS DER DATENBANK LADEN\n\t\tconst lastPowerState = await adapter.getStateAsync(rawPowerId);\n\t\tconst lastPowerTotalState = await adapter.getStateAsync(rawPowerTotalId);\n\t\tconst lastThermalState = await adapter.getStateAsync(rawThermalId);\n\n\t\tconst lastPower = lastPowerState && typeof lastPowerState.val === 'number' ? lastPowerState.val : currentPower;\n\t\tconst lastPowerTotal =\n\t\t\tlastPowerTotalState && typeof lastPowerTotalState.val === 'number'\n\t\t\t\t? lastPowerTotalState.val\n\t\t\t\t: currentPowerTotalFallback;\n\t\tconst lastThermal =\n\t\t\tlastThermalState && typeof lastThermalState.val === 'number' ? lastThermalState.val : currentThermal;\n\n\t\t// 4. DELTA BERECHNEN (Gegen negative Werte absichern)\n\t\tlet deltaPower = Math.max(0, currentPower - lastPower);\n\t\tconst deltaThermal = Math.max(0, currentThermal - lastThermal);\n\n\t\t// =========================================================\n\t\t// HOT WATER FALLBACK (Wenn interner WW-Z\u00E4hler 0 meldet)\n\t\t// =========================================================\n\t\tif (bzVal === '1' && config.cop_source_power === 'internal' && deltaPower === 0) {\n\t\t\tconst deltaTotalFallback = Math.max(0, currentPowerTotalFallback - lastPowerTotal);\n\t\t\tif (deltaTotalFallback > 0) {\n\t\t\t\tdeltaPower = deltaTotalFallback;\n\t\t\t\twriteLog(\n\t\t\t\t\t`[COP] Hardware bug detected: Hot water power meter stays at 0. Using total energy delta (${deltaPower} kWh) as fallback.`,\n\t\t\t\t\t'debug',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Referenzwerte nachziehen, falls externe Z\u00E4hler genullt wurden\n\t\tif (currentPower < lastPower) {\n\t\t\tawait adapter.setState(rawPowerId, { val: currentPower, ack: true });\n\t\t}\n\t\tif (currentPowerTotalFallback < lastPowerTotal) {\n\t\t\tawait adapter.setState(rawPowerTotalId, { val: currentPowerTotalFallback, ack: true });\n\t\t}\n\t\tif (currentThermal < lastThermal) {\n\t\t\tawait adapter.setState(rawThermalId, { val: currentThermal, ack: true });\n\t\t}\n\n\t\t// 5. NEUE Z\u00C4HLERST\u00C4NDE SOFORT F\u00DCR DEN N\u00C4CHSTEN DURCHLAUF IN DB SPEICHERN\n\t\tif (deltaPower > 0 || (bzVal === '1' && deltaPower === 0)) {\n\t\t\tawait adapter.setState(rawPowerId, { val: currentPower, ack: true });\n\t\t}\n\t\tif (deltaThermal > 0) {\n\t\t\tawait adapter.setState(rawThermalId, { val: currentThermal, ack: true });\n\t\t}\n\t\t// WICHTIG: Den Total-Fallback-Z\u00E4hler IMMER nachziehen, wenn er gestiegen ist (auch im Standby/Heizen),\n\t\t// damit sich kein Leerlauf-Strom anstaut und f\u00E4lschlicherweise beim n\u00E4chsten WW-Start addiert wird!\n\t\tif (currentPowerTotalFallback > lastPowerTotal) {\n\t\t\tawait adapter.setState(rawPowerTotalId, { val: currentPowerTotalFallback, ack: true });\n\t\t}\n\n\t\t// 6. ZEITWECHSEL PR\u00DCFEN (Hat ein neuer Tag/Monat/Jahr begonnen?)\n\t\tawait handleTimeRollover(adapter);\n\n\t\t// 7. WERTE IN DIE ENDLOS-Z\u00C4HLER VERTEILEN (inkl. Abtauen = '4' f\u00FCr Heizung)\n\t\tif (deltaPower > 0 || deltaThermal > 0) {\n\t\t\t// Wenn 'Intern' gew\u00E4hlt ist, haben wir oben bereits das modusspezifische Delta ermittelt.\n\t\t\t// Bei 'Extern' (Gesamtz\u00E4hler) wird das Gesamtdelta in die Kategorien gefiltert.\n\t\t\tawait addDeltaToBucket(adapter, 'Total', deltaPower, deltaThermal);\n\n\t\t\tif (bzVal === '0' || bzVal === '4') {\n\t\t\t\tawait addDeltaToBucket(adapter, 'Heating', deltaPower, deltaThermal);\n\t\t\t} else if (bzVal === '1') {\n\t\t\t\tawait addDeltaToBucket(adapter, 'HotWater', deltaPower, deltaThermal);\n\t\t\t}\n\t\t}\n\n\t\t// 8. LIVE COP BERECHNEN UND SCHREIBEN\n\t\tawait calculateAndWriteCop(adapter, 'Total');\n\t\tawait calculateAndWriteCop(adapter, 'Heating');\n\t\tawait calculateAndWriteCop(adapter, 'HotWater');\n\t} catch (err: any) {\n\t\twriteLog(`Fehler bei der COP-Berechnung: ${err.message}`, 'error');\n\t}\n}\n\n/**\n * Pr\u00FCft auf Tages-, Monats- oder Jahreswechsel (lokale Systemzeit) und erstellt Snapshots der Endlosz\u00E4hler.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n */\nasync function handleTimeRollover(adapter: LuxtronikAdapter): Promise<void> {\n\twriteLog(`Pr\u00FCfe Tageswechsel und lege Ordner an...`, 'debug');\n\tconst dateStateId = 'hidden.cop_buckets.last_date';\n\tawait ensureCopObject(adapter, 'hidden', {\n\t\ttype: 'folder',\n\t\tcommon: { name: 'Hidden System Data' },\n\t\tnative: {},\n\t});\n\tawait ensureCopObject(adapter, 'hidden.cop_buckets', {\n\t\ttype: 'folder',\n\t\tcommon: { name: 'COP Data Buckets' },\n\t\tnative: {},\n\t});\n\tawait ensureCopObject(adapter, dateStateId, {\n\t\ttype: 'state',\n\t\tcommon: { name: 'Last calculation date', type: 'string', role: 'date', read: true, write: false },\n\t\tnative: {},\n\t});\n\n\tconst state = await adapter.getStateAsync(dateStateId);\n\tconst lastDate = state && typeof state.val === 'string' ? state.val : '';\n\n\tconst now = new Date();\n\tconst y = now.getFullYear();\n\tconst m = String(now.getMonth() + 1).padStart(2, '0');\n\tconst d = String(now.getDate()).padStart(2, '0');\n\tconst currentDate = `${y}-${m}-${d}`; // Lokales Datum: YYYY-MM-DD\n\tconst currentMonth = `${y}-${m}`; // Lokaler Monat: YYYY-MM\n\tconst currentYear = `${y}`; // Lokales Jahr: YYYY\n\n\tif (lastDate !== currentDate) {\n\t\tconst lastMonth = lastDate ? lastDate.substring(0, 7) : '';\n\t\tconst lastYear = lastDate ? lastDate.substring(0, 4) : '';\n\t\tconst categories = ['Total', 'Heating', 'HotWater'];\n\n\t\tfor (const cat of categories) {\n\t\t\tconst powerAbs = await getAbsoluteValue(adapter, cat, 'power');\n\t\t\tconst thermalAbs = await getAbsoluteValue(adapter, cat, 'thermal');\n\n\t\t\t// IMMER: Tageswechsel Snapshot\n\t\t\tawait setSnapshot(adapter, cat, 'today', powerAbs, thermalAbs);\n\n\t\t\t// Historie f\u00FCr 7-Tage-COP aktualisieren\n\t\t\tawait update7DaysHistory(adapter, cat, powerAbs, thermalAbs);\n\n\t\t\t// Monatswechsel Snapshot\n\t\t\tif (lastMonth !== currentMonth) {\n\t\t\t\tawait setSnapshot(adapter, cat, 'month', powerAbs, thermalAbs);\n\t\t\t}\n\n\t\t\t// Jahreswechsel Snapshot\n\t\t\tif (lastYear !== currentYear) {\n\t\t\t\tawait setSnapshot(adapter, cat, 'year', powerAbs, thermalAbs);\n\t\t\t}\n\t\t}\n\n\t\tawait adapter.setState(dateStateId, { val: currentDate, ack: true });\n\t\twriteLog(`Tageswechsel erkannt. COP-Snapshots f\u00FCr ${currentDate} wurden gesichert.`, 'info');\n\t}\n}\n\n/**\n * Liest den Endlosz\u00E4hler f\u00FCr eine spezifische Kategorie aus.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @param category Die Kategorie (Total, Heating, HotWater).\n * @param type Art der Energie (power oder thermal).\n * @returns Der absolute Wert in kWh.\n */\nasync function getAbsoluteValue(\n\tadapter: LuxtronikAdapter,\n\tcategory: string,\n\ttype: 'power' | 'thermal',\n): Promise<number> {\n\tconst id = `hidden.cop_buckets.${category}_${type}_absolute`;\n\tawait ensureCopObject(adapter, id, {\n\t\ttype: 'state',\n\t\tcommon: { name: `${category} ${type} Absolute`, type: 'number', role: 'value', read: true, write: false },\n\t\tnative: {},\n\t});\n\tconst state = await adapter.getStateAsync(id);\n\treturn state && typeof state.val === 'number' ? state.val : 0;\n}\n\n/**\n * Schreibt einen Snapshot-Wert.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @param category Die Kategorie.\n * @param timeframe Der Zeitraum (today, month, year).\n * @param power Der zu sichernde Stromwert.\n * @param thermal Der zu sichernde W\u00E4rmewert.\n */\nasync function setSnapshot(\n\tadapter: LuxtronikAdapter,\n\tcategory: string,\n\ttimeframe: string,\n\tpower: number,\n\tthermal: number,\n): Promise<void> {\n\tconst powerId = `hidden.cop_buckets.${category}_power_start_${timeframe}`;\n\tconst thermalId = `hidden.cop_buckets.${category}_thermal_start_${timeframe}`;\n\n\tawait ensureCopObject(adapter, powerId, {\n\t\ttype: 'state',\n\t\tcommon: {\n\t\t\tname: `${category} Power Start ${timeframe}`,\n\t\t\ttype: 'number',\n\t\t\trole: 'value',\n\t\t\tread: true,\n\t\t\twrite: false,\n\t\t},\n\t\tnative: {},\n\t});\n\tawait ensureCopObject(adapter, thermalId, {\n\t\ttype: 'state',\n\t\tcommon: {\n\t\t\tname: `${category} Thermal Start ${timeframe}`,\n\t\t\ttype: 'number',\n\t\t\trole: 'value',\n\t\t\tread: true,\n\t\t\twrite: false,\n\t\t},\n\t\tnative: {},\n\t});\n\n\tawait adapter.setState(powerId, { val: power, ack: true });\n\tawait adapter.setState(thermalId, { val: thermal, ack: true });\n}\n\n/**\n * Verwaltet einen rollierenden 7-Tage-Speicher als JSON.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @param category Die Kategorie.\n * @param currentPower Der absolute Stromz\u00E4hler.\n * @param currentThermal Der absolute W\u00E4rmez\u00E4hler.\n */\nasync function update7DaysHistory(\n\tadapter: LuxtronikAdapter,\n\tcategory: string,\n\tcurrentPower: number,\n\tcurrentThermal: number,\n): Promise<void> {\n\tconst historyId = `hidden.cop_buckets.${category}_history_7d`;\n\tawait ensureCopObject(adapter, historyId, {\n\t\ttype: 'state',\n\t\tcommon: { name: `${category} 7 Days History`, type: 'string', role: 'json', read: true, write: false },\n\t\tnative: {},\n\t});\n\n\tconst state = await adapter.getStateAsync(historyId);\n\tlet history: { power: number; thermal: number }[] = [];\n\n\tif (state && typeof state.val === 'string' && state.val !== '') {\n\t\ttry {\n\t\t\thistory = JSON.parse(state.val);\n\t\t} catch {\n\t\t\t/* ignore */\n\t\t}\n\t}\n\n\thistory.push({ power: currentPower, thermal: currentThermal });\n\tif (history.length > 7) {\n\t\thistory.shift(); // \u00C4ltesten Eintrag entfernen (Ringpuffer)\n\t}\n\n\tawait adapter.setState(historyId, { val: JSON.stringify(history), ack: true });\n}\n\n/**\n * Addiert die neuen kWh-Deltas auf die internen Endlosz\u00E4hler.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @param category Die zu aktualisierende Kategorie.\n * @param deltaPower Die verbrauchte elektrische Energie.\n * @param deltaThermal Die erzeugte thermische Energie.\n */\nasync function addDeltaToBucket(\n\tadapter: LuxtronikAdapter,\n\tcategory: string,\n\tdeltaPower: number,\n\tdeltaThermal: number,\n): Promise<void> {\n\tconst powerId = `hidden.cop_buckets.${category}_power_absolute`;\n\tconst thermalId = `hidden.cop_buckets.${category}_thermal_absolute`;\n\n\tconst currentPower = await getAbsoluteValue(adapter, category, 'power');\n\tconst currentThermal = await getAbsoluteValue(adapter, category, 'thermal');\n\n\tawait adapter.setState(powerId, { val: currentPower + deltaPower, ack: true });\n\tawait adapter.setState(thermalId, { val: currentThermal + deltaThermal, ack: true });\n}\n\n/**\n * Liest die Endlosz\u00E4hler und Snapshots aus, berechnet die Differenz und schreibt den COP.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @param category Die auszulesende Kategorie (Total, Heating, HotWater).\n */\nasync function calculateAndWriteCop(adapter: LuxtronikAdapter, category: string): Promise<void> {\n\tconst currentPower = await getAbsoluteValue(adapter, category, 'power');\n\tconst currentThermal = await getAbsoluteValue(adapter, category, 'thermal');\n\n\tconst dpMap: Record<string, Record<string, string>> = {\n\t\tTotal: { today: 'cop_total_today', '7d': 'cop_total_7d', month: 'cop_total_month', year: 'cop_total_year' },\n\t\tHeating: {\n\t\t\ttoday: 'cop_heating_today',\n\t\t\t'7d': 'cop_heating_7d',\n\t\t\tmonth: 'cop_heating_month',\n\t\t\tyear: 'cop_heating_year',\n\t\t},\n\t\tHotWater: { today: 'cop_water_today', '7d': 'cop_water_7d', month: 'cop_water_month', year: 'cop_water_year' },\n\t};\n\n\t// 1. Berechnung f\u00FCr Heute, Monat, Jahr\n\tconst timeframes = ['today', 'month', 'year'];\n\tfor (const tf of timeframes) {\n\t\tconst powerStartId = `hidden.cop_buckets.${category}_power_start_${tf}`;\n\t\tconst thermalStartId = `hidden.cop_buckets.${category}_thermal_start_${tf}`;\n\n\t\tconst pState = await adapter.getStateAsync(powerStartId);\n\t\tconst tState = await adapter.getStateAsync(thermalStartId);\n\n\t\tconst pStart = pState && typeof pState.val === 'number' ? pState.val : currentPower;\n\t\tconst tStart = tState && typeof tState.val === 'number' ? tState.val : currentThermal;\n\n\t\tconst pUsed = currentPower - pStart;\n\t\tconst tGen = currentThermal - tStart;\n\n\t\tif (pUsed > 0) {\n\t\t\tconst cop = Math.round((tGen / pUsed) * 100) / 100;\n\t\t\tconst targetId = getDpPath(dpMap[category][tf]);\n\t\t\tif (targetId) {\n\t\t\t\tawait adapter.setState(targetId, { val: cop, ack: true });\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Berechnung f\u00FCr rollierende 7 Tage\n\tconst historyId = `hidden.cop_buckets.${category}_history_7d`;\n\tconst hState = await adapter.getStateAsync(historyId);\n\tif (hState && typeof hState.val === 'string' && hState.val !== '') {\n\t\ttry {\n\t\t\tconst history = JSON.parse(hState.val);\n\t\t\tif (history.length > 0) {\n\t\t\t\tconst oldest = history[0];\n\t\t\t\tconst pUsed = currentPower - oldest.power;\n\t\t\t\tconst tGen = currentThermal - oldest.thermal;\n\t\t\t\tif (pUsed > 0) {\n\t\t\t\t\tconst cop = Math.round((tGen / pUsed) * 100) / 100;\n\t\t\t\t\tconst targetId = getDpPath(dpMap[category]['7d']);\n\t\t\t\t\tif (targetId) {\n\t\t\t\t\t\tawait adapter.setState(targetId, { val: cop, ack: true });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch {\n\t\t\t/* ignore */\n\t\t}\n\t}\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAyB;AACzB,0BAA0B;AAG1B,IAAI,gBAAgB;AAEpB,MAAM,iBAAiB,oBAAI,IAAY;AASvC,eAAe,gBAAgB,SAA2B,IAAY,KAA6C;AAClH,MAAI,eAAe,IAAI,EAAE,GAAG;AAC3B;AAAA,EACD;AACA,QAAM,QAAQ,wBAAwB,IAAI,GAAG;AAC7C,iBAAe,IAAI,EAAE;AACtB;AASA,eAAsB,eAAe,SAA2B,OAA8B;AAC7F,QAAM,SAAS,QAAQ;AACvB,MAAI,CAAC,OAAO,wBAAwB;AACnC;AAAA,EACD;AAEA,MAAI;AACH,gCAAS,iCAAiC,KAAK,IAAI,OAAO;
|
|
4
|
+
"sourcesContent": ["import { writeLog } from './logger';\nimport { getDpPath } from './stateMapping';\nimport type { LuxtronikAdapter } from './types';\n\nlet isInitialized = false;\n/** Cache f\u00FCr bereits angelegte Datenbank-Objekte zur Vermeidung unn\u00F6tiger DB-Zugriffe */\nconst ensuredObjects = new Set<string>();\n\n/**\n * Stellt einmalig pro Adapter-Laufzeit sicher, dass ein internes COP-Objekt existiert.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @param id Die Objekt-ID.\n * @param obj Die Objekt-Definition.\n */\nasync function ensureCopObject(adapter: LuxtronikAdapter, id: string, obj: ioBroker.SettableObject): Promise<void> {\n\tif (ensuredObjects.has(id)) {\n\t\treturn;\n\t}\n\tawait adapter.setObjectNotExistsAsync(id, obj);\n\tensuredObjects.add(id);\n}\n\n/**\n * Verarbeitet die COP-Daten und berechnet Live-Werte anhand von absoluten Z\u00E4hlern und Snapshots.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @param bzVal Der aktuelle Betriebszustand der W\u00E4rmepumpe als String.\n * @returns Ein Promise, das nach Abschluss der Berechnung aufgel\u00F6st wird.\n */\nexport async function processCopData(adapter: LuxtronikAdapter, bzVal: string): Promise<void> {\n\tconst config = adapter.config as any;\n\tif (!config.cop_calculation_active) {\n\t\treturn;\n\t}\n\n\ttry {\n\t\twriteLog(`COP Manager gestartet. Modus: ${bzVal}`, 'debug');\n\n\t\tconst isExternalPower = config.cop_source_power === 'external' && Boolean(config.cop_oid_power_total);\n\t\tconst isExternalThermal = config.cop_source_thermal === 'external' && Boolean(config.cop_oid_thermal_total);\n\n\t\t// 1. ALLE STROMZ\u00C4HLER ABRUFEN (Gesamt + Einzelz\u00E4hler)\n\t\tlet currentPowerTotal = 0;\n\t\tlet currentPowerHeating = 0;\n\t\tlet currentPowerWater = 0;\n\n\t\tif (isExternalPower) {\n\t\t\tconst state = await adapter.getForeignStateAsync(config.cop_oid_power_total);\n\t\t\tif (state && typeof state.val === 'number') {\n\t\t\t\tcurrentPowerTotal = state.val;\n\t\t\t}\n\t\t} else {\n\t\t\tconst [sTotal, sHeat, sWater] = await Promise.all([\n\t\t\t\tadapter.getStateAsync(getDpPath('energy_total')),\n\t\t\t\tadapter.getStateAsync(getDpPath('energy_heating')),\n\t\t\t\tadapter.getStateAsync(getDpPath('energy_warmwater')),\n\t\t\t]);\n\t\t\tif (sTotal && typeof sTotal.val === 'number') {\n\t\t\t\tcurrentPowerTotal = sTotal.val;\n\t\t\t}\n\t\t\tif (sHeat && typeof sHeat.val === 'number') {\n\t\t\t\tcurrentPowerHeating = sHeat.val;\n\t\t\t}\n\t\t\tif (sWater && typeof sWater.val === 'number') {\n\t\t\t\tcurrentPowerWater = sWater.val;\n\t\t\t}\n\t\t}\n\n\t\t// 2. ALLE W\u00C4RMEMENGENZ\u00C4HLER ABRUFEN (Gesamt + Einzelz\u00E4hler)\n\t\tlet currentThermalTotal = 0;\n\t\tlet currentThermalHeating = 0;\n\t\tlet currentThermalWater = 0;\n\n\t\tif (isExternalThermal) {\n\t\t\tconst state = await adapter.getForeignStateAsync(config.cop_oid_thermal_total);\n\t\t\tif (state && typeof state.val === 'number') {\n\t\t\t\tcurrentThermalTotal = state.val;\n\t\t\t}\n\t\t} else {\n\t\t\tconst [sTotal, sHeat, sWater] = await Promise.all([\n\t\t\t\tadapter.getStateAsync(getDpPath('thermalenergy_total')),\n\t\t\t\tadapter.getStateAsync(getDpPath('thermalenergy_heating')),\n\t\t\t\tadapter.getStateAsync(getDpPath('thermalenergy_warmwater')),\n\t\t\t]);\n\t\t\tif (sTotal && typeof sTotal.val === 'number') {\n\t\t\t\tcurrentThermalTotal = sTotal.val;\n\t\t\t}\n\t\t\tif (sHeat && typeof sHeat.val === 'number') {\n\t\t\t\tcurrentThermalHeating = sHeat.val;\n\t\t\t}\n\t\t\tif (sWater && typeof sWater.val === 'number') {\n\t\t\t\tcurrentThermalWater = sWater.val;\n\t\t\t}\n\t\t}\n\n\t\t// --- SEPARATE REFERENZ-SPEICHER (Verhindert Spr\u00FCnge beim Taktwechsel!) ---\n\t\tconst rawPowerTotalId = 'hidden.cop_buckets.last_raw_power';\n\t\tconst rawPowerHeatId = 'hidden.cop_buckets.last_raw_power_heating';\n\t\tconst rawPowerWaterId = 'hidden.cop_buckets.last_raw_power_water';\n\n\t\tconst rawThermalTotalId = 'hidden.cop_buckets.last_raw_thermal';\n\t\tconst rawThermalHeatId = 'hidden.cop_buckets.last_raw_thermal_heating';\n\t\tconst rawThermalWaterId = 'hidden.cop_buckets.last_raw_thermal_water';\n\n\t\tconst rawTrackers = [\n\t\t\t{ id: rawPowerTotalId, name: 'Last Raw Power Total', current: currentPowerTotal },\n\t\t\t{ id: rawPowerHeatId, name: 'Last Raw Power Heating', current: currentPowerHeating },\n\t\t\t{ id: rawPowerWaterId, name: 'Last Raw Power Water', current: currentPowerWater },\n\t\t\t{ id: rawThermalTotalId, name: 'Last Raw Thermal Total', current: currentThermalTotal },\n\t\t\t{ id: rawThermalHeatId, name: 'Last Raw Thermal Heating', current: currentThermalHeating },\n\t\t\t{ id: rawThermalWaterId, name: 'Last Raw Thermal Water', current: currentThermalWater },\n\t\t];\n\n\t\tif (!isInitialized) {\n\t\t\tfor (const tracker of rawTrackers) {\n\t\t\t\tawait ensureCopObject(adapter, tracker.id, {\n\t\t\t\t\ttype: 'state',\n\t\t\t\t\tcommon: { name: tracker.name, type: 'number', role: 'value', read: true, write: false },\n\t\t\t\t\tnative: {},\n\t\t\t\t});\n\t\t\t\tconst stateInit = await adapter.getStateAsync(tracker.id);\n\t\t\t\tif (!stateInit || stateInit.val === null) {\n\t\t\t\t\tawait adapter.setState(tracker.id, { val: tracker.current, ack: true });\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tisInitialized = true;\n\t\t\tawait handleTimeRollover(adapter);\n\t\t\treturn;\n\t\t}\n\n\t\t// 3. LETZTE Z\u00C4HLERST\u00C4NDE LADEN & DELTAS ISOLIERT BERECHNEN\n\t\tconst readAndCalcDelta = async (id: string, currentVal: number): Promise<number> => {\n\t\t\tconst lastState = await adapter.getStateAsync(id);\n\t\t\tconst lastVal = lastState && typeof lastState.val === 'number' ? lastState.val : currentVal;\n\t\t\tconst delta = Math.max(0, currentVal - lastVal);\n\n\t\t\t// Referenzwert sofort nachziehen (sowohl bei Zuwachs als auch bei Z\u00E4hler-Reset)\n\t\t\tif (currentVal !== lastVal) {\n\t\t\t\tawait adapter.setState(id, { val: currentVal, ack: true });\n\t\t\t}\n\t\t\treturn delta;\n\t\t};\n\n\t\tconst deltaPowerTotal = await readAndCalcDelta(rawPowerTotalId, currentPowerTotal);\n\t\tconst deltaPowerHeating = await readAndCalcDelta(rawPowerHeatId, currentPowerHeating);\n\t\tconst deltaPowerWater = await readAndCalcDelta(rawPowerWaterId, currentPowerWater);\n\n\t\tconst deltaThermalTotal = await readAndCalcDelta(rawThermalTotalId, currentThermalTotal);\n\t\tconst deltaThermalHeating = await readAndCalcDelta(rawThermalHeatId, currentThermalHeating);\n\t\tconst deltaThermalWater = await readAndCalcDelta(rawThermalWaterId, currentThermalWater);\n\n\t\t// 4. ZEITWECHSEL PR\u00DCFEN\n\t\tawait handleTimeRollover(adapter);\n\n\t\t// 5. INTELLIGENTE ZUORDNUNG MIT AUTOMATISCHEM FALLBACK AUF TOTAL\n\t\tlet modeDeltaPower = 0;\n\t\tlet modeDeltaThermal = 0;\n\n\t\tif (bzVal === '0' || bzVal === '4') {\n\t\t\t// HEIZEN (inkl. Abtauen): Einzelz\u00E4hler nutzen; falls 0 -> Fallback auf Gesamtz\u00E4hler-Delta\n\t\t\tmodeDeltaPower = isExternalPower\n\t\t\t\t? deltaPowerTotal\n\t\t\t\t: deltaPowerHeating > 0\n\t\t\t\t\t? deltaPowerHeating\n\t\t\t\t\t: deltaPowerTotal;\n\t\t\tmodeDeltaThermal = isExternalThermal\n\t\t\t\t? deltaThermalTotal\n\t\t\t\t: deltaThermalHeating > 0\n\t\t\t\t\t? deltaThermalHeating\n\t\t\t\t\t: deltaThermalTotal;\n\n\t\t\tif (modeDeltaPower > 0 || modeDeltaThermal > 0) {\n\t\t\t\tawait addDeltaToBucket(adapter, 'Heating', modeDeltaPower, modeDeltaThermal);\n\t\t\t}\n\t\t} else if (bzVal === '1') {\n\t\t\t// WARMWASSER: Einzelz\u00E4hler nutzen; falls 0 (z.B. Novelan Bug) -> Fallback auf Gesamtz\u00E4hler-Delta\n\t\t\tmodeDeltaPower = isExternalPower\n\t\t\t\t? deltaPowerTotal\n\t\t\t\t: deltaPowerWater > 0\n\t\t\t\t\t? deltaPowerWater\n\t\t\t\t\t: deltaPowerTotal;\n\t\t\tmodeDeltaThermal = isExternalThermal\n\t\t\t\t? deltaThermalTotal\n\t\t\t\t: deltaThermalWater > 0\n\t\t\t\t\t? deltaThermalWater\n\t\t\t\t\t: deltaThermalTotal;\n\n\t\t\tif (!isExternalPower && deltaPowerWater === 0 && deltaPowerTotal > 0) {\n\t\t\t\twriteLog(\n\t\t\t\t\t`[COP] WW-Stromz\u00E4hler meldet 0 Delta. Nutze Delta von energy_total (${deltaPowerTotal} kWh) als Fallback.`,\n\t\t\t\t\t'debug',\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (!isExternalThermal && deltaThermalWater === 0 && deltaThermalTotal > 0) {\n\t\t\t\twriteLog(\n\t\t\t\t\t`[COP] WW-W\u00E4rmez\u00E4hler meldet 0 Delta. Nutze Delta von thermalenergy_total (${deltaThermalTotal} kWh) als Fallback.`,\n\t\t\t\t\t'debug',\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (modeDeltaPower > 0 || modeDeltaThermal > 0) {\n\t\t\t\tawait addDeltaToBucket(adapter, 'HotWater', modeDeltaPower, modeDeltaThermal);\n\t\t\t}\n\t\t}\n\n\t\t// TOTAL-BUCKET: Nimmt das reale Gesamtdelta (oder das Modus-Delta als Fallback)\n\t\tconst totalBucketPower = deltaPowerTotal > 0 ? deltaPowerTotal : modeDeltaPower;\n\t\tconst totalBucketThermal = deltaThermalTotal > 0 ? deltaThermalTotal : modeDeltaThermal;\n\n\t\tif (totalBucketPower > 0 || totalBucketThermal > 0) {\n\t\t\tawait addDeltaToBucket(adapter, 'Total', totalBucketPower, totalBucketThermal);\n\t\t}\n\n\t\t// 6. LIVE COP BERECHNEN UND SCHREIBEN\n\t\tawait calculateAndWriteCop(adapter, 'Total');\n\t\tawait calculateAndWriteCop(adapter, 'Heating');\n\t\tawait calculateAndWriteCop(adapter, 'HotWater');\n\t} catch (err: any) {\n\t\twriteLog(`Fehler bei der COP-Berechnung: ${err.message}`, 'error');\n\t}\n}\n\n/**\n * Pr\u00FCft auf Tages-, Monats- oder Jahreswechsel (lokale Systemzeit) und erstellt Snapshots der Endlosz\u00E4hler.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n */\nasync function handleTimeRollover(adapter: LuxtronikAdapter): Promise<void> {\n\twriteLog(`Pr\u00FCfe Tageswechsel und lege Ordner an...`, 'debug');\n\tconst dateStateId = 'hidden.cop_buckets.last_date';\n\tawait ensureCopObject(adapter, 'hidden', {\n\t\ttype: 'folder',\n\t\tcommon: { name: 'Hidden System Data' },\n\t\tnative: {},\n\t});\n\tawait ensureCopObject(adapter, 'hidden.cop_buckets', {\n\t\ttype: 'folder',\n\t\tcommon: { name: 'COP Data Buckets' },\n\t\tnative: {},\n\t});\n\tawait ensureCopObject(adapter, dateStateId, {\n\t\ttype: 'state',\n\t\tcommon: { name: 'Last calculation date', type: 'string', role: 'date', read: true, write: false },\n\t\tnative: {},\n\t});\n\n\tconst state = await adapter.getStateAsync(dateStateId);\n\tconst lastDate = state && typeof state.val === 'string' ? state.val : '';\n\n\tconst now = new Date();\n\tconst y = now.getFullYear();\n\tconst m = String(now.getMonth() + 1).padStart(2, '0');\n\tconst d = String(now.getDate()).padStart(2, '0');\n\tconst currentDate = `${y}-${m}-${d}`; // Lokales Datum: YYYY-MM-DD\n\tconst currentMonth = `${y}-${m}`; // Lokaler Monat: YYYY-MM\n\tconst currentYear = `${y}`; // Lokales Jahr: YYYY\n\n\tif (lastDate !== currentDate) {\n\t\tconst lastMonth = lastDate ? lastDate.substring(0, 7) : '';\n\t\tconst lastYear = lastDate ? lastDate.substring(0, 4) : '';\n\t\tconst categories = ['Total', 'Heating', 'HotWater'];\n\n\t\tfor (const cat of categories) {\n\t\t\tconst powerAbs = await getAbsoluteValue(adapter, cat, 'power');\n\t\t\tconst thermalAbs = await getAbsoluteValue(adapter, cat, 'thermal');\n\n\t\t\t// IMMER: Tageswechsel Snapshot\n\t\t\tawait setSnapshot(adapter, cat, 'today', powerAbs, thermalAbs);\n\n\t\t\t// Historie f\u00FCr 7-Tage-COP aktualisieren\n\t\t\tawait update7DaysHistory(adapter, cat, powerAbs, thermalAbs);\n\n\t\t\t// Monatswechsel Snapshot\n\t\t\tif (lastMonth !== currentMonth) {\n\t\t\t\tawait setSnapshot(adapter, cat, 'month', powerAbs, thermalAbs);\n\t\t\t}\n\n\t\t\t// Jahreswechsel Snapshot\n\t\t\tif (lastYear !== currentYear) {\n\t\t\t\tawait setSnapshot(adapter, cat, 'year', powerAbs, thermalAbs);\n\t\t\t}\n\t\t}\n\n\t\tawait adapter.setState(dateStateId, { val: currentDate, ack: true });\n\t\twriteLog(`Tageswechsel erkannt. COP-Snapshots f\u00FCr ${currentDate} wurden gesichert.`, 'info');\n\t}\n}\n\n/**\n * Liest den Endlosz\u00E4hler f\u00FCr eine spezifische Kategorie aus.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @param category Die Kategorie (Total, Heating, HotWater).\n * @param type Art der Energie (power oder thermal).\n * @returns Der absolute Wert in kWh.\n */\nasync function getAbsoluteValue(\n\tadapter: LuxtronikAdapter,\n\tcategory: string,\n\ttype: 'power' | 'thermal',\n): Promise<number> {\n\tconst id = `hidden.cop_buckets.${category}_${type}_absolute`;\n\tawait ensureCopObject(adapter, id, {\n\t\ttype: 'state',\n\t\tcommon: { name: `${category} ${type} Absolute`, type: 'number', role: 'value', read: true, write: false },\n\t\tnative: {},\n\t});\n\tconst state = await adapter.getStateAsync(id);\n\treturn state && typeof state.val === 'number' ? state.val : 0;\n}\n\n/**\n * Schreibt einen Snapshot-Wert.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @param category Die Kategorie.\n * @param timeframe Der Zeitraum (today, month, year).\n * @param power Der zu sichernde Stromwert.\n * @param thermal Der zu sichernde W\u00E4rmewert.\n */\nasync function setSnapshot(\n\tadapter: LuxtronikAdapter,\n\tcategory: string,\n\ttimeframe: string,\n\tpower: number,\n\tthermal: number,\n): Promise<void> {\n\tconst powerId = `hidden.cop_buckets.${category}_power_start_${timeframe}`;\n\tconst thermalId = `hidden.cop_buckets.${category}_thermal_start_${timeframe}`;\n\n\tawait ensureCopObject(adapter, powerId, {\n\t\ttype: 'state',\n\t\tcommon: {\n\t\t\tname: `${category} Power Start ${timeframe}`,\n\t\t\ttype: 'number',\n\t\t\trole: 'value',\n\t\t\tread: true,\n\t\t\twrite: false,\n\t\t},\n\t\tnative: {},\n\t});\n\tawait ensureCopObject(adapter, thermalId, {\n\t\ttype: 'state',\n\t\tcommon: {\n\t\t\tname: `${category} Thermal Start ${timeframe}`,\n\t\t\ttype: 'number',\n\t\t\trole: 'value',\n\t\t\tread: true,\n\t\t\twrite: false,\n\t\t},\n\t\tnative: {},\n\t});\n\n\tawait adapter.setState(powerId, { val: power, ack: true });\n\tawait adapter.setState(thermalId, { val: thermal, ack: true });\n}\n\n/**\n * Verwaltet einen rollierenden 7-Tage-Speicher als JSON.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @param category Die Kategorie.\n * @param currentPower Der absolute Stromz\u00E4hler.\n * @param currentThermal Der absolute W\u00E4rmez\u00E4hler.\n */\nasync function update7DaysHistory(\n\tadapter: LuxtronikAdapter,\n\tcategory: string,\n\tcurrentPower: number,\n\tcurrentThermal: number,\n): Promise<void> {\n\tconst historyId = `hidden.cop_buckets.${category}_history_7d`;\n\tawait ensureCopObject(adapter, historyId, {\n\t\ttype: 'state',\n\t\tcommon: { name: `${category} 7 Days History`, type: 'string', role: 'json', read: true, write: false },\n\t\tnative: {},\n\t});\n\n\tconst state = await adapter.getStateAsync(historyId);\n\tlet history: { power: number; thermal: number }[] = [];\n\n\tif (state && typeof state.val === 'string' && state.val !== '') {\n\t\ttry {\n\t\t\thistory = JSON.parse(state.val);\n\t\t} catch {\n\t\t\t/* ignore */\n\t\t}\n\t}\n\n\thistory.push({ power: currentPower, thermal: currentThermal });\n\tif (history.length > 7) {\n\t\thistory.shift(); // \u00C4ltesten Eintrag entfernen (Ringpuffer)\n\t}\n\n\tawait adapter.setState(historyId, { val: JSON.stringify(history), ack: true });\n}\n\n/**\n * Addiert die neuen kWh-Deltas auf die internen Endlosz\u00E4hler.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @param category Die zu aktualisierende Kategorie.\n * @param deltaPower Die verbrauchte elektrische Energie.\n * @param deltaThermal Die erzeugte thermische Energie.\n */\nasync function addDeltaToBucket(\n\tadapter: LuxtronikAdapter,\n\tcategory: string,\n\tdeltaPower: number,\n\tdeltaThermal: number,\n): Promise<void> {\n\tconst powerId = `hidden.cop_buckets.${category}_power_absolute`;\n\tconst thermalId = `hidden.cop_buckets.${category}_thermal_absolute`;\n\n\tconst currentPower = await getAbsoluteValue(adapter, category, 'power');\n\tconst currentThermal = await getAbsoluteValue(adapter, category, 'thermal');\n\n\tawait adapter.setState(powerId, { val: currentPower + deltaPower, ack: true });\n\tawait adapter.setState(thermalId, { val: currentThermal + deltaThermal, ack: true });\n}\n\n/**\n * Liest die Endlosz\u00E4hler und Snapshots aus, berechnet die Differenz und schreibt den COP.\n *\n * @param adapter Die Instanz des ioBroker-Adapters.\n * @param category Die auszulesende Kategorie (Total, Heating, HotWater).\n */\nasync function calculateAndWriteCop(adapter: LuxtronikAdapter, category: string): Promise<void> {\n\tconst currentPower = await getAbsoluteValue(adapter, category, 'power');\n\tconst currentThermal = await getAbsoluteValue(adapter, category, 'thermal');\n\n\tconst dpMap: Record<string, Record<string, string>> = {\n\t\tTotal: { today: 'cop_total_today', '7d': 'cop_total_7d', month: 'cop_total_month', year: 'cop_total_year' },\n\t\tHeating: {\n\t\t\ttoday: 'cop_heating_today',\n\t\t\t'7d': 'cop_heating_7d',\n\t\t\tmonth: 'cop_heating_month',\n\t\t\tyear: 'cop_heating_year',\n\t\t},\n\t\tHotWater: { today: 'cop_water_today', '7d': 'cop_water_7d', month: 'cop_water_month', year: 'cop_water_year' },\n\t};\n\n\t// 1. Berechnung f\u00FCr Heute, Monat, Jahr\n\tconst timeframes = ['today', 'month', 'year'];\n\tfor (const tf of timeframes) {\n\t\tconst powerStartId = `hidden.cop_buckets.${category}_power_start_${tf}`;\n\t\tconst thermalStartId = `hidden.cop_buckets.${category}_thermal_start_${tf}`;\n\n\t\tconst pState = await adapter.getStateAsync(powerStartId);\n\t\tconst tState = await adapter.getStateAsync(thermalStartId);\n\n\t\tconst pStart = pState && typeof pState.val === 'number' ? pState.val : currentPower;\n\t\tconst tStart = tState && typeof tState.val === 'number' ? tState.val : currentThermal;\n\n\t\tconst pUsed = currentPower - pStart;\n\t\tconst tGen = currentThermal - tStart;\n\n\t\tif (pUsed > 0) {\n\t\t\tconst cop = Math.round((tGen / pUsed) * 100) / 100;\n\t\t\tconst targetId = getDpPath(dpMap[category][tf]);\n\t\t\tif (targetId) {\n\t\t\t\tawait adapter.setState(targetId, { val: cop, ack: true });\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Berechnung f\u00FCr rollierende 7 Tage\n\tconst historyId = `hidden.cop_buckets.${category}_history_7d`;\n\tconst hState = await adapter.getStateAsync(historyId);\n\tif (hState && typeof hState.val === 'string' && hState.val !== '') {\n\t\ttry {\n\t\t\tconst history = JSON.parse(hState.val);\n\t\t\tif (history.length > 0) {\n\t\t\t\tconst oldest = history[0];\n\t\t\t\tconst pUsed = currentPower - oldest.power;\n\t\t\t\tconst tGen = currentThermal - oldest.thermal;\n\t\t\t\tif (pUsed > 0) {\n\t\t\t\t\tconst cop = Math.round((tGen / pUsed) * 100) / 100;\n\t\t\t\t\tconst targetId = getDpPath(dpMap[category]['7d']);\n\t\t\t\t\tif (targetId) {\n\t\t\t\t\t\tawait adapter.setState(targetId, { val: cop, ack: true });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch {\n\t\t\t/* ignore */\n\t\t}\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAyB;AACzB,0BAA0B;AAG1B,IAAI,gBAAgB;AAEpB,MAAM,iBAAiB,oBAAI,IAAY;AASvC,eAAe,gBAAgB,SAA2B,IAAY,KAA6C;AAClH,MAAI,eAAe,IAAI,EAAE,GAAG;AAC3B;AAAA,EACD;AACA,QAAM,QAAQ,wBAAwB,IAAI,GAAG;AAC7C,iBAAe,IAAI,EAAE;AACtB;AASA,eAAsB,eAAe,SAA2B,OAA8B;AAC7F,QAAM,SAAS,QAAQ;AACvB,MAAI,CAAC,OAAO,wBAAwB;AACnC;AAA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EAAE,IAAI,CAAC;AAChD,cAAI,UAAU;AACb,kBAAM,QAAQ,SAAS,UAAU,EAAE,KAAK,KAAK,KAAK,KAAK,CAAC;AAAA,UACzD;AAAA,QACD;AAAA,MACD;AAAA,IACD,QAAQ;AAAA,IAER;AAAA,EACD;AACD;",
|
|
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.23.
|
|
4
|
+
"version": "0.23.2",
|
|
5
5
|
"news": {
|
|
6
|
+
"0.23.2": {
|
|
7
|
+
"en": "**COP & Efficiency Calculation (`copManager.ts`):**\n**Isolated Counter Tracking:** Introduced dedicated reference states for Total, Heating, and Hot Water counters (`last_raw_power_*` and `last_raw_thermal_*`). Each counter is now compared strictly against its own previous value, completely preventing cross-mode \"ghost deltas\" and astronomical COP spikes during cycle transitions.\n**Automatic Total-Delta Fallback:** Added seamless fallback detection for controllers with firmware bugs (e.g., Novelan LAV) where mode-specific counters like `energy_warmwater` remain permanently at `0`. If a specific counter reports a delta of `0` during an active cycle, the adapter automatically uses the live delta of the corresponding total counter (`energy_total` / `thermalenergy_total`) without requiring manual configuration workarounds.",
|
|
8
|
+
"de": "**COP und Effizienzberechnung (`CopManager.TS`) :**\n**Isolierte Zählermessung: ** Eigene Referenzzustände für Gesamt-, Heiz- und Warmwasserzähler eingeführt (`last_raw_power_*` und `last_raw_thermal_*`). Jeder Zähler wird nun streng mit seinem vorherigen Wert verglichen, sodass modusübergreifende „Geisterdeltas“ und astronomische COP-Spitzen bei Zyklusübergängen vermieden werden.\n**Automatischer Total-Delta-Fallback: ** Optimale Fallback-Erkennung für Controller mit Firmware-Bugs (z. B. Novelan LAV), bei der modusspezifische Zähler wie `energy_warmwater` permanent auf `0` stehen. Meldet ein bestimmter Zähler während eines aktiven Zyklus ein Delta von `0`, verwendet der Adapter automatisch das Live-Delta des entsprechenden Gesamtzählers (`energy_total`/`thermalenergy_total`), ohne dass eine manuelle Konfiguration nötig ist.",
|
|
9
|
+
"ru": "**Расчет КПД и эффективности (`COPmanager.ts`) :**\n**Отслеживание изолированных счетчиков: ** Введены специальные эталонные состояния для счетчиков общего количества, отопления и горячей воды (`last_raw_power_*` и `last_raw_thermal_*`). Теперь каждый счетчик строго сравнивается со своим предыдущим значением, что полностью исключает появление «дельт-призраков» в разных режимах и астрономические скачки COP во время циклических переходов.\n**Автоматический резервный режим Total-Delta: ** Добавлено простое резервное обнаружение контроллеров с ошибками в прошивке (например, Novelan LAV), при которых счетчики, специфичные для режима, такие как `energy_warmwater`, постоянно остаются на уровне «0». Если во время активного цикла определенный счетчик показывает значение дельты «0», адаптер автоматически использует текущую дельту соответствующего счетчика суммарных значений (`energy_total`/`thermalenergy_total`) без необходимости ручного конфигурирования.",
|
|
10
|
+
"pt": "**COP e cálculo de eficiência (`COPManager.ts`) :**\n**Rastreamento isolado: ** Introduziu estados de referência dedicados para contadores de total, aquecimento e água quente (`last_raw_power_*` e `last_raw_thermal_*`). Cada contador agora é comparado estritamente com seu valor anterior, evitando “deltas fantasmas” e picos astronômicos de COP durante transições de ciclo.\n**Detecção automática de fallback total: ** Foi adicionada a detecção contínua de fallback em controladores com bugs de firmware (por exemplo, Novelan LAV) em que contadores específicos do modo, como `energy_warmwater`. Se um contador específico reportar um delta de `0` durante um ciclo ativo, o adaptador usa automaticamente o delta ativo do contador total correspondente (`energy_total`/`thermalenergy_total`) sem exigir soluções manuais.",
|
|
11
|
+
"nl": "**COP- en efficiëntieberekening (`COPManager.ts`) :**\n**Geïsoleerde tellertracking: ** Er zijn speciale referentietoestanden geïntroduceerd voor tellers voor totaal, verwarming en warm water (`last_raw_power_*` en `last_raw_thermal_*`). Elke teller wordt nu strikt vergeleken met zijn eigen vorige waarde, waardoor „spookdelta's” tussen verschillende modi en astronomische COP-pieken tijdens cyclusovergangen volledig worden voorkomen.\n**Automatische Total-Delta Fallback: ** Naadloze terugvaldetectie toegevoegd voor controllers met firmwarefouten (bijv. Novelan LAV) waarbij modusspecifieke tellers zoals `energy_warmwater` permanent op `0` blijven staan. Als een specifieke teller tijdens een actieve cyclus een delta van `0` meldt, gebruikt de adapter automatisch de actieve delta van de corresponderende totaalteller (`energy_total`/`thermalenergy_total`) zonder dat handmatige configuratieoplossingen nodig zijn.",
|
|
12
|
+
"fr": "**COP et calcul de l'efficacité (`COPManager.ts`) :**\n**Suivi des compteurs isolés :** Ajout d'états de référence dédiés aux compteurs Total, Chauffage et Eau chaude (`last_raw_power_*` et `last_raw_thermal_*`). Chaque compteur est désormais comparé à sa valeur précédente, évitant ainsi les « deltas fantômes » entre modes et les pics de COP astronomiques lors des transitions de cycle.\n**Automatic Total-Delta Fallback :** Ajout d'une détection de secours fluide pour les manettes présentant des bugs (par exemple, Novelan LAV), où les compteurs spécifiques au mode, comme « energy_warmwater », restent en permanence à « 0 ». Si un compteur indique un delta de « 0 » pendant un cycle actif, l'adaptateur utilise automatiquement le delta actif du compteur total correspondant (energy_total`/`thermalenergy_total`) sans aucune solution de configuration manuelle.",
|
|
13
|
+
"it": "**COP e calcolo efficienza (`COPManager.ts`) :**\n**Contatore isolato: ** Introdotti stati di riferimento dedicati per i contatori Total, Heating e Hot Water (`last_raw_power_*` e `last_raw_thermal_*`). Ogni contatore viene ora confrontato con il suo valore precedente, evitando i «delta fantasma» e i picchi astronomici di COP durante le transizioni cicliche.\n**Fallback Total-Delta automatico: ** Aggiunto un rilevamento continuo per i controller con bug del firmware (ad es. Novelan LAV) in cui contatori specifici come `energy_warmwater` sono permanenti a `0`. Se un contatore specifico riporta un delta di `0` durante un ciclo attivo, l'adattatore utilizza automaticamente il delta attivo del contatore totale corrispondente (`energy_total`) senza bisogno di soluzioni di configurazione manuale.",
|
|
14
|
+
"es": "**Cálculo de COP y eficiencia (`CopManager.ts`) :**\n**Seguimiento de contador aislado: ** Introdujo estados de referencia específicos para los contadores de total, calefacción y agua caliente (`last_raw_power_*` y `last_raw_thermal_*`). Ahora cada contador se compara estrictamente con su valor anterior, lo que evita por completo los «deltas fantasmas» en modo cruzado y los astronómicos picos de COP durante las transiciones cíclicas.\n**Total Delta Fallback automático: ** Se ha añadido una detección de respaldo perfecta para los mandos con errores de firmware (por ejemplo, Novelan LAV), donde los contadores específicos del modo, como «energy_warmwater», permanecen permanentemente en 0. Si un contador específico informa de un delta de 0 durante un ciclo activo, el adaptador utiliza automáticamente el delta activo del contador total correspondiente (`energy_total`/`termoenergy_total) sin necesidad de configurar manualmente soluciones alternativas.",
|
|
15
|
+
"pl": "**COP i obliczanie wydajności („CopManager.ts”) :**\n**Isolowane śledzenie liczników: ** Wprowadzono dedykowane stany odniesienia dla liczników całkowitej, ogrzewanej i ciepłej wody (`last_raw_power_*` i `last_raw_thermal_*`). Każdy licznik jest teraz porównywany ściśle z jego własną poprzednią wartością, całkowicie zapobiegając „deltom duchów” w trybie krzyżowym i astronomicznym skokom COP podczas przejść cykli.\n**Automatyczny system awaryjny Total Delta: ** Dodano płynne wykrywanie awaryjne dla kontrolerów z błędami oprogramowania układowego (np. Novelan LAV), gdzie liczniki specyficzne dla trybu, takie jak „energy_warmwater”, pozostają na stałe na poziomie `0`. Jeśli określony licznik zgłasza delta „0” podczas cyklu aktywnego, adapter automatycznie używa aktywnej delta odpowiedniego licznika całkowitego („energy_total\"/ „thermalenergy_total”) bez konieczności ręcznego obejścia konfiguracji.",
|
|
16
|
+
"uk": "**Розрахунок COP та ефективності (`CopManager.ts`) :**\n**Відстеження ізольованого лічильника: ** Введено спеціальні контрольні стани для лічильників загальної кількості, опалення та гарячої води (`last_raw_power_*` та `last_raw_thermal_*`). Кожен лічильник тепер суворо порівнюється зі своїм попереднім значенням, повністю запобігаючи крос-модовим «дельтам привидів» та астрономічним стрибкам COP під час переходів циклу.\n**Автоматичний запасний запас Total-Delta: ** Додано безперебійне виявлення запасів для контролерів з помилками прошивки (наприклад, Novelan LAV), де лічильники, специфічні для режиму, такі як `energy_warmwater` постійно залишаються на рівні `0`. Якщо певний лічильник повідомляє про дельту `0` під час активного циклу, адаптер автоматично використовує живу дельту відповідного лічильника загальної кількості (`energy_total`/`thermalenergy_total`) без необхідності ручного обходу конфігурації.",
|
|
17
|
+
"zh-cn": "**COP 和效率计算 (`copManager.ts`): **\n**隔离计数器跟踪:** 引入了总计、供暖和热水计数器(`last_raw_power_*` 和 `last_raw_thermal_*` 和 `last_raw_thermal_*`)的专用参考状态。现在,每个计数器都严格与其先前的值进行比较,从而完全防止了周期过渡期间的跨模式 “幽灵增量” 和天文COP峰值。\n**自动 Total-Delta Fallback:** 为存在固件错误的控制器(例如 Novelan LAV)增加了无缝回退检测,其中 “energy_warmwater” 等特定模式计数器永久保持在 “0”。如果特定计数器在活动周期中报告的增量为 0,则适配器会自动使用相应总计数器的实时增量(“energy_total”/“thermalenergy_total”),而无需手动配置变通方法。"
|
|
18
|
+
},
|
|
19
|
+
"0.23.1": {
|
|
20
|
+
"en": "**COP & Efficiency Calculation Fix (`copManager.ts`):**\n**Fixed Astronomical COP Values:** Resolved a critical bug where the internal calculation logic switched between specific and total energy counters, causing massive \"ghost deltas\" and resulting in astronomical COP values (e.g., > 1000).\n**Restored Robust Routing:** The adapter now strictly and safely relies on the continuous total counters (`energy_total` and `thermalenergy_total`). It calculates the delta over the polling interval and dynamically routes it into the Heating or Hot Water buckets based on the active operating state.\n_Note:_ Users facing the hardware bug where the heat pump does not track DHW power internally should select \"External Object ID\" in the adapter settings and link their `energy_total` datapoint as a workaround.",
|
|
21
|
+
"de": "**COP & Effizienzberechnung (`CopManager.ts`) :**\n**Korrigierte COP-Werte: ** Es wurde ein Fehler behoben, bei dem die interne Berechnungslogik zwischen spezifischen und Gesamtenergiezählern umschaltete, was zu riesigen Geisterdeltas und astronomischen COP-Werten führte (z. B. > 1000).\n**Robustes Routing wiederhergestellt: ** Der Adapter nutzt jetzt strikt und sicher die Dauerzähler (`energy_total` und `thermalenergy_total`). Es berechnet das Delta über das Abfrageintervall und leitet es je nach Betriebszustand dynamisch an Heizung oder Warmwasser weiter.\n_Hinweis:_ Nutzer mit einem Hardwarefehler, bei dem die Wärmepumpe den Trinkwasserstrom intern nicht erfasst, sollten in den Adaptereinstellungen „Externe Objekt-ID“ wählen und als Workaround ihren „energy_total“ -Datenpunkt verknüpfen.",
|
|
22
|
+
"ru": "**Исправление расчета КПД и эффективности (`CopManager.ts`) :**\n**Фиксированные астрономические значения COP: ** Исправлена критическая ошибка, из-за которой внутренняя логика вычислений переключалась между счетчиками удельной и общей энергии, что приводило к образованию массивных «дельт-призраков» и астрономическим значениям COP (например, > 1000).\n**Восстановлена надежная маршрутизация: ** Теперь адаптер строго и безопасно полагается на счетчики непрерывных суммарных значений (`energy_total` и `thermalenergy_total`). Он вычисляет дельту за интервал опроса и динамически направляет ее в ковши отопления или горячей воды в зависимости от активного рабочего состояния.\n_Примечание:_ Пользователям, столкнувшимся с аппаратной ошибкой, из-за которой тепловой насос не отслеживает мощность ГВС, следует выбрать «Идентификатор внешнего объекта» в настройках адаптера и привязать точку данных «energy_total» в качестве временного решения.",
|
|
23
|
+
"pt": "**Correção de COP e eficiência (`COPManager.ts`) :**\n**Valores de COP astronômicos fixos: ** Resolveu um bug crítico em que a lógica interna de cálculo alternava entre contadores de energia específica e total, causando enormes “deltas fantasmas” e resultando em valores de COP (ex. > 1000).\n**Roteamento robusto restaurado: ** O adaptador agora depende de contadores totais contínuos (`energy_total` e `thermalenergy_total`). Ele calcula o delta no intervalo de pesquisa e o encaminha dinamicamente para os baldes de água quente com base no estado operacional ativo.\n_Nota: _ Usuários com problemas de hardware em que a bomba de calor não rastreia a energia de DHW internamente devem selecionar “ID de objeto externo” no adaptador e vincular o ponto de dados `energy_total`.",
|
|
24
|
+
"nl": "**COP en oplossing voor de berekening van de efficiëntie (`COPManager.ts`) :**\n**Astronomische COP-waarden opgelost: ** Een kritieke bug opgelost waarbij de interne berekeningslogica schakelde tussen specifieke en totale energietellers, wat enorme „spookdelta's” veroorzaakte en astronomische COP-waarden opleverde (bijv. > 1000).\n**Herstelde robuuste routering: ** De adapter is nu strikt en veilig afhankelijk van de continue totaaltellers (`energy_total` en `thermalenergy_total`). Het berekent de delta over het steminterval en stuurt deze dynamisch naar de emmers voor verwarming of warm water op basis van de actieve bedrijfstoestand.\n_Opmerking: _ Gebruikers die geconfronteerd worden met een hardwareprobleem waarbij de warmtepomp het warmwatervermogen niet intern bijhoudt, moeten „External Object ID” selecteren in de adapterinstellingen en hun `energy_total` datapunt koppelen als tijdelijke oplossing.",
|
|
25
|
+
"fr": "**Correction du COP et de l'efficacité (`COPManager.ts`) :**\n**Valeurs COP astronomiques corrigées :** Résolution d'un bug critique où la logique de calcul interne passait des compteurs d'énergie spécifiques aux compteurs d'énergie totale, provoquant d'énormes « deltas fantômes » et des COP astronomiques (par exemple, > 1 000).\n**Routage robuste restauré :** L'adaptateur s'appuie désormais strictement et en toute sécurité sur les compteurs totaux continus (« energy_total » et « thermalenergy_total »). Il calcule le delta sur l'intervalle de sondage et l'achemine dynamiquement vers les seaux Chauffage ou Eau chaude en fonction de l'état de fonctionnement actif.\n_Remarque :_ Les utilisateurs confrontés à un bug matériel où la pompe à chaleur ne suit pas l'ECS en interne doivent sélectionner « ID d'objet externe » dans les paramètres de l'adaptateur et associer leur point de données « energy_total ».",
|
|
26
|
+
"it": "**COP e calcolo dell'efficienza (`COPManager.ts`) :**\n**Valori COP astronomici fissi: ** Risolto un bug critico in cui la logica di calcolo interna passava dai contatori di energia specifici a quelli totali, causando enormi «delta fantasma» e valori COP astronomici (ad es. > 1000).\n**Routing robusto ripristinato: ** L'adattatore ora si basa in modo rigoroso e sicuro sui contatori totali continui (`energy_total` e `thermalenergy_total`). Calcola il delta nell'intervallo di polling e lo indirizza dinamicamente ai secchi Heating o Hot Water in base allo stato operativo attivo.\n_Nota:_ Gli utenti con un bug hardware in cui la pompa di calore non rileva l'ACS internamente devono selezionare «ID oggetto esterno» nelle impostazioni e collegare il datapoint «energy_total».",
|
|
27
|
+
"es": "**COP y cálculo de eficiencia (`CopManager.ts`) :**\n**Valores de COP astronómicos fijos: ** Se ha corregido un error grave en el que la lógica de cálculo interna cambiaba entre contadores de energía específicos y totales, lo que provocaba enormes «deltas fantasmas» y valores de COP astronómicos (p. ej., > 1000).\n**Enrutamiento robusto restaurado: ** El adaptador ahora se basa de forma estricta y segura en los contadores totales continuos (`energy_total` y `energy_total»). Calcula el delta en el intervalo de sondeo y lo dirige dinámicamente a los cubos de calefacción o agua caliente según el estado operativo activo.\n_Nota: _ Los usuarios con un error de hardware en el que la bomba de calor no rastrea la alimentación del ACS internamente deben seleccionar «ID de objeto externo» en la configuración del adaptador y vincular su punto de datos «energy_total» como solución alternativa.",
|
|
28
|
+
"pl": "**Poprawka obliczania COP i wydajności („CopManager.ts”) :**\n**Naprawiono astronomiczne wartości COP: ** Rozwiązano krytyczny błąd, w wyniku którego wewnętrzna logika obliczeń przełączała się między licznikami energii określonej i całkowitej, powodując ogromne „delty duchów” i skutkując astronomicznymi wartościami COP (np. > 1000).\n**Przywrócony solidny routing: ** Adapter teraz ściśle i bezpiecznie opiera się na ciągłych licznikach całkowitych („energy_total” i „thermalenergy_total”). Oblicza deltę w przedziale pomiarowym i dynamicznie kieruje ją do wiader ogrzewania lub ciepłej wody w oparciu o stan aktywny.\n_Uwaga:_ Użytkownicy, którzy mają do czynienia z błędem sprzętowym, w wyniku którego pompa ciepła nie śledzi wewnętrznie mocy cieplnej, powinni wybrać „Identyfikator obiektu zewnętrznego” w ustawieniach adaptera i połączyć swój punkt danych `energy_total' jako obejście.",
|
|
29
|
+
"uk": "** Виправлення розрахунку COP та ефективності (`CopManager.ts`) :**\n**Виправлені астрономічні значення COP: ** Вирішено критичну помилку, коли внутрішня логіка обчислень перемикалася між лічильниками конкретної та загальної енергії, викликаючи масивні «дельти привидів» і призводило до астрономічних значень COP (наприклад, > 1000).\n**Відновлена надійна маршрутизація: ** Адаптер тепер суворо та безпечно покладається на безперервні лічильники загального числа (`energy_total` та `thermalenergy_total`). Він обчислює дельту протягом інтервалу опитування та динамічно спрямовує її у відра опалення або гарячої води на основі активного робочого стану.\n_Примітка:_ Користувачі, які стикаються з апаратною помилкою, коли тепловий насос не відстежує потужність ГВП всередині, повинні вибрати «Ідентифікатор зовнішнього об'єкта» в налаштуваннях адаптера та пов'язати свій пункт даних `energy_total` як обхідний шлях.",
|
|
30
|
+
"zh-cn": "**COP 和效率计算修复 (`copManager.ts`):**\n**修复了天文COP值:**解决了内部计算逻辑在特定能量计数器和总能量计数器之间切换的严重错误,这会导致巨大的 “幽灵增量” 并产生天文COP值(例如> 1000)。\n**恢复了稳健路由:** 适配器现在严格而安全地依赖于连续总计数器(“energy_total” 和 “thermalenergy_total”)。它计算轮询间隔内的增量,并根据活动运行状态将其动态路由到供暖或热水桶。\n_注意:_ 面临热泵无法在内部跟踪 DHW 电源的硬件错误的用户应在适配器设置中选择 “外部对象 ID”,并链接他们的 “energy_total” 数据点作为解决方法。"
|
|
31
|
+
},
|
|
6
32
|
"0.23.0": {
|
|
7
33
|
"en": "*🐛 Bugfixes & Tweaks**\n\n**Configuration & Baseline Logic:**\n**Custom Heating Offset Baseline:** Added a new configuration field in the \"Idle Defaults\" tab for the default heating target temperature offset (Parallelverschiebung)[cite: 10].\n**Preserved Baselines:** The idle reset mechanism (`main.ts`) and the PV surplus manager (`pvManager.ts`) now respect this custom baseline (e.g., +1 K) instead of hard-resetting the offset to `0 K`[cite: 7, 13]. This ensures that your manual baseline heating curve is perfectly preserved when returning from a PV boost or entering standby.",
|
|
8
34
|
"de": "* 🐛 Bugfixes & Tweaks**\n\n**Konfiguration und Basislogik: **\n**Benutzerdefinierter Heizkorrekturwert: ** Im Tab „Leerlaufwerte“ wurde ein neues Konfigurationsfeld für die Parallelverschiebung hinzugefügt [Zitat: 10].\n**Beibehaltene Baselines: ** Der Idle-Reset-Mechanismus (`main.ts`) und der PV Surplus Manager (`PVManager.ts`) respektieren jetzt diese Baseline (z. B. +1 K), anstatt den Offset auf `0 K` zu setzen [Zitat: 7, 13]. So bleibt Ihre manuelle Grundheizkurve perfekt erhalten, wenn Sie vom PV-Strom oder in den Standby gehen.",
|
|
@@ -67,32 +93,6 @@
|
|
|
67
93
|
"pl": "* 🔧 Konserwacja i kompatybilność**\n\n**Zgodność z repozytorium: ** Dodano brakujące tłumaczenia wielojęzyczne (i18n) dla wszystkich menu rozwijanych konfiguracji (np. źródła COP, tryby PV), aby spełnić surowe wymagania dotyczące stabilnego repozytorium ioBroker.",
|
|
68
94
|
"uk": "* 🔧 Технічне обслуговування та сумісність**\n\n**Відповідність репозиторію: ** Додано відсутні багатомовні переклади (i18n) для всіх випадаючих меню конфігурації (наприклад, джерела COP, режими PV), щоб відповідати суворим вимогам стабільного сховища IObroker.",
|
|
69
95
|
"zh-cn": "* 🔧 维护和兼容性**\n\n**存储库合规性:** 为所有配置下拉菜单(例如 COP 来源、PV 模式)添加了缺少的多语言翻译 (i18n),以满足严格的 IOBroker 稳定存储库要求。"
|
|
70
|
-
},
|
|
71
|
-
"0.22.4": {
|
|
72
|
-
"en": "*🐛 Bugfixes & Tweaks**\n\n**PV Surplus Management (`pvManager.ts`):**\n**Cycle Completion & Reset Deadlock:** Fixed a critical bug in `initiateDeactivation` when `pv_finish_cycle` was enabled: the inactive operating mode (e.g., hot water while heating is running) is now immediately reset to baseline[cite: 26, 28, 29]. This prevents infinite cycle loops where cycle optimization erroneously triggered forced 60 °C hot water runs at the end of a heating cycle[cite: 25, 28].\n**Target Reset vs. PV Max:** Corrected cycle completion behavior so active compressor runs finish at normal baseline setpoints instead of continuing to heat to elevated PV boost targets with grid/battery power[cite: 26, 28, 29]. Added a dynamic timer to enforce the 10-minute minimum compressor run time before final reset[cite: 26].\n**Hysteresis Deadband & Timer Protection:** Prevented the deactivation timer (`pvStopTimer`) from being aborted by minor meter/battery balancing fluctuations in the deadband between the stop threshold and start threshold[cite: 26, 27, 29].\n**Startup Recovery:** Added baseline recovery during `initPvManagement` to clear orphaned boost targets left behind after an adapter update or reboot.\n**Input Parsing:** Added `parseConfigFloat` to safely parse decimal values formatted with commas (e.g., `\"1,5\"`) in the admin configuration[cite: 26, 29].\n**Direct Hardware Sync:** Switched state updates to `syncConfigValue` for immediate, queue-safe synchronization via native TCP and Modbus[cite: 25, 26].",
|
|
73
|
-
"de": "* 🐛 Bugfixes & Tweaks**\n\n**PV Restmanagement (`PvManager.ts`) :**\n**Cycle Completion & Reset Deadlock: ** Ein kritischer Bug in `initiateDeactivation` bei aktiviertem `pv_finish_cycle` wurde behoben: Der inaktive Betriebsmodus (z. B. warmes Wasser bei laufender Heizung) wird sofort auf den Ausgangswert zurückgesetzt [Zitat: 26, 28, 29]. Das verhindert Endlosschleifen, in denen die Optimierung irrtümlich 60 °C warmes Wasser am Ende eines Heizzyklus auslöst [Zitat: 25, 28].\n**Target Reset vs. PV Max: ** Das Zyklusabschlussverhalten wurde korrigiert, sodass der Kompressor bei normalen Sollwerten endet, anstatt mit Netz-/Batteriestrom weiter zu heizen [Zitat: 26, 28, 29]. Dynamischer Timer zur Minimallaufzeit des Kompressors von 10 Minuten vor dem Reset [Zitat: 26].\n**Hysterese-Totband- und Timer-Schutz: ** Verhinderte, dass der Deaktivierungstimer (`PVSTOptimer`) durch kleine Schwankungen des Zähler-/Akkuausgleichs im Totband zwischen Stoppschwelle und Startschwelle abgebrochen wurde [Zitat: 26, 27, 29].\n**Startup Recovery: ** Baseline Recovery bei `InitPvManagement` hinzugefügt, um verwaiste Boost-Ziele nach Adapter-Updates oder Reboot zu löschen.\n**Eingabeanalyse: ** `ParseConfigFloat` hinzugefügt, um Dezimalwerte in der Admin-Konfiguration sicher zu analysieren [Zitat: 26, 29].\n**Direct Hardware Sync: ** Status-Updates auf `SyncConfigValue` für sofortige, wartesichere Synchronisation über natives TCP und Modbus [Zitat: 25, 26].",
|
|
74
|
-
"ru": "* 🐛 Исправления ошибок и изменения**\n\n**Управление излишками фотоэлектрических систем (`PVManager.ts`) :**\n**Задержка завершения цикла и перезагрузки: ** Исправлена критическая ошибка в `InitiateDeactivation` при включении `pv_finish_cycle`: неактивный режим работы (например, горячая вода во время отопления) теперь немедленно возвращается к исходному уровню [см.: 26, 28, 29]. Это предотвращает бесконечные циклы циклов, в которых по окончании цикла нагрева ошибочно инициируется оптимизация цикла, принудительная подача горячей воды температурой 60°C [см.: 25, 28].\n**Сброс заданного значения по сравнению с максимальным значением фотоэлектрической мощности: ** Исправлено поведение при завершении цикла, благодаря чему работа активного компрессора завершается при нормальных исходных значениях, а не продолжает нагреваться до объектов с повышенным энергопотреблением при питании от сети или батареи [см.: 26, 28, 29]. Добавлен динамический таймер, обеспечивающий минимальное время работы компрессора за 10 минут до его окончательного перезапуска [код: 26].\n**Защита от гистерезиса и защита таймера: ** Предотвращено прерывание работы таймера деактивации («PVStopTimer») из-за незначительных колебаний баланса счетчика и батареи в зоне нечувствительности между порогом остановки и порогом запуска [см.: 26, 27, 29].\n**Восстановление при запуске: ** Добавлено базовое восстановление во время `initPVManagement`, позволяющее удалить потерянные цели повышения, оставшиеся после обновления или перезагрузки адаптера.\n**Синтаксический анализ ввода: ** Добавлен `parseconfigFloat` для безопасного анализа десятичных значений, отформатированных запятыми (например, `\"1,5\"`) в конфигурации администратора [см.: 26, 29].\n**Прямая аппаратная синхронизация: ** Переключено обновление состояния на `SyncConfigValue` для мгновенной синхронизации с сохранением очередей через собственные протоколы TCP и Modbus [цитаты: 25, 26].",
|
|
75
|
-
"pt": "* 🐛 Correções e ajustas**\n\n**Gestão do excedente de PV (`PVManager.ts`) :**\n**Bloqueio de conclusão e reinicialização do ciclo: ** Corrigido um bug crítico em `InitiateDeactivation` quando `pv_finish_cycle` era ativado: o modo inativo (por exemplo, água quente durante o aquecimento) é imediatamente reiniciado [cite: 26, 28, 29]. Isso evita ciclos infinitos em que a otimização do ciclo forçada de 60 °C corre erroneamente no final de um ciclo de aquecimento [cite: 25, 28].\n**Target Reset vs. PV Max: ** Corrigido o comportamento de conclusão do ciclo para que o compressor ativo termine em pontos de base normais, em vez de continuar a aquecer alvos elevados com a rede/bateria [cite: 26, 28, 29]. Foi adicionado um timer dinâmico para aplicar o compressor no mínimo 10 minutos antes do reset final.\n**Proteção contra histerese: ** Impediu que o temporizador de desativação (`PVStopTimer`) fosse abortado por pequenas flutuações no balanceamento do medidor/bateria na faixa morta entre o limite de parada e o limite inicial [cite: 26, 27, 29].\n**Recuperação inicial: ** Foi adicionada a recuperação básica durante o `InitPvManagement` para eliminar metas órfãs após a atualização ou reinicialização do adaptador.\n**Análise de entrada: ** Adicionado `parseConfigFloat` para analisar valores decimais com vírgulas (ex: `\"1,5\"`) na configuração admin [cite: 26, 29].\n**Direct Hardware Sync: ** Mudou para `syncConfigValue` para sincronização imediata e segura via TCP e Modbus nativos [cite: 25, 26].",
|
|
76
|
-
"nl": "* 🐛 Oplossingen en aanpassingen van bug**\n\n**Beheer van PV-overschot (`PVManager.ts`) :**\n**Cycle Completion & Reset Deadlock: ** Er is een kritieke bug opgelost in `InitiateDeactivation` toen `pv_finish_cycle` was ingeschakeld: de inactieve bedrijfsmodus (bijvoorbeeld warm water terwijl de verwarming draait) wordt nu onmiddellijk teruggezet naar de basislijn [citaat: 26, 28, 29]. Dit voorkomt oneindige cycluscycli waarbij de cyclusoptimalisatie ten onrechte geforceerd heet water van 60 °C activeert aan het einde van een verwarmingscyclus [citeer: 25, 28].\n**Reset van het doel versus PV Max: ** Gecorrigeerd gedrag bij het voltooien van de cyclus, zodat de actieve compressor bij het einde draait op normale basiswaarden in plaats van door te gaan met verwarmen tot hogere PV-boostdoelen bij net/batterijvermogen [citaat: 26, 28, 29]. Een dynamische timer toegevoegd om de minimale gebruiksduur van de compressor van 10 minuten af te dwingen vóór de definitieve reset [citaat: 26].\n**Hysteresis Deadband & Timer Protection: ** Voorkwam dat de deactiveringstimer (`PvStOpTimer`) werd afgebroken door kleine schommelingen in het evenwicht tussen de meter/batterij in de dode band tussen de stopdrempel en de startdrempel [citaat: 26, 27, 29].\n**Startup Recovery: ** Basislijnherstel toegevoegd tijdens `InitPvManagement` om verweesde boostdoelen te wissen die zijn achtergebleven na een adapterupdate of herstart.\n**Input Parsing: ** `ParseConfigFloat` toegevoegd om veilig decimale waarden te ontleden die zijn opgemaakt met komma's (bijvoorbeeld `\"1,5\"`) in de beheerdersconfiguratie [citaat: 26, 29].\n**Directe hardwaresynchronisatie: ** De status is bijgewerkt naar `SyncConfigValue` voor onmiddellijke synchronisatie in de wachtrij via native TCP en Modbus [citaat: 25, 26].",
|
|
77
|
-
"fr": "* 🐛 Corrections et modifications**\n\n**Gestion du surplus PV (`PVManager.ts`) :**\n**Fin du cycle et blocage de la réinitialisation :** Correction d'un bug critique dans « InitiateDeactivation » lorsque « pv_finish_cycle » était activé : le mode inactif (par exemple, eau chaude pendant le chauffage) repasse immédiatement à la base de référence [citation : 26, 28, 29]. Cela évite des cycles infinis où l'optimisation du cycle déclenche par erreur des chauffages forcés à 60 °C à la fin d'un cycle de chauffage [cite : 25, 28].\n**Target Reset vs PV Max :** Comportement de fin de cycle corrigé pour que le compresseur actif fonctionne aux points de référence normaux au lieu de continuer à chauffer à des cibles de suralimentation PV élevées avec le réseau ou la batterie [citation : 26, 28, 29]. Ajout d'un minuteur dynamique pour limiter le temps de fonctionnement du compresseur à 10 minutes [cite : 26].\n**Hystérésis, zone morte et protection par minuterie :** Empêché l'interruption du minuteur de désactivation (« PVStoptimer ») en raison de légères fluctuations d'équilibrage entre le compteur et la batterie entre les seuils d'arrêt et de démarrage [citation : 26, 27, 29].\n**Startup Recovery :** Ajout d'une restauration de base lors de `InitPVManagement` pour éliminer les cibles de boost abandonnées après une mise à jour ou un redémarrage.\n**Analyse des entrées :** Ajout de « ParseConfigFloat » pour analyser en toute sécurité les valeurs décimales avec des virgules (« 1,5 ») dans la configuration d'administration [cite : 26, 29].\n**Synchronisation matérielle directe :** Mise à jour de l'état de SyncConfigValue pour une synchronisation immédiate et sécurisée via TCP et Modbus natifs [cite : 25, 26].",
|
|
78
|
-
"it": "* 🐛 Bugfix e tweak**\n\n**Gestione surplus PV (`PVManager.ts`) :**\n**Deadlock di completamento e ripristino del ciclo: ** Risolto un bug critico in `InitiateDeactivation` quando `pv_finish_cycle` era abilitato: la modalità operativa inattiva (ad esempio, acqua calda) ora torna ai valori base [cite: 26, 28, 29]. Ciò evita cicli infiniti in cui l'ottimizzazione del ciclo innesca erroneamente acqua calda a 60 °C [citazione: 25, 28].\n**Target Reset vs. PV Max: ** Corretto il completamento del ciclo in modo che il compressore attivo finisca ai valori di base normali invece di continuare a riscaldarsi a valori PV elevati con rete o batteria [cite: 26, 28, 29]. Aggiunto un timer dinamico per il tempo minimo di 10 minuti prima del reset finale [cite: 26].\n**Hysteresis Deadband & Timer Protection: ** Ha impedito l'interruzione del timer di disattivazione (`PVSToptimer`) a causa di lievi fluttuazioni del contatore/batteria nella banda morta tra soglia di stop e soglia di avvio [cite: 26, 27, 29].\n**Startup Recovery: ** Aggiunto il ripristino di base durante `InitPVManagement` per eliminare i target boost orfani.\n**Analisi in input: ** Aggiunto `ParseConfigFloat` per analizzare in modo sicuro i valori decimali con virgole (ad es. «1,5\") in admin [cite: 26, 29].\n**Direct Hardware Sync: ** Aggiornato a `SyncConfigValue` per una sincronizzazione immediata e sicura tramite TCP e Modbus nativi [cite: 25, 26].",
|
|
79
|
-
"es": "* 🐛 Correcciones y ajustes**\n\n**Gestión de excedentes fotovoltaicos (`PVManager.ts`) :**\n**Punto muerto de finalización y reinicio del ciclo: ** Se ha corregido un error crítico en `InitiateDeactivation` cuando se activaba `pv_finish_cycle: el modo de funcionamiento inactivo (p. ej., agua caliente con la calefacción encendida) se restablece inmediatamente a la base [cita: 26, 28, 29]. Esto evita ciclos infinitos en los que la optimización del ciclo activa erróneamente agua caliente forzada a 60 °C al final de un ciclo de calefacción [cita: 25, 28].\n**Restablecimiento del objetivo frente a PV Max: ** Se ha corregido el comportamiento de finalización del ciclo para que el compresor activo funcione en los puntos de referencia normales en lugar de seguir calentando hasta alcanzar objetivos elevados de PV con la red o la batería [cita: 26, 28, 29]. Se ha añadido un temporizador dinámico para que el compresor funcione al menos 10 minutos antes del reinicio final [cita: 26].\n**Protección de banda muerta y temporizador por histéresis: ** Impidió que el temporizador de desactivación (`PVSTOptimer`) se anulara debido a pequeñas fluctuaciones de equilibrio entre el medidor y la batería en la banda muerta entre el umbral de parada y el umbral de inicio [citar: 26, 27, 29].\n**Startup Recovery: ** Se añadió la recuperación de referencia durante «InitPVManagement» para borrar los objetivos de impulso huérfanos que quedan tras actualizar o reiniciar un adaptador.\n**Análisis de entradas: ** Se ha añadido `ParseConfigFloat` para analizar de forma segura los valores decimales con comas (p. ej., 1,5) en la configuración de administración [cita: 26, 29].\n**Direct Hardware Sync: ** Cambió las actualizaciones de estado a «SyncConfigValue» para una sincronización inmediata y segura mediante TCP y Modbus nativos [cita: 25, 26].",
|
|
80
|
-
"pl": "* 🐛 Poprawki błędów i poprawki**\n\n**Zarządzanie nadwyżką PV („PVManager.ts”) :**\n**Zakończenie cyklu i resetowanie impasu: ** Naprawiono krytyczny błąd w `InitiateDeactivation`, gdy włączono opcję `pv_finish_cycle`: nieaktywny tryb pracy (np. gorąca woda podczas ogrzewania) jest teraz natychmiast resetowany do linii bazowej [cytuj: 26, 28, 29]. Zapobiega to nieskończonym pętlom cyklu, w których optymalizacja cyklu błędnie uruchamia wymuszoną gorącą wodę o temperaturze 60 °C pod koniec cyklu ogrzewania [cyt: 25, 28].\n**Reset celu w porównaniu z PV Max: ** Poprawiono zachowanie zakończenia cyklu, dzięki czemu aktywne działanie sprężarki kończy się przy normalnych wartościach zadanych linii bazowych zamiast kontynuować nagrzewanie się do podwyższonych celów doładowania fotowoltaicznego przy zasilaniu sieci/akumulatora [cytuj: 26, 28, 29]. Dodano dynamiczny timer, aby wymusić 10-minutowy minimalny czas pracy sprężarki przed ostatecznym resetowaniem [cytuj: 26].\n**Histerezy Deadband & Timer Protection: ** Zapobiegało przerwaniu timera dezaktywacji („PVStopTimer”) przez niewielkie wahania równoważenia licznika/akumulatora w martwym paśmie między progiem zatrzymania a progiem startu [cytuj: 26, 27, 29].\n**Odzyskiwanie startu: ** Dodano odzyskiwanie linii bazowej podczas `INITPVManagement` w celu usunięcia osieroconych celów doładowania pozostałych po aktualizacji adaptera lub ponownym uruchomieniu.\n**Analizowanie danych wejściowych: ** Dodano `ParseconfigFloat`, aby bezpiecznie przeanalizować wartości dziesiętne sformatowane przecinkami (np. `\"1,5\"`) w konfiguracji administratora [cytuj: 26, 29].\n**Bezpośrednia synchronizacja sprzętowa: ** Zmieniono aktualizacje stanu do `SyncConfigValue` w celu natychmiastowej, bezpiecznej synchronizacji w kolejce za pomocą natywnego protokołu TCP i Modbus [cytat: 25, 26].",
|
|
81
|
-
"uk": "* 🐛 Виправлення помилок та налаштування**\n\n**Управління надлишками PV (`PVManager.ts`) :**\n**Завершення циклу та відновлення тупикового блокування: ** Виправлена критична помилка в `InitiateDeActivation`, коли було ввімкнено `pv_finish_cycle`: неактивний режим роботи (наприклад, гаряча вода під час роботи опалення) тепер негайно скидається до базової лінії [цитувати: 26, 28, 29]. Це запобігає нескінченним цикловим циклом, коли оптимізація циклу помилково запущена примусова гаряча вода на 60 °C в кінці циклу нагрівання [цитувати: 25, 28].\n**Скидання цілі проти PV Max: ** Виправлена поведінка завершення циклу, щоб активний компресор завершився на нормальних базових значеннях замість того, щоб продовжувати нагрівати до підвищених цілей підсилення PV за допомогою живлення сітки/акумулятора [цитувати: 26, 28, 29]. Додано динамічний таймер для забезпечення 10-хвилинного мінімального часу роботи компресора до остаточного скидання [цитувати: 26].\n**Захист мертвої смуги гістерезису та таймера: ** Запобіг перериванню таймера деактивації (`PVSToptimer`) незначними коливаннями балансування лічильника/акумулятора в глухому діапазоні між порогом зупинки та порогом запуску [цитувати: 26, 27, 29].\n**Відновлення запуску: ** Додано базове відновлення під час `InitPvManagement`, щоб очистити осиротілі цілі підвищення, що залишилися після оновлення або перезавантаження адаптера.\n**Парсинг вхідних даних: ** Додано `parSeconfigFloat` для безпечного аналізу десяткових значень, відформатованих комами (наприклад, `\"1,5\"`) у конфігурації адміністратора [цитувати: 26, 29].\n**Пряма синхронізація обладнання: ** Переключено оновлення стану до `SyncConfigValue` для негайної, безпечної для черги синхронізації через рідний TCP та Modbus [цитувати: 25, 26].",
|
|
82
|
-
"zh-cn": "* 🐛 错误修复和调整**\n\n**光伏盈余管理 (`pvManager.ts`): **\n**循环完成和重置死锁:**修复了启用 “pv_finish_cycle” 时在 “initiatedEctivation” 中出现的严重错误:非活动运行模式(例如,供暖运行时的热水)现在会立即重置为基线 [引用:26、28、29]。这样可以防止无限循环循环,即循环优化在加热周期结束时错误地触发了强制的 60 °C 热水流动 [引用:25、28]。\n**目标重置对比 PV 最大值:** 修正了循环完成行为,使主动压缩机在正常的基准设定值下完成运行,而不是继续使用电网/电池供电向更高的光伏增压目标加热 [引用:26、28、29]。添加了动态计时器,以强制压缩机在最终重置之前的最短运行时间为 10 分钟 [引用:26]。\n**滞后死区和计时器保护:**防止停用计时器(`PVSTOptimer`)因停止阈值和启动阈值之间的死区出现微小的电表/电池平衡波动而中止 [引用:26、27、29]。\n**启动恢复:** 在 “initPV管理” 期间添加了基准恢复,以清除适配器更新或重启后留下的孤立增强目标。\n**输入解析:** 添加了 `parseconfigFloat` 以安全地解析管理员配置中用逗号(例如,``1,5\"`)格式化的十进制值 [引用:26、29]。\n**直接硬件同步:** 切换到 SyncConfigValue 的状态更新,可通过原生 TCP 和 Modbus 进行即时、安全的队列同步 [引用:25、26]。"
|
|
83
|
-
},
|
|
84
|
-
"0.22.3": {
|
|
85
|
-
"en": "**Notifications & Alarming:**\nFixed an initialization bug where `lastKnownErrorTimestamp` and `lastKnownOutageTimestamp` were not set on adapter startup if the history remained unchanged, which previously caused the first genuine error or outage after a restart to be silently ignored.\nDecoupled the 60-minute flow warning cooldown (`lastFlowNotificationTime`) from critical heat pump malfunctions so genuine fault alarms are never suppressed by preceding flow warnings.\nAdded language-independent outage code detection (codes 0, 1, 11, 18) alongside text-based fallbacks.\n**ZIP Circulation Control:**\nAdded a raw parameter fallback (`currentRawParams`) when backing up `originalZipConfig` to prevent timer schedules from being overwritten with `null` if the corresponding timer states are disabled in the object tree.\nFixed an issue in `stopZipAndDeaeration` where manually disabling `Activate_Zip` did not stop the hardware deaeration program (`runDeaerate`) by checking `Virtual_ZIP_Status` in addition to the trigger state.\n**Stability & Helpers:**\nWrapped the automated DTA backup cron job initialization (`initAutoBackup`) in a `try/catch` block to prevent startup crashes on malformed cron expressions.\nHardened `safeClose` in `ModbusManager` to cleanly terminate sockets even if a connection timeout occurs before the socket is marked as open.\nImproved input validation in `formatTimerSecondsToTime` (guarding against negative values and `NaN`) and `getNumber` (supporting numeric strings).",
|
|
86
|
-
"de": "**Meldungen und Alarme: **\nEs wurde ein Initialisierungsfehler behoben, bei dem `LastKnownErrorTimestamp` und `LastKnownOutageTimestamp` bei unveränderter Historie nicht gesetzt wurden, sodass zuvor der erste echte Fehler oder Ausfall nach einem Neustart ignoriert wurde.\nDie 60-minütige Abklingzeit (`LastFlowNotificationTime`) wurde von kritischen Wärmepumpenstörungen entkoppelt, sodass echte Störmeldungen nie unterdrückt werden.\nSprachunabhängige Ausfallcode-Erkennung (Codes 0, 1, 11, 18) und textbasierte Fallbacks hinzugefügt.\n**ZIP Kreislaufkontrolle: **\nBeim Backup von `OriginalZipConfig` wurde ein Rohparameter-Fallback (`currentRawParams`) hinzugefügt, um zu verhindern, dass Zeitpläne mit `Null` überschrieben werden, wenn sie im Objektbaum deaktiviert sind.\nEin Problem in `StopZipAndDeaeration` wurde behoben, bei dem die manuelle Deaktivierung von `Activate_Zip` das Hardware-Entlüftungsprogramm (`rundeAerate`) nicht stoppte.\n**Stabilität & Helfer: **\nHat das DTA-Backup (`initAutoBackup`) in einen `try/catch`-Block verpackt, um Startabstürze bei fehlerhaften Cron-Ausdrücken zu verhindern.\n`SafeClose` in `ModbusManager` wurde verstärkt, um Sockets sauber zu beenden, auch wenn sie als offen markiert werden.\nVerbesserte Eingabeüberprüfung in `FormatTimerSecondsToTime` (schützt vor negativen Werten und `NaN`) und `getNumber` (unterstützt Zahlen).",
|
|
87
|
-
"ru": "**Уведомления и тревожные сигналы: **\nИсправлена ошибка инициализации, из-за которой значения «LastKnownErrorTimestamp» и «LastKnownOutageTimestamp» не устанавливались при запуске адаптера, если история оставалась неизменной, что ранее приводило к незаметному игнорированию первой подлинной ошибки или сбоя после перезапуска.\nОтделили 60-минутное время охлаждения системы предупреждения о потоке («LastFlowNotificationTime») от критических неисправностей теплового насоса, поэтому предыдущие предупреждения о потоке никогда не подавляют оригинальные аварийные сигналы.\nДобавлено независимое от языка определение кода сбоя (коды 0, 1, 11, 18), а также текстовые резервные варианты.\n**Управление циркуляцией ZIP: **\nДобавлен резервный вариант необработанных параметров (`currentRawParams`) при резервном копировании `OriginalZipConfig`, предотвращающий перезапись таймеров на `null`, если соответствующие состояния таймера отключены в дереве объектов.\nИсправлена ошибка в `StopZipandDeaeration`, из-за которой ручное отключение `Activate_Zip` не приводило к остановке программы аппаратной деаэрации (`RundeAerate`), так как помимо состояния триггера было проверено значение virtual_zip_status`.\n**Стабильность и помощники: **\nЗавершил автоматическую инициализацию задания cron для резервного копирования DTA (`initAutoBackup`) в блок `try/catch`, чтобы предотвратить сбои при запуске из-за искаженных выражений cron.\nУсиленная функция «SafeClose» в «ModBusManager» позволяет точно отключать сокеты даже в случае истечения времени ожидания соединения до того, как сокет будет помечен как открытый.\nУлучшена проверка ввода в форматах «FormatTimerSecondStoTime» (защита от отрицательных значений и «NaN») и «GetNumber» (поддержка числовых строк).",
|
|
88
|
-
"pt": "**Avisos e alarmes: **\nCorrigido um erro de inicialização em que `lastKnownErrorTimestamp` e `lastKnownOutageTimestamp` não eram definidos na inicialização do adaptador se o histórico permanecesse inalterado, ignorando silenciosamente o primeiro erro genuíno ou falha.\nSeparamos a recarga de 60 minutos (`LastFlowNotificationTime`) das avarias críticas da bomba de calor para que os alarmes de falha genuínos nunca sejam suprimidos.\nAdicionou detecção de código de interrupção independente de idioma (códigos 0, 1, 11, 18) e texto.\n**Controle de circulação ZIP: **\nFoi adicionado um parâmetro bruto (`currentRawParams`) ao fazer backup de `originalZipConfig` para evitar que os cronogramas sejam substituídos por `null` se os estados do timer estiverem desativados na árvore de objetos.\nCorrigido um problema em `StopZipAndDeaeration` em que desativar manualmente `Activate_Zip` não parava o programa de desaeração de hardware (`runDeaerate`) ao marcar `virtual_Zip_status` além do estado do gatilho.\n**Estabilidade e ajuda: **\nEnvolveu a inicialização automática do cron job de backup do DTA (`initAutoBackup`) em um bloco `try/catch` para evitar falhas em expressões cron malformadas.\n`SafeClose` reforçado no `ModbusManager` para encerrar soquetes mesmo se a conexão expirar antes de marcá-los como abertos.\nMelhor validação de entrada em `FormatTimerSecondsToTime` (contra valores negativos e `NaN`) e `getNumber` (suporte a cadeias numéricas).",
|
|
89
|
-
"nl": "**Meldingen en alarmerende informatie: **\nEr is een initialisatiefout opgelost waarbij `LastKnownErrorTimeStamp` en `LastKnownOutageTimeStamp` niet waren ingesteld bij het opstarten van de adapter als de geschiedenis ongewijzigd bleef, waardoor eerder de eerste echte fout of uitval na een herstart stilletjes werd genegeerd.\nDe afkoelperiode van 60 minuten met de stroomwaarschuwing (`LastFlowNotificationTime`) is losgekoppeld van kritieke storingen in de warmtepomp, zodat echte storingsalarmen nooit worden onderdrukt door voorafgaande stroomwaarschuwingen.\nTaalonafhankelijke detectie van uitvalcodes (codes 0, 1, 11, 18) toegevoegd, naast op tekst gebaseerde fallbacks.\n**Circulatiecontrole met ZIP: **\nEen noodoplossing voor onbewerkte parameters toegevoegd (`CurrentRawParams`) bij het maken van een back-up van `OriginalZipConfig` om te voorkomen dat timerschema's worden overschreven met `null` als de corresponderende timerstatussen zijn uitgeschakeld in de objectstructuur.\nEr is een probleem opgelost in `StopZipAndDeaeration` waarbij het handmatig uitschakelen van `Activate_Zip` het hardware-ontluchtingsprogramma (`RundeAerate`) niet stopte door naast de triggerstatus ook `virtual_zip_status` aan te vinken.\n**Stabiliteit en hulpmiddelen: **\nDe automatische initialisatie van de cron-taak voor DTA-back-up (`InitAutoBackup`) verpakt in een `try/catch` blok om te voorkomen dat het opstarten crasht bij verkeerd gevormde cron-expressies.\n`SafeClose` gehard in `ModBusManager` om stopcontacten netjes af te sluiten, zelfs als er een time-out optreedt voordat de socket als open is gemarkeerd.\nVerbeterde invoervalidatie in `FormatTimerSecondsToTime` (bescherming tegen negatieve waarden en `NaN`) en `GetNumber` (ondersteunt numerieke tekenreeksen).",
|
|
90
|
-
"fr": "**Notifications et alarmes :**\nCorrection d'un bug d'initialisation où « LastKnownErrorTimestamp » et « LastKnownOutageTimestamp » n'étaient pas définis au démarrage de l'adaptateur si l'historique restait inchangé, ce qui provoquait l'ignorance silencieuse de la première erreur ou panne après un redémarrage.\nJ'ai découplé les 60 minutes de refroidissement de l'alerte de débit (« LastFlowNotificationTime ») des dysfonctionnements critiques de la pompe à chaleur, afin que les alertes de débit précédentes ne soient jamais supprimées.\nAjout d'une détection des codes de panne indépendante de la langue (codes 0, 1, 11, 18) et de solutions textuelles.\n**Régulateur de circulation ZIP :**\nAjout d'un paramètre brut (« CurrentRawParams ») lors de la sauvegarde de « OriginalZipConfig » pour éviter que les horaires ne soient remplacés par « null » si les états correspondants sont désactivés dans l'arborescence des objets.\nCorrection d'un problème dans « StopZipAndDeaeration » où le fait de désactiver manuellement « Activate_Zip » n'arrêtait pas le programme de désaération du matériel (« RunDeAerate ») en cochant « Virtual_Zip_Status » en plus de l'état de déclenchement.\n**Stabilité et aides :**\nA intégré l'initialisation automatique de la tâche cron DTA (« InitAutoBackup ») dans un bloc « try/catch » pour éviter les pannes de démarrage dues à des expressions cron mal formées.\nSafeClose a été renforcé dans ModbusManager pour terminer correctement les sockets, même s'il y a un délai de connexion avant qu'il ne soit marqué comme ouvert.\nValidation des entrées améliorée dans « FormatTimerSecondsToTime » (protection contre les valeurs négatives et « NaN ») et « GetNumber » (gestion des chaînes numériques).",
|
|
91
|
-
"it": "**Notifiche e allarmi: **\nRisolto un bug di inizializzazione per cui LastKnownErrorTimestamp e LastKnownOutageTimestamp non erano impostati all'avvio dell'adattatore se la cronologia rimaneva invariata, il che prima ignorava silenziosamente il primo errore o interruzione.\nHa disaccoppiato l'avviso di flusso di 60 minuti (`LastFlowNotificationTime`) dai guasti critici della pompa di calore in modo che i veri allarmi di flusso non siano mai soppressi.\nAggiunto il codice di interruzione indipendente dalla lingua (codici 0, 1, 11, 18) e fallback testuali.\n**Controllo del flusso ZIP: **\nAggiunto un parametro raw fallback (`currentRawParams`) durante il backup di `originalZipConfig` per evitare che i timer vengano sovrascritti con `null` se i timer sono disabilitati nell'albero degli oggetti.\nRisolto un problema in `StopZipAndDeaeration` per cui la disattivazione manuale di `Activate_Zip` non arrestava il programma di deaerazione hardware (`RunDeAerate`) controllando `VIRTUAL_ZIP_STATUS`.\n**Stabilità e aiuto: **\nHa inserito l'inizializzazione automatica del cron job del backup DTA (initAutoBackup) in un blocco try/catch per evitare crash di avvio su cron expression errate.\nSafeClose rinforzato in ModbusManager per terminare i socket anche in caso di timeout di connessione prima che il socket sia aperto.\nMigliore convalida degli input in `FormatTimerSecondsToTime` (evitando valori negativi e `NaN`) e `getNumber` (supporta stringhe numeriche).",
|
|
92
|
-
"es": "**Avisos y alarmas: **\nSe ha corregido un error de inicialización por el que `LastKnownErrorTimestamp` y `LastKnownOutageTimeStamp` no se configuraban al iniciar el adaptador si el historial no cambiaba, lo que hacía que se ignorara silenciosamente el primer error o interrupción real tras un reinicio.\nDesacopló el tiempo de enfriamiento del aviso de flujo de 60 minutos (`LastFlowNotificationTime`) de los fallos críticos de la bomba de calor para que los avisos de flujo anteriores nunca supriman las alarmas de fallo genuinas.\nSe añadió la detección de códigos de corte independiente del idioma (códigos 0, 1, 11, 18) y alternativas basadas en texto.\n**Control de circulación ZIP: **\nSe ha añadido un parámetro sin procesar (`CurrentRawParams) al hacer una copia de seguridad de `OriginalZipConfig` para evitar que los horarios del temporizador se sobrescriban por «nulo» si los estados correspondientes están deshabilitados en el árbol de objetos.\nSe solucionó un problema en `StopZipAndDeaeration` por el que deshabilitar manualmente `Activate_Zip` no detenía el programa de desaireación del hardware (`RunDeaerate`) al comprobar `Virtual_Zip_Status` además del estado de activación.\n**Estabilidad y ayudas: **\nEmpaquetó la inicialización automática del trabajo cron de DTA (`InitAutoBackup`) en un bloque «try/catch» para evitar que el inicio se bloquee en expresiones cron mal formadas.\nSe reforzó `SafeClose` en `ModBusManager` para terminar sin problemas los enchufes aunque se agote el tiempo de espera antes de marcarlos como abiertos.\nSe ha mejorado la validación de entradas en `FormatTimerSecondsToTime` (protege contra valores negativos y `NaN`) y `GetNumber` (admite cadenas numéricas).",
|
|
93
|
-
"pl": "**Powiadomienia i alarmy: **\nNaprawiono błąd inicjalizacji, w wyniku którego `LastKnownErrorTimeStamp` i `LastKnownOutageTimeStamp` nie były ustawione podczas uruchamiania adaptera, jeśli historia pozostała niezmieniona, co wcześniej powodowało, że pierwszy prawdziwy błąd lub awaria po ponownym uruchomieniu był po cichu zignorowany.\nOddzielono 60-minutowy czas odnowienia ostrzeżenia o przepływie („LastflowNotificationTime”) od krytycznych awarii pompy ciepła, dzięki czemu oryginalne alarmy usterek nigdy nie są tłumione przez poprzednie ostrzeżenia o przepływie.\nDodano niezależne od języka wykrywanie kodu awarii (kody 0, 1, 11, 18) wraz z błędami opartymi na tekście.\n** Sterowanie cyrkulacją ZIP: **\nDodano surowy parametr zastępczy (`currentRawParams`) podczas tworzenia kopii zapasowej `OriginalZipConfig`, aby zapobiec nadpisywaniu harmonogramów czasów `null`, jeśli odpowiednie stany timera są wyłączone w drzewie obiektów.\nNaprawiono błąd w `StopZipAndDeaeration` polegający na tym, że ręczne wyłączenie `Activate_Zip` nie zatrzymało programu odnapowietrzania sprzętu (`RundeAerate`) poprzez zaznaczenie `Virtual_Zip_Status` oprócz stanu wyzwalania.\n**Stabilność i pomocnicy: **\nZawinięto automatyczną inicjalizację zadania cron DTA backup (`initAutoBackup`) w blok `try/catch`, aby zapobiec awariom uruchamiania nieprawidłowo sformowanych wyrażeń cron.\nUtwardzony „SafeClose” w „ModbusManager”, aby czysto zakończyć gniazda, nawet jeśli nastąpi limit czasu połączenia przed oznaczeniem gniazda jako otwartego.\nPoprawiono walidację danych wejściowych w `FormatTimerSecondsToTime` (chroniąc przed wartościami ujemnymi i `NaN`) i `GetNumber` (obsługujące ciągi numeryczne).",
|
|
94
|
-
"uk": "**Сповіщення та тривоги: **\nВиправлена помилка ініціалізації, коли `lastKnownErrorTimeStamp` і `lastKnownOutageTimeStamp` не були встановлені під час запуску адаптера, якщо історія залишилася незмінною, що раніше спричинило безшумне ігнорування першої справжньої помилки або відключення після перезапуску.\nВід'єднано 60-хвилинний час охолодження попередження про потік (`LastFlowNotificationTime`) від критичних несправностей теплового насоса, тому справжні сигналізації про несправності ніколи не пригнічуються попередніми попередженнями про потік.\nДодано незалежне від мови виявлення коду відключення (коди 0, 1, 11, 18) поряд з текстовими резервними засобами.\n**Контроль циркуляції ZIP: **\nДодано вихідний запасний параметр (`CurrentRawParams`) під час резервного копіювання `OriginalZipConfig`, щоб запобігти перезапису графіків таймера на `null`, якщо відповідні стани таймера вимкнені в дереві об'єктів.\nВиправлена проблема в `StopZipAndDeaeration`, коли ручне відключення `Activate_Zip` не зупинило програму деаерації обладнання (`RundeAerate`), перевіривши `Virtual_Zip_Status` на додаток до стану тригера.\n**Стабільність та помічники: **\nОбгорнув автоматичну ініціалізацію завдання cron резервного копіювання DTA (`InitAutoBackup`) у блок `try/catch`, щоб запобігти збоям запуску неправильних сформованих виразів cron.\nЗагартований `SafeClose` у `ModbusManager` для чистого завершення розеток, навіть якщо тайм-аут з'єднання відбувається до того, як розетка буде позначена як відкрита.\nПокращено перевірку вхідних даних у `FormatTimerSecondStoTime` (захист від негативних значень та `NaN`) та `getNumber` (підтримка числових рядків).",
|
|
95
|
-
"zh-cn": "**通知和警报:**\n修复了一个初始化错误,即如果历史记录保持不变,则无法在适配器启动时设置 “lastKnownErrorTimeStamp” 和 “lastKnownOutageTimeStamp”,这会导致首次真正的错误或重启后的中断被静默忽略。\n将 60 分钟的流量警告冷却时间(“LastFlowNotificationTime”)与关键的热泵故障分离开来,因此之前的流量警告永远不会抑制真正的故障警报。\n添加了与语言无关的中断代码检测(代码 0、1、11、18)以及基于文本的后备功能。\n**ZIP 流通控制:**\n在备份 `originalZipConfig` 时添加了原始参数回退(`currentrawParams`),以防止在对象树中禁用相应的计时器状态时使用 “空值” 覆盖计时器计划。\n修复了 “stopZipandDEAERATION” 中的一个问题,即除了触发器状态外,手动禁用 “Activate_Zip” 不会通过检查 “Virtual_Zip_Status” 来停止硬件脱气程序(`rundeaerate`)。\n**稳定性与助手:**\n将自动数据备份定时任务初始化(initAutoBackup)封装在 “try/catch” 块中,以防止因错误的 cron 表达式而导致启动崩溃。\n强化了 ModbusManager 中的 “SafeClose”,即使在套接字被标记为打开之前出现连接超时,也能干净地终止套接字。\n改进了 `formatTimerSecondsToTime`(防止出现负值和 `NaN`)和 `getNumber`(支持数字字符串)中的输入验证。"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"titleLang": {
|