From 74dbe870182feb0b4c049d54aaa5effdf5f93d04 Mon Sep 17 00:00:00 2001 From: Dusan Vojacek Date: Fri, 12 Jun 2026 21:51:50 +0200 Subject: [PATCH] =?UTF-8?q?V102:=20T=C4=8C=20hp-samsung=20pat=C5=99=C3=AD?= =?UTF-8?q?=20home-01,=20ne=20KV1=20=E2=80=94=20ko=C5=99en=20mrtv=C3=A9=20?= =?UTF-8?q?T=C4=8C=20telemetrie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Seed přiřadil asset_heat_pump KV1; V096/V101 s where code='home-01' byly tiché no-opy a endpoint .17 se nikdy nezapsal. KV1 navíc plánoval s TČ, které nemá. Endpoint TČ nastaven na 172.16.1.17:502 unit 5. Co-Authored-By: Claude Opus 4.8 (1M context) --- db/migration/V102__heat_pump_site_fix.sql | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 db/migration/V102__heat_pump_site_fix.sql diff --git a/db/migration/V102__heat_pump_site_fix.sql b/db/migration/V102__heat_pump_site_fix.sql new file mode 100644 index 0000000..648a8d0 --- /dev/null +++ b/db/migration/V102__heat_pump_site_fix.sql @@ -0,0 +1,19 @@ +-- Samsung EHS fyzicky stojí v home-01 (převodník 172.16.1.17 v LAN home-01, +-- MIM adresa 5, živě ověřeno 2026-06-12), ale seed ho přiřadil KV1 (site 4). +-- Kvůli tomu V096/V101 (where s.code='home-01') nic neaktualizovaly a +-- telemetrie TČ nikdy netekla; KV1 solver navíc plánoval s neexistujícím TČ. + +update ems.asset_heat_pump + set site_id = (select id from ems.site where code = 'home-01') + where code = 'hp-samsung' + and site_id = (select id from ems.site where code = 'KV1'); + +-- endpoint TČ: skutečný Waveshare home-01 (viz V096/V101, které mířily mimo) +update ems.site_endpoint e + set host = '172.16.1.17', + port = 502, + unit_id = 5, + notes = 'Waveshare RS485 TO POE ETH (B) pro Samsung EHS přes MIM-B19N(T); 9600 8E1, Modbus TCP to RTU, adresa MIM 5 (V102).' + where e.id = ( + select hp.endpoint_id from ems.asset_heat_pump hp where hp.code = 'hp-samsung' + );