Skip to main content

Imou Life smart home integration, free and open source

Imou Life integration for Gladys Assistant

Imou cameras through the official Imou Open API: images, motion, people, doorbell, privacy mode.

Imou cameras and doorbells (Ranger, Cruiser, Bullet, Cell, Versa, doorbells…) in Gladys, through the official Imou Open API (open.imoulife.com): camera images, motion and person detection, doorbell rings, privacy mode, motion detection, floodlight, siren, pan and tilt, battery and SD card.

Developed without the hardware: feedback welcome. This integration was written from the Imou documentation and the open-source Imou libraries, without an Imou camera nor an Imou developer account at hand. If something does not work with your model, please open an issue: https://github.com/guim31/gladys-imou/issues

This integration is not affiliated with Imou or Dahua.

Requirements​

  • Gladys Assistant 5.1 or later (the pan/tilt arrows of the dashboard need Gladys 5.2).
  • Your cameras added to the Imou Life app.
  • A free Imou developer account, to get an AppId and an AppSecret:
    1. Go to open.imoulife.com and sign up with the same login as the Imou Life app (the cameras of that account are the ones Gladys sees).
    2. Open the console, My App → App Information, click Edit, fill in the requested fields and save.
    3. Copy the AppId and the AppSecret shown on that page.
  • Gladys needs Internet access: everything goes through the Imou cloud.

Configuration​

In Gladys, Integrations → Imou Life → Configuration:

SettingWhat it does
AppIdThe AppId of your developer application.
AppSecretIts AppSecret. It only signs the requests: never sent, never written to the logs.
Data centreWhere your Imou account lives: Europe (default), Asia-Pacific, Americas or China.
Alarm checkHow often the alarms of each camera are read (30 seconds to 10 minutes, 1 minute by default).
Camera imagesHow often a fresh picture of the mains-powered cameras is taken (15 minutes by default).
Allow turning surveillance offLets scenes and the widget switch motion detection off or turn privacy mode on. Off by default.
Allow the sirenAdds a siren switch to the cameras that have one. Off by default.
Language of the namesLanguage of the feature names and of the texts sent to scenes (French by default).

Then Test the connection: it tells how many cameras Imou returned and about how many calls a day your settings cost. The cameras appear in the Discovery tab: add the ones you want. Only the cameras added to Gladys are read.

Devices​

One Gladys device per camera (one per lens of a dual-lens camera or per channel of a recorder), identified by its Imou serial number. Each camera only gets the features it has:

FeatureWhat it shows
ImageThe last capture or alarm picture, shown by the camera box of the dashboard.
Pan and tiltArrows (and zoom) of the motorized cameras: each press is one short step, the camera stops by itself.
Motion1 for a minute after a detection (people included).
Person1 for a minute after the camera detected a person.
Doorbell ringDoorbells: 1 then 0 when someone rings.
Last event"Person · 18:32".
OnlineThe camera answers the Imou cloud. A battery camera asleep is online.
Motion detectionWhether motion detection is on. Read-only: see Scene actions.
Privacy modeWhether the lens is covered. Read-only: see Scene actions.
FloodlightThe floodlight of the cameras that have one: on/off from Gladys.
SirenOnly when Allow the siren is ticked.
BatteryBattery cameras, in %.
SD cardNormal, no card, formatting, error.
SD card sizeIn GB.
SD card free spaceIn GB (0 without a card).

Motion detection and Privacy mode are shown, never offered as switches: turning them off by mistake (a voice assistant, a "turn everything off" scene) would leave the house unwatched. They change through the scene actions and the widget.

Refresh and quota​

Gladys does not poll these cameras: the integration reads the Imou cloud on its own timers.

  • The device list (one call for all cameras) every 10 minutes: names, online state.
  • The alarms of each camera added to Gladys at the Alarm check interval: one call per camera.
  • Motion detection, privacy mode and floodlight every 30 minutes, battery and SD card every hour, and right after a command.
  • A capture of each mains-powered camera at the Camera images interval. Battery cameras are never woken up by this timer.

Every call counts in the quota of your Imou developer account. With the default settings a mains-powered camera costs about 1,700 calls a day (1,440 of them for the alarms): lower the Alarm check to save calls. Imou changes the limits of its free plan over time: check them under My Resources of the console. When Imou answers that the quota is used up, every read stops for an hour and the configuration page says so.

Widget​

