MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Blackscreen after install MMM-PIR-Sensor

    Scheduled Pinned Locked Moved Troubleshooting
    15 Posts 5 Posters 9.3k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B Offline
      Blackmirror
      last edited by

      I have it remove and make a new installation, after this it comes errors:

      pi@Mirror:~/MagicMirror/modules/MMM-PIR-Sensor $ sudo npm install -g

      epoll@0.1.21 install /usr/lib/node_modules/Magic-Mirror-Module-PIR-Sensor/node_modules/epoll
      node-gyp rebuild

      gyp WARN EACCES user “root” does not have permission to access the dev dir “/root/.node-gyp/6.10.0”
      gyp WARN EACCES attempting to reinstall using temporary dev dir “/usr/lib/node_modules/Magic-Mirror-Module-PIR-Sensor/node_modules/epoll/.node-gyp”
      make: Entering directory ‘/usr/lib/node_modules/Magic-Mirror-Module-PIR-Sensor/node_modules/epoll/build’
      CXX(target) Release/obj.target/epoll/src/epoll.o
      SOLINK_MODULE(target) Release/obj.target/epoll.node
      COPY Release/epoll.node
      make: Leaving directory ‘/usr/lib/node_modules/Magic-Mirror-Module-PIR-Sensor/node_modules/epoll/build’

      Magic-Mirror-Module-PIR-Sensor@1.1.0 postinstall /usr/lib/node_modules/Magic-Mirror-Module-PIR-Sensor
      electron-rebuild -e …/…/node_modules/electron

      sh: 1: electron-rebuild: not found
      npm ERR! Linux 4.4.50-v7+
      npm ERR! argv “/usr/bin/nodejs” “/usr/bin/npm” “install” “-g”
      npm ERR! node v6.10.0
      npm ERR! npm v3.10.10
      npm ERR! file sh
      npm ERR! code ELIFECYCLE
      npm ERR! errno ENOENT
      npm ERR! syscall spawn

      npm ERR! Magic-Mirror-Module-PIR-Sensor@1.1.0 postinstall: electron-rebuild -e ../../node_modules/electron
      npm ERR! spawn ENOENT
      npm ERR!
      npm ERR! Failed at the Magic-Mirror-Module-PIR-Sensor@1.1.0 postinstall script ‘electron-rebuild -e …/…/node_modules/electron’.
      npm ERR! Make sure you have the latest version of node.js and npm installed.
      npm ERR! If you do, this is most likely a problem with the Magic-Mirror-Module-PIR-Sensor package,
      npm ERR! not with npm itself.
      npm ERR! Tell the author that this fails on your system:
      npm ERR! electron-rebuild -e …/…/node_modules/electron
      npm ERR! You can get information on how to open an issue for this project with:
      npm ERR! npm bugs Magic-Mirror-Module-PIR-Sensor
      npm ERR! Or if that isn’t available, you can get their info via:
      npm ERR! npm owner ls Magic-Mirror-Module-PIR-Sensor
      npm ERR! There is likely additional logging output above.

      npm ERR! Please include the following file with any support request:
      npm ERR! /home/pi/MagicMirror/modules/MMM-PIR-Sensor/npm-debug.log

      1 Reply Last reply Reply Quote 0
      • cowboysdudeC Offline
        cowboysdude Module Developer
        last edited by

        Did you go to the module directory that the pir module is in and run ‘npm install’?

        If not try that first.

        1 Reply Last reply Reply Quote 1
        • B Offline
          Blackmirror
          last edited by

          Hello,
          I have delete the ‘,’ but I have still this problem. In the past failure in the config.js make a white screen at me.

          And I have run ‘sudo npm install -g’ in the MMM-PIR-Sensor directory,
          and I see this Error messages. And I have still a black screen.

          1 Reply Last reply Reply Quote 0
          • brobergB Offline
            broberg Project Sponsor
            last edited by

            I don’t think you are supposed to be using sudo when doing npm install just the other parts,
            Using sudo will probably give access issues for the module.

            1 Reply Last reply Reply Quote 1
            • B Offline
              Blackmirror
              last edited by

              So I Have rm -rf MMM-PIR-Sensor and new install. after this I run npm install -g, is give the follow error messages

              pi@Mirror:~/MagicMirror/modules/MMM-PIR-Sensor $ npm install -g
              npm WARN checkPermissions Missing write access to /usr/lib/node_modules
              /usr/lib
              └─┬ Magic-Mirror-Module-PIR-Sensor@1.1.0
              └─┬ onoff@1.1.2
              └─┬ epoll@0.1.21
              ├── bindings@1.2.1
              └── nan@2.5.1

              npm ERR! Linux 4.4.50-v7+
              npm ERR! argv “/usr/bin/nodejs” “/usr/bin/npm” “install” “-g”
              npm ERR! node v6.10.0
              npm ERR! npm v3.10.10
              npm ERR! path /usr/lib/node_modules
              npm ERR! code EACCES
              npm ERR! errno -13
              npm ERR! syscall access

              npm ERR! Error: EACCES: permission denied, access ‘/usr/lib/node_modules’
              npm ERR! at Error (native)
              npm ERR! { Error: EACCES: permission denied, access ‘/usr/lib/node_modules’
              npm ERR! at Error (native)
              npm ERR! errno: -13,
              npm ERR! code: ‘EACCES’,
              npm ERR! syscall: ‘access’,
              npm ERR! path: ‘/usr/lib/node_modules’ }
              npm ERR!
              npm ERR! Please try running this command again as root/Administrator.

              npm ERR! Please include the following file with any support request:
              npm ERR! /home/pi/MagicMirror/modules/MMM-PIR-Sensor/npm-debug.log

              And a black screen at the mirror

              1 Reply Last reply Reply Quote 0
              • B Offline
                Blackmirror
                last edited by

                I Have solve this problem without MMM-PIR-Sensor this a python-skript in rc.local.

                But bei DHT22 - Sensor is not working now, destroyed? But why?

                1 Reply Last reply Reply Quote 0
                • H Offline
                  howesfam
                  last edited by

                  Hi Blacjscreen,

                  I’m suffering the same problems, do you have alink to your python code?

                  B 1 Reply Last reply Reply Quote 0
                  • B Offline
                    Blackmirror @howesfam
                    last edited by yawns

                    @howesfam

                    import RPi.GPIO as GPIO
                    import time
                    
                    
                    #Board Mode: Angabe der Pin-Nummer
                    GPIO.setmode(GPIO.BOARD)
                    
                    #GPIO Pin definieren fuer den Dateneingang vom Sensor
                    PIR_GPIO = 13
                    Relay_GPIO = 37
                    GPIO.setup(PIR_GPIO, GPIO.IN)
                    GPIO.setup(Relay_GPIO, GPIO.OUT)
                    GPIO.output(Relay_GPIO, True)
                    GPIO.setup(32,GPIO.IN)
                    
                    read=0
                    wait=0
                    ein=0
                    button=1
                    
                    while True :
                       #PIR auslesen
                       read = GPIO.input(PIR_GPIO)
                       button = GPIO.input(32)
                    
                       if ((read==1 or button==0) and wait==0):
                         GPIO.output(Relay_GPIO, False)
                         wait=1
                         ein=1
                         time.sleep(0.5)
                       elif ein==1 and button==0:
                         ein=0
                         time.sleep(0.5)
                    

                    Have found in the web and I have modified for me, the Pin 32 is a button to make the monitor, ampilifier and the mirror light always on.

                    1 Reply Last reply Reply Quote 0
                    • B Offline
                      beck0r
                      last edited by

                      Having the same problem. Any solution ?

                      1 Reply Last reply Reply Quote 0
                      • B Offline
                        Blackmirror
                        last edited by

                        Use the PIR-Senosr not with this modul, but with the python script.

                        1 Reply Last reply Reply Quote 0

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • 1 / 1
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Sam, technical setup by Karsten.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy