📸 Send camera snapshot notification on motion

Does anyone use this with iOS?

The picture does not show up for me in the notification… only the text. Am I doing anything wrong?

Hi, difficult to say with what you’re sharing.
Did you conduct a search: Search results for 'ios snapshot camera' - Home Assistant Community

I did…
Hmmm, I think I figured it out though. For whatever strange reason, a SECOND device for my iPhone was created … the first one was “iPhone” and the second one was “iPhone (5)”. Crazy.

Both pointed to the same iPhone but had different information (e.g. battery level was different). Sending a message to both worked. But images only worked with the former one.

I deleted both devices and when restarting the app the device was re-created.

Hi all

first off I wanted to thank the author for this awesome blueprint. It worked right away for me. Secondly, I’d like to ask if there’s a way to reduce the number of notifications it sends somehow. I noticed that the camera motion sensor detects persons continuosly (like every 3 seconds or so), so if someone stands just under the camera for a while, it is continuosly monitored, therefore I receive a loooot of notifications (an unmanageable number).
Is there a way to reduce these notifications? I was thinking to use the delay setting, but I don’t want that to impact the time it detects somebody and I receive the notification for the first time… any suggestions?

This blueprint worked like a charm for me on my reolink E1.

Could someone please tell me which exact lines of code are used to retrieve and then save the image, I’d like to use them elsewhere as my usual snapshot method does not seem to work on this camera.

Also, is there any way to save the image to my phone?

I made a version that uses conditions:

1 Like

will a generic binary sensor work? I made a version that uses any binary sensor:

@DeimicUser
This may be closer to what you wanted:

Thank you! I’ll give it a try asap!

1 Like

Hey, I went through all the replies and didnt find any solution that would work :frowning: The automation used to work perfectly on my HA app on my iPhone and now when im connected to local URL I only get a small preview of the snapshot and when i tap and hold on the notification a large snapshot no longer appears. AND when im connected to an external URL, I only get a text notification without even the small preview of the snapshot. Both used to work with both the preview and a large snapshot appearing after tap and holding on the notification. Also used to work on my apple watch. Is there a fix? Nothing changed in my HA as far as i know. Thanks!!

also - for some reason with this automation (📸 Notification with camera snapshot with blocking condition and clickaction) when on local i can at least do the tap and hold to see the larger snapshot… really strange - with this automation only the external doesnt work (at all, not even the small preview image)

1 Like

Hey, how do I send the notification to several devices?
I should modify the blueprint? And create a group of devices? What if it’s a mix of ios and android devices?

This blueprint has started to spam my logs:

Template variable warning: 'None' has no attribute 'object_id' when rendering '/config/www/tmp/snapshot_{{ states[camera].object_id }}.jpg'

When run manually (or automatically) it works just fine. Anyone got any ideas?

I believe my blueprint would work for you, added the ability for notification groups recently!

Hi, Thank you for the blueprint script. It is working fine.
I’m newbie on HA, my question is just a support about the following issue.
How can I integrate condition to that blueprint script, example, send me the snapshot notification only when I.m out of Home zone.
Can you help me ?
Thanks a lot

see my blueprint:

For me a tap opens HA but a long press pulls up the notification settings (default/silent)

Thank you so much for this Steven! I was banging my head against the wall, wondering why I could see the snapshot_cameraname.jpg file in the Terminal integration on my Home Assistant Green (in root/config/www/tmp) but I couldn’t view it at http://homeassistant.local:8123/local/tmp/snapshot_cameraname.jpg. I was getting the notifications on my iPhone but they had no image - just a 404 message.

Then I saw your advice to restart Home Assistant. It worked a treat. The image was visible in my browser and the notifications work as intended!

1 Like

Many thanks for providing the blueprint.
It has been working great recently, however I started collecting many snapshots which I couldn’t find how to delete them. Does anyone knows how to do that? Currently, all the snapshots are saved in Media>Nest (since I have google nest Doorbell).

Many thanks in advance

First setup a shell command in your configuration.yaml file:

shell_command:
  delete_old_jpg_files: 'find /config/www/location -name "*.jpg" -type f -mtime +30 -exec rm {} \;'

Change the “location” to the folder in which your jpg files reside. Then create an automation that will trigger the shell.

alias: Delete old gate jpg if older then 30 days
description: ""
mode: single
triggers:
  - at: "02:00:00"
    trigger: time
conditions: []
actions:
  - action: shell_command.delete_old_jpg_files
    data: {}

The shell command will delete all files equal to and older than 30 days in the location you specify. The automation executes that shell every morning at 2am.

Thank you for your response.
I followed your instructions and the files are there after the automation has ran.
I went the developers tools → Actions, then chose “Shell Command: delete_old_jpg_files” and I got the below Response:

stdout: “”
stderr: >-
find: /config/www/media/Nest/Entrance Door doorbell: Recent Events/: No such
file or directory
returncode: 1

Knowing that I am sure of the path of the files, they are in:
Media → Nest → Entrance Door doorbell: Recent Events

Many thanks in advance

Thanks for the blueprint.

I want to have some extra conditions added to it. How do I do that ?

I only want it active in the weekend