Building a Smart Home - Getting Started with Home Assistant

Why would I start a DIY home automation project?

There is no shortage of home automation platforms. Apple, Google even Ikea has their own. Still, some enthusiasts choose to build their own.

No existing platform is perfect, and as technologists we want to try to push the boundaries of technology. The walled gardens of commercial home automation systems are built to cater to the masses and regardless of which one you pick, you'll invariably find there's something cool that just can't be done.

And then there is HomeAssistant. An open source attempt at a smart home ecosystem. As of today, HomeAssistant has 1454 integrations (which allow the user to easily integrate thousands of web services and physical devices. You want face recognition on your outdoor camera? Sure. Want to use Ikea lights? Certainly. Want to build your own energy meter? By all means.

All this power comes at a cost. While Home Assistant is easy to use, it is hard for newcomers to figure out where to start. The goal of this article is to get you started in the right direction.

Basic setup

To get started with HomeAssistant, you will need the following:

  • A Raspberry Pi computer. Any model newer than 2+ will do nicely. I use the 3+ version, but the additional memory in the 4+4gb version will be useful.
  • A 16gb+ sized SD card flashed with Hass.io. My recommendation is a hiqh quality card meant for repeated recording. Mine is 64gb
  • A USB power supply. Check your Raspberry Pi model specs to find out the right amperage level. 2-3A should do nicely.
  • Something to control, see below.

Lighting control, basic version

For anyone getting into the home automation game, I recommend starting with the Ikea Trådfri products. They are inexpensive, decent quality and well supported by HomeAssistant. You will need:

  • The Trådfri gateway
  • At least one smart bulb. If you just have the one, the RGB version is fun
  • At least one remote control. I recommend against buying any of the spinny cheap ones: They are poorly made, easily broken and unreliable. The 5-button remote is a lot better.

Simply follow the instructions in the Ikea smart home app to set up your gateway and pair your devices to it and soon your Hass.io should notice the gateway and prompt you to enter some info to start building more advanced control.

Schuko outlet and Type2 male connector

Photos by: Bran and Paul Sladen

Lighting control, advanced version

Industrial 3-phase power connectors

Photo by: Bahntech, under CC BY-SA3.0, edited

After a while with the Ikea gateway you start noticing it's limitations. Although the 5-button remotes are nice, you'd also like to use them to control non-ikea things, like maybe start some music? Or maybe you'd like to use the motion sensors to trigger different lights during the day and night?

The problem with the gateway is, that not all signals from the Gateway to Home Assistant, making it impossible to react to some events. There are hardware hacks like removing the LED from an IKEA bulb to make a device which a button controls, and use the gutted bulb's state in Home Assistant. To me this feels a bit silly, we are fixing a software problem (lack of signals) with a hardware device to represent those signals.

Ikea uses Zigbee LightLink on it's devices, which means we can also use other LightLink devices to control them. Turns out there is an open source project called Zigbee2MQTT, which turns the inexpensive CC3310 Zigbee sniffer into a powerful Zigbee network controller, which you can simply plug into your Hass.io computer.

Fair warning, Zigbee2MQTT can be a bit fiddly and you should only go down this route if you are willing to suffer the occasional problem.

General tips and tricks

General tips and tricks

  • Use Hass.io over bare home assistant. They are the same thing, except that hass.io's container architecture also allows you to install more complex additional software as add-ons, which make life much easier.
  • Build your automations with NodeRed instead of HomeAssistant's automation feature. Node Red is a lot more powerful, and you can install it as a hass.io add-on, meaning it will come with all of the nodes needed to work with HA.
  • Ariela is a great mobile app, which also comes with device tracking abilities (so you can make your lights turn off when you leave, or arm your alarm system).
About the Author

Visa Parviainen

A technologist with a passion for business. Visa has worked with Global-100 giants and startups alike to create software, hardware and services.

Visa Parviainen