Ezviz Cloud with Video — live view for EZVIZ battery cameras & peepholes

Ezviz Cloud with Video — live view for EZVIZ battery cameras & peepholes

Hi everyone! :waving_hand:

I’m glad to share an integration I built for something that bugged me for a long time: EZVIZ battery cameras and peepholes work great in the EZVIZ phone app, but Home Assistant shows nothing. Those devices sleep and never open an RTSP port, so the usual local-address integrations have nothing to talk to.

Ezviz Cloud with Video talks to them the way the phone app does on mobile data — it asks the EZVIZ cloud to wake the camera, pulls the stream down (the VTM relay) and hands it to Home Assistant as a normal camera. You get a live view, a bundled Lovelace card, and the camera stays awake only while you’re actually watching.

It’s built on top of the built-in EZVIZ integration (a fork, so everything that one does still works), lives under its own domain ezviz_rtsp — so it sits next to the built-in one instead of replacing it — and draws on bvis’s ezviz-cloud-hass for the cloud live-view idea.

What it can do

  • :movie_camera: Live view of battery cameras and peepholes through the EZVIZ cloud — no RTSP needed
  • :high_voltage: Fast first frame: the integration serves its own live MJPEG, with HLS as a fallback
  • :mushroom: A bundled Mushroom-style Lovelace card (play/stop chip in the corner, battery level, no Mushroom or other frontend dependency)
  • :battery: Battery-friendly by design: auto_play off by default, the stream stops when the card leaves the screen, plus a hard cap on how long one stream may run
  • :key: Verification codes for cameras with video encryption on (decrypted inside HA, never sent to a browser)
  • :link: Token-guarded MPEG-TS and MJPEG addresses for Frigate, go2rtc and friends — off by default, switch them on when you need them

Install
Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

Or add https://github.com/tarasifua/ezviz_rtsp as a custom repository in HACS
(category: Integration), then restart Home Assistant.

Would love your feedback and bug reports! :hot_beverage:

New version is ready!

  • SD-card recordings. The filmstrip button next to the battery level
    switches the EZVIZ Video card between the live view and one day of a
    camera’s SD-card recordings, newest first, with a month calendar for picking
    the day and the one you tap playing in the same media area. Behind it are
    three websocket commands (ezviz_rtsp/recordings,
    ezviz_rtsp/recording/days, ezviz_rtsp/recording/clip) and an
    authenticated MP4 view with range requests. A recording is fetched from the
    camera through the EZVIZ cloud only when it is tapped, saved as an MP4 under
    Home Assistant’s media folder (media/ezviz_rtsp/, browsable under Media →
    My media
    ), and served as the camera’s own HEVC to browsers that play it or
    as H.264 converted by Home Assistant to the rest. The current picture stays on
    screen until a recording is picked, and live video is stopped first, so the
    camera never streams and reads its SD card at the same time. A sleeping
    camera’s first SD search is retried once after 5 s (EZVIZ error 2009, as for
    capture_picture). See
    Recordings on the SD card.
  • A retention setting for downloaded recordings. Under Configure →
    Downloaded recordings
    you choose how many days those MP4s are kept
    (default 7, 0 keeps them). Older files are swept at start-up, once a day
    while Home Assistant runs, and whenever a new clip is downloaded.
  • Recordings are filed by day. Downloads are saved under
    media/ezviz_rtsp/<year>/<month>/<day>/ (Home Assistant’s local time), so the
    Media browser reads like a calendar. Retention removes the day folders it
    empties, and clips saved flat by an earlier version are moved into their day
    folders at start-up.
  • The latest recording on demand. The Download latest recording button
    and the ezviz_rtsp.download_recording service fetch a camera’s newest SD-card
    recording (today, or yesterday when today has none) into the media folder —
    the recording counterpart of capture_picture. A Latest recording sensor
    (sensor.<camera>_latest_recording) shows the file’s start time, path,
    interval and format.
  • show_battery on the video card (default true): set it to false to
    hide the camera’s charge, and the filmstrip button then sits alone in the
    corner.
  • hide_recordings on the video card (default false): hide the filmstrip
    button for a dashboard that should not offer the SD-card view.
  • save_recordings on the video card (default true): with false, a
    recording you watch is fetched into a temporary folder, deleted after about two
    hours and kept out of Media (no green check, no retention); a clip saved
    earlier still plays from its permanent copy.
  • A progress bar while a recording is fetched. The card asks the
    integration how much of the interval has arrived and shows a bar with
    “4 / 16 s”; the integration reads the video timestamps inside the camera’s
    MPEG-PS stream as it arrives, so the bar reflects the real transfer (one
    report serves every card waiting for the same clip). Conversion has no
    meaningful fraction: the bar fills and the card says “Converting the
    recording…”. The old spinner is gone.
  • A calendar for picking the day of the recordings. The card’s day arrows
    are gone: a calendar button opens a Monday-first month grid, and tapping a day
    loads its recordings. Future days are disabled and today is emphasised.
  • Dots on the days that have a recording. A green dot marks a day whose
    clips are already saved in the media folder — free to know and kept across
    restarts. Check the SD card for this month asks the camera about the month
    one day at a time and adds blue dots for days whose clips exist only on the
    card; the answer is cached in Home Assistant’s .storage (key
    ezviz_rtsp.recording_days, about a kilobyte per camera and month), so the
    dots survive a restart without waking the camera. A scan that reaches its time
    budget keeps the days found so far and can be run again; the picker says when
    the month was last checked and whether the check was complete.