Frigate Mobile App Notifications 2.0

The only thing required to start the automation is an Mqtt message from frigate with a matching camera name.

If you get no traces, something is not working there .

If you do get traces, the traces will reveal the issue.

It seems I have no Traces at all.

I sent a command and got the following:
Failed to call service mqtt/publish. Error talking to MQTT: The client is not currently connected.

image

The broker name is apparently not correct, I’ve tried different things HA IP address, etc, still no connection.

I don’t recognise where you are typing that. but it would normally be the LAN IP of home assistant if you are running it as an addon.

Is the broker running?

It is here:

Yes, it appears to be running. I’m running it as an add-on.


I tried the IP address listed in the “Network” settings → “Network Adapter” but it didn’t work either. The same IP is listed in my router so the IP must be correct.

Oh this is the HA Mqtt integration? Understood now.

I have mine set to the core-mosquitto hostname for reference.

I assume you have the username and password configured in the add-on?

Is frigate configured to use the broker also (I use up address for the frigate config

Yes, it puts core-mosquitto in by default. Yes, I setup a username and PW in HA specifically for MQTT.

I’m not sure if Frigate is configured to use the broker. I may not have ever set it up for that, that could be the problem. Where would I do that?

In your frigate config you need to add a top level key of mqtt and inset from that, keys for host, user and password

Docs here Configuration File | Frigate

After checking it seems I have setup something at the start.

mqtt:
  host: 1XX.XXX.X.XXX
  user: xxxxx-user
  password: xxxxx
  port: 1883
  topic_prefix: frigate
  client_id: frigate
  stats_interval: 60
  
detectors:
  coral:
    type: edgetpu
    device: usb

cameras:

After that is all the camera config stuff.

I’m wondering if the “Host:” is correct, its the IP of my HA server. I tried that in the previous settings I mentioned and it didn’t accept it as a host name.

Same, recently I started getting no attachments, just notifications. I upgraded my blueprint to 2.0, but still no attachment

1 Like

Seems fine, but i still think you have some issue with your mqtt addon. It’s not really my area of expertise. Can you reinstall it from scratch?

I don’t know what the issue is. It has been ongoing on iOS for a long time. Occasionally i get a missing image on Android but it is very rare and likely just a glitch in the matrix at the time.

I was looking at the MQTT log file:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/mosquitto.sh
[19:31:26] INFO: Certificates found: SSL is available
cont-init: info: /etc/cont-init.d/mosquitto.sh exited 0
cont-init: info: running /etc/cont-init.d/nginx.sh
cont-init: info: /etc/cont-init.d/nginx.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun mosquitto (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
[19:31:26] INFO: Starting NGINX for authentication handling...
s6-rc: info: service legacy-services successfully started
[19:31:27] INFO: Starting mosquitto MQTT broker...
2024-01-30 19:31:27: Warning: Mosquitto should not be run as root/administrator.
2024-01-30 19:31:27: mosquitto version 2.0.18 starting
2024-01-30 19:31:27: Config loaded from /etc/mosquitto/mosquitto.conf.
2024-01-30 19:31:27: Loading plugin: /usr/share/mosquitto/go-auth.so
2024-01-30 19:31:27:  ├── Username/password checking enabled.
2024-01-30 19:31:27:  ├── TLS-PSK checking enabled.
2024-01-30 19:31:27:  └── Extended authentication not enabled.
2024-01-30 19:31:27: Opening ipv4 listen socket on port 1883.
2024-01-30 19:31:27: Opening ipv6 listen socket on port 1883.
2024-01-30 19:31:27: Opening websockets listen socket on port 1884.
2024-01-30 19:31:27: Opening ipv4 listen socket on port 8883.
2024-01-30 19:31:27: Opening ipv6 listen socket on port 8883.
2024-01-30 19:31:27: Opening websockets listen socket on port 8884.
2024-01-30 19:31:27: mosquitto version 2.0.18 running
2024-01-30 19:31:27: New connection from 127.0.0.1:38176 on port 1883.
2024-01-30 19:31:27: Client <unknown> disconnected due to protocol error.
[19:31:27] INFO: Successfully send discovery information to Home Assistant.
[19:31:28] INFO: Successfully send service information to the Supervisor.
2024-01-30 19:31:28: New connection from 172.30.32.1:34718 on port 1883.
2024-01-30 19:31:28: New client connected from 172.30.32.1:34718 as frigate (p2, c1, k60, u'xxxxx-user').
2024-01-30 19:32:04: New connection from 172.30.32.1:41735 on port 1883.
2024-01-30 19:32:04: Client 5PIHnfpqjhQDASgmRwGux8 disconnected, not authorised.
2024-01-30 19:32:21: New connection from 172.30.32.1:48821 on port 1883.
2024-01-30 19:32:21: Client 1yvXuD8EJz2yyQyVSxUKNF disconnected, not authorised.
2024-01-30 19:32:34: New connection from 172.30.32.2:32860 on port 1883.
2024-01-30 19:32:34: Client <unknown> closed its connection.
2024-01-30 19:32:42: Client frigate disconnected.
2024-01-30 19:32:50: New connection from 172.30.32.1:33998 on port 1883.
2024-01-30 19:32:50: New client connected from 172.30.32.1:33998 as frigate (p2, c1, k60, u'xxxxx-user').
2024-01-30 19:34:21: New connection from 172.30.32.1:49953 on port 1883.
2024-01-30 19:34:21: Client 1yvXuD8EJz2yyQyVSxUKNF disconnected, not authorised.
2024-01-30 19:34:34: New connection from 172.30.32.2:40580 on port 1883.
2024-01-30 19:34:34: Client <unknown> closed its connection.
2024-01-30 19:36:21: New connection from 172.30.32.1:42197 on port 1883.
2024-01-30 19:36:21: Client 1yvXuD8EJz2yyQyVSxUKNF disconnected, not authorised.
2024-01-30 19:36:34: New connection from 172.30.32.2:52612 on port 1883.
2024-01-30 19:36:34: Client <unknown> closed its connection.
2024-01-30 19:38:21: New connection from 172.30.32.1:53331 on port 1883.
2024-01-30 19:38:21: Client 1yvXuD8EJz2yyQyVSxUKNF disconnected, not authorised.
2024-01-30 19:38:34: New connection from 172.30.32.2:57482 on port 1883.
2024-01-30 19:38:34: Client <unknown> closed its connection.

It shows the user name I created connecting a couple of times, but there is a lot of 172.30.32.1:34718 that had it’s connection closed and a lot “not authorized”. I’m not sure what those are. I’m not sure what all those entries in the log file mean. . . .

I have lots of connections and disconnections but no unauthorised errors. i;d start with your user setups

Hey @SgtBatten, is there a feature where if “state” for an entity (family) is set to not “away” (home) for the automation to still be sent out? I currently have it set to not send a notification if the group is not “away”, but it would be great if that could be ignored during a certain time period (e.g. night time).

Yes, you can make a template that achieves your if statement and in the custom filter field use that.

From memory it needs to evaluate to the string of true or false, not Boolean value of True or False.

Sorry, where is the custom filter field in the Blueprint? Or does this need to be edited in the yaml file itself?

Sorry it’s in the beta.

Would it be possible for me to translate my requirement into the yaml of the automation? If not, then I suppose I have to wait.

You can click the beta button to import the beta and try it directly

I deleted the user account I had created for MQTT and created a new one. Instead of xxx-user I named the new one xxx_MQTT. After changing the user in the config. it seemed to start working. Maybe the user for MQTT has to have _mqtt in the username?? Anyway it seems to be working now. Thank you for your help and thank you for this Blueprint, I’m happy to have camera notifications for the first time. You are a genius.