Read the statement by Michael Teeuw here.
face recognizes display ON/OFF
-
hi I have been looking now for a few hours for a guide on how to get my face recognizes to turn my magic mirror display on when it recognizes my face can it be done and how thanks.
-
@djboob66 look at the Pir modules
there are 4 different commands
tvservice - pi only turn off/on hdmi
vcgencmd - turn off/on hdmi
dpms - turn off/on hdmi
cec-client - turn off/on monitorthe 1st 3 will leave monitor on, and monitor may show a big ‘no signal/input’ screen for up to 15 minutes before powering off, this is energy star compliance
none of the commands that turn off hdmi can turn on the monitor after it powers off
I have two cec tvs, but one will turn off, but not back on, and other will turn on, but not off
soooooo. I use a hide/show all modules process
-
I want a more securer way so My work Calander is not visible for other users this is why I’m going down the Face recognition .
GAv3 can turn the screen ON OFF but anyone how to know the command can do so. -
@djboob66 look at his code, he uses the same commands
-
@djboob66 Hey, have you found any code yet? I’m looking for the same thing as well. Really need help with this.
-
@suvan looking for what?
-
as I said before, look at the GA code that does this… its the same 4 commands as always
https://github.com/bugsounet/screen/blob/master/index.js
and
async setPowerDisplay (set) { log("Display " + (set ? "ON." : "OFF.")) this.screen.power = set this.SendScreenPowerState() if (this.screen.awaitBeforeTurnOff && !set) await this.sleep(this.screen.awaitBeforeTurnOffTime) // and finally apply rules ! switch (this.config.mode) { case 1: if (set) exec("/usr/bin/vcgencmd display_power 1") else exec("/usr/bin/vcgencmd display_power 0") break case 2: if (set) exec("DISPLAY=:0 xset dpms force on") else exec("DISPLAY=:0 xset dpms force off") break case 3: if (set) exec("tvservice -p && sudo chvt 6 && sudo chvt 7") else exec("tvservice -o") break case 4: if (set) exec("echo 'on 0' | cec-client -s") else exec("echo 'standby 0' | cec-client -s") break case 5: if (set) exec("xset dpms force on") else exec("xset dpms force off") break } }
you should try each command to see what the results are
do this from and ssh connection to your pi, so you don’t have to fight getting the screen back on to work…note that most of these turn off the HDMI port, and NOT the actual monitor.
many newer displays (since 2016) are energy star compliant and will display an upgly no input signal when the hdmi port is turned off… no way to override that(and these displays will NOT turn back on when the hdmi port is turned back on)
ps… none of my displays will work with any of these commands
-
@sdetweil on the PI3… I just got mine working again this is the commands that work:
ON:
#! /bin/bash
sudo vcgencmd display_power 1OFF:
#! /bin/bash
sudo vcgencmd display_power 0 -
@cowboysdude cool. what monitor is that with?