MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    Putting the Screen to Sleep while Away (No CEC or PIR)

    Utilities
    3
    6
    2781
    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
      Twenty last edited by yawns

      The monitor I chose wasn’t CEC-HDMI capable, so I was unable to turn on and off the monitor using simple commands. I wanted a way to keep it running while I was around and make sure it was saving power while I was away. I used two modules in conjunction for this: mm-pir-hide-all & MMM-NetworkScanner. I just set the configuration of MMM-NetworkScanner to send the same notification that mm-pir-hide-all expected from its associated PIR module. mm-pir-hide-all doesn’t need to be modified in any way.

      The important change to the recommended module code for the network scanner is in bold below. By doing this, the screen will go blank five minutes after your phone disconnects from your wifi, and it will start up again when your phone reconnects.

      {
              module: 'MMM-NetworkScanner',
              position: 'top_left', 
              config: {
                  devices: [
                          { ipAddress: "github.com", name: "Github", icon: "globe"},
                          { macAddress: "1a:1b:1c:1a:1b:1c", name: "Server", icon: "server"},
                          { macAddress: "2a:2b:2c:2a:2b:2c", name: "Desktop", icon: "desktop"},
                          { ipAddress: "10.1.1.10", name: "Laptop", icon: "laptop"},
                          { macAddress: "4a:4b:4c:4a:4b:4c", name: "Mobile", icon: "mobile"},
                      ],
                  showUnknown: false,
                  showOffline: true,
                  keepAlive: 300,
                  updateInterval: 5,
                  residents: "Mobile",
                  occupiedCMD: **{notification: "USER_PRESENCE", payload: true}**,
                  vacantCMD  : **{notification: "USER_PRESENCE", payload: false}**,
      
              }        
          },
      
      strawberry 3.141 1 Reply Last reply Reply Quote 3
      • strawberry 3.141
        strawberry 3.141 Project Sponsor Module Developer @Twenty last edited by

        @Twenty nice that you combined those modules, but i doubt that you save a lot of energy with that, as the monitor is still running.

        I would suggest you use remote control instead of mm-pir-hide-all, which is using tvservice to cut the hdmi output. This will bring most of the monitors to standby, so you can really save energy.

        {
          module: 'MMM-NetworkScanner',
          position: 'top_left', 
          config: {
            devices: [
              { ipAddress: "github.com", name: "Github", icon: "globe"},
              { macAddress: "1a:1b:1c:1a:1b:1c", name: "Server", icon: "server"},
              { macAddress: "2a:2b:2c:2a:2b:2c", name: "Desktop", icon: "desktop"},
              { ipAddress: "10.1.1.10", name: "Laptop", icon: "laptop"},
              { macAddress: "4a:4b:4c:4a:4b:4c", name: "Mobile", icon: "mobile"},
            ],
            showUnknown: false,
            showOffline: true,
            keepAlive: 300,
            updateInterval: 5,
            residents: "Mobile",
            occupiedCMD: {notification: "REMOTE_ACTION", payload: {action: 'MONITORON'}},
            vacantCMD: {notification: "REMOTE_ACTION", payload: {action: 'MONITOROFF'}},
          }        
        },
        

        Please create a github issue if you need help, so I can keep track

        1 Reply Last reply Reply Quote 0
        • T
          Twenty last edited by

          But then the monitor doesn’t turn itself back on when I get home. So that doesn’t really help.

          1 Reply Last reply Reply Quote 0
          • cruunnerr
            cruunnerr last edited by

            couldn’t u combine that with the normal MMM-PIR sensor and using the relay option?

            connecting like here at Point 5

            1 Reply Last reply Reply Quote 0
            • T
              Twenty last edited by

              Good read! Those solutions still requires a button and/or a relay. My idea is just a minimalist approach to blanking the screen, perhaps if you have personal info on your calendar display. And you never have to think about it again, entirely automated.

              1 Reply Last reply Reply Quote 0
              • cruunnerr
                cruunnerr last edited by

                the the main thing is you are satisfied

                🙂

                great solution anyhow

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Enjoying MagicMirror? Please consider a donation!
                MagicMirror created by Michael Teeuw.
                Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                This forum is using NodeBB as its core | Contributors
                Contact | Privacy Policy