Read the statement by Michael Teeuw here.
PIR Sensor ??
-
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. -
@mdlefevere No real answer for this… I’ve tried several times. I can turn it off but not back on…
Are you running a pi4 or pi3?
This was my answer to the pi3 and it works… cannot figure out the pi4
-
That might be nice.
But how about the startup?. Do you get the ugly brand boot screen first?. How longt to fire up? -
I’m running a 8GB PI4.
I’ve installed NewPIR and configured it like this:{ module: 'MMM-NewPIR', position: 'top_left', configDeepMerge: true, config: { screen: { delay: 20000, turnOffDisplay: true, mode: 1, }, pir: { gpio: 17 }, } },Strange enough it’s working now on another monitor. No sleepy “No Signal” text on screen but just a monitor turning in stand-by.
It’s not a new monitor --> Fujitsu L20T-4 connected with DVII can’t get my hands on it…
-
@mdlefevere that monitor is not energy star compliant.
the monitor doesn’t actually turn off, but enters some lower power mode. or they turn off backlight.
-
Ah i see.
But on the other hand: It goes into stand-by so the front light turns orange, and the screen goes all black (no backlight). -
@mdlefevere yes… getting harder and harder to find monitors that do this…
none of mine do. -
So. I came home after work frustrated that it didn’t work.
After connecting another HDMI cable everything is working as expected 🙄.I had a MicroHDMI to HDMI convertor and a HDMI cable after that.
I ordered a Micro to HDMI so i could get rid of the convertor.
Strange enough it is working with the convertor cable.
-
@mdlefevere never a dull moment!
so not all cables are the same… -
@sdetweil
Defenitly not.
Although it’s weird at the end it’s working.Going to test this a couple of days to see if it stays this way…
-
@mdlefevere
It takes 2 seconds for the startup of the monitor.
There is also no start screen , because the Raspberry Pi is still running. -
@c1olli NICE!!!
-
@MDLefevere
Check out this post and see if it helps
https://forum.magicmirror.builders/post/88444 -
Sorry for being late to the party but as of 8/8/2021 I can confirm that this is working on my RPI3…NOT the 4!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better đź’—
Register Login