DB: bazénové čerpadlo přes Shelly relé (V085)

- ems.asset_pool_pump (endpoint http, rated_power_w, min_run_min,
  daily_runtime_min jako aktuální sezónní hodnota, schedulable)
- ems.telemetry_pool_pump — 1min hypertable (is_on, power_w, energy_wh_total)
- signal_def POOL_PUMP_ON (bool) pro ovládání přes signal infrastrukturu
- fn_telemetry_pool_pump_sample (R__092), vw_asset_pool_pump_http_poll (R__093)
- fn_signal_enqueue_bool (R__094) — SQL-first zařazení bool signálu do fronty

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Dusan Vojacek
2026-06-11 22:37:42 +02:00
parent 5239463699
commit ccdca068a1
4 changed files with 216 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
drop view if exists ems.vw_asset_pool_pump_http_poll;
create view ems.vw_asset_pool_pump_http_poll as
select
pp.site_id,
pp.id as pump_id,
pp.code,
pp.shelly_switch_id,
se.protocol,
se.host,
se.port
from ems.asset_pool_pump pp
join ems.site_endpoint se on se.id = pp.endpoint_id
where se.enabled = true
and se.endpoint_type in ('http_api', 'shelly_http');
comment on view ems.vw_asset_pool_pump_http_poll is
'Bazénová čerpadla se Shelly HTTP endpointem pro telemetry_collector (Gen2 RPC polling, 60 s).';