Help! Probem using PIR Sensor on raspberry pi zero to turn on/off screen

  • Hi all,

    i followed every step of this post :point_down:
    @randombullet said in How I got my Magic Mirror working on a Raspberry Pi 0 (zero):

    I’ve been working on this for a little bit and I’m sorry for all the incoming questions and posts on here.

    On sudo npm install, I get npm ERR! code EPEERINVALID.

    I’ve tried googling some answers but I’m not confident enough to figure this out. Also I’m writing the steps in a more linear way to make more sense of it this is what I have so far and I’d like some input so that I can help other people.

    Step 2
    My Jessie Lite didn’t allow me to create files for some reason. I posted on reddit here.

    Anyways the way of going around this is to put in a “wpa_supplicant.conf” file into your SD card and put the following in:


    This is what I have so far. Please look over this. Thanks in advanced!

    1 sudo wget
    2 sudo dpkg -i node_latest_armhf.deb
    3 sudo apt-get install npm
    4 sudo apt-get install git
    5 cd /home/pi/
    6 git clone
    7 cd MagicMirror
    8 sudo npm install #This will take a LONG time.
    9 sudo apt-get install midori
    10 sudo apt-get install unclutter
    11 sudo aptitude install xinit
    12 sudo apt-get install matchbox
    13 sudo raspi-config
    14 Boot Options -> B1 Desktop/CLI -> B2 Console Autologin
    15 sudo nano /home/pi/

    #! /bin/bash
    cd ~/MagicMirror
    node serveronly &
    sleep 45
    sudo xinit /home/pi/
    16 Control + x > Y > Return
    17 sudo chmod a+x /home/pi/
    18 sudo mv /home/pi/ /etc/init.d/
    19 sudo update-rc.d defaults 100
    20 sudo apt-get install x11-xserver-utils
    21 sudo nano /home/pi/

    xset -dpms # disable DPMS (Energy Star) features.
    xset s off # disable screen saver
    xset s noblank # don’t blank the video device
    matchbox-window-manager &
    unclutter &
    midori -e Fullscreen -a http://localhost:8080
    22 Control + x > Y > Return
    23 sudo nano /boot/config.txt

    24 Control + x > Y > Return

    everything works fine exept the pir sensor. :smirk:
    I’ve a python script to test the pir sensor. Motions are detected but my mirror still turned off.

    does anybody have an idea ? :expressionless:

  • Pir sensor module works fine. Screen wakes up.
    I stil have nothing on screen, no smart mirror.

Log in to reply

Looks like your connection to MagicMirror Forum was lost, please wait while we try to reconnect.