lucavb / homebridge-hc-sr501

Homebridge plugin for the hc-sr501 motion sensor
GNU General Public License v3.0
10 stars 1 forks source link

No motion detected. #2

Closed SkyJohn closed 7 years ago

SkyJohn commented 7 years ago

I'm not sure what I'm doing wrong.

I installed the plugin and connected up my HC-SR501 to PWR, GND & GPIO24 but I'm getting no motion detection in the Home app.

lucavb commented 7 years ago

Make sure to follow the pin labelling as indicated in this picture . So you want to use 2 for the second pin on the left side, rather than 3.

you may also want to consider the README from the program that interacts with the GPIO pins here

Also make sure that your Raspberry Pi picks up the signal with something like wiringPi. Consider the following commands. The last should return a 1 in case motion is detected.

sudo apt-get install wiringpi
gpio readall
gpio mode 24 in
gpio read 24

Again pay attention to their labelling of the pins. It depends on the application you are using.

SkyJohn commented 7 years ago

I moved data jumper from GPIO24 to GPIO8 and it works fine now, not totally sure why though.