So I made my first MagicMirror.
I’ve included an HC SR501 pir-sensor. This sensor has two potential meters to alter the sensitivity and alter the amount of time the output stays high. Having set the sensibility at “medium”, and the output time at “short”. The short has been chosen to see if the sensor works and seems to give less failures. The off delay time will be set in the module config.
I’ve tested the sensor at several ways. The RPI receives it’s signal and with gpio readall It shows to be at BCM 22, GPIO.3 Physical 15.
Using the MMM-PIR-Sensor (PaViRo) module it “works”. Blocking the sensor and wait for the configured 30 seconds the screen goes off. Removing the sensor blockage, the screen goes on. I’ve altered the delay time from 30 seconds to 5 minutes (note time is in milliseconds) as below:
{
module: 'MMM-PIR-Sensor',
config: {
sensorPIN: 22,
powerSaving: true,
offDelay: 300000, //in miliseconden
}
},
the 5 minutes is because I want the mirror to go off when I’m not at home or a sleep 😉
Having set this it looked like it worked, but after a day the mirror started to misbehave. Go off when I’m walking in front of it, or even worse not go on anymore when standing, waving, dancing in front of it… A gpio readall shows the PIR still works and a sudo reboot solves the problem for a couple of hours.
So I was wondering how do you guys set all the parameters as we have three variables. PIR sensor sensitivity, the PIR sensor output time and the module offDelay. And what can cause this misbehavior?
Thanks in advance,
Regards Robert