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.

[Support]: Stationary person sensor for room occupancy issue

See original GitHub issue

Describe the problem you are having

Hello, I’m glad to see that the new version add the ability to track stationary objects, I have a large room divided in 3 zones and I want to have a binary sensor that stay on when someone stay in a zone, I’m not sure that I understand correctly the new version (I have randomly tweaked the values but no change) because I can see that a person is detected in that zone in the debug mode but my binary sensor in Home Assistant goes on when I enter in the zone but then goes off after a few seconds.

Is there a way to tweak my code ?

A huge thank you in advance for your help and thank you for your work! 🙂

Version

0.10.0-BFECEE9

Frigate config file

The code of the room:

  main_room_pir:
    ffmpeg:
      inputs:
        - path: rtsp://192.168.0.12/live/ch00_1
          roles:
            - detect
    objects:
      track:
        - person
    motion:
      mask:
        #Mask the timestamp
        - 593,0,575,33,345,29,323,0
      contour_area: 30
    zones:
      salon:
        coordinates: 371,0,374,171,272,198,123,120,179,0
        objects:
          - person
      salle_a_manger:
        coordinates: 0,360,196,304,235,209,139,113,143,0,0,0
        objects:
          - person
      cuisine:
        coordinates: 640,360,0,360,0,360,375,173,371,0,640,0
        objects:
          - person
    detect:
      width: 640
      height: 360
      fps: 1
      enabled: True
      stationary:
        interval: 0
        max_frames:
          objects:
            person: 1000
    snapshots:
      enabled: false
      retain: 
        default: 1
      required_zones:
        - salon
        - salle_a_manger
        - cuisine
    record:
      enabled: false
      retain:
        days: 1
        mode: motion
      events:
        retain:
          default: 3
          mode: active_objects
        required_zones:
          - salon
          - salle_a_manger
          - cuisine
    rtmp:
      enabled: False

Relevant log output

Log is ok (Only info and warning for the CPU)

FFprobe output from your camera

None

Frigate stats

None

Operating system

HassOS

Install method

HassOS Addon

Coral version

CPU (no coral)

Network connection

Wired

Camera make and model

Chinese camera

Any other information that may be helpful

frigate-screenshot _

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:29 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Quentin-Clooscommented, Dec 12, 2022

Sorry I should have mentioned it, I have the 0.11.1 build.

I also had to lower the threshold to 0.5 and the min_area to 2000 for some zones but I don’t know if it’s related to this issue. I also changed this for a more sensitive detection:

motion:
  threshold: 10
  delta_alpha: 0.5
  frame_alpha: 0.3
  frame_height: 50

I can say that I have now a very solid occupancy detection in my zones.

1reaction
NickM-27commented, Feb 21, 2022

@Raphael909 What that means is that once an object is considered stationary, there will be no detection run to confirm it is still there. detection will only be run when motion occurs. 0 is the default value for this and should remain that way for in this scenario.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Occupancy Sensors: The Definitive Guide - Rayzeek
A complete guide to occupancy and vacancy sensors, what they are, how each motion sensor technology works, and their ideal applications.
Read more >
Occupancy Detection - Ainstein AI
The PIR infrared human motion sensor is cheap, but the disadvantage is that it cannot detect stationary people. When the people in the...
Read more >
Occupancy Sensing - not just Motion! - Devices & Integrations
Hello, ST Community! I am having some hurdles with using a motion sensor to help automate my lighting. The issue in the below-linked...
Read more >
Back to the Office: A Sensor & Proptech Buyer's Guide
PIR Sensor : PIR sensors detect occupancy through body heat and motion. They may be less accurate on the desk-level or spaces, like...
Read more >
XY Sense | Advanced workplace sensors | Occupancy sensor
Like our area sensors, all data is 100% anonymous. Get deeper insights into occupancy trends, easily monitor and manage space capacity to ensure...
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