Dahua VTO custom integration

I have a Dahua VTO 2202F. Firstly thanks very much for this integration, it is awesome. On a side note I also have Go2RTC configured with 2 way audio via the WebRTC card, which is also works well for Dahua VTO.

On my VTO I have it connected to ‘unlock’ a motorised gate, with a magnetic reed switch to detect open/close status. I send door unlock via dry contact from the VTO to control the gate. Gate status is generally detected correctly, except when I initiate the unlock from the VTO (rather than the using the gate remote or open/close manually).

When I unlock from VTO (using DMSS or this integration) I see the following:

VTO control

  1. Action: Pulse BackKeyLight: 8 (door unlock) 15:05:58
  2. Action: Pulse DoorStatus Relay: true Status: Close 15:05:59
  3. Action: Pulse DoorStatus Relay: true Status: Close 15:06:12
  4. Action: Pulse DoorStatus Status: Close 15:06:12
  5. Action: Stop Code: AlarmLocal 15:06:12

When using manual control of the gate
Open

  1. Action: Pulse DoorStatus Status: Open 15:31:59
  2. Action: Start Code: AlarmLocal 15:31:59
    Close
  3. DoorStatus: Relay: true Status: Close 15:32:34
  4. DoorStatus: Status: Close 15:32:34
  5. Action: Stop Code: AlarmLocal 15:32:34

It seems that the required unlock period of the VTO sends the closed status despite the condition of the reed switch. I’m using this as an open/close function while the VTO was designed for unlocking. Does anyone have a suggestion on how I can configure the VTO or somehow probe the status of the door status from the VTO?

Do you have something like VTO2000A-X? Looks like Invite messages doesn’t have any information which you can use to differentiate the buttons. In your setup users has VTHs or VTO call directly to users SIP soft phones?

With VTHs you can try to configure this integration for every VTH and detect buttons pressed by events from VTH.
Without VTHs you can try to get call notification directly from SIP Server using something like this.
Hope this helps.

Hi dice, how have you reached the goal of having 2way audio working?
I’ve tried every guide I found on internet but never worked.
Maybe you found something new. In my setup I’ve already frigate with custom go2rtc component so I’m very curious about getting it working.

Hi All.

I am new with this integration.
I have installed it from HACS and for some reason I don’t get the binary sensor entity of door unlock and door ring.
how can I add that?

Thanks.

hi guys, i’ve a vto3211 and 2 vth (1 2621 and 1 2421). There is a way with this integration to stop ring vth after f.e. 2/3 ring? setting has 15 seconds min to ring and it is too long.
Thanks

Hello,

This integration is more technical then others, you should implement all this sensors in yaml configuration, here the example of lock, here the example of doorbell ring.

Hello,

You can cancel VTO call and it’s stops ringing all VTH’s. I use it to stop ring when door was opening, before this I will need to press end call on VTH.

# Cancel VTO Call
service: dahua_vto.send_command
data:
  entity_id: sensor.dahua_vto
  method: console.runCmd
  params: {'command': 'hc'}
  event: false
1 Like

Do you know if stoping the ringing also prevents the “The person you are trying to reach is unavailable” voice message on the door station?
I was able to mute / change all the sounds of the door station except this one and it is really annoying…

I don’t remember this voice message, but maybe because I have this settings on VTO:
image

The “Voice Prompt Sound” is the only one I still have active because otherwise there is no sound when you press the doorbell button.
I disabled all others and even uploaded an empty sound for all available sound-types.
Even cancelling the call results in the voice prompt, the only way to prevent it is to take the call

I see, I disable “Voice Prompt Sound” because user hear the doorbell sound from VTH installed inside but close to the door.

If you have VHT, you can send ac command to accept the call (same way as hc command in example but you should define new instance of integration connected to VTH), here the list of commands from VHT.

Thank you for the information.
I dont have a VTH, only the VTO, as I am using my phone and in future maybe a wallpanel with HA in kiosk browser (using the SIP addon / integration).
Can this command be sent from HA as well?

