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

    Posts

    Recent Best Controversial
    • RE: Motion Detector

      @jdahli1
      I don’t know this error, therefore the following two comments might be totally wrong:

      The motion detector uses

      /opt/vc/bin/tvservice --preferred && sudo chvt 6 && sudo chvt 7
      

      to switch the monitor on. What happens if you execute this command manually while the observed problem occurs (I assume you can still login to the PI?). Then you might know weather it is a problem of the motion detection (and MMM) or if it is a more general problem. Maybe you even get additional error messages that help you to identify the problem

      1. Do you know the HDMI-settings in /boot/config.txt ?
        Maybe it is worth to play around with hdmi_force_hotplug, hdmi_drive, hdmi_group and hdmi_mode . See the file and here https://raspberrypi.stackexchange.com/tags/config.txt/info for more information. Maybe the “AR” in your error stands for “aspect ratio”, this could be set explicitly be these parameters.

      If somebody got this module to work on a Raspberry Pi Zero (using the Midori browser) I would be highly interested in how it was done!

      posted in Utilities
      H
      Hawking
    • RE: Motion Detector

      @strawberry-3.141
      Thanks for your help. Unfortunately I don’t find any information about media access or how to activate it in the Midori browser…

      @mongo116
      I cant’ help you why the motiondetector does not turn off your screen (it also does not work in my case). However, how does the config.js with the additional time-out section that results in an error look like? At least in my case a section like

      {
                         module: 'motiondetector',
                         config: {
                                 timeout: 5*60*1000
                         }
                 },
      

      gave no complaints about errors in the config file (for a complete config-file see my post above).

      posted in Utilities
      H
      Hawking
    • RE: Motion Detector

      Thanks for the quick help. I also found the line in motiondetector.js a bit strange (why the semicolon within the parenthesis…) but as I don’t know JS or details about the code, I couldn’t judge.

      I still have the same effect (blank screen) but the new error message is

      Jul 17 23:16:55 me startMagicMirror.sh[445]: ** Message: console message: [native code] @0: Starting module: motiondetector
      Jul 17 23:16:55 me startMagicMirror.sh[445]: ** Message: console message: http://localhost:8080/modules/motiondetector//diff-cam-engine.js @81: TypeError: undefined is not an object (evaluating '(navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia).call')
      

      Maybe all these things give empty? As a workaround I surrounded the function by

      function requestWebcam() {
               var self = this;
               method = (navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia);
                         if ( !! method ) {
                           ....
                        }
      }
      

      Now at least the other modules load successfully.
      However, the modules don’t get deactivated after some minutes :-/ I assume that one of these navigator methods is needed for the motiondetector to work? If I look at https://developer.mozilla.org/en/docs/Web/API/Navigator/getUserMedia they seem anyway outdated? How would the user grand permission in a headless setup? Does somebody know if they are supported by the Midori browser?

      posted in Utilities
      H
      Hawking
    • RE: Motion Detector

      I’m trying to use this model on my Raspberry Pi Zero W with the Raspberry Cam. I run
      MM in serveronly mode, using the Midori-browser. This setup itself works fine and also the camera is able to make pictures

      raspistill -o testpicture.jpg
      

      However, if I try to add the ‘motiondetector’ module to the config I just get an empty (black, but not switched of) screen after reboot. This is even the case for a very small config.js :

      var config = {
              port: 8080,
              ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
              language: "en",
              timeFormat: 24,
              units: "metric",
      
              modules: [
                      {
                              module: "clock",
                              position: "top_left"
                      },
                  {
                          module: 'motiondetector',
                          config: {
                                  timeout: 5*60*1000
                          }
                  },
              ]
      
      };
      
      /*************** DO NOT EDIT THE LINE BELOW ***************/
      if (typeof module !== "undefined") {module.exports = config;}
      

      Things I did:

      cd ~/MagicMirror/modules
      git clone https://github.com/alexyak/motiondetector
      

      Added line bcm2835-v4l2 to /etc/modules and hdmi_blanking=1 to /boot/config.txt

      If I omit the motiondetecotor entry in the config.js it loads fine and I can see the loaded modules. If I execute

      /opt/vc/bin/tvservice -o
      

      the screen goes off (completely black). I I afterwards run

      /opt/vc/bin/tvservice --preferred && sudo chvt 6 && sudo chvt 7
      

      the background light of the screen goes on, however the modules that were there previously don’t show up again ( I waited for several minutes).
      If I run

      /opt/vc/bin/tvservice --preferred && sudo chvt 6 && sudo chvt 2
      

      the modules become visible again. Therefore I changed the line in

      ~/MagicMirror/modules/motiondetector/node_helper.js
      

      accordingly. However then I got still an empty screen and in the log:

      Jul 16 18:59:23 me startMagicMirror.sh[480]: ** Message: console message: [native code] @0: Starting module: motiondetector
      Jul 16 18:59:23 me startMagicMirror.sh[480]: ** Message: console message: http://localhost:8080/modules/motiondetector//motiondetector.js @39: TypeError: Attempted to assign to readonly property.
      Jul 16 18:59:24 me startMagicMirror.sh[480]: monitor :state 0x12000a [HDMI DMT (82) RGB full 16:9], 1920x1080 @ 60.00Hz, progressive
      Jul 16 18:59:24 me startMagicMirror.sh[480]: ** Message: console message: http://localhost:8080/js/main.js @134: TypeError: null is not an object (evaluating 'moduleWrapper.getElementsByClassName')
      

      To me as a beginner it looks like a permission problem. However even making the motiondetector folder and all files therein rw for everybody it didn’t work.

      I hope that somebody who has knowledge about JS can comment on this issue. Many thanks in advance.

      posted in Utilities
      H
      Hawking
    • RE: How I got my Magic Mirror working on a Raspberry Pi 0 (zero)

      @RV said in How I got my Magic Mirror working on a Raspberry Pi 0 (zero):

      When i typed cd /home/pi/ i didn’t get a response or anything.

      This sounds strange. Did you type it in the unit terminal? cd is the comand to change directory. Maybe you have already been in the /home/pi/ directory (than the change would have no effect). Could you type pwd (print working directory)
      and give the result before and after the cd /home/pi/ command and give the results?

      posted in Tutorials
      H
      Hawking
    • RE: How I got my Magic Mirror working on a Raspberry Pi 0 (zero)

      @RV said in How I got my Magic Mirror working on a Raspberry Pi 0 (zero):

      @dantodd you mean every time i start my rasp on i need to type npm start?

      no, that is definitely not necessary.

      I don’t know the reason for the error message (is there actually a space between localhost: and 8080?). What happens if you run

      cd ~/MagicMirror
      node serveronly &
      

      manually?

      posted in Tutorials
      H
      Hawking
    • RE: Formatting the MMM-EFA Module

      @Dom1n1c
      But I don’t find smaller (bus) stations like the “Friedrich-Hebbel-Straße” I mentioned before in the VRR
      http://efa.vrr.de/standard/XSLT_DM_REQUEST
      at all. So I don’t know how I could even use it for static departure times.

      You mentioned 80000760, however the same number was posted by me before for “München Marienplatz”. Did you maybe mixed something or misunderstood me?

      posted in Troubleshooting
      H
      Hawking
    • RE: Formatting the MMM-EFA Module

      @Dom1n1c
      thanks for your quick reply.

      I took the efaUrl from the description of
      https://github.com/Dom1n1c/MMM-EFA-departures
      If it is not working (I am not able to tell) you might update the link.

      Via http://efa-alt.mvv-muenchen.de/mvv/XSLT_DM_REQUEST I can find the " Friedrich-Hebbel-Straße" bus stop. However, in the source code I don’t see a valid stop id.

      posted in Troubleshooting
      H
      Hawking
    • RE: Formatting the MMM-EFA Module

      @Dom1n1c
      thanks for your reply.

      If I look at http://efa.vrr.de/standard/XSLT_DM_REQUEST for trains departing from “München Marienplatz” I find in the code
      nameInfo_dm=80000760
      which works fine as a stop ID.

      However, if I e.g. search for München - Friedrich-Hebbel-Straße as a stop it is not found at http://efa.vrr.de/standard/XSLT_DM_REQUEST (as it is only a bus stop?).

      If I look via
      http://efa.mvv-muenchen.de/mobile/XSLT_DM_REQUEST
      I find the Friedrich-Hebbel-Straße stop. However, I don’t find a valid ID in the source code.

      Is this station simply to small or is there a way to also include it in the EFA Module?

      Thanks for your support!

      posted in Troubleshooting
      H
      Hawking
    • RE: How I got my Magic Mirror working on a Raspberry Pi 0 (zero)

      @longod

      I didn’t try your way of starting the MagicMirror. However, is there a reason that you don’t use the commands in the guide to start the MagicMirror (using the start.sh and startMidori scripts)? There is no DISPLAY=:0 npm start mentioned in this thread.

      posted in Tutorials
      H
      Hawking
    • Calendar events more then 1 Month in future --> "in %s Mon" (Language de)

      Hi,

      I’m using the calender to show the next public holidays by including a public calendar:

                     {
                          module: "calendar",
                          header: "Feiertage",
                          position: "top_left",
                          config: {
                                  calendars: [
                                          {
                                                  url: "http://www.ifeiertage.de/by-.ics"
                                          }
                                  ]
                          }
                  },
      

      The appointments that are more than 1 Month away are just shown as “in %s Mon.”, see attached image.

      0_1493246085775_Calendar.png

      Maybe the plural of “Mon.” has to be explicitly specified (I’m using language: de ) but I don’t know how.
      Can you reproduce (and maybe fix) this issue?

      posted in Troubleshooting
      H
      Hawking
    • RE: MagicMirror on Pi Zero W

      @Mitchfarino said in MagicMirror on Pi Zero W:

      @Hawking Thanks for all your help and comments, I’ve managed to get it up and running now!

      No problem.

      @Mitchfarino said in MagicMirror on Pi Zero W:

      Now I just need to get the whitelist sorted :grimacing:

      This worked fine for me, I just added the IP of my regular PC (e.g 192.168.2.185) to the list in the config file so that it looked like

      ipWhitelist: ["192.168.2.185", "127.0.0.1", "::ffff:127.0.0.1", "::1"],
      

      If I then typed the ip:port (the port is also defined in the MM config, default is 8080) of my raspi (e.g.

      http://192.168.2.170:8080/
      

      ) in the browser bar of my regular PC I could see the page also on my regular PC (took 1-2 seconds to load).
      If this does not work for you, just open a new thread and provide details.

      posted in Tutorials
      H
      Hawking
    • RE: Two way mirror order for Europe - Orders closed!

      Confirmed.
      And already many thanks for all your work. I think you can be proud that this results in “your” mirrors spreading from Norway to Spain

      posted in Hardware
      H
      Hawking
    • RE: MagicMirror on Pi Zero W

      I now did a installation on a fresh image and used node version 6.6.1 which automatically includes npm 3.10.8. So instead of

      sudo wget http://node-arm.herokuapp.com/node_latest_armhf.deb
      sudo dpkg -i node_latest_armhf.deb
      sudo apt-get install npm
      

      I did

      wget -O - https://raw.githubusercontent.com/sdesalas/node-pi-zero/master/install-node-v6.9.1.sh | bash
      

      Then I got later on no warnings about to old or insecure version any more but just

      npm WARN prefer global coffee-script@1.10.0 should be installed with -g
      npm WARN prefer global jsonlint@1.6.2 should be installed with -g
      npm WARN prefer global colorguard@1.2.0 should be installed with -g
      
      > electron-chromedriver@1.6.0 install /home/hawking/MagicMirror/node_modules/electron-chromedriver
      > node ./download-chromedriver.js
      
      
      > electron@1.6.5 postinstall /home/hawking/MagicMirror/node_modules/electron
      > node install.js
      
      npm WARN lifecycle magicmirror@2.1.1~install: cannot run in wd %s %s (wd=%s) magicmirror@2.1.1 cd vendor && npm install /home/hawking/MagicMirror
      npm WARN lifecycle magicmirror@2.1.1~postinstall: cannot run in wd %s %s (wd=%s) magicmirror@2.1.1 sh installers/postinstall/postinstall.sh /home/hawking/MagicMirror
      

      (in this installation I did not use the pi user, but I had the same problem when I used the default pi user).

      If one knows the solution for the blank screen it is obvious that this is a strong hint that one should run

      cd ~/MagicMirror/vendor/ && npm install 
      cd ~/MagicMirror/ && sh installers/postinstall/postinstall.sh 
      

      (the later at the moment just prints a success message and is therefore not really needed)
      I don’t know why these commands did not work automatically, maybe an issue with some directories that are not set (I assume in the error instead of %s the directory should be displayed).

      posted in Tutorials
      H
      Hawking
    • RE: How I got my Magic Mirror working on a Raspberry Pi 0 (zero)

      I could fix my issue with the blank screen by simply doing

      cd ~/MagicMirror/vendor
      npm install
      

      Then it seem to work (even with the node v 4.2.1). Nevertheless I will try to update to a more recent version of node, just to avoid other problems that are likely to exist in this old node version.

      posted in Tutorials
      H
      Hawking
    • RE: MagicMirror on Pi Zero W

      @strawberry-3.141 said in MagicMirror on Pi Zero W:

      @Hawking said in MagicMirror on Pi Zero W:

      /home/pi/MagicMirror/node_modules/moment

      it should look like this /home/pi/MagicMirror/vendor/node_modules/moment do you have a package.json file in /home/pi/MagicMirror/vendor?

      I have a directory /home/pi/MagicMirror/vendor containing
      package.json and vendor.js but noting more.

      I now used npn version 2.14.7 (checked by npm -version) to

      cd ~/MagicMirror/vendor
      npm install
      

      This gave

      npm WARN package.json magicmirror-vendors@ No README data
      font-awesome@4.7.0 node_modules/font-awesome
      moment-timezone@0.5.13 node_modules/moment-timezone
      weathericons@2.1.0 node_modules/weathericons
      moment@2.18.1 node_modules/moment
      

      and the folder /home/pi/MagicMirror/vendor/node_modules/moment that you mentioned before was created.
      I then rebootet (not sure if necessary) and it seems to work (I see the date and time, holidays,quote…). I’ll now set everything up but it looks way better then before.
      So thanks a lot for your help!! I hope that your fix also works for the other people who have the same problem.

      Just to understand the fix a bit better:
      Is there a reason that one seem to have to do run
      sudo npm install once in /home/pi/MagicMirror/ (this is already included in the initial post) and once npm install in /home/pi/MagicMirror/vendor/? (this is not mentioned in the initial post and also not directly done by the standard installer (that does not work for the pi-Zero) located in /home/pi/MagicMirror/installers/raspberry.sh (at least I don’t see it therein).

      posted in Tutorials
      H
      Hawking
    • RE: MagicMirror on Pi Zero W

      @strawberry-3.141 said in MagicMirror on Pi Zero W:

      @Hawking you should check if moment weas installed properly it sits in the vendor directory in node_modules, if it isnt there run npm install in the vendor directory

      With “vendor directory” you refer to “~/MagicMirror”?
      I have a folder
      /home/pi/MagicMirror/node_modules/moment with several files (including moment.js) and subfolders. Is this enough indication for a proper installation or should I check other details?

      @Mitchfarino said in MagicMirror on Pi Zero W:

      @Hawking

      I saw errors stating that MM requires a higher version of node, but I couldn’t figure out how to do it.

      Could you provide the command you used? Then I’ll try it on mine too and will feed back

      Yes, I got the same error/warnings, that’s why I tried to use a more recent version of node. I used the scripts available here
      https://github.com/sdesalas/node-pi-zero
      I tested it for v6 (don’t remember which subversion) and v7.7.1. Both was without success (no error/warning about old node version, instead other issues and finally still a blank screen). But maybe I made something wrong. Please try your self and let us know about the results (and post the error you get, I don’t remember them in detail).

      @Mitchfarino said in MagicMirror on Pi Zero W:

      I think if someone can get this up and running, they should host the image somewhere for people to download.

      I would strongly prefer to know the commands that worked. An image is a huge file that gets outdated (replacement of jessie…), has to be stored on some external server (the free one are usually slow…) The commands on the other hand are hopefully only a small modification of the tutorial writen above, can easily be used and even adapted more easy.

      posted in Tutorials
      H
      Hawking
    • RE: MagicMirror on Pi Zero W

      @Iseknutz said in MagicMirror on Pi Zero W:

      Did you solve the problem? Maybe the other modules use any functions that the Pi Zero don’t understand…?

      No, I didn’t solve the problem yet.
      I found out that the working modules (helloworld and alert) don’t use the “moment” js library but the modules that result in a blank screen (calendar, clock, compliments, newsfeed and weatherforcast) do. As the error in my /var/log/daemon also contains “ReferenceError: Can’t find variable: moment” I think it is likely that something went wrong in installation of (the moment.js library of) node. And indeed, the installation with

      sudo npm install
      

      gave some warnings and errors in my case. As only the Pi Zeros seem to be concerned it must be something due to our “special” installation. The Pi Zero needs a special (ARM) node variant. The version one gets via

      sudo wget http://node-arm.herokuapp.com/node_latest_armhf.deb
      sudo dpkg -i node_latest_armhf.deb
      

      is quite old (version 4.2.1; the regular installer of MM2 updates nodes to version 6 if the version of node is below 5.1.0 and in an other thread somebody reported that version 7 is working for a regular Pi as well) However, I also tried to use version 6 and 7, but the result was still a blank screen.
      I also get this blank screen if I access the provided data via network using Firefox of a regular PC, so I think it is not related to some issues with the midori browser.

      But I’m not not at all an expert in this issue, so I might have done something wrong or it could be an other reason (the working modules are also in other ways simpler than the other ones). I would be happy if somebody could tell us how to solve this issue.

      posted in Tutorials
      H
      Hawking
    • RE: MagicMirror on Pi Zero W

      @Mitchfarino
      I’m using the Zero W but have exactly the same problem (just a blank screen).
      I found that the clock module gives me frequent errors in /var/log/daemon.log (complaining about missing “moment”, similar to my post here) do you get these as well?
      However also most of the other modules don’t work for me. What worked for me was to remove all default modules from the config file and just use the very simple “halloworld” module

      {
                      module: "helloworld",
                      position: "top_bar",
                      config: {
                              text: "Hello world!"
                      }
        }
      

      Then I got at least some text on my empty screen and knew that in principle MM was working. I also could get the externally installed MMM-Globe and MMM-SystemStats running.
      But of course it would be good to get the default modules running…

      I also got this empty page if I requested the website from my regular PC using Firefox, so I think it is not related to a shortcoming of the midori browser.

      I tried Jessie and Jessie Light and different versions of node.js/npm. During the npm install step I get several errors/warnings, however some people said that some of these are normal…

      posted in Tutorials
      H
      Hawking
    • RE: How I got my Magic Mirror working on a Raspberry Pi 0 (zero)

      @bmarofsky
      I’m also trying to install Magic Mirror on a Pi Zero W.

      I think one reason for the problems might be that as far as I can tell

      sudo wget http://node-arm.herokuapp.com/node_latest_armhf.deb
      sudo dpkg -i node_latest_armhf.deb
      

      got me node v4.2.1 which is quite outdated (the regular installer of MM2 updates nodes if the version of node is below 5.1.0).
      I therefore tried to install a more recent version of node following the commands here
      https://github.com/sdesalas/node-pi-zero
      However, the compilation of Magic Mirror worked neither with node 7.7.1 nor with node 6.9.1.

      Before I go into details, did anybody got Magic Mirror working on Raspberry Pi Zero W?
      Which node version (and npm version) did you use and how you he install it? Which browser did you use (I read that Midori has some problems)?

      posted in Tutorials
      H
      Hawking
    • 1
    • 2
    • 3
    • 2 / 3