Read the statement by Michael Teeuw here.
Touch Switch - Wakes From and Puts To Sleep
-
My mirror is coming along just the way I would like it just fine tweaking the software before I start the building of the frame. I’m looking to add a Momentary Capacitive Touch Sensor behind the top layer or glass/magimirror that when pressed the MagicMirror will go to sleep (Pi sleeps and screen turns off) and then awakes after another touch. I’m not sure if this a module request or something else. My future goal is to have this along side another Momentary Capacitive Touch Sensor that when pressed hides all modules and brings up my live fee from my security cameras full screen; and then when pressed again hides the live fee and shows the other modules.
Any help wit this is greatly appreciate and thank you in advance.
-
What switch are you planning on using?
-
@kumartrd Have a look at
MMM-PIR-Sensor
. You can customize it to suit your requirements. It normally triggers turning the monitor on, and sets a timer to turn the monitor off. Instead, you want to use button actions/notifications to do both, and not use a timer. Instead you can reuse the wake code for sleep. You’ll also need to add a logic test that a button press while asleep wakes, while a button press while awake sleeps. Have a look at this thread for a very thorough explanation.