Install
openclaw skills install webcam-monitorWebcam motion detection and monitoring system for WSL2 with USB/IP passthrough. Use when setting up motion detection on a USB webcam, monitoring camera snapshots, auto-analyzing images with AI, or managing webcam-based security/activity monitoring. Supports Insta360 Link and other UVC cameras via usbipd on Windows.
openclaw skills install webcam-monitorComplete webcam motion detection and monitoring system for WSL2 environments.
This skill provides:
Windows Side (PowerShell as Admin):
winget install usbipd
usbipd list
usbipd bind --busid=1-4
usbipd attach --wsl --busid=1-4
WSL2 Side:
ls /dev/video* # Should show /dev/video0
Note: If /dev/video* does not appear, you may need to restart WSL2:
# In Windows PowerShell:
wsl --shutdown
# Then re-attach the camera:
usbipd attach --wsl --busid=1-4
python3 scripts/motion_detector_headless.py
~/.openclaw/workspace/camera/snapshots/~/.openclaw/workspace/camera/motion.logpython3 scripts/watcher_with_cleanup.py
~/.openclaw/workspace/camera/watcher.logpython3 scripts/web_preview.py
Edit scripts/motion_detector_headless.py:
MOTION_THRESHOLD — Sensitivity (lower = more sensitive, default: 25)MIN_CONTOUR_AREA — Minimum motion area (default: 500)SNAPSHOT_COOLDOWN — Seconds between snapshots (default: 5)MAX_AGE_HOURS — Auto-cleanup threshold (default: 1)| Script | Purpose |
|---|---|
motion_detector_headless.py | Background motion detection daemon |
watcher_with_cleanup.py | Folder monitor + auto-cleanup + analysis queue |
web_preview.py | Web-based live preview (port 8081) |
snapshot.sh | Quick manual snapshot |
cleanup.py | Manual cleanup of old snapshots |
~/.openclaw/workspace/camera/snapshots/~/.openclaw/workspace/camera/motion.log~/.openclaw/workspace/camera/watcher.log~/.openclaw/workspace/camera/analysis_queue/# Check USB passthrough
ls /dev/video*
If no video devices appear, restart WSL2:
# In Windows PowerShell:
wsl --shutdown
# Then re-attach the camera:
usbipd attach --wsl --busid=1-4
Then verify in WSL2:
ls /dev/video* # Should now show /dev/video0
sudo chmod 666 /dev/video0
Only one program can use the camera at a time:
# Stop motion detection
pkill -f motion_detector
# Stop web preview
pkill -f web_preview
# Stop watcher
pkill -f watcher
The watcher can queue snapshots for AI analysis. To identify people:
MEMORY.md with person details:### Webcam Identification
- **Person:** [Name]
- **Appearance:** [Description - include hair, jewelry, clothing, wigs if applicable]
- **Setting:** [Location details]
Example:
### Webcam Identification
- **Person:** Jade
- **Appearance:** Middle-aged, light-colored/graying hair (short, receding), often wears star-shaped pendant necklace, sometimes in bathrobe/robe when at desk, sometimes wears shoulder-length hair wig
- **Setting:** Home office with black mesh chair, cat tree, bookshelves
By default, snapshots older than 1 hour are automatically deleted every 5 minutes.
To change:
CLEANUP_INTERVAL in watcher_with_cleanup.py (seconds)MAX_AGE_HOURS in watcher_with_cleanup.py (hours)The watcher creates queue files in analysis_queue/ that can trigger automatic image analysis by the main agent. Check for new queue files and analyze with:
# Example: Check queue and analyze
queue_dir = Path.home() / ".openclaw/workspace/camera/analysis_queue"
for queue_file in queue_dir.glob("analyze_*.txt"):
image_path = queue_file.read_text().strip()
# Analyze image with image tool