Turn a Raspberry PI HDMI screen on/off using a PIR
Switch branches/tags
Nothing to show
Clone or download
martinto Update README.md
Document the PIR wiring,
Latest commit 10c62b0 Nov 25, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial commit Nov 22, 2018
INSTALL Install and run as a service Nov 22, 2018
LICENSE Initial commit Nov 22, 2018
README.md Update README.md Nov 25, 2018
pirhdmi Leave on for two minutes. Nov 23, 2018
pirhdmi.service Install and run as a service Nov 22, 2018
traceit.sh Run using this to trace the running code, handy for debugging. Nov 23, 2018

README.md

pirhdmi

Turn a Raspberry PI HDMI screen on/off using a PIR

This service can be used for any Raspberry PI project which has an HDMI monitor and a PIR; the monitor is switched on when movement is detected and turned off afer a configurable timeout.

Files

File Purpose
INSTALL A script which installs pirhdmi as a service
pirhdmi The service which is run
pirhdmi.service The systemd configuration
traceit.sh Run the script tracing the execution, useful for debugging

The timer is set to two minutes, to change that edit pirhdi and change the global variable ON_TIME to the number of seconds for the screen to stay on once activated.

Requirements

The script is written in python3 and a full install of Raspbian is needed to run it.

PI Wiring

Connect the PIR power to pin 2, ground to pin 6 and signal to pin 7