RIng snapshot in message with old picture

Hi,

I have created an automation in Home Assitant for my Ring Doorbell.
My suggestion is to notify me with a snapshot in the message when someone hits the doorbell.

For now it works, but the only strange thing that happened, is that the snapshot is not actual.
If I walk to the frontdoor, I’m visible on the Live view in HA. But when I create a snapshot via automation, I’m not visable on the snapshot.

The file is created and visible on the notification. But the picture doesn’t contain the actual data.

I’ve tried several things and add an timestamp as variable, that every picture has an unique filename. But same problem.

My automation:

alias: Test_Ring
description: ""
triggers:
  - trigger: state
    entity_id:
      - event.front_door_ding
    from: null
conditions: []
actions:
  - variables:
      timestamp: "{{ now().strftime('%d-%m-%y-%H-%M-%S') }}"
      jpg_filename: Ring_Snapshot_{{ timestamp }}.jpg
      jpg_path: /config/www/Ring_Snapshots/{{ jpg_filename }}
      jpg_url: https://HA-URL/local/Ring_Snapshots/{{ jpg_filename }}
      mp4_filename: Ring_Video.mp4
      mp4_path: /config/www/Ring_Snapshots/{{ mp4_filename }}
      mp4_url: https://HA-URL/local/Ring_Snapshots/{{ mp4_filename }}
  - action: input_boolean.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: input_boolean.ring_motion_active
  - action: camera.snapshot
    metadata: {}
    data:
      filename: "{{ jpg_path }}"
    target:
      entity_id: camera.front_door_live_view
  - action: notify.mobile_app_NAME
    metadata: {}
    data:
      title: 🔔 Ring
      message: Er is aangebeld bij de voordeur.
      data:
        image: "{{ jpg_url }}"
        actions:
          - action: URI_RING
            title: Open Ring app
            uri: ring://
          - action: URI_HA
            title: Live View (HA)
            uri: https://HA-URL/dashboard-ring/0
mode: single

Output filename: Ring_Snapshot_30-06-25-14-25-49.jpg

Does anyone know how I can fix this issue?

Edit:
I’ve also tried the option camera.turn_on, before the snapshot will be taken.

That looks like the solution, but when I tried to add that option, the snapshot will not be created anymore (also no notification)

I ran into the same problem and solved it like this:

alias: Building door notification
description: ""
triggers:
  - trigger: state
    entity_id:
      - binary_sensor.building_door_ding
    from: "off"
    to: "on"
conditions: []
actions:
  - type: turn_on
    device_id: Xxx
    entity_id: Xxx
    domain: switch
  - delay:
      hours: 0
      minutes: 0
      seconds: 2
      milliseconds: 0
  - action: camera.snapshot
    metadata: {}
    data:
      filename: /config/www/ring_last.jpg
    target:
      entity_id: camera.ring_live_snapshot
  - delay:
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - action: notify.mobile_app_name
    metadata: {}
    data:
      message: Zum Livestream tippen
      title: Es klingelt an der Eingangstür
      data:
        image: >-
          https://mynabucasaID.ui.nabu.casa/local/ring_last.jpg?{{
          now().timestamp() | int }}
        clickAction: /doors-cameras/building-door
        actions:
          - action: URI
            title: Livestream öffnen
            uri: /doors-cameras/building-door
          - action: building_door_unlock
            title: Tür öffnen
  - delay:
      hours: 0
      minutes: 0
      seconds: 30
      milliseconds: 0
  - type: turn_off
    device_id: Xxx
    entity_id: Xxx
    domain: switch
mode: single

/doors-cameras/building-door is a dashboard view
There is also a second automation to actually trigger the unlocking of the door.

It basically activates the live stream via MQTT Ring integration, takes a snapshot of this livestream, sends it to me but also gives me the option to either unlock or open a card of the livestream. I use a Ring StickUp cam with a battery and no Ring subscription. I also had trouble accessing the snapshot without Nabu Casa.

The only problem I have is that the trigger works when I simulate it to go to on in the dev tools but when the actual doorbell is rung, it only triggers an event, the binary sensor state is not recorded. Still looking for a solution for this because as I understand it the event cannot trigger that automation.