Imou Device Manage
List and manage Imou cloud devices: view device serial, model, online/offline status, device name, and channel info (channel ID, channel name); get details by device ID; rename device or channel.
Quick Start
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
appIdandappSecretfrom 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
appIdandappSecretfrom 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:
# List all devices (paginated)
python3 {baseDir}/scripts/device_manage.py list
# List with page size and page number
python3 {baseDir}/scripts/device_manage.py list --page-size 20 --page 1
# Get details for specific device(s) by serial
python3 {baseDir}/scripts/device_manage.py get DEVICE_SERIAL1 [DEVICE_SERIAL2 ...]
# Rename device or channel
python3 {baseDir}/scripts/device_manage.py rename DEVICE_SERIAL "New Name" [--channel-id CHANNEL_ID]
Capabilities
- List account devices: Paginated list of devices under the account (serial, model, online/offline, device name, channel list with channel ID and channel name).
- Get device by serial: Query one or more devices by serial number(s), returns full device and channel details.
- Rename device or channel: Set custom device name (or channel name when
--channel-idis provided).
Request Header
All requests to Imou Open API include the header Client-Type: OpenClaw for platform identification.
API References
| API | Doc |
|---|---|
| Dev spec | https://open.imou.com/document/pages/c20750/ |
| Get accessToken | https://open.imou.com/document/pages/fef620/ |
| List devices by page | https://open.imou.com/document/pages/683248/ |
| Get device by IDs | https://open.imou.com/document/pages/320fb7/ |
| Modify device/channel name | https://open.imou.com/document/pages/8ffaa3/ |
See references/imou-device-api.md for request/response formats.
Tips
- Token: Fetched automatically per run; valid 3 days. Do not cache across runs unless you implement expiry handling.
- Pagination: Use
--page-size(1–50) and--page(from 1) forlist. - Rename: Omit
--channel-idto set device name; for single-channel IPC, device name and channel name may be updated together per API behavior.
Data Outflow
| Data | Sent to | Purpose |
|---|---|---|
| appId, appSecret | Imou Open API | Obtain accessToken |
| accessToken, deviceId, etc. | Imou Open API | List/get device, modify name |
All requests go to the configured IMOU_BASE_URL (Imou official API). No other third parties.