Project Lunaria is inspired by a plant that blooms quietly, drops its seeds, and returns each year. Like the plant, this open-source project grows, spreads, and thrives through the community.
A time-lapse camera system built for Raspberry Pi to capture the growth of your plants, fully open source, built with TypeScript + Node.js.
A small system that captures the beauty of time, one photo at a time. 🌙🌱
- ⏱️ Time-lapse Photography: Takes a photo on configurable interval using Raspberry Pi camera
- 🗂️ Local Storage: Saves photos locally to
/photosfolder - 🌐 Global CLI Tool: Install
lunaria-cliglobally for remote seed management - 📥 Remote Photo Download: Download photos from remote Lunaria seeds via API
- 🎬 Timelapse Video Creation: Generate MP4 timelapse videos with FFmpeg integration
- ⏰ Timestamp Overlays: Add date/time stamps to timelapse videos
- 🔧 Interactive Setup: Guided CLI prompts for seed registration and configuration
Ensure rpicam-still is installed:
sudo apt update
sudo apt install libcamera-appsInstall nodejs:
sudo apt-get install -y nodejs
if not yet installed, install also npm:
sudo apt-get install -y npm
To create timelapse videos with lunaria-cli timelapse, you need FFmpeg installed on your system:
# Install FFmpeg:
brew install ffmpeg
# Verify installation:
ffmpeg -versionsudo apt update && sudo apt install ffmpeg# Using Chocolatey:
choco install ffmpeg
# Or download manually from: https://ffmpeg.org/download.htmlNote: FFmpeg is a system dependency and cannot be installed via npm. It must be installed separately on your operating system.
Now it is time to clone the repository:
Clone the project:
git clone https://github.com/ulemons/project-lunaria.git
cd project-lunaria📦 Build and install the project:
npm install
npm run build
npm install -g .For faster development iterations, use these convenient scripts:
# Build and install globally in one command
npm run dev
# Force reinstall (useful when making changes)
npm run update-cliOnce installed globally, you can use the lunaria-cli command from anywhere on your system.
Once installed you can find available commands using:
# Show help and available commands
lunaria-cli --helpConfigure your Lunaria seed interactively:
lunaria-cli registerThis will prompt you for:
- Plant name (e.g., "Kitchen Basil")
- Location (e.g., "Kitchen")
- Owner name
The configuration is saved as config.json in your project directory.
Quality Settings:
- Low: 720p resolution, faster encoding
- Medium: 1080p resolution, balanced quality/speed (recommended)
- High: 1440p resolution, best quality but slower encoding
To run automatically Lunaria on system boot (es. Raspberry Pi, Linux server), follow these steps:
Open terminal and run:
which node
which npmWrite down the paths (es. /usr/bin/node, /usr/local/bin/npm).
Find the project path, for example:
/home/ubuntu/project-lunariaOpen the service file:
sudo nano /etc/systemd/system/lunaria.servicePaste the following text (edit WorkingDirectory, ExecStart, User e PATH if needed):
[Unit]
Description=Automatic start of project Lunaria
After=network.target
[Service]
ExecStart=/usr/local/bin/npm run start
WorkingDirectory=/home/ubuntu/project-lunaria
Restart=always
User=ubuntu
Environment=PATH=/usr/local/bin:/usr/bin:/bin
Environment=NODE_ENV=production
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.targetNote: replace
ubuntuwith your username (retrieved withwhoami).
sudo systemctl daemon-reexec
sudo systemctl daemon-reload
sudo systemctl enable lunaria.service
sudo systemctl start lunaria.serviceCheck service state:
sudo systemctl status lunaria.serviceMonitor live logs:
journalctl -u lunaria.service -f- Runtime: Node.js with TypeScript (ES2020)
- Core Dependencies:
- Express 5.1.0 (Web API framework)
- Cron 4.3.3 (Scheduled photography)
- UUID 13.0.0 (Unique identifiers)
- Video Processing: FFmpeg (external dependency)
| Device | OS | Status | Note |
|---|---|---|---|
| Raspberry Pi Zero W 1.1 | ❌ | Currently unsupported due to hardware limitations. | |
| Raspberry Pi Zero 2 W | Working in progress | ||
| Raspberry Pi 4 | Linux | ✅ | Recommended platform |
This project is licensed under the MIT License.
© 2025 Umberto Sgueglia (ulemons). See LICENSE for details.