ONVIF Doorbell - EZViz DB1/Hikvision DS-HD1

Like many people I’ve been trying to find a decent doorbell for inclusion into my homeassistant setup. I think I’ve finally found one. It’s still not perfect, but it’s sufficiently close that I think it’ll work.

It goes by a number of names:
Hikvision DS-HD1
RCA HSDB2A
EZVIz DB1
Laview LV-PDB1630-U
Nelly’s NSC-DB2
LTS LTH-7132-Wifi

Standout features:

  • Onvif/RTSP support
  • DUAL-BAND wifi
  • PIR Sensor
  • works with existing mechanical chimes
  • $110 CDN

A lot of information can be found here:

I have the EZviz DB1 version. Flashed to the Hikvision firmware for ONVIF support following instructions at the ipcamtalk link.
I’m strict anti-cloud-anything particularly for cameras, and this doorbell allowed me to use almost every feature without cloud. However there are a couple workarounds depending on your level of comfort that I’ll detail shortly.

Main thing is I now have this set up through Home Assistant as a generic ONVIF device, the PIR sensor is exposed as a binary_sensor, still_image_url and regular stream works, have actionable notifications set to go through my iOS Home Assistant app. There’s also a separate sensor for on-camera visual motion detection, but I usually avoid those to reduce false positives.

There are 2 features that do NOT work without connecting it online:

  1. Doorbell notification. This seems an obvious fail, but I think the workaround is sufficient. Pushing the button will only ring the internal and external chimes now, it doesn’t not appear to be exposed via ONVIF. However, you can tweak the PIR sensor sensitivity down low enough that it’ll trigger only when someone is close enough to the door to ring it. So my HASS will notify me regardless of whether someone has pushed the button or not; I’m ok with that compromise for now.
  2. Two-Way Audio: Through ONVIF you can hear everything on video, but I haven’t found a way to talk back yet

The other workaround with Ring notification is you can open up your firewall to allow it to talk to any external tcp port 31006 and connect it to whichever Hikvision/Guarding Vision/EZViz app of your choice, then it will work as a call…however my audio didn’t work, still investigating.

Of course, if you are ok with the cloud bits, then you those two problems go away.

Anyway, thought someone might be interested, this is the cheapest “mostly there” solution I’ve seen yet. I’d love to have had it POE and wired rather than Wifi, but it’s actually dual-band AC and that’s acceptable. You can even configure it to use WPA-Enterprise using the Hikvision configuration tools, but I’ve not tried it yet.

Can post the automations and such I’m using if anyone is interested, but it’s fairly standard since it’s exposed in a pretty standard way, and I thought that was the most important thing.

4 Likes

Have you seen this way of detecting the button pushes?

1 Like

I have been experimenting with something similar. I already have a firewall rule set up on my router to log when a request is made from the doorbell, and I can watch that and trigger an event on hass…but I haven’t gotten that far yet. I’m also tempted to capture the request directly and see if I can redirect it, but just haven’t had it long enough to do all that yet. I think it’s a solvable problem, but more convoluted than I’d like.

Hi, Can you share your configurations/automations for db1? Will they work with ezviz firmware or are they specific to hikvisions?
I’m quite new with HA and customizations so, anything you can share will probably be helpful.
Regards

1 Like

Can someone share a good configurations/automations for db1 or EZVIZ all?
Thanks!

Here’s a couple I’m using now. Could use some cleanup and optimizing but they work. They’re pretty general, the logic really isn’t tied specifically to the doorbell camera, can really work for ANY PIR sensor, just so happens that this is on the EZviz doorbell.

IOS Send Live view notification on PIR motion detection. Live video only works when I’m on my home network, so it doesn’t trigger if I’m not home.

automation:
  - alias: Notify - Porch Motion
    initial_state: on
    trigger:
      - platform: state
        to: 'on'
        entity_id:
          - binary_sensor.doorbell_pir_motion
    condition:
      - condition: state
        entity_id: binary_sensor.home_occupied
        state: "on"
    action:
      - service: notify.ALL_IOS
        data:
          message: Front Porch Live
          title: Motion Detected
          data:
            attachment:
              content-type: jpeg
            push:
              category: camera
              sound: "HummingbirdNotification_Haptic.caf"
            entity_id: camera.doorbell
      - service: automation.turn_off
        entity_id: automation.notify_porch_motion
      - delay: "00:01:00"
      - service: automation.turn_on
        entity_id: automation.notify_porch_motion

