Read the statement by Michael Teeuw here.
Help! Probem using PIR Sensor on raspberry pi zero to turn on/off screen
-
Have you disabled screensaver? That can cause the screen to remain blank.
Easiest way is to install xscreensaver then disable it from the desktop (yes this seems counterintuitive but it works)
-
@randomnoise
Hey! Thanks for getting back to me.
My MM works pretty well, can’t get MMM stock to work though.
My major problem is getting my PIR sensor to function properly. I have it working properly on a pi3 but not the zero.
What code did u use for your PIR?Thanks,
Mike -
@Mikgabo said in Help! Probem using PIR Sensor on raspberry pi zero to turn on/off screen:
can’t get MMM stock to work though.
If I remember correctly, that module’s API is no longer working, thus, killing the module. :-(
-
@Mykle1 Good day!
That’s interesting, I have MMM stock working on my Pi3. I am running an older version of Jessie though.
For you know of any stock ticker that would work on Pi Zero?Thanks,
Mike -
Obviously, I am mistaken then, and I apologize for an old man’s faulty memory. :-/
I don’t know if this is what you are looking for or if it works
on a Pi zero -
@Mykle1 Many thanks, I’ll give it a try!
I have a few more avenues to explore I respect to the PIR sensor and will report back if successful.
Cheers,
Mike -
@Mikgabo said in Help! Probem using PIR Sensor on raspberry pi zero to turn on/off screen:
My major problem is getting my PIR sensor to function properly. I have it working properly on a pi3 but not the zero.
What code did u use for your PIR?for the Pi Zero use the PIR script from @cruunnerr --> point 2.2 Using PIR script
maybe this is helpful
The very important thing is, that your monitor supports HDMI-CEC or ARC. Otherwise u will not be able to turn it on or off via HDMI. To reassure you, most monitors do this ;) To check if it works just go into terminal via ssh and type: sudo tvservice -o to turn off sudo tvservice -p to turn on edit: for some monitors the following commands work better. Please use them if your monitor needs it: vcgencmd display_power 0 to turn off vcgencmd display_power 1 to turn on
-
@NoNameRo Hi!
Thanks for the reply :)
I’ll give it a try later when the kids are sleeping.Cheers,
Mike -
Hi, So I placed this command sudo tvservice -o to turn offi in terminal and this is the result…any feedback?
pi@MagicMirror:~ $ sudo tvservice -o to turn off [E] Unrecognized argument -- 'to' Usage: tvservice [OPTION]... -p, --preferred Power on HDMI with preferred settings -e, --explicit="GROUP MODE DRIVE" Power on HDMI with explicit GROUP (CEA, DMT, CEA_3D_SBS, CEA_3D_TB, CEA_3D_FP, CEA_3D_FS) MODE (see --modes) and DRIVE (HDMI, DVI) -t, --ntsc Use NTSC frequency for HDMI mode (e.g. 59.94Hz rather than 60Hz) -c, --sdtvon="MODE ASPECT [P]" Power on SDTV with MODE (PAL or NTSC) and ASPECT (4:3 14:9 or 16:9) Add P for progressive -o, --off Power off the display -m, --modes=GROUP Get supported modes for GROUP (CEA, DMT) -M, --monitor Monitor HDMI events -s, --status Get HDMI status -a, --audio Get supported audio information -d, --dumpedid Dump EDID information to file -j, --json Use JSON format for --modes output -n, --name Print the device ID from EDID -h, --help Print this information
FYI this is how i’m trying to configure my PIR https://www.magicmirrorcentral.com/pir-sensor-raspberry-pi-magic-mirror/
If you have a soluton that currently works on your Pi ZERO please pass it on.Thanks,
Mike -
@Mikgabo
To test if it works, you should enter it correctlyto turn off the screen
sudo tvservice -o or vcgencmd display_power 0
to turn on the screen
sudo tvservice -p or vcgencmd display_power 1
please follow the instructions under 2.2 Using PIR-Script, then your PIR will work too