Recently I installed an Amcrest AD110 using Amcrest2MQTT for the doorbell press notification in HA.
Another note which will come up in my post is that I’m running Frigate in a docker with the frigate add-on for integration.
My question/goal is to get a notification with snapshot when the doorbell button is pressed and it be actionable to open the camera feed. I’m using the official HA app on Android.
What is the best way to pull the snapshot and video? If through Frigate, how do you coordinate the snapshot in frigate with the doorbell press since Frigate creates a snapshot on motion?
Is it best to keep the notification separate from Frigate and pull the snapshot/video straight from the camera when ths button is pressed?
Is there a blueprint, automation or node-red flow already created to pull the snapshot and video based on the button press?
Since I don’t know anything about Frigate this is likely the functionality I would go with.
if the camera feed is accessible in HA then it should be able to take a snaphot using the camera.snapshot service. I’m not sure about video but there is a camera.record service also that I think will record a video clip.
here is an automation/script I use to send my TV a snapshot from a camera if the motion detector at my back kitchen door detects motion but you should be able to modify it to be triggered by the doorbell press easily enough:
automation:
- alias: AS Notification of Kitchen Motion
trigger:
- platform: state
entity_id: binary_sensor.kitchen_door_motion
to: 'on'
condition:
- condition: state
entity_id: input_boolean.as_enable_kitchen_motion_notify
state: 'on'
- condition: state
entity_id: switch.kitchen_sink_lights
state: 'off'
- condition: state
entity_id: binary_sensor.kitchen_door_sensor
state: 'on'
- condition: or
conditions:
- condition: state
entity_id: media_player.living_room_tv
state: 'on'
- condition: state
entity_id: binary_sensor.ping_my_pc
state: 'on'
action:
- if:
- condition: state
entity_id: media_player.living_room_tv
state: 'on'
then:
- service: script.as_kitchen_motion_tv_notify
- if:
- condition: state
entity_id: binary_sensor.ping_my_pc
state: 'on'
then:
- service: notify.alexa_media
data:
target:
- media_player.sunroom_dot
data:
type: announce
message: "the kitchen door motion sensor was triggered"
script:
as_kitchen_motion_tv_notify:
alias: Notify LR TV of Kitchen Motion
sequence:
- service: variable.set_variable
data:
variable: kitchen_snap_timestamp
value: '{{ now().strftime("%Y%m%d_%H%M%S") }}'
- service: camera.snapshot
data:
entity_id: camera.kitchen
filename: /config/www/snapshots/kitchen_{{ states('variable.kitchen_snap_timestamp') }}.jpg
- delay: '00:00:02'
- service: notify.shield_tv_notify
data:
message: "The Kitchen motion sensor has detected motion"
data:
duration: 5
position: "bottom-left"
fontsize: "medium"
transparency: "80%"
color: "red"
interrupt: 0
image:
path: "/config/www/snapshots/kitchen_{{ states('variable.kitchen_snap_timestamp') }}.jpg"
variable:
kitchen_snap_timestamp:
value: 'not set'
restore: true
it uses the “hass-variables” custom integration but you can do the same thing with an input_text.