Dahua VTO custom integration

Hi Guys, im looking at buying either the VTO2211 or VTO3211. Wondering which has better compatibility with HA and this addon for various functions like lock control/video/audio.

Also do others have any suggestions or preference between the 2?

It has to be POE powered and work standalone without an indoor screen

Just wanted to mention that I got this working with my Lorex 2k doorbell (so it should also work with the Amcrest and Dahua doorbells). I was already using DahuaVTO2MQTT to detect doorbell presses (which is all I needed it for), so when I found this integration, I figured I’d try it out.

Works perfectly:

trigger:
  - alias: When Lorex 2K Doorbell button pressed
    platform: event
    event_type: dahua_vto
    event_data:
      Code: PhoneCallDetect
      Action: Start

Since it just blindly parses all messages, I was able to use it for the PhoneCallDetect event which is triggered on button press.

This greatly simplifies my setup by eliminating the need for the docker container and monitoring it to ensure it’s working. I also really like how small and simple the code is… I don’t need video or anything else - literally bare bones just to get doorbell events, so this is perfect.

hello community, I have a VTO 4202f-p-s2 which has more bells ( buttons). How to automate so that a light bulb turns on at home after pressing a button number 3? Thank you!

Hi,
The connection to my doorbell is lost after a while, do you know how to restart it ?
Best regards,

It retries after a delay (timeout) of 10 seconds by default. It also tries to maintain a connection using a 60s keepalive (scan_interval). Both are configurable.

For those that may have a fully integrated doorbell like I do (Dahua ASI6214S-PW) and were unable to get it working with the custom VTO integration, after reading this thread and not seeing it, here is how I got the doorbell unlocking with home assistant:

Add the following shell command in your configuration.yaml file:

  unlock_door: 'curl --digest -u "username:password" "http://<device_ip>/cgi-bin/accessControl.cgi?action=openDoor&channel=1&UserID=<user_id>"'

Replace username, password, <device_ip> and ‘<user_id>’ with your actual credentials and device IP address.

Here my full post/explanation below if interested or if you have a similar device…

Dahua integrated doorbell and Home Assistant - Share your Projects! - Home Assistant Community (home-assistant.io)

You can try Dahua VTO All Events or Dahua VTO automation from readme and check if you get extra data for events where you pressed different buttons.

alias: Dahua bell
triggers:

  • event_type: dahua_vto
    event_data:
    Code: VideoTalkLog
    Action: Pulse
    trigger: event
    conditions:
  • condition: template
    value_template: “{{ trigger.event.data[‘Data’][‘LocalNumber’] == ‘2’ }}”
    enabled: true
    actions:

So everything works as you expected?

A few questions,
I have played around with many of my doorbell functions.
I have gotten it to flash some lights which is great.

Now I would like it to push me a notification to (telegram/pushover, etc) that the bell had been rung.

- alias: Dahua VTO Ring
  mode: queued
  trigger:
    - platform: event
      event_type: dahua_vto
      event_data:
        Code: BackKeyLight  
    - choose:
        - conditions: >
            {{ trigger.event.data.Data.State | int in [0, 1, 2, 5, 6] }}
          sequence:
            - service: homeassistant.turn_on
              entity_id: switch.kitchen_light_switch

can anyone tell me how to add a notify.xxx to this.

Also I would like a decent dmss app for android. Many I have tried I am not happy with.
Thanks

Simplest way would be to use the HA companion app and avoid having to mess with third party integrations. Once you have it set up, you would simply change your automation to this:

- alias: Dahua VTO Ring
  mode: queued
  trigger:
    - platform: event
      event_type: dahua_vto
      event_data:
        Code: BackKeyLight  
    - choose:
        - conditions: >
            {{ trigger.event.data.Data.State | int in [0, 1, 2, 5, 6] }}
          sequence:
            - service: homeassistant.turn_on
              entity_id: switch.kitchen_light_switch
            - service: notify.mobile_app_your_mobile
              data:
                message: Someone's at the door
                title: Ding Dong
                data:
                  color: blue
                  ttl: 0
                  priority: high

PS - You don’t need that choose part since you only have one condition.

1 Like

How were you able to find out the ‘secret’? Thank you!

Hi, please help me . I have a DHI-VTO2111D-P-S3.
It returns an error when I apply #Cancel TO Call

event_type: dahua_vto
data:
error:
code: 268959743
message: Unknown error! error code was not set in service!
result: false
method: console.runCmd
entity_id: sensor.dahua_vto
origin: LOCAL
time_fired: “2024-11-19T09:03:16.662282+00:00”
context:
id: 01JD1TJTNPNHPA0DHNG91NBDD5
parent_id: null
user_id: null

You are sure that VTO has call when you run Cancel VTO Call command? Do you have VTHs?

Hi there,

currently I got a VTO4202FB-P-S3 I have the integration installed and working I see the SIP registering events etc… but I cannot get any BackKeyLight events or cancel calls.

Currently I have 2 VTH’s .

Let me know how can I troubleshoot this.

Thank you

If you don’t have BackKeyLight events this mean’s you don’t have calls which you can cancel.
When you press button on VTO you have call on VTH’s and you can answer it or cancel from VTH?
In order understand what happens I need the debug log where you try to press call button on VTO, how to setup debug log you can read here.

You can also try this integration which works same way but has setup UI and see if you get door bell events.

Is there a way to set a Unique ID for the VTOs and VTHs? Right now I can’t edit them in HA UI (like editing the icon, name, zone)

I think it should be the integration that does this.

For now - no, but I will check what can be done.

@dreadino It’s was easy, I add it into 1.0.9

You can add it like for other integration:

  - platform: dahua_vto
    name: Dahua VTO
    unique_id: sensor.dahua_vto
    host: !secret vto_host
    username: !secret vto_username
    password: !secret vto_password
    scan_interval: 30
2 Likes

Hi, I am newish to doorbells an HA. I have a question regarding security. My old (very cheap CN) video doorbell had in the outdoor unit freely accessible relay to open the doorlock. It took me all of 5min to figure out how to make entry without credetials.
My question is, does the Dahua VTO in this integration have the possibility to send a command to HA opendoor and then HA sends a command to a different device to actually open door?
Even getting rfid code from card I think should be enough.
Also is the same possible to do with VTH?

I am also looking at Policetech doorbells, which from specs and UI pics look very simmilar. Does anybody have experiance integrating it in HA?

Thank you in advance