Frigate Mobile App Notifications 2.0

Last I knew, the beta parses the new sublabel format from Frigate, not sure when SgtB is moving that to the stable version (it requires the latest Frigate, which you clearly have). It’s tricky since there’s no easy way to tell which sublabel format to consume. TLDR; switch to the beta blueprint.

I’m having trouble getting the notification to fire. I’m on the beta version. I don’t know if it’s related, but the mqtt event fires 3 minutes and 2 seconds after the zone gets triggered and the cooldown is set to 180 seconds (3 minutes). But it looks like the state test is failing. I also tried the zone test and it was failing as well. But when I check HA while standing in front of the camera the state switch is on and the zone is occupied. So I’m not sure why the tests are failing. I’ve walked out and stood in front of the camera about 30 times with different settings and it fails to fire 90+% of the time.

I tried to diagnose in Traces but it’s pretty complicated and I can’t make sense of why it’s going to Choose: No Action.

Can anyone point me in the right direction to diagnose why it’s not working? I’m using another notification that is triggered by front_door_person occupancy and it works fine (but doesn’t have near the features of this blueprint).


Frigate Notification DEBUG: Info: fps: 5, frigate event id: 1708390393.943537-rhpbgr, object (formatted): car (Car), Config: camera(formatted): doorbell(Doorbell), Base URL: , critical: False, alert once: True, Update Thumbnails: True, Video: /api/frigate/notifications/1708390393.943537-rhpbgr/doorbell/clip.mp4, Target: Mobile Device cooldown: 180s, loiter timer: 0s, initial delay: 0s, color: #03a9f4, sound: default, android_auto: False, Group: doorbell-frigate-notification, Channel: , Sticky: False, Title: Frigate Doorbell Notification, Message: Car detected - Doorbell, Subtitle: , tap_action: /api/frigate/notifications/1708390393.943537-rhpbgr/doorbell/clip.mp4, button 1 Text/URL/Icon: View Clip (/api/frigate/notifications/1708390393.943537-rhpbgr/doorbell/clip.mp4) , button 2 Text/URL/Icon: View Snapshot (/api/frigate/notifications/1708390393.943537-rhpbgr/snapshot.jpg) , button 3 Text/URL/Icon: Silence New Notifications (silence-doorbell) , icon: mdi:home-assistant tv: False, tv_position: center, tv_size: large, tv_duration: 10, tv_transparency: 0%, tv_interrupt: False, Filters: Zones: zone filter toggle on: False, Multi Zone toggle on: False, Required zones: [], Entered Zones: [], Zone Filter TEST: PASS, Required objects TEST: Input: ['person'], TEST: FAIL presence entity (not home): Entity: TEST: PASS, disabled times: [], State Filter: state filter toggle on: True, state filter entity: binary_sensor.front_door_person_occupancy, required states: ['on'], State Filter TEST: FAIL, Custom Filter: True, triggered by automation Doorbell Frigate Notifications (0.12.0.3)  mqtt topic frigate/events

That particular one was a car detection but you require person so it failed.

If you want to get notified about a person who gets out of a car, you won’t want to be using the cooldown. Because the car event will cause the cooldown to skip the person.

Thanks for the reply. I might have sent the debug info for the wrong case.

I just want to be notified when a person is in the front door zone. I’m just trying to get it working simply to start.

Here’s an example with the state of front_door_person_occupancy required to be ‘on’:

Frigate Notification DEBUG (in loop): Info: Last Zones: ['front_door'], Current zones: ['front_door'], sublabel: None, iOS sound: True, Android Sound: disabled by alert once, iOS url: /api/frigate/notifications/1708398723.275887-30vt4x/doorbell/clip.mp4 video: "/api/frigate/notifications/1708398723.275887-30vt4x/doorbell/clip.mp4" critical: False, Triggers: New Snapshot: False, Presence Changed: False, stationary moved: False, entered zones changed: False, sublabel changed: False, Conditions: Loitering: 0 or Presence Entity not home: OFF - PASS, zone filter TEST: OFF - PASS, multi-zone filter: OFF - PASS, state filter TEST: ON - FAIL, Custom Filter: ON - PASS, image: "/api/frigate/notifications/1708398723.275887-30vt4x/snapshot.jpg?crop=1" triggered by automation Doorbell Frigate Notifications (0.12.0.3)  mqtt topic frigate/events

