Home Assistant: ten years of privacy-focused home automation
Many home-automation devices come with their own mobile app or cloud service. However, using multiple apps or services is inconvenient, so it's (purposely) tempting to only buy devices from the same vendor, but this can lead to lock-in. One project that lets users manage home-automation devices from various vendors without lock-in is Home Assistant. Over its ten-year existence, it has developed into a user-friendly home-automation platform that caters to both technically inclined and less tech-savvy people.
In 2012, while finishing his master's thesis, Paulus Schoutsen purchased a Philips Hue starter kit consisting of a hub and three light bulbs. When he discovered that the hub had a local API accessible over the network, he wrote a Python script to control the light bulbs. Then he wrote a script that would turn on the lights at sunset, but soon he realized that the bulbs would turn on when no one was home. To address this, he developed a script that logged into his WiFi access point to detect connected phones and used this presence-detection as a condition in his light-automation script.
Recognizing its potential usefulness for others, Schoutsen refactored the code and made it configurable so that users would not have to write Python code themselves. On September 17, 2013, he released the first version of his Home Assistant project to GitHub. He started promoting it on the r/homeautomation subreddit whenever people sought advice on automating their homes; the project gained momentum as the community expanded and more developers contributed.
Today, Home Assistant is the second most actively developed project on GitHub. According to "The state of open source on GitHub" from 2022, Home Assistant ranked second in terms of the number of contributors (13,500), had the highest contributor growth among GitHub projects (3,300 new contributors in a year), and was the second most popular project for first-time contributors (2,600 developers making their first contribution on GitHub).
The core idea behind Home Assistant remains the same as its initial release: an open-source (Apache-licensed) hub to control various home-automation devices. It supports over 2,500 integrations that allow it to connect with devices and external services. Home Assistant can be installed on a Raspberry Pi or any other computer, preferably a dedicated system to provide a stable and reliable platform for home automation.
From tinkerers to non-technical users
Although Home Assistant initially targeted technically inclined users who enjoyed tinkering, the project's focus has shifted toward making home automation accessible to the general public. In 2017, Pascal Vizeli recognized the need for a simplified installation process after family members approached him for guidance. This led to what is now known as Home Assistant Operating System (formerly known as "Hass.io"). It is based on Buildroot, a tool for creating embedded Linux systems, and it runs Docker as a container engine. Vizeli also developed Home Assistant Supervisor, which manages Home Assistant Core (the actual Home Assistant application) and Home Assistant add-ons in separate containers.
Home Assistant Operating System became the recommended installation method for Home Assistant so that users no longer needed to run a series of command-line instructions to install the software. Instead, they could simply download an image, start it on a supported computer or a virtual machine, and use the web-based configuration wizard. Users no longer need to manage a Linux system: Home Assistant Operating System can be easily updated from the web-based interface. This broadened the appeal of Home Assistant beyond the small community of technically inclined home-automation enthusiasts.
Similarly, the introduction of add-ons made life easier for many users. A Home Assistant add-on is essentially a Docker container with another application running in it. In 2017, Franck Nijhof began developing add-ons to integrate a wide range of applications into Home Assistant. Users can now easily install the Mosquitto MQTT broker, an ACME client for obtaining TLS certificates from Let's Encrypt, a DynDNS client for updating public hostnames for dynamic IP addresses, a terminal or editor integrated into the web interface, and much more. These add-ons can be installed and configured directly from Home Assistant's web interface.
Home Assistant has also made strides in simplifying configuration. In its initial years, configuration was mainly done in YAML files. When LWN.net reviewed Home Assistant three years ago, the article showed a couple of YAML code examples. However, in recent years, more and more parts of the configuration are possible using the graphical interface. Although YAML is still required for some advanced features, Home Assistant has transitioned away from YAML-based configurations for integrations that communicate with devices and/or services.
This shift initially proved controversial among technically inclined users who favored code-based configurations. However, the Home Assistant developers aimed to attract a broader range of users by prioritizing ease of use. The ultimate goal is to make privacy and independence from cloud-based home-automation systems accessible to everyone.
But focusing on this user-friendliness makes the system less flexible for tinkerers who want to make their own decisions. For example, for the last few years Home Assistant has supported the two most recent upstream Python versions. This policy was changed earlier this year to support only the latest upstream version. Because 96% of users run one of the project's pre-built containers, the Home Assistant developers only need to develop and test their code against a single version that gets shipped in the container image. However, that forces the 4% of users installing Home Assistant Core in their own Python environment to upgrade their Python version at least once a year.
Corporate backing
For many years, Home Assistant had a biweekly release schedule, but the developers started to burn out from this frantic pace. So, to ensure the sustainability of Home Assistant's development, Schoutsen, Vizeli, and Ben Bangert established a company called Nabu Casa. Initially, Vizeli became the only one working full-time on Home Assistant at Nabu Casa. Five years later, the team consists of almost 30 people who are publishing a new Home Assistant release every month.
Nabu Casa is financially stable without external investors; it derives its revenue from subscriptions to Home Assistant Cloud, which is a service to provide secure remote access to the user's Home Assistant installation. Home Assistant Cloud operates as a proxy server using end-to-end encryption.
When users enable Home Assistant Cloud on their instance, the latter connects to one of the proxy servers. When the user later visits the instance's URL in a web browser, the proxy server identifies the hostname from the incoming request using the Server Name Indication (SNI) extension of the TLS handshake. It then forwards the request to the corresponding Home Assistant instance. The source code for the SniTun proxy and the hass-nabucasa cloud integration in Home Assistant is available under the GPLv3.
In 2021, Nabu Casa took over development of ESPHome, a build and deployment system that allows users to configure ESP32 and other microcontroller boards without having to program. Users simply write YAML files that describe the components connected to the board's pins. ESPHome then builds the firmware based on this configuration, enabling LEDs, buttons, sensors, and more to communicate with Home Assistant over a WiFi connection. Since Nabu Casa took over ESPHome's development, the project has adopted the same monthly release cycle as Home Assistant. And last year, Nabu Casa employed Michael Hansen to keep developing his open-source voice assistant Rhasspy.
The Open Home
The Home Assistant project always has been about more than just software. It is driven by Schoutsen's vision of The Open Home, which is built upon three pillars: privacy, choice, and sustainability.
Privacy means that a home should be a safe space where individuals can be themselves. In the vision of the Open Home, devices function locally without requiring a connection to an external server. No information about local actions, such as turning on a light bulb or adjusting a thermostat, should be transmitted beyond the home environment. If a product offers cloud connectivity, it should not be necessary for the basic operation of the device and should not be enabled by default. Many of Home Assistant's integrations use local APIs for device interaction.
Choice involves allowing users to select the devices that best meet their needs without restrictions. Users should not face lock-in, and manufacturers should not limit access to device data. Home Assistant enables users to mix devices from various manufacturers and use different home-automation protocols at the same time, including Zigbee, Z-Wave, Matter, Bluetooth, and more. All device data is collected locally by Home Assistant and doesn't leave the user's home. But, if users choose to incorporate devices that rely on cloud-based APIs, they have the freedom to do so using Home Assistant. Nabu Casa also offers an easy way to control Home Assistant with the cloud-based voice assistants from Google and Amazon for those who want this.
Sustainability revolves around creating a smart home that stands the test of time. Devices installed in a home should continue to operate seamlessly for many years. The sustainability goal was improved with the introduction of the energy dashboard in 2021. This feature provides graphs displaying energy use, solar panel production forecasts, and more. With this information, users can optimize the charging of electric cars or bicycles to those times when enough solar power is being generated.
The Home Assistant developers actively advocate for the principles of the Open Home when engaging with home-automation vendors. For example, when the Philips Hue hub started blocking third-party light bulbs, Schoutsen discouraged people from buying into the Philips Hue ecosystem. A few days later, Philips reversed its decision and announced a software update to allow third-party light bulbs again. When Insteon abruptly shut down its cloud servers, Schoutsen provided guidance on how users could still talk to their devices locally and announced an improved Insteon integration in Home Assistant. Most recently, when Signify (the new name for Phillips Lighting) announced that it would soon start forcing users to create an account and upload their data to the cloud, Home Assistant's founder contacted Signify to voice his concerns.
Conclusion
Home Assistant is more than just a home-automation-software project. It represents a movement that advocates for privacy, freedom of choice, and sustainability in every connected home. The project has an active user community, offering a forum, a Discord chat server, and the Home Assistant subreddit to get in touch with other users. There's also extensive documentation. While it may not yet be as user-friendly yet as some closed ecosystems with tightly integrated devices, Home Assistant is steadily progressing with each release.
| Index entries for this article | |
|---|---|
| GuestArticles | Vervloesem, Koen |