This year I decided to start my own homelab. I’ve got many goals for what I want it to do:

  • Control my smart home appliances
  • Act as a media server
  • Local cloud storage/backup
  • Manage security system

And I’m sure I’ll find more cool things for it to do but to start off I need it to control my smart home appliances. I’m going to Home Assistant. It seems to be the go to for most home automation enthusiasts. This should allow me to fully control everything without having to funnel all my data through some random foreign nefarious server just to turn on my lights. There are several ways to run Home Assistant. There are plug and play mini pcs that run the Home Assistant OS(HAOS). Running HAOS as a VM with Proxmox is a popular option but my ultimate goal for this homelab is to grow it into a small kubernetes cluster. So I’m actually going run it as a docker container.

To start off, my dad gave me an old shelf pc that was collecting dust in a closet. He said it was intended to sit on a shelf and hook to the TV to stream but he never used it that way. For me it’s perfect to start my homelab hobby.

First things first. I installed a new OS. There are a lot of cool options but I chose Ubuntu Server 24.04 LTS. It’s a stable linux distro and I’m familiar it. The installer is simple and self explanatory. It’s booted up and ready to go in 15 minutes. Well normally it would only take 15 minutes. The hard drive was corrupted or something. I was getting errors about the memory addresses pointing out of bounds whenever I tried installing the new os. I had to dd the drive which took almost a whole day. After that Ubuntu installed no problem.

I set it up in a utility room in the basement and I’ll do all the management through ssh. I assigned a fixed IP address through my router’s admin page. I hoped to set up a local DNS through the router but couldn’t get that working. I’ll return to that later. Instead I just added the host to my pc’s /etc/hosts file for now so I don’t need remember the IP address. I generated some keys and used ssh-copy-id to copy over the public key to the server. Now I don’t need passwords to log in.

To set up the Home Assistant docker I followed the instructions here: Getting Started with Home Assistant and Docker. It was really straightforward and helped explained the steps. I’ve tried in the past to set this up but wasn’t able to find a good tutorial. I was lucky to find this one. I also turned my homeassistant directory into a git repo so I’ll have a backup in case I ever need to start over.

Most of my smart devices use the Zigbee protocol which acts as a mesh in the house. So theoretically the more devices I add the more reliable my network should become. In order to control them through Home Assistant I’ll need a few things:

  • Zigbee Coordinator: The coordinator is basically the wifi for the zigbee devices. It sends the signals back and forth from the server and the devices in the house. I’m using the SMLight SLZB-06. It was highly rating when I shopping around on home automation blogs and youtube channels.
  • MQTT Broker: MQTT stands for Message Queuing Telemetry Transport. It’s a lightweight messaging protocol for low-bandwidth and high-latency environments. The broker manages the MQTT messages in a pub/sub model, sending and receiving messages from the devices. I’ll be using a popular one called Mosquitto.
  • Zigbee2MQTT: Zigbee2MQTT is a bridge application that connects the Zigbee devices to the MQTT broker. It translates the MQTT messages of the server to the zigbee signals of the smart devices and vice versa.

To get this working I followed this How to Set Up Zigbee2MQTT with Docker for Home Automation. It was super helpful but it was a little out of date. I found I need to add an extra line to the Zigbee2MQTT config in order to specify the adapter: zstack. This blog post didn’t include steps to connect the Zigbee2MQTT and Mosqitto to Home assistant.

Overall I’m happy with the progress I made this past week. I still need to connect everything to Home Assistant and pairing the devices will be tedious. But after the real fun starts.