MagicMirror² v2.12.0 is available! For more information about this release, check out this topic.

PIR Sensor turning display on/off over and over

  • @deepshades
    Basically its just the standard PIR-Sensor shipped with female to female gpio connections (PIR-Sensor Amazon).

  • @Jay

    Ok, so you just use a script to let the sensor deactivate the hdmi output?
    Could you tell me the steps to let all work together?

  • @deepshades
    Well ok…
    step 1: get nodejs and npm --> sudo apt-get install nodejs then sudo apt-get install npm
    step 2: update + upgrade the pi --> sudo apt-get update then sudo apt-get dist-upgrade
    step 3: install MagicMirror --> as seen here MagicMirror Github Page
    step 4: connect the PIR-Sensor to your Pi --> ground to ground (e.g. Pin 6), VCC to 5V (e.g. Pin 2), Out to GPIO XX (e.g. Pin 16)
    step 5: check if PIR-Sensor works --> as seen at my script above (watch your connected GPIO pin, maybe change in script is required) --> some fiddling with sensitivity knobs here is needed
    step 6: install MMM-PIR --> MMM-PIR Github Page
    step 7: reboot and reinstall MagicMirror in MagicMirror directory --> cd MagicMirror and npm install

    this has worked for me…

  • This post is deleted!

  • @johnnyboy

    The steps I described started after a succesfully installation of the operating system on the pi, so with no MagicMirror installed --> step 3 is the first time MM is installed.
    These are the steps which worked for me, somehow after the second install of the MagicMirror (step 7) the PIR worked --> this step could be obsolete for others, thats just what i did experience.

  • This post is deleted!

  • Hi: I’m having the same problem with the PIR sensor module - when motion is detected the screen comes on for about 1 sec and then shuts off. It operates like that for a minute or so and then begins to not respond or responds intermittently to motion. I’ve added a magnet ring, updated the OS and the MMM-PIR module, but still have the same issues. Any ideas what I should check? Thx!

  • @jproehl Does your PIR sensor has a sensitivity and time option? Try playing with it and see if it works. Also, feel free to post pix of the wiring connection so we can visually verify. I also play around with the GPIO pins. Hope this helps!

  • @elmerito25 Hi:

    Thanks for the reply. The PIR has two rheostats labeled Sx and Tx, so which is which. I’m tempted to dispense with the PIR altogether and just use the monitor on/off switch to activate the display. But, I’ll mess with the PIR when I get a chance and see if I can get anywhere. Using Board numbering, the PIR has its VCC pin wired to pin 4, its ground pin wired to Pin 6 and its signal pin wired to Pin 7. I set the pin number in my config.js file to 4 (Board pin 7 is GPIO pin 4). Would there be any problem with this wiring?

Log in to reply