{"id":"a9c92a8f-0de6-4053-adeb-4d984cf6aff9","entityType":"agent","slug":"clawhub-13681882136-kami-package-detection","name":"kami-package-detection","canonicalUrl":"https://www.xpersona.co/agent/clawhub-13681882136-kami-package-detection","canonicalPath":"/agent/clawhub-13681882136-kami-package-detection","generatedAt":"2026-10-10T13:31:58.885Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T10:47:36.914Z","emptyReason":null},"description":"A free skill by Kami SmartHome. Continuously monitors RTSP camera streams for packages, parcels, and bags using YOLO-World ONNX. Smart deduplication only triggers alerts when a genuinely new or moved package appears.","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.5K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s170wja1qf8kmkzj5brvhsj1r185a522:kami-package-detection","sourceUrl":"https://clawhub.ai/13681882136/kami-package-detection","homepage":"https://clawhub.ai/13681882136/skills/kami-package-detection","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/13681882136/kami-package-detection","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/13681882136/skills/kami-package-detection","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":63,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"kami-package-detection technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T10:47:36.914Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T10:47:36.914Z","emptyReason":null},"stars":null,"forks":null,"downloads":1486,"packageName":null,"latestVersion":"1.1.6","tractionLabel":"1.5K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T10:47:36.913Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T10:47:36.914Z","lastCrawledAt":"2026-10-10T10:47:36.913Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T10:47:36.913Z","lastVerifiedAt":null,"highlights":[{"version":"1.1.6","createdAt":"2026-06-10T06:32:10.954Z","changelog":"Version 1.1.6 - SKILL.md updated to require that the RTSP URL brand template table is always shown to users during camera configuration. - No code or functional changes; documentation improved for clearer setup instructions.","fileCount":10,"zipByteSize":31915},{"version":"1.1.5","createdAt":"2026-06-10T01:27:18.458Z","changelog":"- Adds fast model setup: attempts to download a pre-built ONNX file first, falling back to manual export if unavailable (improves installation speed and reliability). - Suppresses person and handbag notifications in alerts to cut down on false alarms, though the model still recognizes them. - Introduces a 24-hour package tracking window to further reduce repeated notifications for the same parcel. - Documents common RTSP URL patterns for popular camera brands to simplify setup. - Removes the outdated `skill-card.md` file.","fileCount":10,"zipByteSize":31623},{"version":"1.1.4","createdAt":"2026-06-05T06:55:15.986Z","changelog":"**Model export is now automated and reproducible with an included script, simplifying setup.** - Added export_model.py to automatically export the YOLO-World ONNX model with the correct vocabulary if missing. - setup.sh updated to run export_model.py and auto-prepare the needed ONNX model on first install/startup. - SKILL.md revised: updated model instructions, clarified ONNX export process, and documented the new automated workflow. - Existing manual export steps retained for advanced users; clear syncing instructions for class lists were added.","fileCount":10,"zipByteSize":27285},{"version":"1.1.3","createdAt":"2026-06-05T06:01:30.218Z","changelog":"- Improved ONNX export instructions: clarified that custom classes must be injected via set_classes() before exporting, to ensure correct detection targets. - Updated documentation in SKILL.md for YOLOv8s-World export process, with explicit Python example and synchronization guidance between class lists. - Removed outdated or redundant file (skill-card.md).","fileCount":9,"zipByteSize":25629},{"version":"1.1.2","createdAt":"2026-06-05T02:36:47.125Z","changelog":"**kami-package-detection v1.1.2 changelog** - Updated internal logic in `yolo_world_onnx.py` - Documentation improvements in SKILL.md - Removed redundant skill-card.md file","fileCount":9,"zipByteSize":25182},{"version":"1.1.1","createdAt":"2026-06-04T03:12:34.788Z","changelog":"- Documentation wording improved and concise language used in feature and description sections. - No changes to functionality; update affects SKILL.md content only. - Maintains identical usage instructions and options for installation, prerequisites, configuration, multi-camera setup, and output schema.","fileCount":9,"zipByteSize":23214},{"version":"1.1.0","createdAt":"2026-06-04T03:08:59.859Z","changelog":"**Continuous monitoring and push notifications with deduplication** - Adds continuous monitoring mode: skill now watches cameras 24/7 and only alerts when a genuinely new or moved package appears. - Integrates push notifications via Feishu, Telegram, and Discord (configurable in config.json). - Implements smart deduplication using IoU and area change—avoids repeated alerts for the same static package. - Filters static camera frames to skip unnecessary inference and save compute. - New config settings: alarm_cooldown, multiple notification channels, and persistent run_time=0 (continuous). - Updates requirements to include `requests` for outbound notifications. - Removes one-shot detection as primary usage; now designed for background/event-driven operation.","fileCount":9,"zipByteSize":23151},{"version":"1.0.9","createdAt":"2026-05-29T03:23:15.178Z","changelog":"# kami-package-detection 1.0.9 Changelog - Documentation update only: The README.md was updated. - No functional or code changes—skill operation remains unchanged.","fileCount":8,"zipByteSize":18578}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s170wja1qf8kmkzj5brvhsj1r185a522:kami-package-detection","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s170wja1qf8kmkzj5brvhsj1r185a522:kami-package-detection` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/13681882136/kami-package-detection before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-13681882136-kami-package-detection/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-13681882136-kami-package-detection/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-13681882136-kami-package-detection/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-13681882136-kami-package-detection/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-13681882136-kami-package-detection/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-13681882136-kami-package-detection/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T13:31:58.880Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-13681882136-kami-package-detection/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-13681882136-kami-package-detection/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-13681882136-kami-package-detection/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-13681882136-kami-package-detection/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T10:47:36.914Z","emptyReason":null},"readme":"Skill: kami-package-detection\n\nOwner: 13681882136\n\nSummary: A free skill by Kami SmartHome. Continuously monitors RTSP camera streams for packages, parcels, and bags using YOLO-World ONNX. Smart deduplication only triggers alerts when a genuinely new or moved package appears.\n\nTags: latest:1.1.6\n\nVersion history:\n\nv1.1.6 | 2026-06-10T06:32:10.954Z | auto\n\nVersion 1.1.6\n\n- SKILL.md updated to require that the RTSP URL brand template table is always shown to users during camera configuration.\n- No code or functional changes; documentation improved for clearer setup instructions.\n\nv1.1.5 | 2026-06-10T01:27:18.458Z | auto\n\n- Adds fast model setup: attempts to download a pre-built ONNX file first, falling back to manual export if unavailable (improves installation speed and reliability).\n- Suppresses person and handbag notifications in alerts to cut down on false alarms, though the model still recognizes them.\n- Introduces a 24-hour package tracking window to further reduce repeated notifications for the same parcel.\n- Documents common RTSP URL patterns for popular camera brands to simplify setup.\n- Removes the outdated `skill-card.md` file.\n\nv1.1.4 | 2026-06-05T06:55:15.986Z | auto\n\n**Model export is now automated and reproducible with an included script, simplifying setup.**\n\n- Added export_model.py to automatically export the YOLO-World ONNX model with the correct vocabulary if missing.\n- setup.sh updated to run export_model.py and auto-prepare the needed ONNX model on first install/startup.\n- SKILL.md revised: updated model instructions, clarified ONNX export process, and documented the new automated workflow.\n- Existing manual export steps retained for advanced users; clear syncing instructions for class lists were added.\n\nv1.1.3 | 2026-06-05T06:01:30.218Z | auto\n\n- Improved ONNX export instructions: clarified that custom classes must be injected via set_classes() before exporting, to ensure correct detection targets.\n- Updated documentation in SKILL.md for YOLOv8s-World export process, with explicit Python example and synchronization guidance between class lists.\n- Removed outdated or redundant file (skill-card.md).\n\nv1.1.2 | 2026-06-05T02:36:47.125Z | auto\n\n**kami-package-detection v1.1.2 changelog**\n\n- Updated internal logic in `yolo_world_onnx.py`\n- Documentation improvements in SKILL.md\n- Removed redundant skill-card.md file\n\nv1.1.1 | 2026-06-04T03:12:34.788Z | auto\n\n- Documentation wording improved and concise language used in feature and description sections.\n- No changes to functionality; update affects SKILL.md content only.\n- Maintains identical usage instructions and options for installation, prerequisites, configuration, multi-camera setup, and output schema.\n\nv1.1.0 | 2026-06-04T03:08:59.859Z | auto\n\n**Continuous monitoring and push notifications with deduplication**\n\n- Adds continuous monitoring mode: skill now watches cameras 24/7 and only alerts when a genuinely new or moved package appears.\n- Integrates push notifications via Feishu, Telegram, and Discord (configurable in config.json).\n- Implements smart deduplication using IoU and area change—avoids repeated alerts for the same static package.\n- Filters static camera frames to skip unnecessary inference and save compute.\n- New config settings: alarm_cooldown, multiple notification channels, and persistent run_time=0 (continuous).\n- Updates requirements to include `requests` for outbound notifications.\n- Removes one-shot detection as primary usage; now designed for background/event-driven operation.\n\nv1.0.9 | 2026-05-29T03:23:15.178Z | auto\n\n# kami-package-detection 1.0.9 Changelog\n\n- Documentation update only: The README.md was updated.\n- No functional or code changes—skill operation remains unchanged.\n\nv1.0.8 | 2026-05-29T03:10:47.448Z | auto\n\n**Multi-camera support and background detection control added.**\n\n- Added multi-camera configuration via `cameras` array in `config.json`.\n- Introduced new CLI flags: `--device`, `--start-detect`, `--stop-detect`, `--status`, `--list-devices` for managing background detection processes.\n- Each camera can now run as an independent background process.\n- Existing single-camera configuration remains supported.\n- Updated documentation to reflect new features and usage.\n- Removed obsolete `skill-card.md` file.\n\nv1.0.7 | 2026-05-27T08:13:37.378Z | auto\n\n- Added a Privacy Notice section to SKILL.md detailing local inference, data handling, and user data controls\n- No detection logic or feature changes; informational update only\n- README.md unchanged (based on sample)\n- Improved transparency for users regarding privacy and data usage\n\nv1.0.6 | 2026-05-27T07:56:47.009Z | auto\n\n- Added support for configuration via config.json, allowing persistent parameter overrides.\n- Updated parameter precedence: command-line flags override config.json, which override built-in defaults.\n- Enhanced documentation to explain config.json use, parameter precedence, and integration with kami-smarthome-suite.\n- Removed standalone tests directory and test files.\n- Minor updates to setup script and main Python logic for config.json compatibility.\n\nv1.0.5 | 2026-04-23T05:49:43.804Z | auto\n\n- Expanded tags to include \"home-assistant\", \"home assistant\", \"smart home delivery\", and related phrases for broader discoverability.\n- Added more trigger phrases such as \"kami smart home\", \"home assistant package\", \"delivery notification\", and \"parcel alert\".\n- No changes to core functionality or usage documentation.\n\nv1.0.4 | 2026-04-23T02:54:38.993Z | auto\n\n- Updated version to 1.0.4.\n- Expanded tags to include \"smarthome\" and \"detect\" for improved discoverability.\n- No other feature or documentation changes.\n\nv1.0.3 | 2026-04-23T02:38:22.083Z | auto\n\n- Added instructions for downloading and exporting the YOLOv8s-World v2 model from Ultralytics and integrating it with the skill.\n- Expanded model setup section to support manual ONNX export if the model file is missing.\n- Added \"kami\" to the tags list. \n- No changes to code or APIs; documentation-only update.\n\nv1.0.2 | 2026-04-23T02:12:26.665Z | auto\n\n- Updated skill description to clarify free offering by Kami SmartHome.\n- Bumped version to 1.0.2.\n- No functional or technical changes; documentation only.\n\nv1.0.1 | 2026-04-22T06:13:40.162Z | auto\n\n- Removed the explicit Linux OS requirement from the metadata in SKILL.md.\n- No changes to features or functionality.\n\nv1.0.0 | 2026-04-22T06:08:34.321Z | auto\n\nInitial release of kami-package-detection.\n\n- Detects packages, parcels, backpacks, handbags, and suitcases from RTSP camera streams using YOLOv8-World ONNX inference.\n- Returns object class and bounding box as JSON for easy integration and automation.\n- Supports configurable detection duration and customizable class names.\n- Outputs clear exit codes for detection, errors, and timeouts.\n- Includes simple installation script and troubleshooting tips.\n\nArchive index:\n\nArchive v1.1.6: 10 files, 31915 bytes\n\nFiles: config.json (505b), export_model.py (3178b), notifier.py (16638b), README.md (11028b), requirements.txt (54b), setup.sh (13097b), skill-card.md (3149b), SKILL.md (11580b), yolo_world_onnx.py (35001b), _meta.json (141b)\n\nFile v1.1.6:SKILL.md\n\n---\r\nname: kami-package-detection\r\ndescription: A free skill by Kami SmartHome. Continuously monitors RTSP camera streams for packages, parcels, and bags using YOLO-World ONNX. Smart deduplication only triggers alerts when a genuinely new or moved package appears.\r\nversion: 1.1.0\r\nauthor: kami-smarthome\r\ntags:\r\n  - smart-home\r\n  - kami\r\n  - home-assistant\r\n  - smarthome\r\n  - detect\r\n  - object-detection\r\n  - yolo\r\n  - package-detection\r\n  - parcel-detection\r\n  - iot\r\n  - camera\r\n  - rtsp\r\n  - onnx\r\n  - edge-ai\r\n  - delivery\r\n  - monitoring\r\n  - notification\r\ntriggers:\r\n  - smart home\r\n  - kami\r\n  - home assistant\r\n  - detect\r\n  - detect packages\r\n  - detect parcels\r\n  - kami package\r\n  - kami smart home\r\n  - home assistant package\r\n  - smart home delivery\r\n  - check doorstep\r\n  - delivery notification\r\n  - check for deliveries\r\n  - package detection\r\n  - is there a package\r\n  - monitor packages\r\n  - check camera for packages\r\n  - any deliveries at the door\r\n  - parcel alert\r\nmetadata:\r\n  openclaw:\r\n    requires:\r\n      bins:\r\n        - python3.10\r\n      hardware:\r\n        cpu: \"2+ cores (x86_64 / ARM64)\"\r\n        memory: \"2 GB+\"\r\n        storage: \"2 GB+\"\r\n        gpu: \"optional (speeds up ONNX inference)\"\r\n      network:\r\n        - \"RTSP camera access (LAN)\"\r\n        - \"Internet (KamiClaw API)\"\r\n      devices:\r\n        - \"RTSP IP camera\"\r\n    emoji: \"📦\"\r\n---\r\n\r\n# Kami Package Detection\r\n\r\n> Continuously monitors your camera and sends instant notifications when a new package arrives.\r\n\r\nContinuously monitors RTSP camera streams for packages, parcels, backpacks, and suitcases. People and handbags are recognized by the model but suppressed at the alert layer to cut down on false alarms. When a **new** package is detected (position/size significantly different from the last alert), sends push notifications. Static frames are automatically skipped to save compute.\r\n\r\n### Features\r\n\r\n- 📦 Continuous package & parcel monitoring (not one-shot)\r\n- 🔔 Push notifications via Feishu / Telegram / Discord\r\n- 🧠 Smart deduplication — only alerts for new or moved packages (IoU + area change), with a **24-hour tracking window** to silence repeated alerts on the same parcel\r\n- ⚡ Static frame filtering — skips inference when camera scene is unchanged\r\n- 📷 Multi-camera support with independent background processes\r\n- 🧳 Suitcase / backpack recognition\r\n- 🏠 Doorstep & reception monitoring\r\n\r\n### Scenarios\r\n\r\n- Doorstep delivery waiting\r\n- Office reception package management\r\n- Warehouse cargo monitoring\r\n- Temporary item watch\r\n\r\n## Installation\r\n\r\n```bash\r\nbash setup.sh\r\n```\r\n\r\nCreates `.venv/` and installs `onnxruntime`, `opencv-python-headless`, `numpy`, `requests`. Idempotent.\r\n\r\n## Prerequisites\r\n\r\n- `python3` and `python3-venv` installed\r\n- RTSP camera(s) online and reachable\r\n- Internet access on first run (to download `yolov8s-worldv2.pt` if not bundled)\r\n\r\n### Model\r\n\r\nThe `yolov8s-worldv2.onnx` model file is auto-prepared by `setup.sh` using a download-first, export-fallback strategy:\r\n\r\n1. If `yolov8s-worldv2.onnx` is already present → reused as-is.\r\n2. Otherwise, `setup.sh` downloads the pre-built archive `kami-package-detection.zip` from <https://publicfiles.xiaoyi.com/kami-package-detection.zip> and extracts `yolov8s-worldv2.onnx` out of it (fast path, no extra dependencies).\r\n3. If the download or extraction fails (offline / mirror unreachable), `setup.sh` falls back to installing `ultralytics` into the venv (one-time, ~500 MB with torch) and runs [export_model.py](file:///./export_model.py), which loads `yolov8s-worldv2.pt` (auto-downloaded by Ultralytics if absent), injects the custom vocabulary via `set_classes()`, and exports to ONNX with `imgsz=320`.\r\n\r\nManual export / re-export:\r\n\r\n```bash\r\n# Re-export even if the ONNX already exists\r\n.venv/bin/python export_model.py --force\r\n\r\n# Custom image size\r\n.venv/bin/python export_model.py --imgsz 320\r\n```\r\n\r\nIf you change the class list, edit `CLASS_NAMES` in **both** [export_model.py](file:///./export_model.py) and `DEFAULT_CLASS_NAMES` in [yolo_world_onnx.py](file:///./yolo_world_onnx.py) to keep them in sync (same order, same length), then re-export with `--force`.\r\n\r\n## Parameter Confirmation\r\n\r\nParameters can be supplied via either `config.json` (recommended for repeated use) or command-line flags. Command-line flags override `config.json`, which overrides built-in defaults.\r\n\r\n| Parameter | `config.json` field | Default | Description |\r\n|-----------|---------------------|---------|-------------|\r\n| `--device` | *(selects from cameras array)* | first camera | Target camera DEVICE_ID |\r\n| `--rtsp_url` | `cameras[].rtsp_url` | — | RTSP camera URL (overrides camera selection) |\r\n| `--conf_threshold` | `conf_threshold` | `0.25` | Confidence threshold (0.0–1.0) |\r\n| `--class_names` | *(not in config.json)* | `parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase` | Classes to detect (CLI only) |\r\n| `--run_time` | `run_time` | `0` | Max seconds; `0` = unlimited (continuous monitoring) |\r\n| `--start-detect` | — | — | Start background detection (all cameras or `--device`) |\r\n| `--stop-detect` | — | — | Stop background detection (all cameras or `--device`) |\r\n| `--status` | — | — | Check detection process status |\r\n| `--list-devices` | — | — | List all configured cameras and exit |\r\n| — | `alarm_cooldown` | `60` | Min seconds between notifications for different packages |\r\n| — | `feishu_webhook_url` | — | Feishu Webhook URL for push notifications |\r\n| — | `telegram_bot_token` | — | Telegram Bot token |\r\n| — | `telegram_chat_id` | — | Telegram chat ID |\r\n| — | `discord_webhook_url` | — | Discord Webhook URL |\r\n| — | `discord_bot_token` | — | Discord Bot token |\r\n| — | `discord_channel_id` | — | Discord channel ID |\r\n\r\n### Multi-Camera Configuration\r\n\r\n`config.json` supports a `cameras` array for multiple cameras:\r\n\r\n```json\r\n{\r\n  \"cameras\": [\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.100/stream\",\r\n      \"device_id\": \"CAM-FRONT\"\r\n    },\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.101/stream\",\r\n      \"device_id\": \"CAM-BACK\",\r\n      \"conf_threshold\": 0.3\r\n    }\r\n  ],\r\n  \"conf_threshold\": 0.25,\r\n  \"run_time\": 0,\r\n  \"alarm_cooldown\": 60,\r\n  \"feishu_webhook_url\": \"\",\r\n  \"telegram_bot_token\": \"\",\r\n  \"telegram_chat_id\": \"\",\r\n  \"discord_webhook_url\": \"\"\r\n}\r\n```\r\n\r\n- `device_id` must be unique across all cameras\r\n- Per-camera `conf_threshold` and `run_time` override global values\r\n- Without `--device`, all cameras are started/stopped together\r\n- Each camera runs as an independent background process\r\n- Legacy single-camera config (flat `rtsp_url` at top level) is still supported\r\n\r\n### Common Brand RTSP Templates\r\n\r\n**MUST show this table to the user** when configuring cameras, so they can pick a URL pattern based on their brand:\r\n\r\n| Brand key | Brand | URL pattern |\r\n|-----------|-------|-------------|\r\n| `hikvision` | Hikvision | `rtsp://{user}:{pwd}@{ip}:554/Streaming/Channels/101` (`101`=ch1 main, `102`=ch1 sub) |\r\n| `dahua` | Dahua | `rtsp://{user}:{pwd}@{ip}:554/cam/realmonitor?channel=1&subtype=0` (`subtype=0` main, `1` sub) |\r\n| `tplink` | TP-Link | `rtsp://{user}:{pwd}@{ip}:554/stream1` (`stream1` main, `stream2` sub) |\r\n| `ezviz` | EZVIZ | `rtsp://admin:{verify_code}@{ip}:554/H264/ch1/main/av_stream` |\r\n| `uniview` | Uniview | `rtsp://{user}:{pwd}@{ip}:554/media/video1` |\r\n| `reolink` | Reolink | `rtsp://{user}:{pwd}@{ip}:554/h264Preview_01_main` |\r\n\r\n**Ask the user: do any parameters need to be changed?**\r\n\r\n## Usage\r\n\r\n### Start Detection (Background)\r\n\r\n```bash\r\n# Start all cameras\r\n.venv/bin/python yolo_world_onnx.py --start-detect\r\n\r\n# Start a specific camera\r\n.venv/bin/python yolo_world_onnx.py --start-detect --device CAM-FRONT\r\n```\r\n\r\n### Stop Detection\r\n\r\n```bash\r\n# Stop all cameras\r\n.venv/bin/python yolo_world_onnx.py --stop-detect\r\n\r\n# Stop a specific camera\r\n.venv/bin/python yolo_world_onnx.py --stop-detect --device CAM-FRONT\r\n```\r\n\r\n### Check Status\r\n\r\n```bash\r\n# Status of all cameras\r\n.venv/bin/python yolo_world_onnx.py --status\r\n\r\n# Status of a specific camera\r\n.venv/bin/python yolo_world_onnx.py --status --device CAM-FRONT\r\n```\r\n\r\n### Single-Run Mode (Foreground)\r\n\r\n```bash\r\n# Run continuous monitoring on a specific camera (foreground)\r\n.venv/bin/python yolo_world_onnx.py --device CAM-FRONT\r\n\r\n# Override via CLI (runs for 120 seconds then stops)\r\n.venv/bin/python yolo_world_onnx.py \\\r\n  --rtsp_url rtsp://your-camera-address \\\r\n  --run_time 120\r\n\r\n# List configured cameras\r\n.venv/bin/python yolo_world_onnx.py --list-devices\r\n```\r\n\r\n## Output (stdout JSON)\r\n\r\nWhen a new package is detected, outputs an alarm JSON to stdout:\r\n\r\n```json\r\n{\r\n  \"alarm\": true,\r\n  \"type\": \"package\",\r\n  \"class_name\": \"parcel\",\r\n  \"confidence\": 0.87,\r\n  \"camera_name\": \"CAM-FRONT\",\r\n  \"frame\": 1523,\r\n  \"snapshot\": \"/path/to/snapshots/CAM-FRONT/20260604_153012_482.jpg\",\r\n  \"detections\": [\r\n    {\r\n      \"class_name\": \"parcel\",\r\n      \"bbox\": {\"x1\": 100, \"y1\": 200, \"x2\": 300, \"y2\": 400}\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\n| Field | Type | Description |\r\n|-------|------|-------------|\r\n| `alarm` | bool | Always `true` for alarm output |\r\n| `type` | string | Always `\"package\"` |\r\n| `class_name` | string | Detected object class |\r\n| `confidence` | float | Detection confidence (0.0–1.0) |\r\n| `camera_name` | string | Source camera device_id |\r\n| `frame` | int | Frame number when detected |\r\n| `snapshot` | string | Absolute path to the annotated JPG (with bounding box drawn) |\r\n| `bbox.x1, y1, x2, y2` | int | Bounding box coordinates |\r\n\r\n## Exit Codes\r\n\r\n| Code | Meaning |\r\n|------|---------|\r\n| `0` | Normal exit (run_time reached or manual stop via signal) |\r\n| `1` | Error (model missing, RTSP failure, runtime exception) |\r\n\r\n## Troubleshooting\r\n\r\n- `bash: .venv/bin/python: No such file or directory` → Run `bash setup.sh`\r\n- `Model file not found` → Place `yolov8s-worldv2.onnx` in the skill directory\r\n- `Cannot open video` → Check camera is online and `--rtsp_url` is correct\r\n\r\n## Privacy Notice\r\n\r\nThis skill processes camera video stream frames for object detection. Please review the following privacy information before use:\r\n\r\n### Pure Local Inference\r\n\r\n- Detection runs entirely on-device via the YOLOv8-World ONNX model — **no cloud API calls for inference**\r\n- The only outbound traffic is: RTSP pull from your camera (LAN) + notification push to your configured channels (Feishu / Telegram / Discord)\r\n\r\n### Local Data Storage\r\n\r\n- Frames are held in memory only and discarded after each inference — **nothing is persisted to disk by default**\r\n- When an alarm fires, the annotated frame is saved as a JPEG under `snapshots/<camera_device_id>/` for evidence; nothing else is persisted\r\n- The skill emits alarm JSON objects to **stdout**; if you need history, the caller is responsible for storing it\r\n\r\n### Notification Channels\r\n\r\n- Push notifications are sent only when configured (all channels are optional)\r\n- Notification content includes: detected class name, confidence, camera name, and timestamp\r\n- No images or video frames are sent in notifications\r\n\r\n### User Control\r\n\r\n- Camera URL is supplied by the user; this skill will not auto-discover or connect to cameras\r\n- You can stop the skill at any time via `--stop-detect` or SIGTERM\r\n- Removing the skill directory wipes everything (model file + venv); nothing else is touched on the host\r\n\r\n> For more details on our privacy policy, visit: https://kamiclaw-skill.kamihome.com/privacy\n\nFile v1.1.6:README.md\n\n# 📦 Kami Package Detection\r\n\r\n> A free skill by **Kami SmartHome** — get notified the moment a package arrives at your door.\r\n\r\nMonitor your RTSP camera feed for packages, parcels, backpacks, and suitcases using YOLOv8-World ONNX inference. People and handbags are recognized by the model but suppressed at the alert layer (so a person carrying their bag past the door does **not** trigger an alarm). When a delivery target is detected, outputs the object class and bounding box as structured JSON to stdout.\r\n\r\n### Features\r\n\r\n- 📦 Package & parcel detection\r\n- 🧳 Suitcase / backpack recognition\r\n- 🏠 Doorstep & reception monitoring\r\n- ⏱ Configurable detection duration\r\n- 🔔 JSON output for easy integration\r\n- 🖥 CPU-only inference via `onnxruntime` — no GPU required\r\n- 🐍 Isolated `.venv` — zero impact on system Python\r\n\r\n### Scenarios\r\n\r\n- Doorstep delivery waiting\r\n- Office reception package management\r\n- Warehouse cargo monitoring\r\n- Temporary item watch\r\n\r\n## Quick Start\r\n\r\n```bash\r\n# 1. Run setup (one-time)\r\nbash setup.sh\r\n\r\n# 2. Place your ONNX model file\r\ncp /path/to/yolov8s-worldv2.onnx .\r\n\r\n# 3a. Foreground single-run (exits on first detection or timeout)\r\n.venv/bin/python yolo_world_onnx.py \\\r\n  --rtsp_url rtsp://192.168.1.100/live/camera01 \\\r\n  --conf_threshold 0.25 \\\r\n  --class_names parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase \\\r\n  --run_time 120\r\n\r\n# 3b. Background daemon for one or more cameras (uses config.json)\r\n.venv/bin/python yolo_world_onnx.py --start-detect\r\n.venv/bin/python yolo_world_onnx.py --status\r\n.venv/bin/python yolo_world_onnx.py --stop-detect\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nbash setup.sh\r\n```\r\n\r\nThe setup script automatically:\r\n1. Detects system Python (`python3` or `python`), exits with error if not found\r\n2. Creates an isolated virtual environment at `.venv/`\r\n3. Installs Python dependencies from `requirements.txt`\r\n\r\n> Idempotent — safe to run multiple times. Won't reinstall existing dependencies.\r\n\r\n### Requirements\r\n\r\n| Dependency | Version | Purpose |\r\n|------------|---------|---------|\r\n| `onnxruntime` | latest | ONNX model inference engine |\r\n| `opencv-python-headless` | latest | Video capture and image processing |\r\n| `numpy` | latest | Array operations |\r\n\r\n### System Prerequisites\r\n\r\n- **Python 3.8+** and **python3-venv** (`sudo apt install python3 python3-venv`)\r\n- **ONNX model file**: `yolov8s-worldv2.onnx` in the skill directory\r\n- **RTSP camera**: online and network-reachable\r\n\r\n## Usage\r\n\r\n### Basic Detection\r\n\r\nParameters can be supplied via either `config.json` (recommended) or command-line flags. CLI flags > `config.json` > built-in defaults.\r\n\r\n```bash\r\n# Option 1: Edit config.json once, then just run\r\n.venv/bin/python yolo_world_onnx.py\r\n\r\n# Option 2: Override via CLI\r\n.venv/bin/python yolo_world_onnx.py \\\r\n  --rtsp_url rtsp://127.0.0.1/live/TNPUSAQ-757597-DRFMY \\\r\n  --conf_threshold 0.25 \\\r\n  --class_names parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase \\\r\n  --run_time 60\r\n```\r\n\r\n### Multi-Camera Configuration\r\n\r\n`config.json` supports a `cameras` array so multiple RTSP feeds can run as independent background processes:\r\n\r\n```json\r\n{\r\n  \"cameras\": [\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.100/stream\",\r\n      \"device_id\": \"CAM-FRONT\"\r\n    },\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.101/stream\",\r\n      \"device_id\": \"CAM-BACK\",\r\n      \"conf_threshold\": 0.3,\r\n      \"run_time\": 120\r\n    }\r\n  ],\r\n  \"conf_threshold\": 0.25,\r\n  \"run_time\": 60\r\n}\r\n```\r\n\r\n- `device_id` must be unique across all cameras\r\n- Per-camera `conf_threshold` and `run_time` override global values\r\n- Without `--device`, all cameras start/stop together\r\n- Legacy single-camera config (flat `rtsp_url` at top level) is still supported\r\n\r\n### Daemon Mode (Multi-Camera)\r\n\r\n```bash\r\n# Start all cameras\r\n.venv/bin/python yolo_world_onnx.py --start-detect\r\n\r\n# Start a specific camera\r\n.venv/bin/python yolo_world_onnx.py --start-detect --device CAM-FRONT\r\n\r\n# Status (all cameras or a specific one)\r\n.venv/bin/python yolo_world_onnx.py --status\r\n.venv/bin/python yolo_world_onnx.py --status --device CAM-FRONT\r\n\r\n# Stop (all cameras or a specific one)\r\n.venv/bin/python yolo_world_onnx.py --stop-detect\r\n.venv/bin/python yolo_world_onnx.py --stop-detect --device CAM-FRONT\r\n\r\n# List all configured cameras\r\n.venv/bin/python yolo_world_onnx.py --list-devices\r\n```\r\n\r\n### Parameters\r\n\r\n| Parameter | `config.json` field | Type | Required | Default | Description |\r\n|-----------|---------------------|------|----------|---------|-------------|\r\n| `--rtsp_url` | `rtsp_url` / `cameras[].rtsp_url` | string | No | `rtsp://127.0.0.1/live/TNPUSAQ-757597-DRFMY` | RTSP camera stream URL (overrides camera selection when used directly) |\r\n| `--device` | *(selects from `cameras` array)* | string | No | first camera | Target camera `device_id` (foreground or daemon mode) |\r\n| `--conf_threshold` | `conf_threshold` | float | No | `0.25` | Detection confidence threshold (0.0–1.0) |\r\n| `--class_names` | *(not in config.json)* | string[] | No | `parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase` | Space-separated class names to detect (CLI only) |\r\n| `--run_time` | `run_time` | int | No | `60` | Max run time in seconds. `0` = unlimited |\r\n| `--start-detect` | — | flag | No | — | Start background detection (all cameras, or one with `--device`) |\r\n| `--stop-detect` | — | flag | No | — | Stop background detection (all cameras, or one with `--device`) |\r\n| `--status` | — | flag | No | — | Check detection process status |\r\n| `--list-devices` | — | flag | No | — | List all configured cameras and exit |\r\n\r\n> When installed as part of `kami-smarthome-suite`, `cameras[]`, `conf_threshold` and `run_time` are auto-distributed into `config.json` from the central `kami_config.json`. `class_names` is a per-skill default and not distributed.\r\n\r\n## Output Format\r\n\r\nWhen a delivery target is detected, the skill outputs JSON to **stdout** and exits with code `0`:\r\n\r\n```json\r\n{\r\n  \"detections\": [\r\n    {\r\n      \"class_name\": \"parcel\",\r\n      \"bbox\": {\"x1\": 100, \"y1\": 200, \"x2\": 300, \"y2\": 400}\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\n### Field Reference\r\n\r\n| Field | Type | Description |\r\n|-------|------|-------------|\r\n| `detections` | array | List of detected objects |\r\n| `detections[].class_name` | string | Detected object class |\r\n| `detections[].bbox.x1` | int | Bounding box left x |\r\n| `detections[].bbox.y1` | int | Bounding box top y |\r\n| `detections[].bbox.x2` | int | Bounding box right x |\r\n| `detections[].bbox.y2` | int | Bounding box bottom y |\r\n\r\n## Exit Codes\r\n\r\n| Code | Meaning |\r\n|------|---------|\r\n| `0` | Target detected and JSON output written |\r\n| `1` | Model file missing, RTSP connection failure, or runtime error |\r\n| `2` | Run time exceeded, no target detected (timeout) |\r\n\r\n> Exit code `0` = detection success, `2` = timeout with no detection, `1` = error.\r\n\r\n## Architecture\r\n\r\n```\r\nRTSP Camera → [yolo_world_onnx.py] → JSON stdout\r\n                    │\r\n                    ├── letterbox (preprocessing)\r\n                    ├── ONNX inference (YOLOv8-World)\r\n                    ├── parse_output + NMS (post-processing)\r\n                    └── format_detection_result (JSON output)\r\n```\r\n\r\nThe skill follows a single-pass detection model:\r\n1. Read frames from RTSP stream\r\n2. Preprocess each frame (letterbox resize to 320×320)\r\n3. Run ONNX inference\r\n4. Parse detections, apply NMS\r\n5. On first delivery-target detection (excluding `person` / `handbag`) → output JSON → exit\r\n6. New detections matching an already-tracked package within the **24-hour tracking window** are silently suppressed (no re-alert), so the same parcel sitting at the door does not spam notifications.\r\n\r\n## Error Handling\r\n\r\n| Scenario | Behavior | Exit Code |\r\n|----------|----------|-----------|\r\n| Model file (`yolov8s-worldv2.onnx`) not found | Log error, exit immediately | `1` |\r\n| RTSP stream cannot connect | Log error, exit immediately | `1` |\r\n| Model load failure (corrupt ONNX) | Log error, exit immediately | `1` |\r\n| Run time exceeded | Log timeout info, exit | `2` |\r\n| Video stream ends (no more frames) | Log warning, exit | `2` |\r\n\r\n## Troubleshooting\r\n\r\n### Virtual environment not found\r\n```\r\nbash: .venv/bin/python: No such file or directory\r\n```\r\n**Fix**: Run `bash setup.sh` to initialize the environment.\r\n\r\n### Model file missing\r\n```\r\nModel file not found: .../yolov8s-worldv2.onnx\r\n```\r\n**Fix**: `bash setup.sh` will first try to download the pre-built archive from\r\n<https://publicfiles.xiaoyi.com/kami-package-detection.zip> and unpack `yolov8s-worldv2.onnx` automatically.\r\nIf the host is unreachable (offline / firewall), it falls back to a local export from `.pt` via\r\n`export_model.py`. As a last resort you can also drop `yolov8s-worldv2.onnx` into the skill directory\r\nmanually.\r\n\r\n### RTSP connection failure\r\n```\r\nCannot open video: rtsp://...\r\n```\r\n**Fix**: Verify the camera is online, check the `--rtsp_url` value, and confirm network connectivity.\r\n\r\n### Low detection rate\r\n- Try lowering `--conf_threshold` (e.g., `0.15`)\r\n- Ensure the target object class is included in `--class_names`\r\n- Check camera angle and lighting conditions\r\n\r\n## File Structure\r\n\r\n```\r\nkami-package-detection/\r\n├── .gitignore\r\n├── requirements.txt          # onnxruntime, opencv-python-headless, numpy\r\n├── setup.sh                  # Environment setup with Python auto-detection\r\n├── SKILL.md                  # AI agent instructions + metadata\r\n├── README.md                 # This file\r\n├── yolo_world_onnx.py        # Main detection script\r\n├── yolov8s-worldv2.onnx      # ONNX model file (not included, user-provided)\r\n└── tests/\r\n    └── test_parcel_detection.py\r\n```\r\n\r\n## Privacy Notice\r\n\r\nThis skill processes camera video stream frames for object detection. Please review the following privacy information before use:\r\n\r\n### Pure Local Inference\r\n\r\n- Detection runs entirely on-device via the YOLOv8-World ONNX model — **no API key, no cloud calls, no external network traffic**\r\n- The only outbound traffic is the RTSP pull from your own camera (LAN)\r\n\r\n### Local Data Storage\r\n\r\n- Frames are held in memory only and discarded after each inference — **nothing is persisted to disk**\r\n- The skill emits a single JSON object to **stdout**; if you need history, the caller is responsible for storing it\r\n\r\n### User Control\r\n\r\n- Camera URL is supplied by the user; this skill will not auto-discover or connect to cameras\r\n- You can stop the skill at any time — there is no background daemon, no cache, and no residual data\r\n- Removing the skill directory wipes everything (model file + venv); nothing else is touched on the host\r\n\r\n> For more details on our privacy policy, visit: https://kamiclaw-skill.kamihome.com/privacy\r\n\r\n## License\r\n\r\nMIT-0\n\nFile v1.1.6:_meta.json\n\n{\n  \"ownerId\": \"kn7e9156e1awf00v1sas2wkdfd85a4zh\",\n  \"slug\": \"kami-package-detection\",\n  \"version\": \"1.1.6\",\n  \"publishedAt\": 1781073130954\n}\n\nFile v1.1.6:skill-card.md\n\n## Description: <br>\nKami Package Detection continuously monitors RTSP camera streams for packages, parcels, and bags with YOLO-World ONNX and alerts only when a new or moved package appears. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[13681882136](https://clawhub.ai/user/13681882136) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and smart-home operators use this skill to monitor configured RTSP camera feeds for package deliveries, doorway parcels, reception items, or warehouse cargo. The skill can run foreground checks or background monitoring and emits structured detection results for integration with notifications or other automations. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Continuous camera monitoring may process sensitive household, office, or warehouse footage. <br>\nMitigation: Use only cameras and locations where monitoring is authorized, keep RTSP access scoped to the intended device, and stop the background detector when monitoring is not needed. <br>\nRisk: Alert snapshots and logs can retain local paths, camera URLs, and image evidence after a detection. <br>\nMitigation: Restrict permissions on the skill directory, avoid embedding RTSP passwords in URLs where possible, and clear snapshots and logs on a regular schedule. <br>\nRisk: Notification integrations can send alert data and possibly snapshot images to external services. <br>\nMitigation: Configure Feishu, Telegram, or Discord credentials only when required, verify the destination channels, and remove unused webhook or bot tokens from config. <br>\nRisk: Setup downloads a model archive and may install additional packages during fallback export. <br>\nMitigation: Review installer behavior before execution, run setup in an isolated environment, and verify downloaded model files when operating in sensitive deployments. <br>\n\n\n## Reference(s): <br>\n- [ClawHub package page](https://clawhub.ai/13681882136/kami-package-detection) <br>\n- [Pre-built ONNX archive](https://publicfiles.xiaoyi.com/kami-package-detection.zip) <br>\n- [Kami skill privacy policy](https://kamiclaw-skill.kamihome.com/privacy) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, configuration, code, JSON] <br>\n**Output Format:** [Markdown guidance with shell commands and JSON alarm output from the detection script] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Alarm JSON may include detected class, confidence, camera name, frame number, snapshot path, and bounding boxes; setup and runtime commands may create local files such as a virtual environment, model files, logs, and snapshots.] <br>\n\n## Skill Version(s): <br>\n1.1.6 (source: server release metadata; artifact frontmatter reports 1.1.0) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.1.6:config.json\n\n{\n  \"cameras\": [\n    {\n      \"rtsp_url\": \"rtsp://admin:xxx@192.168.XXX/stream1\",\n      \"device_id\": \"camera1\"\n    },\n    {\n      \"rtsp_url\": \"rtsp://admin:xxx@192.168.xxx/stream1\",\n      \"device_id\": \"camera2\"\n    }\n  ],\n  \"conf_threshold\": 0.25,\n  \"run_time\": 0,\n  \"alarm_cooldown\": 60,\n  \"feishu_webhook_url\": \"\",\n  \"feishu_app_id\": \"\",\n  \"feishu_app_secret\": \"\",\n  \"telegram_bot_token\": \"\",\n  \"telegram_chat_id\": \"\",\n  \"discord_webhook_url\": \"\",\n  \"discord_bot_token\": \"\",\n  \"discord_channel_id\": \"\"\n}\n\nFile v1.1.6:requirements.txt\n\nonnxruntime\r\nopencv-python-headless\r\nnumpy\r\nrequests\n\nArchive v1.1.5: 10 files, 31623 bytes\n\nFiles: config.json (505b), export_model.py (3178b), notifier.py (16638b), README.md (11028b), requirements.txt (54b), setup.sh (13097b), skill-card.md (2437b), SKILL.md (11559b), yolo_world_onnx.py (35001b), _meta.json (141b)\n\nFile v1.1.5:SKILL.md\n\n---\r\nname: kami-package-detection\r\ndescription: A free skill by Kami SmartHome. Continuously monitors RTSP camera streams for packages, parcels, and bags using YOLO-World ONNX. Smart deduplication only triggers alerts when a genuinely new or moved package appears.\r\nversion: 1.1.0\r\nauthor: kami-smarthome\r\ntags:\r\n  - smart-home\r\n  - kami\r\n  - home-assistant\r\n  - smarthome\r\n  - detect\r\n  - object-detection\r\n  - yolo\r\n  - package-detection\r\n  - parcel-detection\r\n  - iot\r\n  - camera\r\n  - rtsp\r\n  - onnx\r\n  - edge-ai\r\n  - delivery\r\n  - monitoring\r\n  - notification\r\ntriggers:\r\n  - smart home\r\n  - kami\r\n  - home assistant\r\n  - detect\r\n  - detect packages\r\n  - detect parcels\r\n  - kami package\r\n  - kami smart home\r\n  - home assistant package\r\n  - smart home delivery\r\n  - check doorstep\r\n  - delivery notification\r\n  - check for deliveries\r\n  - package detection\r\n  - is there a package\r\n  - monitor packages\r\n  - check camera for packages\r\n  - any deliveries at the door\r\n  - parcel alert\r\nmetadata:\r\n  openclaw:\r\n    requires:\r\n      bins:\r\n        - python3.10\r\n      hardware:\r\n        cpu: \"2+ cores (x86_64 / ARM64)\"\r\n        memory: \"2 GB+\"\r\n        storage: \"2 GB+\"\r\n        gpu: \"optional (speeds up ONNX inference)\"\r\n      network:\r\n        - \"RTSP camera access (LAN)\"\r\n        - \"Internet (KamiClaw API)\"\r\n      devices:\r\n        - \"RTSP IP camera\"\r\n    emoji: \"📦\"\r\n---\r\n\r\n# Kami Package Detection\r\n\r\n> Continuously monitors your camera and sends instant notifications when a new package arrives.\r\n\r\nContinuously monitors RTSP camera streams for packages, parcels, backpacks, and suitcases. People and handbags are recognized by the model but suppressed at the alert layer to cut down on false alarms. When a **new** package is detected (position/size significantly different from the last alert), sends push notifications. Static frames are automatically skipped to save compute.\r\n\r\n### Features\r\n\r\n- 📦 Continuous package & parcel monitoring (not one-shot)\r\n- 🔔 Push notifications via Feishu / Telegram / Discord\r\n- 🧠 Smart deduplication — only alerts for new or moved packages (IoU + area change), with a **24-hour tracking window** to silence repeated alerts on the same parcel\r\n- ⚡ Static frame filtering — skips inference when camera scene is unchanged\r\n- 📷 Multi-camera support with independent background processes\r\n- 🧳 Suitcase / backpack recognition\r\n- 🏠 Doorstep & reception monitoring\r\n\r\n### Scenarios\r\n\r\n- Doorstep delivery waiting\r\n- Office reception package management\r\n- Warehouse cargo monitoring\r\n- Temporary item watch\r\n\r\n## Installation\r\n\r\n```bash\r\nbash setup.sh\r\n```\r\n\r\nCreates `.venv/` and installs `onnxruntime`, `opencv-python-headless`, `numpy`, `requests`. Idempotent.\r\n\r\n## Prerequisites\r\n\r\n- `python3` and `python3-venv` installed\r\n- RTSP camera(s) online and reachable\r\n- Internet access on first run (to download `yolov8s-worldv2.pt` if not bundled)\r\n\r\n### Model\r\n\r\nThe `yolov8s-worldv2.onnx` model file is auto-prepared by `setup.sh` using a download-first, export-fallback strategy:\r\n\r\n1. If `yolov8s-worldv2.onnx` is already present → reused as-is.\r\n2. Otherwise, `setup.sh` downloads the pre-built archive `kami-package-detection.zip` from <https://publicfiles.xiaoyi.com/kami-package-detection.zip> and extracts `yolov8s-worldv2.onnx` out of it (fast path, no extra dependencies).\r\n3. If the download or extraction fails (offline / mirror unreachable), `setup.sh` falls back to installing `ultralytics` into the venv (one-time, ~500 MB with torch) and runs [export_model.py](file:///./export_model.py), which loads `yolov8s-worldv2.pt` (auto-downloaded by Ultralytics if absent), injects the custom vocabulary via `set_classes()`, and exports to ONNX with `imgsz=320`.\r\n\r\nManual export / re-export:\r\n\r\n```bash\r\n# Re-export even if the ONNX already exists\r\n.venv/bin/python export_model.py --force\r\n\r\n# Custom image size\r\n.venv/bin/python export_model.py --imgsz 320\r\n```\r\n\r\nIf you change the class list, edit `CLASS_NAMES` in **both** [export_model.py](file:///./export_model.py) and `DEFAULT_CLASS_NAMES` in [yolo_world_onnx.py](file:///./yolo_world_onnx.py) to keep them in sync (same order, same length), then re-export with `--force`.\r\n\r\n## Parameter Confirmation\r\n\r\nParameters can be supplied via either `config.json` (recommended for repeated use) or command-line flags. Command-line flags override `config.json`, which overrides built-in defaults.\r\n\r\n| Parameter | `config.json` field | Default | Description |\r\n|-----------|---------------------|---------|-------------|\r\n| `--device` | *(selects from cameras array)* | first camera | Target camera DEVICE_ID |\r\n| `--rtsp_url` | `cameras[].rtsp_url` | — | RTSP camera URL (overrides camera selection) |\r\n| `--conf_threshold` | `conf_threshold` | `0.25` | Confidence threshold (0.0–1.0) |\r\n| `--class_names` | *(not in config.json)* | `parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase` | Classes to detect (CLI only) |\r\n| `--run_time` | `run_time` | `0` | Max seconds; `0` = unlimited (continuous monitoring) |\r\n| `--start-detect` | — | — | Start background detection (all cameras or `--device`) |\r\n| `--stop-detect` | — | — | Stop background detection (all cameras or `--device`) |\r\n| `--status` | — | — | Check detection process status |\r\n| `--list-devices` | — | — | List all configured cameras and exit |\r\n| — | `alarm_cooldown` | `60` | Min seconds between notifications for different packages |\r\n| — | `feishu_webhook_url` | — | Feishu Webhook URL for push notifications |\r\n| — | `telegram_bot_token` | — | Telegram Bot token |\r\n| — | `telegram_chat_id` | — | Telegram chat ID |\r\n| — | `discord_webhook_url` | — | Discord Webhook URL |\r\n| — | `discord_bot_token` | — | Discord Bot token |\r\n| — | `discord_channel_id` | — | Discord channel ID |\r\n\r\n### Multi-Camera Configuration\r\n\r\n`config.json` supports a `cameras` array for multiple cameras:\r\n\r\n```json\r\n{\r\n  \"cameras\": [\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.100/stream\",\r\n      \"device_id\": \"CAM-FRONT\"\r\n    },\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.101/stream\",\r\n      \"device_id\": \"CAM-BACK\",\r\n      \"conf_threshold\": 0.3\r\n    }\r\n  ],\r\n  \"conf_threshold\": 0.25,\r\n  \"run_time\": 0,\r\n  \"alarm_cooldown\": 60,\r\n  \"feishu_webhook_url\": \"\",\r\n  \"telegram_bot_token\": \"\",\r\n  \"telegram_chat_id\": \"\",\r\n  \"discord_webhook_url\": \"\"\r\n}\r\n```\r\n\r\n- `device_id` must be unique across all cameras\r\n- Per-camera `conf_threshold` and `run_time` override global values\r\n- Without `--device`, all cameras are started/stopped together\r\n- Each camera runs as an independent background process\r\n- Legacy single-camera config (flat `rtsp_url` at top level) is still supported\r\n\r\n### Common Brand RTSP Templates\r\n\r\nIf the user is unsure about the RTSP URL, suggest one of these patterns based on camera brand:\r\n\r\n| Brand key | Brand | URL pattern |\r\n|-----------|-------|-------------|\r\n| `hikvision` | Hikvision | `rtsp://{user}:{pwd}@{ip}:554/Streaming/Channels/101` (`101`=ch1 main, `102`=ch1 sub) |\r\n| `dahua` | Dahua | `rtsp://{user}:{pwd}@{ip}:554/cam/realmonitor?channel=1&subtype=0` (`subtype=0` main, `1` sub) |\r\n| `tplink` | TP-Link | `rtsp://{user}:{pwd}@{ip}:554/stream1` (`stream1` main, `stream2` sub) |\r\n| `ezviz` | EZVIZ | `rtsp://admin:{verify_code}@{ip}:554/H264/ch1/main/av_stream` |\r\n| `uniview` | Uniview | `rtsp://{user}:{pwd}@{ip}:554/media/video1` |\r\n| `reolink` | Reolink | `rtsp://{user}:{pwd}@{ip}:554/h264Preview_01_main` |\r\n\r\n**Ask the user: do any parameters need to be changed?**\r\n\r\n## Usage\r\n\r\n### Start Detection (Background)\r\n\r\n```bash\r\n# Start all cameras\r\n.venv/bin/python yolo_world_onnx.py --start-detect\r\n\r\n# Start a specific camera\r\n.venv/bin/python yolo_world_onnx.py --start-detect --device CAM-FRONT\r\n```\r\n\r\n### Stop Detection\r\n\r\n```bash\r\n# Stop all cameras\r\n.venv/bin/python yolo_world_onnx.py --stop-detect\r\n\r\n# Stop a specific camera\r\n.venv/bin/python yolo_world_onnx.py --stop-detect --device CAM-FRONT\r\n```\r\n\r\n### Check Status\r\n\r\n```bash\r\n# Status of all cameras\r\n.venv/bin/python yolo_world_onnx.py --status\r\n\r\n# Status of a specific camera\r\n.venv/bin/python yolo_world_onnx.py --status --device CAM-FRONT\r\n```\r\n\r\n### Single-Run Mode (Foreground)\r\n\r\n```bash\r\n# Run continuous monitoring on a specific camera (foreground)\r\n.venv/bin/python yolo_world_onnx.py --device CAM-FRONT\r\n\r\n# Override via CLI (runs for 120 seconds then stops)\r\n.venv/bin/python yolo_world_onnx.py \\\r\n  --rtsp_url rtsp://your-camera-address \\\r\n  --run_time 120\r\n\r\n# List configured cameras\r\n.venv/bin/python yolo_world_onnx.py --list-devices\r\n```\r\n\r\n## Output (stdout JSON)\r\n\r\nWhen a new package is detected, outputs an alarm JSON to stdout:\r\n\r\n```json\r\n{\r\n  \"alarm\": true,\r\n  \"type\": \"package\",\r\n  \"class_name\": \"parcel\",\r\n  \"confidence\": 0.87,\r\n  \"camera_name\": \"CAM-FRONT\",\r\n  \"frame\": 1523,\r\n  \"snapshot\": \"/path/to/snapshots/CAM-FRONT/20260604_153012_482.jpg\",\r\n  \"detections\": [\r\n    {\r\n      \"class_name\": \"parcel\",\r\n      \"bbox\": {\"x1\": 100, \"y1\": 200, \"x2\": 300, \"y2\": 400}\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\n| Field | Type | Description |\r\n|-------|------|-------------|\r\n| `alarm` | bool | Always `true` for alarm output |\r\n| `type` | string | Always `\"package\"` |\r\n| `class_name` | string | Detected object class |\r\n| `confidence` | float | Detection confidence (0.0–1.0) |\r\n| `camera_name` | string | Source camera device_id |\r\n| `frame` | int | Frame number when detected |\r\n| `snapshot` | string | Absolute path to the annotated JPG (with bounding box drawn) |\r\n| `bbox.x1, y1, x2, y2` | int | Bounding box coordinates |\r\n\r\n## Exit Codes\r\n\r\n| Code | Meaning |\r\n|------|---------|\r\n| `0` | Normal exit (run_time reached or manual stop via signal) |\r\n| `1` | Error (model missing, RTSP failure, runtime exception) |\r\n\r\n## Troubleshooting\r\n\r\n- `bash: .venv/bin/python: No such file or directory` → Run `bash setup.sh`\r\n- `Model file not found` → Place `yolov8s-worldv2.onnx` in the skill directory\r\n- `Cannot open video` → Check camera is online and `--rtsp_url` is correct\r\n\r\n## Privacy Notice\r\n\r\nThis skill processes camera video stream frames for object detection. Please review the following privacy information before use:\r\n\r\n### Pure Local Inference\r\n\r\n- Detection runs entirely on-device via the YOLOv8-World ONNX model — **no cloud API calls for inference**\r\n- The only outbound traffic is: RTSP pull from your camera (LAN) + notification push to your configured channels (Feishu / Telegram / Discord)\r\n\r\n### Local Data Storage\r\n\r\n- Frames are held in memory only and discarded after each inference — **nothing is persisted to disk by default**\r\n- When an alarm fires, the annotated frame is saved as a JPEG under `snapshots/<camera_device_id>/` for evidence; nothing else is persisted\r\n- The skill emits alarm JSON objects to **stdout**; if you need history, the caller is responsible for storing it\r\n\r\n### Notification Channels\r\n\r\n- Push notifications are sent only when configured (all channels are optional)\r\n- Notification content includes: detected class name, confidence, camera name, and timestamp\r\n- No images or video frames are sent in notifications\r\n\r\n### User Control\r\n\r\n- Camera URL is supplied by the user; this skill will not auto-discover or connect to cameras\r\n- You can stop the skill at any time via `--stop-detect` or SIGTERM\r\n- Removing the skill directory wipes everything (model file + venv); nothing else is touched on the host\r\n\r\n> For more details on our privacy policy, visit: https://kamiclaw-skill.kamihome.com/privacy\n\nFile v1.1.5:README.md\n\n# 📦 Kami Package Detection\r\n\r\n> A free skill by **Kami SmartHome** — get notified the moment a package arrives at your door.\r\n\r\nMonitor your RTSP camera feed for packages, parcels, backpacks, and suitcases using YOLOv8-World ONNX inference. People and handbags are recognized by the model but suppressed at the alert layer (so a person carrying their bag past the door does **not** trigger an alarm). When a delivery target is detected, outputs the object class and bounding box as structured JSON to stdout.\r\n\r\n### Features\r\n\r\n- 📦 Package & parcel detection\r\n- 🧳 Suitcase / backpack recognition\r\n- 🏠 Doorstep & reception monitoring\r\n- ⏱ Configurable detection duration\r\n- 🔔 JSON output for easy integration\r\n- 🖥 CPU-only inference via `onnxruntime` — no GPU required\r\n- 🐍 Isolated `.venv` — zero impact on system Python\r\n\r\n### Scenarios\r\n\r\n- Doorstep delivery waiting\r\n- Office reception package management\r\n- Warehouse cargo monitoring\r\n- Temporary item watch\r\n\r\n## Quick Start\r\n\r\n```bash\r\n# 1. Run setup (one-time)\r\nbash setup.sh\r\n\r\n# 2. Place your ONNX model file\r\ncp /path/to/yolov8s-worldv2.onnx .\r\n\r\n# 3a. Foreground single-run (exits on first detection or timeout)\r\n.venv/bin/python yolo_world_onnx.py \\\r\n  --rtsp_url rtsp://192.168.1.100/live/camera01 \\\r\n  --conf_threshold 0.25 \\\r\n  --class_names parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase \\\r\n  --run_time 120\r\n\r\n# 3b. Background daemon for one or more cameras (uses config.json)\r\n.venv/bin/python yolo_world_onnx.py --start-detect\r\n.venv/bin/python yolo_world_onnx.py --status\r\n.venv/bin/python yolo_world_onnx.py --stop-detect\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nbash setup.sh\r\n```\r\n\r\nThe setup script automatically:\r\n1. Detects system Python (`python3` or `python`), exits with error if not found\r\n2. Creates an isolated virtual environment at `.venv/`\r\n3. Installs Python dependencies from `requirements.txt`\r\n\r\n> Idempotent — safe to run multiple times. Won't reinstall existing dependencies.\r\n\r\n### Requirements\r\n\r\n| Dependency | Version | Purpose |\r\n|------------|---------|---------|\r\n| `onnxruntime` | latest | ONNX model inference engine |\r\n| `opencv-python-headless` | latest | Video capture and image processing |\r\n| `numpy` | latest | Array operations |\r\n\r\n### System Prerequisites\r\n\r\n- **Python 3.8+** and **python3-venv** (`sudo apt install python3 python3-venv`)\r\n- **ONNX model file**: `yolov8s-worldv2.onnx` in the skill directory\r\n- **RTSP camera**: online and network-reachable\r\n\r\n## Usage\r\n\r\n### Basic Detection\r\n\r\nParameters can be supplied via either `config.json` (recommended) or command-line flags. CLI flags > `config.json` > built-in defaults.\r\n\r\n```bash\r\n# Option 1: Edit config.json once, then just run\r\n.venv/bin/python yolo_world_onnx.py\r\n\r\n# Option 2: Override via CLI\r\n.venv/bin/python yolo_world_onnx.py \\\r\n  --rtsp_url rtsp://127.0.0.1/live/TNPUSAQ-757597-DRFMY \\\r\n  --conf_threshold 0.25 \\\r\n  --class_names parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase \\\r\n  --run_time 60\r\n```\r\n\r\n### Multi-Camera Configuration\r\n\r\n`config.json` supports a `cameras` array so multiple RTSP feeds can run as independent background processes:\r\n\r\n```json\r\n{\r\n  \"cameras\": [\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.100/stream\",\r\n      \"device_id\": \"CAM-FRONT\"\r\n    },\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.101/stream\",\r\n      \"device_id\": \"CAM-BACK\",\r\n      \"conf_threshold\": 0.3,\r\n      \"run_time\": 120\r\n    }\r\n  ],\r\n  \"conf_threshold\": 0.25,\r\n  \"run_time\": 60\r\n}\r\n```\r\n\r\n- `device_id` must be unique across all cameras\r\n- Per-camera `conf_threshold` and `run_time` override global values\r\n- Without `--device`, all cameras start/stop together\r\n- Legacy single-camera config (flat `rtsp_url` at top level) is still supported\r\n\r\n### Daemon Mode (Multi-Camera)\r\n\r\n```bash\r\n# Start all cameras\r\n.venv/bin/python yolo_world_onnx.py --start-detect\r\n\r\n# Start a specific camera\r\n.venv/bin/python yolo_world_onnx.py --start-detect --device CAM-FRONT\r\n\r\n# Status (all cameras or a specific one)\r\n.venv/bin/python yolo_world_onnx.py --status\r\n.venv/bin/python yolo_world_onnx.py --status --device CAM-FRONT\r\n\r\n# Stop (all cameras or a specific one)\r\n.venv/bin/python yolo_world_onnx.py --stop-detect\r\n.venv/bin/python yolo_world_onnx.py --stop-detect --device CAM-FRONT\r\n\r\n# List all configured cameras\r\n.venv/bin/python yolo_world_onnx.py --list-devices\r\n```\r\n\r\n### Parameters\r\n\r\n| Parameter | `config.json` field | Type | Required | Default | Description |\r\n|-----------|---------------------|------|----------|---------|-------------|\r\n| `--rtsp_url` | `rtsp_url` / `cameras[].rtsp_url` | string | No | `rtsp://127.0.0.1/live/TNPUSAQ-757597-DRFMY` | RTSP camera stream URL (overrides camera selection when used directly) |\r\n| `--device` | *(selects from `cameras` array)* | string | No | first camera | Target camera `device_id` (foreground or daemon mode) |\r\n| `--conf_threshold` | `conf_threshold` | float | No | `0.25` | Detection confidence threshold (0.0–1.0) |\r\n| `--class_names` | *(not in config.json)* | string[] | No | `parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase` | Space-separated class names to detect (CLI only) |\r\n| `--run_time` | `run_time` | int | No | `60` | Max run time in seconds. `0` = unlimited |\r\n| `--start-detect` | — | flag | No | — | Start background detection (all cameras, or one with `--device`) |\r\n| `--stop-detect` | — | flag | No | — | Stop background detection (all cameras, or one with `--device`) |\r\n| `--status` | — | flag | No | — | Check detection process status |\r\n| `--list-devices` | — | flag | No | — | List all configured cameras and exit |\r\n\r\n> When installed as part of `kami-smarthome-suite`, `cameras[]`, `conf_threshold` and `run_time` are auto-distributed into `config.json` from the central `kami_config.json`. `class_names` is a per-skill default and not distributed.\r\n\r\n## Output Format\r\n\r\nWhen a delivery target is detected, the skill outputs JSON to **stdout** and exits with code `0`:\r\n\r\n```json\r\n{\r\n  \"detections\": [\r\n    {\r\n      \"class_name\": \"parcel\",\r\n      \"bbox\": {\"x1\": 100, \"y1\": 200, \"x2\": 300, \"y2\": 400}\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\n### Field Reference\r\n\r\n| Field | Type | Description |\r\n|-------|------|-------------|\r\n| `detections` | array | List of detected objects |\r\n| `detections[].class_name` | string | Detected object class |\r\n| `detections[].bbox.x1` | int | Bounding box left x |\r\n| `detections[].bbox.y1` | int | Bounding box top y |\r\n| `detections[].bbox.x2` | int | Bounding box right x |\r\n| `detections[].bbox.y2` | int | Bounding box bottom y |\r\n\r\n## Exit Codes\r\n\r\n| Code | Meaning |\r\n|------|---------|\r\n| `0` | Target detected and JSON output written |\r\n| `1` | Model file missing, RTSP connection failure, or runtime error |\r\n| `2` | Run time exceeded, no target detected (timeout) |\r\n\r\n> Exit code `0` = detection success, `2` = timeout with no detection, `1` = error.\r\n\r\n## Architecture\r\n\r\n```\r\nRTSP Camera → [yolo_world_onnx.py] → JSON stdout\r\n                    │\r\n                    ├── letterbox (preprocessing)\r\n                    ├── ONNX inference (YOLOv8-World)\r\n                    ├── parse_output + NMS (post-processing)\r\n                    └── format_detection_result (JSON output)\r\n```\r\n\r\nThe skill follows a single-pass detection model:\r\n1. Read frames from RTSP stream\r\n2. Preprocess each frame (letterbox resize to 320×320)\r\n3. Run ONNX inference\r\n4. Parse detections, apply NMS\r\n5. On first delivery-target detection (excluding `person` / `handbag`) → output JSON → exit\r\n6. New detections matching an already-tracked package within the **24-hour tracking window** are silently suppressed (no re-alert), so the same parcel sitting at the door does not spam notifications.\r\n\r\n## Error Handling\r\n\r\n| Scenario | Behavior | Exit Code |\r\n|----------|----------|-----------|\r\n| Model file (`yolov8s-worldv2.onnx`) not found | Log error, exit immediately | `1` |\r\n| RTSP stream cannot connect | Log error, exit immediately | `1` |\r\n| Model load failure (corrupt ONNX) | Log error, exit immediately | `1` |\r\n| Run time exceeded | Log timeout info, exit | `2` |\r\n| Video stream ends (no more frames) | Log warning, exit | `2` |\r\n\r\n## Troubleshooting\r\n\r\n### Virtual environment not found\r\n```\r\nbash: .venv/bin/python: No such file or directory\r\n```\r\n**Fix**: Run `bash setup.sh` to initialize the environment.\r\n\r\n### Model file missing\r\n```\r\nModel file not found: .../yolov8s-worldv2.onnx\r\n```\r\n**Fix**: `bash setup.sh` will first try to download the pre-built archive from\r\n<https://publicfiles.xiaoyi.com/kami-package-detection.zip> and unpack `yolov8s-worldv2.onnx` automatically.\r\nIf the host is unreachable (offline / firewall), it falls back to a local export from `.pt` via\r\n`export_model.py`. As a last resort you can also drop `yolov8s-worldv2.onnx` into the skill directory\r\nmanually.\r\n\r\n### RTSP connection failure\r\n```\r\nCannot open video: rtsp://...\r\n```\r\n**Fix**: Verify the camera is online, check the `--rtsp_url` value, and confirm network connectivity.\r\n\r\n### Low detection rate\r\n- Try lowering `--conf_threshold` (e.g., `0.15`)\r\n- Ensure the target object class is included in `--class_names`\r\n- Check camera angle and lighting conditions\r\n\r\n## File Structure\r\n\r\n```\r\nkami-package-detection/\r\n├── .gitignore\r\n├── requirements.txt          # onnxruntime, opencv-python-headless, numpy\r\n├── setup.sh                  # Environment setup with Python auto-detection\r\n├── SKILL.md                  # AI agent instructions + metadata\r\n├── README.md                 # This file\r\n├── yolo_world_onnx.py        # Main detection script\r\n├── yolov8s-worldv2.onnx      # ONNX model file (not included, user-provided)\r\n└── tests/\r\n    └── test_parcel_detection.py\r\n```\r\n\r\n## Privacy Notice\r\n\r\nThis skill processes camera video stream frames for object detection. Please review the following privacy information before use:\r\n\r\n### Pure Local Inference\r\n\r\n- Detection runs entirely on-device via the YOLOv8-World ONNX model — **no API key, no cloud calls, no external network traffic**\r\n- The only outbound traffic is the RTSP pull from your own camera (LAN)\r\n\r\n### Local Data Storage\r\n\r\n- Frames are held in memory only and discarded after each inference — **nothing is persisted to disk**\r\n- The skill emits a single JSON object to **stdout**; if you need history, the caller is responsible for storing it\r\n\r\n### User Control\r\n\r\n- Camera URL is supplied by the user; this skill will not auto-discover or connect to cameras\r\n- You can stop the skill at any time — there is no background daemon, no cache, and no residual data\r\n- Removing the skill directory wipes everything (model file + venv); nothing else is touched on the host\r\n\r\n> For more details on our privacy policy, visit: https://kamiclaw-skill.kamihome.com/privacy\r\n\r\n## License\r\n\r\nMIT-0\n\nFile v1.1.5:_meta.json\n\n{\n  \"ownerId\": \"kn7e9156e1awf00v1sas2wkdfd85a4zh\",\n  \"slug\": \"kami-package-detection\",\n  \"version\": \"1.1.5\",\n  \"publishedAt\": 1781054838458\n}\n\nFile v1.1.5:skill-card.md\n\n## Description: <br>\nContinuously monitors RTSP camera streams for packages, parcels, and bags using YOLO-World ONNX, with deduplication so alerts fire only when a genuinely new or moved package appears. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[13681882136](https://clawhub.ai/user/13681882136) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users, smart-home operators, and facilities teams use this skill to monitor user-provided RTSP camera feeds for package, parcel, backpack, and suitcase detections and receive structured alerts. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Continuous RTSP camera monitoring can process sensitive video from private spaces. <br>\nMitigation: Use only cameras and network locations you control, and confirm monitoring behavior before enabling background detection. <br>\nRisk: Snapshot images may be saved locally and uploaded or sent through configured notification channels. <br>\nMitigation: Configure only trusted notification accounts, review snapshot retention needs, and clear snapshots when retained camera evidence is not needed. <br>\nRisk: RTSP URLs can contain credentials and may be written to logs. <br>\nMitigation: Avoid embedding passwords in camera URLs where logs are accessible, restrict log access, and rotate credentials if exposed. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/13681882136/kami-package-detection) <br>\n- [Kami package detection model archive](https://publicfiles.xiaoyi.com/kami-package-detection.zip) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [JSON, Files, Shell commands, Configuration] <br>\n**Output Format:** [JSON alarm objects on stdout with optional local JPEG snapshot files and notification messages] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Includes detected class, confidence, camera name, frame number, bounding boxes, and snapshot path when an alarm fires.] <br>\n\n## Skill Version(s): <br>\n1.1.5 (source: ClawHub release metadata; artifact frontmatter reports 1.1.0) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.1.5:config.json\n\n{\n  \"cameras\": [\n    {\n      \"rtsp_url\": \"rtsp://admin:xxx@192.168.XXX/stream1\",\n      \"device_id\": \"camera1\"\n    },\n    {\n      \"rtsp_url\": \"rtsp://admin:xxx@192.168.xxx/stream1\",\n      \"device_id\": \"camera2\"\n    }\n  ],\n  \"conf_threshold\": 0.25,\n  \"run_time\": 0,\n  \"alarm_cooldown\": 60,\n  \"feishu_webhook_url\": \"\",\n  \"feishu_app_id\": \"\",\n  \"feishu_app_secret\": \"\",\n  \"telegram_bot_token\": \"\",\n  \"telegram_chat_id\": \"\",\n  \"discord_webhook_url\": \"\",\n  \"discord_bot_token\": \"\",\n  \"discord_channel_id\": \"\"\n}\n\nFile v1.1.5:requirements.txt\n\nonnxruntime\r\nopencv-python-headless\r\nnumpy\r\nrequests\n\nArchive v1.1.4: 10 files, 27285 bytes\n\nFiles: config.json (319b), export_model.py (3178b), notifier.py (8420b), README.md (10305b), requirements.txt (54b), setup.sh (8986b), skill-card.md (2835b), SKILL.md (10560b), yolo_world_onnx.py (34931b), _meta.json (141b)\n\nFile v1.1.4:SKILL.md\n\n---\r\nname: kami-package-detection\r\ndescription: A free skill by Kami SmartHome. Continuously monitors RTSP camera streams for packages, parcels, and bags using YOLO-World ONNX. Smart deduplication only triggers alerts when a genuinely new or moved package appears.\r\nversion: 1.1.0\r\nauthor: kami-smarthome\r\ntags:\r\n  - smart-home\r\n  - kami\r\n  - home-assistant\r\n  - smarthome\r\n  - detect\r\n  - object-detection\r\n  - yolo\r\n  - package-detection\r\n  - parcel-detection\r\n  - iot\r\n  - camera\r\n  - rtsp\r\n  - onnx\r\n  - edge-ai\r\n  - delivery\r\n  - monitoring\r\n  - notification\r\ntriggers:\r\n  - smart home\r\n  - kami\r\n  - home assistant\r\n  - detect\r\n  - detect packages\r\n  - detect parcels\r\n  - kami package\r\n  - kami smart home\r\n  - home assistant package\r\n  - smart home delivery\r\n  - check doorstep\r\n  - delivery notification\r\n  - check for deliveries\r\n  - package detection\r\n  - is there a package\r\n  - monitor packages\r\n  - check camera for packages\r\n  - any deliveries at the door\r\n  - parcel alert\r\nmetadata:\r\n  openclaw:\r\n    requires:\r\n      bins:\r\n        - python3.10\r\n      hardware:\r\n        cpu: \"2+ cores (x86_64 / ARM64)\"\r\n        memory: \"2 GB+\"\r\n        storage: \"2 GB+\"\r\n        gpu: \"optional (speeds up ONNX inference)\"\r\n      network:\r\n        - \"RTSP camera access (LAN)\"\r\n        - \"Internet (KamiClaw API)\"\r\n      devices:\r\n        - \"RTSP IP camera\"\r\n    emoji: \"📦\"\r\n---\r\n\r\n# Kami Package Detection\r\n\r\n> Continuously monitors your camera and sends instant notifications when a new package arrives.\r\n\r\nContinuously monitors RTSP camera streams for packages, parcels, backpacks, handbags, and suitcases. When a **new** package is detected (position/size significantly different from the last alert), sends push notifications. Static frames are automatically skipped to save compute.\r\n\r\n### Features\r\n\r\n- 📦 Continuous package & parcel monitoring (not one-shot)\r\n- 🔔 Push notifications via Feishu / Telegram / Discord\r\n- 🧠 Smart deduplication — only alerts for new or moved packages (IoU + area change)\r\n- ⚡ Static frame filtering — skips inference when camera scene is unchanged\r\n- 📷 Multi-camera support with independent background processes\r\n- 🧳 Suitcase / backpack / handbag recognition\r\n- 🏠 Doorstep & reception monitoring\r\n\r\n### Scenarios\r\n\r\n- Doorstep delivery waiting\r\n- Office reception package management\r\n- Warehouse cargo monitoring\r\n- Temporary item watch\r\n\r\n## Installation\r\n\r\n```bash\r\nbash setup.sh\r\n```\r\n\r\nCreates `.venv/` and installs `onnxruntime`, `opencv-python-headless`, `numpy`, `requests`. Idempotent.\r\n\r\n## Prerequisites\r\n\r\n- `python3` and `python3-venv` installed\r\n- RTSP camera(s) online and reachable\r\n- Internet access on first run (to download `yolov8s-worldv2.pt` if not bundled)\r\n\r\n### Model\r\n\r\nThe `yolov8s-worldv2.onnx` model file is auto-prepared by `setup.sh`:\r\n\r\n- If `yolov8s-worldv2.onnx` is already present → reused as-is\r\n- If missing → `setup.sh` installs `ultralytics` into the venv (one-time, ~500 MB with torch) and runs [export_model.py](file:///./export_model.py), which loads `yolov8s-worldv2.pt` (auto-downloaded by Ultralytics if absent), injects the custom vocabulary via `set_classes()`, and exports to ONNX with `imgsz=320`\r\n\r\nManual export / re-export:\r\n\r\n```bash\r\n# Re-export even if the ONNX already exists\r\n.venv/bin/python export_model.py --force\r\n\r\n# Custom image size\r\n.venv/bin/python export_model.py --imgsz 320\r\n```\r\n\r\nIf you change the class list, edit `CLASS_NAMES` in **both** [export_model.py](file:///./export_model.py) and `DEFAULT_CLASS_NAMES` in [yolo_world_onnx.py](file:///./yolo_world_onnx.py) to keep them in sync (same order, same length), then re-export with `--force`.\r\n\r\n## Parameter Confirmation\r\n\r\nParameters can be supplied via either `config.json` (recommended for repeated use) or command-line flags. Command-line flags override `config.json`, which overrides built-in defaults.\r\n\r\n| Parameter | `config.json` field | Default | Description |\r\n|-----------|---------------------|---------|-------------|\r\n| `--device` | *(selects from cameras array)* | first camera | Target camera DEVICE_ID |\r\n| `--rtsp_url` | `cameras[].rtsp_url` | — | RTSP camera URL (overrides camera selection) |\r\n| `--conf_threshold` | `conf_threshold` | `0.25` | Confidence threshold (0.0–1.0) |\r\n| `--class_names` | *(not in config.json)* | `parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase` | Classes to detect (CLI only) |\r\n| `--run_time` | `run_time` | `0` | Max seconds; `0` = unlimited (continuous monitoring) |\r\n| `--start-detect` | — | — | Start background detection (all cameras or `--device`) |\r\n| `--stop-detect` | — | — | Stop background detection (all cameras or `--device`) |\r\n| `--status` | — | — | Check detection process status |\r\n| `--list-devices` | — | — | List all configured cameras and exit |\r\n| — | `alarm_cooldown` | `60` | Min seconds between notifications for different packages |\r\n| — | `feishu_webhook_url` | — | Feishu Webhook URL for push notifications |\r\n| — | `telegram_bot_token` | — | Telegram Bot token |\r\n| — | `telegram_chat_id` | — | Telegram chat ID |\r\n| — | `discord_webhook_url` | — | Discord Webhook URL |\r\n| — | `discord_bot_token` | — | Discord Bot token |\r\n| — | `discord_channel_id` | — | Discord channel ID |\r\n\r\n### Multi-Camera Configuration\r\n\r\n`config.json` supports a `cameras` array for multiple cameras:\r\n\r\n```json\r\n{\r\n  \"cameras\": [\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.100/stream\",\r\n      \"device_id\": \"CAM-FRONT\"\r\n    },\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.101/stream\",\r\n      \"device_id\": \"CAM-BACK\",\r\n      \"conf_threshold\": 0.3\r\n    }\r\n  ],\r\n  \"conf_threshold\": 0.25,\r\n  \"run_time\": 0,\r\n  \"alarm_cooldown\": 60,\r\n  \"feishu_webhook_url\": \"\",\r\n  \"telegram_bot_token\": \"\",\r\n  \"telegram_chat_id\": \"\",\r\n  \"discord_webhook_url\": \"\"\r\n}\r\n```\r\n\r\n- `device_id` must be unique across all cameras\r\n- Per-camera `conf_threshold` and `run_time` override global values\r\n- Without `--device`, all cameras are started/stopped together\r\n- Each camera runs as an independent background process\r\n- Legacy single-camera config (flat `rtsp_url` at top level) is still supported\r\n\r\n> When installed as part of `kami-smarthome-suite`, `rtsp_url`, `conf_threshold`, `run_time`, `alarm_cooldown` and all notification channel fields are auto-distributed into `config.json` from the central `kami_config.json`. `class_names` is intentionally NOT distributed and stays a per-skill default.\r\n\r\n**Ask the user: do any parameters need to be changed?**\r\n\r\n## Usage\r\n\r\n### Start Detection (Background)\r\n\r\n```bash\r\n# Start all cameras\r\n.venv/bin/python yolo_world_onnx.py --start-detect\r\n\r\n# Start a specific camera\r\n.venv/bin/python yolo_world_onnx.py --start-detect --device CAM-FRONT\r\n```\r\n\r\n### Stop Detection\r\n\r\n```bash\r\n# Stop all cameras\r\n.venv/bin/python yolo_world_onnx.py --stop-detect\r\n\r\n# Stop a specific camera\r\n.venv/bin/python yolo_world_onnx.py --stop-detect --device CAM-FRONT\r\n```\r\n\r\n### Check Status\r\n\r\n```bash\r\n# Status of all cameras\r\n.venv/bin/python yolo_world_onnx.py --status\r\n\r\n# Status of a specific camera\r\n.venv/bin/python yolo_world_onnx.py --status --device CAM-FRONT\r\n```\r\n\r\n### Single-Run Mode (Foreground)\r\n\r\n```bash\r\n# Run continuous monitoring on a specific camera (foreground)\r\n.venv/bin/python yolo_world_onnx.py --device CAM-FRONT\r\n\r\n# Override via CLI (runs for 120 seconds then stops)\r\n.venv/bin/python yolo_world_onnx.py \\\r\n  --rtsp_url rtsp://your-camera-address \\\r\n  --run_time 120\r\n\r\n# List configured cameras\r\n.venv/bin/python yolo_world_onnx.py --list-devices\r\n```\r\n\r\n## Output (stdout JSON)\r\n\r\nWhen a new package is detected, outputs an alarm JSON to stdout:\r\n\r\n```json\r\n{\r\n  \"alarm\": true,\r\n  \"type\": \"package\",\r\n  \"class_name\": \"parcel\",\r\n  \"confidence\": 0.87,\r\n  \"camera_name\": \"CAM-FRONT\",\r\n  \"frame\": 1523,\r\n  \"snapshot\": \"/path/to/snapshots/CAM-FRONT/20260604_153012_482.jpg\",\r\n  \"detections\": [\r\n    {\r\n      \"class_name\": \"parcel\",\r\n      \"bbox\": {\"x1\": 100, \"y1\": 200, \"x2\": 300, \"y2\": 400}\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\n| Field | Type | Description |\r\n|-------|------|-------------|\r\n| `alarm` | bool | Always `true` for alarm output |\r\n| `type` | string | Always `\"package\"` |\r\n| `class_name` | string | Detected object class |\r\n| `confidence` | float | Detection confidence (0.0–1.0) |\r\n| `camera_name` | string | Source camera device_id |\r\n| `frame` | int | Frame number when detected |\r\n| `snapshot` | string | Absolute path to the annotated JPG (with bounding box drawn) |\r\n| `bbox.x1, y1, x2, y2` | int | Bounding box coordinates |\r\n\r\n## Exit Codes\r\n\r\n| Code | Meaning |\r\n|------|---------|\r\n| `0` | Normal exit (run_time reached or manual stop via signal) |\r\n| `1` | Error (model missing, RTSP failure, runtime exception) |\r\n\r\n## Troubleshooting\r\n\r\n- `bash: .venv/bin/python: No such file or directory` → Run `bash setup.sh`\r\n- `Model file not found` → Place `yolov8s-worldv2.onnx` in the skill directory\r\n- `Cannot open video` → Check camera is online and `--rtsp_url` is correct\r\n\r\n## Privacy Notice\r\n\r\nThis skill processes camera video stream frames for object detection. Please review the following privacy information before use:\r\n\r\n### Pure Local Inference\r\n\r\n- Detection runs entirely on-device via the YOLOv8-World ONNX model — **no cloud API calls for inference**\r\n- The only outbound traffic is: RTSP pull from your camera (LAN) + notification push to your configured channels (Feishu / Telegram / Discord)\r\n\r\n### Local Data Storage\r\n\r\n- Frames are held in memory only and discarded after each inference — **nothing is persisted to disk by default**\r\n- When an alarm fires, the annotated frame is saved as a JPEG under `snapshots/<camera_device_id>/` for evidence; nothing else is persisted\r\n- The skill emits alarm JSON objects to **stdout**; if you need history, the caller is responsible for storing it\r\n\r\n### Notification Channels\r\n\r\n- Push notifications are sent only when configured (all channels are optional)\r\n- Notification content includes: detected class name, confidence, camera name, and timestamp\r\n- No images or video frames are sent in notifications\r\n\r\n### User Control\r\n\r\n- Camera URL is supplied by the user; this skill will not auto-discover or connect to cameras\r\n- You can stop the skill at any time via `--stop-detect` or SIGTERM\r\n- Removing the skill directory wipes everything (model file + venv); nothing else is touched on the host\r\n\r\n> For more details on our privacy policy, visit: https://kamiclaw-skill.kamihome.com/privacy\n\nFile v1.1.4:README.md\n\n# 📦 Kami Package Detection\r\n\r\n> A free skill by **Kami SmartHome** — get notified the moment a package arrives at your door.\r\n\r\nMonitor your RTSP camera feed for packages, parcels, backpacks, handbags, and suitcases using YOLOv8-World ONNX inference. When detected, outputs the object class and bounding box as structured JSON to stdout.\r\n\r\n### Features\r\n\r\n- 📦 Package & parcel detection\r\n- 🧳 Suitcase / backpack / handbag recognition\r\n- 🏠 Doorstep & reception monitoring\r\n- ⏱ Configurable detection duration\r\n- 🔔 JSON output for easy integration\r\n- 🖥 CPU-only inference via `onnxruntime` — no GPU required\r\n- 🐍 Isolated `.venv` — zero impact on system Python\r\n\r\n### Scenarios\r\n\r\n- Doorstep delivery waiting\r\n- Office reception package management\r\n- Warehouse cargo monitoring\r\n- Temporary item watch\r\n\r\n## Quick Start\r\n\r\n```bash\r\n# 1. Run setup (one-time)\r\nbash setup.sh\r\n\r\n# 2. Place your ONNX model file\r\ncp /path/to/yolov8s-worldv2.onnx .\r\n\r\n# 3a. Foreground single-run (exits on first detection or timeout)\r\n.venv/bin/python yolo_world_onnx.py \\\r\n  --rtsp_url rtsp://192.168.1.100/live/camera01 \\\r\n  --conf_threshold 0.25 \\\r\n  --class_names parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase \\\r\n  --run_time 120\r\n\r\n# 3b. Background daemon for one or more cameras (uses config.json)\r\n.venv/bin/python yolo_world_onnx.py --start-detect\r\n.venv/bin/python yolo_world_onnx.py --status\r\n.venv/bin/python yolo_world_onnx.py --stop-detect\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nbash setup.sh\r\n```\r\n\r\nThe setup script automatically:\r\n1. Detects system Python (`python3` or `python`), exits with error if not found\r\n2. Creates an isolated virtual environment at `.venv/`\r\n3. Installs Python dependencies from `requirements.txt`\r\n\r\n> Idempotent — safe to run multiple times. Won't reinstall existing dependencies.\r\n\r\n### Requirements\r\n\r\n| Dependency | Version | Purpose |\r\n|------------|---------|---------|\r\n| `onnxruntime` | latest | ONNX model inference engine |\r\n| `opencv-python-headless` | latest | Video capture and image processing |\r\n| `numpy` | latest | Array operations |\r\n\r\n### System Prerequisites\r\n\r\n- **Python 3.8+** and **python3-venv** (`sudo apt install python3 python3-venv`)\r\n- **ONNX model file**: `yolov8s-worldv2.onnx` in the skill directory\r\n- **RTSP camera**: online and network-reachable\r\n\r\n## Usage\r\n\r\n### Basic Detection\r\n\r\nParameters can be supplied via either `config.json` (recommended) or command-line flags. CLI flags > `config.json` > built-in defaults.\r\n\r\n```bash\r\n# Option 1: Edit config.json once, then just run\r\n.venv/bin/python yolo_world_onnx.py\r\n\r\n# Option 2: Override via CLI\r\n.venv/bin/python yolo_world_onnx.py \\\r\n  --rtsp_url rtsp://127.0.0.1/live/TNPUSAQ-757597-DRFMY \\\r\n  --conf_threshold 0.25 \\\r\n  --class_names parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase \\\r\n  --run_time 60\r\n```\r\n\r\n### Multi-Camera Configuration\r\n\r\n`config.json` supports a `cameras` array so multiple RTSP feeds can run as independent background processes:\r\n\r\n```json\r\n{\r\n  \"cameras\": [\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.100/stream\",\r\n      \"device_id\": \"CAM-FRONT\"\r\n    },\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.101/stream\",\r\n      \"device_id\": \"CAM-BACK\",\r\n      \"conf_threshold\": 0.3,\r\n      \"run_time\": 120\r\n    }\r\n  ],\r\n  \"conf_threshold\": 0.25,\r\n  \"run_time\": 60\r\n}\r\n```\r\n\r\n- `device_id` must be unique across all cameras\r\n- Per-camera `conf_threshold` and `run_time` override global values\r\n- Without `--device`, all cameras start/stop together\r\n- Legacy single-camera config (flat `rtsp_url` at top level) is still supported\r\n\r\n### Daemon Mode (Multi-Camera)\r\n\r\n```bash\r\n# Start all cameras\r\n.venv/bin/python yolo_world_onnx.py --start-detect\r\n\r\n# Start a specific camera\r\n.venv/bin/python yolo_world_onnx.py --start-detect --device CAM-FRONT\r\n\r\n# Status (all cameras or a specific one)\r\n.venv/bin/python yolo_world_onnx.py --status\r\n.venv/bin/python yolo_world_onnx.py --status --device CAM-FRONT\r\n\r\n# Stop (all cameras or a specific one)\r\n.venv/bin/python yolo_world_onnx.py --stop-detect\r\n.venv/bin/python yolo_world_onnx.py --stop-detect --device CAM-FRONT\r\n\r\n# List all configured cameras\r\n.venv/bin/python yolo_world_onnx.py --list-devices\r\n```\r\n\r\n### Parameters\r\n\r\n| Parameter | `config.json` field | Type | Required | Default | Description |\r\n|-----------|---------------------|------|----------|---------|-------------|\r\n| `--rtsp_url` | `rtsp_url` / `cameras[].rtsp_url` | string | No | `rtsp://127.0.0.1/live/TNPUSAQ-757597-DRFMY` | RTSP camera stream URL (overrides camera selection when used directly) |\r\n| `--device` | *(selects from `cameras` array)* | string | No | first camera | Target camera `device_id` (foreground or daemon mode) |\r\n| `--conf_threshold` | `conf_threshold` | float | No | `0.25` | Detection confidence threshold (0.0–1.0) |\r\n| `--class_names` | *(not in config.json)* | string[] | No | `parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase` | Space-separated class names to detect (CLI only) |\r\n| `--run_time` | `run_time` | int | No | `60` | Max run time in seconds. `0` = unlimited |\r\n| `--start-detect` | — | flag | No | — | Start background detection (all cameras, or one with `--device`) |\r\n| `--stop-detect` | — | flag | No | — | Stop background detection (all cameras, or one with `--device`) |\r\n| `--status` | — | flag | No | — | Check detection process status |\r\n| `--list-devices` | — | flag | No | — | List all configured cameras and exit |\r\n\r\n> When installed as part of `kami-smarthome-suite`, `cameras[]`, `conf_threshold` and `run_time` are auto-distributed into `config.json` from the central `kami_config.json`. `class_names` is a per-skill default and not distributed.\r\n\r\n## Output Format\r\n\r\nWhen a non-person target is detected, the skill outputs JSON to **stdout** and exits with code `0`:\r\n\r\n```json\r\n{\r\n  \"detections\": [\r\n    {\r\n      \"class_name\": \"parcel\",\r\n      \"bbox\": {\"x1\": 100, \"y1\": 200, \"x2\": 300, \"y2\": 400}\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\n### Field Reference\r\n\r\n| Field | Type | Description |\r\n|-------|------|-------------|\r\n| `detections` | array | List of detected objects |\r\n| `detections[].class_name` | string | Detected object class |\r\n| `detections[].bbox.x1` | int | Bounding box left x |\r\n| `detections[].bbox.y1` | int | Bounding box top y |\r\n| `detections[].bbox.x2` | int | Bounding box right x |\r\n| `detections[].bbox.y2` | int | Bounding box bottom y |\r\n\r\n## Exit Codes\r\n\r\n| Code | Meaning |\r\n|------|---------|\r\n| `0` | Target detected and JSON output written |\r\n| `1` | Model file missing, RTSP connection failure, or runtime error |\r\n| `2` | Run time exceeded, no target detected (timeout) |\r\n\r\n> Exit code `0` = detection success, `2` = timeout with no detection, `1` = error.\r\n\r\n## Architecture\r\n\r\n```\r\nRTSP Camera → [yolo_world_onnx.py] → JSON stdout\r\n                    │\r\n                    ├── letterbox (preprocessing)\r\n                    ├── ONNX inference (YOLOv8-World)\r\n                    ├── parse_output + NMS (post-processing)\r\n                    └── format_detection_result (JSON output)\r\n```\r\n\r\nThe skill follows a single-pass detection model:\r\n1. Read frames from RTSP stream\r\n2. Preprocess each frame (letterbox resize to 320×320)\r\n3. Run ONNX inference\r\n4. Parse detections, apply NMS\r\n5. On first non-person detection → output JSON → exit\r\n\r\n## Error Handling\r\n\r\n| Scenario | Behavior | Exit Code |\r\n|----------|----------|-----------|\r\n| Model file (`yolov8s-worldv2.onnx`) not found | Log error, exit immediately | `1` |\r\n| RTSP stream cannot connect | Log error, exit immediately | `1` |\r\n| Model load failure (corrupt ONNX) | Log error, exit immediately | `1` |\r\n| Run time exceeded | Log timeout info, exit | `2` |\r\n| Video stream ends (no more frames) | Log warning, exit | `2` |\r\n\r\n## Troubleshooting\r\n\r\n### Virtual environment not found\r\n```\r\nbash: .venv/bin/python: No such file or directory\r\n```\r\n**Fix**: Run `bash setup.sh` to initialize the environment.\r\n\r\n### Model file missing\r\n```\r\nModel file not found: .../yolov8s-worldv2.onnx\r\n```\r\n**Fix**: Download or copy `yolov8s-worldv2.onnx` into the skill directory.\r\n\r\n### RTSP connection failure\r\n```\r\nCannot open video: rtsp://...\r\n```\r\n**Fix**: Verify the camera is online, check the `--rtsp_url` value, and confirm network connectivity.\r\n\r\n### Low detection rate\r\n- Try lowering `--conf_threshold` (e.g., `0.15`)\r\n- Ensure the target object class is included in `--class_names`\r\n- Check camera angle and lighting conditions\r\n\r\n## File Structure\r\n\r\n```\r\nkami-package-detection/\r\n├── .gitignore\r\n├── requirements.txt          # onnxruntime, opencv-python-headless, numpy\r\n├── setup.sh                  # Environment setup with Python auto-detection\r\n├── SKILL.md                  # AI agent instructions + metadata\r\n├── README.md                 # This file\r\n├── yolo_world_onnx.py        # Main detection script\r\n├── yolov8s-worldv2.onnx      # ONNX model file (not included, user-provided)\r\n└── tests/\r\n    └── test_parcel_detection.py\r\n```\r\n\r\n## Privacy Notice\r\n\r\nThis skill processes camera video stream frames for object detection. Please review the following privacy information before use:\r\n\r\n### Pure Local Inference\r\n\r\n- Detection runs entirely on-device via the YOLOv8-World ONNX model — **no API key, no cloud calls, no external network traffic**\r\n- The only outbound traffic is the RTSP pull from your own camera (LAN)\r\n\r\n### Local Data Storage\r\n\r\n- Frames are held in memory only and discarded after each inference — **nothing is persisted to disk**\r\n- The skill emits a single JSON object to **stdout**; if you need history, the caller is responsible for storing it\r\n\r\n### User Control\r\n\r\n- Camera URL is supplied by the user; this skill will not auto-discover or connect to cameras\r\n- You can stop the skill at any time — there is no background daemon, no cache, and no residual data\r\n- Removing the skill directory wipes everything (model file + venv); nothing else is touched on the host\r\n\r\n> For more details on our privacy policy, visit: https://kamiclaw-skill.kamihome.com/privacy\r\n\r\n## License\r\n\r\nMIT-0\n\nFile v1.1.4:_meta.json\n\n{\n  \"ownerId\": \"kn7e9156e1awf00v1sas2wkdfd85a4zh\",\n  \"slug\": \"kami-package-detection\",\n  \"version\": \"1.1.4\",\n  \"publishedAt\": 1780642515986\n}\n\nFile v1.1.4:skill-card.md\n\n## Description: <br>\nContinuously monitors RTSP camera streams for packages, parcels, and bags using YOLO-World ONNX, then alerts when a new or moved package is detected. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[13681882136](https://clawhub.ai/user/13681882136) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and smart-home or operations teams use this skill to monitor configured RTSP cameras for package-like objects and receive structured detection output or optional delivery notifications. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The security summary says the skill can continuously monitor RTSP cameras and run background processes. <br>\nMitigation: Review config.json before use, restrict camera access to intended feeds, and use the provided status and stop commands to monitor and terminate background detection processes. <br>\nRisk: The security guidance notes that annotated camera snapshots and logs may be stored in the skill directory. <br>\nMitigation: Monitor and periodically clear the snapshots and log files, and avoid running the skill where camera images should not be persisted. <br>\nRisk: The package requires sensitive credentials for RTSP and optional notification services. <br>\nMitigation: Avoid embedding credentials in RTSP URLs where possible, keep webhook and bot tokens out of shared configs, and rotate any credentials exposed in logs or configuration. <br>\nRisk: The security guidance warns that setup.sh may modify Python tooling outside the skill directory if Python 3.10 is missing. <br>\nMitigation: Inspect setup.sh before execution and run setup in a controlled environment with the desired Python 3.10 runtime already installed when possible. <br>\n\n\n## Reference(s): <br>\n- [Kami Package Detection listing](https://clawhub.ai/13681882136/kami-package-detection) <br>\n- [KamiClaw skill privacy policy](https://kamiclaw-skill.kamihome.com/privacy) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, JSON, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown guidance with shell commands and JSON detection/status output] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Can start or stop background camera monitoring, report process status, write local annotated snapshot JPGs, and send optional notification messages when configured.] <br>\n\n## Skill Version(s): <br>\n1.1.4 (source: server-resolved release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.1.4:config.json\n\n{\n  \"cameras\": [\n    {\n      \"rtsp_url\": \"\",\n      \"device_id\": \"CAM-001\"\n    }\n  ],\n  \"conf_threshold\": 0.25,\n  \"run_time\": 0,\n  \"alarm_cooldown\": 60,\n  \"feishu_webhook_url\": \"\",\n  \"telegram_bot_token\": \"\",\n  \"telegram_chat_id\": \"\",\n  \"discord_webhook_url\": \"\",\n  \"discord_bot_token\": \"\",\n  \"discord_channel_id\": \"\"\n}\n\nFile v1.1.4:requirements.txt\n\nonnxruntime\r\nopencv-python-headless\r\nnumpy\r\nrequests\n\nArchive v1.1.3: 9 files, 25629 bytes\n\nFiles: config.json (319b), notifier.py (8420b), README.md (10305b), requirements.txt (54b), setup.sh (7888b), skill-card.md (2850b), SKILL.md (10835b), yolo_world_onnx.py (34931b), _meta.json (141b)\n\nFile v1.1.3:SKILL.md\n\n---\r\nname: kami-package-detection\r\ndescription: A free skill by Kami SmartHome. Continuously monitors RTSP camera streams for packages, parcels, and bags using YOLO-World ONNX. Smart deduplication only triggers alerts when a genuinely new or moved package appears.\r\nversion: 1.1.0\r\nauthor: kami-smarthome\r\ntags:\r\n  - smart-home\r\n  - kami\r\n  - home-assistant\r\n  - smarthome\r\n  - detect\r\n  - object-detection\r\n  - yolo\r\n  - package-detection\r\n  - parcel-detection\r\n  - iot\r\n  - camera\r\n  - rtsp\r\n  - onnx\r\n  - edge-ai\r\n  - delivery\r\n  - monitoring\r\n  - notification\r\ntriggers:\r\n  - smart home\r\n  - kami\r\n  - home assistant\r\n  - detect\r\n  - detect packages\r\n  - detect parcels\r\n  - kami package\r\n  - kami smart home\r\n  - home assistant package\r\n  - smart home delivery\r\n  - check doorstep\r\n  - delivery notification\r\n  - check for deliveries\r\n  - package detection\r\n  - is there a package\r\n  - monitor packages\r\n  - check camera for packages\r\n  - any deliveries at the door\r\n  - parcel alert\r\nmetadata:\r\n  openclaw:\r\n    requires:\r\n      bins:\r\n        - python3.10\r\n      hardware:\r\n        cpu: \"2+ cores (x86_64 / ARM64)\"\r\n        memory: \"2 GB+\"\r\n        storage: \"2 GB+\"\r\n        gpu: \"optional (speeds up ONNX inference)\"\r\n      network:\r\n        - \"RTSP camera access (LAN)\"\r\n        - \"Internet (KamiClaw API)\"\r\n      devices:\r\n        - \"RTSP IP camera\"\r\n    emoji: \"📦\"\r\n---\r\n\r\n# Kami Package Detection\r\n\r\n> Continuously monitors your camera and sends instant notifications when a new package arrives.\r\n\r\nContinuously monitors RTSP camera streams for packages, parcels, backpacks, handbags, and suitcases. When a **new** package is detected (position/size significantly different from the last alert), sends push notifications. Static frames are automatically skipped to save compute.\r\n\r\n### Features\r\n\r\n- 📦 Continuous package & parcel monitoring (not one-shot)\r\n- 🔔 Push notifications via Feishu / Telegram / Discord\r\n- 🧠 Smart deduplication — only alerts for new or moved packages (IoU + area change)\r\n- ⚡ Static frame filtering — skips inference when camera scene is unchanged\r\n- 📷 Multi-camera support with independent background processes\r\n- 🧳 Suitcase / backpack / handbag recognition\r\n- 🏠 Doorstep & reception monitoring\r\n\r\n### Scenarios\r\n\r\n- Doorstep delivery waiting\r\n- Office reception package management\r\n- Warehouse cargo monitoring\r\n- Temporary item watch\r\n\r\n## Installation\r\n\r\n```bash\r\nbash setup.sh\r\n```\r\n\r\nCreates `.venv/` and installs `onnxruntime`, `opencv-python-headless`, `numpy`, `requests`. Idempotent.\r\n\r\n## Prerequisites\r\n\r\n- `python3` and `python3-venv` installed\r\n- `yolov8s-worldv2.onnx` model file in the skill directory\r\n- RTSP camera(s) online and reachable\r\n\r\n### Model\r\n\r\nThe `yolov8s-worldv2.onnx` model file is included in the skill package. If missing, re-download this skill from ClawHub:\r\n\r\n```bash\r\nclawhub install kami-package-detection\r\n```\r\n\r\nAlternatively, download the YOLOv8s-World v2 `.pt` model from [Ultralytics YOLO-World](https://docs.ultralytics.com/models/yolo-world/) and export it to ONNX yourself. **You must inject the custom vocabulary via `set_classes()` before export** — otherwise the ONNX model uses the default COCO 80 classes, which will NOT match this skill's `CLASS_NAMES`:\r\n\r\n```bash\r\npip install ultralytics\r\n```\r\n\r\n```python\r\n# export_onnx.py\r\nfrom ultralytics import YOLO\r\n\r\nmodel = YOLO(\"yolov8s-worldv2.pt\")\r\n# IMPORTANT: must match CLASS_NAMES in yolo_world_onnx.py (order matters)\r\nmodel.set_classes([\r\n    \"parcel\", \"package\", \"delivery box\", \"person\",\r\n    \"Cardboard box\", \"Packaging Box\", \"backpack\", \"handbag\", \"suitcase\",\r\n])\r\nmodel.export(format=\"onnx\", imgsz=320)\r\n```\r\n\r\n```bash\r\npython export_onnx.py\r\ncp yolov8s-worldv2.onnx /path/to/kami-package-detection/\r\n```\r\n\r\nIf you change the class list, keep `CLASS_NAMES` in [yolo_world_onnx.py](file:///./yolo_world_onnx.py) and the `--class_names` CLI default in sync (same order, same length).\r\n\r\n## Parameter Confirmation\r\n\r\nParameters can be supplied via either `config.json` (recommended for repeated use) or command-line flags. Command-line flags override `config.json`, which overrides built-in defaults.\r\n\r\n| Parameter | `config.json` field | Default | Description |\r\n|-----------|---------------------|---------|-------------|\r\n| `--device` | *(selects from cameras array)* | first camera | Target camera DEVICE_ID |\r\n| `--rtsp_url` | `cameras[].rtsp_url` | — | RTSP camera URL (overrides camera selection) |\r\n| `--conf_threshold` | `conf_threshold` | `0.25` | Confidence threshold (0.0–1.0) |\r\n| `--class_names` | *(not in config.json)* | `parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase` | Classes to detect (CLI only) |\r\n| `--run_time` | `run_time` | `0` | Max seconds; `0` = unlimited (continuous monitoring) |\r\n| `--start-detect` | — | — | Start background detection (all cameras or `--device`) |\r\n| `--stop-detect` | — | — | Stop background detection (all cameras or `--device`) |\r\n| `--status` | — | — | Check detection process status |\r\n| `--list-devices` | — | — | List all configured cameras and exit |\r\n| — | `alarm_cooldown` | `60` | Min seconds between notifications for different packages |\r\n| — | `feishu_webhook_url` | — | Feishu Webhook URL for push notifications |\r\n| — | `telegram_bot_token` | — | Telegram Bot token |\r\n| — | `telegram_chat_id` | — | Telegram chat ID |\r\n| — | `discord_webhook_url` | — | Discord Webhook URL |\r\n| — | `discord_bot_token` | — | Discord Bot token |\r\n| — | `discord_channel_id` | — | Discord channel ID |\r\n\r\n### Multi-Camera Configuration\r\n\r\n`config.json` supports a `cameras` array for multiple cameras:\r\n\r\n```json\r\n{\r\n  \"cameras\": [\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.100/stream\",\r\n      \"device_id\": \"CAM-FRONT\"\r\n    },\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.101/stream\",\r\n      \"device_id\": \"CAM-BACK\",\r\n      \"conf_threshold\": 0.3\r\n    }\r\n  ],\r\n  \"conf_threshold\": 0.25,\r\n  \"run_time\": 0,\r\n  \"alarm_cooldown\": 60,\r\n  \"feishu_webhook_url\": \"\",\r\n  \"telegram_bot_token\": \"\",\r\n  \"telegram_chat_id\": \"\",\r\n  \"discord_webhook_url\": \"\"\r\n}\r\n```\r\n\r\n- `device_id` must be unique across all cameras\r\n- Per-camera `conf_threshold` and `run_time` override global values\r\n- Without `--device`, all cameras are started/stopped together\r\n- Each camera runs as an independent background process\r\n- Legacy single-camera config (flat `rtsp_url` at top level) is still supported\r\n\r\n> When installed as part of `kami-smarthome-suite`, `rtsp_url`, `conf_threshold`, `run_time`, `alarm_cooldown` and all notification channel fields are auto-distributed into `config.json` from the central `kami_config.json`. `class_names` is intentionally NOT distributed and stays a per-skill default.\r\n\r\n**Ask the user: do any parameters need to be changed?**\r\n\r\n## Usage\r\n\r\n### Start Detection (Background)\r\n\r\n```bash\r\n# Start all cameras\r\n.venv/bin/python yolo_world_onnx.py --start-detect\r\n\r\n# Start a specific camera\r\n.venv/bin/python yolo_world_onnx.py --start-detect --device CAM-FRONT\r\n```\r\n\r\n### Stop Detection\r\n\r\n```bash\r\n# Stop all cameras\r\n.venv/bin/python yolo_world_onnx.py --stop-detect\r\n\r\n# Stop a specific camera\r\n.venv/bin/python yolo_world_onnx.py --stop-detect --device CAM-FRONT\r\n```\r\n\r\n### Check Status\r\n\r\n```bash\r\n# Status of all cameras\r\n.venv/bin/python yolo_world_onnx.py --status\r\n\r\n# Status of a specific camera\r\n.venv/bin/python yolo_world_onnx.py --status --device CAM-FRONT\r\n```\r\n\r\n### Single-Run Mode (Foreground)\r\n\r\n```bash\r\n# Run continuous monitoring on a specific camera (foreground)\r\n.venv/bin/python yolo_world_onnx.py --device CAM-FRONT\r\n\r\n# Override via CLI (runs for 120 seconds then stops)\r\n.venv/bin/python yolo_world_onnx.py \\\r\n  --rtsp_url rtsp://your-camera-address \\\r\n  --run_time 120\r\n\r\n# List configured cameras\r\n.venv/bin/python yolo_world_onnx.py --list-devices\r\n```\r\n\r\n## Output (stdout JSON)\r\n\r\nWhen a new package is detected, outputs an alarm JSON to stdout:\r\n\r\n```json\r\n{\r\n  \"alarm\": true,\r\n  \"type\": \"package\",\r\n  \"class_name\": \"parcel\",\r\n  \"confidence\": 0.87,\r\n  \"camera_name\": \"CAM-FRONT\",\r\n  \"frame\": 1523,\r\n  \"snapshot\": \"/path/to/snapshots/CAM-FRONT/20260604_153012_482.jpg\",\r\n  \"detections\": [\r\n    {\r\n      \"class_name\": \"parcel\",\r\n      \"bbox\": {\"x1\": 100, \"y1\": 200, \"x2\": 300, \"y2\": 400}\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\n| Field | Type | Description |\r\n|-------|------|-------------|\r\n| `alarm` | bool | Always `true` for alarm output |\r\n| `type` | string | Always `\"package\"` |\r\n| `class_name` | string | Detected object class |\r\n| `confidence` | float | Detection confidence (0.0–1.0) |\r\n| `camera_name` | string | Source camera device_id |\r\n| `frame` | int | Frame number when detected |\r\n| `snapshot` | string | Absolute path to the annotated JPG (with bounding box drawn) |\r\n| `bbox.x1, y1, x2, y2` | int | Bounding box coordinates |\r\n\r\n## Exit Codes\r\n\r\n| Code | Meaning |\r\n|------|---------|\r\n| `0` | Normal exit (run_time reached or manual stop via signal) |\r\n| `1` | Error (model missing, RTSP failure, runtime exception) |\r\n\r\n## Troubleshooting\r\n\r\n- `bash: .venv/bin/python: No such file or directory` → Run `bash setup.sh`\r\n- `Model file not found` → Place `yolov8s-worldv2.onnx` in the skill directory\r\n- `Cannot open video` → Check camera is online and `--rtsp_url` is correct\r\n\r\n## Privacy Notice\r\n\r\nThis skill processes camera video stream frames for object detection. Please review the following privacy information before use:\r\n\r\n### Pure Local Inference\r\n\r\n- Detection runs entirely on-device via the YOLOv8-World ONNX model — **no cloud API calls for inference**\r\n- The only outbound traffic is: RTSP pull from your camera (LAN) + notification push to your configured channels (Feishu / Telegram / Discord)\r\n\r\n### Local Data Storage\r\n\r\n- Frames are held in memory only and discarded after each inference — **nothing is persisted to disk by default**\r\n- When an alarm fires, the annotated frame is saved as a JPEG under `snapshots/<camera_device_id>/` for evidence; nothing else is persisted\r\n- The skill emits alarm JSON objects to **stdout**; if you need history, the caller is responsible for storing it\r\n\r\n### Notification Channels\r\n\r\n- Push notifications are sent only when configured (all channels are optional)\r\n- Notification content includes: detected class name, confidence, camera name, and timestamp\r\n- No images or video frames are sent in notifications\r\n\r\n### User Control\r\n\r\n- Camera URL is supplied by the user; this skill will not auto-discover or connect to cameras\r\n- You can stop the skill at any time via `--stop-detect` or SIGTERM\r\n- Removing the skill directory wipes everything (model file + venv); nothing else is touched on the host\r\n\r\n> For more details on our privacy policy, visit: https://kamiclaw-skill.kamihome.com/privacy\n\nFile v1.1.3:README.md\n\n# 📦 Kami Package Detection\r\n\r\n> A free skill by **Kami SmartHome** — get notified the moment a package arrives at your door.\r\n\r\nMonitor your RTSP camera feed for packages, parcels, backpacks, handbags, and suitcases using YOLOv8-World ONNX inference. When detected, outputs the object class and bounding box as structured JSON to stdout.\r\n\r\n### Features\r\n\r\n- 📦 Package & parcel detection\r\n- 🧳 Suitcase / backpack / handbag recognition\r\n- 🏠 Doorstep & reception monitoring\r\n- ⏱ Configurable detection duration\r\n- 🔔 JSON output for easy integration\r\n- 🖥 CPU-only inference via `onnxruntime` — no GPU required\r\n- 🐍 Isolated `.venv` — zero impact on system Python\r\n\r\n### Scenarios\r\n\r\n- Doorstep delivery waiting\r\n- Office reception package management\r\n- Warehouse cargo monitoring\r\n- Temporary item watch\r\n\r\n## Quick Start\r\n\r\n```bash\r\n# 1. Run setup (one-time)\r\nbash setup.sh\r\n\r\n# 2. Place your ONNX model file\r\ncp /path/to/yolov8s-worldv2.onnx .\r\n\r\n# 3a. Foreground single-run (exits on first detection or timeout)\r\n.venv/bin/python yolo_world_onnx.py \\\r\n  --rtsp_url rtsp://192.168.1.100/live/camera01 \\\r\n  --conf_threshold 0.25 \\\r\n  --class_names parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase \\\r\n  --run_time 120\r\n\r\n# 3b. Background daemon for one or more cameras (uses config.json)\r\n.venv/bin/python yolo_world_onnx.py --start-detect\r\n.venv/bin/python yolo_world_onnx.py --status\r\n.venv/bin/python yolo_world_onnx.py --stop-detect\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nbash setup.sh\r\n```\r\n\r\nThe setup script automatically:\r\n1. Detects system Python (`python3` or `python`), exits with error if not found\r\n2. Creates an isolated virtual environment at `.venv/`\r\n3. Installs Python dependencies from `requirements.txt`\r\n\r\n> Idempotent — safe to run multiple times. Won't reinstall existing dependencies.\r\n\r\n### Requirements\r\n\r\n| Dependency | Version | Purpose |\r\n|------------|---------|---------|\r\n| `onnxruntime` | latest | ONNX model inference engine |\r\n| `opencv-python-headless` | latest | Video capture and image processing |\r\n| `numpy` | latest | Array operations |\r\n\r\n### System Prerequisites\r\n\r\n- **Python 3.8+** and **python3-venv** (`sudo apt install python3 python3-venv`)\r\n- **ONNX model file**: `yolov8s-worldv2.onnx` in the skill directory\r\n- **RTSP camera**: online and network-reachable\r\n\r\n## Usage\r\n\r\n### Basic Detection\r\n\r\nParameters can be supplied via either `config.json` (recommended) or command-line flags. CLI flags > `config.json` > built-in defaults.\r\n\r\n```bash\r\n# Option 1: Edit config.json once, then just run\r\n.venv/bin/python yolo_world_onnx.py\r\n\r\n# Option 2: Override via CLI\r\n.venv/bin/python yolo_world_onnx.py \\\r\n  --rtsp_url rtsp://127.0.0.1/live/TNPUSAQ-757597-DRFMY \\\r\n  --conf_threshold 0.25 \\\r\n  --class_names parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase \\\r\n  --run_time 60\r\n```\r\n\r\n### Multi-Camera Configuration\r\n\r\n`config.json` supports a `cameras` array so multiple RTSP feeds can run as independent background processes:\r\n\r\n```json\r\n{\r\n  \"cameras\": [\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.100/stream\",\r\n      \"device_id\": \"CAM-FRONT\"\r\n    },\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.101/stream\",\r\n      \"device_id\": \"CAM-BACK\",\r\n      \"conf_threshold\": 0.3,\r\n      \"run_time\": 120\r\n    }\r\n  ],\r\n  \"conf_threshold\": 0.25,\r\n  \"run_time\": 60\r\n}\r\n```\r\n\r\n- `device_id` must be unique across all cameras\r\n- Per-camera `conf_threshold` and `run_time` override global values\r\n- Without `--device`, all cameras start/stop together\r\n- Legacy single-camera config (flat `rtsp_url` at top level) is still supported\r\n\r\n### Daemon Mode (Multi-Camera)\r\n\r\n```bash\r\n# Start all cameras\r\n.venv/bin/python yolo_world_onnx.py --start-detect\r\n\r\n# Start a specific camera\r\n.venv/bin/python yolo_world_onnx.py --start-detect --device CAM-FRONT\r\n\r\n# Status (all cameras or a specific one)\r\n.venv/bin/python yolo_world_onnx.py --status\r\n.venv/bin/python yolo_world_onnx.py --status --device CAM-FRONT\r\n\r\n# Stop (all cameras or a specific one)\r\n.venv/bin/python yolo_world_onnx.py --stop-detect\r\n.venv/bin/python yolo_world_onnx.py --stop-detect --device CAM-FRONT\r\n\r\n# List all configured cameras\r\n.venv/bin/python yolo_world_onnx.py --list-devices\r\n```\r\n\r\n### Parameters\r\n\r\n| Parameter | `config.json` field | Type | Required | Default | Description |\r\n|-----------|---------------------|------|----------|---------|-------------|\r\n| `--rtsp_url` | `rtsp_url` / `cameras[].rtsp_url` | string | No | `rtsp://127.0.0.1/live/TNPUSAQ-757597-DRFMY` | RTSP camera stream URL (overrides camera selection when used directly) |\r\n| `--device` | *(selects from `cameras` array)* | string | No | first camera | Target camera `device_id` (foreground or daemon mode) |\r\n| `--conf_threshold` | `conf_threshold` | float | No | `0.25` | Detection confidence threshold (0.0–1.0) |\r\n| `--class_names` | *(not in config.json)* | string[] | No | `parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase` | Space-separated class names to detect (CLI only) |\r\n| `--run_time` | `run_time` | int | No | `60` | Max run time in seconds. `0` = unlimited |\r\n| `--start-detect` | — | flag | No | — | Start background detection (all cameras, or one with `--device`) |\r\n| `--stop-detect` | — | flag | No | — | Stop background detection (all cameras, or one with `--device`) |\r\n| `--status` | — | flag | No | — | Check detection process status |\r\n| `--list-devices` | — | flag | No | — | List all configured cameras and exit |\r\n\r\n> When installed as part of `kami-smarthome-suite`, `cameras[]`, `conf_threshold` and `run_time` are auto-distributed into `config.json` from the central `kami_config.json`. `class_names` is a per-skill default and not distributed.\r\n\r\n## Output Format\r\n\r\nWhen a non-person target is detected, the skill outputs JSON to **stdout** and exits with code `0`:\r\n\r\n```json\r\n{\r\n  \"detections\": [\r\n    {\r\n      \"class_name\": \"parcel\",\r\n      \"bbox\": {\"x1\": 100, \"y1\": 200, \"x2\": 300, \"y2\": 400}\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\n### Field Reference\r\n\r\n| Field | Type | Description |\r\n|-------|------|-------------|\r\n| `detections` | array | List of detected objects |\r\n| `detections[].class_name` | string | Detected object class |\r\n| `detections[].bbox.x1` | int | Bounding box left x |\r\n| `detections[].bbox.y1` | int | Bounding box top y |\r\n| `detections[].bbox.x2` | int | Bounding box right x |\r\n| `detections[].bbox.y2` | int | Bounding box bottom y |\r\n\r\n## Exit Codes\r\n\r\n| Code | Meaning |\r\n|------|---------|\r\n| `0` | Target detected and JSON output written |\r\n| `1` | Model file missing, RTSP connection failure, or runtime error |\r\n| `2` | Run time exceeded, no target detected (timeout) |\r\n\r\n> Exit code `0` = detection success, `2` = timeout with no detection, `1` = error.\r\n\r\n## Architecture\r\n\r\n```\r\nRTSP Camera → [yolo_world_onnx.py] → JSON stdout\r\n                    │\r\n                    ├── letterbox (preprocessing)\r\n                    ├── ONNX inference (YOLOv8-World)\r\n                    ├── parse_output + NMS (post-processing)\r\n                    └── format_detection_result (JSON output)\r\n```\r\n\r\nThe skill follows a single-pass detection model:\r\n1. Read frames from RTSP stream\r\n2. Preprocess each frame (letterbox resize to 320×320)\r\n3. Run ONNX inference\r\n4. Parse detections, apply NMS\r\n5. On first non-person detection → output JSON → exit\r\n\r\n## Error Handling\r\n\r\n| Scenario | Behavior | Exit Code |\r\n|----------|----------|-----------|\r\n| Model file (`yolov8s-worldv2.onnx`) not found | Log error, exit immediately | `1` |\r\n| RTSP stream cannot connect | Log error, exit immediately | `1` |\r\n| Model load failure (corrupt ONNX) | Log error, exit immediately | `1` |\r\n| Run time exceeded | Log timeout info, exit | `2` |\r\n| Video stream ends (no more frames) | Log warning, exit | `2` |\r\n\r\n## Troubleshooting\r\n\r\n### Virtual environment not found\r\n```\r\nbash: .venv/bin/python: No such file or directory\r\n```\r\n**Fix**: Run `bash setup.sh` to initialize the environment.\r\n\r\n### Model file missing\r\n```\r\nModel file not found: .../yolov8s-worldv2.onnx\r\n```\r\n**Fix**: Download or copy `yolov8s-worldv2.onnx` into the skill directory.\r\n\r\n### RTSP connection failure\r\n```\r\nCannot open video: rtsp://...\r\n```\r\n**Fix**: Verify the camera is online, check the `--rtsp_url` value, and confirm network connectivity.\r\n\r\n### Low detection rate\r\n- Try lowering `--conf_threshold` (e.g., `0.15`)\r\n- Ensure the target object class is included in `--class_names`\r\n- Check camera angle and lighting conditions\r\n\r\n## File Structure\r\n\r\n```\r\nkami-package-detection/\r\n├── .gitignore\r\n├── requirements.txt          # onnxruntime, opencv-python-headless, numpy\r\n├── setup.sh                  # Environment setup with Python auto-detection\r\n├── SKILL.md                  # AI agent instructions + metadata\r\n├── README.md                 # This file\r\n├── yolo_world_onnx.py        # Main detection script\r\n├── yolov8s-worldv2.onnx      # ONNX model file (not included, user-provided)\r\n└── tests/\r\n    └── test_parcel_detection.py\r\n```\r\n\r\n## Privacy Notice\r\n\r\nThis skill processes camera video stream frames for object detection. Please review the following privacy information before use:\r\n\r\n### Pure Local Inference\r\n\r\n- Detection runs entirely on-device via the YOLOv8-World ONNX model — **no API key, no cloud calls, no external network traffic**\r\n- The only outbound traffic is the RTSP pull from your own camera (LAN)\r\n\r\n### Local Data Storage\r\n\r\n- Frames are held in memory only and discarded after each inference — **nothing is persisted to disk**\r\n- The skill emits a single JSON object to **stdout**; if you need history, the caller is responsible for storing it\r\n\r\n### User Control\r\n\r\n- Camera URL is supplied by the user; this skill will not auto-discover or connect to cameras\r\n- You can stop the skill at any time — there is no background daemon, no cache, and no residual data\r\n- Removing the skill directory wipes everything (model file + venv); nothing else is touched on the host\r\n\r\n> For more details on our privacy policy, visit: https://kamiclaw-skill.kamihome.com/privacy\r\n\r\n## License\r\n\r\nMIT-0\n\nFile v1.1.3:_meta.json\n\n{\n  \"ownerId\": \"kn7e9156e1awf00v1sas2wkdfd85a4zh\",\n  \"slug\": \"kami-package-detection\",\n  \"version\": \"1.1.3\",\n  \"publishedAt\": 1780639290218\n}\n\nFile v1.1.3:skill-card.md\n\n## Description: <br>\nContinuously monitors RTSP camera streams for packages, parcels, and bags using YOLO-World ONNX, and triggers alerts when a genuinely new or moved package appears. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[13681882136](https://clawhub.ai/user/13681882136) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and smart-home operators use this skill to monitor RTSP camera feeds for package, parcel, bag, and suitcase detections and receive structured alerts for doorstep, office reception, warehouse, or temporary item-watch workflows. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Continuous RTSP camera monitoring can capture private or regulated spaces without appropriate consent. <br>\nMitigation: Deploy only on authorized cameras, document consent and retention expectations, and disable or stop daemon mode when monitoring is not intended. <br>\nRisk: RTSP URLs and notification credentials may expose sensitive camera or messaging access if stored or logged insecurely. <br>\nMitigation: Redact credentials before sharing configs or logs, restrict file permissions, and rotate camera or webhook tokens after testing. <br>\nRisk: Alarm snapshots and logs may persist local evidence of people, packages, camera names, or locations. <br>\nMitigation: Confirm the snapshot and log directories before use, apply retention limits, and avoid collecting images where local policy or law does not permit it. <br>\nRisk: Unpinned Python dependencies and an ONNX model file can change runtime behavior across installs. <br>\nMitigation: Pin or review dependency versions and verify the ONNX model source and class list before deployment. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/13681882136/kami-package-detection) <br>\n- [Ultralytics YOLO-World documentation](https://docs.ultralytics.com/models/yolo-world/) <br>\n- [Kami privacy notice](https://kamiclaw-skill.kamihome.com/privacy) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance] <br>\n**Output Format:** [Markdown guidance with shell commands and JSON alarm examples; runtime output is JSON on stdout.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Runtime alarms may include detected class, confidence, camera name, frame number, bounding boxes, and a local snapshot path.] <br>\n\n## Skill Version(s): <br>\n1.1.3 (source: server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.1.3:config.json\n\n{\n  \"cameras\": [\n    {\n      \"rtsp_url\": \"\",\n      \"device_id\": \"CAM-001\"\n    }\n  ],\n  \"conf_threshold\": 0.25,\n  \"run_time\": 0,\n  \"alarm_cooldown\": 60,\n  \"feishu_webhook_url\": \"\",\n  \"telegram_bot_token\": \"\",\n  \"telegram_chat_id\": \"\",\n  \"discord_webhook_url\": \"\",\n  \"discord_bot_token\": \"\",\n  \"discord_channel_id\": \"\"\n}\n\nFile v1.1.3:requirements.txt\n\nonnxruntime\r\nopencv-python-headless\r\nnumpy\r\nrequests\n\nArchive v1.1.2: 9 files, 25182 bytes\n\nFiles: config.json (319b), notifier.py (8420b), README.md (10305b), requirements.txt (54b), setup.sh (7888b), skill-card.md (2587b), SKILL.md (10203b), yolo_world_onnx.py (34928b), _meta.json (141b)\n\nFile v1.1.2:SKILL.md\n\n---\r\nname: kami-package-detection\r\ndescription: A free skill by Kami SmartHome. Continuously monitors RTSP camera streams for packages, parcels, and bags using YOLO-World ONNX. Smart deduplication only triggers alerts when a genuinely new or moved package appears.\r\nversion: 1.1.0\r\nauthor: kami-smarthome\r\ntags:\r\n  - smart-home\r\n  - kami\r\n  - home-assistant\r\n  - smarthome\r\n  - detect\r\n  - object-detection\r\n  - yolo\r\n  - package-detection\r\n  - parcel-detection\r\n  - iot\r\n  - camera\r\n  - rtsp\r\n  - onnx\r\n  - edge-ai\r\n  - delivery\r\n  - monitoring\r\n  - notification\r\ntriggers:\r\n  - smart home\r\n  - kami\r\n  - home assistant\r\n  - detect\r\n  - detect packages\r\n  - detect parcels\r\n  - kami package\r\n  - kami smart home\r\n  - home assistant package\r\n  - smart home delivery\r\n  - check doorstep\r\n  - delivery notification\r\n  - check for deliveries\r\n  - package detection\r\n  - is there a package\r\n  - monitor packages\r\n  - check camera for packages\r\n  - any deliveries at the door\r\n  - parcel alert\r\nmetadata:\r\n  openclaw:\r\n    requires:\r\n      bins:\r\n        - python3.10\r\n      hardware:\r\n        cpu: \"2+ cores (x86_64 / ARM64)\"\r\n        memory: \"2 GB+\"\r\n        storage: \"2 GB+\"\r\n        gpu: \"optional (speeds up ONNX inference)\"\r\n      network:\r\n        - \"RTSP camera access (LAN)\"\r\n        - \"Internet (KamiClaw API)\"\r\n      devices:\r\n        - \"RTSP IP camera\"\r\n    emoji: \"📦\"\r\n---\r\n\r\n# Kami Package Detection\r\n\r\n> Continuously monitors your camera and sends instant notifications when a new package arrives.\r\n\r\nContinuously monitors RTSP camera streams for packages, parcels, backpacks, handbags, and suitcases. When a **new** package is detected (position/size significantly different from the last alert), sends push notifications. Static frames are automatically skipped to save compute.\r\n\r\n### Features\r\n\r\n- 📦 Continuous package & parcel monitoring (not one-shot)\r\n- 🔔 Push notifications via Feishu / Telegram / Discord\r\n- 🧠 Smart deduplication — only alerts for new or moved packages (IoU + area change)\r\n- ⚡ Static frame filtering — skips inference when camera scene is unchanged\r\n- 📷 Multi-camera support with independent background processes\r\n- 🧳 Suitcase / backpack / handbag recognition\r\n- 🏠 Doorstep & reception monitoring\r\n\r\n### Scenarios\r\n\r\n- Doorstep delivery waiting\r\n- Office reception package management\r\n- Warehouse cargo monitoring\r\n- Temporary item watch\r\n\r\n## Installation\r\n\r\n```bash\r\nbash setup.sh\r\n```\r\n\r\nCreates `.venv/` and installs `onnxruntime`, `opencv-python-headless`, `numpy`, `requests`. Idempotent.\r\n\r\n## Prerequisites\r\n\r\n- `python3` and `python3-venv` installed\r\n- `yolov8s-worldv2.onnx` model file in the skill directory\r\n- RTSP camera(s) online and reachable\r\n\r\n### Model\r\n\r\nThe `yolov8s-worldv2.onnx` model file is included in the skill package. If missing, re-download this skill from ClawHub:\r\n\r\n```bash\r\nclawhub install kami-package-detection\r\n```\r\n\r\nAlternatively, download the YOLOv8s-World v2 `.pt` model from [Ultralytics YOLO-World](https://docs.ultralytics.com/models/yolo-world/) and export it to ONNX yourself. Make sure the class names used during export match the `--class_names` parameter:\r\n\r\n```bash\r\npip install ultralytics\r\nyolo export model=yolov8s-worldv2.pt format=onnx imgsz=320\r\ncp yolov8s-worldv2.onnx /path/to/kami-package-detection/\r\n```\r\n\r\n## Parameter Confirmation\r\n\r\nParameters can be supplied via either `config.json` (recommended for repeated use) or command-line flags. Command-line flags override `config.json`, which overrides built-in defaults.\r\n\r\n| Parameter | `config.json` field | Default | Description |\r\n|-----------|---------------------|---------|-------------|\r\n| `--device` | *(selects from cameras array)* | first camera | Target camera DEVICE_ID |\r\n| `--rtsp_url` | `cameras[].rtsp_url` | — | RTSP camera URL (overrides camera selection) |\r\n| `--conf_threshold` | `conf_threshold` | `0.25` | Confidence threshold (0.0–1.0) |\r\n| `--class_names` | *(not in config.json)* | `parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase` | Classes to detect (CLI only) |\r\n| `--run_time` | `run_time` | `0` | Max seconds; `0` = unlimited (continuous monitoring) |\r\n| `--start-detect` | — | — | Start background detection (all cameras or `--device`) |\r\n| `--stop-detect` | — | — | Stop background detection (all cameras or `--device`) |\r\n| `--status` | — | — | Check detection process status |\r\n| `--list-devices` | — | — | List all configured cameras and exit |\r\n| — | `alarm_cooldown` | `60` | Min seconds between notifications for different packages |\r\n| — | `feishu_webhook_url` | — | Feishu Webhook URL for push notifications |\r\n| — | `telegram_bot_token` | — | Telegram Bot token |\r\n| — | `telegram_chat_id` | — | Telegram chat ID |\r\n| — | `discord_webhook_url` | — | Discord Webhook URL |\r\n| — | `discord_bot_token` | — | Discord Bot token |\r\n| — | `discord_channel_id` | — | Discord channel ID |\r\n\r\n### Multi-Camera Configuration\r\n\r\n`config.json` supports a `cameras` array for multiple cameras:\r\n\r\n```json\r\n{\r\n  \"cameras\": [\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.100/stream\",\r\n      \"device_id\": \"CAM-FRONT\"\r\n    },\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.101/stream\",\r\n      \"device_id\": \"CAM-BACK\",\r\n      \"conf_threshold\": 0.3\r\n    }\r\n  ],\r\n  \"conf_threshold\": 0.25,\r\n  \"run_time\": 0,\r\n  \"alarm_cooldown\": 60,\r\n  \"feishu_webhook_url\": \"\",\r\n  \"telegram_bot_token\": \"\",\r\n  \"telegram_chat_id\": \"\",\r\n  \"discord_webhook_url\": \"\"\r\n}\r\n```\r\n\r\n- `device_id` must be unique across all cameras\r\n- Per-camera `conf_threshold` and `run_time` override global values\r\n- Without `--device`, all cameras are started/stopped together\r\n- Each camera runs as an independent background process\r\n- Legacy single-camera config (flat `rtsp_url` at top level) is still supported\r\n\r\n> When installed as part of `kami-smarthome-suite`, `rtsp_url`, `conf_threshold`, `run_time`, `alarm_cooldown` and all notification channel fields are auto-distributed into `config.json` from the central `kami_config.json`. `class_names` is intentionally NOT distributed and stays a per-skill default.\r\n\r\n**Ask the user: do any parameters need to be changed?**\r\n\r\n## Usage\r\n\r\n### Start Detection (Background)\r\n\r\n```bash\r\n# Start all cameras\r\n.venv/bin/python yolo_world_onnx.py --start-detect\r\n\r\n# Start a specific camera\r\n.venv/bin/python yolo_world_onnx.py --start-detect --device CAM-FRONT\r\n```\r\n\r\n### Stop Detection\r\n\r\n```bash\r\n# Stop all cameras\r\n.venv/bin/python yolo_world_onnx.py --stop-detect\r\n\r\n# Stop a specific camera\r\n.venv/bin/python yolo_world_onnx.py --stop-detect --device CAM-FRONT\r\n```\r\n\r\n### Check Status\r\n\r\n```bash\r\n# Status of all cameras\r\n.venv/bin/python yolo_world_onnx.py --status\r\n\r\n# Status of a specific camera\r\n.venv/bin/python yolo_world_onnx.py --status --device CAM-FRONT\r\n```\r\n\r\n### Single-Run Mode (Foreground)\r\n\r\n```bash\r\n# Run continuous monitoring on a specific camera (foreground)\r\n.venv/bin/python yolo_world_onnx.py --device CAM-FRONT\r\n\r\n# Override via CLI (runs for 120 seconds then stops)\r\n.venv/bin/python yolo_world_onnx.py \\\r\n  --rtsp_url rtsp://your-camera-address \\\r\n  --run_time 120\r\n\r\n# List configured cameras\r\n.venv/bin/python yolo_world_onnx.py --list-devices\r\n```\r\n\r\n## Output (stdout JSON)\r\n\r\nWhen a new package is detected, outputs an alarm JSON to stdout:\r\n\r\n```json\r\n{\r\n  \"alarm\": true,\r\n  \"type\": \"package\",\r\n  \"class_name\": \"parcel\",\r\n  \"confidence\": 0.87,\r\n  \"camera_name\": \"CAM-FRONT\",\r\n  \"frame\": 1523,\r\n  \"snapshot\": \"/path/to/snapshots/CAM-FRONT/20260604_153012_482.jpg\",\r\n  \"detections\": [\r\n    {\r\n      \"class_name\": \"parcel\",\r\n      \"bbox\": {\"x1\": 100, \"y1\": 200, \"x2\": 300, \"y2\": 400}\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\n| Field | Type | Description |\r\n|-------|------|-------------|\r\n| `alarm` | bool | Always `true` for alarm output |\r\n| `type` | string | Always `\"package\"` |\r\n| `class_name` | string | Detected object class |\r\n| `confidence` | float | Detection confidence (0.0–1.0) |\r\n| `camera_name` | string | Source camera device_id |\r\n| `frame` | int | Frame number when detected |\r\n| `snapshot` | string | Absolute path to the annotated JPG (with bounding box drawn) |\r\n| `bbox.x1, y1, x2, y2` | int | Bounding box coordinates |\r\n\r\n## Exit Codes\r\n\r\n| Code | Meaning |\r\n|------|---------|\r\n| `0` | Normal exit (run_time reached or manual stop via signal) |\r\n| `1` | Error (model missing, RTSP failure, runtime exception) |\r\n\r\n## Troubleshooting\r\n\r\n- `bash: .venv/bin/python: No such file or directory` → Run `bash setup.sh`\r\n- `Model file not found` → Place `yolov8s-worldv2.onnx` in the skill directory\r\n- `Cannot open video` → Check camera is online and `--rtsp_url` is correct\r\n\r\n## Privacy Notice\r\n\r\nThis skill processes camera video stream frames for object detection. Please review the following privacy information before use:\r\n\r\n### Pure Local Inference\r\n\r\n- Detection runs entirely on-device via the YOLOv8-World ONNX model — **no cloud API calls for inference**\r\n- The only outbound traffic is: RTSP pull from your camera (LAN) + notification push to your configured channels (Feishu / Telegram / Discord)\r\n\r\n### Local Data Storage\r\n\r\n- Frames are held in memory only and discarded after each inference — **nothing is persisted to disk by default**\r\n- When an alarm fires, the annotated frame is saved as a JPEG under `snapshots/<camera_device_id>/` for evidence; nothing else is persisted\r\n- The skill emits alarm JSON objects to **stdout**; if you need history, the caller is responsible for storing it\r\n\r\n### Notification Channels\r\n\r\n- Push notifications are sent only when configured (all channels are optional)\r\n- Notification content includes: detected class name, confidence, camera name, and timestamp\r\n- No images or video frames are sent in notifications\r\n\r\n### User Control\r\n\r\n- Camera URL is supplied by the user; this skill will not auto-discover or connect to cameras\r\n- You can stop the skill at any time via `--stop-detect` or SIGTERM\r\n- Removing the skill directory wipes everything (model file + venv); nothing else is touched on the host\r\n\r\n> For more details on our privacy policy, visit: https://kamiclaw-skill.kamihome.com/privacy\n\nFile v1.1.2:README.md\n\n# 📦 Kami Package Detection\r\n\r\n> A free skill by **Kami SmartHome** — get notified the moment a package arrives at your door.\r\n\r\nMonitor your RTSP camera feed for packages, parcels, backpacks, handbags, and suitcases using YOLOv8-World ONNX inference. When detected, outputs the object class and bounding box as structured JSON to stdout.\r\n\r\n### Features\r\n\r\n- 📦 Package & parcel detection\r\n- 🧳 Suitcase / backpack / handbag recognition\r\n- 🏠 Doorstep & reception monitoring\r\n- ⏱ Configurable detection duration\r\n- 🔔 JSON output for easy integration\r\n- 🖥 CPU-only inference via `onnxruntime` — no GPU required\r\n- 🐍 Isolated `.venv` — zero impact on system Python\r\n\r\n### Scenarios\r\n\r\n- Doorstep delivery waiting\r\n- Office reception package management\r\n- Warehouse cargo monitoring\r\n- Temporary item watch\r\n\r\n## Quick Start\r\n\r\n```bash\r\n# 1. Run setup (one-time)\r\nbash setup.sh\r\n\r\n# 2. Place your ONNX model file\r\ncp /path/to/yolov8s-worldv2.onnx .\r\n\r\n# 3a. Foreground single-run (exits on first detection or timeout)\r\n.venv/bin/python yolo_world_onnx.py \\\r\n  --rtsp_url rtsp://192.168.1.100/live/camera01 \\\r\n  --conf_threshold 0.25 \\\r\n  --class_names parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase \\\r\n  --run_time 120\r\n\r\n# 3b. Background daemon for one or more cameras (uses config.json)\r\n.venv/bin/python yolo_world_onnx.py --start-detect\r\n.venv/bin/python yolo_world_onnx.py --status\r\n.venv/bin/python yolo_world_onnx.py --stop-detect\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nbash setup.sh\r\n```\r\n\r\nThe setup script automatically:\r\n1. Detects system Python (`python3` or `python`), exits with error if not found\r\n2. Creates an isolated virtual environment at `.venv/`\r\n3. Installs Python dependencies from `requirements.txt`\r\n\r\n> Idempotent — safe to run multiple times. Won't reinstall existing dependencies.\r\n\r\n### Requirements\r\n\r\n| Dependency | Version | Purpose |\r\n|------------|---------|---------|\r\n| `onnxruntime` | latest | ONNX model inference engine |\r\n| `opencv-python-headless` | latest | Video capture and image processing |\r\n| `numpy` | latest | Array operations |\r\n\r\n### System Prerequisites\r\n\r\n- **Python 3.8+** and **python3-venv** (`sudo apt install python3 python3-venv`)\r\n- **ONNX model file**: `yolov8s-worldv2.onnx` in the skill directory\r\n- **RTSP camera**: online and network-reachable\r\n\r\n## Usage\r\n\r\n### Basic Detection\r\n\r\nParameters can be supplied via either `config.json` (recommended) or command-line flags. CLI flags > `config.json` > built-in defaults.\r\n\r\n```bash\r\n# Option 1: Edit config.json once, then just run\r\n.venv/bin/python yolo_world_onnx.py\r\n\r\n# Option 2: Override via CLI\r\n.venv/bin/python yolo_world_onnx.py \\\r\n  --rtsp_url rtsp://127.0.0.1/live/TNPUSAQ-757597-DRFMY \\\r\n  --conf_threshold 0.25 \\\r\n  --class_names parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase \\\r\n  --run_time 60\r\n```\r\n\r\n### Multi-Camera Configuration\r\n\r\n`config.json` supports a `cameras` array so multiple RTSP feeds can run as independent background processes:\r\n\r\n```json\r\n{\r\n  \"cameras\": [\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.100/stream\",\r\n      \"device_id\": \"CAM-FRONT\"\r\n    },\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.101/stream\",\r\n      \"device_id\": \"CAM-BACK\",\r\n      \"conf_threshold\": 0.3,\r\n      \"run_time\": 120\r\n    }\r\n  ],\r\n  \"conf_threshold\": 0.25,\r\n  \"run_time\": 60\r\n}\r\n```\r\n\r\n- `device_id` must be unique across all cameras\r\n- Per-camera `conf_threshold` and `run_time` override global values\r\n- Without `--device`, all cameras start/stop together\r\n- Legacy single-camera config (flat `rtsp_url` at top level) is still supported\r\n\r\n### Daemon Mode (Multi-Camera)\r\n\r\n```bash\r\n# Start all cameras\r\n.venv/bin/python yolo_world_onnx.py --start-detect\r\n\r\n# Start a specific camera\r\n.venv/bin/python yolo_world_onnx.py --start-detect --device CAM-FRONT\r\n\r\n# Status (all cameras or a specific one)\r\n.venv/bin/python yolo_world_onnx.py --status\r\n.venv/bin/python yolo_world_onnx.py --status --device CAM-FRONT\r\n\r\n# Stop (all cameras or a specific one)\r\n.venv/bin/python yolo_world_onnx.py --stop-detect\r\n.venv/bin/python yolo_world_onnx.py --stop-detect --device CAM-FRONT\r\n\r\n# List all configured cameras\r\n.venv/bin/python yolo_world_onnx.py --list-devices\r\n```\r\n\r\n### Parameters\r\n\r\n| Parameter | `config.json` field | Type | Required | Default | Description |\r\n|-----------|---------------------|------|----------|---------|-------------|\r\n| `--rtsp_url` | `rtsp_url` / `cameras[].rtsp_url` | string | No | `rtsp://127.0.0.1/live/TNPUSAQ-757597-DRFMY` | RTSP camera stream URL (overrides camera selection when used directly) |\r\n| `--device` | *(selects from `cameras` array)* | string | No | first camera | Target camera `device_id` (foreground or daemon mode) |\r\n| `--conf_threshold` | `conf_threshold` | float | No | `0.25` | Detection confidence threshold (0.0–1.0) |\r\n| `--class_names` | *(not in config.json)* | string[] | No | `parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase` | Space-separated class names to detect (CLI only) |\r\n| `--run_time` | `run_time` | int | No | `60` | Max run time in seconds. `0` = unlimited |\r\n| `--start-detect` | — | flag | No | — | Start background detection (all cameras, or one with `--device`) |\r\n| `--stop-detect` | — | flag | No | — | Stop background detection (all cameras, or one with `--device`) |\r\n| `--status` | — | flag | No | — | Check detection process status |\r\n| `--list-devices` | — | flag | No | — | List all configured cameras and exit |\r\n\r\n> When installed as part of `kami-smarthome-suite`, `cameras[]`, `conf_threshold` and `run_time` are auto-distributed into `config.json` from the central `kami_config.json`. `class_names` is a per-skill default and not distributed.\r\n\r\n## Output Format\r\n\r\nWhen a non-person target is detected, the skill outputs JSON to **stdout** and exits with code `0`:\r\n\r\n```json\r\n{\r\n  \"detections\": [\r\n    {\r\n      \"class_name\": \"parcel\",\r\n      \"bbox\": {\"x1\": 100, \"y1\": 200, \"x2\": 300, \"y2\": 400}\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\n### Field Reference\r\n\r\n| Field | Type | Description |\r\n|-------|------|-------------|\r\n| `detections` | array | List of detected objects |\r\n| `detections[].class_name` | string | Detected object class |\r\n| `detections[].bbox.x1` | int | Bounding box left x |\r\n| `detections[].bbox.y1` | int | Bounding box top y |\r\n| `detections[].bbox.x2` | int | Bounding box right x |\r\n| `detections[].bbox.y2` | int | Bounding box bottom y |\r\n\r\n## Exit Codes\r\n\r\n| Code | Meaning |\r\n|------|---------|\r\n| `0` | Target detected and JSON output written |\r\n| `1` | Model file missing, RTSP connection failure, or runtime error |\r\n| `2` | Run time exceeded, no target detected (timeout) |\r\n\r\n> Exit code `0` = detection success, `2` = timeout with no detection, `1` = error.\r\n\r\n## Architecture\r\n\r\n```\r\nRTSP Camera → [yolo_world_onnx.py] → JSON stdout\r\n                    │\r\n                    ├── letterbox (preprocessing)\r\n                    ├── ONNX inference (YOLOv8-World)\r\n                    ├── parse_output + NMS (post-processing)\r\n                    └── format_detection_result (JSON output)\r\n```\r\n\r\nThe skill follows a single-pass detection model:\r\n1. Read frames from RTSP stream\r\n2. Preprocess each frame (letterbox resize to 320×320)\r\n3. Run ONNX inference\r\n4. Parse detections, apply NMS\r\n5. On first non-person detection → output JSON → exit\r\n\r\n## Error Handling\r\n\r\n| Scenario | Behavior | Exit Code |\r\n|----------|----------|-----------|\r\n| Model file (`yolov8s-worldv2.onnx`) not found | Log error, exit immediately | `1` |\r\n| RTSP stream cannot connect | Log error, exit immediately | `1` |\r\n| Model load failure (corrupt ONNX) | Log error, exit immediately | `1` |\r\n| Run time exceeded | Log timeout info, exit | `2` |\r\n| Video stream ends (no more frames) | Log warning, exit | `2` |\r\n\r\n## Troubleshooting\r\n\r\n### Virtual environment not found\r\n```\r\nbash: .venv/bin/python: No such file or directory\r\n```\r\n**Fix**: Run `bash setup.sh` to initialize the environment.\r\n\r\n### Model file missing\r\n```\r\nModel file not found: .../yolov8s-worldv2.onnx\r\n```\r\n**Fix**: Download or copy `yolov8s-worldv2.onnx` into the skill directory.\r\n\r\n### RTSP connection failure\r\n```\r\nCannot open video: rtsp://...\r\n```\r\n**Fix**: Verify the camera is online, check the `--rtsp_url` value, and confirm network connectivity.\r\n\r\n### Low detection rate\r\n- Try lowering `--conf_threshold` (e.g., `0.15`)\r\n- Ensure the target object class is included in `--class_names`\r\n- Check camera angle and lighting conditions\r\n\r\n## File Structure\r\n\r\n```\r\nkami-package-detection/\r\n├── .gitignore\r\n├── requirements.txt          # onnxruntime, opencv-python-headless, numpy\r\n├── setup.sh                  # Environment setup with Python auto-detection\r\n├── SKILL.md                  # AI agent instructions + metadata\r\n├── README.md                 # This file\r\n├── yolo_world_onnx.py        # Main detection script\r\n├── yolov8s-worldv2.onnx      # ONNX model file (not included, user-provided)\r\n└── tests/\r\n    └── test_parcel_detection.py\r\n```\r\n\r\n## Privacy Notice\r\n\r\nThis skill processes camera video stream frames for object detection. Please review the following privacy information before use:\r\n\r\n### Pure Local Inference\r\n\r\n- Detection runs entirely on-device via the YOLOv8-World ONNX model — **no API key, no cloud calls, no external network traffic**\r\n- The only outbound traffic is the RTSP pull from your own camera (LAN)\r\n\r\n### Local Data Storage\r\n\r\n- Frames are held in memory only and discarded after each inference — **nothing is persisted to disk**\r\n- The skill emits a single JSON object to **stdout**; if you need history, the caller is responsible for storing it\r\n\r\n### User Control\r\n\r\n- Camera URL is supplied by the user; this skill will not auto-discover or connect to cameras\r\n- You can stop the skill at any time — there is no background daemon, no cache, and no residual data\r\n- Removing the skill directory wipes everything (model file + venv); nothing else is touched on the host\r\n\r\n> For more details on our privacy policy, visit: https://kamiclaw-skill.kamihome.com/privacy\r\n\r\n## License\r\n\r\nMIT-0\n\nFile v1.1.2:_meta.json\n\n{\n  \"ownerId\": \"kn7e9156e1awf00v1sas2wkdfd85a4zh\",\n  \"slug\": \"kami-package-detection\",\n  \"version\": \"1.1.2\",\n  \"publishedAt\": 1780627007125\n}\n\nFile v1.1.2:skill-card.md\n\n## Description: <br>\nContinuously monitors RTSP camera streams for packages, parcels, and bags using YOLO-World ONNX, with deduplication so alerts fire only when a new or moved package appears. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[13681882136](https://clawhub.ai/user/13681882136) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and smart-home operators use this skill to monitor configured RTSP cameras for package deliveries and receive structured alerts through stdout and optional notification channels. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill can run continuous background monitoring of camera streams. <br>\nMitigation: Install only when continuous monitoring is intended, configure only authorized RTSP cameras, and stop background detection when monitoring is no longer needed. <br>\nRisk: Camera snapshots, logs, and configuration may contain sensitive local information. <br>\nMitigation: Restrict access to config, log, and snapshot files and avoid embedding camera passwords in RTSP URLs when possible. <br>\nRisk: Notification integrations can expose alerts through third-party services. <br>\nMitigation: Keep notification tokens private, configure only the channels required, and review destination access controls before enabling alerts. <br>\nRisk: The setup script installs Python dependencies at runtime. <br>\nMitigation: Review and pin dependencies before running setup.sh in production environments. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/13681882136/kami-package-detection) <br>\n- [Ultralytics YOLO-World Documentation](https://docs.ultralytics.com/models/yolo-world/) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, configuration, JSON, files, guidance] <br>\n**Output Format:** [Markdown guidance with shell commands and configuration examples; runtime alarms are emitted as JSON and may include snapshot file paths.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Requires user-supplied RTSP camera configuration and optional notification channel credentials.] <br>\n\n## Skill Version(s): <br>\n1.1.2 (source: ClawHub release metadata) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v1.1.2:config.json\n\n{\n  \"cameras\": [\n    {\n      \"rtsp_url\": \"\",\n      \"device_id\": \"CAM-001\"\n    }\n  ],\n  \"conf_threshold\": 0.25,\n  \"run_time\": 0,\n  \"alarm_cooldown\": 60,\n  \"feishu_webhook_url\": \"\",\n  \"telegram_bot_token\": \"\",\n  \"telegram_chat_id\": \"\",\n  \"discord_webhook_url\": \"\",\n  \"discord_bot_token\": \"\",\n  \"discord_channel_id\": \"\"\n}\n\nFile v1.1.2:requirements.txt\n\nonnxruntime\r\nopencv-python-headless\r\nnumpy\r\nrequests\n\nArchive v1.1.1: 9 files, 23214 bytes\n\nFiles: config.json (319b), notifier.py (8420b), README.md (10305b), requirements.txt (54b), setup.sh (7888b), skill-card.md (2772b), SKILL.md (9892b), yolo_world_onnx.py (28728b), _meta.json (141b)\n\nFile v1.1.1:SKILL.md\n\n---\r\nname: kami-package-detection\r\ndescription: A free skill by Kami SmartHome. Continuously monitors RTSP camera streams for packages, parcels, and bags using YOLO-World ONNX. Smart deduplication only triggers alerts when a genuinely new or moved package appears.\r\nversion: 1.1.0\r\nauthor: kami-smarthome\r\ntags:\r\n  - smart-home\r\n  - kami\r\n  - home-assistant\r\n  - smarthome\r\n  - detect\r\n  - object-detection\r\n  - yolo\r\n  - package-detection\r\n  - parcel-detection\r\n  - iot\r\n  - camera\r\n  - rtsp\r\n  - onnx\r\n  - edge-ai\r\n  - delivery\r\n  - monitoring\r\n  - notification\r\ntriggers:\r\n  - smart home\r\n  - kami\r\n  - home assistant\r\n  - detect\r\n  - detect packages\r\n  - detect parcels\r\n  - kami package\r\n  - kami smart home\r\n  - home assistant package\r\n  - smart home delivery\r\n  - check doorstep\r\n  - delivery notification\r\n  - check for deliveries\r\n  - package detection\r\n  - is there a package\r\n  - monitor packages\r\n  - check camera for packages\r\n  - any deliveries at the door\r\n  - parcel alert\r\nmetadata:\r\n  openclaw:\r\n    requires:\r\n      bins:\r\n        - python3.10\r\n      hardware:\r\n        cpu: \"2+ cores (x86_64 / ARM64)\"\r\n        memory: \"2 GB+\"\r\n        storage: \"2 GB+\"\r\n        gpu: \"optional (speeds up ONNX inference)\"\r\n      network:\r\n        - \"RTSP camera access (LAN)\"\r\n        - \"Internet (KamiClaw API)\"\r\n      devices:\r\n        - \"RTSP IP camera\"\r\n    emoji: \"📦\"\r\n---\r\n\r\n# Kami Package Detection\r\n\r\n> Continuously monitors your camera and sends instant notifications when a new package arrives.\r\n\r\nContinuously monitors RTSP camera streams for packages, parcels, backpacks, handbags, and suitcases. When a **new** package is detected (position/size significantly different from the last alert), sends push notifications. Static frames are automatically skipped to save compute.\r\n\r\n### Features\r\n\r\n- 📦 Continuous package & parcel monitoring (not one-shot)\r\n- 🔔 Push notifications via Feishu / Telegram / Discord\r\n- 🧠 Smart deduplication — only alerts for new or moved packages (IoU + area change)\r\n- ⚡ Static frame filtering — skips inference when camera scene is unchanged\r\n- 📷 Multi-camera support with independent background processes\r\n- 🧳 Suitcase / backpack / handbag recognition\r\n- 🏠 Doorstep & reception monitoring\r\n\r\n### Scenarios\r\n\r\n- Doorstep delivery waiting\r\n- Office reception package management\r\n- Warehouse cargo monitoring\r\n- Temporary item watch\r\n\r\n## Installation\r\n\r\n```bash\r\nbash setup.sh\r\n```\r\n\r\nCreates `.venv/` and installs `onnxruntime`, `opencv-python-headless`, `numpy`, `requests`. Idempotent.\r\n\r\n## Prerequisites\r\n\r\n- `python3` and `python3-venv` installed\r\n- `yolov8s-worldv2.onnx` model file in the skill directory\r\n- RTSP camera(s) online and reachable\r\n\r\n### Model\r\n\r\nThe `yolov8s-worldv2.onnx` model file is included in the skill package. If missing, re-download this skill from ClawHub:\r\n\r\n```bash\r\nclawhub install kami-package-detection\r\n```\r\n\r\nAlternatively, download the YOLOv8s-World v2 `.pt` model from [Ultralytics YOLO-World](https://docs.ultralytics.com/models/yolo-world/) and export it to ONNX yourself. Make sure the class names used during export match the `--class_names` parameter:\r\n\r\n```bash\r\npip install ultralytics\r\nyolo export model=yolov8s-worldv2.pt format=onnx imgsz=320\r\ncp yolov8s-worldv2.onnx /path/to/kami-package-detection/\r\n```\r\n\r\n## Parameter Confirmation\r\n\r\nParameters can be supplied via either `config.json` (recommended for repeated use) or command-line flags. Command-line flags override `config.json`, which overrides built-in defaults.\r\n\r\n| Parameter | `config.json` field | Default | Description |\r\n|-----------|---------------------|---------|-------------|\r\n| `--device` | *(selects from cameras array)* | first camera | Target camera DEVICE_ID |\r\n| `--rtsp_url` | `cameras[].rtsp_url` | — | RTSP camera URL (overrides camera selection) |\r\n| `--conf_threshold` | `conf_threshold` | `0.25` | Confidence threshold (0.0–1.0) |\r\n| `--class_names` | *(not in config.json)* | `parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase` | Classes to detect (CLI only) |\r\n| `--run_time` | `run_time` | `0` | Max seconds; `0` = unlimited (continuous monitoring) |\r\n| `--start-detect` | — | — | Start background detection (all cameras or `--device`) |\r\n| `--stop-detect` | — | — | Stop background detection (all cameras or `--device`) |\r\n| `--status` | — | — | Check detection process status |\r\n| `--list-devices` | — | — | List all configured cameras and exit |\r\n| — | `alarm_cooldown` | `60` | Min seconds between notifications for different packages |\r\n| — | `feishu_webhook_url` | — | Feishu Webhook URL for push notifications |\r\n| — | `telegram_bot_token` | — | Telegram Bot token |\r\n| — | `telegram_chat_id` | — | Telegram chat ID |\r\n| — | `discord_webhook_url` | — | Discord Webhook URL |\r\n| — | `discord_bot_token` | — | Discord Bot token |\r\n| — | `discord_channel_id` | — | Discord channel ID |\r\n\r\n### Multi-Camera Configuration\r\n\r\n`config.json` supports a `cameras` array for multiple cameras:\r\n\r\n```json\r\n{\r\n  \"cameras\": [\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.100/stream\",\r\n      \"device_id\": \"CAM-FRONT\"\r\n    },\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.101/stream\",\r\n      \"device_id\": \"CAM-BACK\",\r\n      \"conf_threshold\": 0.3\r\n    }\r\n  ],\r\n  \"conf_threshold\": 0.25,\r\n  \"run_time\": 0,\r\n  \"alarm_cooldown\": 60,\r\n  \"feishu_webhook_url\": \"\",\r\n  \"telegram_bot_token\": \"\",\r\n  \"telegram_chat_id\": \"\",\r\n  \"discord_webhook_url\": \"\"\r\n}\r\n```\r\n\r\n- `device_id` must be unique across all cameras\r\n- Per-camera `conf_threshold` and `run_time` override global values\r\n- Without `--device`, all cameras are started/stopped together\r\n- Each camera runs as an independent background process\r\n- Legacy single-camera config (flat `rtsp_url` at top level) is still supported\r\n\r\n> When installed as part of `kami-smarthome-suite`, `rtsp_url`, `conf_threshold`, `run_time`, `alarm_cooldown` and all notification channel fields are auto-distributed into `config.json` from the central `kami_config.json`. `class_names` is intentionally NOT distributed and stays a per-skill default.\r\n\r\n**Ask the user: do any parameters need to be changed?**\r\n\r\n## Usage\r\n\r\n### Start Detection (Background)\r\n\r\n```bash\r\n# Start all cameras\r\n.venv/bin/python yolo_world_onnx.py --start-detect\r\n\r\n# Start a specific camera\r\n.venv/bin/python yolo_world_onnx.py --start-detect --device CAM-FRONT\r\n```\r\n\r\n### Stop Detection\r\n\r\n```bash\r\n# Stop all cameras\r\n.venv/bin/python yolo_world_onnx.py --stop-detect\r\n\r\n# Stop a specific camera\r\n.venv/bin/python yolo_world_onnx.py --stop-detect --device CAM-FRONT\r\n```\r\n\r\n### Check Status\r\n\r\n```bash\r\n# Status of all cameras\r\n.venv/bin/python yolo_world_onnx.py --status\r\n\r\n# Status of a specific camera\r\n.venv/bin/python yolo_world_onnx.py --status --device CAM-FRONT\r\n```\r\n\r\n### Single-Run Mode (Foreground)\r\n\r\n```bash\r\n# Run continuous monitoring on a specific camera (foreground)\r\n.venv/bin/python yolo_world_onnx.py --device CAM-FRONT\r\n\r\n# Override via CLI (runs for 120 seconds then stops)\r\n.venv/bin/python yolo_world_onnx.py \\\r\n  --rtsp_url rtsp://your-camera-address \\\r\n  --run_time 120\r\n\r\n# List configured cameras\r\n.venv/bin/python yolo_world_onnx.py --list-devices\r\n```\r\n\r\n## Output (stdout JSON)\r\n\r\nWhen a new package is detected, outputs an alarm JSON to stdout:\r\n\r\n```json\r\n{\r\n  \"alarm\": true,\r\n  \"type\": \"package\",\r\n  \"class_name\": \"parcel\",\r\n  \"confidence\": 0.87,\r\n  \"camera_name\": \"CAM-FRONT\",\r\n  \"frame\": 1523,\r\n  \"detections\": [\r\n    {\r\n      \"class_name\": \"parcel\",\r\n      \"bbox\": {\"x1\": 100, \"y1\": 200, \"x2\": 300, \"y2\": 400}\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\n| Field | Type | Description |\r\n|-------|------|-------------|\r\n| `alarm` | bool | Always `true` for alarm output |\r\n| `type` | string | Always `\"package\"` |\r\n| `class_name` | string | Detected object class |\r\n| `confidence` | float | Detection confidence (0.0–1.0) |\r\n| `camera_name` | string | Source camera device_id |\r\n| `frame` | int | Frame number when detected |\r\n| `bbox.x1, y1, x2, y2` | int | Bounding box coordinates |\r\n\r\n## Exit Codes\r\n\r\n| Code | Meaning |\r\n|------|---------|\r\n| `0` | Normal exit (run_time reached or manual stop via signal) |\r\n| `1` | Error (model missing, RTSP failure, runtime exception) |\r\n\r\n## Troubleshooting\r\n\r\n- `bash: .venv/bin/python: No such file or directory` → Run `bash setup.sh`\r\n- `Model file not found` → Place `yolov8s-worldv2.onnx` in the skill directory\r\n- `Cannot open video` → Check camera is online and `--rtsp_url` is correct\r\n\r\n## Privacy Notice\r\n\r\nThis skill processes camera video stream frames for object detection. Please review the following privacy information before use:\r\n\r\n### Pure Local Inference\r\n\r\n- Detection runs entirely on-device via the YOLOv8-World ONNX model — **no cloud API calls for inference**\r\n- The only outbound traffic is: RTSP pull from your camera (LAN) + notification push to your configured channels (Feishu / Telegram / Discord)\r\n\r\n### Local Data Storage\r\n\r\n- Frames are held in memory only and discarded after each inference — **nothing is persisted to disk**\r\n- The skill emits alarm JSON objects to **stdout**; if you need history, the caller is responsible for storing it\r\n\r\n### Notification Channels\r\n\r\n- Push notifications are sent only when configured (all channels are optional)\r\n- Notification content includes: detected class name, confidence, camera name, and timestamp\r\n- No images or video frames are sent in notifications\r\n\r\n### User Control\r\n\r\n- Camera URL is supplied by the user; this skill will not auto-discover or connect to cameras\r\n- You can stop the skill at any time via `--stop-detect` or SIGTERM\r\n- Removing the skill directory wipes everything (model file + venv); nothing else is touched on the host\r\n\r\n> For more details on our privacy policy, visit: https://kamiclaw-skill.kamihome.com/privacy\n\nFile v1.1.1:README.md\n\n# 📦 Kami Package Detection\r\n\r\n> A free skill by **Kami SmartHome** — get notified the moment a package arrives at your door.\r\n\r\nMonitor your RTSP camera feed for packages, parcels, backpacks, handbags, and suitcases using YOLOv8-World ONNX inference. When detected, outputs the object class and bounding box as structured JSON to stdout.\r\n\r\n### Features\r\n\r\n- 📦 Package & parcel detection\r\n- 🧳 Suitcase / backpack / handbag recognition\r\n- 🏠 Doorstep & reception monitoring\r\n- ⏱ Configurable detection duration\r\n- 🔔 JSON output for easy integration\r\n- 🖥 CPU-only inference via `onnxruntime` — no GPU required\r\n- 🐍 Isolated `.venv` — zero impact on system Python\r\n\r\n### Scenarios\r\n\r\n- Doorstep delivery waiting\r\n- Office reception package management\r\n- Warehouse cargo monitoring\r\n- Temporary item watch\r\n\r\n## Quick Start\r\n\r\n```bash\r\n# 1. Run setup (one-time)\r\nbash setup.sh\r\n\r\n# 2. Place your ONNX model file\r\ncp /path/to/yolov8s-worldv2.onnx .\r\n\r\n# 3a. Foreground single-run (exits on first detection or timeout)\r\n.venv/bin/python yolo_world_onnx.py \\\r\n  --rtsp_url rtsp://192.168.1.100/live/camera01 \\\r\n  --conf_threshold 0.25 \\\r\n  --class_names parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase \\\r\n  --run_time 120\r\n\r\n# 3b. Background daemon for one or more cameras (uses config.json)\r\n.venv/bin/python yolo_world_onnx.py --start-detect\r\n.venv/bin/python yolo_world_onnx.py --status\r\n.venv/bin/python yolo_world_onnx.py --stop-detect\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nbash setup.sh\r\n```\r\n\r\nThe setup script automatically:\r\n1. Detects system Python (`python3` or `python`), exits with error if not found\r\n2. Creates an isolated virtual environment at `.venv/`\r\n3. Installs Python dependencies from `requirements.txt`\r\n\r\n> Idempotent — safe to run multiple times. Won't reinstall existing dependencies.\r\n\r\n### Requirements\r\n\r\n| Dependency | Version | Purpose |\r\n|------------|---------|---------|\r\n| `onnxruntime` | latest | ONNX model inference engine |\r\n| `opencv-python-headless` | latest | Video capture and image processing |\r\n| `numpy` | latest | Array operations |\r\n\r\n### System Prerequisites\r\n\r\n- **Python 3.8+** and **python3-venv** (`sudo apt install python3 python3-venv`)\r\n- **ONNX model file**: `yolov8s-worldv2.onnx` in the skill directory\r\n- **RTSP camera**: online and network-reachable\r\n\r\n## Usage\r\n\r\n### Basic Detection\r\n\r\nParameters can be supplied via either `config.json` (recommended) or command-line flags. CLI flags > `config.json` > built-in defaults.\r\n\r\n```bash\r\n# Option 1: Edit config.json once, then just run\r\n.venv/bin/python yolo_world_onnx.py\r\n\r\n# Option 2: Override via CLI\r\n.venv/bin/python yolo_world_onnx.py \\\r\n  --rtsp_url rtsp://127.0.0.1/live/TNPUSAQ-757597-DRFMY \\\r\n  --conf_threshold 0.25 \\\r\n  --class_names parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase \\\r\n  --run_time 60\r\n```\r\n\r\n### Multi-Camera Configuration\r\n\r\n`config.json` supports a `cameras` array so multiple RTSP feeds can run as independent background processes:\r\n\r\n```json\r\n{\r\n  \"cameras\": [\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.100/stream\",\r\n      \"device_id\": \"CAM-FRONT\"\r\n    },\r\n    {\r\n      \"rtsp_url\": \"rtsp://192.168.1.101/stream\",\r\n      \"device_id\": \"CAM-BACK\",\r\n      \"conf_threshold\": 0.3,\r\n      \"run_time\": 120\r\n    }\r\n  ],\r\n  \"conf_threshold\": 0.25,\r\n  \"run_time\": 60\r\n}\r\n```\r\n\r\n- `device_id` must be unique across all cameras\r\n- Per-camera `conf_threshold` and `run_time` override global values\r\n- Without `--device`, all cameras start/stop together\r\n- Legacy single-camera config (flat `rtsp_url` at top level) is still supported\r\n\r\n### Daemon Mode (Multi-Camera)\r\n\r\n```bash\r\n# Start all cameras\r\n.venv/bin/python yolo_world_onnx.py --start-detect\r\n\r\n# Start a specific camera\r\n.venv/bin/python yolo_world_onnx.py --start-detect --device CAM-FRONT\r\n\r\n# Status (all cameras or a specific one)\r\n.venv/bin/python yolo_world_onnx.py --status\r\n.venv/bin/python yolo_world_onnx.py --status --device CAM-FRONT\r\n\r\n# Stop (all cameras or a specific one)\r\n.venv/bin/python yolo_world_onnx.py --stop-detect\r\n.venv/bin/python yolo_world_onnx.py --stop-detect --device CAM-FRONT\r\n\r\n# List all configured cameras\r\n.venv/bin/python yolo_world_onnx.py --list-devices\r\n```\r\n\r\n### Parameters\r\n\r\n| Parameter | `config.json` field | Type | Required | Default | Description |\r\n|-----------|---------------------|------|----------|---------|-------------|\r\n| `--rtsp_url` | `rtsp_url` / `cameras[].rtsp_url` | string | No | `rtsp://127.0.0.1/live/TNPUSAQ-757597-DRFMY` | RTSP camera stream URL (overrides camera selection when used directly) |\r\n| `--device` | *(selects from `cameras` array)* | string | No | first camera | Target camera `device_id` (foreground or daemon mode) |\r\n| `--conf_threshold` | `conf_threshold` | float | No | `0.25` | Detection confidence threshold (0.0–1.0) |\r\n| `--class_names` | *(not in config.json)* | string[] | No | `parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase` | Space-separated class names to detect (CLI only) |\r\n| `--run_time` | `run_time` | int | No | `60` | Max run time in seconds. `0` = unlimited |\r\n| `--start-detect` | — | flag | No | — | Start background detection (all cameras, or one with `--device`) |\r\n| `--stop-detect` | — | flag | No | — | Stop background detection (all cameras, or one with `--device`) |\r\n| `--status` | — | flag | No | — | Check detection process status |\r\n| `--list-devices` | — | flag | No | — | List all configured cameras and exit |\r\n\r\n> When installed as part of `kami-smarthome-suite`, `cameras[]`, `conf_threshold` and `run_time` are auto-distributed into `config.json` from the central `kami_config.json`. `class_names` is a per-skill default and not distributed.\r\n\r\n## Output Format\r\n\r\nWhen a non-person target is detected, the skill outputs JSON to **stdout** and exits with code `0`:\r\n\r\n```json\r\n{\r\n  \"detections\": [\r\n    {\r\n      \"class_name\": \"parcel\",\r\n      \"bbox\": {\"x1\": 100, \"y1\": 200, \"x2\": 300, \"y2\": 400}\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\n### Field Reference\r\n\r\n| Field | Type | Description |\r\n|-------|------|-------------|\r\n| `detections` | array | List of detected objects |\r\n| `detections[].class_name` | string | Detected object class |\r\n| `detections[].bbox.x1` | int | Bounding box left x |\r\n| `detections[].bbox.y1` | int | Bounding box top y |\r\n| `detections[].bbox.x2` | int | Bounding box right x |\r\n| `detections[].bbox.y2` | int | Bounding box bottom y |\r\n\r\n## Exit Codes\r\n\r\n| Code | Meaning |\r\n|------|---------|\r\n| `0` | Target detected and JSON output written |\r\n| `1` | Model file missing, RTSP connection failure, or runtime error |\r\n| `2` | Run time exceeded, no target detected (timeout) |\r\n\r\n> Exit code `0` = detection success, `2` = timeout with\n\nArchive v1.1.0: 9 files, 23151 bytes\n\nFiles: config.json (319b), notifier.py (8420b), README.md (10305b), requirements.txt (54b), setup.sh (7888b), skill-card.md (2592b), SKILL.md (9913b), yolo_world_onnx.py (28728b), _meta.json (141b)\n\nArchive v1.0.9: 8 files, 18578 bytes\n\nFiles: config.json (130b), README.md (10305b), requirements.txt (44b), setup.sh (7888b), skill-card.md (2948b), SKILL.md (8073b), yolo_world_onnx.py (21889b), _meta.json (141b)\n\nArchive v1.0.8: 8 files, 17635 bytes\n\nFiles: config.json (130b), README.md (8086b), requirements.txt (44b), setup.sh (7888b), skill-card.md (2169b), SKILL.md (8073b), yolo_world_onnx.py (21889b), _meta.json (141b)\n\nArchive v1.0.7: 8 files, 15025 bytes\n\nFiles: config.json (65b), README.md (8086b), requirements.txt (44b), setup.sh (7888b), skill-card.md (2543b), SKILL.md (6093b), yolo_world_onnx.py (12381b), _meta.json (141b)","readmeExcerpt":"Skill: kami-package-detection Owner: 13681882136 Summary: A free skill by Kami SmartHome. Continuously monitors RTSP camera streams for packages, parcels, and bags using YOLO-World ONNX. Smart deduplication only triggers alerts when a genuinely new or moved package appears. Tags: latest:1.1.6 Version history: v1.1.6 | 2026-06-10T06:32:10.954Z | auto Version 1.1.6 - SKILL.md updated to require that the RTSP URL brand ","codeSnippets":[],"executableExamples":[],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\r\nname: kami-package-detection\r\ndescription: A free skill by Kami SmartHome. Continuously monitors RTSP camera streams for packages, parcels, and bags using YOLO-World ONNX. Smart deduplication only triggers alerts when a genuinely new or moved package appears.\r\nversion: 1.1.0\r\nauthor: kami-smarthome\r\ntags:\r\n  - smart-home\r\n  - kami\r\n  - home-assistant\r\n  - smarthome\r\n  - detect\r\n  - object-detection\r\n  - yolo\r\n  - package-detection\r\n  - parcel-detection\r\n  - iot\r\n  - camera\r\n  - rtsp\r\n  - onnx\r\n  - edge-ai\r\n  - delivery\r\n  - monitoring\r\n  - notification\r\ntriggers:\r\n  - smart home\r\n  - kami\r\n  - home assistant\r\n  - detect\r\n  - detect packages\r\n  - detect parcels\r\n  - kami package\r\n  - kami smart home\r\n  - home assistant package\r\n  - smart home delivery\r\n  - check doorstep\r\n  - delivery notification\r\n  - check for deliveries\r\n  - package detection\r\n  - is there a package\r\n  - monitor packages\r\n  - check camera for packages\r\n  - any deliveries at the door\r\n  - parcel alert\r\nmetadata:\r\n  openclaw:\r\n    requires:\r\n      bins:\r\n        - python3.10\r\n      hardware:\r\n        cpu: \"2+ cores (x86_64 / ARM64)\"\r\n        memory: \"2 GB+\"\r\n        storage: \"2 GB+\"\r\n        gpu: \"optional (speeds up ONNX inference)\"\r\n      network:\r\n        - \"RTSP camera access (LAN)\"\r\n        - \"Internet (KamiClaw API)\"\r\n      devices:\r\n        - \"RTSP IP camera\"\r\n    emoji: \"📦\"\r\n---\r\n\r\n# Kami Package Detection\r\n\r\n> Continuously monitors your camera and sends instant notifications when a new package arrives.\r\n\r\nContinuously monitors RTSP camera streams for packages, parcels, backpacks, and suitcases. People and handbags are recognized by the model but suppressed at the alert layer to cut down on false alarms. When a **new** package is detected (position/size significantly different from the last alert), sends push notifications. Static frames are automatically skipped to save compute.\r\n\r\n### Features\r\n\r\n- 📦 Continuous package & parcel monitoring (not one-shot)\r\n- 🔔 Push notifications via Feishu / Telegram / Discord\r\n- 🧠 Smart deduplication — only alerts for new or moved packages (IoU + area change), with a **24-hour tracking window** to silence repeated alerts on the same parcel\r\n- ⚡ Static frame filtering — skips inference when camera scene is unchanged\r\n- 📷 Multi-camera support with independent background processes\r\n- 🧳 Suitcase / backpack recognition\r\n- 🏠 Doorstep & reception monitoring\r\n\r\n### Scenarios\r\n\r\n- Doorstep delivery waiting\r\n- Office reception package management\r\n- Warehouse cargo monitoring\r\n- Temporary item watch\r\n\r\n## Installation\r\n\r\n```bash\r\nbash setup.sh\r\n```\r\n\r\nCreates `.venv/` and installs `onnxruntime`, `opencv-python-headless`, `numpy`, `requests`. Idempotent.\r\n\r\n## Prerequisites\r\n\r\n- `python3` and `python3-venv` installed\r\n- RTSP camera(s) online and reachable\r\n- Internet access on first run (to download `yolov8s-worldv2.pt` if not bundled)\r\n\r\n### Model\r\n\r\nThe `yolov8s-worldv2.onnx` model file is auto-prepared by `setup.sh` using a download-f"},{"path":"README.md","content":"# 📦 Kami Package Detection\r\n\r\n> A free skill by **Kami SmartHome** — get notified the moment a package arrives at your door.\r\n\r\nMonitor your RTSP camera feed for packages, parcels, backpacks, and suitcases using YOLOv8-World ONNX inference. People and handbags are recognized by the model but suppressed at the alert layer (so a person carrying their bag past the door does **not** trigger an alarm). When a delivery target is detected, outputs the object class and bounding box as structured JSON to stdout.\r\n\r\n### Features\r\n\r\n- 📦 Package & parcel detection\r\n- 🧳 Suitcase / backpack recognition\r\n- 🏠 Doorstep & reception monitoring\r\n- ⏱ Configurable detection duration\r\n- 🔔 JSON output for easy integration\r\n- 🖥 CPU-only inference via `onnxruntime` — no GPU required\r\n- 🐍 Isolated `.venv` — zero impact on system Python\r\n\r\n### Scenarios\r\n\r\n- Doorstep delivery waiting\r\n- Office reception package management\r\n- Warehouse cargo monitoring\r\n- Temporary item watch\r\n\r\n## Quick Start\r\n\r\n```bash\r\n# 1. Run setup (one-time)\r\nbash setup.sh\r\n\r\n# 2. Place your ONNX model file\r\ncp /path/to/yolov8s-worldv2.onnx .\r\n\r\n# 3a. Foreground single-run (exits on first detection or timeout)\r\n.venv/bin/python yolo_world_onnx.py \\\r\n  --rtsp_url rtsp://192.168.1.100/live/camera01 \\\r\n  --conf_threshold 0.25 \\\r\n  --class_names parcel package \"delivery box\" person \"Cardboard box\" \"Packaging Box\" backpack handbag suitcase \\\r\n  --run_time 120\r\n\r\n# 3b. Background daemon for one or more cameras (uses config.json)\r\n.venv/bin/python yolo_world_onnx.py --start-detect\r\n.venv/bin/python yolo_world_onnx.py --status\r\n.venv/bin/python yolo_world_onnx.py --stop-detect\r\n```\r\n\r\n## Installation\r\n\r\n```bash\r\nbash setup.sh\r\n```\r\n\r\nThe setup script automatically:\r\n1. Detects system Python (`python3` or `python`), exits with error if not found\r\n2. Creates an isolated virtual environment at `.venv/`\r\n3. Installs Python dependencies from `requirements.txt`\r\n\r\n> Idempotent — safe to run multiple times. Won't reinstall existing dependencies.\r\n\r\n### Requirements\r\n\r\n| Dependency | Version | Purpose |\r\n|------------|---------|---------|\r\n| `onnxruntime` | latest | ONNX model inference engine |\r\n| `opencv-python-headless` | latest | Video capture and image processing |\r\n| `numpy` | latest | Array operations |\r\n\r\n### System Prerequisites\r\n\r\n- **Python 3.8+** and **python3-venv** (`sudo apt install python3 python3-venv`)\r\n- **ONNX model file**: `yolov8s-worldv2.onnx` in the skill directory\r\n- **RTSP camera**: online and network-reachable\r\n\r\n## Usage\r\n\r\n### Basic Detection\r\n\r\nParameters can be supplied via either `config.json` (recommended) or command-line flags. CLI flags > `config.json` > built-in defaults.\r\n\r\n```bash\r\n# Option 1: Edit config.json once, then just run\r\n.venv/bin/python yolo_world_onnx.py\r\n\r\n# Option 2: Override via CLI\r\n.venv/bin/python yolo_world_onnx.py \\\r\n  --rtsp_url rtsp://127.0.0.1/live/TNPUSAQ-757597-DRFMY \\\r\n  --conf_threshold 0.25 \\\r\n  --class_names parcel package \"delivery box\" person "},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7e9156e1awf00v1sas2wkdfd85a4zh\",\n  \"slug\": \"kami-package-detection\",\n  \"version\": \"1.1.6\",\n  \"publishedAt\": 1781073130954\n}"},{"path":"skill-card.md","content":"## Description: <br>\nKami Package Detection continuously monitors RTSP camera streams for packages, parcels, and bags with YOLO-World ONNX and alerts only when a new or moved package appears. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[13681882136](https://clawhub.ai/user/13681882136) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal users and smart-home operators use this skill to monitor configured RTSP camera feeds for package deliveries, doorway parcels, reception items, or warehouse cargo. The skill can run foreground checks or background monitoring and emits structured detection results for integration with notifications or other automations. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Continuous camera monitoring may process sensitive household, office, or warehouse footage. <br>\nMitigation: Use only cameras and locations where monitoring is authorized, keep RTSP access scoped to the intended device, and stop the background detector when monitoring is not needed. <br>\nRisk: Alert snapshots and logs can retain local paths, camera URLs, and image evidence after a detection. <br>\nMitigation: Restrict permissions on the skill directory, avoid embedding RTSP passwords in URLs where possible, and clear snapshots and logs on a regular schedule. <br>\nRisk: Notification integrations can send alert data and possibly snapshot images to external services. <br>\nMitigation: Configure Feishu, Telegram, or Discord credentials only when required, verify the destination channels, and remove unused webhook or bot tokens from config. <br>\nRisk: Setup downloads a model archive and may install additional packages during fallback export. <br>\nMitigation: Review installer behavior before execution, run setup in an isolated environment, and verify downloaded model files when operating in sensitive deployments. <br>\n\n\n## Reference(s): <br>\n- [ClawHub package page](https://clawhub.ai/13681882136/kami-package-detection) <br>\n- [Pre-built ONNX archive](https://publicfiles.xiaoyi.com/kami-package-detection.zip) <br>\n- [Kami skill privacy policy](https://kamiclaw-skill.kamihome.com/privacy) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, shell commands, configuration, code, JSON] <br>\n**Output Format:** [Markdown guidance with shell commands and JSON alarm output from the detection script] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Alarm JSON may include detected class, confidence, camera name, frame number, snapshot path, and bounding boxes; setup and runtime commands may create local files such as a virtual environment, model files, logs, and snapshots.] <br>\n\n## Skill Version(s): <br>\n1.1.6 (source: server release metadata; artifact frontmatter reports 1.1.0) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any gene"},{"path":"config.json","content":"{\n  \"cameras\": [\n    {\n      \"rtsp_url\": \"rtsp://admin:xxx@192.168.XXX/stream1\",\n      \"device_id\": \"camera1\"\n    },\n    {\n      \"rtsp_url\": \"rtsp://admin:xxx@192.168.xxx/stream1\",\n      \"device_id\": \"camera2\"\n    }\n  ],\n  \"conf_threshold\": 0.25,\n  \"run_time\": 0,\n  \"alarm_cooldown\": 60,\n  \"feishu_webhook_url\": \"\",\n  \"feishu_app_id\": \"\",\n  \"feishu_app_secret\": \"\",\n  \"telegram_bot_token\": \"\",\n  \"telegram_chat_id\": \"\",\n  \"discord_webhook_url\": \"\",\n  \"discord_bot_token\": \"\",\n  \"discord_channel_id\": \"\"\n}"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1919,"uniquenessScore":43,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T10:47:36.914Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-10T10:47:36.914Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T13:31:58.885Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}