bar
February 7, 2020, 1:58pm
1
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
riton27
(Vignon)
February 9, 2020, 4:31pm
2
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
bar
February 10, 2020, 4:42am
3
It works without YAML configuration, please add it through the integrations (Configuration -> Integrations)
ghizmo82
(Luigi Barbanelladocet Duchi)
February 10, 2020, 7:50pm
4
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
bar
February 10, 2020, 8:13pm
5
Are the HA and VTO unit timezones and time synced?
ghizmo82
(Luigi Barbanelladocet Duchi)
February 10, 2020, 8:35pm
6
yes they synchronized, “last update” shows the correct time.
bar
February 11, 2020, 4:38am
7
I will check it during the weekend
Xino
February 11, 2020, 2:52pm
8
I added this through Configuration -> Integrations but then get “This integration has no devices”
Anything else I should configure?
bar
February 11, 2020, 6:11pm
9
No, it creates 2 binary sensors, you can see them in developer -> states
Will add them as entities soon
ghizmo82
(Luigi Barbanelladocet Duchi)
February 12, 2020, 10:42am
10
ok thanks,could a sensor be triggered when the bell is pressed?
bar
February 12, 2020, 11:09am
11
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
ghizmo82
(Luigi Barbanelladocet Duchi)
February 12, 2020, 11:13am
12
forgive me did not understand what you ask? were you talking to me?
ghizmo82
(Luigi Barbanelladocet Duchi)
February 12, 2020, 11:19am
13
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.
bar
February 12, 2020, 3:20pm
15
@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.
bar
February 12, 2020, 3:24pm
16
ghizmo82:
ROME +1
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
bar
February 12, 2020, 8:12pm
17
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
bar
February 12, 2020, 8:28pm
18
Updated the integration with the bug fix for the timezone, please let me know if it works for you
thanks
bar
February 12, 2020, 9:06pm
19
Added support for entities from integration section (Configuration -> Integrations)