Falling down the rabbit hole with Unifi

15 Mar 2020

Back in 2014, I was forced to learn networking really quickly. We were scaling our company and our IT “system” (an old Linksys router) couldn’t keep up.

We looked at third-party IT providers but we were cash strapped and couldn’t afford any of their services. We also had a growing amount of custom-built equipment on our network and the third-party providers were flat-out not going to support it.

We then looked at the gold standard - Cisco. They were shockingly expensive, had clunky UIs (at that time), and were clearly overbuilt for what we needed. We had a router burn out on us but that didn’t mean we were suddenly a large enterprise.

Looking around the market at that time, we found Ubiquiti and their EdgeRouter system. They were targeting the “prosumer” market, which seemed perfect for our one-step-above-home-router situation. We found the IT closet in our office and installed our first system.

Little did I know that this little upgrade would lead me down a massive rabbit hole.

First, we saw that Ubiquiti offered a camera system (still a predecessor to Unifi). We installed a couple around our labs, as it just made sense to have 24/7 coverage in lab space.

I even made a Blender render of our floor plan💬If the only tool you have is a hammer, then every problem looks like a nail. and put it into their UI.

This was the early days of Ubiquiti PoE and they only had “passive PoE”. They just pushed voltage across the unused twisted pairs in an ethernet cable, which was simple but prone to damaging equipment, connectors, and fingers.

They chose 24V for their passive PoE, which just happens to coincide with the industrial equipment power standard. This led to a question that maybe I shouldn’t have asked: can we power all our industrial equipment on PoE?

Turns out the answer is yes… if you’re willing to learn how to make your own PCBs.

What followed was months of PoE’ing all the things with custom PCBs💬Shout out to Fritzing as a great proof-of-concept PCB CAD project. I eventually switched to Eagle but Fritzing really lowered the learning curve., accentuated by the occasional spark to remind us that passive 24VDC power is not a great standard.

Did we need to do this? No, not really. It cleaned up our wiring and opened up precious fume hood electrical outlets, but I’m sure a power strip would have been just as effective as dozens of custom PCBs.

Did we have fun doing this? Absolutely.

At this point, the company was growing and we were in way too deep with Ubiquiti. As their Unifi line was picking up steam, we made the switch and never looked back.

Unifi’s product line was chaotic at first, with multiple attempts at industrial switches (we tried them all) and awkward transitioning from 24VDC PoE to real spark-proof PoE.

We stuck with a small subset of their switches and access points to handle Ubiquiti’s tendency to move fast and break things on the software side. We figured their popular equipment would be less susceptible to their bugs.💬While we were technically right, we still have to fight bugs all the time. I’ll join the rest of the community in saying that Ubiquiti needs to respect its stable branch.

We also needed to hook up a lot of computers to run our computational simulations. Early NuMat, we home built a rack of desktops to serve as our cluster.💬We were also early adopters of IPython/Jupyter notebooks and made heavy use of ipyparallel to run simulations in notebooks. I even set up my android phone as a compute node. It was really cool. With all this networking infrastructure, it was time to grow up and get proper rackmount servers. I still wanted to keep the “fun” part of all of this alive so we went with System76. We really enjoyed the bare metal feeling of working with this company and would recommend them to anyone looking to home build something.

We even got in a GPU server for hosting dozens of virtual machines. That was a very fun project in of itself.

With all this hardware, we needed better power stability. We went with UPS’s, buying way too many TrippLite and APC power supplies. However, we couldn’t keep well enough alone and wanted to do more with this. We wanted to read and log our power stability, and then we wanted to be able to send out text alerts whenever primary power failed.

The available drivers were too unix-y💬Too many config files in too many high-level directories. and we just wanted to read a few batteries. We ended up rolling our own driver, because, once again, it’s fun. We were also going ham on custom drivers at the time so adding one more to the queue wasn’t a big deal.

We built a web UI off of this, deployed it on our Docker swarm, routed through nginx and our OAuth layer, and still use it to this day.💬Yes, we also grew up on our deployment.

What started as a single EdgeRouter turned into nearly 100 switches and access points, thousands of clients, and years of enjoyment.

When it came time to install a network in my new home, I knew there was only one choice. I was going to irradiate my city block with gratuitous amounts of wifi.

I bought a Unifi gateway, PoE switches, in-wall access points, a long-range access point to hit the garage, and cameras for when we’re out of town. I grabbed a 1000ft spool of shielded CAT6 cable, impressed/bored family and friends with my ability to crimp an RJ45 in under a minute, and got going. It worked surprisingly well the first time and now we have gigabit wifi that will follow us down the block.

Unifi is a years-long rabbit hole, but it’s a great one to fall down. I’d recommend to anyone interested in taking the time to learn how to improve their internet.