Scheduling a blackscreen?
I currently have my mirror mounted close to my bed, so I’d like to use cronjob to schedule when to turn the screen on and off. However, simple commands such as
sudo tvservice -oand
vcgencmd display_powerwon’t work because this specific monitor shows a very bright blue screen with “NO SIGNAL” showing when it can no longer read the HDMI signal.
Additionally, using the
xset dpms forceoptions make it go to a white screen instead of a blank black one when they run to turn it “off”. No idea why or how tot fix this. Nightmare, I know.
Ideally, I’d like to use cronjob to schedule the screen to turn black or off at 12AM and turn back on at 7AM. Because of the limitations above, I think a good bet would be to maybe use MMM-ModuleScheduler to have all of the modules turn off at the specified times and then use cronjob to turn off the backlight at the same time. This would effectively cause the monitor to go “blank”, even if it’s technically still running in the background. Of course, to turn them back on, I would just run the reverse of those commands.
If someone could help me out with this (or provide a better solution), I would be very appreciative. Thank you!
Your monitor should handle the cec-signal (Consumer Electronics Control).
I use very successfull the following crontrab
Stopp und reboot at 8 am
59 7 * * 1-5 sudo pm2 stop all >/dev/null 2>&1
0 8 * * 1-5 sudo reboot now >/dev/null 2>&1
29 9 * * 0,6 sudo pm2 stop all >/dev/null 2>&1
30 9 * * 0,6 sudo reboot now >/dev/null 2>&1
Anschalten des Monitors Wochentags um 8 Uhr
turn on monitor weekdays at 8 am
0 8 * * 1-5 echo “on 0” | cec-client -s -d 1 >/dev/null 2>&1
Anschalten des Monitors am Wochenende um 9.30 Uhr
#turn on monitor on weekend at 9.30 am
30 9 * * 0,6 echo “on 0” | cec-client -s -d 1 >/dev/null 2>&1
Ausschalten des Monitors täglich um 20.30 Uhr
#turn off monitor daily at 8.30 pm
30 20 * * * echo ‘standby 0’ | cec-client -s -d 1 >/dev/null 2>&1
best regards Michael
When u use a RPI… use a relay for power if nothing helps. So you can set the time like described.
2nd possibility - use a Tasmota device and define rules.
@oberfragger STRONGLY recommended NEVER to power off pi as a solution instead of shutdown cleanly…
@sdetweil I agree. But - I said not turn off the RPI. I said- rurn of the monitor with the help of a relay!
@oberfragger ah… got it…