• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Do modules stop requesting API data when monitor is off or module is hidden?

Scheduled Pinned Locked Moved General Discussion
7 Posts 3 Posters 338 Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    DDE12
    last edited by Oct 13, 2024, 11:55 PM

    I am using MMM-AlexaControl and have a routine set to turn off the monitor overnight. Does this stop MagicMirror in general? Do the modules like weather modules stop requesting data? Do modules stop requesting data when hidden with modules like MMM-ModuleScheduler?

    S B 2 Replies Last reply Oct 14, 2024, 1:09 AM Reply Quote 0
    • S Away
      sdetweil @DDE12
      last edited by Oct 14, 2024, 1:09 AM

      @DDE12 it depends. some stop, some don’t.

      the default calendar and weather do not stop when hidden

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      D 1 Reply Last reply Oct 14, 2024, 3:26 AM Reply Quote 0
      • B Offline
        BKeyport Module Developer @DDE12
        last edited by Oct 14, 2024, 3:04 AM

        @DDE12
        If simply turning off the monitor. No it does not stop MM or modules.

        If stopped with Module Scheduler, maybe. Module Scheduler has to announce that it’s hiding a module, and the module being hidden has to process that announcement.

        What I do, is have an external routine to turn off my monitor(s), and then stop the MM process completely upon leaving where my MM is. When I return, another routine turns on my monitors and restarts my MM install.

        The "E" in "Javascript" stands for "Easy"

        S 1 Reply Last reply Oct 14, 2024, 3:22 AM Reply Quote 0
        • S Away
          sdetweil @BKeyport
          last edited by Oct 14, 2024, 3:22 AM

          @BKeyport if a module wishes to participate in the show/hide process

          there are functions it can override to get notifcation

          resume()
          

          and

          suspend()
          

          carousel, pages, modulescheduler, call the MM functions hide() and show() on the module instance. they do NOT know if the called module participates

          I think we ought to make weather suspend, as there are calls made which count against the total , which are wasted if not visible

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          B 1 Reply Last reply Oct 14, 2024, 3:56 AM Reply Quote 0
          • D Offline
            DDE12 @sdetweil
            last edited by Oct 14, 2024, 3:26 AM

            @sdetweil
            Thank you! So, probably the thing to do is set up PM2 and use MMM-AlexaControl to auto start and stop it? If I have MM on a RPi and then two browser windows displaying MM, does that increase the number of API calls to 3 or is it still just one? I’m thinking about this transition to OneCall 3.0 and how to be the most efficient with the calls.

            S 1 Reply Last reply Oct 14, 2024, 3:45 AM Reply Quote 0
            • S Away
              sdetweil @DDE12
              last edited by Oct 14, 2024, 3:45 AM

              @DDE12 weather is done all in browser, so every window TAB adds calls ( 5 tabs in the same browser is 5 times the calls) and multiple instances add calls too (current and forecast for example )

              calendar is done once on the server , and just presented in the browser

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • B Offline
                BKeyport Module Developer @sdetweil
                last edited by Oct 14, 2024, 3:56 AM

                @sdetweil I simplifed out the details on purpose… Trying to keep it simple, Stupid (KISS)

                :)

                The "E" in "Javascript" stands for "Easy"

                1 Reply Last reply Reply Quote 1
                • 1 / 1
                1 / 1
                • First post
                  5/7
                  Last post
                Enjoying MagicMirror? Please consider a donation!
                MagicMirror created by Michael Teeuw.
                Forum managed by Sam, technical setup by Karsten.
                This forum is using NodeBB as its core | Contributors
                Contact | Privacy Policy