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

    Posts

    Recent Best Controversial
    • RE: Simple(?) module to send a notification every x minutes?

      @sdetweil
      I switched to your fork and while it’s better, it’s still sending a notification every several seconds.
      Here’s my config:

      		{
      			module: "MMM-Pages",
                              classes: "fixed",
      			config:	{
      				modules:[	[ "page1" ],
      							[ "page2" ],
      						],
      				fixed: [ "fixed" ],
      				rotationTime:	10000,
      				animationTime:	10000,
      			}
      		},
      

      and

              {
                  module: 'MMM-SendNotification',
                  classes: "fixed",
                  config: {
                      interval: 3600000, // 1 minute interval
                      notification: 'PAGE_CHANGED',
                      payload: 1,
                  },
              },
      

      (I upped the interval to see if that would do anything. It didn’t.)

      I’ve commented out all the other modules except the clock, MMM-BackgroundSlideshow, and MMM-ViewNotifications.

      posted in Requests
      UncleRogerU
      UncleRoger
    • RE: Simple(?) module to send a notification every x minutes?

      @sdetweil
      I’ve no clue how to run it the way you did with the stop and all, but I did start commenting out modules and it seems that MMM-pages is the culprit.

      Without it, SendNotification works fine but when it’s active, SendNotification sends multiple notifications per second:
      9ecae590-6ded-457d-95e8-22d29295e0a3-image.png
      It may be that MMM-pages is suspending and resuming MMM-SendNotification with each change, even though it’s set as “fixed”, and maybe that’s triggering it?

      It may be that this is just something that won’t work for me.

      I really appreciate your help!

      posted in Requests
      UncleRogerU
      UncleRoger
    • RE: Simple(?) module to send a notification every x minutes?

      @sdetweil
      This is what I have:

      {
        module: 'MMM-SendNotification',
        position: 'top_right',
        classes: "fixed",
        config: {
          interval: 60000, // 1 minute interval
          notification: 'PAGE_CHANGED',
          payload: 1,
        },
      },
      

      Thank you for your patience and assistance! You are amazing!

      posted in Requests
      UncleRogerU
      UncleRoger
    • RE: Simple(?) module to send a notification every x minutes?

      @sdetweil
      Got the new version (typo in “notification”?) and it seems to work except that it ignores the interval and just constantly sends the notification.

      Also, there’s an error showing in the console log:

      Parameter mismatch in module.show: callback is not an optional parameter! 3 module.js:394:8
      

      with different numbers. I’m not sure that’s a problem (MMM-BackgroundSlideshow has the same error and it works fine) but I thought I’d mention it.

      posted in Requests
      UncleRogerU
      UncleRoger
    • RE: Simple(?) module to send a notification every x minutes?

      @sdetweil said in Simple(?) module to send a notification every x minutes?:

      https://github.com/sdetweil/MMM-SendNotification

      Thank you so much! That got a lot farther than I ever did. When it gets to the point of actually sending the notification, however, I see an error in the browser console:

      sendNotification: Notification should be a string.
      

      As far as I can tell, the notification (this.config.notification) is a string. Is there something else that I can do to force it to be considered a string?

      Note: the only change I made was to add a bunch of console.log messages so I could try to understand what was going on and then, when I saw that error, commented out the sendnotification line (which made the error disappear). When I uncommented it, the error came back.

      posted in Requests
      UncleRogerU
      UncleRoger
    • Simple(?) module to send a notification every x minutes?

      Is there a module out there where you can say “every 60000ms, send a “PAGE_CHANGED” notification with a value of 1” and it will do that?

      I tried having ChatGPT write a “MMM-NotificationTimer” module that I could start from but I can’t seem to get it to actually send the notification. JavaScript is just too foreign to me to be able to do this at this time.

      I’m using MMM-pages to be able to switch between a traditional MM setup and just a picture. I use MMM-Keypress to switch between the two. I’d like it to automatically switch back to the picture after, say, 10 minutes, hence the need for timed notifications.

      Is there such a module already out there somewhere?

      posted in Requests
      UncleRogerU
      UncleRoger
    • RE: MMM-CalendarExt3 Formatting questions follow-up

      @MMRIZE said in MMM-CalendarExt3 Formatting questions follow-up:

      @UncleRoger
      There would be a simpler solution, but your approach is not bad.

      .CX3 .singleday.event {
        color: var(--calendarColor);
      }
      

      To use this approach; you should assign color to the calendars of the default calendar module.

      Ooh, that’s perfect! Thanks! Much better, I think, to do as much setup in the config.js file as possible and, for this, to define everything about a calendar together (name, key, color, etc.).

      One more question – I’ve noticed that multi-day events show a starting and ending time which is okay, but it’s also doing that for all-day events. That is, if it marked as “all-day”, it shows a start time of 00:00 and an end time of 23:59.

      fff3eb9d-2e24-44ad-8594-fa917855237e-image.png
      Is there any way to turn off the times for all-day multi-day events (or all multi-day events)?

      Thanks!

      posted in Troubleshooting
      UncleRogerU
      UncleRoger
    • RE: MMM-CalendarExt3 Formatting questions follow-up

      @MMRIZE

      Thanks! Now I just have to find 6 different colors that are readable, plus 3 more related to 3 of those that are also readable. 8^)

      (Family calendar, me, the wife, 3 kids, and their 3 schools. sigh Sometimes I wish I was a mantis shrimp.)

      posted in Troubleshooting
      UncleRogerU
      UncleRoger
    • RE: MMM-CalendarExt3 Formatting questions follow-up

      @UncleRoger said in MMM-CalendarExt3 Formatting questions follow-up:

      Re: MMM-CalendarExt3 Formatting questions
      I added this code:

      .CX3 .event .headline.useSymbol .symbol {
        display: none;
      }
      

      (from the above discussion) to custom.css in ~/MagicMirror/css and it had no effect – I still see the colored dot.

      I had set useSymbol to false in config.js and that was preventing this css from being applied. When I removed that from the module config, the dot disappeared as it should.

      And, as a follow-up, I think I saw something about coloring the text so I will do more research there but it would be nifty to have an option of something like “textColor: true” which would apply the color to the text. Not sure if I’m making sense though.

      I found what I had seen previously and this is what worked:

      .CX3 .calendar_<calendar>      {
        color: <color>;
      }
      

      where is the value assigned to the “name:” option of the calendar in the default calendar module. So, if you have this entry in config.js in :

      { // Family Calendar
              name:                   "Family",
              url:                    "https://calendar.google.com/calendar/ical/blahblahblah",
              broadcastPastEvents:    true,
              color:                  "#05C3DD",
      },
      

      in the calendars array of the default calendar module definition, then the CSS to change the text color in CX3 for that calendar would be:

      .CX3 .calendar_Family      {
        color: #05C3DD;
      }
      

      Lastly, I’m trying to figure out how to get the time to be just “08:30” (for 8:30 am) or “22:15” (for 10:15pm) and am not having much luck.

      I figured this one out with a little help from ChatGPT:

      eventTimeOptions: {  hour: '2-digit', minute: '2-digit', hour12: false  },
      

      Not sure if that’s the best way to do it, but it seems to work.

      The final result looks like this:
      cc76b040-21fd-46ce-973e-8894b015c3c6-image.png

      That’s viewing it on a landscape monitor but it will eventually end up on one in portrait mode, hence the need to eliminate the dot and shorten the time.

      (Just trying to document this in case someone else is looking for the same answers.)

      posted in Troubleshooting
      UncleRogerU
      UncleRoger
    • RE: MMM-CalendarExt3 Formatting questions follow-up

      So I don’t know what I was smoking, but I couldn’t find anything about changing event text colors. What I’d like to do is, instead of having a blue dot with white text saying “Piano Lesson”, I’d like no dot and “Piano Lesson” in blue text.

      posted in Troubleshooting
      UncleRogerU
      UncleRoger
    • 1 / 1