imou / Imou / 乐橙 / lechange 设备操控技能。支持 PTZ 云台控制、snapshot 抓图与下载。 Imou/Lechange device operation for PTZ control, snapshot capture, and image download. Use when...
Control Imou cloud devices: PTZ (pan-tilt-zoom) movement, device snapshot capture, and download snapshot image by URL.
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
# Device snapshot (returns downloadable URL; optional save to file)
python3 {baseDir}/scripts/device_operate.py snapshot DEVICE_SERIAL CHANNEL_ID [--save PATH]
# PTZ move (operation: 0-10, duration in ms)
python3 {baseDir}/scripts/device_operate.py ptz DEVICE_SERIAL CHANNEL_ID OPERATION DURATION_MS
--save.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/Device snapshot (enhanced)https://open.imou.com/document/pages/09fe83/PTZ move controlhttps://open.imou.com/document/pages/66c489/
See references/imou-operate-api.md for request/response formats.
DataSent toPurposeappId, appSecretImou Open APIObtain accessTokenaccessToken, deviceId, channelId, etc.Imou Open APISnapshot, PTZ control
All requests go to the configured IMOU_BASE_URL. No other third parties.