🧪 Skills
reCamera Intellisense
Registers reCamera devices, configures AI detection models/rules/schedules, monitors and clears detection events, fetches event snapshots, and runs manual im...
v1.0.1
Description
name: recamera-intellisense description: Registers reCamera devices, configures AI detection models/rules/schedules, monitors and clears detection events, fetches event snapshots, and runs manual image/video capture. Uses local Python CLI scripts with JSON I/O. Triggers on camera onboarding, detection setup, event polling, snapshot capture, or reCamera automation tasks. metadata: { "openclaw": { "emoji": "📷", "requires": { "bins":["python3"], "config_paths":["~/.recamera/devices.json"] } } } user-invocable: true
reCamera Intellisense
Requirements
python3(no external packages)- Reachable reCamera HTTP API (default port
80) - Credentials stored in
~/.recamera/devices.json(created automatically; declared in skill metadata)
Security considerations
- Credential storage: Device tokens are stored in
~/.recamera/devices.json. Protect this file with appropriate permissions (chmod 600) and do not place unrelated secrets there. - Plain HTTP transport: Communication to devices uses HTTP (port 80) by default — data including images and tokens travels unencrypted. Configure HTTPS on your devices if operating on untrusted networks.
- Trusted networks only: The skill polls devices and downloads snapshot/image files. Only use it with cameras on networks you trust.
- Camera-specific tokens: Use dedicated per-camera tokens (
sk_xxx). Do not reuse tokens shared with cloud services. - Source review: The bundle includes full Python sources under
scripts/. Review them to verify behavior matches your expectations before granting autonomous execution.
Scripts
All scripts live under {baseDir}/scripts and accept one JSON object as CLI argument (optional for detect_local_device and list_devices).
device_manager.py: add/update/remove/list/get device credentials, file downloaddetection_manager.py: models, schedule, rules, events, event-image fetchcapture_manager.py: capture status/start/stop, one-shot image capture
Full API signatures and CLI schemas: See REFERENCE.md
Agent rules
- Always pass complete JSON; never use interactive prompts.
- Use exactly one of
device_name(preferred) or inlinedevice. - Auth token format:
sk_xxx(from Web Console → Device Info → Connection Settings → HTTP/HTTPS Settings). - To detect by label name: call
get_detection_models_info, map name → label index, use index inlabel_filter. - Poll
get_detection_eventsevery 1–10s; passstart_unix_msfor incremental reads. - Prefer event metadata first; fetch images only when needed.
- CLI output: success = JSON on stdout (mutating commands may produce no stdout, check exit code
0); failure = actionable stderr. On error, surface stderr and provide one concrete fix.
Execution checklist
Copy and track for multi-step tasks:
reCamera Task Progress
- [ ] Resolve device (device_name or inline device)
- [ ] Validate JSON arguments
- [ ] Run CLI command
- [ ] If polling, checkpoint start_unix_ms
- [ ] Handle errors with one fix suggestion
CLI quickstart
Run from {baseDir}:
python3 scripts/device_manager.py add_device '{"name":"cam1","host":"192.168.1.100","token":"sk_xxxxxxxx"}'
python3 scripts/device_manager.py list_devices
python3 scripts/detection_manager.py get_detection_models_info '{"device_name":"cam1"}'
python3 scripts/detection_manager.py set_detection_model '{"device_name":"cam1","model_id":0}'
python3 scripts/detection_manager.py get_detection_events '{"device_name":"cam1"}'
python3 scripts/detection_manager.py clear_detection_events '{"device_name":"cam1"}'
python3 scripts/detection_manager.py fetch_detection_event_image '{"device_name":"cam1","snapshot_path":"/mnt/.../event.jpg","local_save_path":"./event.jpg"}'
python3 scripts/capture_manager.py capture_image '{"device_name":"cam1","local_save_path":"./capture.jpg"}'
Python pattern (long-running automation)
from datetime import datetime, timezone
import sys
sys.path.append("./scripts")
from device_manager import get_device
from detection_manager import get_detection_events
device = get_device("cam1")
events = get_detection_events(device, start_unix_ms=int(datetime.now(timezone.utc).timestamp() * 1000))
Use a loop with checkpointed start_unix_ms for incremental polling.
Workflows
Onboard a device
add_devicewith host + token.list_devicesto verify.
Configure object detection by name
get_detection_models_info→ map object name to label index.set_detection_model.set_detection_ruleswithlabel_filtercontaining the index.clear_detection_eventsto start fresh.
Monitor events
- Poll
get_detection_eventswithstart_unix_msevery 1–10s. - Track last timestamp for next poll.
- Fetch images only when needed via
fetch_detection_event_image.
On-demand snapshot
- CLI:
capture_imagewithlocal_save_path→ returns{capture, saved_path, bytes}. - Python:
capture_image→ persist returnedcontentbytes. - Alternative:
fetch_detection_event_imagewithlocal_save_path.
Troubleshooting
| Symptom | Fix |
|---|---|
| 401/403 auth error | Re-copy token from Web Console |
| Timeout / connection refused | Verify host, network path, device power |
| Schedule rejected | Use Day HH:MM:SS format |
| Empty rules or events | Enable rule/storage prerequisites; check region filter; poll more frequently |
| Image fetch failed | Use fresh snapshot_path; data may rotate out |
| Import errors in Python mode | Run from {baseDir}; append ./scripts to sys.path |
Reviews (0)
Sign in to write a review.
No reviews yet. Be the first to review!
Comments (0)
No comments yet. Be the first to share your thoughts!