mboskamp / MMM-PIR

This MagicMirror module monitors a PIR sensor and turns on/off your display. You can even run custom scripts and control it via Telegram.
16 stars 6 forks source link

Impossible to launch #10

Closed aptgetupgrade closed 4 years ago

aptgetupgrade commented 5 years ago

Hi - I just downloaded this module, did npm install, included the config lines in config.js and when I try to launch MagicMirror provides the following errors:

0|mm | Error: The module '/home/pi/MagicMirror/modules/MMM-PIR/node_modules/epoll/build/Release/epoll.node' 0|mm | was compiled against a different Node.js version using 0|mm | NODE_MODULE_VERSION 59. This version of Node.js requires 0|mm | NODE_MODULE_VERSION 57. Please try re-compiling or re-installing 0|mm | the module (for instance, using npm rebuild or npm install). 0|mm | at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:166:20) 0|mm | at Object.Module._extensions..node (module.js:671:18) 0|mm | at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:166:20) 0|mm | at Module.load (module.js:561:32) 0|mm | at tryModuleLoad (module.js:504:12) 0|mm | at Function.Module._load (module.js:496:3) 0|mm | at Module.require (module.js:586:17) 0|mm | at require (internal/module.js:11:18) 0|mm | at bindings (/home/pi/MagicMirror/modules/MMM-PIR/node_modules/bindings/bindings.js:112:48) 0|mm | at module.exports (/home/pi/MagicMirror/modules/MMM-PIR/node_modules/epoll/epoll.js:5:31)

Gandohr commented 5 years ago

Do the following

cd ~/MagicMirror/modules/MMM-PIR npm install electron-rebuild node_modules/.bin/electron-rebuild

And restart MagicMirror

Smartmirrornoob commented 5 years ago

Do the following

cd ~/MagicMirror/modules/MMM-PIR npm install electron-rebuild node_modules/.bin/electron-rebuild

And restart MagicMirror English below:

Ich habe die Zeilen von dir ausgeführt. Allerdings bekomme ich jetzt nurnoch ein schwarzes Bild. Vorher wollte es nicht starten. Wenn ich das Module aus der config entferne lädt alles normal.

After I have done this MM start. But the screen will be black. When I remove the module from the config.js script the MM will come back normal.

lxne commented 5 years ago

I had the same problem. When I changed the tvservíce-commands in ~/MagicMirror/modules/MMM-PIR/callbackScripts/default/displayOn.sh and ~/MagicMirror/modules/MMM-PIR/callbackScripts/default/displayOff.sh the module started to work for me.

Change the first line in displayOn.sh to vcgencmd display_power 1 and the first line in displayOff.sh to vcgencmd display_power 0

Smartmirrornoob commented 5 years ago

I am sorry but this dosn't work neither. Can you show me your Config part where you have the module?

lxne commented 5 years ago

Did you test your PIR-Sensor? The following tutorial is German: https://tutorials-raspberrypi.de/raspberry-pi-bewegungsmelder-sensor-pir/

Check if your PIR-Sensor is working. I can show you my config part tomorrow.

Smartmirrornoob commented 5 years ago

Thank you. I already testet my Sensor. It is working My problem is that I only have a full black screen. The monitor is on but only show me black.

lxne commented 5 years ago

OK. This is my config part:

                {
                        module: 'MMM-PIR',
                        position: 'bottom_center',
                        config: {
                                sensorPin: 12,
                                delay: 6*60*1000,
                                turnOffDisplay: true,
                                showCountdown: true,
                                callbackScripts: ["callback.py"]
                        }
                },

Did you try a VNC connection? Just to check if the screen is black only on HDMI or over VNC too. https://www.raspberrypi.org/documentation/remote-access/vnc/

Smartmirrornoob commented 5 years ago

Thank you for your config. I have tried it with the vnc connection. Same issue

lxne commented 5 years ago

