Frigate Mobile App Notifications 2.0

Hi
Is there a way to change the Base URL depending whether we are on our local SSID or not?
I use cloudflare tunnel and the images take a long time to load when I click the notification. If I change the url from the cloudflare tunnel to my local IP then the image loads instantly - I was wondering if there was a way to conditionally change the base URL to my local IP when I am home (on my homes SSID)?

Thanks, love the blueprint!

Not something Iā€™d considered but maybe you can test by templating the base url field.

Something like {{ā€˜internal ip and portā€™ if states(ā€˜sensor related to home wifi connectionā€™, ā€˜trueā€™) else ā€˜externalurl.comā€™}}

However if you get a notification while home it wonā€™t load if you leave home before watching it.

This could solve the long running iOS thumbnail issue too if it works. Long weekend here in Australia so Iā€™m not around to test

1 Like

Thanks for your reply! I am not fantastic with yaml but I will try to have a crack on the weekend. Happy Labour Day (or Kings Bday)!

Hi guys and Thank You for your time reading my post !
Iā€™m a new user of Home Assistant and Iā€™m struggling with this mobile app notification (Stable version) to work with my configuration.
I have frigate installed on a dedicated machine while it is using as MQTT broker the addon in my Home Assistant server.
I have edited the configuration.yaml in my Home Assistant to add a new topic for frigate as following
mqtt:
camera:
topic: ā€œ/frigate/eventsā€

After installing this blueprint I have updated its parameter, MQTT Topic box , by entering /frigate/events" there, but no messages are coming on my mobile phone.
Iā€™d like to know if I can use the localhost as MQTT broker with this blueprint ,but there is no any parameter to specify the MQTT host.
So, my intention is to use as MQTT the local one installed as add-on in Home Assistant and use localhost or 127.0.0.1 as MQTT host parameter, followed with port ,user name and password (using a user created in Home Assistant).

Thanks !
Kind regards, Kumzo

You donā€™t need to do this. Frigate will post in the topic on its own. I donā€™t know if manually making it has an impact.

In your frigate co fig you need to tell it the mqtt host information.

So likely you Home assistant LAN IP with a different port for the mqtt broker.

After that. If not working. Post your blueprint config

Thanks a lot for your quick reply !!
My config file of frigate is ok it is pointing to my home assistant MQTT broker

I checked also the subs/and publishing with mosquitto client and it works as expected.
Iā€™m afraid that this blueprint doesnā€™t subscribe to local mqtt (127.0.0.1)

######################## frigate config.yml MQTT section #####
mqtt:
host: 192.168.xx.xx (ip of home assistant)
port: 1883
user: xxxxx
password: xxxx
client_id: frigate
topic_prefix: frigate

The blueprint doesnā€™t subscribe to anything.

If home assistant can see the topic, the trigger will be able to monitor mqtt messages for the correct topic

The event is triggered but no action executed.
image

Now Iā€™m getting an error :slight_smile: which is better than nothing :slight_smile:
Do you think it has to do with base URL parameter ?

Seems like an issue with your notification device based on the error.

What are you notifying?

Iā€™m trying to notify motion detection from my ip camera.

No, the issue is with the notification service. So with your phone or group

My setup is a little bit complicated like the one shown below and Iā€™m afraid there is something blocking. Iā€™ll try with wifi and let you know.

{internet}<->{My cloud nginx and openvpn server] ā†” [my home assistant with openvpn client]

None of that is relevant. The issue is with the notify service or device

Tested within my home NW with wifi using private ip (192.168.xx.xx) and now itā€™s working.
Iā€™m afraid this has to do with any timeout issue using mobile NW.

After trying many option , I think it had to do with my phone ID. I logout from home assistant application and deleted my phone device on home assistant server.
After I have logged in again and now Iā€™m getting notification also from mobile NW :-).

Now Iā€™m facing another issue, when I click the message to see the clip I get this message instead of clip
ā€œmessageā€:ā€œEvent not foundā€,ā€œsuccessā€:false"

I had a play with this but couldnā€™t get it to work. Did you have any time to test?

This is very strange. I deleted the zones from frigate, recreated again and after restarted it. Once frigate restarted I have set the zone in the blueprint frigate mobile app in home assistant, restarted home assistant and now Iā€™m able to see the video clip when the message arrived in my mobile phone.
Thanks a lot SgtBatten for your swift and kind support !

Hi guys. Anyone have a guide on how to create a button on a dashboard thatā€™ll disable these notifications for a set amount of time. (Or some better method) I canā€™t figure it out. If Iā€™m going to do yard work - I would like to pause all my frigate notifications beforehand instead of waiting to get one on each cam and then selecting silence new notifications.

Hello,
One way to do it :

Go to your settings to create an helpers
Open your Home Assistant instance and show your helper entities.

  • Create an input_boolean
  • Create a timer to set the duration( ex : 01:30:00 )
  • Create an automation to disable your notifications
  • Create an automation to reactivate notifications at the end of the timer
  • Add a card of type ā€œEntitiesā€ or "Tile"on your dashboard.

input_boolean
image

timer
image

Automatisation 1

Replace YOUR_XXXX with your previously created entities

alias: Disable notifications and start the reactivation timer
description: ""
triggers:
  - entity_id:
      - input_boolean.YOUR_INPUT_BOOLEAN_NAME
    to: "on"
    trigger: state
actions:
  - action: timer.start
    data: {}
    target:
      entity_id: timer.YOUR_TIMER_NAME
  - action: automation.turn_off
    data:
      stop_actions: true
    target:
      entity_id: automation.YOUR_NOTIF_AUTOMATION_NAME

Automatisation 2

Replace YOUR_XXXX with your previously created entities

alias: Reactivate notifications after the timer ends
triggers:
  - trigger: state
    entity_id:
      - timer.YOUR_TIMER_NAME
    to: idle
    from: active
actions:
  - action: automation.turn_on
    data: {}
    target:
      entity_id: automation.YOUR_NOTIF_AUTOMATION_NAME
  - action: input_boolean.turn_off
    data: {}
    target:
      entity_id: input_boolean.YOUR_INPUT_BOOLEAN_NAME

Tile Card
image

2 Likes