Read the statement by Michael Teeuw here.
PIR Sensor ??
-
@mdlefevere well, when u ran in cron, you ran as root
in your script do you do
sudo vcgencmd display_power 0
-
@sdetweil said in PIR Sensor ??:
sudo vcgencmd display_power 0
No i don’t
But i tried it already and didn’t make a difference.Also if i sudo su and then use vcgencmd display_power 0 it’s not sleeping.
-
@mdlefevere this is where I have trouble… all my displays behave as u describe…
turn off the hdml and then they holler about no input… , and 15 mins later power off (energy start complaince) …
-
Hmm alright.
So do you have a “workaround”?. How do you handle this?. I just want the screen to be not on all day long when i’m just home for a couple of hours -
@mdlefevere I use module hiding. never turn the display ‘off’
-
Ahh so. But doesn’t the backlight stay on all nigjt?. Not very energy efficiënt 😋
-
@mdlefevere yes. but can’t turn it off programatically… what else can I do?
-
So weird. I can’t imagine that a crontab can do it and the same line in a .sh not.
That’s bothering me. To be continued.Saw another module im gonna try tomorrow: MMM-NewPIR
-
@mdlefevere they all use the same 4 commands
tvservice
vcgencmd
dpms
cec-clienttop three turn off hdmi, leaving the ugly message
cec-client turns off the display, BUT, needs something 2018 or newer with CEC support
for it to work… my 55 in tv will turn off, but not on… (so much for standards!), and only from the pi4… nothing else.this is the screen library in NewPIR
https://github.com/bugsounet/screenuse the same 4 commands
and the matching code
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 }
-
I use a mini pir sensor like this:
https://www.ebay.de/itm/133654306312
That switches the monitor directy completely off without any programming.
That solution works on my MagicMirror since one year without any problems.