; ============================================================================== ; Sample config.ini file (remember to rename this sample file to config.ini) ; PMU DATA COLLECTOR - CONFIGURATION (MyPiPDC Pi + SEL-735) ; Host: pdcpi ; This is the ONLY file you should need to edit to replicate this project. ; Lines starting with ; are comments. ; ============================================================================== [general] station_name = MyPiPDC ; Where all data lives (db/, logs/, backups/ are created under this) data_dir = /mnt/pmu_data log_level = INFO ; DEBUG, INFO, WARNING, ERROR log_max_mb = 10 log_keep_files = 5 [database] filename = pmu.db batch_seconds = 1.0 ; group inserts into transactions this often [heartbeat] interval_sec = 60.0 ; heartbeat cadence for all signals ; ------------------------------------------------------------------------------ ; One [device:...] section per meter. Copy a block to add devices. ; Set enabled = false to skip one. ; ------------------------------------------------------------------------------ ;---- SEL-735 at MyPiPDC location (IEEE C37.118 over Ethernet) ---- ;Meter side: EPMIP:=1, PMOTS1:=TCP, PMOTCP1:=4712, PMOIPA1:=, ;MRATE:=60, PHDATAV:=PH, PHDATAI:=NA, NUMANA:=0, PMID:=. ;Also required for valid data: VBASE set to nominal, UTC_OFF matching the ;IRIG source, and an IRIG-B clock with C37.118 control bits (SEL-2488). [device:my_735] enabled = true name = My SEL-735 ; protocol: c37118 = SEL-735 (IEEE C37.118 over Ethernet) ; sel_fastmsg = SEL-734 (SEL Fast Message over Ethernet/Telnet) protocol = c37118 ip = 192.168.1.2 ; <-- EDIT: meter IP address port = 4712 ; matches PMOTCP1 in the meter idcode = 1 ; <-- EDIT: must match PMID in the meter data_rate = 60 ; matches MRATE in the meter connect_timeout_sec = 10 reconnect_delay_sec = 5 ; Which voltage phasor channel to record. "auto" = first voltage phasor. ; With PHDATAV := PH the SEL-735 streams VA, VB, VC. Naming the channel ; explicitly is safer than auto - it survives a meter settings change. voltage_channel = VA voltage_nominal = 120.0 ; <-- EDIT: volts PRIMARY (match VBASE/PTR) ; Deadband WIDTH as a percent of nominal (e.g. 1.0% of 120 V = +/-1.2 V). ; The band is CENTERED ON THE ROLLING BASELINE (a slow moving average of ; the quiescent level, see rolling_baseline_time_const below), not on ; nominal - the width is fixed, the center follows the quiescent signal. voltage_band_pct = 4.0 ; Recording continues this long after the signal returns to band. ; MUST be > 1: the average of the last 1 s of each event becomes the ; new baseline, so recording resumes centered on the settled level. voltage_post_trig_sec = 10.0 freq_nominal = 60.0 ; Hz freq_band_hz = 0.08 ; band half-width in Hz, centered on rolling baseline freq_post_trig_sec = 5.0 ; must be > 1 (same re-seed rule as voltage) ; Capture-all overrides: store EVERY sample for that signal, deadband or ; not. Events/triggers still detected and summarized as usual; heartbeats ; and pre_trig become moot for that signal. VOLUME WARNING: 20/s is ~1.7M ; rows/day per signal per device (60/s is ~5.2M) and the nightly backup ; grows to match. Default false. capture_all_voltage_samples = false capture_all_freq_samples = false ; Time constant (s) of the rolling baseline EMA, both signals. Long enough ; that daily drift is followed but a fast sag/swell edge cannot be chased. ; The baseline FREEZES during an event; band-return is judged against the ; frozen pre-event value. rolling_baseline_time_const = 60.0 ; Safety cap: an event that never returns to band (e.g. a tap change that ; settles at a new level) is force-closed after this many seconds and the ; baseline re-seeds at the new level. Must exceed both post_trig_sec values. max_event_sec = 120.0 [backup] ; Gates backup.py: if false, backup.py exits without doing anything. ; Turn on AFTER "rclone config" has been run on this Pi. ; The SCHEDULE is owned by cron (backup.py runs once per invocation). enabled = true ; <-- set true once rclone is configured compress = true keep_local_copies = 7 number_of_24h_snaps = 30 ; Rolling 24-hour snapshots (in addition to the normal nightly backup). ; Each run also writes a gzipped copy containing ONLY the last 24 h of data, ; measured back from the newest sample in the db, then VACUUMed to minimum ; size. Same file structure as a normal backup, so the viewers open them ; identically. Files live under /backups/_24h/ and, when a ; rclone_remote is set, are uploaded to a matching _24h folder under it ; (e.g. dropbox:pmu_project/_24h). The oldest local files are pruned so only ; this many are kept. Minimum 0; 0 = off (none created). ; NOTE: status.py uploads a file literally named status.txt, so sharing ; an rclone project with the another pi pdc would have the two sites ; overwrite each other's status file. ;rclone_remote = dropbox:/folder/mypipdc ;rclone_path = rclone ; or full path to rclone binary [platform] power_check = auto ; auto = run vcgencmd only on a Raspberry Pi watchdog = auto ; reserved for Pi hardware watchdog integration