Can't send image with push notifications

I recently purchased two Reolink Video Doorbell PoE cameras and wanted to create an automation that would send a snapshot along with a message in a push notification. I’ve tried several different yaml codes that I found on google. This is my current automation-

alias: back doorbell press
description: Back doorbell activation notification.
triggers:
  - type: turned_on
    device_id: 47135e972f93b2ddf2c2dfe8385fb317
    entity_id: 513b6071f0757d5023672cb4144fc508
    domain: binary_sensor
    trigger: device
conditions: []
actions:
  - action: camera.snapshot
    metadata: {}
    data:
      filename: /media/snapshot_rear.png
    target:
      entity_id: camera.rear_doorbell_poe_snapshots_clear
  - delay:
      hours: 0
      minutes: 0
      seconds: 0
      milliseconds: 500
  - data:
      message: Someones at the back door.
      title: Back doorbell press
      data:
        push:
          image: /media/local/snapshot_rear.png
          sound:
            name: Ding-dong.wav
    action: notify.mobile_app_walters_iphone_15
  - data:
      message: Someones at the back door.
      title: Back doorbell press
      data:
        push:
          image: /media/local/snapshot_rear.jpeg
          sound:
            name: Ding-dong.wav
    action: notify.mobile_app_marys_iphone
mode: single

The image exists in my media browser-

It just doesn’t get pushed with the notification.

My guess is that there is something wrong with the path but it looks correct. Nabu Casa remote access is enabled.

coreOS: 2024.10.4
Supervisor: 2024.10.3
OS: 13.2
Frontend: 20241002.4
iOS Companion App: 2024.9
iOS: 18.1

Trying different options thought I should try using /www instead of /media.

alias: back doorbell press
description: Back doorbell activation notification.
triggers:
  - type: turned_on
    device_id: 47135e972f93b2ddf2c2dfe8385fb317
    entity_id: 513b6071f0757d5023672cb4144fc508
    domain: binary_sensor
    trigger: device
conditions: []
actions:
  - action: camera.snapshot
    metadata: {}
    data:
      filename: /config/www/snapshot_rear.png
    target:
      entity_id: camera.rear_doorbell_poe_snapshots_clear
  - delay:
      hours: 0
      minutes: 0
      seconds: 0
      milliseconds: 500
  - data:
      message: Someones at the back door.
      title: Back doorbell press
      data:
        push:
          image: /local/snapshot_rear.png
          sound:
            name: Ding-dong.wav
    action: notify.mobile_app_walters_iphone_15
  - data:
      message: Someones at the back door.
      title: Back doorbell press
      data:
        push:
          image: /local/snapshot_rear.png
          sound:
            name: Ding-dong.wav
    action: notify.mobile_app_marys_iphone
mode: single

Same result. Image is created in /www but no image included with notification and no errors in traces.

The only thing I can guess is that I’m missing something in configuration.yaml but no idea what???

# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
#use ssl
#http:
#  ssl_certificate: /ssl/fullchain.pem
#  ssl_key: /ssl/privkey.pem
# My Home Assistant
my:
# Text to speech
tts:
  - platform: google_translate

# Include
mqtt: !include mqtt.yaml
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
homeassistant:
  customize: !include customize.yaml
  packages: !include_dir_named packages
