MMM-PIR-Sensor problems



  • Now, screensaver is disabled… PIR not working. Display is switched on all the time…

    Perhaps, the problem could be the installed GPIO 2.25 instead of a newer version?
    After running npm install wiring-pi version 2.25 is still running.


  • Module Developer

    You could try if you are using the right GPIO by pulling the pin Up.

    Take a 10k Resistor one side on 5V and the other side tap the GPIO pin that is what the PIR would do. Then you can check if you use the proper pin.



  • I am sure I am using GPIO22.

    I am wondering about the display, which is not switching off. It stays on all the time.

    Could it be a problem with the fact that the user “pi” is logged in ?

    Why does the display not switch off ?


  • Module Developer

    Maybe your PIR is always HIGH
    thats is why you should check with a resistor if it works.
    Or disconnect the OUT pin to see in the screen stays off.



  • Maybe you are right. I tried using MagicMirror-Display-Controller and started the pir.py-python script… the output: “Motion detected… setting timer to 180 seconds”.

    Okay, I am a bit afraid, because it is a bit difficult to take a look at the Raspberry Pi - I have to change the place after all is working and final.

    Let´s say, the PIN is telling HIGH (=motion detected) the whole time. What do I have to do then ? I am new to linux/RPi and learning day to day.

    I try without data connection PIR->RPi


  • Module Developer

    As I wrote in my previous message check if the GPIO is low when you disconnect the PIR
    I always check all parts with an Arduino Nano or Uno to see if it works and if it needs settings it is easily done before installing.
    This evening I will not be online any much longer.



  • Thanks for helping…

    Without the PIR-Data-Pin connected to GPIO 22, the script does not show the message “motion detected”. It is counting from 180 to 0. Think this means the GPIO is LOW then.

    I think all I need now is what to do next. Broken PIR ? Wrong PIR-settings (Potentio meters, Jumper) ?


  • Module Developer

    You could try to use a pull-up resistor maybe the PIR output is 5V

    pullup resistor

    Check this website. Otherwise your PIR is broken. If you are in the Netherlands i can post by snailmail another one to you that works for sure,



  • I have 8 HC-SR501 bought a while ago. Some of them are green, some blue.
    Tested all of them now…

    0_1523903551418_PIR4.jpg

    The message is the same: OUT connected… Motion detected. OUT not connected, no motion detected… Think, this means OUT and HIGH are working.

    But, the PIR sensor delivers motion detected permanently if connected.

    So, according to your PullUp-Link I have to put a 10kohm resistor between Raspberry Pi GPIO 22 and PIR-OUT ?

    I am wondering why none of those tutorials are telling this. Some of my PIRs should work with 3.3V-OUT ?

    I am afraid there is a mistake I am making, but I don´t know which one and how to solve it. That´s the last part missing for my mirror, the important part.


  • Module Developer

    What you could do is put a 10k Resistor between GPIO 22 and GND. if the PIR disconnects your PIN is pulled LOW.

    PIRs may give different signals my PIR only gives a high (3v3)