Making my home smart

Making my home smart
Photo by BENCE BOROS / Unsplash

While browsing the web in search of improvements for my Smart Home - which I already outfitted with some Nest devices - I regularly stumbled across a software called Home Assistant. Now, I like Google’s lineup of devices, but I always had the urge to make everything work more local - or, at all. For that, I needed a RaspberryPi (or an Intel NUC 🤷) but unfortunately, there was (or is) a rather big chip shortage. The search went on, and after a couple of months, I found a kit that included a RaspberryPi 4B 2GB, a case, a power supply, and an SD Card for 83€. A far better deal than paying 150€+ for the Raspi alone - if a supplier even had it at all.

Why Home Assistant?

I am well aware I cannot glance over the fact I chose Home Assistant. Yes, there is Open Hab for example, which also looks pretty interesting, but the sheer amount of forum posts and the overwhelming activity of the HA community were the two most important factors why I wanted to use HA. I am patient when it comes to fixes, but engaging in some discussions about bugs is always worth it.


This part was quite simple. (which is the Operating System of HA), has all features available to you out of the box. And after flashing it to an SD Card and waiting a couple of minutes, I was able to create my account on my new local HA instance. To my surprise, it automatically saw some devices in my network: it imported all Cast devices (Google Home, Nest Hub 2nd Gen., Chromecast Audio, Android TV) and my Philips Hue setup (7x GU10 Color Bulbs, 1x E27 Filament Bulb).
My Girlfriend and I also installed the Home Assistant mobile companion, which gives information about the phone's status and location. For that to work though, I had to set up an externally accessible URL. I went with the setup for Cloudflare: Add a subdomain, proxy it through Cloudflare, open a port on your LAN and configure HA to only accept external connections that were signed by Cloudflare's client certificate. And at that point, I was ready to go.

But what to do?

Finding use cases for routines becomes quite a time-eater. When thinking about your daily routines, you will most probably miss a lot. That's why, over several days, we both observed what we were doing.
I, at least, have a standardized wake-up routine and implemented that into HA: When I dismiss my alarm in Sleep As Android, the app sends a message to the MQTT broker running on Home Assistant. Home Assistant processes that message and triggers an automation, which waits for me to activate the motion detector in the corridor. The lights in the kitchen greet me with soft yellow light and, 15 seconds later, the Nest Hub starts playing the news ("Tagesschau in 100 Sekunden"), the URL of which is grabbed from an iTunes Podcast feed.


Location is key

Remember the home assistant companion app? This app sends rough location estimates to Home Assistant in the background. With HA having support for zones, one can easily add geofences for every important place. If my girlfriend or I enter the home zone, an automation is triggered, which (again) waits for the motion detector to trigger. If that happens, HA knows that we entered the apartment (after being away), checks the brightness level of the LUT sensor built into the motion detector, and turns on the lights if it is below a certain level. After that, the Nest devices will activate and say a semi-random phrase to welcome us and tell us the temperature inside. The speech is generated with Google's WaveNet, which has a free quota of one million characters a month. Pretty nifty.


Of course, we're also using location data when we're leaving the home zone. The apartment will go into standby mode, shutting off all lights, the TV, and end casting.


As you might have noticed, there is one thing that all these Automations have in common. They do not require user interaction or a change in their behavior. Now, this is important, because humans are unreceptive to changes, especially right after waking up early in the morning.
I do not want to talk to my smart speakers and I do not want to have to press a button for something obvious to happen. A smart home, at least for me, is defined by the fact that it knows what you are up to and prepares for that to happen.
The fact that my girlfriend and I both used Sleep As Android before we got HA was lucky and enables us to do many things that wouldn't be as easy to integrate otherwise.


One thing about our setup is expandability. We got two light strips, for example, one from Philips Hue and one from a German retailer. Despite the price difference, both connected fine to the Hue Bridge via ZigBee.
The same applies to smart plugs: One from Hama, which works with Tuya, and one from Lidl, which talks plain ZigBee. Although Tuya doesn't communicate via ZigBee, it was easy enough to integrate it into Home Assistant instead of Hama's platform. With voice recognition, depending on who is speaking, "turn on the computer" results in one device turning on accordingly.

For better or for worse, a ConBee Stick is most definitely the way to move forward. With that, we can link some devices to Home Assistant directly and put a vibration sensor into our letterbox, to automatically receive notifications if we got mail.


One of the best methods of building your smart home is to consider simple devices to be a source of data. You do not need to buy into an enormous ecosystem with HA, but rather use small parts of your home to make something incredible.
Likewise, you don't need a smart washing machine to know when it's finished. Just put a smart plug with a power meter between it and the socket and monitor the usage. HA can do the rest.

Nevertheless, things can break. With all the integrations and regular updates Home Assistant has, breaking changes are to be expected every month or so. Building your own smart home is getting easier, but it will require motivation to tinker.