What is your configuration? Hardware? System? (Terminal command lsb_release -a) Node version? (Terminal command node --version or node -v) npm version? (Terminal command npm --version or npm -v)

For example mine is

Pi 3b+ with Grove PIR Sensor attached to Respeaker 2-Mics Hat Raspbian 10 (buster) Node v10.16.1 npm 6.9.0

Are you having any npm install errors?

Smartmirrornoob commented 5 years ago

I have an Raspberry Pi 3 B+ PIR and Button connected via GPIO Raspbian 10 (Buster) Node v10.15.2 npm 5.8.0

lxne commented 5 years ago

You probably got something like this while doing npm installs:

npm WARN npm npm does not support Node.js v10.15.2
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
npm WARN using --force I sure hope you know what you are doing.

I think your npm version is not compatible with your node version.

Did you install Raspbian via Noobs? And what version did you choose? Raspbian (recommended) or any other?

Smartmirrornoob commented 5 years ago

Yes that is exactly what i got.

I choosed the newest Noobs 3.2.0? I choosed the recommended. Raspbian

I have updated NPM to version 6.10.3 But still the issue I started the NPM install again. Do I need to remove it bevor? And how?

Smartmirrornoob commented 5 years ago

I have done a complete new MM. New SD Card, Same Noobs 3.2.0 Same Raspberrian. Updated NPM before install something with it. Same issue. I only have installed the MMM-PIR

lxne commented 5 years ago

Which node and npm version do you have on your new installation? While installing did you have any npm WARN npm npm does not support Node.js... messages?

Do you have pm2 up and running? If so, how do the last entries of your MagicMirror-error.log look like? nano /home/pi/.pm2/logs/MagicMirror-error.log

Smartmirrornoob commented 5 years ago

I did a new instal and updated NPM and Node first. So this is up to date `^[[31mWARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: /home/pi/MagicMirror/config/config.js:37^[[39m ^[[31m callbackScripts: ["callback.py']^[[39m ^[[31m ^^^^^^^^^^^^^^^[[39m

^[[31mSyntaxError: Invalid or unexpected token^[[39m ^[[31m at new Script (vm.js:74:7)^[[39m ^[[31m at createScript (vm.js:246:10)^[[39m ^[[31m at Object.runInThisContext (vm.js:298:10)^[[39m ^[[31m at Module._compile (internal/modules/cjs/loader.js:678:28)^[[39m ^[[31m at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10)^[[39m ^[[31m at Module.load (internal/modules/cjs/loader.js:620:32)^[[39m ^[[31m at tryModuleLoad (internal/modules/cjs/loader.js:559:12)^[[39m ^[[31m at Function.Module._load (internal/modules/cjs/loader.js:551:3)^[[39m ^[[31m at Module.require (internal/modules/cjs/loader.js:658:17)^[[39m ^[[31m at require (internal/modules/cjs/helpers.js:20:18)^[[39m ^[[31mWARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: /home/pi/MagicMirror/config/config.js:37^[[39m ^[[31m callbackScripts: ["callback.py'],^[[39m ^[[31m ^^^^^^^^^^^^^^^^[[39m`

lxne commented 5 years ago

Can you post your config.js?

Smartmirrornoob commented 5 years ago

Sure it is a brandnew:

in the module MMM_PIR config i tried also with the part: callbackScripts: ["callback.py"]

/ Magic Mirror Config Sample

