Dahua VTO custom integration

I have it configured but I don’t know how to continue… I’ll settle for the door notifying me and being able to open it… but I’m lost where to put said code. Thk

alias: Dahua VTO Llaman a la puerta
description: “”
trigger:

  • platform: event
    event_type: dahua_vto
    event_data:
    Code: BackKeyLight
    condition:
  • condition: template
    value_template: “{{ trigger.event.data.Data.State | int in [0] }}”
    action:
  • choose:
    • conditions:
      • condition: template
        value_template: “{{ trigger.event.data.Data.State | int in [1, 2] }}”
        sequence:
      • service: notify.mobile_app_sm_g781b_j2g2
        data:
        message: Llaman a la puerta

yes, I also speak French

I’ll tell you what I have achieved… you are missing the port… port: 80 if you have updated the vto… from there you see the logs and you will see that it already connects and you will have a service called dahua_vto… but one once connected I don’t know where to put the code to, for example, open the door

Is it possible to turn on only the backlight of the call button? ( VTO2211G-WP)

No, Spanish

Hi,

it s good , i have events now :

event_type: dahua_vto
data:
  Action: Pulse
  Code: BackKeyLight
  Data:
    LocaleTime: "2024-02-26 10:44:25"
    State: 1
    UTC: 1708940665
  Index: -1
  entity_id: sensor.dahua_vto
origin: LOCAL
time_fired: "2024-02-26T09:44:51.886364+00:00"
context:
  id: 01HQJCV2DEWN08F2EPS1EPMRYV
  parent_id: null
  user_id: null

and i can send a remote service to Open :

now , i 'd like do an automation when doorbell is pressed but i doesn’t work with that :

- alias: Dahua VTO
  mode: queued
  trigger:
    - platform: event
      event_type: dahua_vto
      event_data:
        Code: BackKeyLight
  action:
    - choose:
        - conditions: >
            {{ trigger.event.data.Data.State | int in [0, 1, 2, 5, 6] }}
          sequence:
            - service: persistent_notification.create
              data:
                title: "{{ 'Doorbell Ring' if trigger.event.data.Data.State | int in [1, 2] else 'Doorbell No Ring' }}"
                message: "{{ trigger.event.data }}"
        - conditions: >
            {{ trigger.event.data.Data.State | int == 8 }}
          sequence:
            - service: timer.start
              data:
                entity_id: timer.door_lock
                duration: 00:00:02 # VTO Unlock Period
            - service: persistent_notification.create
              data:
                title: Unlock
                message: "{{ trigger.event.data }}"
        - conditions: >
            {{ trigger.event.data.Data.State | int == 9 }}
          sequence:
            - service: persistent_notification.create
              data:
                title: Unlock failed
                message: "{{ trigger.event.data }}"
        - conditions: >
            {{ trigger.event.data.Data.State | int == 11 }}
          sequence:
            - service: persistent_notification.create
              data:
                title: Device rebooted
                message: "{{ trigger.event.data }}"
      default:
        - service: persistent_notification.create
          data:
            title: "Unknown state {{ trigger.event.data.Data.State | int }}"
            message: "{{ trigger.event.data }}"

thx for you help

Minos

it works in a test automation with this code :

platform: event
event_type: dahua_vto
event_data:
  Action: Pulse
  Code: BackKeyLight

anybody had an automation with doorbell ring and lanch app for cam and button to open the door ?

Thx

Doorbell events should have State code 1 or 2, see here.
In your log here you can see this event Data.State == 1.

Don’t know what you mean under launch app but if you want to run android application you can check previous messages in this thread.

show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: dahua_vto.open_door
service_data:
timeout: 5
short_number: HA
entity_id: sensor.dahua_vto
channel: 1
name: Abrir Puerta
icon: mdi:door

I already have the automation to knock on the door and be able to open it, I am missing the most complicated part of being able to talk to the person who knocks… but I think that yes is required and that’s where I get a little lost. Thk

Dear Group,
I would like to know what I am doing wrong, I just want to receive an alert in HA every time they press the bell button.

The configuration I have added to the configuration.yaml is as follows:

- platform: dahua_vto
  name: portero-exterior
  host: 192.168.1.53
  timeout: 10
  port: 5000
  username: admin
  password: MyPassword
  scan_interval: 60

Once integrated in HA it shows me the following entities:

But when I press the video intercom buzzer button, no entity responds.

I think it is because it does not show me a sensor called “sensor.dahua_vto” or in my case “sensor.portero-exterior”.

Any ideas?
Thanks

Thanks for creating this integration. I was able to get it working without too much effort.

Just to confirm, it looks like this integration polls the VTO to learn about state changes (e.g. doorbell button), and it’s not an asynchronous solution, correct?

Background is that I am considering the MQTT path because it appears to be truly async, but there’s a bit more to that including running a docker container…

Thanks and I’ve got the MQTT approach going. I like the way it’s asynchronous and think it’s a better design albeit a bit harder to set up for non tech folk.

I just wanted to confirm that the add-on that is the subject of this thread indeed polls the device to determine state.

Dahua VTO to MQTT Broker and this integration use exactly same (asynchronous) way to work with VTOs, subscribe and listen for events, just this integration can work only with Home Assistant but doesn’t requires MQTT and installation in docker container.

Yes, you should have sensor.portero_exterior. You should see some messages connected to this integration in Home Assistant log.

Hello, thanks for your answer.

Home Assistant Core
No issues found for search term ' sensor.portero_exterior'

You should search log for integration name Dahua. You can also turn on the integration debug logging.

Is there any news on this?

For two way audio, lets ask @dice he has something working.

Thanks.
The device is PoE, 1080P, HD, VTO2201F-P
The log says:

Logger: custom_components.dahua_vto.sensor
Source: custom_components/dahua_vto/sensor.py:339
Integration: Dahua VTO (documentation, issues)
First occurred: 12:31:40 PM (3818 occurrences)
Last logged: 11:07:55 PM

portero-exterior: [Errno 111] Connect call failed ('192.168.1.53', 5000), retry in 10 seconds