I'm going to start an adventure: ESPHome

, 6 minutes to read, 140 views

My Home Assistant is going great. I’m integrating more and more devices — some are easy, some more difficult. I’m integrating devices built by many manufacturers. So far, almost all of them work great, most devices always never drop off the network, and it just generally works1. And having stuff largely just working is pretty cool.

But using devices you can buy off the shelf only goes so far. In fact, it appears some of the most fun things, is using devices you built yourself. I have some friends (most of them working in the same industry as me) that have built their own sensors, that have used a soldering iron for their Home Assistant. And of course, if you are just buying devices off the shelf, you get the devices that are mass market approved, that are built for the average consumer. But if you are building your own devices, you can do whatever you want. So that’s the plan.

This post is part one of a series on ESPHome. This series is documenting my adventures with ESPHome from start to finish, from easy to more advanced. Please find the entire series here.

But let’s start off with a short overview of where I am right now when it comes to the smart home, and more importantly, what my ultimate goal is.

Smart home devices so far

The largest part of my devices are Ikea ZigBee devices. They are pretty cool since they just work. And seemingly, Ikea is pretty good at following the Zigbee specifications. I have some other Zigbee devices, mostly built by the company Sonoff. Sonoff has some of the best temperature sensors in my opinion, and it is quite amazing how well they work, even when only being powered by battery.

I have also connected a bunch of Shelly devices, all of them via Wi-Fi. I think for battery-powered devices, Wi-Fi is not the best idea. Also, the Wi-Fi devices have some limitations, the main problem being that they don’t mesh2. Powered Zigbee devices just extend the network automatically and as such, with having quite a few powered Zigbee devices, the network is super stable.

Finally, perhaps my least stable device is the Xiaomi air purifier. This somehow drops offline every once in a while. But overall, it still works fine, which is the only important thing for me3.

ESPHome plan

ESPHome is a way to build your own smart home devices using ESP chips from Espressif. You can connect your sensors and other things to the ESP chip and then using ESPHome you can flash the firmware. It basically enables you to build your own sensors, without using really any code, all configuration is simply done in some yaml files.

My wish to get into the entire ESPHome thing is mainly inspired by two things. Firstly, I have not found any good sensors that can measure CO2 at home. For me, this would be pretty good, as CO2 is the best indicator for when the air is not fresh anymore, when you need to open up a window and get some fresh air. CO2 sensors are not cheap, not by a far stretch, but surprisingly the good ones4 are more than 200 bucks5, while not even necessarily using the good sensors. The sensors themselves are only about 50 bucks, so not sure what is happening here.

I want to get into it, I am keen to learn how to use and operate the ESP devices. I further also want to get my hands dirty a little. If I get to plug in some cables, maybe even solder, that is a success for me. Here’s my plan:

  1. Buy some finished devices that work with ESPHome.
  2. Buy a development kit, and connect it to a supported sensor. Integrate it as well into Home Assistant using ESPHome.
  3. Print a case of my device built above using a 3D printer6.
  4. Try to design a PCB with the correct ESP chip as well as the sensors I want. Order it through one of the PCB producers online.

As you can see, the first steps are rather easy, and the last one is rather complex. If I manage to get a good device out of it, I will, of course, publish it online for people to order their own (or maybe order from me, but not sure if I want to become an online shop).

Along my experiments that I will conduct for myself here, I will also document them on this blog, filed under the ESPHome tag.

A future outlook on ESPHome

There is a final idea in my head as well, but this might be further in the future than any of my other ideas here. Espressif has a new chip called ESP32-C6 that also supports Thread7 and, most importantly for me, Zigbee.

I think it would also be very cool to build my own Zigbee device. And this chips supports Zigbee and there is an SKD for Zigbee made available as well. The big challenge here is the following, though. ESPHome does not support Zigbee yet, and it doesn’t even support the ESP32-C6 yet. I’m sure support for the chip will arrive at some point, but Zigbee is an entirely different story.

While in theory, with the chip and the SDK all the pieces should be available, ESPHome is an open-source project, so it might take some time for this to be integrated, but that would be super awesome. And who knows, maybe I’ll even be able to contribute some of my programming skills to the project.


  1. As a bit of a caveat, I’m having some trouble with my ZigBee presence sensors. But I’ll figure this out at some point. Actually, I think part of it is the devices and not my network. ↩︎

  2. Apparently the 3rd generation Shelly devices also do some meshing, but so far, I don’t think I have gotten it to work properly. ↩︎

  3. If Xiaomi are as compliant with their air purifier as they are with their Zigbee devices, then this is not much of a surprise. Unfortunately, Xiaomi has a bit of a tendency of not following the standards, at least when it comes to Zigbee. ↩︎

  4. As I learned during my research, good CO2 sensors are NDIR sensors. Many consumer devices do not include such a sensor, as they are pretty expense, but rather a cheaper VOC sensor that is then used to estimate CO2. These values often have a similar curve, but have no connection apart from both being produced by people being there, sweating and breathing. ↩︎

  5. Bucks in this case are probably swiss franc, but it’s comparable to the euro or US dollar at the moment. ↩︎

  6. We have a 3D printer at work that I can use for that. ↩︎

  7. Thread (or to be more precise, Matter-over-Thread) is said to be the future of smart home. It is built in into many Apple devices for smart home applications, including my HomePods and my phone. So far, though, I don’t have a single device that is controlled with Matter, so take this with a grain of salt. I’ll believe it that it’s the future when I see it. ↩︎

Tags: ESPHome, Home Assistant, Smart Home