Dahua VTO custom integration

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

What do you want to achieve? I’ve added my VTH panel so I can control the Home Assistant alarm (Alarmo) from the VTH and vice versa. This is in no way connected to the VTO. (for me)

That is exactly what I am trying to do too.
Also using Alarmo integration.

I need to connect the VTO too, for checking the push button, unlock, …
That I should be able to find out.

Is there a way we can post a message to the VTH panel “Info” ?
image

Something like this, but the message comes from HA, instead of DSS Pro

Ah, then the last thing you need is an automation to sync the status of Alarmo with the VTH.

I’m using this: autmation.yaml · GitHub

I’ve integrated the VTO’s with another integration
Don’t know about the messages and I’m not familiar with DSS pro.

1 Like

If your VTO has functionality to publish messages (see section 5.6.1 Send Info) and it’s works, than you can send this messages using VTO API:

http://192.168.1.101/cgi-bin/recordUpdater.cgi?action=insert&name=Announcement&Content=stringData&ExpirTime=2024-03-09%2021:00:00&IssueTime=2024-03-09%2010:00:00&Title=Anounce1&User=101&State=0&ReadFlag=0

I think this is working for now.

When the VTH is armed, this is synchronised to my HA.

Also vice versa, when I arm from HA, the VTH is armed too.
I can check with this:

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

But my VTH alarm status is never updating.

Do we have a solution for this? the ‘hc’ or ‘o’ commands do not work for me.