Object being recorded outside of its required zone
See original GitHub issueDescribe the problem you are having
I have a set up like this: https://docs.frigate.video/guides/stationary_objects, here’s mine: https://d.pr/i/J3UGZL. The drive
zone is set to track person
only, and the drive_entrance
is set to track car
only.
The issue I’m facing is when I drive through thedrive_entrance
zone into the drive
zone, often the event will just sit at “In Progess” and I get a continuous stream of update events (~ every 4-5s) for the car. I’m not sure what causes it to end, or why it’s still being recorded when it is no longer in the drive_entrace
zone, but it can last anywhere from 30 min to 5+ hours. I’m not sure if what I’m seeing is the expected behavior, so it’d be great to have some insight on this. If it is the expected behaviour, I’d like to avoid it if possible as it takes up a lot of disk space. I have the motion threshold slightly lower as sometimes I get no new events despite either car or person leaving or arriving, but that didn’t really help.
I have very hit and miss notifications (both the blueprint, and a basic custom implementation to alert me on type: new
), unsure if the above is related to that.
Any help/advice is appreciated.
Version
0.11.0-c461c9e (RC 2)
Frigate config file
mqtt:
host: ...
user: ...
password: ...
cameras:
front:
ffmpeg:
hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p
inputs:
- path: ...
roles:
- detect
- rtmp
- path: ...
roles:
- record
detect:
width: 704
height: 480
fps: 5
motion:
threshold: 20 # default 25
mask: # Covers timestamp, foliage, tree
- 0,174,0,0,74,0,142,0,149,78,181,76,231,84,138,144,0,229
- 704,159,704,480,558,480,583,133
- 705,35,705,0,510,0,510,35
objects:
track:
- person
- car
filters:
person:
min_area: 800
min_score: 0.65
car:
min_score: 0.65
zones:
drive_entrance:
coordinates: 598,116,601,154,445,124,467,96
objects:
- car
drive:
coordinates: 573,480,187,480,102,303,86,261,283,118,357,119,445,128,431,150,590,188
objects:
- person
record:
events:
required_zones:
- drive_entrance
- drive
snapshots:
enabled: True
bounding_box: True
required_zones:
- drive_entrance
- drive
mqtt:
required_zones:
- drive_entrance
- drive
detectors:
coral:
type: edgetpu
device: usb
record:
enabled: True
events:
retain:
default: 10
mode: motion
Relevant log output
None
Frigate stats
{
"detection_fps": 8.2,
"detectors": {
"coral": {
"detection_start": 0,
"inference_speed": 9.38,
"pid": 216
}
},
"front": {
"camera_fps": 5.1,
"capture_pid": 225,
"detection_fps": 8.2,
"pid": 222,
"process_fps": 5.1,
"skipped_fps": 0
},
"service": {
"latest_version": "0.10.1",
"storage": {
"/dev/shm": {
"free": 133.1,
"mount_type": "tmpfs",
"total": 134.2,
"used": 1.1
},
"/media/frigate/clips": {
"free": 89091.5,
"mount_type": "ext4",
"total": 102221.2,
"used": 8646.2
},
"/media/frigate/recordings": {
"free": 89091.5,
"mount_type": "ext4",
"total": 102221.2,
"used": 8646.2
},
"/tmp/cache": {
"free": 985,
"mount_type": "tmpfs",
"total": 1000,
"used": 15
}
},
"temperatures": {},
"uptime": 43,
"version": "0.11.0-c461c9e"
}
}
Operating system
HassOS
Install method
Docker Compose
Coral version
USB
Any other information that may be helpful
Running in Proxmox on a Beelink GK55 with this setup:
- HAOS VM on and the MQTT server is set up as a HA addon
- Debian LXC with Docker (used the Docker LXC helper from tteck). It uses ~5-10% CPU and ~8% memory. The CPU usage increased from 1-3% when enabling hardware acceleration, if that’s helpful to know.
Issue Analytics
- State:
- Created a year ago
- Comments:7
Top GitHub Comments
Oh I see, I thought you were saying the triggers were
new
ORafter.entered_zones
not AND. I’ll go ahead and close for now as the original issue is solved. Feel free to create a new issue if anything comes up.For my custom notifications I’m using node-red, and I’ve got it to save any MQTT events by id (
<id>.txt
) so I’ve a log by each event to make debugging easier. I’ve got this running along side the main blueprint as they’ve both been equally inconsistant, often one would trigger when the other didn’t.However, since adding the logs I think I’ve spotted one mistake for my own implementation. Filtering by
type.new
is wrong, just had a car cross thedrive_entrance
zone andtype.new
didn’t have anything in theentered_zones
orcurrent_zones
, theforefore doesn’t get passed theafter.entered_zones > 0
condition to send a notification out. This makes sense as Frigate starts tracking way before the zone. Just need to leave it running for a few days and see what happens now.A little off the original topic so feel free to close this if needs be, I’ll open up a new issue if I still have trouble with notifications.