aero-pi-cam logo

aero-pi-cam

A Python 3.13 background service for Raspberry Pi that captures images from an IP camera via RTSP/ffmpeg on a day/night schedule and uploads them via API or SFTP.

Quality Check pages-build-deployment

Features

Note: All timestamps and time calculations use UTC (Coordinated Universal Time) exclusively, ensuring compliance with aeronautical standards.

Requirements

Installation

Follow these steps one by one. Copy and paste each command into your terminal.

Step 1: Create a virtual environment

This creates an isolated space for the software so it doesnโ€™t interfere with other programs:

python3 -m venv ~/aero-pi-cam-venv

Verify Step 1 completed successfully:

ls -d ~/aero-pi-cam-venv && echo "โœ… Virtual environment created successfully!" || echo "โŒ Virtual environment creation failed. Try running: python3 -m venv ~/aero-pi-cam-venv"

๐ŸŽ‰ Congratulations! Step 1 complete. Youโ€™ve created the virtual environment.


Step 2: Install the software

Copy and paste this command to install the latest stable version:

~/aero-pi-cam-venv/bin/pip install git+https://github.com/CaenFalaisePlaneurs/aero-pi-cam.git

Note: This will take a few minutes. Wait for it to finish.

Verify Step 2 completed successfully:

~/aero-pi-cam-venv/bin/pip list | grep aero-pi-cam && echo "โœ… Package installed successfully!" || echo "โŒ Package installation failed. Try running: ~/aero-pi-cam-venv/bin/pip install git+https://github.com/CaenFalaisePlaneurs/aero-pi-cam.git"

๐ŸŽ‰ Congratulations! Step 2 complete. The software is now installed.


Step 3: Run the setup

This command will:

Important: This command needs root privileges to write system files. Use sudo without -u:

sudo /home/$(whoami)/aero-pi-cam-venv/bin/python -m aero_pi_cam.setup.setup

Youโ€™ll be asked for your password (for sudo). Type it and press Enter.

Verify Step 3 completed successfully:

ls /etc/aero-pi-cam/config.yaml && echo "โœ… Setup completed successfully!" || echo "โŒ Setup failed. Try running: sudo /home/$(whoami)/aero-pi-cam-venv/bin/python -m aero_pi_cam.setup.setup"

๐ŸŽ‰ Congratulations! Step 3 complete. The system is configured and ready.


Step 4: Configure the software

Edit the configuration file with your camera and upload settings:

sudo nano /etc/aero-pi-cam/config.yaml

What to change:

Press Ctrl+X, then Y, then Enter to save and exit.

Verify Step 4 completed successfully:

grep -q "rtsp_url" /etc/aero-pi-cam/config.yaml && echo "โœ… Configuration file looks good!" || echo "โŒ Configuration file not found or incomplete. Try running: sudo nano /etc/aero-pi-cam/config.yaml"

๐ŸŽ‰ Congratulations! Step 4 complete. Your configuration is saved.


Step 5: Start the service

Start the webcam service:

sudo systemctl start aero-pi-cam

Verify Step 5 completed successfully:

sudo systemctl is-active aero-pi-cam && echo "โœ… Service started successfully!" || echo "โŒ Service failed to start. Check logs with: sudo journalctl -u aero-pi-cam -n 50"

๐ŸŽ‰ Congratulations! Step 5 complete. The service is now running.


Step 6: Check if itโ€™s working

Verify the service is running properly:

sudo systemctl status aero-pi-cam

You should see โ€œactive (running)โ€ in green. Press Q to exit.

Verify Step 6 completed successfully:

sudo systemctl is-active aero-pi-cam && echo "โœ… Service is running perfectly!" || echo "โŒ Service is not running. Try restarting with: sudo systemctl restart aero-pi-cam"

If you see โ€œโœ… Service is running perfectly!โ€, everything is working! โœ…

๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰ Congratulations! Installation complete! ๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰

The webcam will now capture images automatically according to your schedule. Youโ€™re all set!


Viewing Logs

To see what the service is doing:

sudo journalctl -u aero-pi-cam -f

Press Ctrl+C to stop viewing logs.


Service Management

Start the service

sudo systemctl start aero-pi-cam

Stop the service

sudo systemctl stop aero-pi-cam

Restart the service

sudo systemctl restart aero-pi-cam

Check service status

sudo systemctl status aero-pi-cam

Disable auto-start

sudo systemctl disable aero-pi-cam

Enable auto-start

sudo systemctl enable aero-pi-cam

Troubleshooting

Service wonโ€™t start

Check what went wrong:

sudo journalctl -u aero-pi-cam -n 50

Restart the service

If something isnโ€™t working, try restarting:

sudo systemctl restart aero-pi-cam

Check service status

sudo systemctl status aero-pi-cam

Configuration errors

Ensure config.yaml exists and is valid YAML at /etc/aero-pi-cam/config.yaml

Check file permissions:

sudo chown pi:pi /etc/aero-pi-cam/config.yaml

Python/dependency issues

Reinstall the package:

sudo systemctl stop aero-pi-cam
~/aero-pi-cam-venv/bin/pip install --force-reinstall git+https://github.com/CaenFalaisePlaneurs/aero-pi-cam.git
sudo systemctl start aero-pi-cam

Camera connection issues

Test RTSP URL manually:

ffmpeg -rtsp_transport tcp -i "rtsp://..." -frames:v 1 test.jpg

Check camera network connectivity and verify RTSP credentials.

API/SFTP upload issues

Check the service logs for upload errors:

sudo journalctl -u aero-pi-cam -n 50

Verify your API endpoint or SFTP server is accessible and credentials are correct.


Configuration

See config.example.yaml for all configuration options.

To edit your configuration:

sudo nano /etc/aero-pi-cam/config.yaml

EXIF and XMP Metadata

All captured JPEG images automatically include embedded metadata in both EXIF and XMP formats. See Advanced Usage for details.


Upload Methods

The service supports two upload methods: API and SFTP. Configure the method using upload.method in config.yaml. See Advanced Usage for API contract details.


Uninstallation

What gets removed:

What is preserved (intentionally):

Steps:

  1. Stop and disable the service:
    sudo /home/$(whoami)/aero-pi-cam-venv/bin/python -m aero_pi_cam.setup.uninstall
    
  2. Remove the Python package:
    ~/aero-pi-cam-venv/bin/pip uninstall aero-pi-cam
    
  3. (Optional) Remove the virtual environment:
    rm -rf ~/aero-pi-cam-venv
    

Help

We recommend following our installation guides, as no other installation methods are really tested. Help is provided on a volunteer basis by the maintainers. We cannot guarantee response times or provide commercial help.


License

GPL-3.0 - See LICENSE file for details.

This project is open source and available under the GNU General Public License v3.0.

Copyright (C) 2026 Caen Falaise Planeurs