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.