var config = { address: "localhost", // Address to listen on, can be: // - "localhost", "127.0.0.1", "::1" to listen on loopback interface // - another specific IPv4/6 to listen on a specific interface // - "", "0.0.0.0", "::" to listen on any interface // Default, when address config is left out, is "localhost" port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses // or add a specific IPv4 of 192.168.1.5 : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"], // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],

language: "en", timeFormat: 24, units: "metric",

modules: [

{ module: 'MMM-PIR', position: 'bottom_left', config: { sensorPin: 25, delay: 10000, turnOffDisplay: true, showCountdown: true, } },

{ module: "alert", }, { module: "updatenotification", position: "top_bar" }, { module: "clock", position: "top_left" }, { module: "calendar", header: "US Holidays", position: "top_left", config: { calendars: [ { symbol: "calendar-check", url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics" } ] } }, { module: "compliments", position: "lower_third" }, { module: "currentweather", position: "top_right", config: { location: "New York", locationID: "", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city appid: "YOUR_OPENWEATHER_API_KEY" } }, { module: "weatherforecast", position: "top_right", header: "Weather Forecast", config: { location: "New York", locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city appid: "YOUR_OPENWEATHER_API_KEY" } }, { module: "newsfeed", position: "bottom_bar", config: { feeds: [ { title: "New York Times", url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml" } ], showSourceTitle: true, showPublishDate: true, broadcastNewsFeeds: true, broadcastNewsUpdates: true } }, ]

};

/ DO NOT EDIT THE LINE BELOW / if (typeof module !== "undefined") {module.exports = config;}

Smartmirrornoob commented 5 years ago

Did you find any issue in my script? I changed the PIR Module like you said:

Change the first line in displayOn.sh to

vcgencmd display_power 1

and the first line in displayOff.sh to

vcgencmd display_power 0

but no difference

lxne commented 5 years ago

Sorry, I could not identify any issue.

Let's try one more thing. But that only works if PM2 is set up. Open a new terminal window and enter pm2 log MagicMirror This window now always shows the last view lines of the logs. Try to start/restart the MagicMirror and check what the logs are saying.

Paste those lines here. Maybe we'll get a new hint.

Smartmirrornoob commented 5 years ago

Oh I see there are a lot of errors :/

/home/pi/.pm2/logs/MagicMirror-out.log last 15 lines: 0|MagicMir | > magicmirror@2.8.0 start /home/pi/MagicMirror 0|MagicMir | > sh run-start.sh 0|MagicMir | 0|MagicMir | 0|MagicMir | > magicmirror@2.8.0 start /home/pi/MagicMirror 0|MagicMir | > sh run-start.sh 0|MagicMir | 0|MagicMir | Starting MagicMirror: v2.8.0 0|MagicMir | Loading config ... 0|MagicMir | Loading module helpers ... 0|MagicMir | Loading module helpers ... 0|MagicMir | Whoops! There was an uncaught exception... 0|MagicMir | MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? 0|MagicMir | If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues 0|MagicMir | Launching application.

