Notification with snaphot of camera and live feed option

Hello,

With this i get notification with snapshot attached

action:
  - service: camera.snapshot
    data:
      entity_id: camera.frontyard_camera
      filename: /config/www/snapshots/frontyard.jpg
  - delay: '00:00:01'
  - service: notify.mobile_app_andriaus_iphone_pro
    data:
      title: Front Yard motion
      message: Front Yard motion detected at {{now().strftime("%H:%M %d-%m-%y")}}
      data:
        attachment:
          content-type: jpg
          hide-thumbnail: false
          url: https://www.hassio.com:8123/local/snapshots/frontyard.jpg

And with this i get live feed directly, when expanding notification

action:
  - service: notify.mobile_app_andriaus_iphone_pro
    data:
      message: Front Yard motion detected at {{now().strftime("%H:%M %d-%m-%y")}}
      data:
        push:
          category: camera
        entity_id: camera.frontyard_camera

Cannot figure out, how i can receive notification with snapshot attached and clicking on picture would open live stream of the camera. or it can be a button of actionable notification to open live stream

1 Like

I am unable to open streams as well. Not sure why, tried about 5 different ways. Were you able to stream once opening notification? I get the snapshot but when I click on it, it disappears

Any update?

Hi,

is here somebody with iOS device on 16 version who is receiving notification including snapshot?

i just created for test this automation but never receive image inside my internal network.

Could somebody recognize what can be the problem?

Thanks for any help.

- id: '1677945934512'
  alias: Notification
  description: ''
  trigger: []
  condition: []
  action:
  - service: camera.snapshot
    data:
      filename: /config/www/frontyard.jpg
    target:
      entity_id: camera.entrance_main
  - delay:
      hours: 0
      minutes: 0
      seconds: 5
      milliseconds: 0
  - service: notify.mobile_app_mg_iphone
    data:
      message: Niekto stoji vonku v čase {{now().strftime("%H:%M %d-%m-%y")}}
      title: DingDong
      data:
        attachment:
          url: http://192.168.88.113:8123/local/frontyard.jpg
  mode: single

This is a super basic example for my reolink + frigate setup. The key is to hold down on the notification until you see a popup. In the popup will be a live feed along with a button to click that will take you to the snapshot blown up. There is no fanciness in this like cooldown or silence option though.

alias: NVR No Car
description: ""
trigger:
  - platform: mqtt
    topic: frigate/events
    value_template: "{{ value_json.type }}"
    payload: new
condition:
  - condition: template
    value_template: "{{ trigger.payload_json['after']['label'] != 'car' }}"
action:
  - service: notify.notify
    data:
      message: >-
        A {{trigger.payload_json["after"]["label"]}}.
        {{trigger.payload_json["after"]["camera"]}}
      data:
        image: >-
          http://local-ha-ip:5000//api/events/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg
        tag: "{{trigger.payload_json[\"after\"][\"id\"]}}"
        when: "{{trigger.payload_json[\"after\"][\"start_time\"]|int}}"
        entity_id: >-
          camera.{{trigger.payload_json["after"]["camera"] | replace("-","_") |
          lower}}
        actions:
          - action: URI
            title: Open Url
            uri: >-
              http://local-ha-ip:5000//api/events/{{trigger.payload_json["after"]["id"]}}/snapshot.jpg
mode: single

Super weird, but I had to add an extra slash before the “/api” endpoint…not sure why.

2 Likes

You should keep pressed the notification. If you click it open the HA…

Try this way:

attachment:            
  content-type: jpg            
  hide-thumbnail: false            
  url:  http://192.168.88.113:8123/local/frontyard.jpg