Dahua VTO custom integration

Hello,

i tried with VTO2111D and it’s working perfectly.

I have ASI12021E and BSC1221A that i tried but no luck…

Hello!
Seems automation “All Events” spamming the “SIPRegisterResult” event.
Is it normal?

ps. I have Dahua VTO 2202F-P and no VTH.

Yes, if you see SIPRegisterResult event every minute it’s normal.

Use “Dahua VTO All Events” automation only for debug purpose, when you will see all events which you needed, make automation which is process only specific event(s), for example look to “Dahua VTO” automation which process only events with code “BackKeyLight”.

Excelent!
Can you post here the links to ASI12021E and BSC1221A models. It’s a Dahua devices?

Sure, here are the links:

https://www.dahuasecurity.com/products/All-Products/Access-ControlTime-Attendance/Access-Control/Standalone/ASI1201E/ASI1201E-D

https://www.dahuasecurity.com/products/All-Products/Access-ControlTime-Attendance/Access-Control/Standalone/ASI1201A/ASI1201A-D

Thanks for information.

Looks like ASI12021E and BSC1221A models use DVRIP or 3DES protocol which not supported by integration (currently integration support only DHIP protocol).
You can test this devices using Dahua-JSON-Debug-Console-v2.py
If you will found that you can get all requared events (like doorbell) and open door, let’s me know I will look and think how to support DVRIP or 3DES protocols in the integration.

Usage example:

python3 Dahua-JSON-Debug-Console-v2.py --rhost 192.168.1.2 --proto dvrip --auth admin:pass

I am not sure how to test that.

If you can guide me, it would be perfect. I have 12devices here.

Download Dahua-JSON-Debug-Console-v2.py, run it using command (with your IP, user name and pass):

python3 Dahua-JSON-Debug-Console-v2.py --rhost 192.168.1.2 --proto dvrip --auth admin:pass

You will see if it’s connects and start monitoring events.
Type help, you will see all available commands, try door open command, etc.

Hello, Please help with the opening gate part .
It doesn’t open I must did somting wrong :confused:

alias: open door ?
description: ‘’
trigger:

  • platform: state
    entity_id: binary_sensor.driveway_person_motion
    to: ‘on’
    condition: []
    action:
  • service: notify.mobile_app_sm_a515f
    data:
    message: Aloha
    title: Deschide ?
    data:
    image: ‘http://****.net:5001/api/driveway/latest.jpg’
    actions:
    - action: URI
    title: open Camera
    uri: /lovelace/VTO
    - action: Open_Gate
    title: Open Gate
  • wait_for_trigger:
    • platform: event
      event_type: mobile_app_notification_action
      event_data:
      action: Open_Gate
      timeout: ‘00:00:02’
      continue_on_timeout: false
  • service: dahua_vto.open_door
    data:
    entity_id: sensor.dahua_vto
    channel: 1
    short_number: HA
  • service: notify.notify
    data:
    message: Gate Opened
    title: Alarm Notification
    mode: restart

First try to call dahua_vto.open_door service from Home Assistant → Developer Tools → Services and see if it’s open the gate. If it’s not open, play with channel, try 0, 2, 3, etc.
Only after you see that it’s opens the gate, debug your automation.

Is working from dev tools

If it’s works from dev tool, it’s should work from automation as well.

  • Try to use automation debugger
  • Make very small automation which is just open the gate on trigger and then add and test more things.
  • Check that you have right indentation:
- service: dahua_vto.open_door
  data:
    entity_id: sensor.dahua_vto
    channel: 1
    short_number: HA

from some release ago, the Amcrest component (Amcrest == Dahua) supports events.
therefore it is possible to see the events of any dahua camera using the Amcrest native component already included

Thank you for information sharing!

amcrest integration use Dahua HTTP API which works little bit different and usually slower (Dahua VTO integration use DHIP protocol, btw AmcrestViewerPro application use also DHIP like protocol at VTO tcp/37777) and as I tested it’s more complicated to unambiguously detect doorbell in events because it’s doesnt fire BackKeyLight events. If you have working example, please share it, this will be useful because events which comes to amcrest also come to this integration.

It’s also doesn’t work with VTO with https enabled and with not valid certificate and I doesn’t found service to sent OpenDoor command but this two things can be easily fixed.

in this link there are several examples of how to detect all the events of cameras( dahua and amcrest), and specifically also the events related to the doorbell

my suggestion is to modify the main amcrest component (rather than create other components) perhaps also inserting communication via DHIP protocol

hello, first of all thanks for sharing your work.
Now I am using the dahuavto2mqtt addon and in general I am happy with it, now, when adding the camera to HA I cannot integrate the audio, with this custom component it is possible to have audio in the transmissions or either?
regards

Dahua VTO is working perfectly for VTO2101E for me :+1: Thanks for an excellent job @myhomeiot

@meteonet Great! Thanks for feedback, I will add VTO2101 to list of supported devices.

Unfortunately no, this component use DHIP protocol which support only messaging with devices. Using this protocol it’s possible to get some data about audio and video streams but this streams should be processed using another protocols.

I will keep looking for works which done by another developers and when I see a way to support the two way audio I will try to implement it. For now, the only one working and accepted way which I know for two way audio it’s devices configured to work with external SIP server.

1 Like

thanks for the answer, it is good to know that but I was only asking about the audio from the camera, not bidirectional.
Greetings and thank you