@Sean Thanks for the quick replies. What’s the minimum version required?
Read the statement by Michael Teeuw here.
Posts made by wi_brewer
-
RE: MMM-COVID-19 (Deprecated)
-
RE: MMM-COVID-19 (Deprecated)
Anybody know why I’m getting this error when I try to start MM?
-
RE: Turning monitor on/off when not in use.
Thanks for the input, @cruunnerr and @martinkooij.
I ended up going with @cruunnerr’s approach as it required fewer changes to my existing setup.
Here is what I did:
- Created a file that lists the devices and their IPs that we want to evaluate. Filename: “devices”.
myphone,192.168.0.200 mywatch,192.168.0.201 wifephone,192.168.0.202 wifewatch,192.168.0.203
- Created a perl script, “ping.pl”, that pings the devices listed in the file. If it gets a response it will write the results to a file named “ping_results”.
#!/usr/bin/perl use Net::Ping; open(INFILE, "; close(INFILE); #open(OUTFILE, ">", "ping_results") or die("unable to write output: $!"); chomp(@ip_array); $p = Net::Ping->new(); foreach(@ip_array) { if($_ =~ /\d+.\d+.\d+.\d+/) { if($p->ping($&)) { open(OUTFILE, ">", "ping_results") or die("unable to write output: $!"); print OUTFILE ("$`is responding to ping.\n"); close(OUTFILE); } } }
- Added a crontab job to run the perl script at 04:55.
# m h dom mon dow command # Execute Perl Script to check for devices 55 4 * * * perl /home/pi/ping.pl
- Created a shell script, “rpi-hdmi-on.sh” that will check to see if “ping_results” exists. If it does it will turn the monitor on and then delete the “ping_results” file. Added a crontab job to execute this script at 05:00.
if [ -e ping_results ] then vcgencmd display_power 1 >/dev/null rm -f /home/pi/ping_results fi
# m h dom mon dow command # Turn HDMI On (05:00/5:00am) 0 5 * * * /home/pi/rpi-hdmi-on.sh
- Created a shell script, “rpi-hdmi-off.sh” that will turn the monitor off. Added a crontab job to execute this script at 21:30.
vcgencmd display_power 0 >/dev/null
# m h dom mon dow command # Turn HDMI Off (21:30/9:30pm) 30 21 * * * /home/pi/rpi-hdmi-off.sh
I’ve done some testing and it seems to be working well.
-
Turning monitor on/off when not in use.
Hi All -
I’m using a dual approach to turn my monitor off when it is not in use. The first is a cron job that turns it off at 9:30PM and back on at 5:00AM.
I am also using MMM-Remote-Control and MMM-NetworkScanner to turn the monitor off when both my wife and I are not home, and back on when one of us returns.
I am thinking there will be an issue when we are gone overnight. The cron job will turn the monitor back on in the morning and it will stay on all day since the network scanner will think that the monitor is still off from when we left.
Trying to think of a solution to this, has anybody else encountered this or does anybody have a solution? Is there a way to set the network scanner to run the vacant command at a certain time, like 5:01AM, if no devices are found on the network?
Thanks!