Friday, March 11, 2022

About the smart home system

The first important task is to determine how the control will take place. The choice fell on the use of the Telegram API, this makes it possible to control devices simply from the chat. Of course, it was possible to create another application, which would be much more difficult, longer, and more unreliable. Users would have to download it, register, remember passwords. Here are some of the benefits of using Messenger:


  • Security. The account is hopefully protected by Telegram.
  • Convenience. It is very easy to switch from any dialogue to a bot.
  • Cross-platform. One App for Any Device: Supported by Android, iOS, Windows, Linux and more.
  • Availability. You can control your smart home from anywhere in the world where the Internet is available.


The second important task is to define the "brain" of all devices. Here my choice fell on the ESP8266 chip on the ESP-12F board. An important plus is the ability to write code in the simplest Arduino IDE and the presence of the ESP-NOW protocol for connecting devices to each other inside the house. As I found out later, the solution turned out to be quite working, but controversial. I will tell about all the cons at the end of the article.


For convenience, I will first talk about devices, how they work, how the whole system works, and then I will dive into the process of creating devices in more detail and talk about the nuances of the code.


At the moment, several devices have been developed:


  • Miss You Even When We're Together (MYEWWT) watch gate.
  • Smart socket.
  • Smart relay.
  • Wireless touch switch.

IoT and smart home:


There are several options:

  • You just need to turn on and off a couple of outlets. You buy a smart socket from any manufacturer, set up an application, profit.
  • You have a budget and you need a full-fledged smart home with huge capabilities, various sensors, security, fault tolerance, backup power, etc. You apply to the office, everything is created for you on a turnkey basis, profit.
  • You don’t have a budget, but you have in-depth knowledge of the IoT field, you are looking for components, microcontrollers, create code, boards, make an unrealistically cool system that suits you, profit.
  • You do not have the budget and in-depth knowledge of building complex systems, and you want the same wide possibilities.


It so happened that my desires and budget just related to the last point. I saw two solutions:


  • buy devices from one manufacturer, setting up one ecosystem,
  • buy devices from different manufacturers, depriving yourself of the convenience of management, installing several applications, going through the stages of registration, but, more budget.


Due to ignorance of all the subtleties, I chose the second option, and faced a very significant, and as it seems to me now, a very obvious problem: several different applications, registration in each, customization, the inability to combine into one interface, the complexity of interaction.


Now I understand that it was possible to buy devices from one ecosystem, and use it calmly, buying new solutions from the same manufacturer, without experiencing inconvenience. But it turned out the way it happened - I was dissatisfied with the solutions I had and I wanted to create my own. And quitting what you started is somehow not for me.

About the smart home system

The first important task is to determine how the control will take place. The choice fell on the use of the Telegram API, this makes it poss...