0|MagicMirror | > magicmirror@2.8.0 start /home/pi/MagicMirror 0|MagicMirror | > sh run-start.sh 0|MagicMirror | Starting MagicMirror: v2.8.0 0|MagicMirror | Loading config ... 0|MagicMirror | Loading module helpers ... 0|MagicMirror | WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: ReferenceError: NodeHelper is not defined 0|MagicMirror | at Object. (/home/pi/MagicMirror/modules/MMM-PIR/node_helper.js:11:18) 0|MagicMirror | at Object. (/home/pi/MagicMirror/modules/MMM-PIR/node_helper.js:67:3) 0|MagicMirror | at Module._compile (internal/modules/cjs/loader.js:711:30) 0|MagicMirror | at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10) 0|MagicMirror | at Module.load (internal/modules/cjs/loader.js:620:32) 0|MagicMirror | at tryModuleLoad (internal/modules/cjs/loader.js:559:12) 0|MagicMirror | at Function.Module._load (internal/modules/cjs/loader.js:551:3) 0|MagicMirror | at Module.require (internal/modules/cjs/loader.js:658:17) 0|MagicMirror | at require (internal/modules/cjs/helpers.js:20:18) 0|MagicMirror | at loadModule (/home/pi/MagicMirror/js/app.js:126:17) 0|MagicMirror | Loading module helpers ... 0|MagicMirror | App threw an error during load 0|MagicMirror | ReferenceError: NodeHelper is not defined 0|MagicMirror | at Object. (/home/pi/MagicMirror/modules/MMM-PIR/node_helper.js:11:18) 0|MagicMirror | at Object. (/home/pi/MagicMirror/modules/MMM-PIR/node_helper.js:67:3) 0|MagicMirror | at Module._compile (internal/modules/cjs/loader.js:711:30) 0|MagicMirror | at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10) 0|MagicMirror | at Module.load (internal/modules/cjs/loader.js:620:32) 0|MagicMirror | at tryModuleLoad (internal/modules/cjs/loader.js:559:12) 0|MagicMirror | at Function.Module._load (internal/modules/cjs/loader.js:551:3) 0|MagicMirror | at Module.require (internal/modules/cjs/loader.js:658:17) 0|MagicMirror | at require (internal/modules/cjs/helpers.js:20:18) 0|MagicMirror | at loadModule (/home/pi/MagicMirror/js/app.js:126:17) 0|MagicMirror | Whoops! There was an uncaught exception... 0|MagicMirror | MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? 0|MagicMirror | If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues 0|MagicMirror | ReferenceError: NodeHelper is not defined 0|MagicMirror | at Object. (/home/pi/MagicMirror/modules/MMM-PIR/node_helper.js:11:18) 0|MagicMirror | at Object. (/home/pi/MagicMirror/modules/MMM-PIR/node_helper.js:67:3) 0|MagicMirror | at Module._compile (internal/modules/cjs/loader.js:711:30) 0|MagicMirror | at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10) 0|MagicMirror | at Module.load (internal/modules/cjs/loader.js:620:32) 0|MagicMirror | at tryModuleLoad (internal/modules/cjs/loader.js:559:12) 0|MagicMirror | at Function.Module._load (internal/modules/cjs/loader.js:551:3) 0|MagicMirror | at Module.require (internal/modules/cjs/loader.js:658:17) 0|MagicMirror | at require (internal/modules/cjs/helpers.js:20:18) 0|MagicMirror | at loadModule (/home/pi/MagicMirror/js/app.js:126:17) 0|MagicMirror | Launching application.

lxne commented 5 years ago

Have you done...

cd ~/MagicMirror/modules/MMM-PIR
npm install electron-rebuild
node_modules/.bin/electron-rebuild

without errors? And off course, MagicMirror restart.

Smartmirrornoob commented 5 years ago

Yes I have done this. There was no error. Just a Message that there is a new version of NPM 6.9.0-6.10.3

Smartmirrornoob commented 5 years ago

I have found this one: https://github.com/MichMich/MagicMirror/issues/1357

I have to say, that I'am not amuesd with this reaction/answer. But the issue is the same :/

lxne commented 5 years ago

I wonder why it works for me. Started my installation with NOOBS v2.8 It was done about three weeks ago.

Pi 3b+ with Grove PIR Sensor attached to Respeaker 2-Mics Hat Raspbian 10 (buster) Node v10.16.1 npm 6.9.0

Here are my notes regarding the installation until MMM-PIR:

Starting Point: NOOBS v2.8

1. installed Raspbian (recommended)

Approved the question for doing Updates? Yes

2. Installed and activated VNC

https://www.raspberrypi.org/documentation/remote-access/vnc/

3. MagicMirror installation

bash -c "$(curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh)“ Screensaver off? Yes Use PM2? Yes

Warnings I got

npm WARN deprecated time-grunt@2.0.0: Deprecated because Grunt is practically unmaintained. Move on to something better. This package will continue to work with Grunt v1, but it will not receive any updates. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/pm2/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})

Script messages

Run sudo apt-get install -y nodejs to install Node.js 10.x and npm

Maybe important!!! I did NOT do the sudo apt-get...

Vulnerability warnings

found 16 high severity vulnerabilities run ’npm audit fix’ to fix them, or ’npm audit’ for details

cd ~/MagicMirror
npm audit fix

Installing the startup script sudo env PATH=$PATH:/usr/bin pm2 startup systemd -u pi —hp /home/pi

