clio/clio-pi
Your Name b24dd72ae0
Some checks failed
Deploy API / deploy (push) Failing after 1s
Deploy UI / deploy (push) Successful in 1s
Remove redundant cursor styling
2026-05-19 19:48:13 -04:00
..
bin Remove redundant cursor styling 2026-05-19 19:48:13 -04:00
systemd Remove redundant cursor styling 2026-05-19 19:48:13 -04:00
README.md Remove redundant cursor styling 2026-05-19 19:48:13 -04:00
setup.sh Remove redundant cursor styling 2026-05-19 19:48:13 -04:00

Clio Pi

Raspberry Pi recording station for the Clio audio system.

Features

  • Continuous audio recording with ffmpeg (opus codec, 2hr segments)
  • Systemd service for auto-start on boot
  • HTML status page showing recording coverage
  • NTP time sync via chrony
  • SSH key-only access (hardened)

Quick Setup

  1. Flash Raspberry Pi OS Lite to SD card using Raspberry Pi Imager
  2. Configure in Imager: hostname, user/pass, WiFi, enable SSH
  3. Boot and SSH into Pi
  4. Copy this directory to the Pi:
    rsync -avz /work/projects/clio/clio-pi/ pi@<pi-ip>:~/clio-pi/
    
  5. Run setup:
    ssh pi@<pi-ip>
    cd ~/clio-pi
    sudo ./setup.sh
    
  6. Add your SSH key before rebooting:
    ssh-copy-id pi@<pi-ip>
    
  7. Start recording:
    sudo systemctl start record.service
    

Files

clio-pi/
├── setup.sh                    # Main setup script (run with sudo)
├── bin/
│   ├── record.sh               # Recording loop (ffmpeg)
│   └── gen_recording_status.py # Status page generator
├── systemd/
│   └── record.service          # Systemd service unit
└── README.md

Configuration

Edit ~/bin/record.sh environment variables:

Variable Default Description
AUDIO_DEVICE hw:1 ALSA device (run arecord -l to list)
SEGMENT_SECONDS 7200 Segment length (2 hours)
RECORDINGS_DIR ~/recordings Output directory
SOURCE_NAME stationary Filename prefix

Services

Service Description
record.service Recording daemon
chrony NTP time sync
nginx Status page web server

Commands

# Recording service
sudo systemctl start record.service
sudo systemctl stop record.service
sudo systemctl status record.service
journalctl -u record.service -f

# Check time sync
chronyc tracking
timedatectl

# View status page
curl http://localhost/

Syncing Recordings to Server

TODO: Add rsync/sync script to push recordings to server (10.0.0.45)

Audio Device Setup

List available devices:

arecord -l

Example output:

card 1: Device [USB Audio Device], device 0: USB Audio [USB Audio]

This would be hw:1,0 or just hw:1.