Assist with doorbell notification images

I am trying to get image notifcations to come through from my doorbell to my TV and phone. I have the configuration set to take a snapshot and put image in a folder. The notification also does come through to my TV and phone. Howeever neither has the image attached to it. Cant figure out what I doing wrong. When the notification shows up I can long press on it and it will show a screen like a video is starting but nothing ever plays. May I get some suggestions from the forum?

alias: Doorbell Notify Phone
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.front_door_button_pressed
    to: "on"
condition: []
action:
  - service: camera.snapshot
    data:
      filename: /config/tmp/camera.jpg
    target:
      entity_id: camera.front_door_main
  - service: notify.mobile_app_steven_iphone
    data_template:
      title: DoorBell
      message: DoorBell Ring
      data:
        color: red
        image: /config/tmp/camera.jpg
mode: single

Create a folder in your /config directory called www. So /config/www

Restart Home Assistant. This is important.

/config/www will now map to /local and be available to serve files externally. This folder is not serachable but files in it are viewable by anyone if they know the file name. So I recommend using a random filename if you want to keep it private.

Change your automation to this and reload it:

alias: Doorbell Notify Phone
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.front_door_button_pressed
    to: "on"
condition: []
action:
  - service: camera.snapshot
    data:
      filename: /local/camera_xx76yh886GDrvwo44llqp21m.jpg
    target:
      entity_id: camera.front_door_main
  - service: notify.mobile_app_steven_iphone
    data_template:
      title: DoorBell
      message: DoorBell Ring
      data:
        color: red
        image: /local/camera_xx76yh886GDrvwo44llqp21m.jpg
mode: single

You can use sub-folders in the www directory if you wish. See: HTTP - Home Assistant

3 Likes