Closed cryptedx closed 2 years ago
A couple things:
stationary
block from your detect config. The defaults should work fine in your situation.contour_area
setting is better for other reasons.Under what conditions do you want to be notified of a car? Can you post a picture from your camera without the cars present or with them masked/blurred sufficiently?
I am fairly certain that these cars would have been detected previously when other objects in unmasked areas moved around them. Are you saying that previously they never showed up in the events list or in a notification? Motion masks do not prevent objects from being detected. They just prevent motion in that area from triggering object detection.
Problem still persists. Detection is happening and cars are not moving. Same situation as before. It's Sunday, not much going on ;-) Weather is cloudy. Also nobody or something was moving in front of the cars.
This is my masked cam:
I want to be notified when an object is on my ground. Every time. This area is the main entry to our House.
Are you saying that previously they never showed up in the events list or in a notification? --> Yes, never. Just when a car passes from left to right or vice versa I get a notification. This is also an open topic. Since this is a dead-end street there is not much traffic, so it wasn't an urgent one for me, yet. But as you can see the complete area is masked. This is the original image.
It is working as designed and finding cars since you have that listed in your config. You are getting notified of those cars because you haven't defined any restrictions on when you want to be notified. The recommended way to handle this scenario is to define a zone for your ground and require that an object enter that zone in your notifications, events, etc.
I don't know the exact coordinates of your zone, but here is how you would specify a zone:
cameras:
...
doorbird:
zones:
ground:
coordinates: ... # <---- update with coordinates where bottom center of bounding boxes would be
record:
...
events:
...
required_zones:
- ground
snapshots:
...
required_zones:
- ground
Your notification would look like this with the condition added to require the zone:
alias: Notification, Motion, Cam - Frigate object detected
trigger:
- platform: mqtt
topic: frigate/events
condition:
- condition: state
entity_id: input_boolean.disable_camera_hof_motion_notification_door_open
state: 'off'
- condition: state
entity_id: input_boolean.disable_camera_hof_motion_notification
state: 'off'
- "{{ 'ground' in trigger.payload_json['after']['entered_zones'] }}"
action:
- service: notify.mobile_app_iphone_12_pro_max
data_template:
message: Ein {{trigger.payload_json["after"]["label"]}} wurde erkannt.
data:
image: >-
https://***/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg?format=android
tag: '{{trigger.payload_json["after"]["id"]}}'
url: /lovelace/kameras
clickAction: /lovelace/kameras
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
mode: single
This is an example of what I would consider too much masking. With proper use of zones, you should be able to reduce the size of your motion mask and get faster and more reliable detections. Frigate detects and tracks objects as they move in and out of the areas you care about. Ideally, you want Frigate to detect and track person and car objects on the street and only notify you if they enter your ground. With your current mask, when a person steps on your ground, Frigate will only see motion for their foot and may not detect it as a person until they move further into your ground. Also, Frigate requires multiple frames of detections to confirm it as a true positive which will further delay your notifications and may miss the object. Without such a large mask, the person would be detected, confirmed as a true positive, and tracked while they are still across the street. Then, the very first step they take into your ground would trigger a notification.
You may also want to look at the updated notification blueprint for 0.10.0: https://github.com/blakeblackshear/frigate/discussions/2748#discussioncomment-2152948
The old blueprint ran in single mode and only tracked a single object. With stationary objects in frame this means you were probably missing notifications. This version will send a notification for every tracked object. When they are stationary and start moving again it will send another notification
Lastly, this note from the docs is important to know when creating zones:
Presence in a zone is evaluated based on the bottom center of the bounding box for the object. It does not matter how much of the bounding box overlaps with the zone.
Thank you very much. That was a really great help. I will try to implement everything.
@blakeblackshear
required_zones: - ground
Is this documented, I'm experiencing the same issue since I updated yesterday, but don't see this config option in the docs?
My current global record config =
record:
enabled: true
retain_days: 0
events:
post_capture: 10
retain:
default: 30
objects:
person: 60
@Coolie1101
It's documented here: https://docs.frigate.video/configuration/masks/#further-clarification
and here: https://docs.frigate.video/guides/stationary_objects/
Hi @blakeblackshear,
I didn't had much time but it is working perfect now. Thank you very much so far :-)
But one problem is left. I am getting push notifications outside of my zones.
If a car drives on the street and does not enter my zone I get a notification. I have reduced the mask as you can see but I got this new problem. So I don't know what to do now.
You need to add a condition to your notification that requires the zone. The required_zones for events and snapshots don't apply to notifications. See here for some examples.
I am using the blueprint and have added the condition:
does not enter my zone
Can you confirm that you don't see the event you were notified about on the events page?
Can you post the yaml the blueprint generated for the automation?
Yes, I can confirm that I don't see the event were I have been notified about.
alias: Notification, Motion, Cam - Frigate Camera Doorbird object detected
description: ''
use_blueprint:
path: hunterjm/frigate_0.10_notification.yaml
input:
camera: doorbird
update_thumbnail: false
zone_filter: true
notify_group: notify_group_parents
zones:
- zone_hof
silence_timer: 30
cooldown: 30
I'm not sure why you are getting notifications there. You should look at the automation trace tools to see what is happening.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the problem you are having
I have upgraded to the newest version today and I have a setup where Home Assistant pushes me a notification when an object has been detected. The new version has
Stationary objects
feature. At the moment I don't have any use for it but I think there will be some use cases when I have time to think about it! So, thank you for that but it's making me trouble:There a two stationary cars from my neighbour at the moment . One of them is causing me headache. It's usually not there all the time but today it is. It's a silver one (side view). Unfortunately I can't post the picture of the car (privacy), but it's 15 meters away from my cam. Another dark blue car (front view) is 5 meters to the right of the silver one This isn't making any trouble.
I have set
contour_area: 125
and also tried up to 1000.The area where the two cars are is also completely masked.
I don't know hot to solve that issue. So I have to deactivate frigate for now. My config worked for more than 6 months now without such an issue.
Thank you for your time and help!
Version
0.10.0-BFECEE9
Frigate config file
Relevant log output
FFprobe output from your camera
Frigate stats
Operating system
UNRAID
Install method
Docker Compose
Coral version
USB
Network connection
Wired
Camera make and model
Doorbird D1101V
Any other information that may be helpful
I am using this Home Assistant config to push notifications when objects appear: