double-take
double-take copied to clipboard
camera zones not passed to double-take matches in MQTT
Describe the bug frigate camera zones are not passed to double-take/matches in mqtt
Version of Double Take 1.6.0 (frigate 0.9.4)
Expected behavior Would expect "current_zones" or "entered_zones" from frigate/events to be passed to "zones" in double-take/matches with the corresponding event "id".
Screenshots See mqtt messages below for the same event "id".
Hardware
- Unraid Dockers / MQTT Explorer
Additional context
frigate event message:
{ "before": { "id": "1637154224.800873-p7wqxk", "camera": "uvc_patio", "frame_time": 1637154228.799868, "snapshot_time": 1637154228.002791, "label": "person", "top_score": 0.8046875, "false_positive": false, "start_time": 1637154224.800873, "end_time": null, "score": 0.55859375, "box": [ 0, 735, 149, 1072 ], "area": 50213, "region": [ 0, 260, 820, 1080 ], "current_zones": [ "patio" ], "entered_zones": [ "patio" ], "has_clip": false, "has_snapshot": false }, "after": { "id": "1637154224.800873-p7wqxk", "camera": "uvc_patio", "frame_time": 1637154228.799868, "snapshot_time": 1637154228.002791, "label": "person", "top_score": 0.8046875, "false_positive": false, "start_time": 1637154224.800873, "end_time": 1637154233.998617, "score": 0.55859375, "box": [ 0, 735, 149, 1072 ], "area": 50213, "region": [ 0, 260, 820, 1080 ], "current_zones": [ "patio" ], "entered_zones": [ "patio" ], "has_clip": true, "has_snapshot": true }, "type": "end"
double-take match message:
{ "id": "1637154224.800873-p7wqxk", "duration": 2.73, "timestamp": "2021-11-17T13:03:50.554Z", "attempts": 19, "camera": "uvc_patio", "zones": [], "misses": [], "match": { "name": "alex", "confidence": 99.93, "match": true, "box": { "top": 65, "left": 201, "width": 86, "height": 86 }, "type": "snapshot", "duration": 0.02, "detector": "compreface", "filename": "59ad83ef-1d0e-4091-91b6-f3041796f774.jpg", "base64": null } }
Looking into it further it appears that the first message from frigate has no zone for the "before" but does have it for the "after"
This issue may be resolved by using the "after" zones instead of the "before". @jakowenko let me know if you agree.
{ "before": { "id": "1637154224.800873-p7wqxk", "camera": "uvc_patio", "frame_time": 1637154224.800873, "snapshot_time": 0, "label": "person", "top_score": 0, "false_positive": true, "start_time": 1637154224.800873, "end_time": null, "score": 0.55859375, "box": [ 0, 786, 165, 1078 ], "area": 48180, "region": [ 0, 780, 300, 1080 ], "current_zones": [], "entered_zones": [], "has_clip": false, "has_snapshot": false }, "after": { "id": "1637154224.800873-p7wqxk", "camera": "uvc_patio", "frame_time": 1637154226.803092, "snapshot_time": 1637154226.803092, "label": "person", "top_score": 0.724609375, "false_positive": false, "start_time": 1637154224.800873, "end_time": null, "score": 0.8203125, "box": [ 299, 388, 673, 1072 ], "area": 255816, "region": [ 70, 270, 878, 1078 ], "current_zones": [ "patio" ], "entered_zones": [ "patio" ], "has_clip": false, "has_snapshot": false }, "type": "new" }
Thanks for the additional info @bigbangus, I do look for after if it exists, but I'm guessing the initial match came during the before event, which at that time had no zones.
The only thing I could try to do is manipulate the metadata of the event if the current before event is still processing. If event 1 (before) is still processing the request (meaning no results were found yet) and event 2 (after) comes in, I could try to modify the current event 1 metadata to include the zones from event 2.
I hope this makes sense haha. It's a little confusing to type up.
I'd be happy to try that change whenever you release the next version thank you.