Thank you!
I took the leap and opened Issue #3297 on GitHub. I hope I did it correctly, I just signed up for GitHub to create the issue, so I am not familiar with how it all works.
Thank you!
I took the leap and opened Issue #3297 on GitHub. I hope I did it correctly, I just signed up for GitHub to create the issue, so I am not familiar with how it all works.
@sdetweil Thank you, that did the trick!! I really appreciate it!
Personally I use putty and do everything over command line. On my PC I use Notepad++ for working on files as well, then will copy and paste over to the ssh session.
I am loving the MMM=Remote-Control module for its many abilities. I have verified that with the exception of ONE, all of my functions are operational. The ‘Restart MagicMirror’ does NOT work, and pops up this error. This does NOT appear to be related to the process name, which is mm. I verified that the Remote files call for this same process name, but just to be safe I ALSO added the following into the MagicMirror/config/config.js file for the Remote module under config: pm2ProcessName: “mm”,
This is what pops up in the browser of the Remote-Control when clicking on restart. I should also note that ‘pm2 restart mm’ works without issues.
{
"success": false,
"status": "error",
"reason": "PM2 not installed or unlinked",
"info": {
"code": "MODULE_NOT_FOUND",
"requireStack": [
"/home/##USERNAME##/MagicMirror/modules/MMM-Remote-Control/node_helper.js",
"/home/##USERNAME##/MagicMirror/js/app.js",
"/home/##USERNAME##/MagicMirror/js/electron.js",
"/home/##USERNAME##/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js",
null
]
}
}
Here is what the logs of pm2 show after a restart of the MagicMirror is attempted. Note that shutdown and restart BOTH work with ZERO issues.
0|mm | [06.02.2024 14:52.55.198] [ERROR] Error: Cannot find module 'pm2'
0|mm | Require stack:
0|mm | - /home/##USERNAME##/MagicMirror/modules/MMM-Remote-Control/node_helper.js
0|mm | - /home/##USERNAME##/MagicMirror/js/app.js
0|mm | - /home/##USERNAME##/MagicMirror/js/electron.js
0|mm | - /home/##USERNAME##/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js
0|mm | -
0|mm | at node:internal/modules/cjs/loader:1084:15
0|mm | at Function.<anonymous> (node:electron/js2c/browser_init:2:116646)
0|mm | at Module._resolveFilename (/home/##USERNAME##/MagicMirror/node_modules/module-alias/index.js:49:29)
0|mm | at node:internal/modules/cjs/loader:929:27
0|mm | at Function._load (node:electron/js2c/asar_bundle:2:13327)
0|mm | at Module.require (node:internal/modules/cjs/loader:1150:19)
0|mm | at require (node:internal/modules/cjs/helpers:121:18)
0|mm | at Class.controlPm2 (/home/##USERNAME##/MagicMirror/modules/MMM-Remote-Control/node_helper.js:954:18)
0|mm | at Class.executeQuery (/home/##USERNAME##/MagicMirror/modules/MMM-Remote-Control/node_helper.js:697:22)
0|mm | at Class.socketNotificationReceived (/home/##USERNAME##/MagicMirror/modules/MMM-Remote-Control/node_helper.js:1112:26)
0|mm | at Socket.<anonymous> (/home/##USERNAME##/MagicMirror/js/node_helper.js:104:11)
0|mm | at Socket.emit (node:events:514:28)
0|mm | at Socket.emitUntyped (/home/##USERNAME##/MagicMirror/node_modules/socket.io/dist/typed-events.js:69:22)
0|mm | at /home/##USERNAME##/MagicMirror/node_modules/socket.io/dist/socket.js:704:39
0|mm | at process.processTicksAndRejections (node:internal/process/task_queues:77:11) {
0|mm | code: 'MODULE_NOT_FOUND',
0|mm | requireStack: [
0|mm | '/home/##USERNAME##/MagicMirror/modules/MMM-Remote-Control/node_helper.js',
0|mm | '/home/##USERNAME##/MagicMirror/js/app.js',
0|mm | '/home/##USERNAME##/MagicMirror/js/electron.js',
0|mm | '/home/##USERNAME##/MagicMirror/node_modules/electron/dist/resources/default_app.asar/main.js',
0|mm | undefined
0|mm | ]
0|mm | }
Looking further into this, I found an error in my pm2 logs, but I don’t believe it to be pm2 itself that has the error, as I get the SAME error whether pm2 auto-starts the mm or if I use npm manually after stopping pm2.
##USERNAME##@raspberrypi:~/MagicMirror $ pm2 start mm
[PM2] Applying action restartProcessId on app [mm](ids: [ 0 ])
[PM2] [mm](0) ✓
[PM2] Process successfully started
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ 0 │ mm │ default │ N/A │ fork │ 24416 │ 0s │ 2 │ online │ 0% │ 2.5mb │ ##USERNAME## │ disabled │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
##USERNAME##@raspberrypi:~/MagicMirror $
##USERNAME##@raspberrypi:~/MagicMirror $
##USERNAME##@raspberrypi:~/MagicMirror $ pm2 logs
[TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
/home/##USERNAME##/.pm2/pm2.log last 15 lines:
0|mm |
0|mm | > magicmirror@2.26.0 start
0|mm | > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
0|mm |
0|mm | [06.02.2024 13:46.18.922] [LOG] Starting MagicMirror: v2.26.0
0|mm | [06.02.2024 13:46.18.934] [LOG] Loading config ...
0|mm | [06.02.2024 13:46.29.832] [INFO] updatenotification: You are not using pm2
Here is the same output after manually starting
##USERNAME##@raspberrypi:~/MagicMirror $ npm run start
> magicmirror@2.26.0 start
> DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
[06.02.2024 13:45.07.088] [LOG] Starting MagicMirror: v2.26.0
[06.02.2024 13:45.07.098] [LOG] Loading config ...
[06.02.2024 13:45.13.961] [INFO] updatenotification: You are not using pm2
I noticed also that pm2 had a folder which was in my home directory, NOT in the MagicMirror director. I took my test plaftorm, killed pm2, removed it, then installed it again from within the MagicMirror directory. After the install I did a pm2 status and saw that the .pm2 directory was again outside of the MagicMirror directory, so I trust that is expected behavior.
Thank you!! Good to know! I am not very good with Linux, knowing only enough to really foul things up.
I noticed that in the config file you included in a previous post that you do NOT have the default calendar module in there. My thoughts are that this MMM-MonthlyCalendar has some dependency on that the default module, and without it noted in the config you aren’t getting what you expect.
As a STARTING point I would recommending adding this to your config file. I’d suggest making sure THAT calendar is working. If it DOES show Holidays but your Google calendar is still NOT working, I would suggest removing the US Holiday link and replace it with your Google calendar link. Then try again.
Additionally, the config options for that module you are trying to use does NOT show url as a config option. That likely has to be called from the default module. A concern I am sure you are having is that you don’t want to SEE the default module. I HIGHLY recommend that you use it for the purposes of troubleshooting. Once you get to a point where the MMM-MonthlyCalendar starts working, simply remove or comment out the POSITION line for the default calendar module in your config.
Also, did you edit any of the files in the modules in any way? If so, you may want to remove them and install the module again.
{
module: "calendar",
header: "US Holidays",
position: "top_left",
config: {
calendars: [
{
fetchInterval: 7 * 24 * 60 * 60 * 1000,
symbol: "calendar-check",
url: "https://ics.calendarlabs.com/76/mm3137/US_Holidays.ics"
}
]
}
},
I understand 100% what you are saying, I had this same issue. What you are experiencing is the DEFAULT of CX3, that is how it looks if you don’t edit anything. By default the ICON next to the event will be the color you configured, but the event text will all be white. To change this you will need to edit your CUSTOM css file, DO NOT edit the css file inside of the module. I started off making that same mistake. The trouble in doing that, is that when a module gets updated, you lose anything you did. The customizations should be done in that custom.css file and should be backed up. Copy the code below into your ~MagicMirror/css/custom.css file, save, then refresh the browser window (I use the MMM-Remote-Control to refresh mine remotely), and you should see it load with the colors you configured in the default calendar module.
* CalendarExtende3 */
/* Sets event titles to configured color */
.CX3A .event .description {
display: none;
}
.CX3A .event .location {
display: none;
}
I have 10 different calendars which my default calendar loads, all of which are displayed in CX3 with no issues.
Thank you so much for that!! I haven’t deployed my mirror yet, I just have it running headless with a remote screen that I check every few days to make sure things are still looking good. I noticed the other day that some of the recurring events weren’t full day events disappeared. I was convinced that I had screwed something up on the config side. It took spinning up a duplicate system as a test using default config with just my calendars to realize that the issue wasn’t on my side.
I also ran the rollback, and everything is solid once again.
Thank you so much for the awesome module!! I am enjoying both the EXT3 view for a 3 week peek, and use the Agenda for only the events for the current day.
Does this module allow for symbols to be used on full day events? I have the full day events with symbol without issue on the EXT3 calendar, as well as 3 vanilla calendars I use to note what upcoming birthdays, anniversaries, and holidays there are, and it works there as well. The symbols DO work in Agenda for events that have a begin and end time.
In looking at the css files for both modules, I noticed that there are more configurations for symbols in the EXT3 versus the EXT3A css. Is there something that I am missing that I need to do in order to enable them specifically for the Agenda module?
From the module .css file for MMM-CalendarExt3:
.CX3 .event .headline .symbol {
order: 1;
}
.CX3 .event.singleday .headline:not(.useSymbol)::before,
.CX3 .event.singleday .headline.useSymbol .symbol.noSymbol::before {
content: "⬤";
color: var(--calendarColor);
display: inline-block;
padding-right: 2px;
font-size: 75%;
}
.CX3 .event .headline:not(.useSymbol) .symbol {
display: none;
}
.CX3 .event .headline.useSymbol .symbol {
display: inline-block;
padding-right: 2px;
font-size: 75%;
align-self: center;
}
.CX3 .event.singleday .headline.useSymbol .symbol {
color: var(--calendarColor);
}
From the module .css file for MMM-CalendarExt3Agenda:
.CX3A .event .headline .symbol {
color: var(--calendarColor);
font-size: 75%;
vertical-align: text-bottom;
}
.CX3A .event .headline .symbol.noSymbol::after {
content: "⬤";
}
@MMRIZE Thank you, I REALLY appreciate you pointing that out to me. I have gone through and removed and reinstalled all modules manually and moved all of the changes I made to the custom.css and also stopped changing defaults in the .js files and moved those desired changes directly to the config.js file. Saved my bacon from having HUGE headaches in the future with broken configs.
Whew, I was able to FINALLY just now solve this issue after banging my head on the wall over and over again. An interesting thing is that the symbols in fullday and partial day events don’t use the same formatting, as you can see in my screenshot that the timed events have colored symbols, and the full day ones use the output I want to see, though I made no changes there. I backed out my change from the .event .headline .title line, and created a NEW line that changed it for ONLY events that are NOT full day events.
.CX3 .event .headline .title {
color: var(--calendarColor); <---------- REMOVED
.CX3 .event:not(.fullday) .headline .title {
color: var(--calendarColor);
}
Additionally, I was able to figure out the Agenda issue no problem. I commented out the default lines in the CSS file for the description and location and added the display: none;, it works exactly the way I intended.
.CX3A .event .description {
// overflow: hidden;
// white-space: nowrap;
// text-overflow: ellipsis;
// max-width: 100%;
// font-size: 90%;
// color: lightgray;
// padding-left: 20px;
display: none;
}
.CX3A .event .location {
// overflow: hidden;
// white-space: nowrap;
// text-overflow: ellipsis;
// max-width: 100%;
// font-size: 80%;
// color: darkgray;
// text-align: right;
display: none;
}
I am still working on the other issues with the full day events colors being jacked up after changing the event titles and headlines