0

我将 Onyehn PIR 运动传感器连接到 Raspberry Pi Zero,它会在实际发生运动时检测到运动。然而,即使它被密封在一个盒子里,它也会每小时检测一次运动。有没有办法确定根本原因或阻止这种情况?

RPi 正在运行 Raspbian GNU/Linux 10 (buster)。该脚本使用 Python 2.7.16

蟒蛇脚本是:

# 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

运行以下命令会显示在每小时触发运动传感器时会发生以下情况:hh:21:40。对我来说,这似乎表明 HRNG 中的某些东西正在触发运动传感器。

有任何想法吗?

谢谢。杰夫

$ 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
4

1 回答 1

0

我发现我的 PIR 传感器也每 1 小时触发一次(+ 0.5 / + 0.9 秒)。我使用 Raspberry Pi 并知道是什么原因造成的。我已经实现了一种过滤机制,可以记录每个“单独”触发器以及是否有一个 3600.5 / 3600.9 秒前。如果是这样,则忽略此触发器。这使得我可以触发一系列触发器中的第一个,并且仍然过滤这些幻像触发器。复杂,但很有效!

于 2021-04-07T05:18:29.703 回答