MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. MWel1977
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    M
    Offline
    • Profile
    • Following 2
    • Followers 0
    • Topics 24
    • Posts 98
    • Groups 0

    Posts

    Recent Best Controversial
    • npm dependencies not installed on fresh MM2 installation

      Because I was having problems with some modules I decided to format my micro SD card and start all over again with my test enviroment on the Pi 3A+ (My working mirror runs on my Pi 3B+ :winking_face: )

      However I just run the installation of the MM2 command bash -c "$(curl -sL https://raw.githubusercontent.com/MichMich/MagicMirror/master/installers/raspberry.sh)" but when it got to “Installing dependencies” it run into an error:
      bash: line 112: npm: command does not exist. Unable to install dependencies!
      (well it’s translated from Dutch. Could also be “Command not found”)

      anybody got an idea what is going on?

      posted in Troubleshooting
      M
      MWel1977
    • RE: Contribute to a module. Volunteers wanted! Easy!

      Netherlands - Arnhem - n1296
      Netherlands - Amsterdam - n16

      posted in Troubleshooting
      M
      MWel1977
    • RE: Error on starting MM2: module not present

      @sdetweil
      I think I’ll just start over again with a reimage of the sd card.:persevering_face:
      I’ve checked the package.json file in the electron folder and it showed version 2.0.16
      So I entered that number at the bottom of the package.json file in the MMM-Swipe folder and run npm install again in the Swipe folder. Yet it gave me:

      pi@Mirror:~/MagicMirror/modules/MMM-Swipe $ npm install
      npm ERR! code ETARGET
      npm ERR! notarget No matching version found for electron-rebuild@^2.0.16
      npm ERR! notarget In most cases you or one of your dependencies are requesting
      npm ERR! notarget a package version that doesn't exist.
      npm ERR! notarget 
      npm ERR! notarget It was specified as a dependency of 'MMM-Swipe'
      npm ERR! notarget 
      
      npm ERR! A complete log of this run can be found in:
      npm ERR!     /home/pi/.npm/_logs/2019-01-15T22_09_44_953Z-debug.log
      pi@Mirror:~/MagicMirror/modules/MMM-Swipe $ 
      

      Thanks for helping me out so far.
      How do you know al this stuff? How long are you already doing this?
      Hope I’ll get that smart one day. :grinning_face:

      posted in Troubleshooting
      M
      MWel1977
    • RE: Error on starting MM2: module not present

      @sdetweil
      Or can I better start clean and remove npm completely sudo npm uninstall npm -g and then reinstall?
      I mean repearing all this could take longer than just simply uninstall and reinstall npm, MM2 and the few modules I have on this sd card. I just need the config.js file the store on a usb drive for when I’m done.

      Or you think repearing that electron issue is a quick fix?:smiling_face_with_open_mouth_cold_sweat: :smiling_face_with_open_mouth_cold_sweat:

      posted in Troubleshooting
      M
      MWel1977
    • RE: Error on starting MM2: module not present

      @sdetweil
      Did it tonight. couldn’t make it yesterday.
      So…did as we sad like above…yet it didn’t work.
      This time something with electron. Here’s the terminal “output”:

      pi@Mirror:~/MagicMirror/modules/MMM-Swipe $ npm install
      npm WARN deprecated math-statistics@1.2.0: THIS PROJECT IS NO LONGER MAINTAINED by clebert
      npm WARN deprecated expressive-assertion@1.5.1: THIS PROJECT IS NO LONGER MAINTAINED by clebert
      npm WARN deprecated typesystem@5.0.0: THIS PROJECT IS NO LONGER MAINTAINED by clebert
      
      > mmm-gpio@3.0.2 install /home/pi/MagicMirror/modules/MMM-Swipe/node_modules/mmm-gpio
      > node-gyp configure build
      
      make: Map '/home/pi/MagicMirror/modules/MMM-Swipe/node_modules/mmm-gpio/build' wordt binnengegaan
        CXX(target) Release/obj.target/gpio/src/gpio.o
        CXX(target) Release/obj.target/gpio/src/node_gpio.o
        SOLINK_MODULE(target) Release/obj.target/gpio.node
        COPY Release/gpio.node
      make: Map '/home/pi/MagicMirror/modules/MMM-Swipe/node_modules/mmm-gpio/build' wordt verlaten
      
      > mmm-usonic@2.5.3 install /home/pi/MagicMirror/modules/MMM-Swipe/node_modules/mmm-usonic
      > node-gyp configure build
      
      make: Map '/home/pi/MagicMirror/modules/MMM-Swipe/node_modules/mmm-usonic/build' wordt binnengegaan
        CXX(target) Release/obj.target/usonic/src/clock.o
        CXX(target) Release/obj.target/usonic/../mmm-gpio/src/gpio.o
        CXX(target) Release/obj.target/usonic/src/node_usonic.o
        SOLINK_MODULE(target) Release/obj.target/usonic.node
        COPY Release/usonic.node
      make: Map '/home/pi/MagicMirror/modules/MMM-Swipe/node_modules/mmm-usonic/build' wordt verlaten
      
      > MMM-Swipe@1.1.1 postinstall /home/pi/MagicMirror/modules/MMM-Swipe
      > electron-rebuild -e ../../node_modules/electron-prebuilt
      
      
      An unhandled error occurred inside electron-rebuild
      Unable to find electron-prebuilt's version number, either install it or specify an explicit version
      
      Error: Unable to find electron-prebuilt's version number, either install it or specify an explicit version
          at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-Swipe/node_modules/electron-rebuild/lib/src/cli.js:80:19)
          at Generator.next (<anonymous>)
          at /home/pi/MagicMirror/modules/MMM-Swipe/node_modules/electron-rebuild/lib/src/cli.js:8:71
          at new Promise (<anonymous>)
          at __awaiter (/home/pi/MagicMirror/modules/MMM-Swipe/node_modules/electron-rebuild/lib/src/cli.js:4:12)
          at /home/pi/MagicMirror/modules/MMM-Swipe/node_modules/electron-rebuild/lib/src/cli.js:69:8
          at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-Swipe/node_modules/electron-rebuild/lib/src/cli.js:145:4)
          at Module._compile (internal/modules/cjs/loader.js:654:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
          at Module.load (internal/modules/cjs/loader.js:566:32)
      npm ERR! code ELIFECYCLE
      npm ERR! errno 255
      npm ERR! MMM-Swipe@1.1.1 postinstall: `electron-rebuild -e ../../node_modules/electron-prebuilt`
      npm ERR! Exit status 255
      npm ERR! 
      npm ERR! Failed at the MMM-Swipe@1.1.1 postinstall script.
      npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
      
      npm ERR! A complete log of this run can be found in:
      npm ERR!     /home/pi/.npm/_logs/2019-01-15T19_01_22_044Z-debug.log
      pi@Mirror:~/MagicMirror/modules/MMM-Swipe $
      

      Can’t I just remove the MMM-Swipe module and reinstall it?

      posted in Troubleshooting
      M
      MWel1977
    • RE: Error on starting MM2: module not present

      @sdetweil If I understand you right:
      #1 remove node_modules in “Home/Pi” and in “Home/Pi/MagicMirror” with command “rm -rf node_modules”
      #2 re-install npm in the folder “Home/Pi/MagicMirror” and in “Home/Pi/MagicMirror/MMM-Swipe”
      #3 then re-install the module mmm-usonic in the folder “Home/Pi/MagicMirror/MMM-Swipe”
      #4 then rebuild the usonic module with “npm rebuild mmm-usonic”

      I have doubt on where to install step 3. Should it go in the folder from the MagicMirror or from de module MMM-Swipe? Because I delete the module mmm-usonic with step 1. And I don’t know if this will be installed on re-installing the module MMM-Swipe.

      But I’ll check that first thing tonight (if there is a module mmm-usonic being installed with MMM-Swipe). I think it should be installed with it as a dependency from MMM-Swipe.

      posted in Troubleshooting
      M
      MWel1977
    • RE: Error on starting MM2: module not present

      @sdetweil
      Oh…crap! :flushed_face: I have a node_modules folder under Home/Pi
      not under Home/Pi/MagicMirror.
      Think I’ll format my micro SD card and start over. This time when I install something for the MM I’ll do it from the directory Home/Pi/MagicMirror.
      Don’t think I can just “move” the content of the Home/Pi/node_modules to the MagicMirror folder can I? :weary_face:

      posted in Troubleshooting
      M
      MWel1977
    • RE: Error on starting MM2: module not present

      @sdetweil may I ask you were you think that mmm-usonic module should be install in order for it to work with the mmm-swipe module?
      Reading what your telling me I’m starting to think it should be installed in the MMM-Swipe folder. However the error notification shows that it found the mmm-usonic module only it’s compiled with a wrong version.

      I’ll try you suggestion “npm rebuild MMM-usonic” tonight and from the folder “/Home/Pi/” and see what happens (If I understand you correctly I can also use just “npm rebuild” when I’m in the folder “/Home/Pi/node_modules/mmm-usonic/”).

      And I think I’ll start reading this after I’ve done that: https://docs.npmjs.com/ :grinning_face_with_smiling_eyes:
      Hope I’ll know more about npm afterwards.

      posted in Troubleshooting
      M
      MWel1977
    • RE: Error on starting MM2: module not present

      @sdetweil And do I have to be in a specific folder for this command (in the npm home folder or the mmm-usonic for instance)?
      Or can I just type it in the terminal from the start (/Home/Pi/)?
      That is what I still don’t quite get. What command must be used in what (folder) location.
      But I’ll try that command tonight at home.
      (I have my 3B+ with me here at work (that has the “working” MM2 on it. At home I have the Pi 3A+ attached to the 7" touchscreen and has the “test enviroment” of my MM2 on it. So when something works on the 3A+ (and I know how to do it right) I can do it first time right on the 3B+.:smiling_face_with_open_mouth_smiling_eyes: )

      posted in Troubleshooting
      M
      MWel1977
    • RE: Error on starting MM2: module not present

      @sdetweil is npm then the compiler?
      If so how can I recompile the mmm-usonic module so it works with my current Node.js version?
      Is there somewere documentation on how this npm works and how all the modules are tide in it?

      posted in Troubleshooting
      M
      MWel1977
    • RE: Error on starting MM2: module not present

      Found something at: link text but got no idea what all that means.
      I do think I need to delete the node_modules folder and rebuild the module.
      But hope someone can help me with it by explaining what npm is.
      and how the MagicMirror fits in it.
      My guess would be that it is the overall driver and the the MM2 is working with this driver. but I’m not sure.

      posted in Troubleshooting
      M
      MWel1977
    • RE: Error on starting MM2: module not present

      @sdetweil I installed the mmm-usonic from the home/pi/ folder and I can see the mmm-usonic folder under /home/pi/node_modules.
      And according to the error notification on starting the MM2 it is in the correct folder but it has something to do with it being compiled against a different Node.js version.
      the module usonic.node was compiledagainst a different Node.js version using NODE_MODULE_VERSION 59. This version of Node.js requires NODE_MODULE_VERSION 57. Please try re-compiling or re-installing the module (for instance, using ‘npm rebuild’ or ‘npm install’).

      I did both rebuild and install but the problem isn’t solved.
      Also I don’t know how to rebuild the module… don’t know what module they want me to rebuild as a matter of fact… the usonic module or the Swipe module? and in what folder in the terminal should I be in while rebuilding?
      Must it be a specific folder or just any folder?

      posted in Troubleshooting
      M
      MWel1977
    • RE: Error on starting MM2: module not present

      @sdetweil Hahahahaha…euh…hehehe…found that just after I put my question up here.:nerd_face: :nerd_face:

      posted in Troubleshooting
      M
      MWel1977
    • RE: Error on starting MM2: module not present

      hmmmmm…should have done this soner…
      just googled for “mmm-usonic” and turns out its not a MagicMirror module but a npm module (https://www.npmjs.com/package/mmm-usonic)
      I can install it via: “npm install mmm-usonic --save”
      but in what folder must I install it?
      Or wil it be installed in the correct folder anyway?

      posted in Troubleshooting
      M
      MWel1977
    • Error on starting MM2: module not present

      I’m trying to run this module “MMM-Swipe”. After setting up the 2 ultrasonic sensors and setting the GPIO pins in the config.js file I had to run the MM2 via “sudo npm start”. But instead of running the MM2 freezes/lock-up. Nothing works anymore.
      Turns out I get an error on the Swipe-module. It needs a module MMM.usonic to run. But it can’t be found. It’s not installed. And I can’t find it in the module list either.
      0_1547406272722_Screenshot_20190112-210145_Video Player.jpg

      Does anybody know how to solve this?

      posted in Troubleshooting
      M
      MWel1977
    • RE: Need help understanding "sendNotification"

      Hmmmmmm… Hooked up the wires to the GPIO pins.
      configured the Swipe module and hit start to run the MM2.
      I know … I forgot to configure the Notification module. But I first wanted to see if the sensors worked by displaying the measured distances on the MM2 screen.

      BUT…on starting the MM2 it freezes! Ctrl+Q, Alt, Esc … nothing works.
      Only pulling the powercord out of the wallsocket! :crying_face: :crying_face:

      posted in Troubleshooting
      M
      MWel1977
    • RE: Need help understanding "sendNotification"

      @sean Thanks! :smiling_face_with_open_mouth_smiling_eyes:
      I’m just about ready setting the config for the Swipe module.
      Then is’t the Notifications turn to be configured.

      posted in Troubleshooting
      M
      MWel1977
    • RE: Need help understanding "sendNotification"

      @sdetweil @Sean THANK YOU SOOOOOO MUCH!!!
      I’ll get right on it. Just finished my sensor setup with some small pieces of plywood. Now to fire up my pi 3A with the Pi touchscreen…install that notification trigger module and start testing!

      I do however have a question about the modules listening to the “payload”.
      Isn’t it better to have a “translator” build in a module when it can recieve notifications? Or to use a standard string (string01, string02, etc,) it listens to unless the user defines otherwise in the config.js file?

      posted in Troubleshooting
      M
      MWel1977
    • Need help understanding "sendNotification"

      I’m in need of help understanding how this “sendNotification” items works from one module to the other.
      Does a module sends it in general or is it targeting a specific other module?
      And if it is sending the notification in general to all modules how must I configure the module that actualy needs to do something with those notifications?

      I would like to use MMM-Swipe (That uses 2 HC-SR04 units) to controle MMM-Pages and MMM-Page-Indicator.
      I have the Pages modules already installed. And I’m creating a test setup with the 2 ultra sonic sensors this weekend to test the workings.
      But I have no clue what file I need to alter so that when I “swipe” across the 2 sensors the pages actualy change.

      Looking at the readme-file that came with the Swipe module it says:

      This module will use the sendNotification(notification, payload) to send:
      notification = 'MOVEMENT'
      payload = 'Swipe Left', 'Swipe Right', or 'Press'
      Please use as appropriate in your module using notificationReceived(notification, payload, sender)

      While in the Pages.js file I read that that module listens to the notifications:

      Handles incoming notifications. Responds to the following:
      ‘PAGE_CHANGED’ - Set the page to the specified payload page.
      ‘PAGE_INCREMENT’ - Move to the next page.
      ‘PAGE_DECREMENT’ - Move to the previous page.
      ‘DOM_OBJECTS_CREATED’ - Starts the module.
      ‘QUERY_PAGE_NUMBER’ - Requests the current page number

      I was hoping to find something that looks like:
      if payload = then do this…

      Is there someone willing to have a look and tell me what to configure?
      I could look all day at the code and still don’t get it.

      posted in Troubleshooting
      M
      MWel1977
    • RE: MMM-solar showing "Loading" and is doing nothing .... did someone get it running?

      @sdetweil I’ll try it tonight.
      Been busy last couple of days (sadly not with my MM2).
      But I think it has something to do with the API not being able to connect to my solarpanel system. Like I mentionent before.

      posted in Troubleshooting
      M
      MWel1977
    • 1
    • 2
    • 3
    • 4
    • 5
    • 2 / 5