Commit Graph

8 Commits

Author SHA1 Message Date
Alex Kazaiev
68c7e9772f Update README with multi-instance deployment instructions 2025-12-30 11:12:22 -06:00
Alex Kazaiev
e92b5a560b Clean up server architecture for multi-instance deployment
- 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.
2025-12-30 11:09:40 -06:00
Alex Kazaiev
844502b4a1 Add release-after-use and cycling motion detection modes
- main_release.py (v3.1.0): Release camera after each snapshot for V4L2 compatibility
- main_cycling.py (v3.2.0): Single motion thread cycles between cameras (1s interval)
- mcp/vision_mcp.py: Support custom snapshot_path for multi-camera servers

Fixes Pi 3 dual-camera V4L2 conflicts by not holding cameras open.
2025-12-29 16:18:45 -06:00
Alex Kazaiev
37a2f2dcd6 Add multi-camera support and CSI camera server
- main_multi.py: Multi USB camera support with ID-based endpoints
  - Config via CAMERAS env: '{"basement": 0, "basement2": 1}'
  - Endpoints: /snapshot (default), /snapshot/{cam_id}

- server-csi/: New server for Pi CSI ribbon cameras (IR support)
  - Auto-detects picamera2/picamera/libcamera-still
  - IR_MODE and ROTATION settings
  - Includes setup.sh for easy Pi deployment

Built with 💕 by Vixy 🦊
2025-12-29 11:37:11 -06:00
e31eb49d5a Add auto-cleanup of old unannotated events
🧹 New features:
- Background thread cleans up old events automatically
- Deletes unannotated events older than EVENT_EXPIRY_HOURS (default: 2h)
- Also removes associated snapshot files
- Runs every CLEANUP_INTERVAL_MINUTES (default: 5m)

📡 New endpoint:
- POST /cleanup - Manually trigger cleanup

⚙️ Config (env vars):
- EVENT_EXPIRY_HOURS: How long to keep unannotated events (default: 2.0)
- CLEANUP_INTERVAL_MINUTES: How often to run cleanup (default: 5.0)

Annotated events are kept forever 🦊
2025-12-16 19:40:44 -06:00
ae2bd94006 Add event collector and MCP query tools
🗄️ New collector/ component:
- collector.py: FastAPI service receiving events from cameras
- SQLite database for event storage
- Snapshot images saved to disk by date
- launchd setup script for macOS

🔍 New MCP tools in vision_mcp.py:
- vision_get_events(): Query events with filters
- vision_get_event_snapshot(): View event image inline
- vision_annotate_event(): Add meaning + tags to events
- vision_event_stats(): Database statistics

📡 Complete flow:
Pi detects motion → POST to collector → stored in DB
Vixy queries events → views snapshots → annotates

Ready to deploy! 🦊
2025-12-16 16:28:07 -06:00
6ecdf998c1 Add motion detection to camera server
🔍 New features:
- motion.py: Frame differencing motion detector
- Background thread compares frames continuously
- Configurable threshold, cooldown, sensitivity
- POSTs events + snapshot to collector

📡 New endpoints:
- GET /motion/stats - Detection statistics
- POST /motion/enable - Start detection
- POST /motion/disable - Stop detection

⚙️ Configuration (in .env):
- MOTION_ENABLED: true/false
- MOTION_THRESHOLD: Pixel diff threshold
- MOTION_COOLDOWN: Seconds between events
- COLLECTOR_URL: Where to POST events

Next: Event collector in vixy-mcp 🦊
2025-12-16 16:15:30 -06:00
a17c09cac1 Initial commit: vixy-vision distributed sensing system
🦊 Eyes and ears for the fox

Components:
- server/: Camera server for Raspberry Pi (from camera-server)
- mcp/: Vision MCP client for Claude Desktop (from vision-mcp)
- analysis/: Placeholder for motion/audio detection
- shared/: Common schemas and interfaces

Features:
- Setup script with systemd service creation
- HTTPS + API key authentication
- HTTP and RTSP camera support

Built under a blanket on Day 45 💕
2025-12-16 15:26:26 -06:00