Read the statement by Michael Teeuw here.
PIR gives black screen
-
I added a PIR to my MM, and I get a black screen, and no MM in browser on other LAN devices.
Hitting the ‘Windows’ key brings up the Pi start menu, where I can lunch terminal and stop MM.
A simple test script confirms the PIR device is working correctly without MM running.Any ideas on how to fix this, please?
Here are the errors, and my config.
{ Error: Cannot find module 'onoff' at Module._resolveFilename (module.js:455:15) at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12) at Function.Module._load (module.js:403:25) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at Object. (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_helper.js:11:14) at Module._compile (module.js:556:32) at Object.Module._extensions..js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) code: 'MODULE_NOT_FOUND' }Config:
{ module: 'MMM-PIR-Sensor', config: { sensorPIN:22, powerSaving: true, relayPIN: false, powerSavingDelay: 0, relayOnState: 1 // See 'Configuration options' for more information. } }, -
After running
git clone https://github.com/paviro/MMM-PIR-Sensor.gitin~/MagicMirror/modules, did you runcd MMM-PIR-Sensor npm install? The
npm installin this directory should have installedonoffas a dependency. -
That seems to have fixed it, thank you.
There’s now a prompt at the top of MM saying there’s an update available for the PIR module.
How do I go about updating an individual module? -
In your example:
cd ~/MagicMirror/modules/MMM-PIR-Sensor git pull npm installSo you enter the modules directory, tell git to retrieve (= pull) the latest code from github and afterwards you install dependencies again, just in case
-
Perfect, thank you! :)
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