EspRelay project is a very simple IOT project to control a relay by MQTT messages.
Because of the OTA update you need ESP01 with 1MB flash (ESP01S)! In this example I used a 5V usb light. This is my way, you can choose yours. If you don't know how does it work, please don't use it.
For the first upload you will need an ESP01 programmer, i used this:
More info: https://www.diyhobi.com/flash-program-esp-01-using-usb-serial-adapter/
https://github.com/VorosEgyes/espRelay-ESP01S
Edit your platformio.ini file and make your first upload.
Copy and paste the content of the src\main.cpp into a new Arduino IDE sketch and copy the config.h file in your saved ardunio file. In the Library Manager you have to install:
Please edit your config.h according to your parameters.
After your first upload search for EspRelayAP wifi network, and in the browser choose your LAN. Further help: https://github.com/tzapu/WiFiManager#how-it-works
Commands: