Frigate Mobile App Notifications 2.0

I’d love to thee the Mqtt trigger message for that one. You’ll find it by selecting the trigger node at the top and then changed variables I believe.

I’m unable to get notification on my FireTV … is it working for anybody else?

FWIW - I installed Notifications for FireTV, notifications settings are not blocked, setup the integration service in HASS successfully, setup the group notifications in HASS successfully, and notifications are sent to my phone but not to the FireTV. I do not see any errors in HASS logs even with debug enabled on the automation. I do sometimes see a number bubble under notifications on the FireTV which I can dismiss but the FireTV never pops anything open even if I’m just at the home screen.

I read FireTV is focusing to cutoff 3rd party applications soon but can’t imagine it’s already implemented.

What else can I check?

Hi there. I have what is probably a simple mistake but I’ve searched and can’t find the solution. My setup is mostly working. My cat walks into frame and a notification is sent to my iPhone. But when I click the notification it just opens a local url tab in safari showing the snapshot. So my problem is how do I get to the actionable buttons? I really need the option to “silence new notifications “. Am I correct in assuming the notification should open in the home assistant app and then I would click the picture for it to open the snapshot in an url?

Also when I turn on the “Live View - iOS only (Optional)” option it doesn’t seem to work. But my guess is the initial problem has something to do with it.

Thanks for any help in advance

I keep getting this result as well and no app notifications.
The first time I tried this blueprint was this morning and got 2 notifications. After that, all I get is “no action taken”
I am at work right now and only have access to my phone but if there is any details needed, I’ll try to post them.

I suggest not trying to do phones and tv with one automation.

You can’t sent images to both as part of a group. Only one or the other.

Long press the notification on iOS.

Thanks. That worked. Figured it was something simple

I have 2 cameras. One is wyze v3 with rtsp firmware and one ring video door bell. I managed to get notifications on both of them. However, From the wyze notification I managed to watch the clip through my external home assistant instance but not from the ring video door bell. I pretty much duplicated the automation so it’s the same for both.
I get this message when I click play clip

{“message” : “Event not found” , “success” :false}

Apparently, I am not the only one (github issue)

For everyone suffering from the notification actions not opening the app on their phone, I set the base url as:

homeassistant://

Which means the full url looks something like:

homeassistant://api/frigate/...

This convinced my Android phone to always open the app, may also work on iOS

1 Like

I’m seeing a pattern. When I don’t get a person notification I see a car mqtt message in the trace but no person message. Frigate is sending car detection mqtt message and person mqtt message. Frigate is creating a person event but no car event because car is not a detectable object in the porch zone. I think the blueprint code is busy processing the car message and never sees the person mqtt message so “it never happened”

When I get a notification there is person mqtt message in the trace. Are you capturing all mqtt mesages and queuing them for notification processing? If not your code may not be fast enough to process multiple mqtt messages that arrive in rapid succession and you’re missing them. Or your cooldown timer might be falsely triggering for the car object and that filters out he person object from being processed. Those are just WAGS for the failure but clearly, a person object was sent and missed by the notification. It may be a “race” situation where if the person mqtt message arrives first it is processed but if car mqtt arrives first, the person message arriving later is not processed
I see this problem when a person walks by a car onto the walkway that’s part of the porch zone

The following is a trigger message for a new failure in the same scenario as was reported above.

this:
  entity_id: automation.person_detected_on_front_porch_3
  state: 'on'
  attributes:
    id: '1708796733326'
    last_triggered: '2024-02-29T19:05:24.213821+00:00'
    mode: parallel
    current: 0
    max: 10
    friendly_name: Person Detected on Front Porch
  last_changed: '2024-02-29T11:14:34.006311+00:00'
  last_updated: '2024-02-29T19:05:24.220734+00:00'
  context:
    id: 01HQV43KFG1YFD0XQT9M34ZBAE
    parent_id: null
    user_id: null
