Home Automation Setup (Approx. 2017)



This is a short retrospective post on my home automation setup back in undergrad at MSOE. Unfortunately this was not well documented, but it was an interesting start to my home automation tinkering, so I feel it’s worth mentioning.

There were two projects that I worked on with my roommate: the overhead LED lighting and the accent LEDs around the window.

Overhead LED Lighting

Hardware-wise it was composed of several LED strips (that we inherited from the previous tenants), a 12V power supply, a transistor switcher board, and a BeagleBone single-board computer connected to the local network for control.

Picture of the LED strips in action. The top run only looks purple because of the viewing angle; they were all set to the same color. All LED strips were dumb RGB controlled by a single switcher board.

Switcher board with +12V in, several power transistors to sink the RGB LED lines, and a level shifter to convert (and isolate) the control signals into switching signals. Barely visible is an Arduino used for testing the system.

My roommate spun up a simple server to control the RGB channels. It was his BeagleBone, so that half was his to own. The API was about as simple as it gets: GET /lights/set?r=&g=&b= and GET /lights/off on the local network. I wrote some demo control code on top of this API; the demo effects repo is on GitHub.

The coolest part in my opinion was writing a wrapper around the Yahoo Weather API to generate a few different flashing/pulsing patterns, which I never finished. The wrapper worked (look up the location, pull the forecast) and I had the full table of Yahoo’s weather condition codes copied into the script, but every effect function under it is still a pass stub. Not that it matters much now, Yahoo shut that API down in 2019.

The number one challenge was color balancing. The LEDs heavily skewed blue/green with a weak red channel. Setting 0xFFFFFF produced a distinctly off-white result. I ended up scaling each RGB channel separately in the color wheel code and adding a brightness curve to the rainbow effect to even it out. The curve was tuned in Excel.

Accent LED Lighting

At the old MSOE apartment, we also installed some accent LEDs around the living room window. These were controlled via an IR remote. However, we wanted to automate them to fit in with the main overhead LEDs.

Using an ESP8266, I built a simple web service that mapped the IR functions almost one-to-one onto RESTful HTTP operations. The ESP then had an IR emitter aimed at the LED controller’s IR receiver to blast the mapped NEC commands. Thankfully there was a library that worked out of the box for that part.

I eventually gave this project a full write-up in Giving an IR LED Strip a REST API. The code is in the LED-Service repo.

Final Remarks

Per usual, I did not bring these projects to a completed state, but I feel like I still managed to build something interesting.

The overhead LEDs required dealing with a bit more current than I had experienced with my robots or coursework. Several runs of dumb 12V strip adds up to a few amps, so I had to select good power transistors to do the job and then solder the board together. Wiring-wise it turned out a lot better than some of my old robotics (wiring rat’s nest) projects.

The ESP8266 project let me sink my teeth into an embedded HTTP REST service, which was a novel thing for me at the time. Looking back, it is also a bit funny that my roommate put a REST API in front of the ceiling LEDs and then I turned around and put one in front of the window LEDs. I feel like this was the first firmware I wrote that I would not be embarrassed to show someone (the bar was low, but I cleared it). The full write-up goes through it.

The next chapter of this saga is Home Automation Setup (2022), where the setup moves to a different apartment (California this time) and gets a lot less hand-built.