The concept of a smart home has been popping up more and more in recent years, and for good reason. Numerous smart solutions have entered the market that make our home life simpler and can even help reduce waste or save money. Most multimedia devices, such as phones and tablets, can now easily communicate with other devices like televisions, wireless speakers, and sound systems to send audio or video.
It’s becoming common for the latest versions of household appliances, like washing machines and dryers, to be connected to the internet and notify you when the laundry is done. Motion and light sensors, temperature sensors, humidity sensors, as well as smoke or leak detectors, provide useful information that can be utilized to control heating, lighting, and much more. Smart light bulbs and LED controllers have also become affordable, making lighting one of the first things people tend to automate because it’s relatively easy, and the benefits of the change are immediately noticeable.
Why Automate?
The reasons for automating a home are often personal, and the demands largely depend on where one starts. When I began my journey into smart home automation, I wanted to have control over my own devices and ensure that my data wasn’t scattered across too many locations in centralized hosting with various smart device manufacturers. In addition to wanting to secure my data, I also wanted to monitor and control lighting and heating based on the time of day, temperature, and movement. Over time, my interest shifted to measuring energy consumption and identifying the most energy-intensive devices. This interest is partly driven by the fact that I live in Norway, where electric heating is common and electricity prices fluctuate depending on the season and time of day.
How?
Choosing a System
The system I ended up using is called Home Assistant. The advantage of using it is that it can integrate multiple manufacturers under one system. This essentially means that you can have one hub for Philips Hue, Ikea Trådfri bulbs, and other brands. The same applies to many other devices, and you can see a list of supported integrations here: Home Assistant Integrations.
Note: If you don’t enjoy tinkering with technology, I recommend opting for a ready-made smart system instead. However, it’s likely that this will limit you at some point, as pre-built systems are usually well-defined but can have restricted functionality.
System Experience
I’ve been running Home Assistant in my home for about 2.5 years. I initially hosted everything on a Raspberry Pi, but I quickly gave up on that. One reason was the quality of SD cards, which aren’t well-suited for constant data writing. Another reason was that I was using an old Raspberry Pi 2, which wasn’t powerful enough to run all the services I wanted. I eventually moved everything to a virtual machine and “mapped” my Zigbee and Zwave USB devices to the VM. I ran into issues with the stability of my Zigbee and Zwave mesh networks because the machine hosting the USB devices was too far from the devices I wanted to control. I ended up moving the Zigbee and Zwave controllers to the Raspberry Pi and used it as an edge device. This simply means that the Raspberry Pi is now in the center of the house, and the Zigbee and Zwave networks have stronger connections with each other, making the mesh networks more stable. They’re not disrupted when Home Assistant is restarted due to changes in settings. Since communication with Zigbee and Zwave happens through the Raspberry Pi, it’s even possible to run Home Assistant in the cloud if you want, provided you set up secure communication between the virtual machine and MQTT.
Current Setup
Today, my environment looks like this: I have a home network where users and all multimedia devices (like TVs, phones, and wireless speakers) connect. All Wi-Fi-connected devices, such as smart plugs, electric heaters, thermostats, and dimmers, that don’t need direct interaction with users are on a separate home-IoT network. Regular users can only interact with these devices through Home Assistant. Lastly, I have two USB controllers for Zigbee and Zwave connected to the Raspberry Pi, which shares information from these networks through the MQTT communication protocol. Finally, I have an open HTTPS/TLS port into Home Assistant from the internet, secured with Let’s Encrypt certificates and two-factor authentication.
Glossary
- MQTT: A machine-to-machine (M2M) or “Internet of Things” communication protocol designed to be lightweight. It operates on a publish/subscribe methodology.
- Mesh Network: A network where devices function as routers when powered, helping forward status updates and commands between devices. Battery-operated devices typically don’t perform this function to conserve power.
- Raspberry Pi: A small computer the size of a credit card, available in various configurations based on processor and memory, depending on the model.
- Two-Factor Authentication: A method requiring you to log in with a username and password, plus confirm the login on a device like a smartphone before you can access the system.
- VLAN: Stands for Virtual Local Area Network. This technology allows traffic to be tagged with a specific VLAN ID, separating the traffic and treating it as a separate network regarding firewalls.
- Zigbee: A wireless communication standard used by many smart devices, based on a mesh network. Unlike Zwave, it doesn’t have a strict certification process for devices made to this standard.
- Zwave: A wireless communication standard used by many smart devices, based on a mesh network. All devices must go through a certification process to ensure they follow the standard. This can sometimes make Zwave devices more expensive compared to Zigbee but potentially more stable.