Skip to main content

EZVIZ smart home integration, free and open source

EZVIZ integration for Gladys Assistant

EZVIZ cameras and doorbells over the EZVIZ cloud: alarms, images, arming, privacy, siren.

Brings the EZVIZ cameras and doorbells of your EZVIZ account into Gladys, through the EZVIZ cloud (the one the EZVIZ app uses): the picture of each alarm, motion and person detections, doorbell rings, the arming mode of the account (at home, away, sleep), privacy mode, sleep mode, motion detection on/off, floodlight, siren, pan and tilt of motorized cameras, battery, Wi-Fi signal and SD card. No setting on the cameras, no open port: many EZVIZ cameras offer no ONVIF or RTSP without fiddling, the cloud covers them all.

Developed without the hardware: feedback welcome. This integration was written from the work of the Home Assistant ezviz integration and of the pyEzviz library, without an EZVIZ camera or account at hand. If something does not work as described, please open an issue on github.com/guim31/gladys-ezviz/issues with the integration logs (LOG_LEVEL=debug).

This integration is not affiliated with EZVIZ or Hikvision. EZVIZ is a trademark of Hangzhou EZVIZ Network Co., Ltd.

What you need​

  • An EZVIZ account (the e-mail or phone number and the password of the EZVIZ app) with your cameras in it. A second account with only the cameras you want in Gladys, shared from the app, is a good idea.
  • Gladys 5.1 or later, with Internet access.
  • Optional: the verification code of each camera (6 capital letters on the label under the camera, or on its box), to read the encrypted pictures and to get the RTSP address.

Set up​

Open Integrations → EZVIZ → Configuration, fill in the settings, save, then click Test the connection. Open the Discover tab and add the cameras and the "EZVIZ account" device.

Settings​

  • E-mail or phone number and Password: the login of the EZVIZ app. The password is sent only to the EZVIZ cloud, as a digest, as the app does; it is never written to the logs nor to the disk.
  • API server: leave the European server apiieu.ezvizlife.com: when your account lives in another region, EZVIZ says so at login and the integration follows it. Otherwise type the server of your region (apiius.ezvizlife.com for America, apirus.ezvizru.com for Russia) or its short code (us).
  • Camera verification codes (optional, the former way): SERIAL:CODE pairs separated by commas, for example BD1234567:ABCDEF, C78901234:GHIJKL, or one single code used for every camera. The simplest is the Set a camera verification code action, below. Several codes without a serial number, such as ABCDEF,GHIJKL, cannot be matched to the cameras: they are ignored, and the status of the integration lists your cameras with their serial numbers. A code is needed when a camera encrypts its pictures (the "image encryption" of the EZVIZ app, on by default on many models) and for the RTSP address.
  • Alarm check: how often the list of alarms is read (every 15, 30, 60 or 120 seconds; 30 by default). One request reads the alarms of every camera.
  • Camera images: how often a fresh picture of each camera on mains power is taken (every minute, every 5, 15 or 60 minutes, or only on alarm; 5 minutes by default). This is how fresh the camera on the dashboard is: Gladys shows the last picture the integration sent, and does not ask for a new one when you open it. Every minute costs one cloud request per camera and per minute. Battery cameras are never woken up by this timer: their image is the picture of their last alarm.
  • Allow arming from Gladys (on by default): the arming mode can be changed from the dashboard, the scenes and the widget. Untick to only show it.
  • Allow the siren (off by default): adds a siren switch to the cameras that have one. A siren sounds for a minute and wakes the neighbours: tick it only if you need it.
  • Language of the names: language of the feature names and of the texts sent to the scenes. Names are set when a device is added.

Two-step verification​

When the account has two-step verification, EZVIZ sends a code by e-mail or SMS at the first login, and the status of the integration says so. Open Enter the verification code, type the code and run the action: Gladys is connected. Run it with an empty code to receive a new one. The session is kept in the integration's own storage: no new code at the next restart. A code is asked again only if EZVIZ ends the session (password changed, Gladys removed from the trusted devices of the account).

Configuration actions​

  • Test the connection: logs in, reads the account and says how many cameras were found, and how many encrypt their pictures without a verification code in the configuration. After a refused password or a locked account, this is also how you ask the integration to try again.
  • Enter the verification code: see above.
  • Set a camera verification code: choose a camera (add it to Gladys first) and type the 6 capital letters of its label. The integration keeps the code (an empty code removes it) and checks it on the last picture of the camera when that one is encrypted. Once per camera.
  • Show the RTSP address: the local video address of a camera (see Live video).

The devices​

Cameras and doorbells​

