Listens to events from Dahua VTO unit and publishes them via MQTT Message
DAHUA_VTO_HOST: Dahua VTO hostname or IP
DAHUA_VTO_USERNAME: Dahua VTO username to access (should be admin)
DAHUA_VTO_PASSWORD: Dahua VTO administrator password (same as accessing web management)
MQTT_BROKER_HOST: MQTT Broker hostname or IP
MQTT_BROKER_PORT: MQTT Broker port, default=1883
MQTT_BROKER_USERNAME: MQTT Broker username
MQTT_BROKER_PASSWORD: MQTT Broker password
MQTT_BROKER_TOPIC_PREFIX: MQTT Broker topic prefix, default=DahuaVTO
Requirements:
- All environment variables above
- PHP
php -f DahuaVTO.php
version: '2'
services:
dahuavto2mqtt:
image: "eladbar/dahuavto2mqtt:latest"
container_name: "dahuavto2mqtt"
hostname: "dahuavto2mqtt"
restart: always
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
- 2020-Oct-21 - Reverted connection to per message, docker based image changed to php:7.4.11-cli
- 2020-Oct-12 - Added deviceType and serialNumber to MQTT message's payload, Improved connection to one time instead of per message
- 2020-Sep-04 - Edit Readme file, Added Supported Models and MQTT Events documentation
- 2020-Mar-27 - Added new environment variable - MQTT_BROKER_TOPIC_PREFIX
- 2020-Feb-03 - Initial version combing the event listener with MQTT
All credits goes to @riogrande75 who wrote that complicated integration Original code can be found in @riogrande75/Dahua