Single Channel Relay Module - Erratums/ESP8266 GitHub Wiki

Buy online now

About Relay Module

  • This is an esp01/s based relay module.
  • This version of board support both esp01 and esp01s
  • It's using Optocoupler
  • 5v working voltage

How to program ?

If you don't know how to install ESP8266 into Arduino IDE, please refer this link
How to install ESP8266 in Arduino

If you don't know how to program ESP01S, please refer this link
How to program ESP01S

Now we can upload the sample code to ESP01S

Sample Code [Basic]

You can get sample code from our Github repository

  • This is a simple code using which you can control the relay via WiFi

  • Once the code is uploaded, connect the esp01 to the relay module and power on relay module

  • You will notice a new WiFi network ES-1CH-Relay, connect to that network using password trytest123

  • Then use your browser [Google Chrome] and go to 192.168.4.1 [there is a chance the IPAddress is different]

  • You will see the page as below. You can control the relay through this page

Sample Code [MQTT]

If you don't know how to install MQTT library on Arduino, please refer this link
How to Install MQTT library on Arduino

If you are interested to setup your own MQTT Broker, please refer this link
How to setup free MQTT Broker

You can get sample code from our Github repository

  • Using this code you can control relay module from any where through internet

  • This can only be used for non commercial propose. We are using free MQTT server from Beebotte

  • Once the code is uploaded, you can use our test client page MQTT Smart Switch to switch relay

  • If you have changed the Topic Name in the code, then use that name here

  • You can also control the relay and change settings by connecting to Hotspot [192.168.4.1] *