Imou cameras shows the newest picture of the chosen cameras (all by default), one line per camera (privacy mode, last event, online, asleep or offline) and, when it shows a single camera, a New image button and the privacy mode: Resume watching always, Privacy mode only when Allow turning surveillance off is ticked, after a confirmation.

Scene triggers​

  • Motion detected by an Imou camera: every detection, people included. Filters: camera, what was detected (motion, person). Variables: camera name, what was detected.
  • Person detected by an Imou camera: the human detection of the camera saw someone. Variable: camera name.
  • Someone rang an Imou doorbell: filter: doorbell. Variable: doorbell name.

The camera image is updated before the trigger fires, so "send the camera image" sends the picture of the event. Events are read at the Alarm check interval: count up to that delay.

Scene actions​

  • Refresh an Imou camera image: a capture now.
  • Turn an Imou camera: one step left, right, up, down, zoom in or out.
  • Privacy mode of an Imou camera: on (lens covered) or off (camera watching). On needs Allow turning surveillance off.
  • Motion detection of an Imou camera: on or off. Off needs Allow turning surveillance off.

Scene examples​

  • When a Person detected by an Imou camera comes from the driveway camera at night: turn the outdoor lights on and send its image by message.
  • When Someone rang an Imou doorbell: send the doorbell image to the family and announce it on the speakers.
  • When the last person leaves home: Privacy mode of an Imou camera off for the indoor cameras; when someone comes back (and surveillance may be turned off): on.

Troubleshooting​

  • "Imou refused the AppId or the AppSecret": copy them again from My App, and check the Data centre of your account.
  • No camera found: the developer account must use the same login as the Imou Life app. Shared cameras show only when shared with control rights.
  • "Beyond the device limit of the free plan": Imou's free developer plan controls a limited number of devices. Keep the cameras you need on that account, or share the others to a second account with its own AppId.
  • Quota used up: lower the Alarm check and the Camera images intervals, or add fewer cameras.
  • No image: the camera is offline, asleep or in privacy mode. Some models encrypt their alarm pictures: the integration then takes a capture of mains-powered cameras instead.
  • Logs: Integrations → Imou Life → Logs. LOG_LEVEL=debug shows every read. The AppSecret, the AppId, the tokens and the picture addresses are never written.

Limits​

  • Cloud only: the Imou cloud and Internet access are needed. Imou cannot push events to Gladys (its push needs a public address): alarms are read every Alarm check, so a scene starts up to that delay after the event.
  • No live video: the dashboard shows the last picture.
  • Cameras of the newer Imou platform (shown as such by Test the connection) get the image, the alarms and the online state only.
  • Battery cameras are not captured on a timer (each capture would wake them up) and their SD card is not read.
  • The person detection, the doorbell and the abilities come from the Imou documentation, not from tests on real cameras: feedback welcome.
  • Developed without the hardware nor an Imou account; not affiliated with Imou or Dahua.

Configuration settings​

These are the settings Imou Life asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
Your Imou developer applicationsectionNoGladys reads your cameras through the official Imou Open API. Create a free developer account on open.imoulife.com with the login of the Imou Life app, then copy the AppId and AppSecret of "My App".
AppIdstringYes"My App" page of the Imou developer console.
AppSecretsecretYesSigns the requests: it is never sent nor written to the logs.
Data centreselectNoWhere your Imou account lives. Europe for an account created in Europe.
Alarm checkselectNoHow often the alarms of each camera are read: one Imou call per camera each time, counted in the quota of your developer account.
Camera imagesselectNoHow often a fresh picture of the mains-powered cameras is taken: the camera box of the dashboard shows it. Battery cameras: only on alarm.
Allow turning surveillance offbooleanNoLets scenes and the widget switch motion detection off or turn privacy mode on. Off by default: an error would leave the house unwatched.
Allow the sirenbooleanNoAdds a siren switch to the cameras that have one. Off by default: a scene error would wake the neighbours.
Language of the namesselectNoLanguage of the feature names and of the texts sent to scenes. Names are set when a device is added.

How to install Imou Life in Gladys​

  1. In Gladys, open Integrations: Imou Life appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/guim31/gladys-imou:1.0.1), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/guim31/gladys-imou.

Imou Life requires Gladys >=5.1.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.

Not running Gladys yet? It is free and open source: follow the installation guide to get started.

About external integrations​

Imou Life is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by guim31, not by the Gladys core team.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