🎁 Get the FREE AI Skills Starter GuideSubscribe →
BytesAgainBytesAgain
🦀 ClawHub

Imou Open Device Video

by @imou-openplatform

imou / Imou / 乐橙 / lechange 设备视频与录像技能。支持实时预览 live HLS、本地/云录像片段查询、录像回放 HLS。 Imou/Lechange device video skill for live HLS, local/cloud record clips, and playb...

Versionv1.0.1
💡 Examples

Install dependency:

pip install requests

Set environment variables (required):

export IMOU_APP_ID="your_app_id"
export IMOU_APP_SECRET="your_app_secret"
export IMOU_BASE_URL="your_base_url"

API Base URL (IMOU_BASE_URL) (required; no default—must be set explicitly):

  • Mainland China: Register a developer account at open.imou.com and use the base URL below. Get appId and appSecret from App Information.
  • Overseas: Register a developer account at open.imoulife.com and use the base URL for your data center (view in Console - Basic Information - My Information). Get appId and appSecret from App Information. See Development Specification.
  • | Region | Data Center | Base URL | |----------------|-----------------|----------| | Mainland China | — | https://openapi.lechange.cn | | Overseas | East Asia | https://openapi-sg.easy4ip.com:443 | | Overseas | Central Europe | https://openapi-fk.easy4ip.com:443 | | Overseas | Western America | https://openapi-or.easy4ip.com:443 |

    Run:

    # Get live HLS URL for a device channel (creates live if needed; if LV1001, fetches from live list)
    python3 {baseDir}/scripts/device_video.py live DEVICE_ID CHANNEL_ID [--stream-id 0|1]

    Get local or cloud record clips in a time range

    python3 {baseDir}/scripts/device_video.py record-clips DEVICE_ID CHANNEL_ID --begin "yyyy-MM-dd HH:mm:ss" --end "yyyy-MM-dd HH:mm:ss" [--local|--cloud] [--count 100] [--query-range 1-100]

    Get record playback HLS URL for a time range (local or cloud)

    python3 {baseDir}/scripts/device_video.py playback-hls DEVICE_ID CHANNEL_ID --begin "yyyy-MM-dd HH:mm:ss" --end "yyyy-MM-dd HH:mm:ss" --record-type localRecord|cloudRecord [--stream-id 0|1]

    📋 Tips & Best Practices

  • Token: Fetched automatically per run; valid 3 days.
  • Live: Use --stream-id 0 (main stream) or 1 (sub stream). If API returns LV1001, the script falls back to liveList to find the existing HLS for the same device/channel/streamId.
  • Record clips: --local uses queryLocalRecords (param count, max 100; some devices limit to 32). --cloud uses queryCloudRecords (param queryRange e.g. 1-100). Paginate by using the last clip’s endTime as next beginTime.
  • Playback HLS: Time format yyyy-MM-dd HH:mm:ss; no cross-day range. Record type localRecord or cloudRecord. Use the URL promptly; it expires.
  • View on ClawHub
    TERMINAL
    clawhub install imou-device-video

    🧪 Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    🔍 Can't find the right skill?

    Search 60,000+ AI agent skills — free, no login needed.

    Search Skills →