A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Subcategories

  • Any suggestions or wishes for the forum?

    103 Topics
    720 Posts
    S
    @OrangeMirror the current docker setup will only work for multiple instances IF you use the MM_CONFIG_FILE environment variable to run instances off different config files, or the MM_PORT env variable to override the port if using the same config.js all the files will come from the ONE folder tree ~/magicmirror so this means you would have to setup multiple entries in the compose.yaml to launch multiple instances (with the different config parms) You have to change the container name too this is because all the DATA used by the container is external (on docker host filesystem) and not IN the container an example NOT using docker, but same idea here https://docs.magicmirror.builders/configuration/introduction.html#advanced-configuration-and-frequently-asked-how-to-configure-examples
  • Contrasting text on changing background

    4
    0 Votes
    4 Posts
    1k Views
    B
    @sdetweil said in Contrasting text on changing background: @mwm341 I want that too. text over photos. haven’t figured out a way yet. I kludged something together today with the MMM-Wallpaper module. It’s not elegant, but it’s been working for me so far. What I’m doing is having the module draw the image onto an off-screen canvas and compute its average brightness using the luminance formula. Based on whether this brightness exceeds a defined threshold (115 has been working for me), the module then updates a global CSS variable with either a light or dark text color. I’m using color: var(--dynamic-text-color); as the variable. Since it’s determining global brightness, it can still “miss” picking a good color for each module. Depending on compute load, I’m thinking an update would be to determine that brightness value for each quadrant of an image then creating a variable for each quadrant and setting the text style in those areas to that color. A downside to this approach is that it won’t work perfectly with different display aspect ratios, but if you’re only ever using a 16:9 display that would be mitigated. Brightness function: // Helper function to compute average brightness of an image. getAverageBrightness: function(image, callback) { var canvas = document.createElement("canvas"); var width = image.naturalWidth; var height = image.naturalHeight; canvas.width = width; canvas.height = height; var context = canvas.getContext("2d"); context.drawImage(image, 0, 0, width, height); try { var imageData = context.getImageData(0, 0, width, height); } catch (error) { console.error("Error accessing image data:", error); callback(255); // Assume bright background if error. return; } var data = imageData.data; var colorSum = 0; var pixels = data.length / 4; for (var i = 0; i < data.length; i += 4) { var r = data[i]; var g = data[i + 1]; var b = data[i + 2]; // Calculate brightness using the luminance formula. var brightness = 0.299 * r + 0.587 * g + 0.114 * b; colorSum += brightness; } var averageBrightness = colorSum / pixels; callback(averageBrightness); }, Updated onImageLoaded function: onImageLoaded: function(imageData, element) { var self = this; return () => { self.resetLoadImageTimer(); element.className = `wallpaper ${self.config.crossfade ? "crossfade-image" : ""}`; element.style.opacity = 1; // Analyze the image brightness and adjust text color accordingly. // This will update both the module's caption and a global CSS variable. self.getAverageBrightness(element, function(brightness) { var threshold = 128; // Adjust this threshold as needed. var textColor = brightness > threshold ? "black" : "white"; self.title.style.color = textColor; // Set a global CSS variable for dynamic text color. document.documentElement.style.setProperty('--dynamic-text-color', textColor); }); self.title.style.display = "none"; setTimeout(() => { var caption = imageData.caption; if (self.config.caption && caption) { self.title.innerHTML = caption; self.title.style.display = "initial"; } if (self.imageElement !== null) { self.content.removeChild(self.imageElement); } self.imageElement = self.nextImageElement; self.nextImageElement = null; }, self.config.crossfade ? 1000 : 0); }; },
  • How are people viewing camera snapshots on their MM?

    7
    0 Votes
    7 Posts
    1k Views
    S
    @slaeyer99 https://github.com/sdetweil/MMM-ImagesPhotos
  • MMM-GoogleAssistant any working one

    3
    0 Votes
    3 Posts
    589 Views
    H
    @sdetweil thanks i’ll take a look.
  • 0 Votes
    5 Posts
    962 Views
    S
    @Ismailfares the monitor must be against the glass to make it visible (and careful for reverse reflections causing image echos) , so there is no room for a magnifier (whatever that it) large image will be a challenge as you meantioned… 55 in is tall AND wide
  • Protect MM from the outside with user and pass

    4
    0 Votes
    4 Posts
    511 Views
    S
    @kusselin you can also search using ngx provide userid/password authentication and it describes how to enable userid/password authentication in ngx
  • Question about Sam's install scripts and MMM-GoogleAssistant

    4
    0 Votes
    4 Posts
    524 Views
    E
    @sdetweil Thank you!
  • Just FYI, we created templates for issues on the MM repo and doc sites

    2
    2 Votes
    2 Posts
    556 Views
    S
    the template choices on New Issue [image: 1737409148787-screenshot-at-2025-01-20-15-37-50.png]
  • Placing a module in a specific spot?

    2
    1
    0 Votes
    2 Posts
    438 Views
    S
    @daykray you will have to use css position:absolute and x y or top left see the second link in my signature below on how to use the developer window elements tab to find out what those values are for css/custom.css or position relative to some other anchor (maybe the position the module is configured in)
  • forum.bugsounet

    5
    0 Votes
    5 Posts
    721 Views
    S
    @marklili he said in another post recently that he is collapsing all the Ext- modules into his GoogleAssistant module as a new release coming soon see https://forum.magicmirror.builders/post/122666
  • New MagicMirror start options in version 2.30.0

    2
    1 Votes
    2 Posts
    1k Views
    C
    Thanks for posting this thread here. I just signed up a few minutes ago. I want to learn a lot things from here. I hope this community would be a good place to start with.
  • Stop and Start MM on a schedule

    13
    0 Votes
    13 Posts
    3k Views
    S
    @plainbroke my condolences… may his memory bring you joy. I haven’t installed unclutter in years, until last month on another system where the cursor finally bugged me… been like that for a year. I don’t know the reason for needing it, unless someone edits main.css and comments out cursor:none; so, theres that… safe travels…
  • Calendar updates in v2.30.0 Jan 1, 2025

    Moved Unsolved
    1
    0 Votes
    1 Posts
    517 Views
    S
    in the v2.30.0 release there is a significant update to the calendar module. I believe all the date jump/timezone, daylight savings, issues are resolved… I have added testcases to the release to cover all the open issues… give it a try (please backup your MM config… this release requires an updated nodejs version, again…)
  • Does my MM really need this size of GB?

    9
    0 Votes
    9 Posts
    1k Views
    kusselinK
    @sdetweil thx sdetweil and the others… i installed the MM new and now all is good
  • Ideas for Enhancing My MagicMirror Setup - Looking for Some Suggestions

    6
    0 Votes
    6 Posts
    947 Views
    S
    @abuislam Do you have a link to MMM-TextEffect, i cant find the module anywhere on Github or mentioned anywhere else on this forum? Thanks!
  • Looking for someone to create a smart mirror

    1
    0 Votes
    1 Posts
    278 Views
    T
    Hi, I’m looking for someone who would like to create and sell a magic mirror. I’m a programmer, but also a quadriplegic, so physical creation is not an option on my own. Looking to create something cool fitting industrial style room and to have fun with software side. I’m located in Poland but it doesn’t really matter where you’re from. If that’s sounds like something want to help with ≤ drop a message. Thanks!
  • Best way to develop from Windows machine

    10
    0 Votes
    10 Posts
    1k Views
    S
    @abuislam please, do not copy the entire post you are replying to
  • problem with my MagicMirror kiosk client

    4
    0 Votes
    4 Posts
    540 Views
    D
    @sdetweil Hey! Thanks for answering, and no I have not a backup of client SDcard, BUT trust me, I will have that in the future… but I have backup of my shell scripts, so it feels pretty ok anyways.
  • Newbies here seeking supports to built a magic mirror

    2
    0 Votes
    2 Posts
    354 Views
    S
    @gladiator see the show your mirror category.
  • Installation Error

    6
    0 Votes
    6 Posts
    809 Views
    V
    @vandam3b Thank you very much, it worked.
  • Recommend Mirror Vendors in USA

    2
    0 Votes
    2 Posts
    243 Views
    S
    @raspberrypi9 only one i know of is twowaymirrors.com https://www.twowaymirrors.com/