How to send frigate event snapshot to telegram?

You can create a template condition in your automation:

{{ 'end' in trigger.payload_json['type'] }}

Should only trigger once per ID.

Thank you all for sharing your knowledge regarding sending notifications for Frigate objects. I was able to get this working for Telegram this morning. I probably never would have been able to find all the pieces to put this together.
Again, Thank you all.

I am happy to say that this works for me. BUT i am getting all feeds from all my cameras when someone is detected… how do i limit it to say Alley camera?

alias: auto send photo to telegram Detected human in alley camera frigate 2023 10
description: ""
trigger:
  - platform: mqtt
    topic: frigate/events
action:
  - service: notify.telegram
    data_template:
      message: A {{trigger.payload_json["after"]["label"]}} was detected.
      data:
        photo:
          - url: >-
              http://192.168.1.229:8123/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/snapshot.jpg
            caption: >-
              'A {{trigger.payload_json["after"]["label"]}} was detected at the
              Front {{trigger.payload_json["after"]["entered_zones"]}}'.'
mode: single
initial_state: true

these are my 4 cameras in Frigate:

Try this drawing.

thanks. i know something is working because the BluePrint was triggered

but i got nothing on my Telegram.
here is my BluePrint setting. am i missing anything?

update. finally working now once i added this base URL in which is where my HA is on the local network


thanks everyone!!!

1 Like

using the BluePrint, which 1 of these events trigger Frigate to send photo? now i am so confused…
how to filter only for Occupancy?

i thought this would work but it did not. got no alerts when i added this entity in:

here’s an example of a mqtt when i listen in on frigate/events:
{“before”: {“id”: “1699378871.757051-3dke43”, “camera”: “garage”, “frame_time”: 1699378877.427975, “snapshot_time”: 1699378873.766659, “label”: “person”, “sub_label”: null, “top_score”: 0.80078125, “false_positive”: false, “start_time”: 1699378871.757051, “end_time”: null, “score”: 0.6640625, “box”: [916, 572, 1056, 706], “area”: 18760, “ratio”: 1.044776119402985, “region”: [820, 400, 1140, 720], “stationary”: false, “motionless_count”: 0, “position_changes”: 1, “current_zones”: [], “entered_zones”: [], “has_clip”: false, “has_snapshot”: true}, “after”: {“id”: “1699378871.757051-3dke43”, “camera”: “garage”, “frame_time”: 1699378896.410916, “snapshot_time”: 1699378873.766659, “label”: “person”, “sub_label”: null, “top_score”: 0.818359375, “false_positive”: false, “start_time”: 1699378871.757051, “end_time”: null, “score”: 0.734375, “box”: [946, 264, 1122, 427], “area”: 28688, “ratio”: 1.0797546012269938, “region”: [869, 183, 1189, 503], “stationary”: true, “motionless_count”: 51, “position_changes”: 1, “current_zones”: [], “entered_zones”: [], “has_clip”: false, “has_snapshot”: true}, “type”: “update”}

how do i publish a MQTT for force the camera to send something via Telegram?
i tried here but i get syntax error:

Hej! I think it’s just because you forgot to specify the topic “frigate/events”.

it is not clear to me either how I can send a picture of an entity on Telegram. I also have frigate installed and I also added frigate integration in devices. I now have image.back_person in entities and this shows the most recent detected picture. Is it still possible to send the media content of this entity directly via telegram pic?

Thank you