Read the statement by Michael Teeuw here.
PIR Sensor turning display on/off over and over
-
i gave up on my PIR sensor cause this was happening to me…guess who is searching for a Ferrite bead tomorrow!!!
-
This post is deleted! -
FWIW, a ferrite bead is a working solution, but I was able to circumvent this issue by keeping the PIR Sensor a good distance from the Pi. Mine is about 3 feet away from the Pi and doesn’t act erratically as it did when it was right next to it during testing.
-
This post is deleted! -
Similar problem here, PIR works like a charm (tested with code of post #4) but after starting the MagicMirror the display is turned off and on over and over even though nothing is changed in front of the sensor. (I use MMM-PIR).
-
@phrazelle Since I am having a ‘cordless’ mirror (power is coming from wall behind mirror) I don’t want to see cables to my mirror. I’ve build the PIR into the frame of my mirror.
-
Even with the bead installed I have various results. Sometimes it’s running ok for an hour or so, but most of the time I’m getting a lot of false positives. And very strange, only with the output timer (2nd yellow knob) on minimal it’s working ok. But then the screen lits up far too short. But output time has nothing to do with it?
-
Basically I had the same error with the display turning on and off over time. All in anger, I deinstalled the MagicMirror from the Pi and began at zero again.
After updating and upgrading the Pi and installing the MagicMirror, a new try with the PIR-Module was iniciated. So I installed the PIR-Module and somehow noticed that my GPIO cables were wrong connected (ground connected to GPIO21 and vice-versa).
So after this embarassing moment of disbelieve I changed the connections and checked if the sensor is working with a simple python script:from gpiozero import MotionSensor import time pir = MotionSensor(21) while True: #repeat this forever if pir.motion_detected: # if motion is detected print the message print("Motion detected!") if not pir.motion_detected: # if no motion is detected print the message print("No motion detected!") time.sleep(1)
Note that my pir is using GPIO21.
With this script I tested the sensor and it worked like a charm, even though the sensor is placed 5 centimeters away from the raspberry pi 3 (with no case or even a bead installed).
In the end, I only had to do acd MagicMirror
again, and install the MagicMirror:
npm install
. With this setup the MMM-PIR-module works magnificient. -
Hi Jay, can you reply a link to your PIR module you finaly use?
-
@deepshades
Basically its just the standard PIR-Sensor shipped with female to female gpio connections (PIR-Sensor Amazon).