I set it up in the study and just left it on. PIR is disconnected so the screen doesn’t blank. Wife walks in and …
“um … is that your magic mirror?”
Yes.
“It is very nice, I like the wood border, and, as usual, you have done a very nice work on making it look professional”
Thanks.
“But … it doesn’t appear to be a mirror. And that is a very busy screen”.
Oh oh. Now I will need to seriously rethink things.
Several days later … I have decided to ditch the PIR (I couldn’t get it to work to my satisfaction anyway). I am going to install a slightly hidden momentary switch. Press the button, screen comes on, release the button, screen turns off / Mirror returns.
That should get me my vision (ability to look at all the key stuff on my display) as well as getting my wife what she is after (nice mirror without the cluttered screen). It should be fairly easy to let people see the cool stuff, if they want to.
This will mean expanding my walnut border (I was probably going to do that anyway) and installing the switch.
The python code is much easier than with the PIR …
#!/usr/bin/env python
from gpiozero import Button
from time import sleep
def turnscreen_on():
print('BUTTON PRESSED')
### subprocess.call("sh PIR/monitor_on.sh", shell=True)
def turnscreen_off():
print('BUTTON RELEASED')
### subprocess.call("sh PIR/monitor_off.sh", shell=True)
button = Button(2)
while True:
button.when_pressed = turnscreen_on
button.when_released = turnscreen_off
sleep(0.5)
I only had a rocker switch to test with and a momentary switch might be triggering the turnscreen_off part all of the time. I might need a boolean variable to hold the screen state (ON / OFF). Momentary switch is coming tomorrow … I will test it and see.