This one is for when I’m away from home, I take a snapshot and upload it to my backblaze b2 bucket, then since this link IS externally accessible I can view it from my phone anywhere.
The filename is somewhat randomized in order to prevent any brute force guesses viewing these snapshots.

  - alias: Porch Motion Detect - Take Snapshot
    initial_state: on
    trigger:
      - platform: state
        to: 'on'
        entity_id:
          - binary_sensor.doorbell_pir_motion
      - platform: state
        entity_id:
          - binary_sensor.front_door
        to: 'on'
    variables:
      filename: "doorbell-{{ states.sensor.snmp_cable_out.state }}-{{ now().strftime('%s') }}.jpg"
    action:
      - service: camera.snapshot
        data:
          entity_id: camera.doorbell
          filename: '/tmp/{{ filename }}'
      - service: shell_command.b2_upload
        data_template:
          filename: '{{ filename }}'
      - service: mqtt.publish
        data:
          topic: MQTTTOPIC/frontdoor/camera/last_capture
          payload_template: "{{ filename }}"
          retain: true

  - alias: Porch Motion Detect - Notify
    initial_state: on
    trigger:
      - platform: state
        entity_id:
          - sensor.lastcapture_front_door
    condition:
      - condition: state
        entity_id: binary_sensor.front_door
        state: "off"
    action:
      - service: notify.ALL_IOS
        data:
          message: Front Porch Snapshot
          title: Motion Detected - Snapshot
          data:
            attachment:
              url: "https://BACKBLAZEB2-PUBLIC-URL/file/BUCKET/{{ states('sensor.lastcapture_front_door') }}"
              hide-thumbnail: false
              content-type: jpeg
shell_command:
  b2_upload: b2 upload-file BUCKET /tmp/{{ filename }} {{ filename }}

with these doorbells you can already get the stream into home assistant right or record it with 3rd party software.

so when I want to trigger the doorbell button I just put this device: https://www.tindie.com/products/ErikLemcke/doorbell-modernizr-2/ between the wires to the Gong and Voila home assistant is triggered on button press correct?

Yes that should work!

Much information related to this Ezviz DB1 wifi doorbell can be found on this site: https://ipcamtalk.com/threads/new-rca-hsdb2a-3mp-doorbell-ip-camera.31601/page-101

I used the batch configuration tool and flashed the DB1 with hikvision firmware.

Once the camera did reset to factory firmware, I had to reset the connection, but wifi didn’t connect. I noticed a strange wifi network was available from the DB1. Using the batch config tool, I change the DB1 default wifi network name and password to match with the default Ezviz: Ezviz_CXXXX, password: CXXXX_ (or something similar). Only after setting this wifi network config, I could connect the device again into the ezviz app as this one expected this config during device connection. (the required network and password are shown in the Ezviz app during advanced device connection configuration).

I used this specific hikvision firmware as it allows you to enable Onvif protocol. Yet, I’m still using the Ezviz app on phone. The HA Ezviz HACS plugin didn’t work well for a while, so I used ONVIF for a long time, but now ezviz cloud is working very well, so Onvif and the specific firmware may no longer be needed.

In order to be able to cast the life stream onto a Google Nest Hub, I had to lower the resolution of the camer to 1024x… as the default of 2048x… was only shown rotated on the hub. But all of this can be configured with the Batch Config tool.

Within HA, I used Ezviz cloud HACS plugin to connect Ezviz, it creates many different entities and allows to control several setting of the DB1 (ir, light on bell, sound, etc). When the DB1 is connected, all functionalities as streaming and motion detection entities became available, as well as a HA alarm to arm and disarm DB1.

Config used in configuration.yml:

ezviz_cloud:
    cameras:
      CXXXXXXX:
        username: !secret ezviz_cam_username
        password: !secret ezviz_cam_password

Automation for motion detection:

  • id: ‘XXXXXX’
    alias: Motion detection Ezviz DB1
    description: ‘’
    trigger:
    • platform: state
      entity_id: binary_sensor.db1_cXXXXXX_motion_trigger
      to: ‘on’
      condition:
      action:
    • service: notify.notify
      data:
      message: motion detected
      mode: single

