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

    Posts

    Recent Best Controversial
    • RE: Huge number of errors in log fills up HD

      @sdetweil Well that makes things easier, I’ll buy one or two more cards and start over. Really grateful for your help, this could have taken me way longer.

      While I was troubleshooting I saw other threads about backups - I am comfortable backing up Magic Mirror, especially with your script, but is there a solid way to image an entire SD card (RPI and all) so in the future I could just push the image to a new SD? I saw the ‘dd’ command mentioned, but I don’t have another Unix system, just Windows.

      posted in Troubleshooting
      C
      cpcode
    • RE: Huge number of errors in log fills up HD

      @sdetweil Looking into the SD card now, this is my first time with this type of issue. Is there a way to check if the card is corrupted or not? There seem to be some Windows utilities, and maybe some in the PI itself, but I’m not having tons of luck yet.

      If it’s corrupted, is the standard practice to start over with a new SD card (reinstall RPI OS, restore MM backups, …), or are there ways to try and fix the existing card before it goes in the garbage? Like maybe reformatting the same card? Seeing as SD cards fail often, I hope there’s a consensus on what is the best course of action.

      Thanks again.

      posted in Troubleshooting
      C
      cpcode
    • RE: Huge number of errors in log fills up HD

      @sdetweil Thanks for the reply - some additional info:

      • Magic Mirror works fine when I start it, after clearing the logs (getting more HD space). All modules seem to work properly. Things only start failing catastrophically when the logs fill up the disk completely.
      • I tried pm2 flush but it only deleted the log in the /.pm2 folder, it didn’t delete anything in the /.pm2/logs subfolder. This is where all the big logs are. I’ve been deleting those log files manually for now, every few minutes.
      • The power seems to work fine when only the PI OS is up and running, and before the HD fills up, but I’ll check on it.

      I will look into the SD card, that could definitely be the cause. I will also backup my latest, thank you for the suggestion. Can you think of a way to debug the ‘DisableHardwareAcceleration’ issue somehow?
      Thanks again.

      posted in Troubleshooting
      C
      cpcode
    • Huge number of errors in log fills up HD

      My board had been working great since last November, until a few weeks ago when it started shutting off randomly and would not stay on.
      I checked the logs this morning and there were about 15GB in the MagicMirror-error.log, which had completely filled up the HD. I deleted the log, then installed rotatelog, and figured everything is good.

      However, a couple hours later I have the same problem: I am seeing a huge amount of log entries happen very fast in the .pm2/logs folder. Note that this is happening even though Magic Mirror is NOT visible on the screen - it’s just the standard Raspberry PI home screen. I’m not sure if MM is still running somewhere. I am running Magic Mirror 2.30.0

      Running the command “ps axg” shows a bunch of running processes including several in the MagicMirror folders.

      Here’s a sample of the ‘out’ log file while MM was running:

      [2025-02-06 18:20:37.636] [INFO]  System information:
      ### SYSTEM: manufacturer: ; model: ; virtual: false
      ### OS: platform: linux; distro: Debian GNU/Linux; release: 12; arch: arm64; kernel: 6.6.62+rpt-rpi-2712
      ### VERSIONS: electron: undefined; used node: 22.11.0; installed node: 22.11.0; npm: 10.9.0; pm2: 5.4.3
      ### OTHER: timeZone: America/Chicago; ELECTRON_ENABLE_GPU: undefined
      [2025-02-06 18:20:40.042] [LOG] Starting MagicMirror: v2.30.0
      [2025-02-06 18:20:40.776] [INFO]  System information:
      ### SYSTEM: manufacturer: ; model: ; virtual: false
      ### OS: platform: linux; distro: Debian GNU/Linux; release: 12; arch: arm64; kernel: 6.6.62+rpt-rpi-2712
      ### VERSIONS: electron: undefined; used node: 22.11.0; installed node: 22.11.0; npm: 10.9.0; pm2: 5.4.3
      ### OTHER: timeZone: America/Chicago; ELECTRON_ENABLE_GPU: undefined
      [2025-02-06 18:20:43.152] [LOG] Starting MagicMirror: v2.30.0
      [2025-02-06 18:20:43.843] [INFO]  System information:
      ### SYSTEM: manufacturer: ; model: ; virtual: false
      ### OS: platform: linux; distro: Debian GNU/Linux; release: 12; arch: arm64; kernel: 6.6.62+rpt-rpi-2712
      ### VERSIONS: electron: undefined; used node: 22.11.0; installed node: 22.11.0; npm: 10.9.0; pm2: 5.4.3
      ### OTHER: timeZone: America/Chicago; ELECTRON_ENABLE_GPU: undefined
      [2025-02-06 18:20:46.271] [LOG] Starting MagicMirror: v2.30.0
      [2025-02-06 18:20:46.983] [INFO]  System information:
      ### SYSTEM: manufacturer: ; model: ; virtual: false
      ### OS: platform: linux; distro: Debian GNU/Linux; release: 12; arch: arm64; kernel: 6.6.62+rpt-rpi-2712
      ### VER

      You can see how quickly they pile up, every 3 seconds. I’m guessing these will go away when MM starts succesfully.

      And here’s the recurring error in the error log - this whole thing also repeats every 3 seconds:

      [2025-08-16 18:39:26.567] [ERROR] TypeError: Cannot read properties of undefined (reading ‘disableHardwareAcceleration’)
       at Object. (/home/cpcode/MagicMirror/js/electron.js:18:6)
       at Module._compile (node:internal/modules/cjs/loader:1546:14)
       at Object…js (node:internal/modules/cjs/loader:1689:10)
       at Module.load (node:internal/modules/cjs/loader:1318:32)
       at Function._load (node:internal/modules/cjs/loader:1128:12)
       at Object. (/home/cpcode/.config/nvm/versions/node/v22.11.0/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
       at Module._compile (node:internal/modules/cjs/loader:1546:14)
       at Object…js (node:internal/modules/cjs/loader:1689:10)
       at Module.load (node:internal/modules/cjs/loader:1318:32)
       at Function._load (node:internal/modules/cjs/loader:1128:12)
       at TracingChannel.traceSync (node:diagnostics_channel:315:14)
       at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
       at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
       at node:internal/main/run_main_module:36:49
      [2025-08-16 18:39:26.568] [ERROR] Whoops! There was an uncaught exception…
      [2025-08-16 18:39:26.569] [ERROR] TypeError: Cannot read properties of undefined (reading ‘disableHardwareAcceleration’)
       at Object. (/home/cpcode/MagicMirror/js/electron.js:18:6)
       at Module._compile (node:internal/modules/cjs/loader:1546:14)
       at Object…js (node:internal/modules/cjs/loader:1689:10)
       at Module.load (node:internal/modules/cjs/loader:1318:32)
       at Function._load (node:internal/modules/cjs/loader:1128:12)
       at Object. (/home/cpcode/.config/nvm/versions/node/v22.11.0/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
       at Module._compile (node:internal/modules/cjs/loader:1546:14)
       at Object…js (node:internal/modules/cjs/loader:1689:10)
       at Module.load (node:internal/modules/cjs/loader:1318:32)
       at Function._load (node:internal/modules/cjs/loader:1128:12)
       at TracingChannel.traceSync (node:diagnostics_channel:315:14)
       at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
       at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:170:5)
       at node:internal/main/run_main_module:36:49
      [2025-08-16 18:39:26.569] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      [2025-08-16 18:39:26.569] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MagicMirrorOrg/MagicMirror/issues

      The ‘cannot read properties of undefined’ error seems to point to electron, but I have no idea what could have changed there.
      What can I do to further debug or fix this issue? Thanks much.

      posted in Troubleshooting
      C
      cpcode
    • RE: First MM project - family dashboard

      @Kodama666 I did not override that setting, actually. This is what my config looks like for MMM-SystemInfo:

      {
      module: ‘MMM-SystemInfo’,
      classes:“System moduleMargins”,
      position: “upper_third”,
      config: {
      network: “My guest network has another name”,
      password: "Speak, friend, and enter :) ",
      showCpuUsage: true,
      showRamUsage: true,
      showDiskUsage: true,
      showCpuTemperature: true,
      showVolume: true,
      tableClass: ‘medium’,
      qrSize: 220,
      layout: “rtl”,
      }
      },

      The cpu usage worked from the start. However, I did have to override ‘cpuTemperatureCommand’. I did it directly in MMM-SystemInfo.js because I didn’t know any better at the time. This is my new value for it:

       cpuTemperatureCommand: "echo \"$(( ($(cat /sys/class/thermal/thermal_zone*/temp))))\"",
      

      I doubt this will help you with cpu usage, but that’s all I modified.

      posted in Show your Mirror
      C
      cpcode
    • RE: First MM project - family dashboard

      @mischag My code is a jumbled mess, has few comments, and only works for the exact combination of modules (public and custom) that I have. If you tell me which parts you are stuck on, or which module changes you are interested in, I’d be happy to send you those pieces or help out as best I can. I can also clean up some of my code and post more forks on GitHub for pieces that may be useful.
      I did use custom.css to modify things, happy to share that too, if you let me know what parts of my setup you are interested in.

      posted in Show your Mirror
      C
      cpcode
    • RE: First MM project - family dashboard

      @rkorell Thanks! I did end up implementing MMM-MPlayer. It was indeed very easy, but unfortunately it only seems to work some of the time - for the first week, it would work until about 4 pm and then stop. Now it’s not showing up at all. Since it just brings up another process on top of the mirror, I’m not sure how to debug this issue, but I haven’t had time to look at it yet.

      posted in Show your Mirror
      C
      cpcode
    • RE: First MM project - family dashboard

      @raymonvdm Really sorry, I wrote out this whole reply but never hit Submit… Well better late than never:
      MMM-page-indicator by default has a set of little circles at the bottom, one for each page, and they are already clickable. I just turned the little circles into tabs in the HTML - that part was very easy if I remember right.
      There are a bunch of modules that implement hooks for physical GPIO buttons, like MMM-button , MMM-buttons, and others. Some of them probably already have examples to attach the physical button click to page selections.

      posted in Show your Mirror
      C
      cpcode
    • First MM project - family dashboard

      Finally completed my first MM project, a touchscreen dashboard for our kitchen!

      First, big thanks to the community, to Michael Teeuw, and to Sam (sdetweil) for answering a bunch of questions.
      The project was loads of fun but challenging, especially as most modules are not set up for touchscreen interactivity. It runs on a RPI 5, and the monitor is a super cheap no-brand 21" touchscreen.

      Starting with the case: my best friend is a carpenter and he built and painted a wooden case.

      PXL_20250124_025052859.jpg

      The PI and power supplies are attached with velcro just in case. The numbered blocks hold the monitor in place, but can be easily removed to take the whole thing out. As you see there is a VESA stand mount already on the monitor, it’s what I used for the last few months to have the project next to my other screens in my office, on the stand that you see. This way, even after installing it, it can be removed from the kitchen wall and put back on the desk mount easily, which is awesome for some development/fixes. The frame uses a french cleat to hang on the wall.

      The finished frame in my kitchen:

      PXL_20250124_194355738.jpg

      On top of the frame is a wireless mini keyboard we can use to add text. I thought about implementing an onscreen keyboard but I already had that mini one and it seems to be working well for everyone.
      The worst part of this whole thing is that the monitor’s viewing angles are awful ESPECIALLY when pivoted. Basically, you have to look at it from right in front or from the left. Lesson learned…

      Now for the software side - I used MMM-pages and I modified MMM-page-indicator to show tabs across the bottom to switch pages. Here’s my home screen:

      Home.jpg

      It has the usual stuff, the tabs at the bottom, a WallberryTheme background that cycles through thousands of space/nature/animals images, and a module I wrote from scratch on the top left: my wife is a therapist and occasionally does sessions from home, in the basement. When clicked, this module lets her set when her next session is, and how long it is. It then counts down until session starts, then counts down the session time while playing white noise.

      Therapize.jpg

      The board is right by the stairs to the basement, so this lets everyone know not to go down there, and gives her even more privacy with the white noise.

      Next is the Calendar tab with all of our calendars:

      Calendar.jpg

      Using CalendarExt3Journal. I modified it by adding the bar at the top: it lets you move weeks, and the four boxes on the right can be clicked to filter the calendar to only that person.

      The Food tab is next, this actually replaces a dry-erase board that was on that wall (you can still see the tape…). It shows a list of meal ideas, and a list of everything in our basement deep freezer.

      Food.jpg

      The two lists are done using MMM-Notion. I modified this to be interactive: if you touch an item you can edit its text or delete the item. You can also add new items, and for the deep freezer list you can change the quantity, like when I decide to eat a whole frozen pizza by myself. This module was probably the most challenging: first, selecting which existing module/solution (or writing from scratch), then doing the actual work.
      This also has a WallberryTheme background showing a bunch of pictures of food.

      The Fun tab is very much a work in progress, it has the XKCD comic strip and Jeopardy questions:

      Fun.jpg

      I modified the MMM-Jeopardy module as it was not working, my version pulls data from a different source (Cluebase).

      The System module has some info and buttons to restart/power down/etc. (MMM-OnScreenMenu, MMM-SystemInfo).

      System.jpg

      Lastly, when you double-tap on the screen, or after 10 minutes of inactivity, the screensaver kicks in and turns the display into a photo frame:

      Screensaver.jpg

      This uses the ‘hidden pages’ feature of MMM-pages. After about 100 minutes, the monitor turns off altogether - I did this in the PI itself, not in MM, because I wanted it to turn off but turn back on when touched, like the standard PI screensaver feature. The only challenge there was figuring out which buried, hidden setting to change in order to extend the time from the default 10 minutes to over 1 hour.

      That’s it for now - the family likes it and is already requesting more: post-it notes, an ASL sign-of-the-day module, random animal facts, and the ability to stream our security camera to name a few.

      Thanks again everyone!

      posted in Show your Mirror
      C
      cpcode
    • RE: Screen saver module that displays photos

      @sdetweil that’s an excellent suggestion! Forking MMM-PIR seemed daunting, but forking BackgroundSlideshow and using the z-index trick should indeed be simple, and it separates the problem of turning off the screen at night. Thanks!

      posted in Development
      C
      cpcode
    • Screen saver module that displays photos

      I have my mirror mostly done. Right now, the screen turns off after 10 minutes of inactivity (RPI default screensaver). I want to do something different - I’d like to create a module that does the following:

      • When the screen has been idle for a specified time, the display goes to a “photo frame” mode where everything is hidden except for a rotating image from local storage
      • When the screen is touched, things go back to the regular mirror contents (I have a touch screen)

      Additional nice-to-haves:

      • Some modules could remain visible: for example I might want my Clock module to stay up
      • When the screen is touched, I’d want to go back to a specific page
      • Between certain times of day (at night), the screen just goes blank or turns off

      I’m happy to develop this, and I’m looking for the simplest path forward - I would prefer not to reinvent the entire wheel.

      I looked around and found a number of modules that can display photos, I think that part is fine. I’m already using MMM-BackgroundSlideshow, in fact.
      I also found MMM-PIR, which seems to be able to a) do something after X minutes of inactivity, and b) do something else after the screen is touched.
      However, the code for MMM-PIR is fairly complicated for me and I’m not sure I can just borrow the pieces I want. Right now I would try to fork it and make some minimal changes to do what I want instead.

      Questions for the community: Are there other modules I should look at, with some of this functionality but maybe easier to fork or borrow from? Are there existing forks of MMM-PIR or other modules that you can share, if you did similar stuff?

      posted in Development
      C
      cpcode
    • RE: CalendarExt3Journal fit with other modules

      @MMRIZE It’s all good, it works fine now.
      I’m now going to try to add buttons that let someone move to the next or previous week in the calendar, so I’ll probably have more questions soon… Thanks again.

      posted in Troubleshooting
      C
      cpcode
    • RE: CalendarExt3Journal fit with other modules

      @MMRIZE I was wrong yet again… The real culprit (I hope) seems to be the module MMM-WallberryTheme. When I don’t include it, everything works fine with the calendar, even with height: ‘50vh’. When I add that module to another page (not even the one with the calendar), things start to look different: the calendar’s geometry and fonts are different, and I see that problem with the helloworld module displaying in the wrong place.

      Digging in a bit more, the WallberryTheme module has this body style in its css:

      body {
      margin: 60px;
      color: #fff;
      font-family: “Rubik”, sans-serif;
      font-weight: 400;
      font-size: 27px;
      text-shadow: -1px 2px 2px rgba(0, 0, 0, 0.6);
      line-height: 1.5em;
      -webkit-font-smoothing: antialiased;
      }

      The two culprits are:
      font-size: 27px;
      line-height: 1.5em;

      If they are both enabled, even if all other styles are commented out, I see the problem. If either or both are commented out, everything is good.
      No idea why this happens, but yet again I think I’m good to move forward :)

      posted in Troubleshooting
      C
      cpcode
    • RE: CalendarExt3Journal fit with other modules

      @MMRIZE I just got it to work by removing

      height: '50vh',
      

      from my config. I copied it from the git example but don’t know how vh works for height. If I comment it out altogether, the calendar is pretty short (for 14 hours) but the helloworld content displays correctly. If I do height: ‘1200px’, the calendar is a lot taller and looks great, AND the helloworld content displays correctly.

      I guess something I have doesn’t like the 50vh stuff. The dev tools were showing some weird stuff also…

      Thanks, this is good for me to move forward!

      posted in Troubleshooting
      C
      cpcode
    • RE: CalendarExt3Journal fit with other modules

      @MMRIZE It’s running on a RPI5. The resolution should be 1080 x 1920 although I also see it when accessing the mirror from my desktop. I’ll open dev tools and try to figure out if some other module is interfering.
      So, even if you use 16-20 hours in your calendar, the text still goes below?
      Thanks for the help by the way, and for the module!

      posted in Troubleshooting
      C
      cpcode
    • RE: CalendarExt3Journal fit with other modules

      @MMRIZE I think I narrowed it down to the hourLength attribute - mine is 14, and at least on my system if I use anything > 10 I see the issue. This is the config for the two modules, the image is below (the dayIndex was different when I took the screenshot but it should not matter):

      {
      			module: "MMM-CalendarExt3Journal",
      			classes:"Calendar",
      			position: "middle_center",
      			config: {
      				height: '50vh',
      				width: '100%',
      				locale: 'en-US',
      				staticWeek: false,
      				dayIndex: 0,
      				days: 7,
      				staticTime: true,
      				hourLength: 12,
      				beginHour:  7,
      			}
      		},
      		{
      			module: "helloworld",
      			classes:"Calendar",
      			position: "middle_center",
      			config: {text: "THIS TEXT SHOULD BE BELOW" ,}, 
                      },
      

      MirrorCalendarWithText.jpg

      posted in Troubleshooting
      C
      cpcode
    • CalendarExt3Journal fit with other modules

      I have CalendarExt3Journal (working well, awesome module) in middle_center, and another module after it in my config.js, also in middle_center. The second module is a simple helloworld module with a div and some spans inside it, not very tall. Just using text has the same issue.

      The second module is NOT being rendered all the way below the calendar, but rather inside/behind it - near the lower quarter of it, the calendar is fairly high.
      For every other module I tested, including CalendarExt3, if I put two modules in the same position they are rendered one below the other. Is this a bug with CalendarExt3Journal or do I need to do something to the second module to force it down below the calendar?

      posted in Troubleshooting
      C
      cpcode
    • RE: Best way to develop from Windows machine

      @sdetweil Thanks, this is perfect! I am set up with SFTP to the Pi and I can edit the remote files with VS Code on my machine. Haven’t tried SSH yet but hopefully that works well too.
      I’m good with old school HTML, JavaScript, and CSS, but have zero experience with anything Linux. This has been a great project to get my feet wet. I think in 3 or 4 more weeks I should be able to post some pics of my display here, it’s coming along.

      posted in General Discussion
      C
      cpcode
    • Best way to develop from Windows machine

      I have a Raspberry Pi with Magic Mirror running - attached to a monitor but no keyboard or mouse. To develop, I am using Remote Desktop from my main Windows computer to remote in and do whatever. This is not ideal, as I have to:

      • Turn on the Pi, let it load to MM
      • Close MM, then Log the main user out of the Raspberry Pi OS (while leaving the Pi on)
      • Remote Desktop from my Windows machine
      • Develop / edit the mirror from the remote window

      I have to do this because Remote Desktop will not let me log into the Pi using the same user that is already logged in. I had actually created a second user, but then I don’t have access to the main user’s files (I know you can get around this, it just doesn’t seem like the right approach).

      So, is there some write-up or general consensus of the best way to work on Magic Mirror from a Windows machine, where the ultimate target is a Raspberry Pi? Things like editing the config and css files, installing modules, developing new modules, etc.

      BTW I also installed MM directly on my Windows machine as a way to develop a fork of a module, much easier than trying to do so via remote desktop. However, at some point I need to pull that fork down to the Pi, edit the config, test it with my other modules, etc.

      How do you long-time users do this?

      posted in General Discussion
      C
      cpcode
    • RE: Auto-restart after quitting

      @sdetweil I open the Git Bash console, go to the MagicMirror folder, and type npm start
      No flags or scripts. Is there a better way?

      posted in Troubleshooting
      C
      cpcode
    • 1 / 1