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))
πŸ‘‰ (Different shop)

πŸ”” Dahua 2MP VTO2202F-P Outdoor Doorbell station POE [ The outdoor unit! ]
πŸ‘‰ (Different shop)

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

🌟 Cheap indoor Dahua VTH2421FW-P monitor system screen POE

🌟 WiFi indoor Dahua VTH5221DW-S2 monitor system screen POE

🌟 Hikvision POE switch

🌟 Ezviz doorbell

🌟 Sonoff Relay with Controller built-in (easy to link to Home Assistant)

🌟 Optocoupled relay modules

🌟 ESP32 development board

🌟 Dupont cables

🌟 Cheap phonecharger


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!


The Home Assistant repository is gone, but there is a backup copy here:

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:

*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

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

Dahua VTO2MQTT Add-on


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

Home Assistant Configuration.yaml file

  - 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: ''
  - entity_id: binary_sensor.doorbell_button_state
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  - 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: ''
  - entity_id: binary_sensor.doorbell_button_state
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  - 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


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!

15 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,

    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,

  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

        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.

          — 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.


  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 ?



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

  8. I want to glue a VTO2211G-P unit behind the (stainless steel) existing front of my door, which has an opening of 73x40mm.
    1) Looks like the camera sticks out from the surface a bit (no problem) and is about 40 mm in diameter (measuring from my screen as the drawing misses the dimension). Does anyone have the exact measure, is it bigger or smaller than 40 mm?

    2) Is there a connection for an external knob, I want to use an external already existing doorbell knob to control it.

  9. Home assistant configuration yaml needs some updating to account changes:

    – name: “name”
    state_topic: “DahuaVTO/BackKeyLight/Event”
    value_template: “{{ value_json.Data.State }}”
    payload_on: “1”
    payload_off: “0”

Leave a Reply

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