dlford / frigate-alerts

Get push notifications for Frigate events
MIT License
0 stars 0 forks source link

Snapshot not sent until end of event #2

Open marktheunissen opened 5 days ago

marktheunissen commented 5 days ago

When a person is detected by a camera, the alert is not sent until that person leaves the scene and the camera no longer detects them.

Logs look something like this:

tracking: {ID:1727303158.501277-1d3hmv Camera:dome Zones:[] Label:person HasSnapshot:true}
tracking: {ID:1727303158.301045-18gg3p Camera:bullet Zones:[] Label:person HasSnapshot:true}
tracking: {ID:1727303158.501277-1d3hmv Camera:dome Zones:[] Label:person HasSnapshot:true}
tracking: {ID:1727303158.301045-18gg3p Camera:bullet Zones:[] Label:person HasSnapshot:true}
tracking: {ID:1727303158.301045-18gg3p Camera:bullet Zones:[] Label:person HasSnapshot:true}
tracking: {ID:1727303158.501277-1d3hmv Camera:dome Zones:[] Label:person HasSnapshot:true}
tracking: {ID:1727303158.301045-18gg3p Camera:bullet Zones:[] Label:person HasSnapshot:true}
tracking: {ID:1727303158.301045-18gg3p Camera:bullet Zones:[] Label:person HasSnapshot:true}
alerted:  {ID:1727303158.301045-18gg3p Camera:bullet Zones:[] Label:person HasSnapshot:true}

I'm able to sit in front of a camera for 15+ mins (in my testing, this could potentially be limitless) and not receive any alerts through Slack.

As soon as I walk out, I get an alert of me leaving the scene.

For security purposes, an alert should be sent as soon as possible when a person is detected in the scene.

dlford commented 5 days ago

This is true, the trade-off here is that the snapshot will be best when the event is finished.

I was planning to look into the Slack API to see if it could be swapped out at the end of an event, but failing that I think this could be added as a config option, either prioritize early warnings or better snapshots, possibly even send both the initial snapshot and the final snapshot when the event ends.