One device per camera or doorbell, named as in the EZVIZ app, with the features the model has:

  • Image: the picture of the last alarm, then the captures of the timer (see Camera images): the camera on the dashboard shows the last of them, and Gladys hides a picture older than one hour. For live video, see Live video (RTSP).
  • Pan and tilt (motorized cameras): the arrows of the camera on the dashboard; each tap moves the camera one step.
  • Motion: 1 for a minute after a detection alarm (motion, person or another alarm of the camera), then 0.
  • Doorbell ring (doorbells): "Ringing" for a few seconds at each press. A camera EZVIZ does not class as a doorbell gets this feature at its first ring.
  • Last event: what and when, for example "Person · 18:32".
  • Online: whether the camera answers the EZVIZ cloud. A battery camera reads "off" while it sleeps: this is normal.
  • Motion detection: the alarm notifications of the camera on or off (the bell of the EZVIZ app).
  • Privacy mode: the lens cover of the models that have one.
  • Sleep mode: no video and no detection, on the models that announce it (the same switch as in the EZVIZ app). The pan/tilt models (C6N, C6CN…) may announce the Privacy mode above instead: the lens hidden. Each camera gets the switches it announces.
  • Floodlight: the light of the floodlight cameras.
  • Siren: only when allowed in the configuration; it stops by itself after a minute.
  • Battery: battery models, in %.
  • Wi-Fi signal: from 0 to 100.
  • SD card: Normal, No card, Error, Not formatted or Formatting.
  • SD card size: in GB (EZVIZ does not report the free space).

The account​

The EZVIZ account device carries the Arming mode of the account, as on the home page of the EZVIZ app: At home, Away or Sleep. What each mode does (which camera detects, sounds or notifies) is set in the EZVIZ app. Read-only when arming is not allowed in the configuration. It is one mode for the whole account, so for every camera: the EZVIZ app has no mode per camera.

Dashboard​

Add the camera devices to a room to see their image, arrows and switches, and the EZVIZ widget for a glance: the picture of the newest alarm, one line per camera (its last event, or whether it is online), the EZVIZ account mode, and three buttons to switch it (the current one shows a tick; "At home" asks for confirmation since it switches the detections off). Choose one or several cameras in the widget settings, or none for all of them. The buttons change the mode of the whole account, so of every camera, whatever the cameras shown. No button when arming is not allowed.

The widget names each camera as you named it in Gladys (the EZVIZ name until it is added). Gladys offers every device of the integration in the camera list of the widget, "EZVIZ account" included: that one is not a camera and is ignored.

When the widget shows one camera that can sleep, a button puts it to sleep or wakes it (its Sleep mode, else its Privacy mode), and its line reads "Asleep". With several cameras, there is no room for one button each: use the scene action Put an EZVIZ camera to sleep or wake it.

Scenes​

Triggers​

  • Detection by an EZVIZ camera: a new alarm of a camera. Filters: the camera, and what was detected — motion, person (when the camera tells them apart) or other alarm. Information passed to the actions: the camera name, the detection (code and name), the alarm text written by EZVIZ and its EZVIZ type. The camera image is already the picture of the alarm when the scene starts: "send the camera image" sends it.
  • Someone rang an EZVIZ doorbell: a doorbell was pressed. Filter: the doorbell. The camera image is the picture of the visitor.

The arrival of a new alarm already sets the Motion and Doorbell ring features: a trigger on these features works too. The triggers above add the kind of detection and the alarm picture.

Actions​

  • Take a fresh EZVIZ picture: asks a camera for a fresh picture and sends it to Gladys, for a "send the camera image" right after. It wakes a battery camera up: use it sparingly on those.
  • Turn an EZVIZ camera: one step left, right, up or down.
  • Set the EZVIZ arming mode: at home, away or sleep (when allowed in the configuration).
  • Put an EZVIZ camera to sleep or wake it: its Sleep mode, else its Privacy mode, asleep or awake.

Scene ideas​

  • Everybody left: when the last person leaves the house, Set the EZVIZ arming mode to away; when the first one comes back, to at home.
  • Visitor at the door: on Someone rang an EZVIZ doorbell, send the doorbell image on Telegram with "Someone is at the door".
  • Someone in the garden at night: on Detection by an EZVIZ camera, filtered on the garden camera and "person", between sunset and sunrise, turn the garden lights on and send the image.
  • Privacy at home: when someone comes home, Put an EZVIZ camera to sleep or wake it for each indoor camera, asleep; awake when the house is empty.

Live video (RTSP)​

The integration gives Gladys pictures, not a continuous video: they lag behind the camera by up to the capture interval (5 minutes by default). For live video, many EZVIZ cameras serve RTSP on the local network: enable it in the EZVIZ app when the model offers it (camera settings, "LAN live view" or "RTSP"), save the verification code of the camera with Set a camera verification code, then run Show the RTSP address: copy the address into the "RTSP camera" integration of Gladys. The address is rtsp://admin:<code>@<local IP>:554/Streaming/Channels/101 (102 for the lighter sub-stream). It contains the code of the camera: keep it private. Battery cameras and doorbells usually have no RTSP.

Refresh and limits of the cloud​

EZVIZ has no public API for its consumer accounts: the integration uses the private API of the EZVIZ apps, the one the Home Assistant ezviz integration has used for years. EZVIZ publishes no quota for it; the integration stays at the pace of Home Assistant or slower:

  • the alarms of every camera: one request every 30 seconds by default;
  • the devices and the arming mode: every 5 minutes, and right after a command;
  • the captures of the mains-powered cameras: every 5 minutes by default, one request per camera;
  • about 3,500 requests a day, plus 288 per mains-powered camera, with the default settings.

Expected delay for a detection or a ring: the time the camera takes to send its alarm to the EZVIZ cloud (a few seconds, more for a battery camera that wakes up), plus at most the alarm check interval — usually 5 to 40 seconds with the default 30 seconds. An alarm the cloud lists more than 10 minutes late is shown as the last event but starts no scene. Gladys is never asked to poll the devices: the integration refreshes them on its own timers.

Troubleshooting​

  • "EZVIZ refused the e-mail or the password": check them in the EZVIZ app, correct them in the configuration and save. The integration does not retry a refused password by itself (EZVIZ locks an account after several failures): saving or Test the connection tries again.
  • "EZVIZ locked the account": wait, or unlock it in the EZVIZ app (reset the password if needed), then Test the connection.
  • "EZVIZ sent a verification code": see Two-step verification.
  • No image, "the picture is encrypted": save the verification code of the camera with Set a camera verification code (or turn image encryption off in the EZVIZ app). Test the connection says how many cameras are concerned.
  • The image on the dashboard is several minutes old: it is the last capture, and Gladys does not ask for a new one when the dashboard opens. Lower Camera images (every minute at most), or use the RTSP address for live video.
  • The RTSP address shows the same code for two cameras, or the status says that codes are ignored: the codes were typed without their serial numbers. Save each one with Set a camera verification code, then empty the Camera verification codes field.
  • The image of a battery camera never changes: normal between alarms, the integration does not wake it up on a timer.
  • A detection does not start my scene: check the filter "what was detected". Some cameras report a person as a plain motion alarm. With LOG_LEVEL=debug, each alarm is logged with its EZVIZ type and text: please report them in an issue so the classification can improve.
  • The cloud does not answer: check the Internet access of Gladys. The integration retries by itself and says so once in the logs.

Limits​

  • Cloud only: no local control, and nothing works when the EZVIZ cloud or the Internet access is down (the RTSP video, served by the camera, still works).
  • An unofficial API: EZVIZ may change it without notice.
  • No continuous video inside the integration (see Live video), no two-way audio, no recordings.
  • EZVIZ smart plugs, bulbs, locks, alarm hubs and NVR base stations are not handled; only cameras and doorbells.
  • One arming mode for the whole account (the EZVIZ "default group").
  • The kind of an alarm (motion, person, doorbell) is read from the EZVIZ type codes known so far and from its English text: an unusual model may report "other alarm".
  • The free space of the SD card is not reported by the cloud.
  • One EZVIZ account per Gladys.

Configuration settings​

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

SettingTypeRequiredDescription
Your EZVIZ accountsectionNoThe account of the EZVIZ app. Gladys reads it through the EZVIZ cloud: the cameras need no setting. A shared account with only the cameras you want is a good idea.
E-mail or phone numberstringYesThe login of the EZVIZ app.
PasswordsecretYesSent to the EZVIZ cloud only, as the EZVIZ app does. Never written to the logs.
API serverstringNoLeave the European server: EZVIZ moves the login to the region of the account. Otherwise e.g. apiius.ezvizlife.com (America) or apirus.ezvizru.com (Russia).
Camera verification codessecretNoSimplest: the "Set a camera verification code" action, camera by camera. Here: SERIAL:CODE pairs separated by commas (serial and code are on the camera label), or one code for all.
Alarm checkselectNoHow often the alarm list of the EZVIZ cloud is read (one request for all cameras). Faster means more requests to EZVIZ.
Camera imagesselectNoHow often a fresh picture of the mains-powered cameras is taken: the camera box of the dashboard shows it. Alarms always send their picture; battery cameras only on alarm.
Allow arming from GladysbooleanNoThe arming mode (at home, away, sleep) can be changed from the dashboard, scenes and the widget. Untick to only show it.
Allow the sirenbooleanNoAdds a siren switch to the cameras that have one (it sounds for a minute). 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 EZVIZ in Gladys​

  1. In Gladys, open Integrations: EZVIZ 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-ezviz:1.2.0), 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-ezviz.

EZVIZ 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​

EZVIZ 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 🙂