service to play camera stream on nest hub:

  - service: camera.play_stream
    data:
      media_player: media_player.hub
    entity_id: camera.cs_db1_XXXXXXXX_mainstream

service to record camera stream:

  - service: camera.record
    entity_id: camera.cs_db1_XXXXXXXX_mainstream
    data:
      duration: 30
      lookback: 5
      filename: /config/recordings/ezviz_{{ now().strftime("%Y%m%d-%H%M%S")
        }}.mp4

I did not want to use the cloud plugin as I wanted to keep everything local. The configuration I posted allows the camera/doorbell to work without any internet connectivity aside from the very initial setup to configure the wifi password, once that’s done everything is local-only.

Does the EZVIZ cloud hacs expose the door bell button also? will this work on the newer version of the camera the DBC1?

Sorry to bring up something so old but how did you get this working? I have a Hikvision camera with 2-way audio and cannot hear the audio from it at all in HA

no, so far didn’t find any integration that supported the door bell button / doorbell push. Only workaround if seen (not tested) is by checking DNS logs:
New RCA HSDB2A 3MP Doorbell IP Camera | Page 296 | IP Cam Talk as mentioned by DeMichell:

Hi,

Im a long time lurker on this post, eagerly waiting to see someone pop up with a solution to intercept the doorbell push in openhab.
Then i can use my google home speakers to play a sound when the doorbell has been pressed.
I just wanted to share my current workaround of doing this.

I have openhab running on a windows server. I installed the DNS services on my server en changed the DNS address on my Ezviz DB1 trough Batch Configuration to point to my DNS server.
I Enabled logging on my DNS server and it writes the log to c:\temp\log.txt I then have a powershell looping trough the log sending a http request to my openhab.
Here is an example of the DNS request that is been made everytime the doorbell is pressed:
12/11/2020 11:01:58 0C04 PACKET 00000231F06CBFF0 UDP Rcv 192.168.1.37 0030 Q [0001 D NOERROR] A (5)alarm(2)eu(2)s3(9)amazonaws(3)com(0)
Here is an example of how to use this trough powershell:

Get-Content -Path C:\temp\log.txt -Tail 3 -Wait | where { $_ -match “alarm” } |
ForEach-Object{
Write-Host “DOORBELL PRESSED”
}

In the example above the everytime a dns request in the log containts the word alarm, powershell will echo Doorbell Pressed.
You can switch this to a http request answering to a virtual switch in openhab. I hope to find a better solution in the future.

you may look into hikvision batch configuration tool to enable Onvif. Once Onvif is enabled, you can use Onvif default intergration in HA and get stream. WebRTC plugin can then also be used to get fast stream in browser.

I’ve got the cameras working in HA via ONVIF, didn’t need any config tool, but there is no audio stream coming into HA from what I can tell.

I tried to find out solution, how to catch button press, but i was unable to get it.
ONVIF does not seem to be sending button press info.
HOWEVER i’ve found workaround.
AC relay, power pack, and i’m gonna get some ESP to send signal via mqtt. Relay installed instead of mechanical chime will ‘catch’ signal when button is pressed, then other end of relay will close or open circuit, and that can be grabbed by any ESP with even tasmota and sent to HA or whatever. Ordered relay, i’ll try it in next few days, but it seems to be easy enough.

1 Like

please can you provide a tutorial ?

I’m looking for a doorbel, ezviz or amcrest.

Amcrest seems more simple to integrate, Ezviz seems more tricky, and i read that is cloud polling, not local like amcrest ?

EDIT: i bought from now an amcrest ad410, i’m waiting that arrive, i hope that is more simple to integrate, than ezviz

Another option to catch the ring button pressed might be to integrate a Shelly1. They describe on their shelly website a use case to get notified of dumb doorbell pressed, see also Make a dumb doorbell smart with Shelly 1.
But I didn’t try it yet myself.

Unfortunately I noticed that it does not always execute the DNS query, sometimes it doesn’t, probably there’s a local cache. When it does, the “alarm” string is always present. But it’s not reliable, so I don’t think it can be used as a good trigger.

Did you ever get this working? I am trying to go down this route, but cannot get the relay to change state. It’s always activated. I think I may need a resistor inline with the relay to simulate the mechanical chime.