Like many people I know these days I have an unnecessarily complex home entertainment system which has over six separate devices. For the last number of years I have been using a Logitech Harmony remote control to avoid the inevitable eyesore of numerous marginally functional remotes dumped around my living room. A recent addition of an Amazon Fire TV which uses a wifi remote has made the Logitech Harmony remote control redundant.
To fix this problem I could invest in a newer harmony for around 200 euro but instead I attempted to come up with another needlessly complex solution using a Raspberry Pi, an Infrared transmitter and a pretty basic iPhone app.
The first task was to record each of the remotes I currently use using LIRC (Linux Infrared Remote Control). This involved wiring up a infrared receiver to the Pi and creating separate configuration files for each remote.
I then gave both the Pi and the Amazon Fire static IP addresses on my home network. Using Android Debug Bridge I could then reliably connect to the Fire and control it using the ADB shell.
Once this was up and running, I had full control over all of the devices in my living room: LG television, Onkyo receiver, AppleTV, UPC receiver, XBOX and Amazon FireTV.
I then set up a simple server on the Pi using Lighttpd. This allowed me to send commands to the Pi from any device via the Pi’s static IP address. I wrote a basic python script to parse the requests and run the appropriate remote command.
Below is a simple test of the Lighttpd server controlling some LEDs.
Finally I created a simple iPhone app to run the commands. My knowledge of the iOS environment is pretty limited but it was a good challenge to get this simple app up and running.
There is more work left for me to do on this project, mainly expanding out the functionality of the App. Also, I would like to turn the system into a fully fledged API and to be able to accurately record the state the system in some sort of table (for example, the volume level of the receiver, default volumes for playing music, etc.). There is a lot of scope with this project and although most of its been a fudge and a hack its been a great learning experience!