The video doorbell that does Home Assistant + NVR

I have been searching for a while to replace my current video doorbell solution. Integration with Home Assistant and my NVR software where key in this search. Things like ethernet and POE would be a great bonus. I think I’ve found it so let’s take a look!

Information Article

This will be an information article to go with my videos about the doorbell. Especially during later steps like integrating the doorbell into Home Assistant a dedicated post is much more convenient then trying to cram it into the video description!

Shopping links

❕ All below links can be affiliate links which provide me with a small kickback in case you purchase something. If you use them, thank you very much! πŸ˜€ ❕

🌟 Dahua Doorbell Kit (Dahua KTP01(S))
πŸ‘‰ https://geni.us/gLLYJ
πŸ‘‰ https://s.click.aliexpress.com/e/_9ypM72 (Different shop)

πŸ”” Dahua 2MP VTO2202F-P Outdoor Doorbell station POE [ The outdoor unit! ]
πŸ‘‰ https://geni.us/K08YGmP
πŸ‘‰ https://s.click.aliexpress.com/e/_An3Tq8 (Different shop)

πŸ”” Alternative models (much less wide) (I did not test these myself, but manual shows the same functionality)
πŸ‘‰ Dahua VTO2101E-P-S1: https://geni.us/En41z
πŸ‘‰ Dahua VTO2111D-P-S2: https://geni.us/z0rQv

🌟 Cheap indoor Dahua VTH2421FW-P monitor system screen POE
πŸ‘‰ https://geni.us/FGy4R

🌟 WiFi indoor Dahua VTH5221DW-S2 monitor system screen POE
πŸ‘‰ https://geni.us/3z9BAD6

🌟 Hikvision POE switch
πŸ‘‰ https://geni.us/qlKZTFF

🌟 Ezviz doorbell
πŸ‘‰ https://geni.us/v4HM

🌟 Sonoff Relay with Controller built-in (easy to link to Home Assistant)
πŸ‘‰ https://geni.us/9bWoMP8

🌟 Optocoupled relay modules
πŸ‘‰ https://geni.us/dRYwMJK

🌟 ESP32 development board
πŸ‘‰ http://geni.us/4OZdAj
or
πŸ‘‰ https://geni.us/9aXV

🌟 Dupont cables
πŸ‘‰ https://s.click.aliexpress.com/e/_97BfE4

🌟 Cheap phonecharger
πŸ‘‰ https://geni.us/TiSqB

Videos

1st video – Finally one that does EVERYTHING

This video is about the doorbell itself including everything that you need to hook it up. We also take a quick look at the screens and such which are optional extras.

2nd video – Basic hardware & software install

In this video we go through the basic install of installing the doorbell to the outside of the house. We also run through everything you need to change if you want to reset the doorbell to it’s default configuration values. This isn’t necessary to use it but can come in handy if you want to change certain values.

3rd video – Linking to Home Assistant

In this video I guide you through getting the doorbell setup in Home Assistant and making a few easy automation’s with it!

Text info

In the 3rd video I show some code which can be useful to look over and copy so here is it again in text form!

🚨update🚨

The Home Assistant repository is gone, but there is a backup copy here: https://github.com/intermittech/hassio-addons

There is also another way to install the add-on and that’s using the direct Docker image. Reese made a really nice video about it, check it out here: https://youtu.be/-oOP38KpvfE

*In the below example you see me using the “!secret” a lot. This is a method to store username and passwords centrally in a “secrets” file and you can then call upon that all over Home Assistant, read more about it here.

MQTT Configuration

logins:
  - username: '!secret mqtt_user'
    password: '!secret mqtt_pass'
anonymous: false
customize:
  active: false
  folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false

Dahua VTO2MQTT Add-on

Repository: https://github.com/elad-bar/Hassio-addons

intercom:
  host: '!secret dahuavto_ip'
  username: '!secret dahuavto_user'
  password: '!secret dahuavto_pass'
mqtt:
  host: '!secret ha_ip'
  port: '1883'
  username: '!secret mqtt_user'
  password: '!secret mqtt_pass'
  topic_prefix: DahuaVTO

Home Assistant Configuration.yaml file

binary_sensor:
  - platform: mqtt
    name: "Doorbell Button State"
    state_topic: 'DahuaVTO/BackKeyLight/Event'
    value_template: '{{ value_json.Data.State }}'
    payload_on: "1"
    payload_off: "0"

Home Assistant Automations

Please see for editor form in the video, below is the text output of those

Doorbell – Ring Chime
- id: 'xxxxxxxxxxxxxx'
  alias: Doorbell - Ring Chime
  description: ''
  trigger:
  - entity_id: binary_sensor.doorbell_button_state
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - device_id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    domain: switch
    entity_id: switch.doorbell_chime
    type: turn_on
  mode: single
