shbatm / MMM-OnScreenMenu

MagicMirror² utility module that provides a simple on screen menu for control
MIT License
62 stars 22 forks source link

Working with MagicMirror 2.7.1? #17

Open MSakana opened 5 years ago

MSakana commented 5 years ago

Since updating my MagicMirror version a few months back, and then starting over entirely with a new Pi, I can no longer get this module to work (it was working great for me in the past). I noticed that the new MagicMirror install will set up pm2 for you, and uses "MagicMirror" as the process name instead of "mm." I did change this in the config file but it didn't help. Basically the buttons show up on my screen, but don't do anything when pressed (tried both touchscreen and mouse to push buttons.)

As a test I tried the MMM-Remote-Control module, and that works fine to do the things I want this module to do: minimize the screen, restart, shut down, toggle modules, etc.

Just wanted confirmation that the module is working with MagicMirror 2.7.1, or if some setting inside electron and/or pm2 might have changed that affects the function of this module? Thank you!

Lotusvball commented 4 years ago

I have the same issue. I can't get anything to work. Does this still work?

MSakana commented 4 years ago

I have not been able to get it to work. Am currently using MMM-Remote-Control as a workaround to toggle settings on my MagicMirror, which is not ideal for my set-up but it works. I have not gotten a response to this issue.

shbatm commented 4 years ago

It's working for me on 2.10. What is not working? Are you getting any errors on the Pm2 log/console or in DevTools? Have you tried the develop branch?

I haven't really been working too much on my Mirrors over the past year but I did just update to the latest version last weekend and this was still working as expected.

Lotusvball commented 4 years ago

I was able to gather more info last night.

I have a MMM-SmartWebDisplay that I was trying to toggle on and off. I had it set to be hidden upon loading of MagicMirror. The toggling would not work. I then used RemoteControl to toggle it on and the the toggling worked through OnScreenMenu.

I also tried to add pages but I could not get the notification send to work to change pages. This last one is the most ideal now since I can not start the system up with the SmartWebDisplay hidden and toggle it on.

I tried this for the page change: notify1: { title: "Switch Page", icon: "eye", notification: "PAGE_CHANGED", payload: "1" },

I had the MMM-Pages loaded and configured, but it would not change the page.

MSakana commented 4 years ago

Ok, I will try updating to 2.10 and see if that works for me (still running 2.7.1). But nothing was happening when I pushed the OnScreenMenu buttons (either through the touchscreen or using a mouse click). No reboot, no toggle modules, no minimize MM. I did have all of these working with an older version of MM. I eventually quit trying to troubleshoot and am just using the Remote Control module instead. Where to find the Pm2 log/console?

MSakana commented 4 years ago

I updated to the newest available version of MM (2.9?) and am attempting to get the default buttons to work: Refresh, Restart, Reboot, and Stop using the example config text (except the process name needs to be changed to "MagicMirror", right?). Nothing happens when I activate the buttons (using touchscreen or mouse click). I should specify, the button does become brighter in indicate it is registering that I'm pushing it, but the MagicMirror doesn't respond to the command.

If I use pm2 commands from the terminal it works fine. Also works fine to use MMM-Remote-Control module to activate pm2 commands and toggle modules. I checked the pm2 logs, don't see errors specific to OnScreenMenu, but I'm not really sure what I'm looking for. The output log just says:

0|MagicMir | Connecting socket for: MMM-OnScreenMenu

Ok, found this error when starting in DevTools:

Connecting socket for: MMM-OnScreenMenu Sockets connected & modules started ... Whoops! There was an uncaught exception... { Error: listen EADDRINUSE 0.0.0.0:8080 at Server.setupListenHandle [as _listen2] (net.js:1330:14) at listenInCluster (net.js:1378:12) at doListen (net.js:1492:7) at process._tickCallback (internal/process/next_tick.js:63:19) at Function.Module.runMain (internal/modules/cjs/loader.js:755:11) at startup (internal/bootstrap/node.js:241:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:579:3) errno: 'EADDRINUSE', code: 'EADDRINUSE', syscall: 'listen', address: '0.0.0.0', port: 8080 }

I'm afraid I don't know what that means. I have not tried the develop branch, can give that a try next.

Thank you!

Lotusvball commented 4 years ago

For me it would really help if I used the proper case. Change "Page_Change" to "PAGE_CHANGED" and "1" to 1. Now it works. Sorry about that.