Camera - Send & Save snapshot to mobile device when motion is detected with Conditions. Now with Custom Triggers!

IOS notifications weren’t working and i found the issue change the following code

    data: ' {% set android_data = { "image": "%s", "clickAction": "%s" } | format(snapshot_access_file_path,
      clickActionURL) %} {% set ios_data = { "attachment": { "url": "%s", "content_type":
      "JPEG" }, "url": "%s" } | format(snapshot_access_file_path, clickActionURL)
      %} {{ ios_data if is_ios else android_data }} '

IOS uses “url” instead of “clickAction”

1 Like

Ok, I was trying to get it to navigate to the selected page but doesn’t seem to work on iOS, reverted back to original code

Added a version of the blueprint for custom triggers. Great if you have multiple binary sensors, or any trigger you actually wanted!

Downloaded and set up the project, worked right out of the box, great work!

I have a question though, randomly when I get the notification with the preview picture and I click on it to open, I get an older image. What can this be related to? I cleared browser cache and made sure to set write permissions on the destination folder but seems not the case.
Any other suggestions?

Also, in some snapshots there’s a “ghost” image, like 2 snapshots overlapped. What can cause this effect?

1 Like

Great automation, I’ve used it for quite some time now!

Is there any way to prevent this automation from ‘spamming’ the notifcation? When motion is detected on my cameras, it’s common that I get sent upwards of 30 notifications or more! Is there some kind of cooldown function that can be added, or can you direct me to somewhere that I can add this myself?

Thanks!

Hmm, not sure. Do you use a delay?

Hmm, good idea. I’ll look into adding an optional “delay” for a cooldown so it doesn’t trigger again within that window… I’ll reply when I add it.

no, it’s left to 0
could it be a slow network issue?

Try adding a small delay, see if that helps

I added a delay at the very end of the automation and it’s in single mode, so if you have the delay set, it shouldn’t execute again.

Great addition, I’ve reloaded the project, and I’m asking one more thing (hate to be so annoying) since I’m using a smartphone, the led light on the phone will turn on, is it possible to add a timing or a turn off feature after some time time or snapshot taken

edit: sorry, I realised there’s an option to run actions after the script, so I guess that’s where I have to set the light off.

1 Like

Thanks for this! I have this working as a Doorbell Notification for my Reolink Wifi Doorbell. How do I add a notification to another device? I’m trying to avoid duplicating the blueprint. Thanks!

Look at Additional Actions and use the service notify.DEVICENAME.

1 Like

Hi,
First of all, thank you for this great blueprint!

Is it possible to no longer declare the “Device to notify” as a mandatory field? I don’t want to use the HA app for this because it offers me far too few options for evaluating the messages on my cell phone, for example with Tasker.
I would like to just use pushover with this Code:

service: notify.pushover
metadata: {}
data:
  message: "{{ notification_message }}"
  title: "{{ notification_title }}"
  target: David
  data:
    priority: 0
    sound: magic
    attachment: /media/Kamera_Front/last_motion.jpg

Regards Dave

I’ll look into making it optional. I’ll reply when I got it.

Use the Additional Actions block to add that code as a service, it’s basically a custom action input.
Also, I added the default notify to be optional, default is on, so no change for others

Noob here, installed HA yesterday and trying to soak up as much as I can. This is a great blueprint and definitely a functionality I’d love to integrate. Does anyone know if this will work with Blink cameras? I am still learning to tinker and don’t want to go down the rabbit hole if it’s a no-go right off the bat. I’d love to replace the Blink cameras in the future, but this may be a limitation I’ll have to live with for a while. TIA!

It would work with any camera entity for Home Assistant. So the question is, will HA work with Blink camera. I use Kasa Camera but need something to expose the stream to HA. I dunno about Blink, but if you got the stream in HA, as a camera.XXX, you should be good.

Thank you for this Blueprint.
I managed to get it working on my iPhone with the ability to open the Snapshot.

But I have one Question:
In my old Automation I had some entry in the Data-Section of the Message.

push:
      sound: Ueno.wav
      interruption-level: critical
      volume: 1

Is there a way I can add these Parameters to the Blueprint?
My knowledge was enough to create a script for iPhone notifications, but I can’t find a way to edit a blueprint in HA. ^^
Thank You!

Hmm, good question, I will take a look into that

1 Like