And here’s an example with the zone filter on, with both ‘person’ required and ‘front_door’ required. In this one, it fails the zone test, but the front door person occupancy was on at the time and didn’t clear until 15 seconds later. It also worked a bit earlier, so it’s an intermittent issue.

Frigate Notification DEBUG (in loop): Info: Last Zones: [], Current zones: [], sublabel: None, iOS sound: True, Android Sound: disabled by alert once, iOS url: /api/frigate/notifications/1708400812.133242-athgm0/doorbell/clip.mp4 video: "/api/frigate/notifications/1708400812.133242-athgm0/doorbell/clip.mp4" critical: False, Triggers: New Snapshot: False, Presence Changed: False, stationary moved: False, entered zones changed: False, sublabel changed: False, Conditions: Loitering: 0 or Presence Entity not home: OFF - PASS, zone filter TEST: ON - FAIL, multi-zone filter: OFF - PASS, state filter TEST: OFF - PASS, Custom Filter: ON - PASS, image: "/api/frigate/notifications/1708400812.133242-athgm0/snapshot.jpg?crop=1" triggered by automation Doorbell Frigate Notifications (0.12.0.3)  mqtt topic frigate/events

And here’s the Changed Variables from the initial trigger for that event:

this:
  entity_id: automation.doorbell_frigate_notifications_0_12_0_3
  state: 'on'
  attributes:
    id: '1708230509280'
    last_triggered: '2024-02-20T03:46:52.555676+00:00'
    mode: parallel
    current: 1
    max: 10
    friendly_name: Doorbell Frigate Notifications (0.12.0.3)
  last_changed: '2024-02-20T03:37:52.323112+00:00'
  last_updated: '2024-02-20T03:46:52.555774+00:00'
  context:
    id: 01HQ29Z8G9KJJQ104VG67X38MH
    parent_id: null
    user_id: null
