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

    Posts

    Recent Best Controversial
    • Default Compliments Module - Special Days

      I wasn’t sure where to put this but I wanted to make use of the “special days” feature of the default compliments and it didn’t behave as I was expecting. I assumed it would override the normally configured compliments and show only the one(s) specific to that day, however it appears to just add the day’s compliments to the existing list.

      For example I have this in my config:

      "....-12-25": ["Happy Christmas WallysWellies!"]
      

      But that message just gets added to my many already configured compliments (I changed the date to test).

      For anyone like me that wants to show only this message on your chosen day I tweaked the compliments.js file around line 98 from this:

      // Add compliments for special days
      for (let entry in this.config.compliments) {
        if (new RegExp(entry).test(date)) {
          Array.prototype.push.apply(compliments, this.config.compliments[entry]);
        }
      }
      

      to this:

      // Add compliments for special days
      for (let entry in this.config.compliments) {
        if (new RegExp(entry).test(date)) {
          compliments = []; // Empty the array if it's a special day in config.js
          Array.prototype.push.apply(compliments, this.config.compliments[entry]);
        }
      }
      

      It just empties the compliments array if it’s a date specified in the config file (or at least I assume that’s how it works - seemed happy in a quick test!).

      I didn’t see much info when searching for answers so I thought I might throw it out there for info / discussion.

      posted in General Discussion
      W
      WallysWellies
    • RE: MMM-MealieMenu Fetch Error

      @zanix Hi Zanix. Just updated the module and all meal entries now seem to use the default image. I updated the docker image in case that was the problem but they’re all still showing the default orange image.

      Possible bug introduced in the latest release?

      posted in Troubleshooting
      W
      WallysWellies
    • RE: MMM-MealieMenu Fetch Error

      @zanix that’s dedication, thanks!

      I see the update notification so I’ll get it updated tonight. Cheers.

      posted in Troubleshooting
      W
      WallysWellies
    • RE: MMM-Pages - possible to change module config?

      I got the effect I was after which I’m going to include here for the amusement of real programmers…

      I added a notification check at the end of the notificationReceived function in the MMM-Wallpaper.js file that listens for page changes from the MMM-Pages module:

      else if (notification === "NEW_PAGE") {
              self.updateImageFilter(payload);
          }
      

      And I wrote a nasty little function to deal with it:

      updateImageFilter: function(pageNumber) {
          var self = this;
          var mainDiv = document.getElementsByClassName("MMM-Wallpaper")[0];
          if (mainDiv) {
              var wallpaperImage = mainDiv.getElementsByTagName("img")[0];
              if (wallpaperImage && pageNumber === 0) {
                  wallpaperImage.style.filter = "grayscale(0.0) brightness(1.0)";
              }
              else if (wallpaperImage) {
                  wallpaperImage.style.filter = self.config.filter;
              }
          }
        }
      

      I’m using Alexa to switch between the pages.

      I had some bugs during my initial versions which I put down to the code trying to access the div or image element before it was created, hence the dodgy checks. They might be unnecessary.

      The logic is pretty simple but I’m no programmer and I’ve never used TypeScript. Pretty happy with the result though. One day I might try and animate the brightness transition…

      posted in Troubleshooting
      W
      WallysWellies
    • RE: MMM-Pages - possible to change module config?

      @sdetweil Thank you for your help.

      posted in Troubleshooting
      W
      WallysWellies
    • RE: MMM-Pages - possible to change module config?

      @sdetweil Basically, using MMM-Pages I will have 2 pages:

      • Page 1 - show only MMM-Wallpaper.
      • Page 2 - show MMM-Wallpaper, and everything else (calendar, clock, weather, mealie, Spotify…).

      MMM-Wallpaper is set to position “fullscreen_below” so I have configured it to dim the images so I can read the text of the other modules using it’s normal config:

      filter: "grayscale(0.0) brightness(0.2)"
      

      On page 1, where there will be no other modules overlayed, I would like to reset this config and have the images at normal (full) brightness.

      I’m just looking for some ideas on how to achieve this with the least amount of fuss.

      The idea situation would be, MMM-Wallpaper page 1 config:

      filter: "grayscale(0.0) brightness(1.0)"
      

      MMM-Wallpaper page 2 config:

      filter: "grayscale(0.0) brightness(0.2)"
      
      posted in Troubleshooting
      W
      WallysWellies
    • MMM-Pages - possible to change module config?

      Hello all. I recently setup MMM-Pages and essentially am looking for setup where one page is a digital photo frame, and the other has all my dashboard content. For the wallpaper I use MMM-Wallpaper.

      Both pages have the background image set but in order to increase contrast for the text I dim the images with this line in the config:

      filter: "grayscale(0.0) brightness(0.2)"
      

      I would like to disable that line (or adjust it) so the background is more vibrant on the page without the dashboard text.

      My first thought would be to duplicate the module and simply switch between them when the page changes but I wonder if anyone can see a better way? I do see that the wallpaper module can accept a notification called UPDATE_WALLPAPER_CONFIG which may be of some help. Not sure how I could use that though.

      posted in Troubleshooting
      W
      WallysWellies
    • RE: MMM-MealieMenu Fetch Error

      @zanix Restarting the MM service fixed the issue with no additional steps so it may well be an expiring token or something.

      I have updated the Mealie container so I am now on v1.7.0 and switched to using the API key for auth. I have also checked and I am using the current version of your module, v1.5.0.

      I’ll report back if anything interesting happens. Thanks again for your advice.

      posted in Troubleshooting
      W
      WallysWellies
    • RE: MMM-MealieMenu Fetch Error

      @sdetweil I’ll look into it, thanks.

      posted in Troubleshooting
      W
      WallysWellies
    • RE: MMM-MealieMenu Fetch Error

      @sdetweil Mealie is the first time I’ve used docker so it’s totally manual. I’ve never tried to update it - it was setup within the last couple of months.

      I was planning to do the update based on the Mealie docs but I could look into watchtower.

      posted in Troubleshooting
      W
      WallysWellies
    • 1 / 1