Hi there,
At the moment I am a bit proud having built a working smart mirror using IKEA RIBBA in 40x50cm.
But, for saving energy, I connected a PIR HC-SR504 to a Raspberry Pi 3 like this:
Instructions: I followed these instructions by StacheEnthusiast by:
- cd ~/MagicMirror/modules
- git clone https://github.com/paviro/MMM-PIR-Sensor.git
- cd ~/MagicMirror/modules/MMM-PIR-Sensor
- npm install wiring-pi
- sudo usermod -a -G gpio pi
- sudo chmod u+s /opt/vc/bin/tvservice && sudo chmod u+s /bin/chvt
- mv node_helper.js node_helper_backup.js
- sudo nano node_helper.js (copied and pasted his code) and saved this
- inserted this into config.js:
{
module: 'MMM-PIR-Sensor',
config: {
sensorPIN: 25,
powerSaving: true,
offDelay: 30000,
}
}
But, it is not working… so I executed npm install in directory MMM-PIR-Sensor afterwards. Still not working… After booting, the screen is showing MagicMirror with all modules. After a couple of minutes, the monitor is showing a blank screen with backlight switched on. The module does not cut off HDMI signal and the HC-SR504 does not switch back to MagicMirror. I can not see if the sensor is recognizing me.
“GPIO -v” shows the message "Unable to determine hardware version. I see: Hardware : BCM2835 - expecting BCM2708 or BCM2709. Please report this to project@drogon.net.”. Version 2.25 instead of a newer version is install, even after “npm install wiring-pi”.
I am not sure having configured the module correctly, because as shown above I have connected the sensor to pin22/GPIO25. Is my module setting correct ?
And, the HC-SR504 is offering 2 potentio meters (detection delay/sensing distance) and a jumper (impulse signal permanently or just one). Don´t know what do here:
The mirror is fixed on a wall, where people are crossing several times a day. The mirror monitor should switch on if a person is standing in front of the mirror for about 5 seconds as long as the person is standing there.
Would like to save some energy - some help would be very great… Thanks in advance.