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}**,
}
},