Files
ems/db/migration/V028__deye_modbus_export_meta.sql

16 lines
1.0 KiB
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- Metadata pro řidší zápis Deye: čas 6264 (max 1× za minutu Prahy), TOU 36 (1× denně + při změně profilu)
ALTER TABLE ems.asset_inverter
ADD COLUMN IF NOT EXISTS deye_last_system_time_sync_minute TIMESTAMPTZ,
ADD COLUMN IF NOT EXISTS deye_last_tou_inactive_write_prague_date DATE,
ADD COLUMN IF NOT EXISTS deye_tou_inactive_signature TEXT;
COMMENT ON COLUMN ems.asset_inverter.deye_last_system_time_sync_minute IS
'UTC okamžik začátku minuty Europe/Prague, pro kterou byl naposledy EMS úspěšně zapsán čas invertoru (reg 6264). Při exportu ve stejné minutě se 6264 přeskočí.';
COMMENT ON COLUMN ems.asset_inverter.deye_last_tou_inactive_write_prague_date IS
'Kalendářní datum v Europe/Prague posledního zápisu neaktivních TOU řádků 36 (slot index 2…5).';
COMMENT ON COLUMN ems.asset_inverter.deye_tou_inactive_signature IS
'Podpis parametrů neaktivních řádků (HHMM|reserve_soc|tp_discharge_w); při změně se TOU 36 zapíše okamžitě i mimo denní cyklus.';