Changed the screen rotation

sudo nano /boot/config.txt added the following at the end of the txt

# Manuelle Einträge
rotate_display=1

Installing MMM-PIR

https://github.com/mboskamp/MMM-PIR After the installation according to the GitHub repository MM is not starting at all This post suggested doing:

cd ~/MagicMirror/modules/MMM-PIR
npm install electron-rebuild
node_modules/.bin/electron-rebuild

Afterwards MM was starting and showed modules for a very brief moment. Then I got a black screen. I tried a reboot, but that didn't help. Then I found out that the tv-service command is not working for my setup (tried it in the terminal) After changing displayOn.sh and displayOff.sh and another restart it worked as expected Changed the first line in ~/MagicMirror/modules/MMM-PIR/callbackScripts/default/displayOn.sh to vcgencmd display_power 1 and the first line in ~/MagicMirror/modules/MMM-PIR/callbackScripts/default/displayOff.sh to vcgencmd display_power 0

This is how I got MMM-PIR working.

Smartmirrornoob commented 5 years ago

Thank you I will try your Version. I saw that we have used different by the part of Script messages. ( I am not sure what this is, but i will try it)

Smartmirrornoob commented 5 years ago

okay now I have tried a lot of things: New installation from NOOBS: v2.8 Still same black Screen

2xSudo apt-get update 2xSudo apt-get upgrade Installed vnc curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh | bash

cd ~/MagicMirror/ npm audit fix sudo npm install -g pm2 pm2 startup sudo env PATH=$PATH:/usr/bin pm2 startup systemd -u pi —hp /home/pi sudo reboot installed MMM_PIR exactly after the instalscript changed the config file cd ~/MagicMirror/modules/MMM-PIR npm install electron-rebuild node_modules/.bin/electron-rebuild

Changed the first line in ~/MagicMirror/modules/MMM-PIR/callbackScripts/default/displayOn.sh to vcgencmd display_power 1 and the first line in ~/MagicMirror/modules/MMM-PIR/callbackScripts/default/displayOff.sh to vcgencmd display_power 0

lxne commented 5 years ago

Damn. Do the errors still look the same?

Smartmirrornoob commented 5 years ago

If you mean the pm2 log yes. They look same :/

milkywade commented 5 years ago

Guys - good luck with this module. I installed the other one (MMM-PIR-Sensor) and have been a happy user ever since.

Smartmirrornoob commented 5 years ago

Thats not good. Someone wrote the exact different. That the PIR Sensor is the bad Module.....

milkywade commented 5 years ago

Well, it does look like it's unmaintained. However, I was never able to make this one work.

lxne commented 5 years ago

Well, it does look like it's unmaintained. However, I was never able to make this one work.

I was not able to get the other one working. @milkywade How did you manage to install MMM-PIR-Sensor correctly and on which hardware/OS?

lxne commented 5 years ago

@Smartmirrornoob We could try something different. I could make an image of my sd card and you could flash one of yours with that image. Maybe that would work?

Smartmirrornoob commented 5 years ago

That would be great idea.

kuhberg commented 5 years ago

Had the same problem. After tinkering these steps fixed the module for me:

  1. electron-rebuild as described in this comment
  2. Verify the correct BCM-number of the used pin
  3. Add user pi to the gpio group by executing sudo usermod -a -G gpio pi
  4. Change displayOn.sh to tvservice -p && sudo chvt 6 && sudo chvt 7

I wish you luck in solving the problem. If the module is working it's quiet handy.

Smartmirrornoob commented 5 years ago

@kuhberg Thank you but it looks like it won't work. Danke. Es scheint aber nicht zu funktionieren :/

milkywade commented 5 years ago

Well, it does look like it's unmaintained. However, I was never able to make this one work.

I was not able to get the other one working. @milkywade How did you manage to install MMM-PIR-Sensor correctly and on which hardware/OS?

