I think you read it properly. @derekjwhitten was asking:
…which I interpret to be he is comparing his slow 10 s Dahua setup to what we are experiencing with the Amcrest integration and the events triggers to provide info as to whether he would want to try configuring this way instead.
That being said, as you said, I too get notified on my watch immediately the moment I press the button and similarly when it detects a human. For testing it configured an automation to turn on a light switch when the doorbell button is pressed and it is simply like turning on a light switch it is that quick, even a split second before I receive the push notifications. I haven’t configured mine to do the snapshot yet so I can’t speak to that portion of it. (still on test bench, not installed yet)
All around good work with this @flyinglow . I would hope we can bring this to the attention of the Amcrest integration owner so they possibly add these in as part of their documentation or better yet use this to create the actual sensors and whatnot out of the box so we don’t have to use your technique. Also the using the AlarmLocal
is so much better for me with 2 doorbells, that I can identify which doorbell triggers the automation.
This is my test automation to see if I could properly determine which doorbell was pressed. My triggers add looking for the camera: <name of camera>
and setting different trigger IDs to be used in the choose
action down the automation. I also have an ESPHome device w/ 2-channel relay configured to be able to momentary press my mechanical doorbell chime as the chime kit is not compatible with mine:
- id: '1674677926052'
alias: Amcrest Doorbell Pressed
description: Trigger when Amcrest Doorbell Button Press Event Fires
trigger:
- platform: event
event_type: amcrest
event_data:
camera: Garage Doorbell
event: AlarmLocal
payload:
action: Start
alias: Amcrest Garage Doorbell Pressed
id: Garage Doorbell Pressed
- platform: event
event_type: amcrest
event_data:
camera: Front Doorbell
event: AlarmLocal
payload:
action: Start
alias: Amcrest Front Doorbell Pressed
id: Front Doorbell Pressed
action:
- choose:
alias: Determine which doorbell was pressed and perform actions accordingly
- conditions:
- condition: trigger
id: Garage Doorbell Pressed
sequence:
- service: script.notify_iphone
alias: Notify Garage Doorbell Pressed
data:
message: Ding Dong
title: Garage Doorbell
- service: switch.turn_on
alias: Ring Garage Door mechanical chime
data: {}
target:
entity_id: switch.garage_doorbell_chime
- conditions:
- condition: trigger
id: Front Doorbell Pressed
sequence:
- service: script.notify_iphone
alias: Notify Front Doorbell Pressed
data:
message: Ding Dong
title: Front Doorbell
- service: switch.turn_on
alias: Ring Front Door mechanical chime
data: {}
target:
entity_id: switch.front_doorbell_chime
mode: queued
max: 10
Confirming this works, I now have modified the packages\amcrest.yaml
to have presses and sensors for each, but I’ll just show the different doorbell button presses here:
- trigger:
- platform: event
event_type: amcrest
id: start
event_data:
camera: "Front Doorbell"
event: AlarmLocal
payload:
Code: AlarmLocal
action: Start
- platform: event
event_type: amcrest
id: stop
event_data:
camera: "Front Doorbell"
event: AlarmLocal
payload:
Code: AlarmLocal
action: Stop
binary_sensor:
- name: Front Doorbell Ring
icon: mdi:doorbell-video
state: >-
{{ 'on' if trigger.id == 'start' else 'off' }}
- trigger:
- platform: event
event_type: amcrest
id: start
event_data:
camera: "Garage Doorbell"
event: AlarmLocal
payload:
Code: AlarmLocal
action: Start
- platform: event
event_type: amcrest
id: stop
event_data:
camera: "Garage Doorbell"
event: AlarmLocal
payload:
Code: AlarmLocal
action: Stop
binary_sensor:
- name: Garage Doorbell Ring
icon: mdi:doorbell-video
state: >-
{{ 'on' if trigger.id == 'start' else 'off' }}
So, I will swap out the original test triggers for that automation and just use the binary sensors. This should work, but haven’t tested yet.
- id: '1679240460251'
alias: Amcrest Doorbell Pressed (New triggers)
description: Trigger when Amcrest Button Press Event Fires
trigger:
- platform: state
entity_id:
- binary_sensor.front_doorbell_ring
to: 'on'
id: Front Doorbell Pressed
- platform: state
entity_id:
- binary_sensor.garage_doorbell_ring
to: 'on'
id: Garage Doorbell Pressed
...
Sorry this got long, but hope it helps someone else that may have similar situations with having more than one doorbell.