Doorbell – Blink Lights
- id: 'xxxxxxxxxxxxxxxx'
  alias: Doorbell - Blink lights
  description: ''
  trigger:
  - entity_id: binary_sensor.doorbell_button_state
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      scene_id: wled_no_doorbell
      snapshot_entities: light.wled
    service: scene.create
  - device_id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    domain: light
    entity_id: light.wled
    type: turn_off
  - delay: '1'
  - scene: scene.wled_light_solid_red
  - delay: '5'
  - device_id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    domain: light
    entity_id: light.wled
    type: turn_off
  - delay: '1'
  - scene: scene.wled_no_doorbell
  mode: single

Conclusion

This article will get updated over time as I release more videos. Comments and questions are welcome here or in the video description per video topic!

13 thoughts on “The video doorbell that does Home Assistant + NVR”

  1. I would like to ask a question. If the internet connection is absent, is the command carried out anyway? example: sound on the video door phone, the internet connection is absent at that moment but the Raspberry is on. the automation (for example turning on a light bulb) still successful? or is the internet essential?

  2. Hey Andries,
    thank you for this blog and especially for this series of explanations ! It helped me to finally find the right doorbell solution that integrates perfectly with HA.
    As I would like to use the second door opener of the VTO2202 aswell, do you have an idea how to do that without additional hardware? I only get an immediat error message that opening failed. A simple MQTT message would be ok for me as I never would physically put the switch for a door outside of my house. Use Case: when away from home, open the garage door for DHL shipments πŸ™‚
    Hope you have an idea!
    Thank you,
    Herwig

    1. Hi Herwig,
      that is exactly what I am trying to achieve. I just don’t care about that little piece of additional hardware.
      I am going to get the Dahua DEE1010B Access Control Extension Module for about 30€.
      Best wishes,
      Stefan

  3. I am a beginner at all of this. I was wondering if also could link it to smartthings and have the same features as on the home assistant. If it is possible can somebody help me with that? Thanks in advance

  4. Dear sir,
    After seeing your video of the cable splitter. I bought the splitters via Amazon.

    I have one cable that I want to feed 2 cameras from a POE NVR. Once I try to connect the second camera end the end, the first camera stops working

      1. While rroller’s HACS component for dahua cams and vtos is astonishingly good at passing alerts and states, it’s not really good for video streams. There’s another HACS component bringing in WebRTC which allows fluent videos and nice real time audio in Home Assistant , check out
        https://github.com/AlexxIT/WebRTC

        1. Will using WebRTC with my Dahua VTO2202F Villa Station Doorbell result in a better image quality or audio than using plain RTSP via rroller’s HACS component, even if the Dahua, HA, and the display device are all on the same LAN?

          I am about to embark on a project to integrate the Dahua doorbell and a Reolink RLC-811A camera with Frigate and one of the facial recognition systems Frigate supports.

          My longer term goal is to turn the Dahua doorbell button into a door opener button when HA detects a friend’s phone logging into my WiFi and the facial recognition from first the Reolink and then the Dahua provide a match to a friend who is authorized to let themselves in the house. During certain times.

          Thanks,
          — Lucky

  5. Have you come across an integration that allows a visitor to simply hold up a personalized QR code to the camera to trigger the door opener?

    I have the door bell unit and the table top unit working and can let people in by pushing the door opener button by hand, but I have not yet made any attempts at integrating the Dahua units with Home Assistant or an NVR.

    To be fully useful, it would be ideal if the camera could be configured to run 27/7, which I suspect it can. I just haven’t gotten to that part yet.

    Thanks!

  6. Hi,

    Thanks ofr the videos. I’m looking for a doorbell which does it all but I feel something missing from the Dahua or at least from the Home Assistant app (or both).
    I would like to be able to answer the doorbell call from the Home Assistant mobile app.
    Did you dig in this direction ? Is there any mean to do so without using the Dahua app ?
    As you understood I’m dreaming of a no cloud doorbell wich I could answer from the mobile phone from anywhere (even if I’m not home) .
    My physical configuration is a fenced garden (yes in some countries people put fences around their garden), with an electrified door. I already have a two way audio traditional doorbell and a camera watching the gate from about 30 feet, so I have too options :
    – Adding an ESP to inform Home Assistant when the traditional button is pressed
    – Changing for the Dahua
    But the only benefit of a Dahua would be if I’d be able to answer the doorbell when I’m not home and would like that to be possible without a cloud service, and using only the Home Assistant mobile app (iOS in my case).

    Any idea ? Clue ?

    Thanks

    Vart

  7. what about controlling external keylock from outdoor unit via HAAS, did someone try that? (without additional cabling to server room)

Leave a Reply

Your email address will not be published. Required fields are marked *