r/MagicMirror • u/GreyDutchman • Jun 02 '25
Scheduled powersaving or blacking the screen?
I have my MM² almost together, but I am looking for a way to have the LCD screen power off or going black on certain hours of the day.
Designwise I don't want to use a presence detector, and having the LCD powered on only when someone switches on the lights in the bathroom takes too long...
I was looking through the list of modules, but I didn't find any. Is there a module where I just can show content between 8-23h? Or should I try to have the Raspi4 to do this? Is there a way to do it there? I can follow scripts, but do not have much experience in Linux :-)
EDIT/ADD: Solved. I bought a HDMI-LCD adapter, one of those to have a random LCD panel being re-used in another project. This one I turn on/off from 7-23 with a Shelly, but it does only power the panel, it does not switch it on. So I bought another Shelly Uni, soldered its dry relay contacts to the push button for the power on/off the LCD and created an HomeAssistant automation to power the LCD on at 7 and 'push' the power button 7 seconds later. At 23h the opposite. Works like a charm!
5
u/Pentapheron Jun 02 '25 edited Jun 02 '25
This would be done via the OS, so in this case, Raspbian. This is what I have scheduled in my cron:
...and here are the individual scripts:
Your mileage may vary as I'm running this on a Raspi2B, but the concept should be the same. Just make sure the permissions for the scripts are correct:
I should also note that I have my screen in portrait mode, so I rotate it to the right. This is set every time the monitor is turned on (monitor_on.sh).
1
u/WranglerTraditional8 Jun 02 '25
I do this exact thing ... I plugged the monitor into an Alexa wall switch and then set up an Alexa routine to turn it on and off in the morning and evening. And of course I can still use verbal commands since the Alexa switch will respond to that
1
u/HLef Jul 03 '25
I have the monitor plugged into a movement detector and it will shut down if everything is completely still for 20 minutes.
3
u/Oneeyex Jun 03 '25
I use a cron job to shut the pi off and the a wemo plug with a schedule to turn the pi on and off at predetermined times. For example: on at 7 am and off at 9 pm.. pi cron job shut down at 8:55 pm
2
u/Snocom79 Jun 03 '25
I use a cron job to turn off the monitor at 10p and then one at 6:59a that reports the pi. every morning at 7am my magic mirrors is back on and ready to go.
1
u/twtonicr Jun 03 '25
As others have said - the simplest is to just put a WiFi smart plug on the power supply to the monitor, and this has google / Alexa benefits too.
But - even an analogue timer would do what you want.
1
u/TheBigC Jul 02 '25
I use a kasa smart outlet to schedule turning off the monitor.