Frigate Mobile App Notifications 2.0

My mistake it does work. Don’t know what I was doing incorrectly. Maybe the other notification automation interfered. Is there a way to see the notification more than once?

1 Like

even im facing similar issue , automation is not getting triggered, older frigate blueprint 1.0 was working

running everything on docker

HA core: 2023.12.3
frigate HA integration : v4.0.0
frigate : 0.12.1-367D724
mqtt : eclipse-mosquitto:1.6.14

automation configuration :

alias: dummy frigate
description: ""
use_blueprint:
  path: SgtBatten/Stable.yaml
  input:
    camera: camera.frontright_2
    base_url: https://home.abc.abc
    critical: "true"
    labels:
      - person
      - car
      - bus
      - motorcycle
    notify_device: 876b1565605647606dc65f7e22ee2ba3
    message: "test: A Person was detected on the Side camera."
    ios_live_view: true
    debug: true
    color: grey

seeing below error , not sure which client is causing it

2023-12-20T22:06:09.203933730Z 1703109969: New connection from 172.18.0.1 on port 1883.
2023-12-20T22:06:09.204528136Z 1703109969: Client <unknown> disconnected due to protocol error.
2023-12-21T08:46:27.060621137Z 1703148387: Saving in-memory database to /mosquitto/config/mosquitto.db.

Check your camera name

What do you mean?

for the same camera , im able to get notification from old frigate notification blueprint (Frigate Notification Blueprint · GitHub)

camera chosen in 2.0 frigate automation

tried enabling trace , not able to see any activity in log book

notification from older frigate notification blueprint :

In frigate your camera is not numbered 2 right?

It has to match. So delete the _2 from the yaml of the automation, or better yet, rename the entity assuming you don’t have a conflict.

Edit; if you use the beta it would work automatically also.

thanks, beta is working

Being able to click on the notification again and choose clip vs snapshot.

Are you on IOS? Because it already does that on android and I don’t think I can change it for ios

Hi,

I am desperately trying to make my firetv get notifications. It works with developer tools so the tv can show notifications correctly.

When i enter the name under the phone name i can save the automation, but I can’t leave the phone name empty. marked in yellow.

Can someone post a example of how you configure it?

That would be correct. Mobile device is mandatory now. Group field overrides it though.

You need a baseurl

yes IOS. Thanks for your help and blueprint

Okay, I did try that also. But won’t work. There is no message coming.

Base url is my nabu casa url?

If I want to make a notification group, I still have to do it via configuration.yaml?

Is the automation triggering at all? Do you have traces?

I just deleted the Blueprint and did a fresh installation a new automation.

Looks like it does work now. Sorry for the confusion … :slight_smile:

1 Like

One more thing, i have an example for the way i tried to generate a group, but this doesn´t work for me. Automation gets triggered but no mesage will show:

#################### Groups ##########
notify:
  - platform: group
    name: "allefernseher"
    unique_id: allefernseher
    services:
      - service: firetv_flur
      - service: firetv_schlafen
      - service: firetv_wohnen
  
  - platform: group
    name: "allios"
    unique_id: allios
    services:
      - service: iphone_marcel
      - service: malwina_iphone_14
      - service: tab9
      - service: ipad_468
      - service: ipad_air_2

I admit I only have one tv so I’ve never been able to test tv groups. But in theory it should be exactly the same. Is the group loaded properly? I.e has the system bee restarted or otherwise refreshed to ensure it was created? If it’s not new then probably not the issue.

Can i call the group in developer tools? or should i be able to call it?

Yes, you should be able to send a notification via dev tools

What exactly are the subsequent loops? For each notification I receive, I only want to trigger my custom action once (for every notification). I am interpreting it as if I put this in the loop, it could/will trigger multiple times for the same event/notification which I do not want, only on the first notification.

I added a custom action (auto trigger, not on loop) and when my notification fired, the action did not trigger. I checked the trace and the second condition did not pass.

If its the second condition thats causing it to be skipped, something to do with the zones? But if the notification was sent, shouldn’t this go through using the same logic?

Could it be that my notification is only triggered in the loop, after some zone condition eventually passed? If so, then there might not be any way at the moment to trigger the custom action only once per notification if you have zone conditions enabled?

alias: Custom Action Auto
choose:
  - conditions:
      - '{{ custom_action_auto |length > 0 }}'
      - >-
        {{ not zone_only or (not zone_multi and zones|select('in',
        entered_zones)|list|length > 0) or (zone_multi and entered_zones|length
        > 0 and zones |reject('in', entered_zones) |list |length == 0) }}
      - '{{ not initial_home }}'
      - '{{ not state_only or states(input_entity) in states_filter }}'
    sequence:
      - service: automation.trigger
        data:
          skip_condition: true
        target:
          entity_id: automation.show_doorbell_camera

Heres the triggered event

this:
  entity_id: automation.doorbell_notification_beta_bp
  state: 'on'
  attributes:
    id: '1699491796620'
    last_triggered: '2023-12-22T17:39:01.833825+00:00'
    mode: parallel
    current: 0
    max: 10
    friendly_name: Doorbell Notification (Beta BP)
  last_changed: '2023-12-22T15:45:57.059934+00:00'
  last_updated: '2023-12-22T17:39:18.561444+00:00'
  context:
    id: 01HJ99RBX1F6HBG3BME8QACMEK
    parent_id: null
    user_id: null
