From 26013e229b353a16c35ae7c9f6a8d10c4785f852 Mon Sep 17 00:00:00 2001 From: Dusan Vojacek Date: Fri, 12 Jun 2026 21:41:01 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20defrost=20MIM=20=E2=80=94=200xFF=20zname?= =?UTF-8?q?n=C3=A1=20OFF=20(dopatch=20k=20e2688bb)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- backend/services/telemetry_collector.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/services/telemetry_collector.py b/backend/services/telemetry_collector.py index 7469d7e..7f75721 100644 --- a/backend/services/telemetry_collector.py +++ b/backend/services/telemetry_collector.py @@ -517,7 +517,7 @@ MIM_OFF_WATER_IN = 15 # °C×10 signed MIM_OFF_WATER_OUT = 16 # °C×10 signed MIM_OFF_DHW_ONOFF = 22 MIM_OFF_DHW_TEMP = 25 # °C×10 (zásobník TUV) -MIM_REG_DEFROST = 2 # modulový registr: 0=off, jinak defrost +MIM_REG_DEFROST = 2 # modulový registr: 0 i 0xFF = off, jinak defrost MIM_MODE_NAMES = {0: "auto", 1: "cool", 2: "dry", 3: "fan", 4: "heat"} @@ -585,7 +585,8 @@ async def poll_heat_pump(site_id: int, db: asyncpg.Connection) -> None: dhw_temp_c = _mim_temp_c(iu[MIM_OFF_DHW_TEMP]) water_in_c = _mim_temp_c(iu[MIM_OFF_WATER_IN]) room_temp_c = _mim_temp_c(iu[MIM_OFF_ROOM_TEMP]) - defrost = bool(defrost_raw) + # manuál MIM: 0 i 0xFF = defrost OFF, ostatní hodnoty = ON + defrost = int(defrost_raw) not in (0, 0xFF) # Idle-skip: TČ vypnuté a teploty (na 0.2 °C) beze změny → heartbeat; # pomalý drift teplot zachytí heartbeat 840 s (TUV delta se normalizuje # per minutu ve fn_update_tuv_usage_stats).