I installed it on a raspberry pi 3B, running raspbian, following the installation procedure in their github page and has been working fine since day one. Only issue that I have is that when you open an issue in their github page, no one answers.

aptgetupgrade commented 5 years ago

module not working - closing issue

lxne commented 5 years ago

@Smartmirrornoob

That would be great idea.

Got the image done and tested it. Worked for me. https://drive.google.com/file/d/1KQRZPn8zI6a9Voz1iF-14AKvtJ93ybaz/view?usp=sharing

Unfortunately I could not shrink the image. It is a 15GB file. You'll need at least a 16GB micro sd. If you want to know how to get the image on your card, take a look at https://beebom.com/how-clone-raspberry-pi-sd-card-windows-linux-macos

MagicMirror is auto starting but will probably not work correctly after first boot because of the PIR-pin settings in the config.js. Just set the correct pin and establish an internet connection and everything should work fine.

If you wanna see some weather information you gotta get an api key for the weather module.

I'm curious if this will work with your setup.

lxne commented 5 years ago

module not working - closing issue

This is an incorrect statement. A more accurate one would be: Module is working on some setups but not on all.

For example it is working on my setup (installed in July 2019):

Smartmirrornoob commented 5 years ago

@lxne thank you :) It worked......... buuuuuuut I wanted to change some modules and add the Module button + Fuel + Podcast2. And now I dont have a black screen, but the module PIR is not on the Screen.....

lxne commented 5 years ago

It worked......... buuuuuuut I wanted to change some modules and add the Module button + Fuel + Podcast2. And now I dont have a black screen, but the module PIR is not on the Screen.....

Return back to the working config.js and try your changes step by step to find out which one is causing PIR to vanish.

aptgetupgrade commented 5 years ago

module not working - closing issue

This is an incorrect statement. A more accurate one would be: Module is working on some setups but not on all.

For example it is working on my setup (installed in July 2019):

* Pi 3B+ with Raspbian buster

* Respeaker 2-Mics hat

* Grove PIR sensor

indeed. reopening.

Smartmirrornoob commented 5 years ago

I THINK I DID IT :) I was playing a little bit with the modules (disabling and enabling) I put the Module MMM-PIR on the last posible line. And now it's working. It was not working when the module was set in the first lines. I don't know why but I think it "connected" with the other modules

lxne commented 5 years ago

It was not working when the module was set in the first lines. I don't know why but I think it "connected" with the other modules

Interesting.

uros76 commented 4 years ago

Got the image done and tested it. Worked for me. https://drive.google.com/file/d/1KQRZPn8zI6a9Voz1iF-14AKvtJ93ybaz/view?usp=sharing

Unfortunately I could not shrink the image. It is a 15GB file. You'll need at least a 16GB micro sd. If you want to know how to get the image on your card, take a look at https://beebom.com/how-clone-raspberry-pi-sd-card-windows-linux-macos

Hi. Can you share this image also with me? I am struggling to get this module working :/

idem2lyon commented 4 years ago

still does not work