#mqtt:
#broker: 10.0.1.50
#username: genmon
#password: genmon1234
sensor:
  #OpenWeatherMap conversion
  - platform: template
    sensors:
      wind_speed_mph:
        unique_id: "weather_wind_speed"
        friendly_name: "Weather Wind Speed"
        unit_of_measurement: "mph"
        value_template: "{{(states('sensor.openweathermap_wind_speed')| float * 2.23694) | round(1) }}"
      weather_pressure_inhg:
        unique_id: "weather_atmospheric_pressure"
        friendly_name: "Weather Atmospheric Pressure"
        unit_of_measurement: "inHg"
        value_template: "{{'{0:.2f}'.format(states('sensor.openweathermap_pressure')| float / 33.863886667)}}"
      weather_rainfall_in:
        unique_id: "weather_rainfall_in"
        friendly_name: "Weather Rainfall"
        unit_of_measurement: "in"
        value_template: "{{'{0:.1f}'.format(states('sensor.openweathermap_rain')| float / 25.4)}}"
      weather_snowfall_in:
        unique_id: "weather_snowfall_in"
        friendly_name: "Weather Snowfall"
        unit_of_measurement: "in"
        value_template: "{{'{0:.1f}'.format(states('sensor.openweathermap_snow')| float / 25.4)}}"
      weather_forecast_precipitation_in:
        unique_id: "weather_forecast_precipitation_in"
        friendly_name: "Weather Precipitation Forecast"
        unit_of_measurement: "in"
        value_template: "{{'{0:.1f}'.format(states('sensor.openweathermap_forecast_precipitation')| float / 25.4)}}"
      weather_forecast_pressure_inhg:
        unique_id: "weather_forecast_atmospheric_pressure"
        friendly_name: "Weather Atmospheric Pressure Forecast"
        unit_of_measurement: "inHg"
        value_template: "{{'{0:.2f}'.format(states('sensor.openweathermap_forecast_pressure')| float / 33.863886667)}}"
      forecast_wind_speed_mph:
        unique_id: "weather_forecast_wind_speed"
        friendly_name: "Weather Wind Speed Forecast"
        unit_of_measurement: "mph"
        value_template: "{{(states('sensor.openweathermap_forecast_wind_speed')| float * 2.23694) | round(1) }}"
  # Hive 8 weight
  #  - platform: scrape
  #    name: Hive 8 Weight
  #    resource: https://www.wifihivescale.com/index.php/graph
  #    select: "#t01 > tbody:nth-child(1) > tr:nth-child(4) > td:nth-child(6)"
  #    scan_interval: 3600
  #    unit_of_measurement: lbs
  #    authentication: basic
  #    username: wgstarks
  #    password: !secret hive8_password
alarm_control_panel:
  # Alarm Control Panel Manual
  - platform: manual
    name: shop alarm
    code_arm_required: false
    code: ""
    arming_time: 0
    delay_time: 0
    trigger_time: 4
    disarmed:
      trigger_time: 0
    armed_home:
      arming_time: 0
      delay_time: 0
notify:
  # Email notification
  - name: send_email
    platform: smtp
    server: smtp.mail.me.com
    port: 587
    timeout: 15
    sender: [email protected]
    encryption: starttls
    username: [email protected]
    password: !secret send_email_password
    recipient:
      - [email protected]
    sender_name: Home Assistant
  # Prowl notification
  - name: prowl
    platform: prowl
    api_key: !secret prowl_api
    priority: 2
# Example configuration.yaml entry
media_source:
#frigate lovelace card
#lovelace:
#  mode: yaml
#  resources:
#    - url: /hacsfiles/frigate-hass-card/frigate-hass-card.js
#      type: module
#    - url: /hacsfiles/restriction-card/restriction-card.js
#      type: module

Could really use some help with this.

Siper strange. I though it might be the /media/local OR /local/media mix up based on where you store it that could be the issue as they messed with me in the past.

Here is a test setup I used in an automation. No trigger, just the action and ran it to confirm it works using the media folder (not www as its exposed to the internet). Try this, exclude the WAV, and see if you get the notification to work.

actions:
  - action: camera.snapshot
    metadata: {}
    data:
      filename: /media/test.jpg
    target:
      entity_id: camera.your_camera_name
  - delay:
      hours: 0
      minutes: 0
      seconds: 0
      milliseconds: 500
  - action: notify.mobile_app_your_device_name
    metadata: {}
    data:
      data:
        image: /media/local/test.jpg
      message: Test Image message

Ok now I’m getting somewhere. :tada:
Your test works-

