Read the statement by Michael Teeuw here.
Bugsounet and MMM-Pir
-
@coernel please add it to the third party list
-
Hi,
Is this the correct place to ask questions about the module?
If so, is there any way to test that it is actually running?
I have installed the module for using a PIR module but nothing appears in the screen in the place I requested it.
Thanks
-
@lif have you verified that the PIR is working outside of MagicMirror??
-
@sdetweil said in Bugsounet and MMM-Pir:
@lif have you verified that the PIR is working outside of MagicMirror??
Yes,
-
@lif and you are using the correct pin definition
Pir: { mode: 0, gpio: 21 },
-
@sdetweil said in Bugsounet and MMM-Pir:
@lif and you are using the correct pin definition
Pir: { mode: 0, gpio: 21 },
Yes, the working script is:
from gpiozero import MotionSensor
from datetime import datetime
import os, time
import RPi.GPIO as GPIOpir = MotionSensor(21)
while True:pir.wait_for_motion() now = datetime.now() current_time = now.strftime("%H:%M:%S") print("Movement detected at", current_time) pir.wait_for_no_motion()
-
@lif I meant MMM-PIR config setup
there are different numbering schemes for GPIO pins and different ways to access
the doc (readme) describes the different choices.
-
@sdetweil said in Bugsounet and MMM-Pir:
@lif and you are using the correct pin definition
Pir: { mode: 0, gpio: 21 },
Yes, I think so, the pir is connected to pin 40 on the Raspberry pi 3b which I’m sure is GPIO 21
-
@lif and if you change to mode 1?? which matches your python lib test?
-
@sdetweil said in Bugsounet and MMM-Pir:
@lif and if you change to mode 1?? which matches your python lib test?
No difference.
I have added a header: “PIR”, line before the config and that is not showing either.