📸 Notification with camera snapshot with blocking condition and clickaction

  data:
    ttl: 0
    priority: high
    channel: Camera-HA

With channel you can then set a differrent notification behavior in Android. Like different ringtone/vibration/lockscreen override etc.

There is a channel set in the blueprint just for that reason.

Anyone else getting errors in their log? It appears with automatons created by this blueprint.
Error: Invalid config for [automation]: required key not provided @ data[‘action’]. Got None required key not provided @ data[‘trigger’]. Got None. (See /config/configuration.yaml, line 8)

Did you choose a device to notify?

Hi Stan. I really like the automation, is there a way that the blocking condition can be set to the Alarm Panel being armed (home or away)?

Love this thank you for sharing… however I get no image, whether I’m connected to Wifi or not. I’ve looked at the image location /config/www/tmp/ and an image is created, but it’s always zero K - not a valid image!

Anyone else seeing this?

Hi Paul,

If you have a binary sensor ( for example binary_sensor.alarm_armed ) you can use that.
If not, you can create a template binary sensor that has a state ‘on’ or ‘off’ according to the state of your alarm control panel.

1 Like

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!