Home Server (Part 1 of ?)

The purpose of this series is to document what I have done for my home automation, and to also perhaps share some information I’ve learned in the process. This first post is an overview, and the subsequent posts will delve more into the details.

I recently have been working on setting up a home server in preparation for the new home. The goal of this server will be:

  • Central hub for the various home automation components.
  • Media server (music, movies, photos, etc.)
  • Backups repository.

I thought I would write a post on what I’m using to accomplish these functions, and what changes I’ve made on the journey.

This whole endeavor started from multiple needs: a long-pressing need for media storage locally as opposed to the plethora of cloud solutions, a search and discovery of a hub for home automation that was platform agnostic, and the desire to return to running a home server as a playground to learn new tech. I will eventually move this blog to being self-hosted, as well.

Home Automation’s Missing Link

For the home automation piece, I stumbled across this solution called Home Assistant. I can’t remember how I found it, perhaps from a YouTube channel. After learning about it and taking it for a quick test drive on my desktop, I quickly realized that it seemed like the “missing link” of home automation. Home Assistant acts as a central hub, unifying the splintered landscape of platforms that exist in this category. Think of it as a central source for information and control, along with a nice interface. Way more control than IFTTT – which can also integrate with Home Assistant.

Home Assistant’s default install is via SD card to run on a Raspberry Pi, so I grabbed one online and ran through the setup. This was my first experience using a Raspberry Pi, but I’ve been curious about trying one out for a while. These are one of those pieces of technology that can really wow you – on this tiny circuit board runs an entire computing platform. You can even install a flavor of Debian Linux called Raspbian, along with a desktop, and have a fully-functioning computing platform that’s pretty powerful.

Once I had Home Assistant up and running, I spent some time integrating items I had: Amazon Echo, Hue Lighting, Apple TV, the Nest thermostat. I then added some items to pull in data relevant to my location: Weather Underground, latitude & longitude. The list of components that Home Assistant works with is pretty extensive, with new items being added frequently. I built out how I wanted the frontend to present the information to me, and generally started getting familiar with how Home Assistant would work.

Tying Things Together

I started to follow the Home Assistant forums, as well as those related on Reddit. It was there that I learned about Node-Red, a project from IBM that had the ability to make Home Assistant even more extensible.

After installing the package for Node-Red from Home Assistant, I imported the packages that would interface with the Hue lights and created a simple test flow that would operate the lights on or off depending on dusk or dawn.

Here’s where you may question the need for any of this, as the app that Hue has will already handle such scenarios, or perhaps even with using IFTTT. My experience with those has been hit or miss, delays, or not even working. But with the little effort it took to stand up a Home Assistant instance with Node-Red, those handling the messaging and execution made the actions much more bullet-proof and accurate, without the delays one encounters with IFTTT.

After I spent a good amount of time getting familiar with Home Assistant, my mind started turning to grander plans. The little instance running on the Raspberry Pi had been enough to push me towards putting in the work to stand up an implementation in the new home once construction is done and we’re moved in.

I also learned about another way Home Assistant can be installed, managed, and operated: via Docker. This piqued my interest since we’re starting to use this at work, and learning it on my own project seemed like a win-win.

We’re Going To Need A Bigger Boat

With the entrance of Docker, the desire to have a media server and backup storage, it became clear that as powerful as the little Raspberry Pi was, I needed to have a more beefier solution. After reading various threads, I settled on the following hardware to act as the server for Home Assistant and central “brains” of my smart network:

The Intel NUC platform is interesting. A very small footprint, but powerful computer that you add the storage and memory.

My order of installation and setup was this:

  1. Ubuntu 18.04
    1. Create the relevant accounts.
    2. Lockdown security.
    3. Install the minimum packages needed for system administration.
  2. Docker-CE (Community Edition)
    1. Running as it’s own user account.
    2. Install Docker Compose for ease of administering.
  3. Add the Containers:
    1. Portainer – UI for administering Docker.
    2. MariaDB – A database for various needs (Home Assistant, to start).
    3. PHPMyAdmin – UI for administering MariaDB.
    4. ddclient – Tool for updating the Dynamic DNS record with the WAN IP of my network, for external access.
    5. Home Assistant – the Docker container.
    6. Watchtower – A monitor that will update any container if there are any changes.
  4. Future Plans (once in the new house):
    1. Bring Home Assistant fully online with the current smart home solutions I have.
    2. Acquire or create a NAS.
    3. Implement a backup solution (on and offsite).
    4. Integrate the security system.
    5. Setup the Docker instance of Plex Media Server.
    6. Whole-home audio (Sonos? HomePod?)

I’ll run through this list in detail in the subsequent posts.

One Comment

  1. […] As previously posted, the Intel NUC will reside in the rack on a vented rack shelf.  The NUC’s have holes for VESA mounting, and if I can make that work with the shelf, I will. Otherwise it’ll be secured with zip ties.  Next to the NUC will be a Raspberry Pi 3, which will be secured with velcro straps, as this may be moved around depending on the project I’m using it for. (Weather station, camera server, etc.) […]

    Like

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s