Files
ems/db/migration/V097__wallbox_rs485_endpoints.sql
Dusan Vojacek e41840cb7d
All checks were successful
CI and deploy / migration-check (push) Successful in 19s
CI and deploy / deploy (push) Successful in 1m4s
V097: wallboxy TeltoCharge na reálný RS485 převodník 172.16.1.16 (unit 1/2, 9600 8N1)
Nahrazuje placeholder IP 192.168.1.101/.102 ze seedu; sdílená sběrnice
s plánovaným Chint elektroměrem (unit 3). Teltonika strana čeká na povolení
Modbusu v aplikaci.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 18:31:49 +02:00

28 lines
1.2 KiB
SQL

-- Wallboxy TeltoCharge: skutečný RS485→TCP převodník (Waveshare) 172.16.1.16
-- nahrazuje placeholdery 192.168.1.101/.102. Sdílená RS485 sběrnice
-- (9600 8N1 dle nastavení převodníku 2026-06-12): WB1 = unit 1, WB2 = unit 2,
-- výhledově Chint elektroměr = unit 3. Modbus na wallboxech nutno povolit
-- v Teltonika aplikaci (adresa + baud shodné s převodníkem).
update ems.site_endpoint e
set host = '172.16.1.16',
port = 502,
unit_id = 1,
notes = 'Waveshare RS485 TO POE ETH (B) 172.16.1.16 — sdílená sběrnice wallboxů (9600 8N1, Modbus TCP↔RTU). TeltoCharge #1 = unit 1.'
where e.id = (
select ec.endpoint_id from ems.asset_ev_charger ec
join ems.site s on s.id = ec.site_id
where s.code = 'home-01' and ec.code = 'ev-charger-1'
);
update ems.site_endpoint e
set host = '172.16.1.16',
port = 502,
unit_id = 2,
notes = 'Waveshare RS485 TO POE ETH (B) 172.16.1.16 — sdílená sběrnice wallboxů (9600 8N1, Modbus TCP↔RTU). TeltoCharge #2 = unit 2.'
where e.id = (
select ec.endpoint_id from ems.asset_ev_charger ec
join ems.site s on s.id = ec.site_id
where s.code = 'home-01' and ec.code = 'ev-charger-2'
);