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

Fixed black screen problem #11

Closed manufunk closed 4 years ago

manufunk commented 5 years ago

User reported black screen during switch on. I could reproduce it. Switch to vcgencmd solves the problem

k-0 commented 5 years ago

Still the same problem with switching to vcgencmd .

Muffexx commented 5 years ago

I could resolve the black screen on my raspberry pi zero by changing "~/MagicMirror/modules/MMM-PIR/callbackScripts/default/displayOn.sh" to

tvservice -p && sudo chvt 6 && sudo chvt 7 echo "turn on display"

Maybe this helps.

k-0 commented 5 years ago

Unfortunely it doesn't help.

The error log tells me:

^[[31mWARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: ReferenceError: NodeHelper is not defined^[[39m ^[[31m at Object. (/home/pi/MagicMirror/modules/MMM-PIR/node_helper.js:11:18)^[[39m ^[[31m at Object. (/home/pi/MagicMirror/modules/MMM-PIR/node_helper.js:67:3)^[[39m ^[[31m at Module._compile (internal/modules/cjs/loader.js:711:30)^[[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 ^[[31m at loadModule (/home/pi/MagicMirror/js/app.js:126:17)^[[39m App threw an error during load ReferenceError: NodeHelper is not defined at Object. (/home/pi/MagicMirror/modules/MMM-PIR/node_helper.js:11:18) at Object. (/home/pi/MagicMirror/modules/MMM-PIR/node_helper.js:67:3) at Module._compile (internal/modules/cjs/loader.js:711:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10) at Module.load (internal/modules/cjs/loader.js:620:32) at tryModuleLoad (internal/modules/cjs/loader.js:559:12) at Function.Module._load (internal/modules/cjs/loader.js:551:3) at Module.require (internal/modules/cjs/loader.js:658:17) at require (internal/modules/cjs/helpers.js:20:18) at loadModule (/home/pi/MagicMirror/js/app.js:126:17) ReferenceError: NodeHelper is not defined at Object. (/home/pi/MagicMirror/modules/MMM-PIR/node_helper.js:11:18) at Object. (/home/pi/MagicMirror/modules/MMM-PIR/node_helper.js:67:3) at Module._compile (internal/modules/cjs/loader.js:711:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10) at Module.load (internal/modules/cjs/loader.js:620:32) at tryModuleLoad (internal/modules/cjs/loader.js:559:12) at Function.Module._load (internal/modules/cjs/loader.js:551:3) at Module.require (internal/modules/cjs/loader.js:658:17) at require (internal/modules/cjs/helpers.js:20:18) at loadModule (/home/pi/MagicMirror/js/app.js:126:17)

Muffexx commented 5 years ago

As the error might tell you, this is more likely an error within the config file.

Try pasting your config here: https://jshint.com/ This could show you some syntax error. (Probably missing or superfluous comma/bracket.)

If not consider to re-pull the whole repo to ensure integrity of files.

mboskamp commented 4 years ago

Fixed with #21