Dahua VTO custom integration

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

@blademckain Thanks for examples. I will also prefer to have everything working in another component like amcrest, but some times it’s not possible. I was build this component because doesn’t found another way to solve my problem, but I will keep looking around and if I found better component I will inform everyone in this thread.

Sure, I will continue to support this component as long as users use it.

@pollinolas Audio from camera looks much more easier and I already checks if it’s can be implemented but for now without success.
I think using DHIP protocol it’s possible to instruct device to include audio stream inside video stream.

1 Like

I found integration which looks very good and growing very quickly Home Assistant Dahua Integration

I doesn’t check this yet but acording the code it’s can cover all things covered by this integration. If you will check this integration, please share your experience here, it’s will helps me and other users. :wink:

1 Like

Thanks @myhomeiot for your project - working perfectly on my VTO2202

I couldn’t get Dahua VTO to MQTT broker working (despite lots of other MQTT clients linked into HA), so your work helped a lot !

1 Like

Just found this plugin as I am looking for an offline doorbell. Have a few features and implementation I would like to do. Anyone able to answer some questions my ideas are possible with a Dahua doorbell and this integration?

  • Replacing my current doorbell/video intercom system.
  • Want it completely offline within my network
  • Use tablets in the house on walls with fully kiosk displaying home assistant.
  • Would like it to have an automation upon doorbell press that the tablets in the house switch to a specific lovelace interface
  • This lovelace iframe, dashboard, or whatever would have the live video feed AND call buttons at the bottom to initiate voice communication with the people at the doorbell similar to how the dahua app seems to work

Is this possible? I have seen several writeups about the video portion of the doorbell including the automation to popup the feed upon doorbell press but have not found any discussion regarding the audio/call functionality combined with the video outside of their app. Appreciate any assistance!