MMM-PIR-Sensor does not start



  • Hi,

    I have followed the installing guide of MMM-PIR-Sensor, but after I have added the module to the config.js I am getting this error and my mirror stays white:

    App threw an error when running Error: Module did not self-register.
    at Error (native)
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:158:20)
    at Object.Module._extensions…node (module.js:568:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:158:20)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object. (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/wiring-pi/lib/exports.js:1:97)
    Error: Module did not self-register.
    at Error (native)
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:158:20)
    at Object.Module._extensions…node (module.js:568:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:158:20)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object. (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/wiring-pi/lib/exports.js:1:97)

    I have not run “npm install” with sudo right. I have just logged in as user pi, navigate to modules folder, cloned the MMM-PIR-Sensor repository, navigate to the new folder, called “npm install” and added pi to the gpio group. Several other modules (like “localtransport”) are working like intended.

    Thank you very much in advance!
    Cheers


  • Module Developer

    @firesgc Did the installation go without errors for you?

    If you start magicmirror with sudo and it works, it looks like it’s a permission problem.



  • I have tried to start magicmirror with sudo (DISPLAY=:0 gksudo npm start), but I get the same error messages.

    Please take a look at install.log of wiring-pi, but I don’t see any errors there.
    0_1465418837018_install.log

    Thank you!



  • @firesgc

    I had the same problem as you, and after trying almost everything I found where was the problem.

    To add your user PI to GPIO group, in the module page says to run:
    sudo useradd -g pi gpio
    My RPI always replay me that GPIO group already exists… so nothing happend

    I solve it by running:
    sudo usermod -a -G gpio pi
    In this case pi user is added to gpio group

    I just restarted and it worked.

    Now using the following command:
    gpio readall
    I can see how the Inputs and Outputs change

    I hope it works also for you


Log in to reply
 

Looks like your connection to MagicMirror Forum was lost, please wait while we try to reconnect.