- Remove main_cycling.py, main_multi.py, main_release.py (single main.py is canonical) - Update setup.sh to read SERVICE_NAME and PORT from .env - Update env.example with SERVICE_NAME and PORT for multi-instance support - Fix server-csi to try rpicam-still before libcamera-still (Debian Trixie) Deploy pattern: clone repo twice, configure each .env, run setup.sh Each instance gets its own systemd service and install directory.
56 lines
1.3 KiB
Plaintext
56 lines
1.3 KiB
Plaintext
# vixy-vision Server Configuration
|
|
# Copy to .env and customize
|
|
|
|
# ============ Required ============
|
|
|
|
# API Key for authentication (generate with: python3 -c 'import secrets; print(secrets.token_urlsafe(32))')
|
|
API_KEY=your-secret-key-here
|
|
|
|
# Camera identifier (used in events and API responses)
|
|
CAMERA_ID=basement
|
|
|
|
# ============ Service Settings ============
|
|
|
|
# Service name for systemd (allows multiple instances)
|
|
SERVICE_NAME=vixy-vision-basement
|
|
|
|
# Port to run on (each instance needs unique port)
|
|
PORT=8443
|
|
|
|
# ============ Camera Settings ============
|
|
|
|
# Camera device index (0 = /dev/video0, 2 = /dev/video2, etc.)
|
|
CAMERA_INDEX=0
|
|
|
|
# Resolution (camera will use closest supported)
|
|
CAMERA_WIDTH=1920
|
|
CAMERA_HEIGHT=1080
|
|
|
|
# JPEG quality (1-100)
|
|
JPEG_QUALITY=85
|
|
|
|
# ============ Motion Detection ============
|
|
|
|
# Enable motion detection (true/false)
|
|
MOTION_ENABLED=true
|
|
|
|
# Pixel difference threshold (lower = more sensitive)
|
|
MOTION_THRESHOLD=25
|
|
|
|
# Minimum % of frame that must change to trigger event
|
|
MOTION_MIN_AREA=0.5
|
|
|
|
# Seconds between motion events (prevents spam)
|
|
MOTION_COOLDOWN=5.0
|
|
|
|
# Seconds between frame checks
|
|
MOTION_INTERVAL=0.5
|
|
|
|
# ============ Event Collector ============
|
|
|
|
# URL to POST motion events to (collector on Mac mini)
|
|
COLLECTOR_URL=http://macmini.local:8780/events
|
|
|
|
# API key for collector (optional)
|
|
COLLECTOR_API_KEY=
|