Kami 智能家居技能套件。一键安装整个 Kami 智能家居生态系统,中心化配置(API 密钥、摄像头、通知)—— n...
Kami SmartHome Suite is the one-stop installer for the kami-smarthome ecosystem. By installing this single skill, users get:
configure.sh --distribute to syncConfigure once, run everywhere — one config file controls all skills.
This suite bundles the following 6 standalone skills:
#SkillEmojiDescriptionUse case1kami-package-detection📦Continuous package/parcel monitoring on RTSP streams using YOLO-World ONNX with smart notificationDoorstep delivery alerts2kami-image-search🔍Periodic frame capture + VLM captioning + FAISS index for natural-language image searchSearch historical frames3kami-video-search📹Continuous video segmentation + VLM scene description + natural-language clip searchSearch historical clips4kami-fall-detection🚨Frame-difference detection + KamiClaw cloud inference for fall eventsElder / lone-resident care5kami-conflict-detection🥊Multi-person physical conflict (fight/shove) detection with event-driven alarm JSONSecurity alerting6kami-suspicious-person🕵️Stranger recognition via SCRFD + ArcFace, detects unregistered face loiteringDoorway / stranger-loiter alerts
text
kami-smarthome-suite (this skill — installer entry point)
├── kami-package-detection ── Package / delivery detection
├── kami-image-search ── Image search
├── kami-video-search ── Video recording & search
├── kami-fall-detection ── Fall detection (cloud API)
├── kami-conflict-detection ── Conflict / fight detection
└── kami-suspicious-person ── Stranger / suspicious-person detection
All Kami SmartHome skills are published on ClawHub and installed via clawhub install.
bash
# Install the suite
clawhub install kami-smarthome-suite
# Run setup.sh — auto-installs all 6 skills + guides centralized config
bash {baseDir}/setup.sh
setup.sh performs:
python3.10-venv sudo dependency)Idempotent — re-running will not reinstall skills that are already present.
You can also install specific skills directly from ClawHub:
bash
clawhub install kami-package-detection
clawhub install kami-image-search
clawhub install kami-video-search
clawhub install kami-fall-detection
clawhub install kami-conflict-detection
clawhub install kami-suspicious-person
After individual installs, run bash {baseDir}/configure.sh to apply unified configuration.
Agent behavior: when this skill is triggered, follow this order:
Check whether sub-skills are installed (any missing sub-skill directory means "not installed") → if missing, run
bash {baseDir}/setup.shCheck whether
kamiclaw_api_keyis empty in{baseDir}/kami_config.json→ if so, prompt the userCheck whether
camerasis empty in{baseDir}/kami_config.json→ if so, guide the user to add camerasALWAYS render the full RTSP brand template table below (all 6 rows) whenever presenting the setup summary or guiding camera configuration. Do NOT abbreviate it to a single sentence like "supports Hikvision, Dahua..." — the user needs to see the actual URL patterns to fill in.
ALWAYS show the warning: ⚠️ Max 2 skills per camera — each skill opens an independent RTSP connection; most consumer cameras support only 2–4 concurrent sessions. Exceeding this causes stream disconnection.
ALWAYS present BOTH Feishu config tiers upfront when asking about notifications. Do NOT just say "Feishu Webhook URL" — list both tiers explicitly so the user can choose:
- Tier 1 (basic): only
feishu_webhook_url(+ optionalfeishu_webhook_secretfor signed bots) → alarm snapshots are pushed as clickable image-host links- Tier 2 (inline images): above +
feishu_app_id+feishu_app_secret(self-built app) → snapshots embed INLINE inside the Feishu card (best UX). Provide a one-line hint on how to get them: 飞书开发者后台 → 创建自建应用 → 拿 App ID / App Secret。If all checks pass, skip the wizard and execute the user's request directly
Check: look for sibling directories kami-image-search, kami-video-search, etc. next to {baseDir}
If missing: run the one-click install: bash
bash {baseDir}/setup.sh
This script will: download all 6 sub-skills from ClawHub + create venvs + install dependencies
If present: skip and proceed to config check
kamiclaw_api_key field from {baseDir}/kami_config.jsonCheck: read the notifications section of {baseDir}/kami_config.json
If all empty: ask the user whether to set up alarm push (any combination is allowed)
Supported channels (alarm skills fall-detection / package-detection / conflict-detection / suspicious-person push automatically when events fire):
feishu_webhook_url (+ optional feishu_webhook_secret for signed webhooks) — supported by all 4 alarm skillsfeishu_app_id + feishu_app_secret — when provided, all 4 alarm skills upload the alarm snapshot via Feishu OpenAPI and embed it INLINE inside the card. Without them, the snapshot falls back to a clickable image-host URLtelegram_bot_token + telegram_chat_id — supported by all 4 alarm skills (snapshot pushed inline via sendPhoto)discord_webhook_url (push-only) — supported by all 4 alarm skills (snapshot attached as multipart, renders inline)discord_bot_token + discord_channel_id (two-way) — fall-detection & package-detectionAll channels are optional; skipped channels just fall back to JSON output without push
⚠️ Discord / Telegram may be unreachable from some regions. If a proxy is needed, set HTTPS_PROXY in your shell rc (e.g. ~/.bashrc) yourself — the suite intentionally does NOT manage proxy settings
cameras section of {baseDir}/kami_config.jsonBrandURL patternHikvisionrtsp://{user}:{pwd}@{ip}:554/Streaming/Channels/101 ( 101 =ch1 main, 102 =ch1 sub)Dahuartsp://{user}:{pwd}@{ip}:554/cam/realmonitor?channel=1&subtype=0 ( subtype=0 main, 1 sub)TP-Linkrtsp://{user}:{pwd}@{ip}:554/stream1 ( stream1 main, stream2 sub)EZVIZrtsp://admin:{verify_code}@{ip}:554/H264/ch1/main/av_streamUniviewrtsp://{user}:{pwd}@{ip}:554/media/video1Reolinkrtsp://{user}:{pwd}@{ip}:554/h264Preview_01_main
⚠️ Max 2 skills per camera. Each skill opens an independent RTSP connection; most consumer cameras support only 2–4 concurrent sessions. Exceeding this causes stream disconnection. If you need more coverage, add a second camera or use the sub-stream.
kami_config.json under camerasfront, back, garage); names must be uniqueAfter the user provides values:
Write the values back into the corresponding fields of {baseDir}/kami_config.json
Run distribution: bash
bash {baseDir}/configure.sh --distribute
After distribution: tell the user that all skills are ready to use
MUST show the user the Included Skills capability table (see Included Skills above) so the user knows what is now available and which trigger phrases to use. This step is mandatory — do not end the turn until the table has been presented. The configure.sh --distribute command also prints the same summary to stdout; relay it verbatim if you do not want to retype the table.
To change the API key or notification channels later:
bash
# Re-run the interactive wizard
bash {baseDir}/configure.sh
# Or edit directly and redistribute
vim {baseDir}/kami_config.json
bash {baseDir}/configure.sh --distribute
clawhub CLI installed (used to pull skills from ClawHub)Python 3.10 is required.
setup.shselects detection priority by OS family (Debian/Ubuntu prefers conda/pyenv; other systems prefer system python3.10) and auto-installs via conda when missing. Other dependencies are managed by each sub-skill.
Recommended minimum hardware for each skill:
SkillCPUMemory (RAM)StorageGPUNoteskami-package-detection2+ cores2 GB500 MBnot requiredYOLO-World ONNX, CPU-onlykami-image-search2+ cores2 GB5 GB+not requiredFAISS index + SQLite frame historykami-video-search2+ cores2 GB10 GB+not requiredStores video segments, scales with retentionkami-fall-detection1+ core1 GB200 MBnot requiredLocal does frame-diff only; inference runs in cloudkami-conflict-detection4+ cores4 GB1 GBoptional (accelerates)Local YOLO person detection + multi-frame analysiskami-suspicious-person4+ cores4 GB1.5 GBoptional (accelerates)SCRFD + ArcFace ONNX (~1 GB)
Recommended config to run all 6 skills concurrently:
If you only enable a subset of skills, refer to the corresponding rows above.
The suite uses a central config + auto-distribute model:
text
kami_config.json (Single Source of Truth)
│
▼ configure.py --distribute
├── kami-image-search/image_config.json
├── kami-video-search/stream_config.json
├── kami-fall-detection/config.json
├── kami-package-detection/config.json
├── kami-conflict-detection/config.json
├── kami-suspicious-person/config.json
└── ~/.kami/credentials.json + cameras.json (cached for any skill)
kami_config.json#Located in the suite directory, it contains the following sections:
SectionDescriptionSkills affectedkamiclaw_api_keyKamiClaw API keyThe 4 cloud-API skillscamerasMap of named cameras ( name -> {stream_url})All 6 skills (auto-distributed)notificationsFeishu / Telegram / Discord push settingsfall-detection, package-detection, conflict-detection, suspicious-personskills.<name>.camerasPer-skill camera selector: [] = all, ["front"] = filter by nameSelects which cameras each skill receivesskills.<name>Per-skill tuning parametersThe corresponding skill
Edit this file once and every skill is configured.
The suite manages multiple cameras under the top-level cameras map. Give each camera a short, unique name (the dict key); each skill references cameras by that name.
json
{
"cameras": {
"front": { "stream_url": "rtsp://..." },
"back": { "stream_url": "rtsp://..." },
"garage": { "stream_url": "rtsp://..." }
},
"skills": {
"kami-image-search": { "cameras": [] }, // all cameras
"kami-package-detection": { "cameras": ["front", "garage"] } // filter by name
}
}
Naming tip. Use short, lowercase, meaningful names (room or location, e.g. front, back, garage). Names must be unique inside cameras. If you skip naming, the suite auto-assigns cam1, cam2, ... in order.
--add-camera NAME=URL (explicit) or --add-camera URL (auto-assigned).All 6 skills support native multi-camera: each selected camera runs as an independent background process.
⚠️ Max 2 skills per camera. Each skill opens an independent RTSP connection; most consumer cameras support only 2–4 concurrent sessions. Exceeding this causes stream disconnection. If you need more coverage, add a second camera or use the sub-stream.
Recommended combos per camera placement:
Camera positionSuggested skills (pick up to 2)Front door / porchpackage-detection + suspicious-personLiving room / hallwayfall-detection + conflict-detectionGarage / warehousepackage-detection + image-searchGeneral coverageimage-search + video-search (full archival)
image-search vs video-search:
image-searchvideo-searchCapturePeriodic snapshots (every N seconds)24/7 continuous video recordingStorageLight (~5 GB)Heavy (30 GB+)Search resultSingle matching frameVideo clip with contextBest for"Was there a package?" quick lookups"What happened yesterday afternoon?" full replay
Use image-search alone for lightweight event spot-checks; add video-search when you need complete footage for evidence or review.
Don't remember your camera's RTSP path? The wizard ships built-in templates for the most common IP-camera brands. Pick [t]emplate-add instead of [a]dd and just fill in IP / username / password.
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
Usage:
bash
# List all built-in templates
bash {baseDir}/configure.sh --list-templates
# Interactive: pick a brand, fill in fields, the URL is rendered for you
bash {baseDir}/configure.sh
# Choice: t
# Pick: 1 (hikvision)
# Camera IP: 192.168.1.64
# Username: admin
# Password: pass@123 (special chars are auto URL-encoded)
# Built URL: rtsp://admin:pass%40123@192.168.1.64:554/Streaming/Channels/101
Special characters in user / password (e.g.
@,:,#) are automatically URL-encoded so the resulting RTSP URL is always valid. If your camera brand isn't listed, just type the raw RTSP URL via[a]ddor--add-camera.
bash
# Mode 1: interactive wizard (prompts each field, supports add/edit/delete cameras)
bash {baseDir}/configure.sh
# Mode 2: set API key directly
bash {baseDir}/configure.sh sk_live_xxxxxxxx
# Mode 3: edit manually then distribute
vim {baseDir}/kami_config.json
bash {baseDir}/configure.sh --distribute
# Mode 4: show current config
bash {baseDir}/configure.sh --show
# Mode 5: add / remove cameras non-interactively (repeatable)
bash {baseDir}/configure.sh --add-camera rtsp://10.0.0.1/stream # auto-named cam1
bash {baseDir}/configure.sh --add-camera front=rtsp://10.0.0.1/stream # explicit name
bash {baseDir}/configure.sh --remove-camera front
# Mode 6: list common-brand RTSP URL templates
bash {baseDir}/configure.sh --list-templates
SkillTarget fileDistributed fieldskami-image-search``image_config.json``cameras: [{STREAM_URL, DEVICE_ID}, ...] (all selected cameras), KAMIVISION_API_KEY, CAPTURE_INTERVAL, RETENTION_DAYS``kami-video-search``stream_config.json``cameras: [{STREAM_URL, DEVICE_ID}, ...] (all selected cameras), KAMI_API_KEY, SEGMENT_DURATION, RETENTION_DAYS``kami-fall-detection``config.json``cameras: [{rtsp_url, name}, ...] (all selected cameras), api_key, feishu_webhook_url, feishu_app_id, feishu_app_secret, telegram_bot_token, telegram_chat_id, discord_webhook_url, discord_bot_token, discord_channel_id, pre_seconds, post_seconds, save_alarm_clips``kami-package-detection``config.json``cameras: [{rtsp_url, device_id}, ...] (all selected cameras), conf_threshold, run_time, alarm_cooldown, feishu_webhook_url, feishu_app_id, feishu_app_secret, telegram_bot_token, telegram_chat_id, discord_webhook_url, discord_bot_token, discord_channel_id (pure local inference, no API key)kami-conflict-detection``config.json``cameras: [{rtsp_url, name}, ...] (all selected cameras), kami_api_key, feishu_webhook, feishu_app_id, feishu_app_secret, discord_webhook, telegram_bot_token, telegram_chat_id``kami-suspicious-person``config.json``cameras: [{rtsp_url, name}, ...] (all selected cameras), feishu_webhook, feishu_app_id, feishu_app_secret, discord_webhook, telegram_bot_token, telegram_chat_id (pure local inference, no API key)
Power-user tip: each skill's argparse also accepts env vars (
KAMI_API_KEY,FEISHU_WEBHOOK_URL,TELEGRAM_*,DISCORD_WEBHOOK_URL,HTTPS_PROXY) as a fallback. If you need an HTTPS proxy for Discord / Telegram, exportHTTPS_PROXYin your shell rc — proxy settings are out of scope forkami_config.json.
setup.sh automatically enters the centralized config flow after installing all skills. If skipped, run bash configure.sh later anytime.
Exit codeMeaning0All skills installed successfully1Some skills failed to install (check logs)2Prerequisite missing (no clawhub, or neither conda nor pyenv is usable and Python 3.10 cannot be installed)
clawhub CLI not available
text
clawhub: command not found
→ Install the ClawHub CLI first.
A skill failed to install
text
[!] kami-xxx (failed, exit 1)
→ Retry: clawhub install kami-xxx
KamiClaw API key not configured
→ Run bash configure.sh or register at https://kamiclaw-skill.kamihome.com
Config changes have no effect
→ After editing kami_config.json, run bash configure.sh --distribute to push the changes to each skill.
This suite involves camera streams, image capture and face recognition. Please review the following privacy notes before use:
image-search and video-search honor a retention_days parameter for automatic expiry~/.kami/ (mode 600, current user only)face_db/, fully under user controlface_db/ directory wipes all face dataPrivacy policy details: https://kamiclaw-skill.kamihome.com/privacy