https://github.com/sensoranalyticsaus/pir_detector
PIR motion detector
https://github.com/sensoranalyticsaus/pir_detector
raspberrypi
Last synced: 4 months ago
JSON representation
PIR motion detector
- Host: GitHub
- URL: https://github.com/sensoranalyticsaus/pir_detector
- Owner: SensorAnalyticsAus
- License: apache-2.0
- Created: 2024-05-03T00:13:02.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-20T07:40:06.000Z (almost 2 years ago)
- Last Synced: 2025-09-25T18:22:08.723Z (9 months ago)
- Topics: raspberrypi
- Language: Python
- Homepage: https://www.sensoranalytics.com.au
- Size: 559 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## About
Python code for HC-SR501 PIR Motion Detector
## Items
* HC SR501 PIR board
* RaspberryPi
* 3 x Dupont jumpers F-F
## Board Settings
To start with, both sensitivity and time delay potentiometers should be kept to the minimum i.e. both turned CCW to 0700 hour position. Trigger jumper should be set to `H` position.
## Wiring Diagram
[https://www.sensoranalytics.com.au/image/shared/WiringDiag.png](https://github.com/SensorAnalyticsAus/PIR_Detector/blob/main/WiringDiag.png)
## Install
* Copy `ctrl-pir`, `driver-pir.py`, and `pir.py` files to `~/src/pir`. Set `LOGFILE` to actual path in `pir.py`.
## Run
`cd ~/src/pir`
```./ctrl-pir start```
## View Alerts
`screen -r pir`
## Issues
Install `screen`. Install missing python packages used by `pir.py`.
## Good Ideas
Adding `ctrl-pir start` to start on boot to crontab. For extra cautious, `ctrl-pir restart` once a day at some off peak hour.
## Phone Alerts and Notifications
Register with [pushover.net](https://pushover.net). Then add your app token and user key in `pir.py` and set `Mute = 1`. Now phone will sound and display notifications.