Can't Send a photo attached to a text message (Driving me crazy)

I’m trying to do something that I would think would be super easy to do.

I’m trying to take a snapshot from a camera and then send that snapshot to my phone/device.

I’ve read many threads/manuals and the whole where to place the image and where to pull the image from to send it. Some guides say I have to make directories accessible.

Can somebody tell me the two lines of automation to

  1. take snapshot
  2. send snapshot


Hi Mike,

This is how I accomplish this. I use a combination of automation & script with the source camera image being captured from my BlueIris system & saved to an FTP folder on my HA box. Maybe reading through this config will help.

Automation:

alias: "cctv: camera motion snapshot and notify (front porch)"
description: >-
  when front porch cctv camera detects a person send a photo to some phones,
  play a sound on a speaker & display a live camera feed on the kitchen display.
mode: queued
max: 5
triggers:
  - entity_id: binary_sensor.bi_front_porch_camera_motion
    from: "off"
    to: "on"
    id: porch_motion
    trigger: state
conditions:
  - condition: time
    after: "07:00:00"
    before: "21:30:00"
    weekday:
      - mon
      - tue
      - wed
      - thu
      - fri
      - sat
      - sun
  - condition: state
    entity_id: input_boolean.motion_notification_paused
    state: "off"
  - condition: state
    entity_id: alarm_control_panel.home
    state: disarmed
  - condition: state
    entity_id: binary_sensor.xiaomi_vib_01
    state: "off"
    for:
      hours: 0
      minutes: 2
      seconds: 0
actions:
  - data: {}
    action: script.media_play_doorbell_sound
  - data:
      title: |
        CCTV Motion - Person
      message: |
        on {{ (trigger.to_state.name).split(' ')[1] }} camera.
      file: >
        {% set file = (trigger.to_state.name).split(' ')[1] %}  {{
        '/media/cctv/' + file + '.jpg' }}
    enabled: true
    action: script.notify_pushover_with_attachment

Script:

alias: "notify: pushover with attachment"
sequence:
  - data:
      title: "{{ title }}"
      message: "{{ message }}"
      data:
        attachment: "{{ file }}"
    action: notify.pushover_notify
mode: queued
max: 10

Did you have to make changes to your config yml file to make that folder accessible?

I can save the snapshot, but it just won’t send it.

What log files can I look in for more info.

I’m very new to all this, but I’d imagine it would be throwing an error in a log somewhere.