Files
sdr-recorder/openspec/changes/archive/2026-03-21-recording-cleanup-cron/proposal.md
Michael Smith 94fdaf7644 Add recording cleanup container to remove noise files
Alpine-based sdr-cleanup container runs a find loop every 5 minutes,
deleting MP3 files under 3 KB (configurable via SIZE_THRESHOLD env var)
to keep the web browser and Samba share free of false-positive recordings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 18:32:17 +00:00

1.1 KiB

Why

Despite tuning squelch thresholds and FFT settings, the SDR recorder still produces many small files triggered by noise rather than real CB transmissions. These clutter the web browser and Samba share, making it tedious to find actual recordings. A periodic cleanup job will automatically remove files that are too small to contain meaningful audio.

What Changes

  • Add a cleanup shell script that deletes MP3 files below a configurable size threshold (default: 3 KB)
  • Install a cron job on the Pi host that runs the script frequently (every 5 minutes)
  • The script and cron entry are version-controlled in this repo for documentation and tunability

Capabilities

New Capabilities

  • recording-cleanup: Automated periodic deletion of recordings below a configurable file-size threshold

Modified Capabilities

None.

Impact

  • New file: cleanup script in the repo, deployed to the Pi host
  • Host crontab on sdr-pi will be modified to schedule the job
  • Recordings directory (/home/m/recordings/) will have small files automatically removed
  • No container or docker-compose changes required — this runs directly on the host