trigger:
  id: frigate-event
  idx: '1'
  alias: null
  platform: mqtt
  topic: frigate/events
  payload: >-
    {"before": {"id": "1703267289.189675-khmweg", "camera": "doorbell",
    "frame_time": 1703267289.189675, "snapshot": null, "label": "person",
    "sub_label": null, "top_score": 0.0, "false_positive": true, "start_time":
    1703267289.189675, "end_time": null, "score": 0.71484375, "box": [883, 927,
    942, 1058], "area": 7729, "ratio": 0.45038167938931295, "region": [765, 829,
    1085, 1149], "stationary": false, "motionless_count": 0, "position_changes":
    0, "current_zones": [], "entered_zones": [], "has_clip": false,
    "has_snapshot": false, "attributes": {}, "current_attributes": []}, "after":
    {"id": "1703267289.189675-khmweg", "camera": "doorbell", "frame_time":
    1703267289.895963, "snapshot": {"frame_time": 1703267289.895963, "box":
    [849, 927, 910, 1099], "area": 10492, "region": [756, 831, 1076, 1151],
    "score": 0.76953125, "attributes": []}, "label": "person", "sub_label":
    null, "top_score": 0.71484375, "false_positive": false, "start_time":
    1703267289.189675, "end_time": null, "score": 0.76953125, "box": [849, 927,
    910, 1099], "area": 10492, "ratio": 0.3546511627906977, "region": [756, 831,
    1076, 1151], "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: 1703267289.189675-khmweg
      camera: doorbell
      frame_time: 1703267289.189675
      snapshot: null
      label: person
      sub_label: null
      top_score: 0
      false_positive: true
      start_time: 1703267289.189675
      end_time: null
      score: 0.71484375
      box:
        - 883
        - 927
        - 942
        - 1058
      area: 7729
      ratio: 0.45038167938931295
      region:
        - 765
        - 829
        - 1085
        - 1149
      stationary: false
      motionless_count: 0
      position_changes: 0
      current_zones: []
      entered_zones: []
      has_clip: false
      has_snapshot: false
      attributes: {}
      current_attributes: []
    after:
      id: 1703267289.189675-khmweg
      camera: doorbell
      frame_time: 1703267289.895963
      snapshot:
        frame_time: 1703267289.895963
        box:
          - 849
          - 927
          - 910
          - 1099
        area: 10492
        region:
          - 756
          - 831
          - 1076
          - 1151
        score: 0.76953125
        attributes: []
      label: person
      sub_label: null
      top_score: 0.71484375
      false_positive: false
      start_time: 1703267289.189675
      end_time: null
      score: 0.76953125
      box:
        - 849
        - 927
        - 910
        - 1099
      area: 10492
      ratio: 0.3546511627906977
      region:
        - 756
        - 831
        - 1076
        - 1151
      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>
input_client_id: ''
client_id: ''
attachment: snapshot.jpg?bbox=1
alert_once: true
update_thumbnail: true
ios_live_view: ''
android_auto: true
notify_group: Mobile Notify group
notify_group_target: mobile_notify_group
zone_only: true
input_zones:
  - walkway
zones:
  - walkway
zone_multi: false
input_labels:
  - person
labels:
  - person
presence_entity: ''
disable_times: []
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: true
tv: false
tv_position: center
tv_size: large
tv_duration: 10
tv_transparency: 0%
tv_interrupt: false
debug: false

Blueprint config

alias: Doorbell Notification (Beta BP)
description: ""
use_blueprint:
  path: SgtBatten/Beta.yaml
  input:
    camera: camera.doorbell
    notify_device: 7a6df43a5b9f64391a2aba46fd7f9fab
    base_url: <redacted>
    title: Front Door Activity
    message: A Person was detected at the front door
    critical: "false"
    alert_once: true
    attachment: snapshot.jpg?bbox=1
    video: >-
      {{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera}}/clip.mp4
    android_auto: true
    sticky: true
    channel: frigate
    zone_filter: true
    zones:
      - walkway
    silence_timer: 30
    tap_action: "{{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/snapshot.jpg"
    url_1: >-
      {{base_url}}/api/frigate{{client_id}}/notifications/{{id}}/{{camera}}/clip.mp4
    url_3: >-
      {{base_url}}/api/camera_proxy_stream/camera.{{trigger.payload_json['after']['camera']
      | lower | replace('-','_')}}?token={{state_attr( 'camera.' ~ camera,
      'access_token')}}
    button_3: View Stream
    cooldown: 180
    update_thumbnail: true
    custom_filter: >-
      {{ (as_timestamp(now()) -
      as_timestamp(states.binary_sensor.front_door_contact.last_changed)) > 240
      }}
    notify_group: Mobile Notify group
    custom_action_auto:
      - service: automation.trigger
        data:
          skip_condition: true
        target:
          entity_id: automation.show_doorbell_camera
    labels:
      - person