-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Double event processing for "unzoned: allow" and having zones defined in Frigate #66
Comments
Hmm - So based on the logs, it seems like an initial notification is sent out when the object is outside a zone - then a follow up once the object enters the zone. Is the issue that the snapshots are identical between them? It looks like it for me, but I want to confirm since they've been pixelated for the issue upload. If so, I wonder if this might be an issue of grabbing the snapshot from Frigate too quickly? Maybe Frigate hasn't updated the snapshot yet by the time we grab it for the notification. |
Hi @0x2142,
That's the thing, they're not identical, but only slightly different, as expected.
Those snapshots were pixelated intentionally (today's internet is not about privacy at all). I see the behavior as follows:
The trouble may be hiding under https://github.com/0x2142/frigate-notify/blob/main/events/mqtt.go#L98-L100 where transitions Firstly, good question here: is this Secondly, realizing the difficulty of how to properly calculate |
I don't fully understand the issue here, is it that two notifications are being sent for each object? I think with What version of frigate was/is this issue with? Lots has changed in 0.14 although I'm not familiar with pre 0.14 Why object A and object B? This added an element of confusion for me, I first thought they were happening simultaneously and the tracking is mixing them up, but looking at your timestamps they are days apart. I assume it is just to show that the issue occurs in either direction? Or is the issue just in one direction? This matches what I would expect from your scene diagram:
However this doesnt:
Why the mismatch here? From the scene diagram and MQTT description ObjectA is meant to appear first in ZoneA, but from this log it seems reversed, appearing in no zones and then leaving through ZoneA - the same path as ObjectB. Is this the issue you are experiencing? |
The occurrences of object A and object B do not happen at the same time, they are separated in time. But from a physics pov, it's just one object moving in and out of the zone. Perhaps you're right, and it's the time to try Frigate 0.14+ version again (even though its webui has become even more uncomfortable for me). |
Yeah I think two notifications is expected behaviour. Its what I am seeing and expected anyway. To get just one notification per object, ignoring zones even though you have one set, I think you either need to:
this would not notify the unzoned event and only notify when object enters the zoneA or
this would notify the unzoned event but not notify when object is in zoneA or
this would notify when the object enters FOV at all, zoned or unzoned, but only once per object I have not fully tested these but this is what I understood as expected behaviour from reading the docs (@0x2142 correct me if I'm wrong) |
The issue is not how it works now, the issue is how to achieve the expected behavior when an object is tracked from zoned to unzoned (or from unzoned to zoned) with Of course, we could try to create a complex template and try to reach the specified behavior there, but there's a “no coding in configurations” rule, so I treat this as a workaround rather than the main approach. |
Don't all of the configurations I suggested above notify you only once? And give you the choice to configure the behaviour when an object is tracked from zoned to unzoned (or from unzoned to zoned) in all possible ways? (Other than specifically determining which direction it is going in) |
Description
The system duplicates event processing for zoned and unzoned areas while the configuration has default
unzoned: allow
.This bug is floating (heisenbug).
Scene
Notification
ZoneA is colored by pink.
Path for ObjectA is colored by green.
ZoneA is colored by pink.
Path for ObjectB is colored by blue.
Frigate-Notify Version:
v0.2.8
Configuration
Logs
ObjectA path
ObjectB path
Expected behavior
The system processes a particular event only once and regardless of existing zones if configuration
unzoned: allow
is set.The text was updated successfully, but these errors were encountered: