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

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

Scheduled Pinned Locked Moved Utilities
6 Posts 3 Posters 3.1k Views 4 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
    Twenty
    last edited by yawns Feb 11, 2018, 6:58 AM Feb 11, 2018, 5:00 AM

    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}**,
    
            }        
        },
    
    S 1 Reply Last reply Feb 11, 2018, 7:35 AM Reply Quote 3
    • S Offline
      strawberry 3.141 Project Sponsor Module Developer @Twenty
      last edited by Feb 11, 2018, 7:35 AM

      @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 Offline
        Twenty
        last edited by Feb 11, 2018, 11:51 AM

        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
        • C Offline
          cruunnerr
          last edited by Feb 11, 2018, 11:57 AM

          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 Offline
            Twenty
            last edited by Feb 11, 2018, 12:12 PM

            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
            • C Offline
              cruunnerr
              last edited by Feb 11, 2018, 1:19 PM

              the the main thing is you are satisfied

              :)

              great solution anyhow

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              1 / 1
              • First post
                5/6
                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