Frigate Mobile App Notifications 2.0

Firstly, really appreciate the work that has gone into this automation , it really is top notch.

I have been using it for the past 3 months, and the only issue I have is with “cooldown” period. It has no effect on my notifications.

EG. I have a camera pointing at my door. I will get 5-6 notifications in quick succession as they walk up to the door. EG Each frigate notification generates a discrete notification through the automation.

Am I misunderstanding how the cooldown option is meant to work, or is something broken?

Thx alot…will try that

Fantastic !

Thank you so much for this line 164 edit, which has now allowed my notifications to finally work !

1 Like

You should receive one notification per event but a notification can have multiple updates. So are you getting 5-6 notifications that can individually be viewed/swiped away or one notification and several updates?

The cooldown does generally work and stops new events {I.e new objects) triggering a notification inside of the time set.

I’d need to see details of consecutive traces that you think should be stopped by a cooldown including a screenshot from the phone and of frigate showing the event timestamps. If you’d like to do this it might be best via PM to avoid clogging this thread as it might take a bit of back and forth.

1 Like

That is a good point. Its one notification that can be swiped away, rather than multiple ones. It updates the image constantly throughout the motion and triggers an android notification sound each time. This results in my phone binging 5-10 times when somebody walks up the drive etc.

Sure thing, I will PM you

In that case, enable Alert Once on my fork which should mute the updates. It’s just above Update Thumbnail in the UI.

1 Like

Can confirm both these options work great on both iPhone’s and Android’s :eyes:

1 Like

FYI, you were on the money :slight_smile: Reconfigured MQTT in Frigate config and everything is working perfectly! Thank you!!!

p.s. And apologies for the false error messages.

1 Like

Still getting 404: not found on the notifications. The snapshot is displayed properly in the notification, but attempting to look at the clip or screenshot always 404’s

Can you screenshot the 404 please?

Can you view the clip and snapshot using the frigate interface?

Can you access home assistant outside your network?

@SgtBatten

Thank you for all your work on this blueprint, it works very well and the best i’ve come across.

I am trying to send notification to android mobile and android TV using a notification group.

Frigate Notifications work fine to mobile using the group but do not arrive to the tv using your automation (tried 0.11.0.8 and 0.11.0.8b)

Test with developer tools / services and notifications go thru to both phone and TV using same group.

Any suggestions?

The way I have it setup currently won’t do a group with phones and the tv app.

The issue I’m trying to resolve is to get images displayed on the tv.

We have two options.

  1. We forget the pictures and then I can enable groups like you have just tried.

  2. I keep trying to solve the image problem, but groups won’t be possible containing both.

The issue is the formatting of the image url needs to be different for mobiles vs tv.

In any case, I’m leaning towards option 1 because so far I have not got images figured out at all.

For now, create a second automation for your tv notifications.

@SgtBatten

Thank you. I’ll try your suggestions and see how I go.

I did find this link which may help you with image notifications to tv. Maybe. :slight_smile:
https://suverent.org/2022/02/05/home-assistant-notification-automation-to-android-tv/

Thanks I will take a look.

I forgot to mention you need to set the toggle to true for tv notifications down where the tv settings are. That’s why the group doesn’t work currently.

@SgtBatten

Thanks, turning on the toggle to True for TV notifications did the trick. I’m just running two automations as suggested to get mobile and TV notifications.

I look forward to your next progress on this. I’m sure you’ll work out images to TV.

Hello everyone I am also interested in the possibility of receiving a message in telegram. I assume that you need to change the notification capability in the frigate_0.11_notification file.yaml is somewhere here:

device:
integration: mobile_app
multiple: false
notify_group:
name: Notification Group

1 Like

I just had a quick look at telgram and it may be fairly easy to get most functionality working.

What happens if you type the name of your telegram notification group/service in the notification group section? do you at least get the title and message? If there is an error, please provide it.

The blueprint relies on mqtt messages as the trigger.

The MQTT config in frigate.yaml is meant to contain the username and password of your mqtt application (mqtt addon in your case)
You can setup a login for frigate in the config for mqtt
image

I have image notifications to the tv working in beta 8c.
If you want to do a group that has both android TV and android phones you can notify both but you have to chose which one gets the snapshot using the TV Notifications toggle. Otherwise you can still continue to get snapshots on both by having two separate automations.

1 Like

I tested my MQTT with the offical frigate automation. With this one everything is perfectly working. With your latest beta I don’t receive anything.

This snippet is the offical way for notifications that is working.

alias: Notify of events
description: ""
trigger:
  - platform: mqtt
    topic: frigate/events
action:
  - service: notify.mobile_app_iphone_von_XY
    data_template:
      message: A {{trigger.payload_json["after"]["label"]}} was detected.
      data:
        image: >-
          https://ha.homeassistant.de/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg?format=android
        tag: "{{trigger.payload_json[\"after\"][\"id\"]}}"
        when: "{{trigger.payload_json[\"after\"][\"start_time\"]|int}}"

Is there some incompatibility with my frigate versions?

Frigate HACS 3.0.0/0.11.1-2eada21
Frigate Add-On 0.11.1

This is my frigate.yaml:

mqtt:
  host: 192.168.178.3
  port: 1883
  client_id: frigate
  topic_prefix: frigate
  user: mqtt-user
  password: mqtt

birdseye:
  enabled: True
  width: 1280
  height: 720
  quality: 8
  mode: objects

#//Sound in recording
ffmpeg:
  output_args:
    record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac

objects:
  track:
    - person

snapshots:
  enabled: True
  timestamp: True
  height: 480
  retain:
    default: 10
    objects:
      person: 15

record:
  enabled: True
  expire_interval: 60
  retain:
    days: 0
    mode: motion
  events:
    pre_capture: 5
    post_capture: 10
    objects:
      - person
    retain:
      default: 2
      mode: motion
      objects:
        person: 2

detect:
  width: 640
  height: 480
  fps: 7
  enabled: True

motion:
  threshold: 25
  contour_area: 25

live:
  height: 480
  quality: 8

timestamp_style:
  position: "tl"
  format: "%d/%m/%Y %H:%M:%S"
  color:
    red: 255
    green: 255
    blue: 255
  thickness: 2
  effect: solid

cameras:
  reo-camera-1-frigate:
    ffmpeg:
      inputs:
        - path: rtsp://admin:[email protected] #//h264Preview_01_sub
          roles:
            - rtmp
            - record
        - path: rtsp://admin:[email protected]//h264Preview_01_sub
          roles:
            - detect

Can’t say for sure but do you have the payload from any mqtt messages you can view? maybe from the trace of the frigate example that did work?

i suspect it might be due to use of hyphens in the cam name. if the payload contains the camera name with hyphens that is problematic. I know there are a bunch of historical posts in this thread about using underscores instead of hyphens.

In anticipation of the response being yes, i’ve updated beta 8d with a possible fix for you to try.

is there a bug with notification delay? Its set to 300second, and home assistant says the notification is being triggered constantly via “last triggered” on automation dashboard because it can see cars on the road. The phones are not notified because the cars must be on driveway as it is a zone filter. This is expected behavior… however now when a car crosses driveway, no notification is sent to the phones because the blueprint is forever on cooldown from seeing cars on the road despite road not being on zone filter!

Using 0.11.0.6f