[Support]: 14.0 MQTT Camera Snapshot not Updating #11696
-
Describe the problem you are havingAfter updating to the 14.0 beta I noticed that the only the car snapshots weren't updating in the HA integration. The event was still being recorded and the vehicle was being recognized but the snapshot would sometimes not updating the image entity in the HA integration. Occasionally it will update way later or not at all. This is an issue for both Beta 1 and 2. Version0.14.0-bccffe6 Frigate config filemqtt:
host: 192.168.8.85
port: 1883
user: Arman
password: xxxx
cameras:
front_doorbell:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/front_doorbell?video=copy&audio=aac
input_args: preset-rtsp-restream-low-latency
roles:
- record
- path: rtsp://127.0.0.1:8554/front_doorbell_sub?video=copy
input_args: preset-rtsp-restream-low-latency
roles:
- detect
motion:
mask:
- 896,0,896,38,448,43,449,0
- 417,67,608,64,732,42,783,116,684,162,627,322,176,310,146,116
zones:
driveway:
coordinates: 896,672,896,223,630,260,637,387,350,368,158,382,158,254,0,184,0,672
# objects:
# - car
driveway_entrance:
coordinates: 516,359,603,356,529,333,156,317,160,356,344,364
snapshots:
enabled: true
required_zones:
- driveway
objects:
track:
- person
# - face
# - license_plate
- dog
- cat
- car
- amazon
- fedex
- ups
- package
filters:
car:
min_area: 7500
mask:
- 0,532,181,528,178,430,0,442
person:
min_area: 2600
cat:
mask:
- 691,0,782,113,687,156,616,292,203,280,164,149,215,0
dog:
mask:
- 691,0,782,113,687,156,616,292,203,280,164,149,215,0
record:
enabled: true
retain:
days: 3
mode: all
events:
pre_capture: 10
post_capture: 30
retain:
default: 7
mode: active_objects
detect:
max_disappeared: 200
review:
alerts:
required_zones:
- driveway
go2rtc:
streams:
front_doorbell:
- ffmpeg:http://192.168.8.186/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=xxxx&password=xxxx#video=copy#audio=copy#audio=opus#async
- rtsp://xxxx:[email protected]:554/h264Preview_01_sub
front_doorbell_sub:
- ffmpeg:http://192.168.8.186/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=xxxx&password=xxxx
front_door: rtsp://xxxx:[email protected]:554/cam/realmonitor?channel=1&subtype=0
front_east: rtsp://xxxx:[email protected]:554/cam/realmonitor?channel=2&subtype=0
front_entrance_east: rtsp://xxxx:[email protected]:554/cam/realmonitor?channel=5&subtype=0
front_entrance_east_sub: rtsp://xxxx:[email protected]:554/cam/realmonitor?channel=5&subtype=1
front_entrance_west: rtsp://xxxx:[email protected]:554/cam/realmonitor?channel=6&subtype=0
west_side_back: rtsp://xxxx:[email protected]:554/cam/realmonitor?channel=12&subtype=0
east_side_house: rtsp://xxxx:[email protected]:554/cam/realmonitor?channel=8&subtype=0
back_garden: rtsp://xxxx:[email protected]:554/cam/realmonitor?channel=3&subtype=0
backyard: rtsp://xxxx:[email protected]:554/cam/realmonitor?channel=7&subtype=0
back_landing: rtsp://xxxx:[email protected]:554/cam/realmonitor?channel=4&subtype=0
bar_landing: rtsp://xxxx:[email protected]:554/cam/realmonitor?channel=10&subtype=0
deck_stairs: rtsp://xxxx:[email protected]:554/cam/realmonitor?channel=9&subtype=0
deck_door: rtsp://xxxx:[email protected]:554/cam/realmonitor?channel=11&subtype=0
deck_door_sub: rtsp://xxxx:[email protected]:554/cam/realmonitor?channel=11&subtype=1
webrtc:
candidates:
- 192.168.8.85:8555
- stun:8555
detectors:
coral:
type: edgetpu
device: usb
ffmpeg:
output_args:
record: preset-record-generic-audio-aac #this allows audio in recordings
hwaccel_args: preset-vaapi
model:
path: plus://a5ae8bb91772fd6f3bd9fc79100dd84d
version: 0.14 Relevant log outputN/A FFprobe output from your cameraN/A Frigate statsNo response Operating systemHassOS Install methodHassOS Addon Coral versionUSB Network connectionWired Camera make and modelReolink Doorbell Cam POE Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 20 comments 23 replies
-
Bumping this.. the snapshots are all now super slow to update. Should I open an issue for the integration instead? |
Beta Was this translation helpful? Give feedback.
-
nothing has changed in regards to when the snapshot updates in 0.14 so I don't think this is related to 0.14 |
Beta Was this translation helpful? Give feedback.
-
Bumping this again... not that I disagree that 0.14 is the culprit I am having such slow snapshot updates. It takes about 1 min + to update. I did notice on the that the stats on the bottom left of the frigate page show my CPU at 60-70% when this is happening. However my system metrics page show nothing hogging CPU and my Coral USB is connected and working fine. |
Beta Was this translation helpful? Give feedback.
-
So I noticed today that Frigate was acting up again and snapshots were slowing down/not even updating. Taking a look and my Go2RTC is using 176% of my CPU oddly enough. Here are some frigate logs as well.. nothing seems out of the ordinary other than some FFmpeg errors
|
Beta Was this translation helpful? Give feedback.
-
complete shot in the dark but I am seeing a bunch of errors in my logs and still experiencing slow snapshots could any of this be a clue as to what's happening? I haven't seen anyone else report on slow snapshots so I really have no clue where to start debugging this issue myself so any tips on how to go about this would be great.
|
Beta Was this translation helpful? Give feedback.
-
So I tried a fresh install of Frigate both on the integration and add-on and unfortunately the snapshots are still lagging. I have also played around with disabling HW acceleration and tweaking some other settings such as detect resolution. I am thinking of reverting to Frigate 13.X to see if that fixes the problem. Do you recommend just installing the stable version alongside the Beta or restoring a V13.X beta back up? |
Beta Was this translation helpful? Give feedback.
-
So I have been running V13.2 since Friday and all the snapshots have been updating as expected <5 seconds. I can try going back to the beta but I am pretty sure the snapshot delay will start happening again. If I do so how do I set debugging for the add-on? should I set frigate.app to debug using the logger service call? |
Beta Was this translation helpful? Give feedback.
-
Ah okay. Is there any other way I can help troubleshoot this? Or is it kinda best case to just stay on 13.2 and hope this bug is caught or fixed in the future? |
Beta Was this translation helpful? Give feedback.
-
So I updated to the 0.14 general release and right away started seeing delayed snapshots again. I began thinking why and reading more into the docs. This info under the MQTT/snapshots section "Publishes a jpeg encoded frame of the detected object type. When the object is no longer detected, the highest confidence image is published or the original image is published again." has got me thinking. I don't think Frigate is publishing the first encoded frame of the object type, instead it uploading the highest confidence image, hence the delay. Another reason why I may thing this is an issue is because I have had a few detections that have been recorded as events but the snapshot never updated. If the original encoded frame has a high enough confidence rating and it's somehow not being uploaded that would make sense why certain events don't see an updated snapshot. |
Beta Was this translation helpful? Give feedback.
-
Hm so I am trying to identify a pattern when the snapshots are slow but I think I identified the pattern. The snapshot only updates once the object is is out of the frame/zone. That's why the vehicle that pulled in didn't create a snapshot up until it pulled out of my driveway zone then the snapshot updated to show it leaving. Now from v13 to v14 I haven't changed my config, is this something new with v14? |
Beta Was this translation helpful? Give feedback.
-
To narrow down the issue I enabled snapshots to see if the snapshot was being generated but wasn't getting sent to the integration. I had a person correctly detected and in the media/frigate/clips directory the snapshot was there however the HA integration image entity never updated to show the snapshot. No errors shown in the MQTT server logs, and the other entities like person counter and person occupancy updated as expected just not the image entity. I have attached my updated config maybe I have something incorrect
|
Beta Was this translation helpful? Give feedback.
-
Heres another time the integration snapshot didn't update but the media folder one did. Black car was the media folder snapshot and the green car snapshot was from the integration. You can see that the snapshot for the integration didnt update to show the black car. The black car was in the driveway zone as you can see by the screenshot of the occupancy sensor. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
While I continue troubleshooting this, are the snapshots that get sent to the integration controlled by the |
Beta Was this translation helpful? Give feedback.
-
I turned on debugging for the MQTT addon and looks like Frigate sometime isn't publishing the snapshot. Below is a log snippet of a person detection where the integration snapshot updated as expected and another snippet where a vehicle was detected (a event was recorded and a snapshot was published to the media folder) but the integration snapshot didn't update.
|
Beta Was this translation helpful? Give feedback.
-
@NickM-27 Thanks for linking me here! I had not seen this thread yet. I did some quick testing today using MQTT explorer and could verify that my frigate addon is NOT sending an updated person snapshot message until the event had cleared. The notifications I have configured work like this:
For the last week or so, that has not worked as expected. The notifications I get are always containing the previous snapshot. My testing and conclusion so far:
As a comparison, I stepped outside with my laptop in front of my doorbell camera.
I believe you are correct with what you shared here, Nick: #11696 (reply in thread) I could go update my notification configuration to use the actual snapshot image from the media instead of using the image entity and fix my issue, but the image entity from the integration had been so easy it just made sense. Incase it's helpful: Frigate (Full Access) Frigate Integration 5.3.0 Mosquitto broker All running on a HAOS VM on a proxmox host. |
Beta Was this translation helpful? Give feedback.
-
Same issue here. Never had this issue with earlier Frigate versions. I noticed it right after updating to v0.14 I have opened thread on HA integration for this issue. My idea was that HA integration needs some updates as well to match most recent Frigate update v0.14. But as I understand from your post, Frigate itself is not sending mqtt message to HA straight away, only when motion is gone. Then there is information that mqtt part had no modifications on this version... so I am completely lost now.. blakeblackshear/frigate-hass-integration#705 In my case HA is running in Proxmox VM. Frigate is running in Proxmox LXC in a docker container. |
Beta Was this translation helpful? Give feedback.
-
For anyone looking for a solution to this issue here is an automation I created in HA for person detection that are considered alerts. The pre requsites you will need are the following:
Basically the automation looks out for when a MQTT message is recieved for the
|
Beta Was this translation helpful? Give feedback.
-
Is there an issue raised that I can add a 👍 against? Didn't have much joy finding one... |
Beta Was this translation helpful? Give feedback.
-
I have created an issue #15859 - Please add some 👍 over there if still an issue for you |
Beta Was this translation helpful? Give feedback.
For anyone looking for a solution to this issue here is an automation I created in HA for person detection that are considered alerts.
The pre requsites you will need are the following:
/media
folder calledsnapshots
/media/snapshots
directoryBasically the automation looks out for when a MQTT message is recieved for the
frigate/reviews
topic and confirm its an alert. Then it triggers an action to download the snapshot using thedownloader.download_file
service call. Instead of using the MQTT snapshot, I am using the Frigate API to download the snapshot. Note the way I am pulling the snapshot is…