Snapshot from ezviz camera when doorbell go’s

Could someone help me with my problem?.
I want to make my ezviz camera a snapshot when de doorbell is pressed and send a picture with pushover.

https://www.home-assistant.io/integrations/camera/#service-snapshot

https://www.home-assistant.io/integrations/pushover/

I cant get it fixed, do you have more specific tips?

Sure, the basic parts will be something like this:

  trigger:
  - platform: state
    entity_id: binary_sensor.your_doorbell_sensor_here
    from: 'off'
    to: 'on'
  action:
  - service: camera.snapshot  # take a picture and store it
    data:
      entity_id: camera.your_camera_here
      filename: '/config/www/snapshots/doorbell.jpg'
  - delay: 3 # may or may not be required depending on how long it takes to make and store your picture
  - service: notify.your_pushover_notifier_here # send the picture
    data:
      title: "Doorbell"
      message: "The doorbell has been pressed."
      data:
        attachment: "config/www/snapshots/doorbell.jpg"

You need to create the config/www folder and config/www/snapshots folders. If you did not already have a www folder in the /config folder you need to restart Home Assistant after creating it.

Hallo,

Do I need to place this in the configuration, Or in the automatisation part

Please read the documents on how to create an automation.

Its nog working…

https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/114371#oneone-format-it-properly

Hello tom,

thanks for trying to get me in the right direction, i hope you can read my lines better now. This is what i got so far. i’m getting a notification if my doorbell is pressed, but no shapshot.

- alias: Deurbel Voordeur Notificatie
  trigger:
     - platform: state
       entity_id: binary_sensor.doorbell
       to: "on"
  condition:
    - condition: template # only notify once every 10 seconds at most
      value_template: "{{ ( as_timestamp(now()) - as_timestamp(state_attr('automation.deurbel_voordeur_notificatie', 'last_triggered')) |int(0) ) > 10 }}"   
  action:
    - service: camera.snapshot  # take a picture and store it
      data:
        entity_id: camera.carport
        filename: '/config/www/snapshots/doorbell.jpg'
    - delay: 5
    - service: notify.Jos_po
      data:
        title: "Deurbel Voordeur"
        message: "Ding dong!"
    - service: notify.Mieneke_po
      data:
        title: "Deurbel Voordeur"
        message: "Ding dong!"
        

somebody any tips?

Does your camera config have a still image URL defined?

you did the snapshot but where you attached it to your notification? The example from @tom_l has it:

 - service: notify.your_pushover_notifier_here # send the picture
    data:
      title: "Doorbell"
      message: "The doorbell has been pressed."
      data:
        attachment: "config/www/snapshots/doorbell.jpg"

(last line).

2 Likes

Its working, thx for the help.

Hello,
I hope someone can help me out because I’m stuck. I have been trying for days now to get this working:
doorbell (with shelly integration) is pressed → snapshot taken → snapshot delivered with notification to my iPhone. I came across this feed here hoping to find a solution but nothing I do makes this work.
The frustrating thing is that I have an automation working which sends me a snapshot of another camera whenever my hue motion sensor picks up motion. I build this with this blueprint: 📸 Send camera snapshot notification on motion. Modifying that automation didn’t get me to get this doorbell automation which I am trien to built going either. So what my code looks like is this:

alias: foto deurbel
description: ''
trigger:
  - platform: device
    type: changed_states
    device_id: 2477bd452f41cb77d93fb00e78422551
    entity_id: switch.shelly1_e8db84d46224
    domain: switch
condition: []
action:
  - service: camera.snapshot
    data:
      filename: /config/www/snapshots/camera.diskstation_voordeur.jpg
    target:
      entity_id: camera.diskstation_voordeur
  - service: notify.mobile_app_h_rro
    data:
      message: tring-tring
      data:
        content-type: jpg
        attachment:
          url: /config/www/snapshots/camera.diskstation_voordeur.jpg
mode: single

What I get is a notification on my iPhone: tring-tring.
When I long press the notification I get this on my iPhone (13 Pro Max):

I can see that every time the automation runs a new snapshot is being taken and the old one overwritten so that part of it works all right.

I have tried about every setting I could think of, changing “url” to " image" etc. but I am stuck.
I am hoping anyone has a suggestion how to solve this.