Skip to content

mapmanager/picalapse

Repository files navigation

Picalapse

Headless Raspberry Pi timelapse camera controller built on Picamera2/libcamera.

Requirements

  • Python >= 3.11
  • Raspberry Pi OS (Trixie, 64-bit)
  • Raspberry Pi Camera Module 3 (Phase 1)

Picamera2 / libcamera in a uv workflow (Raspberry Pi OS)

Picamera2 depends on the system libcamera Python bindings, which are provided by APT (python3-libcamera). A normal virtualenv does not see system site-packages, so uv run python -c "from picamera2 import Picamera2" may fail with:

ModuleNotFoundError: No module named 'libcamera'

Install system camera packages

sudo apt update
sudo apt install -y python3-libcamera python3-picamera2 libcamera-apps

Create a venv that can see system packages

cd /home/pi/picalapse
rm -rf .venv
python3 -m venv --system-site-packages .venv

Install picalapse (but do not pip-install Picamera2)

uv pip install -e ".[dev]" --no-deps

or install (venv + pip)

. .venv/bin/activate
pip install -e ".[dev]" --no-deps

run

uv run picalapse serve --port 8888 --config ./picalapse.toml

or

python -m picalapse serve --port 8888 --config ./picalapse.toml

Camera busy (MotionEye / other process holds the camera)

If you see errors like:

  • Failed to acquire camera: Device or resource busy
  • Pipeline handler in use by another process

then another service has the camera open (e.g. MotionEye).

Stop it and retry:

sudo systemctl stop motioneye
uv run picalapse serve

You can confirm cameras are detected with:

libcamera-hello --list-cameras

About

Headless Raspberry Pi timelapse camera controller built on Picamera2/libcamera.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published