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! 🦊
This commit is contained in:
2025-12-16 16:28:07 -06:00
parent 6ecdf998c1
commit ae2bd94006
6 changed files with 749 additions and 2 deletions

View File

@@ -41,10 +41,28 @@ cd server
./setup.sh --with-audio # Video + audio
```
### `/collector` - Event Collector (Mac mini)
Receives and stores events from camera servers.
- FastAPI service listening on port 8780
- SQLite database for events
- Snapshot storage
- launchd service for macOS
**Setup:**
```bash
cd collector
./setup-macos.sh
launchctl load ~/Library/LaunchAgents/com.vixy.vision-collector.plist
```
### `/mcp` - MCP Client (Mac mini)
Model Context Protocol server for Claude Desktop.
- `vision_get_cams()` - List cameras with status
- `vision_snap(cam_id)` - Get snapshot
- `vision_get_events()` - Query motion events
- `vision_get_event_snapshot(id)` - View event image
- `vision_annotate_event(id, text, tags)` - Add meaning
- `vision_event_stats()` - Statistics
- Supports HTTP and RTSP cameras
### `/analysis` - Detection & Classification
@@ -100,10 +118,11 @@ Create `~/.vision_setup.json`:
- [x] Camera snapshots via HTTP API
- [x] RTSP stream support
- [x] MCP integration
- [ ] Motion detection events
- [x] Motion detection events
- [x] Event collector service
- [x] Event query & annotation tools
- [ ] Audio capture on edge devices
- [ ] Audio classification (YAMNet on Orin)
- [ ] Event journal integration
- [ ] Pebble watch alerts
## Built By