A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.
  • Sleep for updatenotification loop -- Help with JS needed

    1
    1 Votes
    1 Posts
    1k Views
    H
    Hi, I’m running MM on a PiZero, which has a comparable small amount of memory and to have a long lasting SD card, I put some tmp directories in memory and disabled swap. It works fine, however, once the update process of the default updatenotification module starts, I quickly run out of memory and the browser crashes. By changing the updateinterval, I verified that it is indeed due to the updatenotification module. I think this is because all modules are checked at the same time. I’ve 10 installed modules plus the default ones. All these parallel update processes consume quite some memory. I think I found the responsible loop “for (moduleName in modules)” in MagicMirror/modules/default/updatenotification/node_helper.js However I didn’t manage to put in some sleep command between each execution of the items in the loop. My knowledge of JS is very limited and I was not able to adapt the code examples found here https://stackoverflow.com/questions/3583724 to the MM code. I hope that somebody of you can help me with this issue. For me a hard coded sleep time would be totally fine, but of course an official change with a parameter that can be changed in the config file (or an option, that would make the different simpleGits run one after each other) would be even better. Already many thanks for your help!
  • New MagicMirror Version

    7
    0 Votes
    7 Posts
    3k Views
    O
    I don’t know what happens, but now there is no error
  • Changing moment.js behavior

    12
    0 Votes
    12 Posts
    11k Views
    C
    How do you actually use moment.js my clock is off and i dont know how to change it. then i got moment.js and still dont know
  • Help! Probem using PIR Sensor on raspberry pi zero to turn on/off screen

    15
    0 Votes
    15 Posts
    8k Views
    MikgaboM
    @NoNameRo Thanks SOO much!!! Got er working now. I really appreciate your help in the matter!!! Cheers, Mike
  • MM Pi Zero W - strange browser behaviour

    1
    0 Votes
    1 Posts
    770 Views
    W
    Following usual Pi Zero W MagicMirror tutorials this is what I got: Midori just doesn’t work, tried both console and desktop, result is either black screen, white screen or Connection Refused response, regardless what I put to config. Googling about Midori problem I found out that more people has/had that problem but without any solution. Connecting from remote Windows computer opens MM normally. Chromium is working, in some context - when I open it in Desktop, it starts everything (all modules) normally. When I start it in Console, it loads clock, currentweather, weatherforecast and calendar_monthly normally but doesn’t load Trello and Calendar (endless loading). When I open MM from another computer, Trello and Calendar load on both computer and raspberry! Also, GoogleMapsTraffic sometimes load white screen, and sometimes load normally. I am out of my mind already. I don’t know how to debug this anymore… I hope someone has any idea…
  • No Default Weather modules working on fresh install

    2
    0 Votes
    2 Posts
    832 Views
    Mykle1M
    @bassbahl Did you get your API key for the weather modules? Directions are in the readme of each
  • Blank black screen | Noob

    44
    0 Votes
    44 Posts
    59k Views
    A
    @axellejamous I just ran into this black screen issue too. I figured out that the local electron display will only work if the config.js contains: address: "localhost" I was running with the following and getting a black screen address: "::" Instead of using the built in display I am going to launch chromium myself in --kiosk mode. I need the MM to listen on all interfaces so I can see and debug from a separate machine.
  • Turning monitor on/off when not in use.

    7
    0 Votes
    7 Posts
    3k Views
    W
    Thanks for the input, @cruunnerr and @martinkooij. I ended up going with @cruunnerr’s approach as it required fewer changes to my existing setup. Here is what I did: Created a file that lists the devices and their IPs that we want to evaluate. Filename: “devices”. myphone,192.168.0.200 mywatch,192.168.0.201 wifephone,192.168.0.202 wifewatch,192.168.0.203 Created a perl script, “ping.pl”, that pings the devices listed in the file. If it gets a response it will write the results to a file named “ping_results”. #!/usr/bin/perl use Net::Ping; open(INFILE, "; close(INFILE); #open(OUTFILE, ">", "ping_results") or die("unable to write output: $!"); chomp(@ip_array); $p = Net::Ping->new(); foreach(@ip_array) { if($_ =~ /\d+.\d+.\d+.\d+/) { if($p->ping($&)) { open(OUTFILE, ">", "ping_results") or die("unable to write output: $!"); print OUTFILE ("$`is responding to ping.\n"); close(OUTFILE); } } } Added a crontab job to run the perl script at 04:55. # m h dom mon dow command # Execute Perl Script to check for devices 55 4 * * * perl /home/pi/ping.pl Created a shell script, “rpi-hdmi-on.sh” that will check to see if “ping_results” exists. If it does it will turn the monitor on and then delete the “ping_results” file. Added a crontab job to execute this script at 05:00. if [ -e ping_results ] then vcgencmd display_power 1 >/dev/null rm -f /home/pi/ping_results fi # m h dom mon dow command # Turn HDMI On (05:00/5:00am) 0 5 * * * /home/pi/rpi-hdmi-on.sh Created a shell script, “rpi-hdmi-off.sh” that will turn the monitor off. Added a crontab job to execute this script at 21:30. vcgencmd display_power 0 >/dev/null # m h dom mon dow command # Turn HDMI Off (21:30/9:30pm) 30 21 * * * /home/pi/rpi-hdmi-off.sh I’ve done some testing and it seems to be working well.
  • Website to write config file

    4
    0 Votes
    4 Posts
    2k Views
    F
    @triley5 Did you ever figure that out? I would also like to know how to be able to make a module change the config.js
  • What's casuing these SSH errors in the pm2 logs?

    1
    0 Votes
    1 Posts
    1k Views
    E
    I’m getting my logs spammed by the following SSH errors, in my PM2 logs: ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. Any idea what module is causing this? I do have the notification module, constantly reminding me that one of my modules has X “commits behind master branch.” Are these related? How?
  • RPi Zero Troubleshooting

    Solved zero pi 0 pi zero blank screen
    2
    0 Votes
    2 Posts
    2k Views
    M
    Did some digging in the forums and found that npm install --unsafe-perm Looks to have fixed my issue!
  • Calendar Module - lot of questionmarks

    2
    0 Votes
    2 Posts
    937 Views
    W
    Ohhhh i forgot to link a pictuire with the problem ;-) [http://www.bilder-upload.eu/show.php?file=c688ae-1522066939.jpg]
  • Move Module to Side of screen

    5
    0 Votes
    5 Posts
    2k Views
    M
    @Mykle1 holy crap you’re a genius!!! Thank you both so much!!! @yawns Have a great night!!
  • Dependency Issue

    1
    0 Votes
    1 Posts
    873 Views
    M
    Hi there, I have the following issue after installing the software. Here is the console output: > cd vendor && npm install npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: binary-extensions@^1.0.0 (node_modules/is-binary-path/node_modules/binary-extensions): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json npm WARN optional SKIPPING OPTIONAL DEPENDENCY: No data, empty input at 1:1 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ^ npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /home/pi/.npm/binary-extensions/1.11.0/package/package.json npm WARN optional SKIPPING OPTIONAL DEPENDENCY: y18n@^3.2.0 (node_modules/yargs/node_modules/y18n): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json npm WARN optional SKIPPING OPTIONAL DEPENDENCY: No data, empty input at 1:1 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ^ npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /home/pi/.npm/y18n/3.2.1/package/package.json npm WARN optional SKIPPING OPTIONAL DEPENDENCY: cliui@^3.0.3 (node_modules/yargs/node_modules/cliui): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json npm WARN optional SKIPPING OPTIONAL DEPENDENCY: No data, empty input at 1:1 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ^ npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /home/pi/.npm/cliui/3.2.0/package/package.json npm WARN optional SKIPPING OPTIONAL DEPENDENCY: window-size@^0.1.4 (node_modules/yargs/node_modules/window-size): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Failed to parse json npm WARN optional SKIPPING OPTIONAL DEPENDENCY: No data, empty input at 1:1 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: ^ npm WARN optional SKIPPING OPTIONAL DEPENDENCY: File: /home/pi/.npm/window-size/0.1.4/package/package.json npm ERR! Linux 4.9.35-v7+ npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" npm ERR! node v6.13.1 npm ERR! npm v3.10.10 npm ERR! file /home/pi/.npm/os-locale/1.4.0/package/package.json npm ERR! code EJSONPARSE npm ERR! Failed to parse json npm ERR! No data, empty input at 1:1 npm ERR! npm ERR! ^ npm ERR! File: /home/pi/.npm/os-locale/1.4.0/package/package.json npm ERR! Failed to parse package.json data. npm ERR! package.json must be actual JSON, not just JavaScript. npm ERR! npm ERR! This is not a bug in npm. npm ERR! Tell the package author to fix their package.json file. JSON.parse npm ERR! Please include the following file with any support request: npm ERR! /home/pi/MagicMirror/vendor/npm-debug.log npm ERR! Linux 4.9.35-v7+ npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" npm ERR! node v6.13.1 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! magicmirror@2.2.2 install: `cd vendor && npm install` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the magicmirror@2.2.2 install script 'cd vendor && npm install'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the magicmirror package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! cd vendor && npm install npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs magicmirror npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls magicmirror npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /home/pi/MagicMirror/npm-debug.log Unable to install dependencies! Even after I change the config.sample into config.js the software starts, but it shows only a blank screen.
  • My clock language seems to be in German not English How Can I change it?

    2
    0 Votes
    2 Posts
    1k Views
    Mykle1M
    @mediathreat Does the beginning of your config.js file resemble this? var config = { address: "0.0.0.0", port: 8080, ipWhitelist: [], // Set [] to allow all IP addresses language: "en", // -- set to English
  • Anyone running MMM-Slack ? Having some trouble configuring it.

    1
    0 Votes
    1 Posts
    700 Views
    mediathreatM
    Hi guys Im trying to run mmm-slack (https://github.com/jasonyork/MMM-Slack) For the channel in config do you need the leading # hashtag for the channel config And which Token do you need from Slack - There are several different kinds available thanks guys.
  • Error: Module version mismatch. Expected 50, got 54

    4
    0 Votes
    4 Posts
    3k Views
    CharonBeberC
    npm install worked for me as well, somehow npm rebuild didnt do this job.
  • MM Calendar showing "No upcoming events"

    3
    0 Votes
    3 Posts
    2k Views
    V
    Thanks so much for your help with this! Its driving me to drink. I’m new to this so I’m muddling my way through it. I clicked on your link above and it gave me an error. Saying something about the file being corrupt. I have substituted my calendar file with another file that I know is also populated and I get them same result using either one when I launch MM. The calendar I want to pull is from here - http://www.westgatemennonite.ca/calendar/ Not sure if I’m pulling it correctly or not, but from all the (extensive) reading and testing, I think its correct. Any ideas are welcome.
  • Rpi3 freezes after a few houres

    8
    0 Votes
    8 Posts
    4k Views
    A
    Just to let you know: In my case it was the MMM-iHaveBeenThere module which caused the trouble.
  • MM wont start after install

    7
    2
    0 Votes
    7 Posts
    9k Views
    S
    @Mykle1 this helped a lot, thank you for explaining