PIR Motion Sensor triggers every hour

321 views Asked by At

I have Onyehn PIR Motion Sensor connected to a Raspberry Pi Zero, which detects motion when it actually happens. However, it also detects motion every hour, even when it is sealed in a box. Is there anyway to determine root cause or to stop this?

The RPi is running Raspbian GNU/Linux 10 (buster). The script uses Python 2.7.16

The python script is:

# all the pre-requisite modules are imported, globals defined and defs work ... not included
MOTION_PIN = 17

GPIO.setup(MOTION_PIN, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
GPIO.add_event_detect(MOTION_PIN, GPIO.RISING)

def motionTextCallback():
    sendTextMessage('motion detected') # sends text message to my cellphone number

while True:
    time.sleep(3600) # I checked this timer to see if it was triggering motion sensor

Running the following command shows the following occuring just as the Motion Sensor is triggered hh:21:40 on every hour. To me this seems to indicate something in HRNG is triggering the motion sensor.

Any ideas?

Thanks. Jeff

$ sudo journalctl | grep ":21"
Sep 26 23:21:40 rpiDoorbell rngd[290]: stats: bits received from HRNG source: 380064
Sep 26 23:21:40 rpiDoorbell rngd[290]: stats: bits sent to kernel pool: 334336
Sep 26 23:21:40 rpiDoorbell rngd[290]: stats: entropy added to kernel pool: 334336
Sep 26 23:21:40 rpiDoorbell rngd[290]: stats: FIPS 140-2 successes: 19
Sep 26 23:21:40 rpiDoorbell rngd[290]: stats: FIPS 140-2 failures: 0
Sep 26 23:21:40 rpiDoorbell rngd[290]: stats: FIPS 140-2(2001-10-10) Monobit: 0
Sep 26 23:21:40 rpiDoorbell rngd[290]: stats: FIPS 140-2(2001-10-10) Poker: 0
Sep 26 23:21:40 rpiDoorbell rngd[290]: stats: FIPS 140-2(2001-10-10) Runs: 0
Sep 26 23:21:40 rpiDoorbell rngd[290]: stats: FIPS 140-2(2001-10-10) Long run: 0
Sep 26 23:21:40 rpiDoorbell rngd[290]: stats: FIPS 140-2(2001-10-10) Continuous run: 0
Sep 26 23:21:40 rpiDoorbell rngd[290]: stats: HRNG source speed: (min=74.852; avg=338.275; max=801.282)Kibits/s
Sep 26 23:21:40 rpiDoorbell rngd[290]: stats: FIPS tests speed: (min=5.936; avg=6.198; max=6.231)Mibits/s
Sep 26 23:21:40 rpiDoorbell rngd[290]: stats: Lowest ready-buffers level: 2
Sep 26 23:21:40 rpiDoorbell rngd[290]: stats: Entropy starvations: 0
Sep 26 23:21:40 rpiDoorbell rngd[290]: stats: Time spent starving for entropy: (min=0; avg=0.000; max=0)us
1

There are 1 answers

0
ruudvanderham On

I have found that my PIR sensor also triggers every 1 hour (+ 0.5 / + 0.9 seconds). I use a Raspberry Pi and have idea what causes this. I have implemented a filter mechanism that logs each 'lone' trigger and if there was one 3600.5 / 3600.9 seconds ago. If so, this trigger is ignored. This makes that I can trigger on the first of a sequence of triggers and still filter these phantom triggers. Complex, but is works!