Configuration for Raspberry Pi-based relay connected to
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


A Raspberry Pi-based relay that is connected up to The python script is run as a service using Upstart.


The code for including was found here:

Understanding how RPi.GPIO works was learned here:

The inspiration for the base python script I wrote was found here:

Details about how to wire up a relay were also found here:


Install Upstart: sudo apt-get upstart

Follow the installation instructions

Place the python script in the pi home directory

Place the Adafruit APIkey in a files in the pi user home directory called apikey.txt

Place the relayservice.conf file in /etc/init

Reboot the Pi