Read the statement by Michael Teeuw here.
Electron
-
@plainbroke On my setup, it appears to spawn 4 copies, sometimes 5. I suspect that’s different tasks.
however, black screens aren’t likely a symptom of too many electron copies. Use sam’s scripts to re-check that screen savers and such are all disabled.
-
@plainbroke
I use Ctrl+m too so I can minimize the electron browser in order to get to terminal and restart mm.Are you using pm2? If so, use this command in the terminal to see how many actual instances of MagicMirror are running.
pm2 ls
NOTE: You could see more things in the taskmanager in certain situations where another processing thread is required. That doesn’t mean that Electron or MagicMirror has extra “copies” running on your machine. (My machine always shows at least 8 electron threads running, but I only have one MagicMirror instance running. The more modules have in my mirror, the more electron threads show in taskmanager).
Using pm2 ls, if you see more than one instance you can kill the extras by using the id number of the extra instances. Also, if you see more than one instance, you may just need to redo the pm2 setup.
If F5 or Ctrl+r don’t work (sometimes they don’t seem to fully restart mm if I’ve added a node package to a module I’m working on) then I use the following command from the terminal.
pm2 restart mm
to fully reinitialize and restart mm if I need to in when I’m developing/editing a module.
-
@kayakbabe when developing a module, dont use pm2
just
npm start
in the MagicMirror folder
ctrl-c top stop.pm2 is for production
use ssh from your PC, maybe winscp or bitvise ssh client that gives you ssh terminal and file manager over the pi files. then u can edit w notepad++ or vs ode or whatever u like
if u need the dev window you can do it on your PC… never have to touch the pi itself.
if u change the modulename.js, or css, or config.js settings, just reload the page, no restart required
-
@kayakbabe also if you used my script to install, its
pm2 restart/start/stop MagicMirror -
@sdetweil
I was using ctrl - m to stop MM to see what was giving my black screen with a mouse pointer and the only thing I could find that seemed strange was a bunch of electron instances running.
I was just wondering if that could be the cause of the black screen with the mouse pointer… I use pm2 for most every thing that has been explained on here in the past year or so. I use pm2 to restart mm when needed and it is setup to restart mm anytime I make changes to config.js and exit and save. -
@plainbroke ctrl+m does not stop MagicMirror. It minimizes it so it isn’t showing full screen.
m = minimize
-
@kayakbabe
I know that, and that is why I was using it that way.
There is a method to my madness.
I figured if I left it running (minimized) I could find what was causing my black screen with the mouse pointer on it. I guess it just opened up everyones pm2 usage information… I am still looking what is causing this to happen randomly. As in it may not happen for days and then it may happen a couple times a day.
I guess I need to find a way to monitor when it freezes and have it auto restart mm. -
@sdetweil If I didn’t need a breadboard for testing the button circuits I’m adding, it could be done the way you say. I’m not working on the appearance of my mirror, If I were then I’d do as you suggest. I’m working on adding hardware buttons and a new module to make them function the way I want.
I find it easier to just remove the pi, take it to my desktop where I have a very wide monitor. And where I can play with wiring, breadboard, resisitors, buttons etc. I added the following to my config
electronOptions: { fullscreen: false, width: 950, height: 950 },
so I can have mm running on one quarter of my screen, I have plenty of room for geany on the other and a terminal window, etc. then can just f5 or ctrl+r when I want to test.
-
@plainbroke did you look at your pm2 logs? Sam really helped me by explaining where to look. I’ll bet it’s a module.
-
@kayakbabe
I will look into that also when i am back where I can in a couple weeks.