blakeblackshear / frigate-hass-integration

Frigate integration for Home Assistant
MIT License
660 stars 110 forks source link

Binary sensor triggers without verifying event #637

Closed Caddyman68 closed 4 months ago

Caddyman68 commented 4 months ago

Version of the custom_component

Configuration


NA?? Is this my Frigate.yml ?

Describe the bug

I get a lot of false notifications since the blueprint uses the integration's binary sensors and it seems these fire before Frigate verifies that an event has occured (threshold met, etc). I see a snapshot under "Controls/ {object type}" frontdoor 2-19-24 , but it doesn't create an event in Frigate. I haven't found anything in the past few hours of searching that describes this as a bug by anyone else, so maybe it's just me. I do get an error in the log saying "Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options" but that was just for one camera and it happens on all 7. A Google search didn't find anything helpful pertaining to Frigate - in particular HA integration or add on. It also seems that these triggers are outside of the required zone 99% of the time so shouldn't even be considered for analysis or event creation. In the example the zone ends well above the bounding box.

Debug log

Add your logs here.

NickM-27 commented 4 months ago

this is working as expected, the image has its own required zones field and the binary sensors just go off of the score and don't have anything to do with the required zones

NickM-27 commented 4 months ago

this is why it is recommended to use /events mqtt topic and not the binary sensors for notifications

Caddyman68 commented 4 months ago

I assumed the blueprint used the integration's binary sensor since I see that updating after false notifications without an event in the Frigate addon. I get the same (or similar) thumbnail in the notification and clicking on it sends me to HA app which gives me an error - of course . I searched the GitHub for the blueprint also - just re-read through the issues - and now I see that it does in fact use MQTT. Probably should have tried there anyway. Just thought maybe the root of the problem was the binary sensor in the integration because it (the integration) is a requirement for the blueprint. They also mention enabling the checkbox in the integration install "unauthenticated notification event proxy" which is checked by default so I'm pretty sure I left it that way. I don't see the "bug" addressed so it may in fact be something I'm doing in the Frigate yaml or the automation using the blueprint. I installed the MQTT explorer addon and I can see events from Frigate. I will wait until I get an event fire and see what it says for false (if anything) and true. I adjusted the zones on a few cameras and that seems to have stopped or at least reduced the false notifications - none so far today - but if that only affects the binary sensor and not the (MQTT) events used to trigger the automation/blueprint I don't know how. Thanks for your help and quick response.

NickM-27 commented 4 months ago

the sgt batten blueprint uses the /events mqtt topic, to be clear

Caddyman68 commented 4 months ago

I have 5 events for a camera in Frigate addon; in the events under Frigate in MQTT explorer I see 8 in history but some times are very close together. I see one say (- .37 seconds), one has (- .4 seconds) and the most recent doesn't list a time. Honestly don't know what that means. I need to set up an automation for the camera that is easiest to trigger (living room where I'm at now) - I didn't because I usually have it disabled (detect, recording, snapshots off) when I'm home. I appreciate the time you spend helping people like me and even moreso the time and effort people like you invest in integrations, apps, etc. to make Home Assistant better.

NickM-27 commented 4 months ago

There will be multiple events sent for each object so that is normal.