Dahua VTO custom integration

Hi Mirum, welcome to the forum!

Is your code from a working automation?
I’m trying to use this but the CardNo condition seems to be wrong and throws an error.

Hello, I have the vto4202f-p-s2 two times in my home. How can I distinguish between both? I can see all events but they look completely similar… no device identifier.

This integration creates only one entity for both vtos :confused:

Do have any hint or idea for me?

Edit: found it out sorry just missed event.data.Data.entity_id which contains the identifier per vto added to the integration. With the event filter option of the event sensor Integration I can filter for “code: Back key light, entity_id: sensor.dahua_vto_xyz”

1 Like

hi. i have two VTO, in the same house, one for the external gate and one for the entrance door. the entrance door has a nuki lock, i created an automation to open the nuki when i press door unlock from VTH, and it works, the problem is that it opens the door even when i only have to unlock the external gate. What did i do wrong? how do i solve the problem? below is my automation:

alias: open door vth
description: “”
triggers:

  • event_type: dahua_vto
    event_data:
    …Code: BackKeyLight
    trigger: event

conditions:

  • condition: template
    value_template: “{{ trigger.event.data.Data.State | int == 8 }}”

actions:

  • action: button.press
    metadata: {}
    data: {}
    target:
    … entity_id: button.nuki_unlatch

mode: queued

Is this integration capable of using the motion detection from a doorbell?

The VTO3211D seems to have motion detection capabilities and I’m searching for a way to use it.

In the list of active listeners I see this

image
Does this imply that if I start to listen to ``dahua_vto```that I should see events when there is motion?

In the Nuki app you can configure what type of door you have. You muss choose the type right type of your door

Thanks for the reply, but I certainly didn’t know how to explain my problem well… don’t have the problem of integrating Nuki, that works, I have the problem that automation works both if I open VTO 1 lock (external gate) and if I open VTO 2 (entrance door) in fact to the automation that I created if from the vth monitor I open the external gate, in addition to the external gate it opens the front door with Nuki, in practice from the automation I should give the condition of the request to open only VTO 2 opens Nuki

Post your automation I Chech maybe I can help you

here is my automation

alias: open door vth
description: ""
triggers:
  - event_type: dahua_vto
    event_data:
      Code: BackKeyLight
    trigger: event
conditions:
  - condition: template
    value_template: "{{ trigger.event.data.Data.State | int == 8 }}"
actions:
  - action: button.press
    metadata: {}
    data: {}
    target:
      entity_id: button.nuki_unlatch
mode: queued

Go to the Nuki intégration in Home assistant et make an picture from the entity. I think your have put the false entrity in the action

the action is correct, the nuki works, the problem is that it opens the nuki both if I open vto0 and if I open vto1, instead the action should only be done if I open vto1

As described few posts earlier, each event has VTO entity id event.data.entity_id, so you just need to add this filter to your automation and specify VTO entity id from which you want Nuki to be opened:

alias: open door vth
description: ""
triggers:
  - event_type: dahua_vto
    event_data:
      Code: BackKeyLight
      entity_id: sensor.dahua_vto # <---
    trigger: event
conditions:
  - condition: template
    value_template: "{{ trigger.event.data.Data.State | int == 8 }}"
...

BTW you can also filter the simple conditions like {{ trigger.event.data.Data.State | int == 8 }}:

alias: open door vth
description: ""
triggers:
  - event_type: dahua_vto
    event_data:
      Code: BackKeyLight
      entity_id: sensor.dahua_vto # <---
      Data:
        State: 8 # <---
    trigger: event
...

Yes, just start to listen for dahua_vto event in Developer Tools -> Events section and see if you get motion detection events. VTO generate many system events so you will always see that event listening works.

You can also try to add the VTO camera using Home Assistant ONVIF integration, this integration can expose motion detection sensor as well.

1 Like

thanks for your help, now everything works perfectly. thanks

Hi, thanks for helping!

So I get to see events when ringing but not on motion.
I cannot find anything in the webUI regarding ONVIF and the manual has only a small section about changing the ONVIF password but I guess it’s because of a copy/paste error.

Do you have any configuration for motion in WebUI like sensitivity, etc?
Edit: You can also try this integration, maybe it’s shows you motion sensor.

1 Like

No, nothing there.

RE the other integration: does not support this model.
I have been looking for quite some time to start using frigate and finally started with it’s a way to solve this.

Hello. Thank you for the integration. Question: I have a VTO2111D and when I open the door from the DMSS app the intercom also plays a sound “the door is unlocked”. However, when I use the open_door action the door unlocks without any sound played. I tried

action: dahua_vto.send_command
data:
  entity_id: sensor.dahua_vto
  method: console.runCmd
  params: {'command': 'ps 0'}
  event: false

but no sound is played at all. Also tried 1/2/3/…

Tried help console command but no result seen in the event viewer

action: dahua_vto.send_command
data:
  entity_id: sensor.dahua_vto
  method: console.runCmd
  params:
    command: help
  event: false

Are my console commands ignored? Or is the ps console command only for VTH?

Any thoughts?

My VTO2111D (2020-03-11 V4.300.0000000.7.R) plays message The door is alarmed if door is opened from integration or DMSS application only if Unlock Sound enabled in Web UI:

VTO doesn’t have ps command (only VTH), I put list of VTH and VTO commands here maybe you found something useful.

Hello, can someone help me?
I’m using Home Assistant and would like to integrate my Dahua intercom system. My setup includes a VTO4201FB-P and I’m controlling two doors — the first door is directly connected to the VTO, and the second door is connected via the RS485 module.

What I’d like to achieve is the following:

  • When someone rings the intercom, Home Assistant should receive the call notification and display a live video feed from the door.
  • I should then have the option to open either Door 1 or Door 2 directly from Home Assistant.

Basically, I want to replicate the same functionality provided by the VTH indoor monitor, but through Home Assistant.