Record camera streams 24/7 and search footage by natural language description. Supports multiple cameras simultaneously. Setup takes 2 minutes. Sign up at https://kamiclaw-skill.kamihome.com for 200 free credits.
IntentTrigger WordsStart recordingstart record, start recording, start camera, start monitor, launch streamStop recordingstop record, stop recording, stop camera, stop monitor, kill recordingCheck statusrecording status, camera status, is recording, check statusSearch videosearch video, find video, find clip, look for, search footageList recentrecent events, recent clips, list events, what happened, show recentView logsshow logs, view logs, recording logs, check logs
If no trigger word matches, use semantic understanding to route to the closest intent.
Run the setup script to create the virtual environment (Python 3.10+) and install dependencies:
bash
bash {baseDir}/setup.sh
Before EVERY recording start, follow this flow to confirm camera configuration with the user.
Read config from {baseDir}/stream_config.json
Check KAMI_API_KEY - if empty, tell user to get one at https://kamiclaw-skill.kamihome.com
Ask user: "How many cameras do you want to record?"
For each camera, confirm or collect:
DEVICE_ID: Camera location identifier (e.g., front-door, living-room, garage)STREAM_URL: Camera RTSP stream URL (e.g., rtsp://admin:pass@192.168.1.100:554/stream1)Display summary of all cameras to be recorded, ask for confirmation
Update config if needed, write back to {baseDir}/stream_config.json
Only after user confirms → start recording
X-API-Key header). Required for video description and search.sk_live_KAMI_API_RETRY times. All fail → recording stops.Each camera in the cameras array requires:
front-door, living-room, garage, backyardcv2.VideoCapture()rtsp://username:password@IP:port/pathrtsp://user:pass@ip:554/Streaming/Channels/1, Dahua: rtsp://user:pass@ip:554/cam/realmonitor?channel=1&subtype=0)MAX_RECONNECT times). All retries fail → that camera's recording stops.Scenario A: First-time setup (no cameras configured)
cameras arrayScenario B: Partial config (some cameras missing info)
Scenario C: All cameras already configured
json
{
"KAMI_API_KEY": "sk_live_xxx",
"KAMI_API_URL": "https://kamiclaw-skill-api.kamihome.com/v1/detect",
"RETENTION_DAYS": 3,
"cameras": [
{
"DEVICE_ID": "front-door",
"STREAM_URL": "rtsp://admin:pass@192.168.1.100:554/stream1"
},
{
"DEVICE_ID": "living-room",
"STREAM_URL": "rtsp://admin:pass@192.168.1.101:554/stream1"
}
]
}
Per-camera entries can also override any top-level parameter (e.g. different resolution for a specific camera):
json
{
"DEVICE_ID": "garage",
"STREAM_URL": "rtsp://admin:pass@192.168.1.102:554/stream1",
"OUTPUT_WIDTH": 1280,
"OUTPUT_HEIGHT": 720
}
After user confirms: read config → update changed fields → write back → start recording.
If the config has no cameras array but has top-level STREAM_URL and DEVICE_ID, treat it as a single-camera setup (legacy mode).
MUST show this table to the user when configuring cameras, so they can pick a URL pattern based on their brand:
Brand keyBrandURL patternhikvisionHikvisionrtsp://{user}:{pwd}@{ip}:554/Streaming/Channels/101 ( 101 =ch1 main, 102 =ch1 sub)dahuaDahuartsp://{user}:{pwd}@{ip}:554/cam/realmonitor?channel=1&subtype=0 ( subtype=0 main, 1 sub)tplinkTP-Linkrtsp://{user}:{pwd}@{ip}:554/stream1 ( stream1 main, stream2 sub)ezvizEZVIZrtsp://admin:{verify_code}@{ip}:554/H264/ch1/main/av_stream``univiewUniviewrtsp://{user}:{pwd}@{ip}:554/media/video1``reolinkReolinkrtsp://{user}:{pwd}@{ip}:554/h264Preview_01_main
For 24/7 recording prefer the main stream (better quality for later playback).
All commands use .venv/bin/python and stream_recoder2.py with --config {baseDir}/stream_config.json.
The --device parameter is optional and accepts comma-separated DEVICE_IDs. If omitted, the command operates on ALL configured cameras.
Start all cameras:
bash
{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --start-daemon --log-file {baseDir}/stream_recorder.log
Start specific camera(s):
bash
{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --start-daemon --log-file {baseDir}/stream_recorder.log --device front-door
bash
{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --start-daemon --log-file {baseDir}/stream_recorder.log --device front-door,living-room
Parse JSON output: status: "started" → show PID; status: "already_running" → show PID; error → show message. For multiple cameras, output contains a cameras array with per-camera results.
Stop all cameras:
bash
{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --stop-daemon
Stop specific camera(s):
bash
{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --stop-daemon --device front-door
All cameras:
bash
{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --status
Specific camera(s):
bash
{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --status --device front-door,living-room
Search across all cameras:
bash
{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --search "QUERY" --json
Search specific camera(s):
bash
{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --search "QUERY" --json --device front-door
With time range (format YYYY-MM-DD_HH:MM:SS):
bash
{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --search "QUERY" --time-start "START" --time-end "END" --json
Natural language time ("today morning", "yesterday afternoon") → convert to YYYY-MM-DD_HH:MM:SS.
bash
{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --list HOURS --json
With device filter:
bash
{baseDir}/.venv/bin/python {baseDir}/stream_recoder2.py --config {baseDir}/stream_config.json --list HOURS --json --device front-door
Default HOURS to 24 if not specified.
bash
tail -100 {baseDir}/stream_recorder.log
For privacy policy and data handling details, visit https://kamiclaw-skill.kamihome.com/privacy
Respond in the same language the user uses.