0|MM2 | audited 4 packages in 1.983s 0|MM2 | found 0 vulnerabilities 0|MM2 | > magicmirror@2.11.0 start /home/pi/MagicMirror 0|MM2 | > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js 0|MM2 | [2020-06-05 10:07:05.848] [LOG] 0|MM2 | Starting MagicMirror: v2.11.0 0|MM2 | [2020-06-05 10:07:05.881] [LOG] Loading config ... 0|MM2 | [2020-06-05 10:07:05.904] [LOG] 0|MM2 | Loading module helpers ... 0|MM2 | [2020-06-05 10:07:06.031] [ERROR] 0|MM2 | WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: ReferenceError: NodeHelper is not defined 0|MM2 | at Object. (/home/pi/MagicMirror/modules/MMM-PIR/node_helper.js:11:18) 0|MM2 | at Module._compile (internal/modules/cjs/loader.js:786:30) 0|MM2 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10) 0|MM2 | at Module.load (internal/modules/cjs/loader.js:645:32) 0|MM2 | at Function.Module._load (internal/modules/cjs/loader.js:560:12) 0|MM2 | at Module.require (internal/modules/cjs/loader.js:685:19) 0|MM2 | at require (internal/modules/cjs/helpers.js:16:16) 0|MM2 | at loadModule (/home/pi/MagicMirror/js/app.js:131:17) 0|MM2 | at loadNextModule (/home/pi/MagicMirror/js/app.js:165:5) 0|MM2 | at loadModules (/home/pi/MagicMirror/js/app.js:176:3) 0|MM2 | [2020-06-05 10:07:06.036] [LOG] Loading module helpers ... 0|MM2 | [2020-06-05 10:07:06.052] [LOG] Whoops! There was an uncaught exception... 0|MM2 | [2020-06-05 10:07:06.043] [ERROR] App threw an error during load 0|MM2 | [2020-06-05 10:07:06.045] [ERROR] ReferenceError: NodeHelper is not defined 0|MM2 | at Object. (/home/pi/MagicMirror/modules/MMM-PIR/node_helper.js:11:18) 0|MM2 | at Module._compile (internal/modules/cjs/loader.js:786:30) 0|MM2 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10) 0|MM2 | at Module.load (internal/modules/cjs/loader.js:645:32) 0|MM2 | at Function.Module._load (internal/modules/cjs/loader.js:560:12) 0|MM2 | at Module.require (internal/modules/cjs/loader.js:685:19) 0|MM2 | at require (internal/modules/cjs/helpers.js:16:16) 0|MM2 | at loadModule (/home/pi/MagicMirror/js/app.js:131:17) 0|MM2 | at loadNextModule (/home/pi/MagicMirror/js/app.js:165:5) 0|MM2 | at loadModules (/home/pi/MagicMirror/js/app.js:176:3) 0|MM2 | [2020-06-05 10:07:06.054] [ERROR] 0|MM2 | ReferenceError: NodeHelper is not defined 0|MM2 | at Object. (/home/pi/MagicMirror/modules/MMM-PIR/node_helper.js:11:18) 0|MM2 | at Module._compile (internal/modules/cjs/loader.js:786:30) 0|MM2 | at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10) 0|MM2 | at Module.load (internal/modules/cjs/loader.js:645:32) 0|MM2 | at Function.Module._load (internal/modules/cjs/loader.js:560:12) 0|MM2 | at Module.require (internal/modules/cjs/loader.js:685:19) 0|MM2 | at require (internal/modules/cjs/helpers.js:16:16) 0|MM2 | at loadModule (/home/pi/MagicMirror/js/app.js:131:17) 0|MM2 | at loadNextModule (/home/pi/MagicMirror/js/app.js:165:5) 0|MM2 | at loadModules (/home/pi/MagicMirror/js/app.js:176:3) 0|MM2 | [2020-06-05 10:07:06.069] [LOG] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? 0|MM2 | [2020-06-05 10:07:06.070] [LOG] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues 0|MM2 | [2020-06-05 10:07:06.442] [LOG] 0|MM2 | Launching application.

idem2lyon commented 4 years ago

I give up ! do not forget to change your config example please, and use " and not '

I can't make it works at home.

lxne commented 4 years ago

Got the image done and tested it. Worked for me. https://drive.google.com/file/d/1KQRZPn8zI6a9Voz1iF-14AKvtJ93ybaz/view?usp=sharing Unfortunately I could not shrink the image. It is a 15GB file. You'll need at least a 16GB micro sd. If you want to know how to get the image on your card, take a look at https://beebom.com/how-clone-raspberry-pi-sd-card-windows-linux-macos

Hi. Can you share this image also with me? I am struggling to get this module working :/

Image should be downloadable again.

kjendal commented 4 years ago

node_helper.js is missing var NodeHelper = require("node_helper");

see kjendal/MMM-PIR