Read the statement by Michael Teeuw here.
UNSOLVED NEWBIE - PIR issues
I am new to coding and Magic Mirror, but between me and my partner we have managed to get one up and running with 4 or 5 modules working. We are at the stage now we wish to get it up on the wall, but want to get a PIR sensor working so that it only works when it sees movement infant of it.
I have tried various PIR sensor modules but just cannot get it to work! Any advice on best module to use, or anyone know any links to any COMPLETE talk throughs on how to get it on mirror and working? As I’m almost close to giving up.
I also find it hard when given advice as not at all up on coding, its all new to me.
If anyone can help a naive newbie I’d be grateful.
@rachee problem is not you. the commands used to turn on/off the displays are sensitive to what pi you are using.
1st thing to do is use some of the python setups for PIR and prove that the wiring is right and the sensor does what u expect
then try out the commands that turn on/off the display, and determine which one works for you (none work for me)
the commands are
tvservice - pi only, turns off HDMI port
vcgencmd - turns off HDMI port
dpms - turns off HDMI port
cec-client - turns off cec compliant monitor/tv
on the newer, energy star displays/TV’s, when u turn off the HDMI port u get some sort of ‘No Input’ screen. no way to override that
not all pir modules support all the commands
if u look inside each u can see what commands they are issuing, and try those manually
I recommend using an ssh session, cause when u turn off the monitor you are working on, it’s gets tough to get it back on. forced reboot most of the time.
MMM-New-PIR by bugsounet seems to have the most commands enabled
his code to turn in/off is in his screen library