Bazén: V085→V087 (out-of-order po V086) + seed Shelly Plug S Gen3 home-01
All checks were successful
CI and deploy / migration-check (push) Successful in 16s
CI and deploy / deploy (push) Successful in 1m14s

V088: endpoint shelly_http 172.16.1.15 + asset pool-pump-1 (rated 600 W odhad
— upřesní telemetrie; 480 min/den letní filtrace; schedulable=false =
telemetry-only start, ovládání signálem POOL_PUMP_ON po ověření).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dusan Vojacek
2026-06-12 00:14:15 +02:00
parent 02c35f8add
commit 466c15fa84
2 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
-- Seed bazénového čerpadla home-01: Shelly Plug S Gen3 na 172.16.1.15 (VPN).
-- Telemetry-only start (schedulable=false): nejdřív měříme, ovládání signálem
-- POOL_PUMP_ON zapneme po ověření telemetrie. rated_power_w je odhad — skutečný
-- příkon ukáže telemetrie (apower), pak upřesnit.
insert into ems.site_endpoint (
site_id, endpoint_type, host, port, protocol, unit_id, enabled, notes
)
select s.id, 'shelly_http', '172.16.1.15', 80, 'http', null, true,
'Shelly Plug S Gen3 bazénové čerpadlo (Gen2+ RPC).'
from ems.site s
where s.code = 'home-01'
and not exists (
select 1 from ems.site_endpoint se
where se.site_id = s.id and se.host = '172.16.1.15'
);
insert into ems.asset_pool_pump (
site_id, code, manufacturer, model, endpoint_id, shelly_switch_id,
rated_power_w, min_run_min, daily_runtime_min, schedulable, notes
)
select
s.id, 'pool-pump-1', 'Shelly', 'Plug S Gen3', se.id, 0,
600, -- odhad; upřesnit dle telemetrie (Shelly apower)
15,
480, -- 8 h/den (letní filtrace); zimní profil = follow-up
false, -- telemetry-only; ovládání po ověření
'Bazénové čerpadlo přes Shelly Plug S Gen3. Ovládání: signal POOL_PUMP_ON (fn_signal_enqueue_bool), zatím vypnuto.'
from ems.site s
join ems.site_endpoint se on se.site_id = s.id and se.host = '172.16.1.15'
where s.code = 'home-01'
and not exists (
select 1 from ems.asset_pool_pump p
where p.site_id = s.id and p.code = 'pool-pump-1'
);