Home Automation is definitely one area of the IoT market that gets quite a lot of attention. You can get your hands on almost any device these days, that has some sort of connectivity feature, aiming to make your live just a little bit easier, or to prevent you from physically getting off the couch to press a button. While the great number of commercially available products definitely cater for most of us, these devices do have a few limitations, and, or, reasons why you would not want to use them. A few of these would definitely be in the following list:
– They are expensive
– You need all sorts of other expensive devices to control them
– You need to install different applications on your mobile device for each type of device
– Your data is stored in the Cloud, and may be used for whatever other purposes by certain third parties…
This does however not have to be the case. Many Open Source Home Automation systems are already available, and although most of then requires quite a steep learning curve to get started, they do provide a centralized platform from which to control most of your commercial devices.
In the Maker World, however, we like to build our own stuff, and although it may not always be cheaper than a commercial product, It usually ends up being something that does exactly what we want it to. The problem with this approach however is that you have to know a lot about electronics and embedded software development to really make a decent device… This is usually not the case with the casual Tinkerer that have a bit of free time on his/her hands and really want to make a device that can do a,b,and c when you do d,e,f ….
In my own case, it usually comes down to not having enough time to do this or that, or quite frankly not being interested enough to have to learn a new protocol or language just for the purpose of doing one particular thing.
Having access to quite a few Raspberry Pi Computers, gathering dust in a box somewhere, I decided to revisit Home Assistant, one of the available Open Source Home Automation projects out there. As I also have access to quite a few ESP32 and ESP8266 devices, the question now arises as to what protocol to use to communicate with Home Assistant… MQTT is definitely the way to go, but while coding each device individually will be a very good idea, it will take quite a lot of time… Enter Tasmota and ESPHome. Both of these frameworks are free, Open Source projects, and equally powerful. They are however quite different.
Tasmota will work straight out of the box, requiring only a few modifications, made conveniently in your web browser. It supports most of the commercial sensors and other hardware out there, as well as scripting and some forms of local automation. You can make changes to the source code and event compile your own custom firmware. It also updates OTA. Easy, but it can consume a lot of time and effort to get it just right…
ESPHome is a completely different animal. You manually write a YAML configuration file, and then the magic starts. ESPHome will generate and compile firmware based on your YAML file, and upload it to the device. Almost the same amount of commercial devices are supported as with Tasmota, but adding custom devices, in my view anyway, is also relatively easy, Providing that you can write some Arduino style code, and knows a bit of C++ …