With DAHUA VTO integration I found a way to pick up Sensor Status from relays from Dahua cameras and access controls
I use cameras with face recognition technology
When the camera recognizes the face or the access controller recognizes the finger then open the relay and unlock the door for 7 seconds
And in Home Assistant I get the status that the relay is open.
Then I can with the status entity dissarm home alarm system or other cunfigurations.
To sensors.yaml - or configuration.yaml add sensors
######################## Door ASI1212D relay status ############################
- platform: command_line
name: ASI1212D Door Status
command: “/usr/bin/curl --digest --user admin:password ‘http://192.168.0.218/cgi-bin/accessControl.cgi?action=getDoorStatus&channel=1’”
scan_interval: 01
################### Face cam IPC-HDBW7442H-ZFR relay status ####################
- platform: command_line
name: Face Cam relay Status
command: “/usr/bin/curl --digest --user admin:password ‘http://192.168.0.214:9012/cgi-bin/alarm.cgi?action=getOutStates’”
scan_interval: 01
################# DHI-VTO7541G with face recognizer and fingerprint #################
-
platform: dahua_vto
name: Dahua VTO
host: 192.168.0.250
username: !secret vto_user
password: !secret vto_pass
port: 8888
scan_interval: 5 -
platform: command_line
name: VTO DOOR STATUS
command: “/usr/bin/curl --digest --user admin:password ‘http://192.168.0.250:8888/cgi-bin/accessControl.cgi?action=getDoorStatus&channel=1’”
scan_interval: 01
################# DHI-VTO7541G Unlock swith #################
in configuration.yaml
lock:- platform: template
name: Door Lock
value_template: “{{ not is_state(‘timer.door_lock’, ‘active’) }}”
lock:
unlock:- service: dahua_vto.open_door
data_template:
entity_id: sensor.dahua_vto
channel: 1
short_number: HA
- service: dahua_vto.open_door
- platform: template
for lovelace configuration:
type: custom:button-card
icon: mdi:doorbell-video
name: Door
tap_action:
action: call-service
service: dahua_vto.open_door
service_data:
entity_id: sensor.dahua_vto
channel: 1
short_number: HA
styles:
card:
- font-size: 12px
- font-weight: bold
color: green
Maybe someone picked up status information through MQTT?