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.
Install dependency:
bash
pip install requests
Set environment variables (required):
bash
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):
appId and appSecret from App Information.appId and appSecret from App Information. See Development Specification.RegionData CenterBase URLMainland China—https://openapi.lechange.cnOverseasEast Asiahttps://openapi-sg.easy4ip.com:443OverseasCentral Europehttps://openapi-fk.easy4ip.com:443OverseasWestern Americahttps://openapi-or.easy4ip.com:443
Run:
bash
# 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]
--channel-id is provided).All requests to Imou Open API include the header Client-Type: OpenClaw for platform identification.
APIDocDev spechttps://open.imou.com/document/pages/c20750/Get accessTokenhttps://open.imou.com/document/pages/fef620/List devices by pagehttps://open.imou.com/document/pages/683248/Get device by IDshttps://open.imou.com/document/pages/320fb7/Modify device/channel namehttps://open.imou.com/document/pages/8ffaa3/
See references/imou-device-api.md for request/response formats.
--page-size (1–50) and --page (from 1) for list.--channel-id to set device name; for single-channel IPC, device name and channel name may be updated together per API behavior.DataSent toPurposeappId, appSecretImou Open APIObtain accessTokenaccessToken, deviceId, etc.Imou Open APIList/get device, modify name
All requests go to the configured IMOU_BASE_URL (Imou official API). No other third parties.