espRelay - ESP01S relay controller

EspRelay project is a very simple IOT project to control a relay by MQTT messages.

Functions

Hardware

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.

relay

soldering1

soldering2

For the first upload you will need an ESP01 programmer, i used this:

ESP01programmer

More info: https://www.diyhobi.com/flash-program-esp-01-using-usb-serial-adapter/

Software

https://github.com/VorosEgyes/espRelay-ESP01S

Platformio IDE

Edit your platformio.ini file and make your first upload.

Arduino IDE

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:

config.h

Please edit your config.h according to your parameters.

Wifi

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

Example

Commands: