Closed Justihar closed 2 years ago
It seems you understand it well except for that fact that you said using required_zones that the zone data is not passed through. This is not the case, and is exactly how I have my setup working.
One thing to note is that frigate uses zones and masks based on the bottom center of an object's bounding box. So I would double check your zones to make sure it is designed to be triggered when the bottom center of the bounding box is in the zone.
Let me rephrase, zone data for an ignored zone isn't coming through on MQTT (from what I can tell). So if I tell zone "front_yard" to only identify "person" objects but the vehicle passes through the "driveway_entry" which only watches for car objects but ends up in the "front_yard" zone, I never see "front_yard" show up as an "entered_zones" for car.
Thank you for the note on how the bounding boxes work. I have been looking through the github issues and see that come up quite often and it has helped me in marking zones more adequately.
Okay I see, but why would you want that? If you aren't looking for a car in the front_yard why would you expect the MQTT message to show that a car was in the front_yard?
My thinking is that I'd want to know because it had to pass through the driveway_entry in order to get in the front_yard. Once that has been established then I don't care to know that it is in the front_yard. Of course I understand that it is the way it is so what would be the best way for me to adapt?
Perhaps I am misunderstanding something. In your case is the "driveway" (where cars go) and the "front yard" the same zone / area?
A picture might be helpful to offer suggestions
Yes, I had driveway broke into its own zone but I had way too many zones for something that should be pretty simple. So I just made the whole front yard one zone since I only care about people except when a vehicle enters.
Blue zone is "driveway_entry"
Okay cool, I have a few ideas of different types.
entered_zones
with "driveway_entry" and that would be your trigger to send a notification. I wouldn't think that any cars driving by on the street would enter that zone. Frigate doesn't have a concept of an "ignored zone" and configuration of required_zones for recordings and snapshots have no effect on the mqtt events topic.
But the zone -> object options do have an effect on the data being reported over MQTT, correct?
Frigate doesn't have a concept of an "ignored zone" and configuration of required_zones for recordings and snapshots have no effect on the mqtt events topic.
But the zone -> object options do have an effect on the data being reported over MQTT, correct?
Yes. Only object types listed there can trigger the zone.
Ok, fair enough, I'll work with that. Thank you @NickM-27 and @blakeblackshear for the help.
Describe the problem you are having
I'm pretty new to Frigate so I am trying to understand the behavior of zones, object filtering and how that information comes through in MQTT.
I am running Frigate in a docker container and although I did end up adding the custom component to HA core, I plan on building my automations in AppDaemon using MQTT directly.
I am doing the typical "notification of car entering driveway" type scenario. I don't particularly care to record or take action on vehicles that are passing by on the street but obviously need to start the process of object detection in that area or at least the entrance of the driveway.
What is the recommended way to allow the zone data to be passed through MQTT but ignore recording? It seems like if I use the record/snapshot options with required_zones, I still see MQTT data but the "entered_zones" and "required_zones" data is not passed through.
If I am understanding correctly, I should be able to check for an MQTT event where current_zone=["driveway"] and entered_zones=["driveway_entry", "driveway"] but again, don't want to record a vehicle in the driveway or street.
Is there any documentation that explains some of the expected behaviors of MQTT or perhaps some examples of data to look at for various scenarios?
Any suggestions would be helpful, thank you!
Version
0.10.0-BFECEE9
Frigate config file
Relevant log output
FFprobe output from your camera
Frigate stats
No response
Operating system
Other Linux
Install method
Docker Compose
Coral version
USB
Network connection
Wired
Camera make and model
Amcrest
Any other information that may be helpful
No response