Dahua VTO to MQTT Broker

DahuaVTO2MQTT

Listens to events from all Dahua devices - VTO, Camera, NVR unit and publishes them via MQTT Message

Change log

Dahua VTO MQTT Events - examples

How to install

Docker Compose

version: '3'
services:
  dahuavto2mqtt:
    image: "registry.gitlab.com/elad.bar/dahuavto2mqtt:latest"
    container_name: "dahuavto2mqtt"
    hostname: "dahuavto2mqtt"
    restart: "unless-stopped"
    environment:
      - DAHUA_VTO_HOST=vto-host
      - DAHUA_VTO_USERNAME=Username
      - DAHUA_VTO_PASSWORD=Password
      - MQTT_BROKER_HOST=mqtt-host
      - MQTT_BROKER_PORT=1883
      - MQTT_BROKER_USERNAME=Username
      - MQTT_BROKER_PASSWORD=Password 
      - MQTT_BROKER_TOPIC_PREFIX=DahuaVTO
      - MQTT_BROKER_CLIENT_ID=DahuaVTO2MQTT
      - DEBUG=False      

Image tags per architecture

latest: linux/amd64
arm32v7: linux/arm32/v7
arm64v8: linux/arm64/v8

Environment Variables

Variable Default Required Description
DAHUA_VTO_HOST - + Dahua VTO hostname or IP
DAHUA_VTO_USERNAME - + Dahua VTO user name
DAHUA_VTO_PASSWORD - + Dahua VTO password
MQTT_BROKER_HOST - + MQTT Broker hostname or IP
MQTT_BROKER_PORT - + MQTT Broker port
MQTT_BROKER_USERNAME - + MQTT Broker user name
MQTT_BROKER_PASSWORD - + MQTT Broker password
MQTT_BROKER_TOPIC_PREFIX DahuaVTO - Topic to publish messages
MQTT_BROKER_CLIENT_ID DahuaVTO2MQTT - MQTT Broker client ID
DEBUG False - Enable debug log messages

Commands

Open Door

By publishing MQTT message of {MQTT_BROKER_TOPIC_PREFIX}/Command/Open an HTTP request to the unit will be sent,
If the payload of the message is empty, default door to open is 1,
If unit supports more than 1 door, please add to the payload Door parameter with the number of the door

7 Likes

Hello, I tried it but when I put the configuration lines in the Yaml, and check it there is error,
is theere nothing missing at firt line to tell for witch it is like
dahua:

best regards

It works without YAML configuration, please add it through the integrations (Configuration -> Integrations)

I used this custom component, he work perfectly but when the bell rings "last Ring"marks two hours behind the current time.I checked all the time settings are correct. Also “last update” is correct.Do you have the solution to fix the problem?

1 Like

Are the HA and VTO unit timezones and time synced?

yes they synchronized, “last update” shows the correct time.

I will check it during the weekend

I added this through Configuration -> Integrations but then get “This integration has no devices”
Anything else I should configure?

No, it creates 2 binary sensors, you can see them in developer -> states

Will add them as entities soon

ok thanks,could a sensor be triggered when the bell is pressed?

That’s how it supposed to work (for me it works at home)

Can you please provide me TZ / DST settings of your VTO unit / HA?

Thanks

forgive me did not understand what you ask? were you talking to me?

ah ok ok do you want a timezone? ok ROME +1

1 Like

What kind of VTO does this work with?
I was looking into a 3211d and wondering if it would work for me using this integration.

@ghizmo82, I will try to reproduce it in my environment and will update

@danbutter, I have VTO1220BW

I will also add steps to check if your VTO unit support that integration during the weekend.

found the bug, I set the TZ to +2 with DST:
create_date_time = datetime.fromtimestamp(create_time - (3 * 60 * 60))

will fix it in few days, should be pretty simple

to check if your VTO unit supported by this component, please try to access the call log of the unit:
http://USERNAME:PASSWORD@IP/cgi-bin/recordFinder.cgi?action=find&name=VideoTalkLog

please post the result (private message),
If you got 404 page, it will not work

Updated the integration with the bug fix for the timezone, please let me know if it works for you

thanks

Added support for entities from integration section (Configuration -> Integrations)

ok i will try thanks