Read the statement by Michael Teeuw here.
Blackscreen after install MMM-PIR-Sensor
-
I don’t think you are supposed to be using
sudo
when doingnpm install
just the other parts,
Using sudo will probably give access issues for the module. -
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.1npm 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 accessnpm 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.logAnd a black screen at the mirror
-
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?
-
Hi Blacjscreen,
I’m suffering the same problems, do you have alink to your python code?
-
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.
-
Having the same problem. Any solution ?
-
Use the PIR-Senosr not with this modul, but with the python script.