Ring mqtt screenshot notification setup

I’m hoping someone might be able to help with an issue that i’m having with getting a screenshot sent as a notification sent to multiple devices when someone approaches the door.

The automation i have below works to provide the notification on screen on all devices at the time it should…however, the issue is that the screenshot timing is too early/late (not sure which, exactly… I believe it’s late) and shows just a screenshot of my front door view, with no one there.

I’ve tried both the MQTT integration and the native ring integration, neither one i can seem to get working quite right. The timing is the issue, i was hoping someone might be able to advise on where i might be going wrong .

alias: Doorbell motion  popup - test
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.front_door_motion
    to: "on"
condition: []
action:
  - service: camera.snapshot
    data:
      filename: /config/www/tmp/snapshot-doorbell.jpg
    target:
      device_id: 7c816cd6ac0bddadec62317a6da9ac00
  - service: browser_mod.popup
    data:
      browser_id: KitchenFire
      dismissable: true
      autoclose: true
      title: Camera
      size: fullscreen
      timeout: 4000
      content:
        camera_view: live
        type: picture-glance
        entities: []
        camera_image: camera.front_door
    alias: Display Ring Camera on Kitchen Tablet
  - service: notify.rgbmonster
    data:
      message: Someone is at the front door.
      title: Ring Doorbell
      data:
        image: http://homeassistant.local:8123/local/tmp/snapshot-doorbell.jpg
        duration: 5400
    alias: Send Front Door Notification to RGBMonster
    enabled: true
  - service: notify.htpc
    data:
      title: Ring Doorbell
      message: Someone is at the front door.
      data:
        image: http://homeassistant.local:8123/local/tmp/snapshot-doorbell.jpg
        duration: 45
    alias: Send Front Door Notification to HTPC
    enabled: true
  - service: notify.htpc_bedroom
    data:
      data:
        image: http://homeassistant.local:8123/local/tmp/snapshot-doorbell.jpg
        duration: 45
      title: Ring Doorbell
      message: Someone is at the front door.
    alias: Send Front Door Notification to HTPC Bedroom
    enabled: true
  - delay:
      hours: 0
      minutes: 3
      seconds: 0
      milliseconds: 0
  - service: delete.file
    data:
      file: /config/www/tmp/snapshot-doorbell.jpg
    alias: snapshot cleanup
    enabled: true
mode: single

Screenshot of Ring MQTT settings

The trouble you have here is the inherent delay when using cloud and the poor delay on ring’s side.

The motion has to be detected by ring device, then analysed to confirm it’s a true valid motion event, this is then sent to ring server, pushed to HA. In my experience by the time this has all happened the person has long gone.

You could try using the ring’s own snapshot and have ring themselves take snapshots on motion only (not regular interval snapshots) And use the ring mqtt integration.

  - platform: state
    entity_id:
      - camera.front_door_ring_camera_mqtt_snapshot
    attribute: timestamp

This will trigger every time ring server pushes an update to the snaphot entity, however note it will do this even when simply updating url etc, so you will want some conditions to prevent already sent notifications from being sent again.

  - condition: template
    value_template: "{{ trigger.from_state.state and trigger.to_state.state == 'idle' }}"
    
  - condition: template
    value_template: >-
      {{ trigger.from_state.attributes.timestamp !=
      trigger.to_state.attributes.timestamp }}
    

Then something like the following to send the ring snapshot to your device:


          - service: script.turn_on
            target:
              entity_id: script.telegram_bot_send_picture
            data:
              variables:
                url: >-
                  https://xxxxxxxx.ui.nabu.casa{{    
                  states.camera.back_gate_ring_camera_mqtt_snapshot.attributes.entity_picture
                  }}     
                caption: Motion Snapshot From Back Gate 
                inline_keyboard: []

The above are sections from my own automations that should help you build your own.

I have 101 other conditions etc depending of time of day, is the gate open, have we just got home, has the gate been left open, is the notification Boolean on etc.

Note also I am using a script as we have multiple ring devices and local cameras so it’s easy for me to send to a script.

Hopefully there is something there that helps.

We normally get these notifications fairly quickly but confident in the fact that we get them pretty much straight away as soon as ring produces a new snapshot.

I spent almost a day on this. I see that the different way of doing this is triggering based on the timestamp changing which produces a repeated running of the automation. I can see this being more effective due to the way it works. I was never able to get the conditions to work. Entering the condition templates that you showed here caused the automation not to work at all. Perhaps I’m not entering them correctly, but overall, this ended up being a slight improvement as opposed to the way it was working before.