MMM-Button doesn't work



  • Hello,

    i got my MagicMirror run and now want to use the Button Module. Unfortunatly it doesnt’t work. And sorry for my english, it isnt very well.

    I use a RPi 2

    I did the “Complete Setup Tutorial” to set up the pi. Now when i try to put the module-code from the Button-Module into the config.js and do a “pm2 restart mm” the screen went to the desktop and then it will show just a blank, white page on the monitor. Button is used like this, but with GPIO-5 : https://dracarysdiy.files.wordpress.com/2016/03/button.jpg?w=474
    I can see that the Button works as i used “gpio read” to check it

    Any idea? All other modules working fine



  • So i deleted the MMM-Button folder and tried it again, but got the same. Also its NOT possible to get the webUI with connecting via another pc (192.168.178.230:8080). Here is a screen of my config:

    0_1474909811232_MMM-Button.png



  • Hi,

    I tried to install “onoff” but geht an error. What is the Problem? I am Not so good at Programming.

    0_1474947864663_IMG_0402.PNG



  • No idea, anyone?


  • Moderator

    @cruunnerr Isn’t this just a warning? I have not used this module myself, but as it appears this might not be an actual error that stops you from using the module, or is it?



  • Well, i installed grunt manually and After that i did the “install onoff” again without any issue. But i got the same white blank screen as before. I will make a video to show it better


  • Moderator

    @cruunnerr Can you have a look at the output of the logs? You can use this to stop your mirror, clear the logs, start it up and display the logs: pm2 stop mm && pm2 flush && pm2 start mm && pm2 logs mm

    Have a look at the output and/or post it here (make sure to replace any private stuff in it, if there is any).

    I just did a new install of the module, and this installation seems to work (starting in the module folder):

    git clone https://github.com/PtrBld/MMM-Button.git
    cd MMM-Button
    npm install
    


  • [TAILING] Tailing last 10 lines for [mm] process (change the value with --lines option)
    /home/pi/.pm2/logs/mm-out-0.log last 10 lines:
    /home/pi/.pm2/logs/mm-error-0.log last 10 lines:
    [STREAMING] Now streaming realtime logs for [mm] process
    0|mm       | > magicmirror@2.0.0 start /home/pi/MagicMirror
    0|mm       | > electron js/electron.js
    0|mm       | Loading config ...
    0|mm       | Loading module helpers ...
    0|mm       | No helper found for module: alert.
    0|mm       | WARNING! Could not load config file. Starting with default configuration. Error found: Error: Module version mismatch. Expected 50, got 48.
    0|mm       | Loading module helpers ...
    0|mm       | No helper found for module: alert.
    0|mm       | App threw an error during load
    0|mm       | Error: Module version mismatch. Expected 50, got 48.
    0|mm       |     at Error (native)
    0|mm       |     at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:168:20)
    0|mm       |     at Object.Module._extensions..node (module.js:583:18)
    0|mm       |     at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:168:20)
    0|mm       |     at Module.load (module.js:473:32)
    0|mm       |     at tryModuleLoad (module.js:432:12)
    0|mm       |     at Function.Module._load (module.js:424:3)
    0|mm       |     at Module.require (module.js:483:17)
    0|mm       |     at require (internal/module.js:20:19)
    0|mm       |     at bindings (/home/pi/MagicMirror/modules/MMM-Button/node_modules/bindings/bindings.js:76:44)
    0|mm       | Whoops! There was an uncaught exception...
    0|mm       | Error: Module version mismatch. Expected 50, got 48.
    0|mm       |     at Error (native)
    0|mm       |     at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:168:20)
    0|mm       |     at Object.Module._extensions..node (module.js:583:18)
    0|mm       |     at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:168:20)
    0|mm       |     at Module.load (module.js:473:32)
    0|mm       |     at tryModuleLoad (module.js:432:12)
    0|mm       |     at Function.Module._load (module.js:424:3)
    0|mm       |     at Module.require (module.js:483:17)
    0|mm       |     at require (internal/module.js:20:19)
    0|mm       |     at bindings (/home/pi/MagicMirror/modules/MMM-Button/node_modules/bindings/bindings.js:76:44)
    0|mm       | MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
    0|mm       | If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
    0|mm       | Launching application.
    

    Thats what i got after “pm2 logs mm” Internet Connection is absolutly ok.

    Edit:

    Thats with the Button Module uncommented:

    [TAILING] Tailing last 10 lines for [mm] process (change the value with --lines                                                                    option)
    /home/pi/.pm2/logs/mm-out-0.log last 10 lines:
    /home/pi/.pm2/logs/mm-error-0.log last 10 lines:
    [STREAMING] Now streaming realtime logs for [mm] process
    0|mm       | > magicmirror@2.0.0 start /home/pi/MagicMirror
    0|mm       | > electron js/electron.js
    0|mm       | Loading config ...
    0|mm       | Loading module helpers ...
    0|mm       | No helper found for module: alert.
    0|mm       | Initializing new module helper ...
    0|mm       | Initializing new module helper ...
    0|mm       | No helper found for module: clock.
    0|mm       | Initializing new module helper ...
    0|mm       | No helper found for module: currentweather.
    0|mm       | Initializing new module helper ...
    0|mm       | No helper found for module: weatherforecast.
    0|mm       | No helper found for module: mmm-weatherchart.
    0|mm       | Initializing new module helper ...
    0|mm       | All module helpers loaded.
    0|mm       | Starting server op port 8080 ...
    0|mm       | Server started ...
    0|mm       | Connecting socket for: MMM-SystemStats
    0|mm       | Connecting socket for: MMM-WatchDog
    0|mm       | Staring module helper: MMM-WatchDog
    0|mm       | Connecting socket for: calendar
    0|mm       | Starting node helper for: calendar
    0|mm       | Connecting socket for: MMM-WunderGround
    0|mm       | MMM-WunderGround helper started ...
    0|mm       | Connecting socket for: newsfeed
    0|mm       | Starting module: newsfeed
    0|mm       | Sockets connected & modules started ...
    0|mm       | (node:3795) DeprecationWarning: sys is deprecated. Use util instead                                                                   .
    0|mm       | Launching application.
    0|mm       | WatchDog started. Maximum timeout: 10s.
    0|mm       | Create new calendar fetcher for url: *PRIVATE*
    0|mm       | Create new calendar fetcher for url: *PRIVATE*
    0|mm       | Create new news fetcher for url: *PRIVATE*
    

    Note from admin: Please use Markdown on code snippets for easier reading!



  • Well, i googled a lot and their seem to be different soloutions. But i don’t want to do anything wrong ^^

    some say the npm Version is the problem. Mine is 3.10.3 and my Node-Version is 6.6.0. Dont know if they are the newest… people writing that a simple reinstall of both solve their problem. But i was scared trying that by myself.

    Some other say you have to install the module directly via npm instead of clone before. But i am not sure as well.

    The only thing i tried was going to the /MagicMirror/modules/MMM-Button and do a npm install --save-dev electron-rebuild. But that didnt solve the problem. Not sure if i was doing it right :(

    Well, i really try to find a soloution cause i spent much time in the mirror and it worked very well so far, but my english isnt very well and my knowledge about Linux and such that stuff is not so good :/
    So i don’t want to do things wrong. Hope (i’m sure) you guys can help me.


  • Moderator

    @cruunnerr I had this module version mismatch before, too. I updated node and npm and it went away, but I do not know if that will solve your problem + you seem to have an up to date version. Maybe try and delete your node_modules folders (in the MagicMirror folder and you modules folder, i.e. MagicMirror/modules/MMM-Button), and do an npm install again?


Log in to reply
 

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