trigger:
  id: frigate-event
  idx: '1'
  alias: null
  platform: mqtt
  topic: frigate/events
  payload: >-
    {"before": {"id": "1709233560.721723-baql28", "camera": "doorbell",
    "frame_time": 1709233560.721723, "snapshot": null, "label": "car",
    "sub_label": null, "top_score": 0.0, "false_positive": true, "start_time":
    1709233560.721723, "end_time": null, "score": 0.9453125, "box": [726, 350,
    848, 412], "area": 7564, "ratio": 1.967741935483871, "region": [542, 210,
    862, 530], "stationary": false, "motionless_count": 0, "position_changes":
    0, "current_zones": [], "entered_zones": [], "has_clip": false,
    "has_snapshot": false, "attributes": {}, "current_attributes": []}, "after":
    {"id": "1709233560.721723-baql28", "camera": "doorbell", "frame_time":
    1709233560.967374, "snapshot": {"frame_time": 1709233560.967374, "box":
    [729, 352, 855, 411], "area": 7434, "region": [557, 211, 877, 531], "score":
    0.9453125, "attributes": []}, "label": "car", "sub_label": null,
    "top_score": 0.939453125, "false_positive": false, "start_time":
    1709233560.721723, "end_time": null, "score": 0.9453125, "box": [729, 352,
    855, 411], "area": 7434, "ratio": 2.135593220338983, "region": [557, 211,
    877, 531], "stationary": false, "motionless_count": 0, "position_changes":
    1, "current_zones": [], "entered_zones": [], "has_clip": false,
    "has_snapshot": false, "attributes": {}, "current_attributes": []}, "type":
    "new"}
  qos: 0
  description: mqtt topic frigate/events
  payload_json:
    before:
      id: 1709233560.721723-baql28
      camera: doorbell
      frame_time: 1709233560.721723
      snapshot: null
      label: car
      sub_label: null
      top_score: 0
      false_positive: true
      start_time: 1709233560.721723
      end_time: null
      score: 0.9453125
      box:
        - 726
        - 350
        - 848
        - 412
      area: 7564
      ratio: 1.967741935483871
      region:
        - 542
        - 210
        - 862
        - 530
      stationary: false
      motionless_count: 0
      position_changes: 0
      current_zones: []
      entered_zones: []
      has_clip: false
      has_snapshot: false
      attributes: {}
      current_attributes: []
    after:
      id: 1709233560.721723-baql28
      camera: doorbell
      frame_time: 1709233560.967374
      snapshot:
        frame_time: 1709233560.967374
        box:
          - 729
          - 352
          - 855
          - 411
        area: 7434
        region:
          - 557
          - 211
          - 877
          - 531
        score: 0.9453125
        attributes: []
      label: car
      sub_label: null
      top_score: 0.939453125
      false_positive: false
      start_time: 1709233560.721723
      end_time: null
      score: 0.9453125
      box:
        - 729
        - 352
        - 855
        - 411
      area: 7434
      ratio: 2.135593220338983
      region:
        - 557
        - 211
        - 877
        - 531
      stationary: false
      motionless_count: 0
      position_changes: 1
      current_zones: []
      entered_zones: []
      has_clip: false
      has_snapshot: false
      attributes: {}
      current_attributes: []
    type: new
input_camera: camera.doorbell
camera: doorbell
mqtt_topic: frigate/events
camera_name: Doorbell
input_base_url: redacted
base_url: redacted
update_sub_label: false
input_client_id: ''
client_id: ''
attachment: snapshot.jpg?crop=1
alert_once: false
update_thumbnail: false
ios_live_view: camera.doorbell
android_auto: false
notify_group: Family_Notification
notify_group_target: family_notification
zone_only: true
input_zones:
  - porch
zones:
  - porch
zone_multi: false
input_labels:
  - person
labels:
  - person
presence_entity: ''
disable_times:
  - '0'
  - '2'
  - '1'
  - '3'
  - '4'
  - '5'
  - '6'
cooldown: 15
loitering: false
loiter_timer: 0
initial_delay: 0
fps: 5
state_only: true
input_entity: lock.front_door
input_states:
  - locked
  - Locked
states_filter:
  - locked
  - locked
color: '#f44336'
sound: default
sticky: true
tv: false
tv_position: bottom-right
tv_size: large
tv_duration: 10
tv_transparency: 0%
tv_interrupt: false
debug: true
1 Like

First of all, thanks for this great Blueprint!

I have a general question with regard to my Apple Watch.

Í´m using the latest stable of this blueprint. All triggered notifications working perfectly on my Iphone, including all action button options displaying whatever, or selecting silence.

I get also triggered the individual notifications on my Apple Watch, including the preset snapshot image/jpg (or live stream).

However, all actions buttons are not working. If any selected, the Apple Watch is pointed to 2 scenes which I have setup in HA, but which are not in any relation to this Blueprint or its settings.

One sample link which I got from the Log:

View Snapshot https://xxxxxx.duckdns.org:8123/api/frigate/notifications/1709236610.141417-m5fian/snapshot.jpg

This links are also working in any local PC-Browser and displaying what expected.

What I get on the Apple Watch:

Wondering if an Apple Watch is in general compatible with regard to all features this Blueprint offers?

Haven not found an answer by searching so far.
Maybe also an issue between the HA IOS App ans my Apple Watch?

BR

Great find. how does live view respond?

Some good observations.

I already know/ believe this is the case as i’ve seen debug loops showing zone changes that clearly have a missing step in between. Often people don’t provide enough information for conclusions to be made when they report issues, either because it’s not obvious what the context of the problem is or simply lack of understanding of the workflow, which is understandable.

The more people request gets added the worse it will likely get.

Queuing the messages sounds interesting but also potentially risky if we don’t include some sort of timeout I’m guessing.

My setup is incredibly simple, I use frigate config to do the heavy lifting. I don’t detect cars, or cats, just people. I have simple, large zones that are built around how frigate determines zone occupancy (bottom middle of the bounding box, not middle of an object). I have separate automations for my TV and other individual devices as it gives the most flexibility in terms of when each phone gets notified.

