question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Object being recorded outside of its required zone

See original GitHub issue

Describe the problem you are having

I have a set up like this: https://docs.frigate.video/guides/stationary_objects, here’s mine: https://d.pr/i/J3UGZL. The drive zone is set to track person only, and the drive_entrance is set to track car only.

The issue I’m facing is when I drive through thedrive_entrance zone into the drive zone, often the event will just sit at “In Progess” and I get a continuous stream of update events (~ every 4-5s) for the car. I’m not sure what causes it to end, or why it’s still being recorded when it is no longer in the drive_entrace zone, but it can last anywhere from 30 min to 5+ hours. I’m not sure if what I’m seeing is the expected behavior, so it’d be great to have some insight on this. If it is the expected behaviour, I’d like to avoid it if possible as it takes up a lot of disk space. I have the motion threshold slightly lower as sometimes I get no new events despite either car or person leaving or arriving, but that didn’t really help.

I have very hit and miss notifications (both the blueprint, and a basic custom implementation to alert me on type: new), unsure if the above is related to that.

Any help/advice is appreciated.

Version

0.11.0-c461c9e (RC 2)

Frigate config file

mqtt:
  host: ...
  user: ...
  password: ...

cameras:
  front:
    ffmpeg:
      hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format yuv420p
      inputs:
        - path: ...
          roles:
            - detect
            - rtmp
        - path: ...
          roles:
            - record
    detect:
      width: 704
      height: 480
      fps: 5
    motion:
      threshold: 20 # default 25
      mask: # Covers timestamp, foliage, tree
        - 0,174,0,0,74,0,142,0,149,78,181,76,231,84,138,144,0,229
        - 704,159,704,480,558,480,583,133
        - 705,35,705,0,510,0,510,35
    objects:
      track:
        - person
        - car
      filters:
        person:
          min_area: 800
          min_score: 0.65
        car:
          min_score: 0.65
    zones:
      drive_entrance:
        coordinates: 598,116,601,154,445,124,467,96
        objects:
          - car
      drive:
        coordinates: 573,480,187,480,102,303,86,261,283,118,357,119,445,128,431,150,590,188
        objects:
          - person
    record:
      events:
        required_zones:
          - drive_entrance
          - drive
    snapshots:
      enabled: True
      bounding_box: True
      required_zones:
        - drive_entrance
        - drive
    mqtt:
      required_zones:
        - drive_entrance
        - drive

detectors:
  coral:
    type: edgetpu
    device: usb

record:
  enabled: True
  events:
    retain:
      default: 10
      mode: motion

Relevant log output

None

Frigate stats

{
  "detection_fps": 8.2,
  "detectors": {
    "coral": {
      "detection_start": 0,
      "inference_speed": 9.38,
      "pid": 216
    }
  },
  "front": {
    "camera_fps": 5.1,
    "capture_pid": 225,
    "detection_fps": 8.2,
    "pid": 222,
    "process_fps": 5.1,
    "skipped_fps": 0
  },
  "service": {
    "latest_version": "0.10.1",
    "storage": {
      "/dev/shm": {
        "free": 133.1,
        "mount_type": "tmpfs",
        "total": 134.2,
        "used": 1.1
      },
      "/media/frigate/clips": {
        "free": 89091.5,
        "mount_type": "ext4",
        "total": 102221.2,
        "used": 8646.2
      },
      "/media/frigate/recordings": {
        "free": 89091.5,
        "mount_type": "ext4",
        "total": 102221.2,
        "used": 8646.2
      },
      "/tmp/cache": {
        "free": 985,
        "mount_type": "tmpfs",
        "total": 1000,
        "used": 15
      }
    },
    "temperatures": {},
    "uptime": 43,
    "version": "0.11.0-c461c9e"
  }
}

Operating system

HassOS

Install method

Docker Compose

Coral version

USB

Any other information that may be helpful

Running in Proxmox on a Beelink GK55 with this setup:

  • HAOS VM on and the MQTT server is set up as a HA addon
  • Debian LXC with Docker (used the Docker LXC helper from tteck). It uses ~5-10% CPU and ~8% memory. The CPU usage increased from 1-3% when enabling hardware acceleration, if that’s helpful to know.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
NickM-27commented, Sep 10, 2022

Oh I see, I thought you were saying the triggers were new OR after.entered_zones not AND. I’ll go ahead and close for now as the original issue is solved. Feel free to create a new issue if anything comes up.

1reaction
markgoodyearcommented, Sep 10, 2022

For my custom notifications I’m using node-red, and I’ve got it to save any MQTT events by id (<id>.txt) so I’ve a log by each event to make debugging easier. I’ve got this running along side the main blueprint as they’ve both been equally inconsistant, often one would trigger when the other didn’t.

However, since adding the logs I think I’ve spotted one mistake for my own implementation. Filtering by type.new is wrong, just had a car cross the drive_entrance zone and type.new didn’t have anything in the entered_zones or current_zones, theforefore doesn’t get passed the after.entered_zones > 0 condition to send a notification out. This makes sense as Frigate starts tracking way before the zone. Just need to leave it running for a few days and see what happens now.

A little off the original topic so feel free to close this if needs be, I’ll open up a new issue if I still have trouble with notifications.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Recording to library outside of activity zone? - Arlo Community
I was hopeful recordings would not occur outside of the activity zone but they still did. My thinking was that Arlo smart uses...
Read more >
Appendix 16 - FAA
OBSTACLE FREE ZONE (OFZ). The OFZ clearing standard precludes taxiing and parked airplanes and object penetrations, except for frangible visual NAVAIDs that ...
Read more >
How to configure motion detection and setup motion zones
You can configure your DVR / NVR system to record motion detection events and setup custom zone detection. Setup and Help GuidesYou are...
Read more >
Dropped Object Prevention: The Definitive Guide
This is the ultimate guide to stopping dropped objects when working at height. First, we'll learn how tools at height present a constant...
Read more >
How to Use Your Home Security Cameras Better
1. Adjust Motion Sensitivity · 2. Enable Smart Object Detection · 3. Create Activity Zones · 4. Take advantage of continuous recording.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found