• 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.

Hide modules when display goes off through PIR (power saving)

Scheduled Pinned Locked Moved Unsolved Requests
22 Posts 7 Posters 7.8k Views 6 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.
  • T Offline
    thedk
    last edited by Feb 14, 2019, 8:17 PM

    Maybe i understand the modules like pir-hide-all, energy-saver, ect. wrong, but there is no modul that hides all modules when the display goes off through the PIR just for energy saving?
    Is it possible to make a modul that hides all modules that i have installed?

    1 Reply Last reply Reply Quote 0
    • S Offline
      sdetweil
      last edited by sdetweil Feb 14, 2019, 8:52 PM Feb 14, 2019, 8:42 PM

      Well, there is a module… it needs one little script written for PIR.

      My MMM-SleepWake. It takes triggers from some external to MM.

      And supports the Pi, xdms, and blanking the screen for energystar devices.

      So, that suggests I need to provide that script… Thanks

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • T Offline
        thedk
        last edited by Feb 14, 2019, 8:49 PM

        Saw this too, but forgot it.
        If somebody would write the script for the PIR it would be great.

        1 Reply Last reply Reply Quote 0
        • E Offline
          ejay-ibm Project Sponsor Module Developer
          last edited by Feb 14, 2019, 9:23 PM

          Hi @thedk ,

          I think my post is related to that too.
          https://forum.magicmirror.builders/topic/9792/blank-screen-issue-another-one-again-after-one-hour-or-so/7

          It look like you figured out faster than me the lack of communication of the PIR modules to the other .

          You will see in the post that I have open a git to the PIR dev to ask for some help .

          Hopefully we will find a way to make it .

          I’m not a dev at all but I understand coding .
          I confident that playing with some code for a week or 2 will bring me to what I want.

          If we don’t get consistent answer in the meantime I’ll ( If i’m able to make it) definitly share with the community my findings.

          Cheers

          1 Reply Last reply Reply Quote 0
          • T Offline
            thedk
            last edited by Feb 15, 2019, 1:04 PM

            Thanks for the link.
            Then let’s see what will happen :)

            E 1 Reply Last reply Feb 16, 2019, 11:45 AM Reply Quote 0
            • E Offline
              ejay-ibm Project Sponsor Module Developer @thedk
              last edited by Feb 16, 2019, 11:45 AM

              @thedk Hi ,
              I finally manage to find a solution that works quite good.
              I do not deserve the credit for the solutions, only for the implementation as it merges multiple sources.
              First : PIR need a first trigger to work .
              Workaround : Make the HDMI OFF when the mirror start ( so your screen doesn’t stay ON always until someone pass in front of the miror )

              For this Edit :
              in the MMM-PIR-SENSOR folder
              node_helper.js
              around line 139

              this.started = true;
                  self.deactivateMonitor();  // add this to turn off monitor at startup . 
              

              Then to deactivate the idle / sleep mode of the modules due to MMM-Assistant

              Still in the node_helper.js modify line 34 like :

              exec(“/usr/bin/vcgencmd display_power 1 && xdotool key ctrl+r”, null); // add here xdotool key ctrl+r

              You need to install xdotool for this. That will allow to simulate the ctrl+r from keybaord that refresh the module therefore bring them back on screen .

              I set in the config.js file the pir module to put the screen off after 15 mins

              “powerSavingDelay”: “900”,

              I applied the same setting in MMM-AssistantMk2.js

              onIdle: {
              timer: 10006015, // if you don’t want to use this feature, just set timer as 0 or command as “”
              command: “HIDEMODULES”

              Summary When I start my mirror the screen is off. The PIR detect my presence and turn it ON .
              After 15 mins the screen goes off and the modules goes in sleep .

              As soon as the user presence is detected again , the screen goes on and modules are refreshed and come back .

              Hope this helps .

              EJ

              1 Reply Last reply Reply Quote 0
              • B Offline
                broberg Project Sponsor
                last edited by Feb 16, 2019, 3:20 PM

                Maybe I don’t understand your question… but

                Hiding modules only with css (i.e hiding them on screen) does nothing for the power saving.
                You need the monitor to go in to sleep for any power to be saved.

                The Pi still runs when you hide the modules, not much power to save there, And I don’t really think the modules reload when hiding/showing them. But I can be wrong haven’t looked in to the code on the Hide/show part.

                E 1 Reply Last reply Feb 16, 2019, 5:50 PM Reply Quote 0
                • S Offline
                  sdetweil
                  last edited by Feb 16, 2019, 3:25 PM

                  modules do not reload… their content is not shown when hidden

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 1
                  • T Offline
                    thedk
                    last edited by Feb 16, 2019, 3:53 PM

                    But it would save CPU Power if the Modules would be hide or not?

                    S 1 Reply Last reply Feb 16, 2019, 3:55 PM Reply Quote 0
                    • S Offline
                      sdetweil @thedk
                      last edited by Feb 16, 2019, 3:55 PM

                      @thedk unlikely… or so small as to be unmeasurable

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      J 1 Reply Last reply Feb 17, 2019, 5:45 PM Reply Quote 1
                      • 1
                      • 2
                      • 3
                      • 1 / 3
                      1 / 3
                      • First post
                        7/22
                        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