Of course I’ve built the added features to work based on testing them all as best i can, but it’s become quite a configurable blueprint with a lot of variables.

View Clip opens in app and plays

View Stream opens in app and plays

View Snapshot opens in app but fails
{“message”: “Snapshot not available”,“success”:false}
I’ve seen others mention this but haven’t investigated yet, not sure if this is a frigate issue or a notification issue.

The main issue, which I think has been mentioned, is that when these do open in the app there’s no navigation available so I either have to close the app or have it not fullscreen so the standard Android < button appears at the bottom, but obviously this takes screen estate on all other screens when I don’t need it.

I get around this by having a custom url “/lovelace/frontdoor” for the default action which has a live stream of the camera. I haven’t worked out how to get the clips on there yet though (separate issue with the frigate custom card not loading in the app)

2 Likes

If not your code may not be fast enough to process multiple mqtt messages that arrive in rapid succession and you’re missing them.

I’m not sure about theory here. MQTT is a queue, the messages stay on the queue until they are read. You shouldn’t miss any, that’s the whole point of having a queue. There could be an issue within HA itself and how it handles MQTT, but that wouldn’t be my first guess.

I haven’t really looked into the blueprint code, but from above comments where multiple object are detected and an unwanted object type is found first (e.g. car, or dog, or bike, etc.) is that initiating the cooldown? I would move the object filter to be the first thing you check for and then bail out immediately without initiating the cooldown or anything else. That way when you do get the message with the object that you care about then the automation should then fire correctly? As I said I haven’t really looked at the code yet so feel free to totally ignore me if I’m way off!

My exact thought as well. If it’s not a person [as in my case] then nothing else matters

I don’t know the internals of Frigate/ HA so I don’t know how those mqtt messages are created, consumed, and removed from the queue. Is is possible that frigate [or some other HA process] is removing them before the blueprint sees them?

Why do you process the MQTT and not use the Frigate detection event? This is what I did before trying your BluePrint because of the additional features. Let Frigate determine zone presence. Why do it again?
My previous automation that worked

alias: Person Detected on Front Porch
description: ""
trigger:
  - type: occupied
    platform: device
    device_id: 1d6b6b0373474153b48b8f6ecec9937e
    entity_id: e527c1542b7226c8ecec5a2afce70022
    domain: binary_sensor
condition:
  - condition: state
    entity_id: lock.front_door
    state: locked
    for:
      hours: 0
      minutes: 0
      seconds: 15
  - condition: time
    after: "07:00:00"
    before: "23:00:00"
    weekday:
      - sun
      - mon
      - tue
      - wed
      - thu
      - fri
      - sat
action:
  - service: notify.family_notification
    data:
      title: ALERT!
      message: Person detected on front porch
      data:
        url: /dashboard-cameras
        clickAction: /dashboard-cameras
  - service: chime_tts.say
    data:
      chime_path: bells
      delay: 700
      message: Person detected on front porch
      tts_platform: tts.piper
      tts_playback_speed: 100
      volume_level: 1
      cache: true
      announce: true
    target:
      device_id: 5ee58c347fd86dda99e9d12179b1cd7e
  - delay: "00:05:00"
mode: single
max_exceeded: silent

I may go back to using that and extract the additional features I like from your yml. I need reliable notifications more than I need nice features

Perfectly adequate automation.

The main reason is so we can update the notification. Your trigger would only work once where as this blueprint can update the notification with better images, dynamic zone information, the name of the detected person etc. I suspect many people who use this blueprint don’t need to but it offers a lot of options.

1 Like

I believe any time the action is run the last triggered time gets updated. So yes.

It may be as simple as incorporating the object check in the trigger. Something I’ll try to remember to look into

Ah ok, I understand what’s happening now.

Looking at some other automations, it looks like last_triggered is not updated if a condition fails. Here’s a simple automation of mine which tries to turn the lights off at bed time unless the TV is still on:

- id: '1684184426890'
  alias: Lights - Off at bed time
  description: Turn off lights at bed time unless TV on
  trigger:
  - platform: time
    at: input_datetime.bed_time
  condition:
  - condition: state
    entity_id: media_player.fire_tv_snug
    state: unavailable
  action:
  - service: scene.turn_on
    target:
      entity_id: scene.bed_time
    metadata: {}
  mode: single

This does not update the last_triggered time if the condition that’s checking if the TV is still available fails. So perhaps that could work.

Hello,

I’m having an issue with trying to send a notification to my Shield TV using the blueprint. I have the current beta bluprint. I guess I’m really not sure what to put in the “Notification Group or Android/Fire TV (Optional)” section. I tried putting “media_player.shield_tv” which is the name of it in HA. I’m sure there’s something else I am missing. Would anyone be able to help with this?

Adding that it does work with mobile notifications, just can’t get it to work with the Shield TV.