How I got into home automation.
I have been eyeing the Home Automation Operating System for a while, so I decided to just try it out and see what it can do.
Initially, I was expecting that only a handful of devices would be supported and the integration would be tedious, but I was pleasantly surprised by the repertoire of brands and protocols supported.
Project 1
My first idea was to control a fan with a smart plug, which I already had and operated only using the vendor's app. Since it also measures electricity usage, I planned to integrate this data into HAOS and create a dashboard showing the electricity consumption of the household converted into the local currency. I bought some more of these and set them up, though the integration was not as smooth as I expected. It turned out that even though the devices support the Matter protocol, it only transmits consumption data over the API, which can only be accessed through the distributor. I had to create a developer account and connect it with my customer account holding the registered devices. They give you 30K API calls in the free tier each month, which seems generous at first, but I had to realise that I could burn through them quite quickly. I could not last till the end of the month, even with the longest allowed polling interval (it is also limited, according to my knowledge). There are some options still left to decrease the number of calls even more, which I haven't explored yet. Nevertheless, this is a great feature since you can, by integrating Electricity Maps with HAOS, you can view the carbon footprint of your energy consumption, etc.
Project 2
My next target was the IP camera I use to monitor the front door. The integration was much more straightforward in contrast with the smart plugs. I can view and control the camera from the web interface. I haven't gone further with this yet, but it might be useful in the future. For example, to trigger events when someone enters the apartment, etc.
Project 3
With the recent heat dome tormenting Europe, my next hot topic (pun intended) was connecting the HVAC with a fan and controlling it based on readings from a thermal sensor.
After researching the market, I found that the cheapest sensors are the ones speaking Zigbee. I did not have prior experience with this protocol, but I knew I would have to set up a hub to communicate with the devices. I wanted to stick with TCP/IP for now, but I could not find a simple, affordable sensor. All of the IP-based ones were quite overpriced with fancy displays and functions I did not intend to harness.
I finally came across the ESP8266. It was originally designed to be a wireless add-on for the Arduino, but soon some hackers realised that it had some decent specs on its own to be used as a standalone microcontroller, and they started writing custom firmware for it.
You can conveniently flash an initial firmware using this website: https://web.esphome.io/. You can then connect it to your WLAN either using this site or by connecting to the hotspot of the device and opening 192.168.4.1. After that HAOS will automatically recognise the board.
I picked up a GY-BME280, which is a sensor measuring temperature, humidity and air pressure. I went with this model, mainly because the pins on it are in alignment with the ones on the microcontroller, as you can see in the picture below.
I was hoping for a smooth assembly, which turned out to be a multiple-session hands-on training about the basics of soldering, taught the hard way.
The main takeaways here were:
- Solder attracts to the hottest surface.
- Use a solder containing flux.
- Heat the component to be soldered and touch the solder fuse to that.
- Don't melt the solder on the soldering iron, and try to jiggle it to the target.
You can find good videos on YouTube about this, but practice makes perfect is cumulatively true in this case.
My original idea of soldering the sensor directly on the spikes shared by both circuits turned out to be suboptimal, as I did not account for the excess heat produced by the Wemos board.
I created a second design with more distance between the controller and the sensor.
These are the finished, working products (I need to work on my soldering game for sure)
As mentioned above, I had to apply an offset of 3 degrees Celsius to the first design in the firmware manifest.
esphome:
name: homero-nappali
friendly_name: homero-nappali
min_version: 2026.4.0
name_add_mac_suffix: false
esp8266:
board: d1_mini
# Enable logging
logger:
# Enable Home Assistant API
api:
# Allow Over-The-Air updates
ota:
- platform: esphome
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
i2c:
- scl: D4
sda: D3
id: i2c_1
scan: true
sensor:
- platform: bme280_i2c
i2c_id: i2c_1
address: 0x76
update_interval: 60s
humidity:
id: sensor_bme280_i2c_1_humidity
name: Humidity
pressure:
id: sensor_bme280_i2c_1_pressure
name: Pressure
temperature:
id: sensor_bme280_i2c_1_temperature
name: Temperature
filters:
- offset: -3.0
id: sensor_bme280_i2c_1
What comes next
Since now I have some hardware I can play with, it is time to create workflows to trigger events based on the measurements and data coming from the devices.
I hope this short introduction has whetted your appetite for home automation.
List of technologies involved
HAOS: https://developers.home-assistant.io/docs/operating-system/
Smart Plug: https://www.alza.sk/imou-by-dahua-ce2p-d12812182.htm
Electricity Maps: https://app.electricitymaps.com/map/live/fifteen_minutes
IP Camera: https://www.alza.sk/tp-link-tapo-tc70-d12370226.htm
Microcontroller: https://modulshop.hu/wemos-d1-mini-v30-esp8266-iot-722?keyword=wemos
Sensor: https://modulshop.hu/gy-bme280-nyomas-para-es-hofok-szenzor-3-in-1-5v-690?keyword=bme%20280