Read the statement by Michael Teeuw here.
PIR Sensor ??
-
Hi everyone,
I’ve recently started building a MagicMirror and so far i like it a lot.
Yesterday i ordered a HC-SR501 PIR Sensor and tried to install it.This is were the problems started:
I’ve tried some modules but couldn’t get it to work.
I’ve connected my SR501 as followed:- PIN4 - 5V
- PIN11 - Motion (GPIO17)
- PIN6 - GRND
Is there a 2021 tutorial that can direct me in the right direction?.
Before anyone asks ;) . I’m trying for about 5 hours now and used the search box at the top :)
-
@mdlefevere does it work outside mm?
lots of internet articles with python code to read pir and say something
the modules generally run some python code under the covers
-
I’m not yet that good with Python, so some parts are a bit hard to understand.
I’ve seen a couple of modules/posts over here and gave them a shot.One was working half. Screen turns of but no way to get it back on.
This was: MMM-Pir-SensorJust found a dutch how-to: here so i will give this a shot.
-
@mdlefevere said in PIR Sensor ??:
One was working half. Screen turns of but no way to get it back on.
This was: MMM-Pir-Sensoroff is easy, PIR doesn’t report , so nobody there, by default, so turn off…
make sure u have ssh enabled, so u can get in from your PC and turn display back on…
put the sensor is not reporting, or the module config isn’t looking at the right GPIO pin .
make it work outside MM… then it will be better
-
Alright i got i working with this guide.
The only thing i’m now facing is, and i can’t understand this, that i get the message “Cable not connected” on my display.
When i was using it in crontab with “vcgencmd display_power 0” (timebased) it put the monitor in sleep mode and the led’s of the monitor turned off.
Now when using it in a .sh command the monitor stays on with this message.Do you have any idea?
-
@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’