Skip to content
Dav's LightShowPi Setup
Python Shell JavaScript HTML CSS
Branch: master
Clone or download

Latest commit

Latest commit ef5d2e2 Dec 15, 2019


Type Name Latest commit message Commit time
Failed to load latest commit information.
api fixed status config check Nov 28, 2017
bin more charset issues Dec 15, 2019
patches patches update Nov 20, 2017
.gitignore more cleanup of setup script Nov 21, 2017
.lights.cfg lightshow config update Nov 26, 2017
LICENSE make it so Nov 23, 2016 added script info Nov 20, 2018
crontab.txt Moving crontab to 9am Nov 27, 2017
lightshow-board.png updated with some info on the v3 board Dec 17, 2016 fixed logic of the script self check Nov 20, 2018
shairport-sync.conf reset crontab for 3am and unset drift config Nov 26, 2017
wiring.png make it so Nov 23, 2016

Dav's LightShowPi Setup

Board v2

Parts List



  • Cut the end off the power cable that goes into the computer
  • Strip it and attach a white and black to an outlet.
    • This outlet will be on all the time
    • Use this one to plug the Pi into
    • Put this into one of the boxes and use a single outlet
  • Attach a white wire and run from the main outlet to another in the next box
  • Then jump from top to bottom on all outlets across all three boxes
  • Take a pair of needle nose pliers and snap the clip between the screws on the other side of the other 4 outlets
    • This will make the four outlets turn into 8 circuits
  • Create a looped circuit on the terminal block like the photos
  • Run a single red from each of the load sides of the outlets to the relay
    • Here is where I injected the fuse block to protect the relays
  • Run a black from the relay to the terminal block


Map the pins from the Pi to the Relays, guide here.


Now, install Raspian on your pi, install LightShowPi

Automatic Install/Updates

Last year I added a script to automate the installation of the software and keep it up to date.

After you install the OS from above, simply clone this repo into /home/pi/davglass/ and run ./ It will install a bunch of stuff and you will have a working lightshow as well as my custom additions.


  • Set volume higher on boot
    • sudo crontab -e
    • @reboot /usr/bin/amixer set PCM 95%


This is my default config, it fires up shairport-sync and enables it as an AirPlay speaker. Then you can join it from any iOS device and stream music (Spotify in our case) directly into the lights display.

I also install the shairport-sync-metadata-reader module to grab the music meta data while streaming..

# We are using shairport-sync to setup an AirPlay Speaker
# that we will broadcast our music across, these are
# the settings needed..
mode = stream-in
stream_command_string = shairport-sync -v -o stdout
use_fifo = False
input_channels = 2
input_sample_rate = 44100

My Additions

Copy ./bin and ./api into /home/pi/

mkdir /home/pi/tmp

Add /home/pi/bin/ to your /etc/rc.local

This will fire up the web based API server at: http://raspberrypi.local:8888/


  • /show/start
  • /show/stop
  • /show/enable
  • /show/disable
  • /lights/on
  • /lights/off
  • /controller/cylon
  • /controller/dance
  • /controller/flash
  • /controller/random_pattern

You can (sort of) protect it with a JSON file: /home/pi/.api.json

    "username": "foo",
    "password": "bar"

I added an IFTTT trigger to Alexa that points to my API so that I can turn them on and off with my Echo's.


Create an App, then get your tokens..

Create a file: /home/pi/.twitter.json:

    "api": {
        "key": "",
        "secret": ""
    "access": {
        "token": "",
        "secret": ""

Additional Wiring Diagram from here

Content Licensed BSD, use it as you will!

You can’t perform that action at this time.