Dahua VTO to MQTT Broker

v1.0.15 should support SSL, added ssl parameter to the intercom section, set it to true and it should work

Thank you @bar!
Cannot update to v1.0.15. Addon interface still says v1.0.14.

added the ssl: true parameter, but comm is not working:

2021-05-28 23:10:14,213 ERROR main Connection failed will try to connect in 30 seconds, error: [Errno 111] Connect call failed (‘180.180.180.22’, 5000), Line: 543

I had the same problem when fallowing this youtube video.

Its becous the “binary_sensor” is used twice and that doesn’t work.
But i still cant get the entity’s to show up in HA.

Perhaps that is off topic but I was wondering if it was possible to have a conversation between the person in front of the doorbell and the one receiving notification on a phone (either iOS or Android) and if so I would prefer getting this feature without Dahua’s cloud.

Thanks

V.

If your unit supports p2p, you can use easy viewer (android) to get the call and answer it, integration is just to get indication that something happened or to unlock the magnetic look

Hi @bar
Quick questions:

  1. Do I need to add DAHUA_VTO_SSL=True if the VTO web server uses SSL ?

  2. Can your script connect to a mqtt broker using TLS ? I’m getting

[Errno -2] Name does not resolve

If I try and pass mqtts://address.of.broker

If I try and just do address.of.broker, it tries to connect but the mqtt logs show

OpenSSL Error[0]: error:140260E5:SSL routines:ACCEPT_SR_CLNT_HELLO:ssl handshake failure

I’m using a Lets Encrypt cert, which most clients have no problems trusting.
A few mqtt clients I’ve found I need to pass the system’s /etc/ssl/certs/ca-certificates.crt to the client in order to get it to work…

Thinking about pulling the trigger on this one:

Does this support p2p and hence supported by easy viewer? And just as important does it play well with this great integration??!!

Many thanks

1 Like

Hoping someone can point me in the right direction. And sorry for being wordy but I don’t think this use cash has been discussed much in this thread yet…

I have no prior experience with Dahua… I bought a VTO3221E-P planning to use it as a video doorbell and for access control using the attached keypad/RFID reader. My first step was to attempt Asterisk integration. After getting the latest firmware from Dahua I was able to register to Asterisk and now have video calling working and can issue the unlock code from my softphone.

The next step is the access control… I’m aware of the http URL that can be used to open the door (tested and works) as well as the work done to allow issuing the open command via MQTT. My issue is that I want to enable use of the keypad/RFID.

There is a section in the web interface of the device (Access Control/Password Management) which does allow me to manually add door unlock codes which are tested and working. But I want to manage the codes remotely. Either handle authentication myself using dahuavtomqtt via NodeRed and/or a separate database (maybe Radius) or at least to be able to manipulate the locally programmed codes via API.

My challenges: The latest API doc that I can find is v2.76 which does have an Access Control section and does allow me to create and delete “Access Control Custom Passwords” via API. I can verify that it’s saving them via the corresponding Access Control Custom Password Find/Search/List API commands. The problem is, these passwords added via API don’t open the door… Nor do I see the locally administered passwords when listing the passwords via API. It seems as though the locally administered passwords and the passwords added via API are stored in separate areas of the config?

So… is anyone familiar with the access control aspects of these devices that knows how to add passwords via API that work to open the door? Maybe there are additional commands that I need to send to enable or disable certain access control methods that I’m just unaware of?

Or… I can forgo trying to set passwords on the device altogether if I could see the attempted password via dahuavtomqtt and then perform my own auth check and issue the door open command as needed. The trouble is, when entering a password I see the event in dahuavtomqtt but it doesn’t show me the password that was entered… If I use an RFID fob, it does show me the code of the fob so at least for RFID I could perform my own auth check…

Hopefully I can get help from the community and I’m happy to share anything I Iearn in parallel as well, maybe others have a similar use case (front gate of a small 6 apartment vacation rental complex) or will open doors (haha) to adapt to other use cases…

Thanks!

https://www.dahuasecurity.com/asset/upload/uploads/soft/20190428/VTO3221E-P_Datasheet_201903.pdf

hi there,
couple of days ago I got my Dahua doorcam/bell ( VTO2101E-P-S1 )
i have my HA on a rasp 4, MQTbrokker installed and the DahuaVTO2MQTT integration running.
I got the stream on a Lovelace card (not smooth) and a bunch of itentities,
yesterday when I pushed the doorbell button the “binary_sensor.6l08f06paj*****_button_pressed” changed state. so I could make a simpel automation.
today after installing everything at the front door the button doesn’t respond anymore.
no state change.
when I check “development tool” I see this:

