Dahua VTO custom integration

it works in a test automation with this code :

platform: event
event_type: dahua_vto
event_data:
  Action: Pulse
  Code: BackKeyLight

anybody had an automation with doorbell ring and lanch app for cam and button to open the door ?

Thx

Doorbell events should have State code 1 or 2, see here.
In your log here you can see this event Data.State == 1.

Don’t know what you mean under launch app but if you want to run android application you can check previous messages in this thread.

show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: dahua_vto.open_door
service_data:
timeout: 5
short_number: HA
entity_id: sensor.dahua_vto
channel: 1
name: Abrir Puerta
icon: mdi:door

I already have the automation to knock on the door and be able to open it, I am missing the most complicated part of being able to talk to the person who knocks… but I think that yes is required and that’s where I get a little lost. Thk

Dear Group,
I would like to know what I am doing wrong, I just want to receive an alert in HA every time they press the bell button.

The configuration I have added to the configuration.yaml is as follows:

- platform: dahua_vto
  name: portero-exterior
  host: 192.168.1.53
  timeout: 10
  port: 5000
  username: admin
  password: MyPassword
  scan_interval: 60

Once integrated in HA it shows me the following entities:

But when I press the video intercom buzzer button, no entity responds.

I think it is because it does not show me a sensor called “sensor.dahua_vto” or in my case “sensor.portero-exterior”.

Any ideas?
Thanks

Thanks for creating this integration. I was able to get it working without too much effort.

Just to confirm, it looks like this integration polls the VTO to learn about state changes (e.g. doorbell button), and it’s not an asynchronous solution, correct?

Background is that I am considering the MQTT path because it appears to be truly async, but there’s a bit more to that including running a docker container…

Thanks and I’ve got the MQTT approach going. I like the way it’s asynchronous and think it’s a better design albeit a bit harder to set up for non tech folk.

I just wanted to confirm that the add-on that is the subject of this thread indeed polls the device to determine state.

Dahua VTO to MQTT Broker and this integration use exactly same (asynchronous) way to work with VTOs, subscribe and listen for events, just this integration can work only with Home Assistant but doesn’t requires MQTT and installation in docker container.

Yes, you should have sensor.portero_exterior. You should see some messages connected to this integration in Home Assistant log.

Hello, thanks for your answer.

Home Assistant Core
No issues found for search term ' sensor.portero_exterior'

You should search log for integration name Dahua. You can also turn on the integration debug logging.

Is there any news on this?

For two way audio, lets ask @dice he has something working.

Thanks.
The device is PoE, 1080P, HD, VTO2201F-P
The log says:

Logger: custom_components.dahua_vto.sensor
Source: custom_components/dahua_vto/sensor.py:339
Integration: Dahua VTO (documentation, issues)
First occurred: 12:31:40 PM (3818 occurrences)
Last logged: 11:07:55 PM

portero-exterior: [Errno 111] Connect call failed ('192.168.1.53', 5000), retry in 10 seconds

Look like your device has different control port, usually it’s 5000 but sometimes can be 37777. You can try to configure your VTO in mobile application DMSS and check if it’s can connect and control your VTO.

Sure it’s can be wrong IP or something block connection to your device from Home Assistant.

Exactly the port was the 3777.
I changed that on the HA integration configuration.yaml config but nothing changes.

The DMSS sends me real time notifications without any problems.

Check Home Assistant log for the errors, the error is same Connect call failed? The port 3777 or 37777?

How did you get this working?

I’m always receiving the same message: AtHome

Whatever the state of the VTH alarm is…

The command I am using:

service: dahua_vto.send_command
data:
entity_id: sensor.dahua_vto
method: configManager.getConfig
params: {‘name’: ‘CommGlobal’}

I see your identity_id is sensor.dahua_vth

Should I add the VTH to my configuration.yaml too ?
At the moment I only have added the VTO.

I’ve added it to my configuration.yaml. Like this:

sensor:

  • platform: dahua_vto
    name: first_floor_monitor
    host: 192.168.1.22
    username: admin
    password: xxxxx ← this is the password of the device. Default its 123456 I think

Ok so I should add the VTO and the VTH in configuration.yaml ?

Like so

  • platform: dahua_vto
    name: Dahua VTO
    host: 192.168.XX.XX
    username: !secret dahua_username
    password: !secret dahua_password
    scan_interval: 5
  • platform: dahua_vto
    name: Dahua VTH
    host: 192.168.XX.XX
    username: !secret dahua_username
    password: !secret dahua_password
    scan_interval: 5