📸 Notification with camera snapshot with blocking condition and clickaction

Hi Stewc,

The automation just uses the built-in service: camera.snapshot.
The path where the snapshots get created is “/config/www/tmp/snapshot_{{ states[camera].object_id }}.jpg” as you already figured out.

Make sure there is space enough on the filesystem. Maybe try to copy a random file to that location using SAMBA to verify there is enough space.

You can try to call the service manually from the developer tools to see if that works.

Thanks for the suggestions… I spotted the problem with the camera config! So all is well…

Fantastic blueprint! Thank you!

Great idea thanks. It’s a bit of upside down logic that I created a sensor that detects if the alarm_panel is disarmed and this is the blocking entity for the blueprint. Works like a charm! Now if I set my alarm panel and the PIR picks up movement I get sent an immediate photo from the nearest camera and I can press to get live view from my cameras.

Thanks for the automation and the idea!!

Hi, Works great however Is there a way to add as a removable notification?

I have used this on one of my actionable notifications but not sure how I can include this into a blueprint?

    apns_headers:
      apns-collapse-id: 'frontdoorcollapse'

Hi there,

thanks for the great work and sharing!

I recognized that the image the camera is taking and beeing store by the system has alwas the same name, so it is overwriting itself.

Is it possible to add an option to the blueprint or to change the .yaml file so that all files (up to max. amount) are stored with a time stamp?

CU
Chris

Hi Chris,
I have considered that, but without a system of cleaning the files they would endlessly fill up the folder and potentially the filesystem. Therefore I chose not to go that route and let the file overwrite itself.

Maybe have a look at this blueprint:

Hi Tim,
I have changed the blueprint accordingly.
I don’t have an iPhone so I can’t test this.

Please deleted the blueprint and reimport + recreate.

I have tested and the new blueprint doesn’t overwrite previous notification on iOS. I’m thinking this could be because it’s set as a critical notification?

Maybe, that is the case.
Feel free to clone the blueprint, remove the critical part and use that.

Yes that was it, I’ve learnt something too!

Update: I’ve added more options, like selecting if you want the notification to be critical/high priority and controlling the channel and group names.

Controlling the names can be handy if you have multiple automations based on this blueprint. You can then group them together by group name and even collapse or overwrite notifications based on group name.

Channel name is used to define the settings for the notification on your device (ringtone, volume, enable/disable).

Did you choose a device to notify?

Yes using my android as a device to notify. What’s odd is I still get the notification on my phone, I just don’t understand why it’s tripping the error in the logs.

Hello,

this is a great blueprint! But is there a chance to change entity from motion sensor to event ?

I have a motion sesnors on RF conected to RF Bridge. To activate it I use:

trigger:
  - platform: event
    event_type: sonoff.remote
    event_data:
      name: RuchDwor

Full automat:

alias: Ktoś jest pod drzwiami
description: Czujka ruchu RF
trigger:
  - platform: event
    event_type: sonoff.remote
    event_data:
      name: RuchDwor
condition:
  - condition: time
    after: '08:00'
    before: '22:00'
  - condition: state
    entity_id: switch.sonoff_1000af4fe3_2
    state: 'off'
action:
  - service: notify.mobile_app_oneplus
    data:
      message: 'SprawdĹş kto to :)'
      title: Ktoś jedz pod drzwiami wejściowymi
      data:
        image: >-
          https://github.com/home-assistant/assets/blob/064f5a68b190e465f514c44c131a15859dfc0d15/logo/logo.png?raw=true
mode: single

Is there a posiblle to change entity from motion sensor to event? Or how to change data image on my automatic to snapshot?

Thanks for all work!

hey Jack,
I suggest you clone the blueprint and change the domain accordingly.

Thanks for the work and effort in this blueprint. Was wondering how to go about sending notifications to multiple devices. Is this possible?

Thanks again!

i think the easiest is to make a notification group.

1 Like

Nice Blueprint! One feature request: My (Chinese) ONVIF camera sends a ‘motion detected’ every second during motion. This results in many notifications. Is it possible to add a ‘time-out’ timer so that once the automation is kicked off it won’t do that again for xx seconds?

@Michael3871 Just make a new template-sensor which gets “off” when no motion is detected for maybe 30seconds or something.
Timeout could be realised with a wait at the end and a condition that the automation only starts when it is not already running. Automation mode will create a warning…

@StanG nice blueprint, like it. Borrowed me your code for my own automation, because I dont like blueprints.

i cannot get this to work, even after removing “mobile_app” prerequisites in the code.

I’m not sure but i think a notification group is not a device, it is a service?
Hoping there is an easy solution to this, I use it with my doorbells and It works like a charm. However I have to run 4 automations to cover all devices to be notified and it would be more elegant if it just could be one :blush:

never got the notification group working either. Only lists actual mobile devices.