Hello, how can we esaily test the “trigger.event.data.Date.State value”, or the BackKey_light states ?
I am doing the automation below which is supposed to launch a couple of actions when someone rings the bell, but nothing happens.
I think there is an issue with my condition check / the test of the states 0, 1, 2, …
alias: Dahua VTO
trigger:
- platform: event
event_type: dahua_vto
event_data:
Code: BackKeyLight
condition:
- condition: template
value_template: "{{ trigger.event.data.Data.State | int in [0] }}"
action:
- choose:
- conditions:
- condition: template
value_template: "{{ trigger.event.data.Data.State | int in [1, 2] }}"
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 }}"
- service: number.set_value
data:
value: "500"
target:
entity_id: number.lenovo_tab_m10_plus_3rd_gen_screen_off_timer
- type: turn_on
device_id: 5ddf9cc8e6e73f9ee6a61282d8c96a62
entity_id: 0b25a53f111b9dbc4efdf84501269ecf
domain: switch
Many Thanks !
tmjpugh
(Tmjpugh)
February 12, 2024, 10:57am
350
If you go to an automation you will get a visual indication (message) when automation trigger occurs. This does not mean condition has occur, only that trigger has occurred
In the automation edit ui you can select [three vertical dot] at upper right corner to get menu options, select “traces”
You may use information here to see why condition fail and the message or data received for trigger
You can also watch messages using HA UI >> developer tools >> events
Minos_71
(Minos_71)
February 18, 2024, 10:42pm
352
@cedricdelecole , Are u French ?
deltahun
(Delta)
February 19, 2024, 10:02am
353
Hi! Is there support for initiating call reception via command transmission?
While direct implementation isn’t necessary, using a third-party WebRTC solution could enable two-way communication. However, for this to function effectively, the VTO system would require awareness of call reception status.
So, I would require a solution similar to a SIP client.
Minos_71
(Minos_71)
February 19, 2024, 8:45pm
354
Hi,
At fisrt , i 'd precise that i’m a newbie and my english is bad .
So,
i 'd installed Dahua VTO with HACS
in which file.yml , i 've put that ? in configuration.yml or in /custom_components/dahua_vto/services.yaml ?
- platform: dahua_vto
name: Dahua VTO
host: 192.168.1.108
username : admin
password : XXXXX
scan_interval: 5
after restart HA,
in the first or in the seconf file , i have nothing in listenning event for dahua_vto
Someone could publish his config please or help me please
(* With Freepbx , calls are ok with sip client => OK)
Thx
Hello, if you are new to Home Assistant YAML configuration, please check this message.
mdesantes
(Mdesantes)
February 21, 2024, 12:24pm
356
Hello im using Dahua VTO integration by 1 year, and now i cant access, the logs say me user or incorrect password but its not i hace the same user/password in frigate and its working
Anyone can help me?
API: (WORKS)
http://admin:[email protected] /cgi-bin/accessControl.cgi?action=openDoor&channel=1&UserID=101&Type=Remote
Config (NOT WORKS)
sensor:
- platform: dahua_vto
name: Dahua VTO
host: 192.168.1.111
username: admin
password: fake_password123
logger:
default: warning
logs:
custom_components.dahua_vto: debug
Frigate (WORKS)
cameras:
portero:
enabled: True
ffmpeg:
inputs:
- path: rtsp://admin:[email protected] :554/cam/realmonitor?channel=1&subtype=1
roles:
- detect
- record
- rtmp
objects:
track:
- person
record:
enabled: True
retain:
days: 7
mode: motion
events:
retain:
default: 14
mode: active_objects
snapshots:
enabled: True
retain:
default: 10
objects:
person: 15
Hello, very strange, maybe this start happening after you do something like HA update, installing Frigate?
PS: Maybe something wrong with Dahua VTO, try to restart it manually.
j2g2com
(J2g2com)
February 22, 2024, 3:04pm
358
I have it configured but I don’t know how to continue… I’ll settle for the door notifying me and being able to open it… but I’m lost where to put said code. Thk
alias: Dahua VTO Llaman a la puerta
description: “”
trigger:
platform: event
event_type: dahua_vto
event_data:
Code: BackKeyLight
condition:
condition: template
value_template: “{{ trigger.event.data.Data.State | int in [0] }}”
action:
choose:
conditions:
condition: template
value_template: “{{ trigger.event.data.Data.State | int in [1, 2] }}”
sequence:
service: notify.mobile_app_sm_g781b_j2g2
data:
message: Llaman a la puerta
j2g2com
(J2g2com)
February 23, 2024, 10:36am
360
I’ll tell you what I have achieved… you are missing the port… port: 80 if you have updated the vto… from there you see the logs and you will see that it already connects and you will have a service called dahua_vto… but one once connected I don’t know where to put the code to, for example, open the door
gsmstudio
(Wesley)
February 24, 2024, 8:55am
361
Is it possible to turn on only the backlight of the call button? ( VTO2211G-WP)
Minos_71
(Minos_71)
February 26, 2024, 9:59am
363
Hi,
it s good , i have events now :
event_type: dahua_vto
data:
Action: Pulse
Code: BackKeyLight
Data:
LocaleTime: "2024-02-26 10:44:25"
State: 1
UTC: 1708940665
Index: -1
entity_id: sensor.dahua_vto
origin: LOCAL
time_fired: "2024-02-26T09:44:51.886364+00:00"
context:
id: 01HQJCV2DEWN08F2EPS1EPMRYV
parent_id: null
user_id: null
and i can send a remote service to Open :
now , i 'd like do an automation when doorbell is pressed but i doesn’t work with that :
- 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 }}"
thx for you help
Minos
Minos_71
(Minos_71)
February 26, 2024, 12:07pm
364
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 .
j2g2com
(J2g2com)
February 26, 2024, 6:19pm
366
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
j2g2com
(J2g2com)
February 26, 2024, 6:22pm
367
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
mglc28
(LuisC)
February 29, 2024, 7:56am
368
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