Home Assistant for Home Automation
In 2020, we completely renovated our home. During this process, we had the chance to decide which cables to run and to integrate a home automation right from the start. I'm not a big fan of proprietary servers and controls, so KNX and co. were out of the game.
At first, I wanted to run Domoticz, but this one lacked an integration for our alarm system. Finally, I switched to Home Assistant and I'm very happy with it and the vast amount of features it provides.
Network and Network Structure
One of the most important backbones in our home is the network infrastructure. We ran CAT7 cables in all rooms, used them for the light switches (see next section) and for the alarm system (see later section). Orange CAT7 cables are either network or light, blue CAT7 cables are alarm system cables.
Most of the network is run by a TP-Link T-1600G switch which features 48-Ports and PoE+ on every port with a total power capacity of 384W. It's a L2+ switch, so it provides VLAN and some advanced switching stuff. For Internet access, an Ubiquiti EdgeRouter-X powered by OpenWrt is used. All other switches and the WiFi APs are also VLAN capable: That's important, because we defined three VLANs in our home:
- VLAN “Management”: for configuring devices; does not have Internet access
- VLAN “Private”: for all computers and other private, “trusted” devices
- VLAN “Technik”: for all switches, alarm system etc. with “partially” trusted interfaces
The access points (a TP-Link Archer C7 and a TP-Link EAP221) are also powered by OpenWrt and provide two WiFi networks, one bridge to “Private” and one bridge to “Technik”. This way, also the wireless appliances can be added to an “untrusted” network section.
The OpenWrt firewall on the EdgeRouter-X allows or denies access and routes between the different subnets and the Internet.
Regarding the light switches, I wanted a rather simple solution that can be used stand-alone without any dependency on a central server or infrastructure. For half a year we had a ready-made solution (Denkovi smartDEN IP-Maxi), but the system is not very flexible. Plus, since it provides only HTTP and SNMP interfaces, the integration into Home Assistant is also not very tight. Therefore, I went for my own solution based on ESPHome:
I designed a bunch of PCBs and smart home modules, all powered by ESPHome:
- Base Module with ESP32, LAN, two relays, two digital inputs, OneWire and expansion port
- Relay Module with 8 relays
- Input Module with 8 inputs
- Input/Relay Module with 8 inputs and 8 outputs
- Base Module X with ESP32, LAN, 8 relays, 8 digital inputs, OneWire and DMX
All modules communicate via differential i2c, run along +5V over CAT5 patch cables. Everything is nicely integrated into rail mount modules.
For the dimmable lights I use relatively cheap DMX light controllers (2 channels).
For the door bells, I went for a HikVision IP-based system that is entirely PoE-powered. The outdoor module contains the base station, the indoor door stations connect to this outdoor station. The only downside is that the modules do not support DHCP, all configuration has to be done statically.
For better integration, I added a central Asterisk server where all stations connect to. This way, the bell can be forwarded to our smart phones and other VoIP phones.
The newly installed floor heating can be controlled via wall thermostats as well as over IP: The control modules are Möhlenhoff Alpha 2 IP systems that provide an XML interface.
As we have a few older radiators, I installed HomeMatic wireless thermostats, wireless wall thermostats and I'm using Homegear as central coordinator. Homegear provides a CCU interface and is therefore easily integrated into Home Assistant.
As an alarm system, we went for a bus-based Jablotron system. There is a native USB integration for Home Assistant (available in HACS) that works very well. This allows the use of the motion detectors for switching on the lights in the corresponding room using an automation rule in Home Assistant.
433 MHz devices
For the integration of 433MHz devices (e.g. our outdoor wireless thermometer), I built an RFLink gateway - most of the hardware devices were available anyway and the gateway is very inexpensive to build.
Additionally, I'm experimenting with RFLink on ESP8266 and I can receive some 433MHz devices, most notably one Intertechno-based wall switch, via Homegear/CUBe.
We have shutters around the house, driven by Elero and Somfy remotes. For the Elero-based shutters, I did a lot of research and finally went for two Mediola v4 gateways. I got them used for a few euros, each gateway can control up to 15 Elero shutters. As integration, I wrote mediola2mqtt, which makes certain Mediola devices available via MQTT, including auto discovery for Home Assistant.
The Somfy shutters will be controlled by Homegear and one of my CUBes with a 433MHz module. For this, I integrated Somfy RTS into Homegear, currently only available in my github.
Some further devices integrated into Home Assistant are our Neff oven (via Home Connect) or some Gosund wireless wall plugs, the entire SqueezeBox eco system and a few other devices.