If you will use SIP server for calls from VTO you should look for command to accept and cancel call of this SIP server, I think this will be possible but you need to check it with SIP addon/integration.

As much as I know the VTO has an internal SIP-Server which is used by default.
In Home Assistant I am only using the doorbell events to trigger notifications (with multiroom audio and phone notification with snaptshot).
So I am not (yet) using the SIP addon and was just wondering if it is possible to send accept / cancel call command using the dahua integration

Yes, you can send cancel call command to VTO, but VTO doesn’t have accept call command. If you will manage to connect your SIP client/addon to VTO internal SIP server you probably will be able to send accept call command to this client (accept call it’s a client command).

I am planning to use SIP integration but a while back, before I had my real installation, I tested it and never got it to work. I even had to reset my Dahua as I managed to completly destroy my config.
So I currently lack motivation to finaly try this out :smiley:
Anyways, thanks for the information, maybe I’ll try that SIP integration again and use it to fix this annoying message :slight_smile:

Welcome! :slight_smile: Usually peoples use external SIP server (like FreePBX) in order to integrate Dahua VTO and SIP addon to it, you can find more info about it in the previous messages.

1 Like

Hi there, I have a VTO2000 and installed the integration from HACS, put the sensor in my configuration.yaml and restarted all … but I am a bit confused now.
I see no device, and no entities, only a sensor “sensor.dahua.vto” which shows state “OK”, and 3 Services called “Open door”, “Send Command” and “Send Instance command”.

I would like, when so is pressing the doorbell, to have a notification on ly tablet / Phone.

Can I achieve this ?

Many thanks !

You can find the answer here

Yeah sorry myhomeiot, i had a look there but could not find any code nor anything related for example to pop up a screen with video on who is at my door ;-(

… do you really refer to this code ?

- alias: Dahua VTO All Events
  mode: queued
  trigger:
    - platform: event
      event_type: dahua_vto
  action:
    - service: persistent_notification.create
      data:
        title: "{{ trigger.event.data.Code if trigger.event.data.Code is defined else 'Unknown Code' }}"
        message: "{{ trigger.event.data }}"

- alias: Dahua VTO Command Result
  mode: queued
  trigger:
    - platform: event
      event_type: dahua_vto
  condition:
    - condition: template
      value_template: "{{ trigger.event.data.method is defined }}"
  action:
    - service: persistent_notification.create
      data:
        title: "{{ trigger.event.data.method }}"
        message: "{{ trigger.event.data }}"

- alias: Dahua VTO
  mode: queued
  trigger:
    - platform: event
      event_type: dahua_vto
      event_data:
        Code: BackKeyLight
  action:
    - choose:
        - conditions: >
            {{ trigger.event.data.Data.State | int in [0, 1, 2, 5, 6] }}
          sequence:
            - service: persistent_notification.create
              data:
                title: "{{ 'Doorbell Ring' if trigger.event.data.Data.State | int in [1, 2] else 'Doorbell No Ring' }}"
                message: "{{ trigger.event.data }}"
        - conditions: >
            {{ trigger.event.data.Data.State | int == 8 }}
          sequence:
            - service: timer.start
              data:
                entity_id: timer.door_lock
                duration: 00:00:02 # VTO Unlock Period
            - service: persistent_notification.create
              data:
                title: Unlock
                message: "{{ trigger.event.data }}"
        - conditions: >
            {{ trigger.event.data.Data.State | int == 9 }}
          sequence:
            - service: persistent_notification.create
              data:
                title: Unlock failed
                message: "{{ trigger.event.data }}"
        - conditions: >
            {{ trigger.event.data.Data.State | int == 11 }}
          sequence:
            - service: persistent_notification.create
              data:
                title: Device rebooted
                message: "{{ trigger.event.data }}"
      default:
        - service: persistent_notification.create
          data:
            title: "Unknown state {{ trigger.event.data.Data.State | int }}"
            message: "{{ trigger.event.data }}"