alias: test
description: ""
triggers:
  - type: turned_on
    device_id: 47135e972f93b2ddf2c2dfe8385fb317
    entity_id: 513b6071f0757d5023672cb4144fc508
    domain: binary_sensor
    trigger: device
actions:
  - action: camera.snapshot
    metadata: {}
    data:
      filename: /media/test.jpg
    target:
      entity_id: camera.rear_doorbell_poe_snapshots_clear
  - delay:
      hours: 0
      minutes: 0
      seconds: 0
      milliseconds: 500
  - action: notify.mobile_app_walters_iphone_15
    metadata: {}
    data:
      data:
        image: /media/local/test.jpg
      message: Test Image message

So that means the problem is somewhere in here in my automation-

 - data:
      message: Someones at the back door.
      title: Back doorbell press
      data:
        push:
          image: /media/local/snapshot_rear.jpg
          sound:
            name: Ding-dong.wav
    action: notify.mobile_app_walters_iphone_15

I really want to keep the .wav file and think I probably can, just need to get the action syntax right.

Here’s the full automation just for reference-

alias: back doorbell press
description: Back doorbell activation notification.
triggers:
  - type: turned_on
    device_id: 47135e972f93b2ddf2c2dfe8385fb317
    entity_id: 513b6071f0757d5023672cb4144fc508
    domain: binary_sensor
    trigger: device
conditions: []
actions:
  - action: camera.snapshot
    metadata: {}
    data:
      filename: /config/www/snapshot_rear.jpg
    target:
      entity_id: camera.rear_doorbell_poe_snapshots_clear
  - delay:
      hours: 0
      minutes: 0
      seconds: 0
      milliseconds: 500
  - data:
      message: Someones at the back door.
      title: Back doorbell press
      data:
        push:
          image: /media/local/snapshot_rear.jpg
          sound:
            name: Ding-dong.wav
    action: notify.mobile_app_walters_iphone_15
  - data:
      message: Someones at the back door.
      title: Back doorbell press
      data:
        push:
          image: /media/local/snapshot_rear.jpg
          sound:
            name: Ding-dong.wav
    action: notify.mobile_app_marys_iphone
mode: single

Blockquote

Got it working. :tada: :tada: :tada:
Thanks for showing me the proper syntax. This is what I get for trying to modify an old automation.

alias: back doorbell press
description: Back doorbell activation notification.
triggers:
  - type: turned_on
    device_id: 47135e972f93b2ddf2c2dfe8385fb317
    entity_id: 513b6071f0757d5023672cb4144fc508
    domain: binary_sensor
    trigger: device
conditions: []
actions:
  - action: camera.snapshot
    metadata: {}
    data:
      filename: /media/snapshot_rear.png
    target:
      entity_id: camera.rear_doorbell_poe_snapshots_clear
  - delay:
      hours: 0
      minutes: 0
      seconds: 0
      milliseconds: 500
  - action: notify.mobile_app_walters_iphone_15
    metadata: {}
    data:
      message: Someones at the back door.
      data:
        image: /media/local/snapshot_rear.png
        sound:
          name: Ding-dong.wav
  - action: notify.mobile_app_marys_iphone
    metadata: {}
    data:
      message: Someones at the back door.
      data:
        image: /media/local/snapshot_rear.png
        sound:
          name: Ding-dong.wav
mode: single

I don’t suppose there is an action that will make the notification display with the larger image (instead of the little thumbnail) so I can skip the long press?

Sweet!

Not for for iOS AFAIK. Someone suggest in a thread for Android a critical notification would auto expand. Maybe tinker with the notification type you send.

Is this config still working for you under 2024.11?
Since yesterday I have problems with the image in the notification. It was working great until then. Suddenly it’s not working anymore.

It’s just the notification to ios which gives a problem as in the same automation in parallel I also send a notification to pushover and telegram and there it is working.

Yes. I had updated to 24.11 before creating the automation.