verder log file:

Blockquote DahuaVTO2MQTT
[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] 00-banner.sh: executing…


Add-on: DahuaVTO2MQTT
Listens to events from Dahua VTO unit and publishes them via MQTT Message

Add-on version: 1.0.14
You are running the latest version of this add-on.
parse error: Expected string key before ‘:’ at line 1, column 4
[21:56:22] ERROR: Unknown HTTP error occured
System: (aarch64 / raspberrypi4-64)
Home Assistant Core: 2021.8.1
Home Assistant Supervisor: 2021.06.8

Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.

[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing…
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[21:56:25] INFO: @@@@@@@@@@@@@@@@
/usr/bin/curl
[21:56:25] INFO: @@@@@@@@@@@@@@@@
[21:56:25] INFO: FFS
[21:56:25] INFO: Staring Dahua to MQTT
2021-08-05 21:56:26,840 INFO main Connecting
2021-08-05 21:56:26,845 INFO main Initializing MQTT Broker
2021-08-05 21:56:26,846 INFO main MQTT Broker is trying to connect…
2021-08-05 21:56:26,851 INFO main MQTT Broker connected with result code 0
2021-08-05 21:56:26,945 INFO main Get access control configuration
2021-08-05 21:56:26,947 INFO main Get version
2021-08-05 21:56:26,948 INFO main Get serial number
2021-08-05 21:56:26,950 INFO main Get device type
2021-08-05 21:56:26,951 INFO main Attach event manager
2021-08-05 21:56:27,054 INFO main Serial Number: 6L08F0*****6755
2021-08-05 21:56:27,076 INFO main Device Type: VTO2101E
2021-08-05 21:56:27,125 INFO main Version: 4.400.0000000.3.R, Build Date: 2019-10-19
2021-08-05 21:56:27,136 INFO main Hold time: 15

Blockquote

Currently the integration is not supported for Raspberry PI, since I don’t own that device I cannot fix it

I have solution for dahua VTO - LOCK - UNLOCK status sensor
I have DHI-VTO 7541G with face recognition ant fingerprint.
I use relay Status sensor for home alarm system Disarm, then VTO Unlock door by face recognition or finger or other method
image
image

sensors:

  • platform: command_line
    name: VTO DOOR STATUS 1
    command: "/usr/bin/curl --digest --user admin:password http://192.168.0.250:8888/cgi-bin/accessControl.cgi?action=getDoorStatus&channel=1"
    scan_interval: 01

This command for status
http://192.168.0.250:8888/cgi-bin/accessControl.cgi?action=getDoorStatus&channel=1
This command for unlock door
http://192.168.0.250:8888/cgi-bin/accessControl.cgi?action=openDoor&channel=1

I have done it by creating a lock template that bases on the event from the dahuavto2mqtt + magnetic sensor

Hey guys,

I am planning on purchasing a VTO+VTH kit and i was wondering if the event that trigger the door opening is available over MQTT ?

The reason why i am asking is that my door isn’t wired to the VTO but can be controlled with HA.
I’d like to trigger the service that open the door on HA when the “Open door” button is pressed on VTH.

Thanks for your help,

Yes, the integration is to allow sending an mqtt message that will trigger opening the magnetic lock

Ok great, that means that i can grab this information and call an external service to open the door.
Thanks,

Once you have the unit, the dahuavto2mqtt will be the bridge, so when you will piblish the right mqtt message, the service will transform it to api call to the vto unit

You get an MQTT message like this which you can then create a sensor for in HA

2021-11-11 09:32:53,452 INFO __main__ Publishing MQTT message DahuaVTO/AccessControl/Event: {'Action': 'Pulse', 'Code': 'AccessControl', 'Data': {'CardNo': '', 'CardType': None, 'LocaleTime': '2021-11-11 09:32:52', 'Method': 4, 'Name': 'OpenDoor', 'Password': '', 'ReaderID': '1', 'RecNo': 11, 'SnapURL': '', 'Status': 0, 'Type': 'Entry', 'UTC': 1636587172.0, 'UserID': ''},

and this is the sensor i created from it.

  - platform: mqtt
    name: "Doorbell Unlock Signal"
    state_topic: "DahuaVTO/AccessControl/Event"
    value_template: "{{ value_json.Data.Status }}"
    payload_on: "1"
    off_delay: 15

That is the perfect answer i was expecting :slight_smile:

Thank you, i will try that as soon as i received my Kit.

@bar Are you still maintain official Docker image?

Yes, but it was moved from dockerhub to gitlab