trigger:
  id: frigate-event
  idx: '1'
  alias: null
  platform: mqtt
  topic: frigate/events
  payload: >-
    {"before": {"id": "1708400814.560237-ng8io4", "camera": "doorbell",
    "frame_time": 1708400814.560237, "snapshot": null, "label": "person",
    "sub_label": null, "top_score": 0.0, "false_positive": true, "start_time":
    1708400814.560237, "end_time": null, "score": 0.83203125, "box": [888, 299,
    1374, 1885], "area": 770796, "ratio": 0.3064312736443884, "region": [0, 0,
    2036, 2036], "stationary": false, "motionless_count": 0, "position_changes":
    0, "current_zones": [], "entered_zones": [], "has_clip": false,
    "has_snapshot": false, "attributes": {}, "current_attributes": []}, "after":
    {"id": "1708400814.560237-ng8io4", "camera": "doorbell", "frame_time":
    1708400814.83677, "snapshot": {"frame_time": 1708400814.83677, "box": [909,
    375, 1405, 1752], "area": 682992, "region": [0, 0, 1988, 1988], "score":
    0.84375, "attributes": []}, "label": "person", "sub_label": null,
    "top_score": 0.82421875, "false_positive": false, "start_time":
    1708400814.560237, "end_time": null, "score": 0.84375, "box": [909, 375,
    1405, 1752], "area": 682992, "ratio": 0.36020334059549747, "region": [0, 0,
    1988, 1988], "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: 1708400814.560237-ng8io4
      camera: doorbell
      frame_time: 1708400814.560237
      snapshot: null
      label: person
      sub_label: null
      top_score: 0
      false_positive: true
      start_time: 1708400814.560237
      end_time: null
      score: 0.83203125
      box:
        - 888
        - 299
        - 1374
        - 1885
      area: 770796
      ratio: 0.3064312736443884
      region:
        - 0
        - 0
        - 2036
        - 2036
      stationary: false
      motionless_count: 0
      position_changes: 0
      current_zones: []
      entered_zones: []
      has_clip: false
      has_snapshot: false
      attributes: {}
      current_attributes: []
    after:
      id: 1708400814.560237-ng8io4
      camera: doorbell
      frame_time: 1708400814.83677
      snapshot:
        frame_time: 1708400814.83677
        box:
          - 909
          - 375
          - 1405
          - 1752
        area: 682992
        region:
          - 0
          - 0
          - 1988
          - 1988
        score: 0.84375
        attributes: []
      label: person
      sub_label: null
      top_score: 0.82421875
      false_positive: false
      start_time: 1708400814.560237
      end_time: null
      score: 0.84375
      box:
        - 909
        - 375
        - 1405
        - 1752
      area: 682992
      ratio: 0.36020334059549747
      region:
        - 0
        - 0
        - 1988
        - 1988
      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: ''
base_url: ''
input_client_id: ''
client_id: ''
attachment: snapshot.jpg?crop=1
alert_once: true
update_thumbnail: true
ios_live_view: ''
android_auto: false
notify_group: ''
notify_group_target: ''
zone_only: true
input_zones:
  - front_door
zones:
  - front_door
zone_multi: false
input_labels:
  - person
labels:
  - person
presence_entity: ''
disable_times:
  - '0'
  - '1'
  - '2'
  - '3'
  - '4'
  - '5'
  - '6'
  - '23'
cooldown: 180
loitering: false
loiter_timer: 0
initial_delay: 0
fps: 5
state_only: false
input_entity: ''
input_states: []
states_filter: []
color: '#03a9f4'
sound: default
sticky: false
tv: false
tv_position: center
tv_size: large
tv_duration: 10
tv_transparency: 0%
tv_interrupt: false

Any suggestion how I can figure this out?

I’m just looking at where it says FAIL in the first instance. First one the state filter isn’t met. Second one the zone filter isn’t met.

Is there a way to diagnose why they’re failing? When I test it I’m out there standing in the zone and verify the state or zone is showing the correct value at the time it runs. So I’m at a bit of a loss why the test fails and I can’t figure out where to get debug info on the tests to see what it’s checking against.

You might be standing in the zone but is the bottom of the bounding box in the zone? The Mqtt message says the zone was never entered

It looks like maybe the event is starting and it runs its checks before someone is in the zone, then ignores triggering again when someone is in the zone because the event is already ongoing. Would it be better to change the mqtt events to something like:

frigate/<zone_name>/<object_name>

And use frigate/front_door/person instead of frigate/events?

There are a million ways to skin this cat.

The loop runs every second or so so a zone change would trigger a notification update. The debug output you posted showed no zones had been entered at that point.

I’ve been getting notifications like this recently where the detected object isn’t actually in the thumbnail. Any ideas?
image

ive been having trouble getting this blueprint to send notifications, it has worked a few times, then stopped and started. Im at a lose to what wrong.

i can call notify services to my android phone no problem. but when i run the blueprint i dont get anything from companion app. all the logs are clean

Screenshot-from-2024-02-23-18-55-32

Haven’t seen this before. The crop is int he wrong spot right?

Check the resolutions are correct in your config is all I can suggest. Other than that, raise an issue with frigate Devs.

Please share the config of your automation. And a screenshot of the trace diagram when you think it should have sent one but didn’t.

thanks for your reply!

im pretty sure everything’s in the correct spot where it should be

alias: Frigate Notifications (0.12.0.2)
description: ""
use_blueprint:
  path: SgtBatten/Stable.yaml
  input:
    camera: camera.front_driveway
    notify_device: b157bdc401fec18b9cd6fcde0d70dd01
    attachment: snapshot
    update_thumbnail: true
    critical: "true"
    zones:
      - driveway
      - driveway_entrance
      - left_lawn
      - right_lawn
    zone_filter: true
    cooldown: 0
    debug: true
    labels:
      - person
      - dog
      - car
      - package

Can’t tell why the first one chose no action.

The second one didn’t meet the conditions for the initial notification, and the loop is off screen below the image.

Update Beta 0.12.0.3b

  • New Sublabel update toggle
  • Improved Debugging of update loop
  • Fixed multi_zone filter not triggering updates
  • Fixed Entered Zones displaying in message
  • Improved Notification Update testing
1 Like

Yeah, the thumbnail looks fine everywhere with the exception of the android notification. I’ll see what they say.

Yeah it’s an odd one. First I’ve seen of it.

I’m having a hard time trying to figure out an inconsistency in notifications. The exact same scenarios are reported sometimes and other times they aren’t. In the following trace excerpt, Frigate reported a person detection in the porch zone but the notification exited without sending a notification. Repeating this same scenario 5 minutes later it reported. Why did it not report the first time? The debug information seems to indicate that the notification failed because a person wasn’t detected in the porch zone but Frigate created an event for that as it did when I repeated the test. What’s going on? How do fix this? As it exists currently, this is too unreliable to be used for notifications. I’ve seen this with 0.12.0.2 and with 0.12.0.3b

Frigate event