TČ Samsung přes MIM-B19N: endpoint 172.16.1.17, plný poll, registry doc
- V096: endpoint home-01 TČ z placeholderu 192.168.1.103 na reálný Waveshare RS485 TO POE ETH (B) 172.16.1.17:502; telemetry_heat_pump.room_temp_c. - R__048: fn_telemetry_heat_pump_sample rozšířena (water_inlet, room_temp, defrost, alarm_code) — drop/comment bez parametrů dle konvence. - poll_heat_pump: místo TODO stubu (zapisoval dummy 45/55 °C!) skutečné čtení MIM bloku 50-75 + defrost reg 2; gate na comm_status ready (jinak skip); operating_mode off/heat/cool/auto/dhw/error; power_w NULL (MIM příkon nemá). - docs/04-modules/modbus-registers-mim-b19n.md (mapa, 9600 8E1, DIP adresa, troubleshooting E6xx) + heat-pump.md odkaz. Živý stav: TCP :502 OK, Modbus bez odpovědi (čeká na protokol převodníku / paritu EVEN / polaritu A-B — checklist v docu). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
21
db/migration/V096__heat_pump_mim_b19n.sql
Normal file
21
db/migration/V096__heat_pump_mim_b19n.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
-- Samsung TČ (EHS) přes Modbus interface MIM-B19N(T): skutečný RS485→TCP
|
||||
-- převodník (Waveshare RS485 TO POE ETH (B)) na 172.16.1.17 nahrazuje
|
||||
-- placeholder 192.168.1.103 ze seedu. MIM = Modbus RTU slave, 9600 8E1,
|
||||
-- adresa dle DIP/rotary (zde 1). Registry: docs/04-modules/modbus-registers-mim-b19n.md.
|
||||
|
||||
update ems.site_endpoint e
|
||||
set host = '172.16.1.17',
|
||||
port = 502,
|
||||
notes = 'Waveshare RS485 TO POE ETH (B) pro Samsung EHS přes MIM-B19N(T). Sériová linka 9600 8E1 (parita EVEN!), Modbus TCP server :502, unit_id = adresa MIM dle DIP (1).'
|
||||
where e.id = (
|
||||
select hp.endpoint_id
|
||||
from ems.asset_heat_pump hp
|
||||
join ems.site s on s.id = hp.site_id
|
||||
where s.code = 'home-01'
|
||||
);
|
||||
|
||||
alter table ems.telemetry_heat_pump
|
||||
add column if not exists room_temp_c numeric(5,2);
|
||||
|
||||
comment on column ems.telemetry_heat_pump.room_temp_c is
|
||||
'Prostorová teplota hlášená vnitřní jednotkou (MIM reg base+9, °C×10). Vstup budoucího termálního modelu domu.';
|
||||
@@ -1,3 +1,8 @@
|
||||
-- Insert 1min vzorku telemetrie TČ (MIM-B19N). Bez overloadů — při změně
|
||||
-- signatury drop bez parametrů (konvence CLAUDE.md).
|
||||
|
||||
drop function if exists ems.fn_telemetry_heat_pump_sample;
|
||||
|
||||
create or replace function ems.fn_telemetry_heat_pump_sample(
|
||||
p_site_id int,
|
||||
p_heat_pump_id int,
|
||||
@@ -6,7 +11,11 @@ create or replace function ems.fn_telemetry_heat_pump_sample(
|
||||
p_outdoor_temp_c double precision,
|
||||
p_water_outlet_temp_c double precision,
|
||||
p_tuv_tank_temp_c double precision,
|
||||
p_operating_mode text
|
||||
p_operating_mode text,
|
||||
p_water_inlet_temp_c double precision default null,
|
||||
p_room_temp_c double precision default null,
|
||||
p_defrost_active boolean default null,
|
||||
p_alarm_code int default null
|
||||
)
|
||||
returns void
|
||||
language sql
|
||||
@@ -19,7 +28,11 @@ as $fn$
|
||||
outdoor_temp_c,
|
||||
water_outlet_temp_c,
|
||||
tuv_tank_temp_c,
|
||||
operating_mode
|
||||
operating_mode,
|
||||
water_inlet_temp_c,
|
||||
room_temp_c,
|
||||
defrost_active,
|
||||
alarm_code
|
||||
)
|
||||
values (
|
||||
p_site_id,
|
||||
@@ -29,10 +42,14 @@ as $fn$
|
||||
p_outdoor_temp_c,
|
||||
p_water_outlet_temp_c,
|
||||
p_tuv_tank_temp_c,
|
||||
p_operating_mode
|
||||
p_operating_mode,
|
||||
p_water_inlet_temp_c,
|
||||
p_room_temp_c,
|
||||
p_defrost_active,
|
||||
p_alarm_code
|
||||
)
|
||||
on conflict (heat_pump_id, measured_at) do nothing;
|
||||
$fn$;
|
||||
|
||||
comment on function ems.fn_telemetry_heat_pump_sample is
|
||||
'Insert telemetrie TČ (placeholder Modbus).';
|
||||
'Insert telemetrie TČ z MIM-B19N pollu (voda in/out, TUV, prostorová teplota, defrost, alarm). power_w je NULL — MIM příkon neměří (nutný elektroměr).';
|
||||
|
||||
Reference in New Issue
Block a user