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).