Sound night-report pipeline (v1): automated FTP capture → ingest → morning report #66
Reference in New Issue
Block a user
Delete Branch "feat/ftp-report-pipeline"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What this adds
A daily morning report for 24/7 remote sound jobs (built for John Myler): each
morning, per location, email last night's noise (7 PM–7 AM) vs a baseline,
pulling the meter's own stored 15-min Leq intervals over FTP. The meter is
cycled each morning (stop → download → ingest → re-index → restart) and the
report runs off the just-finalized folder.
Highlights
LN→percentile map read from the device's own
.rnh. Two baseline modes(captured = weekly average; reference = typed per-location limits).
REPORT_SMTP_*), dry-run when unconfigured.SoundReportConfig+ a morning scheduler tick._execute_cycle) — stop → download → ingest → restart →DOD restart-verify, with one safe restart-retry before alerting.
Field-tested on a real NL-43 (clean cycle: 1 Leq / 0
_Lp_/ real ~26 hduration / restart verified).
endpoints all funnel through one ingest core (Leq-only,
.rnhparsed,deduped, unit-linked).
recipients/test-email), per-NRL Data Files tab brought to parity with the
project-wide tab.
fleet context).
Notable fixes
.rnhcarries no measurement timestamps — session start/stop/duration are now derived from the Leq rows. (Also fixes NL-43 dedupe.)
window.FtpBrowser— fixes a globalfunction collision that broke "Browse Files" on the NRL page.
Deploy notes
migration —
sound_report_configsis a new table created on startup.REPORT_SMTP_HOST/PORT/SECURITY/USER/PASSWORD/FROM/RECIPIENTSto send;until then reports still build to
data/reports/…in dry-run.the report (~8:00 AM) + set the baseline.
Not yet / follow-ups
run a Night Report against a real session next); SMTP relay creds pending.
use the project Schedules tab for now.
windowing, a few input-guard nits.
is parked for a later pass.
Merge note
Portal files show up in this diff only because the branch carried an older
client-portal snapshot (from an earlier
devmerge);devhas since landedPortal Auth Phase 1. Resolve those conflicts to
dev's version — net portalbehavior is unchanged from
dev; this PR only adds the sound report pipeline.🤖 Generated with Claude Code