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

    Posts

    Recent Best Controversial
    • RE: What comes into your mind when someone says "calendar"? 🤔

      @aderoks
      CalExt3 has also ‘glancing’ feature, if you have a proper input method to trigger valid notifications(yes, even with swiping if you have touchscreen and use MMM-Touch module together)

      Anyway, MM is DIY hobby project, not perfect. If you want some feature, just build by yourself and share it with others. That’s all.

      posted in General Discussion
      M
      MMRIZE
    • RE: Connecting Modules to Each Other

      @tonkxy
      Usually some module might spit out some notifications with various data those want to be consumed.
      With luck you can gather all data you need from the notifications.

      Some modules might provide public method functions to interact with other modules.

      Some modules might provide WebAPI url endpoints to communicate with world.

      Well, even if there exists nothing to use, you can inject or reassign(overwrite) MM module methods for your needs, because MM module is not encapsulated by default.

      posted in Troubleshooting
      M
      MMRIZE
    • RE: Dynamic Font Colors

      @ijoshea
      Anyway, It looks so interesting, So I tried something. I simply did monkey patching to get dominant color from MMM-GooglePhotos’s image on load.

      6e971ed4-d102-434d-98e3-fd9d1de48374-image.png
      You can do your job with this code without modifying the source codes itselfs.

      /* config/config.js */
      {
      	module: "MMM-ModuleMonkeyPatch",
      	config: {
      		patches: [
      			{
      				module: "MMM-GooglePhotos",
      				method: "ready",
      				patch: async function (original, [ url, target ]) {
      					const ret = original(url, target)
      					let color = null
      					const process = async () => {
      						const { resolve, promise } = Promise.withResolvers()
      						const img = new Image()
      						img.crossOrigin = 'Anonymous'
      						img.src = 'https://corsproxy.io/?' + url
      						img.onload = () => {
      							const colorThief = new ColorThief()
      							const color = colorThief.getColor(img)
      							resolve(color)
      						}
      						return promise
      					}
      					if (typeof ColorThief === 'undefined') {
      						const loadScript = async (src) => {
      							const { resolve, promise } = Promise.withResolvers()
      							const script = document.createElement('script')
      							script.src = src
      							document.head.appendChild(script)
      							script.onload = () => resolve()
      							return promise
      						}
      						await loadScript('https://cdn.jsdelivr.net/npm/colorthief@2/dist/color-thief.min.js')
      						color = await process()
      
      					} else {
      						color = await process()
      					}
      
      					console.log(color) // It will show [R, G, B] array
      					// doYourJob(color)
      
      					return ret
      				},
      			},
      		],
      	},
      },
      
      posted in Custom CSS
      M
      MMRIZE
    • RE: How do I contribute a PR to a module?

      @capedbuffethero

      1. Make a GITHUB account
      2. Fork the original target repository to your account.
      3. git-clone forked repo into your local dev pc.
      4. Do your modifications in your local repo.
      5. Commit your modified version to your GitHub.
      6. Make PR to the original target repo.
      7. Wait for confirmation and merging by original owner.
      posted in Development
      M
      MMRIZE
    • RE: Module Ability to Add Packages to Vendor Directory

      @td

      • This doesn’t work?
      getScripts: function () {
        return [ 
          this.file('node_modules/preact/dist/preact.min.js'), //from this module's directory
        ]
      }
      
      • Or you can serve preinstall or postinstall scripts for your module to handle that kind of job (additional install, move/rename files, etc.)
      posted in Feature Requests
      M
      MMRIZE
    • RE: MMM-NotificationTrigger second trigger not working

      @arynio

      https://github.com/MichMich/MagicMirror/blob/26a76f80d63e5c9746b6db712d6901219f8b6b93/js/main.js#L97-L99

      if (module !== sender && (!sendTo || module === sendTo)) {
        module.notificationReceived(notification, payload, sender);
      }
      

      module.notifcationReceived() doesn’t work when the recipient module and the sending module are the same.
      A module cannot hear its voice.

      If you want to use a chained shell commands with delay, make .sh file and execute it.

      posted in Troubleshooting
      M
      MMRIZE
    • RE: Large Numbers

      @NotMyCircus said in Large Numbers:

      would it make more sense to modify the EXT3 module rather than making so many changes in the css?

      It is up to you. But when you modify the source code, you may have the problem on the next update of the module.

      posted in Custom CSS
      M
      MMRIZE
    • RE: Failed to load resource

      @mumblebaj
      As of version 2.24, Somebody added to spit this error message out when the 2nd parameter is not a callback function.

      However, the following codes correct the missing parameter anyway, so it is unnecessary to regard it as ERROR, unless that self-correction logic is removed.
      Even if there is a plan to drop out that correction logic, it’s still better to flag it as a “WARN” rather than an “ERROR”, I think so.

      Anyway, the error message is just annoying, and not related to real “ERROR” . You can ignore it.

      posted in Bug Hunt
      M
      MMRIZE
    • RE: automatic update module by notification

      I recommend not updating MM or modules unless they work. Just leave them. Update them only when you find some issue or need a new feature.

      posted in Requests
      M
      MMRIZE
    • RE: MMM-NotificationTrigger second trigger not working

      @arynio
      I haven’t tested. But as far as I know, a notification from the module itself would not be heard by itself to prevent infinite loop possibility.

      posted in Troubleshooting
      M
      MMRIZE
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 12
    • 13
    • 6 / 13