How about some mood cool lighting in your house powered by a Raspberry Pi? All you’d need is an AndyPi PixelLights strip (or compatible WS2801 RGB LED strip). Our first tutorial controlled the lights directly using python, but for this one we do need to do any programming – just install hyperion on your raspberry pi and android device.

1. Hardware Setup

Firstly wire up your PixelLights to your Raspberry Pi as follows:

Raspberry Pi (any model)
AndyPi PixelLight Strip (WS2801)

PixelLight       ===   Raspberry Pi
+5v                  ===   +5v (pin 2)
GND                ===   GND (pin 6)
SI (DATA)        ===   MOSI (GPIO10 – pin 19)
CK (CLOCK) ===   SCLK (GPIO11 – pin 23)

IMG_20150410_204000771

2. Install Hyperion and other packages on your Raspberry Pi (tested with Raspbian Februaury 2015)

Firstly we need to enable SPI (a hardware protocol). To do this, open the configuration program (sudo raspi-config). Go to “8. Advanced options” >> “A6. SPI”, and answer yes to enable the SPI interface. You’ll then need to exit and reboot. Next, at the command line on your Pi, enter the following to download and install hyperion. I’m assuming your Pi is connected to the internet, and your android device connects to the same network (probably your home wifi router)

sudo wget -N https://raw.github.com/tvdzwan/hyperion/master/bin/install_hyperion.sh
sudo sh ./install_hyperion.sh

We need to set up the configuration file. There are some specific details here, but if you are using the AndyPi PixelLights you can just replace the standard file with the one from our website:

sudo cp /etc/hyperion.config.json /etc/hyperion.config.orig
sudo rm /etc/hyperion.config.json
sudo wget -O /etc/hyperion.config.json http://andypi.co.uk/downloads/hyperion.conf.json

You can test everything works by running this command, which should set all LEDs red for 5 seconds.

hyperion-remote –priority 50 –color red –duration 5000

Next find out your Raspberry Pi IP Address – you’ll need this for step two. Run the following command and look for inet addr:

ifconfig

3. Install the Hyperion client on your Android device

Go to the google play store and install the app called “Hyperion Free”. When it has been installed, we need to set it up to user our Raspberry Pi. Go to menu (the three dots in the top right) >> Settings >> Add Server. Type in a useful name and the address is the IP address of your Raspberry Pi. Leave the port to its default setting. You should now be able to connect! The colour wheel allows you to set the PixelLights to a fixed colour, and the effects give you a few options for swirls, strobes and colour chasers.

 

Notes: Hyperion reference page on GitHub: https://github.com/tvdzwan/hyperion/wiki/installation