• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
  1. Home
  2. Hawking
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

Hawking

@Hawking

6
Reputation
2.1k
Profile views
51
Posts
1
Followers
0
Following
Joined Mar 28, 2017, 8:36 PM
Last Online Feb 20, 2022, 6:57 AM

Hawking Unfollow Follow

Best posts made by Hawking

  • Sleep for updatenotification loop -- Help with JS needed

    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!

    posted in Troubleshooting
    H
    Hawking
    Apr 3, 2018, 12:19 AM
  • 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
    Apr 21, 2017, 9:53 PM
  • RE: (2.1.0) New default module: update notification.

    If I’m not totally mistaken, this module does not only check for updates of MagicMirror itself but also all other used modules. Maybe one should make this clearer in the description/Readme. I was a bit surprised to suddenly see several git-remote-http-processes (for all my modules) in top.

    posted in Upcoming Features
    H
    Hawking
    Mar 18, 2018, 9:34 PM
  • 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
    Apr 26, 2017, 10:18 PM
  • RE: How I got my Magic Mirror working on a Raspberry Pi 0 (zero)

    @SebTota
    I still don’t understand what update you are referring to.
    Both error messages sound like there are modules missing (either “express” or “colors”).

    What happens if you do

    cd ~/MagicMirror && sudo npm install
    cd ~/MagicMirror/vendor && npm install
    
    posted in Tutorials
    H
    Hawking
    Sep 2, 2017, 1:53 PM
  • RE: How I got my Magic Mirror working on a Raspberry Pi 0 (zero)

    @noorm91
    I simply did

    sudo apt-get install chromium-browser
    

    and the start is by

    chromium-browser --incognito --kiosk http://localhost:8080
    

    I don’t know if this is a new possibility in Stretch light or is also possible in Jessie Lite (I know that there were some issues in the past). However, as I said, the performance is slow and not stable (I see that the free amount of memory gets low and the system freezes every few hours). Therefore I would prefer to use still Midori, whoch worked fine for me in Jessie. However, using Midori with Stretch I simply get a black screen. I don’t know if this is due to an error in my installation, due to changes from Jessie to Stretch, due to changes in the Midori browser, due to changes in MM (I tried to install an older version, which didn’t help) or yet another reason.

    posted in Tutorials
    H
    Hawking
    Nov 30, 2017, 8:58 PM

Latest posts made by Hawking

  • Sleep for updatenotification loop -- Help with JS needed

    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!

    posted in Troubleshooting
    H
    Hawking
    Apr 3, 2018, 12:19 AM
  • RE: (2.1.0) New default module: update notification.

    If I’m not totally mistaken, this module does not only check for updates of MagicMirror itself but also all other used modules. Maybe one should make this clearer in the description/Readme. I was a bit surprised to suddenly see several git-remote-http-processes (for all my modules) in top.

    posted in Upcoming Features
    H
    Hawking
    Mar 18, 2018, 9:34 PM
  • RE: How I got my Magic Mirror working on a Raspberry Pi 0 (zero)

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

    so i have all my modules in place and the system crashes: unable to handle kernel null pointer dereference at virtual address
    I’ll roll back to your setup and see if it is stable. i am using calendar, weather, clock and newsfeed- very similar to yours.

    Please report if you could stabilize your system. I also had crashes (approx twice a day) when using Chromium. I didn’t had time to investigate the exact cause (to heavy load?).

    posted in Tutorials
    H
    Hawking
    Feb 10, 2018, 9:56 AM
  • RE: How I got my Magic Mirror working on a Raspberry Pi 0 (zero)

    @noorm91
    I simply did

    sudo apt-get install chromium-browser
    

    and the start is by

    chromium-browser --incognito --kiosk http://localhost:8080
    

    I don’t know if this is a new possibility in Stretch light or is also possible in Jessie Lite (I know that there were some issues in the past). However, as I said, the performance is slow and not stable (I see that the free amount of memory gets low and the system freezes every few hours). Therefore I would prefer to use still Midori, whoch worked fine for me in Jessie. However, using Midori with Stretch I simply get a black screen. I don’t know if this is due to an error in my installation, due to changes from Jessie to Stretch, due to changes in the Midori browser, due to changes in MM (I tried to install an older version, which didn’t help) or yet another reason.

    posted in Tutorials
    H
    Hawking
    Nov 30, 2017, 8:58 PM
  • RE: How I got my Magic Mirror working on a Raspberry Pi 0 (zero)

    @MarWind
    I still didn’t get it to work using Midori in combination with Raspian Stretch Lite.
    On this distribution, I could only get it to work using Epiphany or Chromium. However, their performance is much slower than Midori (which worked fine in Jessie Lite). I can’t tell if this is due to some general changes in Stretch or in the newer versions of Midori.

    posted in Tutorials
    H
    Hawking
    Nov 29, 2017, 11:01 PM
  • RE: Calendar Symbols Question

    And does it work?
    I made a test using

    {
                    module: "calendar",
                    position: "top_left",
                    maximumEntries: 8,
                    config: {
                       calendars: [
                                   {
                                     symbol: "calendar",
                                     url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
                                   },
                                   {
                                     symbol: "bell",
                                     url: "https://www.calendarlabs.com/ical-calendar/ics/75/UK_Holidays.ics",
                                     maximumEntries: 4
                                   },
                                   {
                                     symbol: "home",
                                     url: "https://www.calendarlabs.com/ical-calendar/ics/52/Islam_Holidays.ics"
                                   }
                                ],
                           }
           },
    

    and the symbols look OK:
    0_1508900216758_MM.png

    posted in Troubleshooting
    H
    Hawking
    Oct 25, 2017, 2:59 AM
  • RE: Calendar Symbols Question

    I don’t have access to my MM at the moment, therefore I couldn’t test your configuration.
    However two comments

    1. There should be a comma after
    url: "https://calendar.google.com/calendar/ical/blahbkah"
    

    (like it was in your old code sample).

    1. The quotation marks at the end of the url look different in calender 2 and 3 compared to 1. I don’t know if this is a problem in your sample code or if you should adjutst the actual configuration file.
    posted in Troubleshooting
    H
    Hawking
    Oct 22, 2017, 9:04 PM
  • RE: Calendar Symbols Question

    Regarding the limit to 4 entries, I think you shouldn’t use “” around the number, so try just

    maximumEntries: 4,
    

    (and also adjust the global setting from “10” to 10. As 10 is the default, it does not have an effect anyway)

    Maybe this also fixes the wrong symbol? If not, what happens if you e.g. switch the order of calender 1 and 2 (just as a test).

    posted in Troubleshooting
    H
    Hawking
    Oct 22, 2017, 5:19 PM
  • RE: How I got my Magic Mirror working on a Raspberry Pi 0 (zero)

    @Doubleve
    Can you tell me which Linux distribution (lsb_release -a), node version ( node -v ) and version of MM you are using?

    posted in Tutorials
    H
    Hawking
    Oct 22, 2017, 1:39 AM
  • RE: How I got my Magic Mirror working on a Raspberry Pi 0 (zero)

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

    @bhepler
    I can’t seem to start MM with npm start

    Thats what I expected for the Pi Zero. Did you try the method described in the first post of this thread in the section “Setting up boot scripts”?

    posted in Tutorials
    H
    Hawking
    Oct 21, 2017, 9:59 AM
Enjoying MagicMirror? Please consider a donation!
MagicMirror created by Michael Teeuw.
Forum managed by Sam, technical setup by Karsten.
This forum is using NodeBB as its core | Contributors
Contact | Privacy Policy