Tasmota ESP01 Alexa control relay

Tasmota ESP01 Alexa control relay

Make Tasmota ESP01 ESP8266 Alexa control relay without writing a single line code. Explained Circuit and shown all the steps to make it.

In this IoT project, I have explained how to make the Tasmota ESP01 ESP8266 Alexa control relay without writing a single line code. To make this IoT-based home automation project, you need “ESP-01/01s relay v4.0” and ESP-01.

I have used the FREE IoT platform for this ESP01 Alexa home automation project. You can buy the “ESP-01/01s relay v4.0” from any online store.

So if you follow all the steps, you can easily make this IoT project with ESP-01 ESP8266 and Tasmota.

Required Components:

Circuit of the ESP01 Relay IoT project

Circuit of the ESP01 Relay IoT project

In the circuit, you can use any 5V DC power supply.

The switch is connected across the NO and COM contact of the relay. As the switch is not connected to the ESP01, so you can’t monitor the real-time feedback.

The relay control pin is connected to the GPIO-0 of the ESP-01.

Instead of the socket, you can also connect a lamp with the relay as per the following circuit.

Circuit of the ESP01 Relay IoT project

Please take proper safety precautions while connecting the AC appliances.

Tutorial video on Tasmota ESP01 Project

In the Tasmota ESP8266 tutorial video, I covered the following topics.

  • Programming the ESP01 using FTDI232.
  • Download and Flash ESP01 with Tasmota firmware.
  • Configure Tasmota for ESP01 ESP8266.
  • Connect Tasmota devices with Amazon Alexa.

Circuit for Programming ESP01

Please refer to this article for Programming ESP-01 using Arduino IDE.

Program ESP01 with FTDI232

Connect the GPIO-0 with GND and press the RESET button to go into programming mode.

Download the required files to flash ESP8266

You need the following files to flash the tasmota firmware to ESP8266 NodeMCU.

Here, I have used the tasmota.bin firmware for this project.

If you have a 32-bit system, download the tasmotizer_x86-1.2.exe instead of tasmotizer-1.2.exe from Github.

Flash the ESP01 with Tasmota firmware

Follow these steps to flash the ESP01 ESP8266 with Tasmota firmware and update the WiFi credentials to get the IP for Tasmota Dashboard.

  1. Flash ESP8266 with Tasmota firmware

    Flash ESP01 with Tasmota Firmware

    1. Connect the ESP01 ESP8266 with the laptop. Open the Tasmotizer.exe.
    2. Then select the port from the drop-down list.
    3. Select the BIN file. Click on “Open” and browse the tasmota.bin which you have downloaded.
    4. Check the “Self-resetting device” and “Erase before flashing“.
    5. Click on “Tasmotize“.
    After that, disconnect the GPIO-0 from GND and press the Reset button to exit from the programming mode.

  2. Configure Wi-Fi

    Enter WiFi details

    Now click on the “Send config” button. Then check the WiFi box and enter the WiFi credentials.
    Click on Save and wait for 15 seconds.

  3. Get the IP to access Tasmota Dashboard

    Get IP for Tasmota dashboard

    To get the IP click on the “Get IP” button.
    Copy the IP address then paste it into the browser to open the Tasmota Dashboard.

Configure the ESP01 GPIO in the Tasmota dashboard

Follow these steps to configure the GPIO pins of ESP-01 ESP8266 in the Tasmota Dashboard.

Select the Module Type:

Select the Module Type in Tasmota

Click on “Configuration“.

Configure GPIO in Tasmota

Click on “Configure Module“.

Configure GPIO in Tasmota

From the drop-down list select “Generic (18)“.

Configure GPIO in Tasmota

Click on “Save“.

Configure GPIO in Tasmota

Again click on “Configuration“.

Configure GPIO in Tasmota step 9

Again click on “Configure Module“.

Configure the GPIO pins in Tasmota Dashboard

Enter GPIO details

Now you have to configure the GPIO pin connected to the relay.

In this project, I have used an active low (Relay will turn on for LOW signal at control pin) relay module. So I have selected “Relay_i” for the GPIO pins connected with Relay.

If you use the active HIGH relay module, then select “Relay“.

If you use push buttons (momentary switch), then select “Button” for all the GPIO connected with push buttons. But if you use switch (latched), then select “Switch“.

You also have to select the number to map each switch with the respective relay.

Here the GPIO-0 is connected with the relay, I have selected the number as “1“. As no Switch is connected, so I have just mapped the relay.

Thus, you have to map all the GPIO pins as per the circuit.

Then click on “Save” and go to “Main Menu“.

tasmota esp01 project pt11

Our Tasmota dashboard is ready, now you can control the relay with the Toggle button.

PCB for the ESP01 project

To connect the switches with ESP01 GPIOs, you can use the following PCB. Using this PCB, you can connect 2 relays and 2 switches with ESP01.

ESP01 PCB

You can order any custom design PCBs from PCBWay at very reasonable prices.

PCBWay

You can also explore different PCB projects from their Open-source community pcbway.com/project/.

In honor of PCBWay’s 9th anniversary, they are offering enticing discounts. Customers now have the opportunity to enjoy exclusive offers and special incentives as a token of gratitude for their ongoing support and to celebrate this remarkable achievement.

PCBWay coupons

Don’t miss out on the anniversary sale where PCBWay offers free coupons, free modules, special deals, sponsorship opportunities, and much more. Take advantage of these incredible offerings to enjoy substantial savings and witness PCBWay’s industry-leading expertise in PCB fabrication and assembly.

For more details please click here.

Tasmota Alexa Integration for ESP8266

You can interact with Tasmota devices using Amazon Alexa app through its Echo devices and also control the relay with voice commands.

Please refer to the following article for the step-by-step guide.

Tasmota Alexa Integration

After testing, place the complete circuit inside a switch box.

place the circuit inside a switch box

Control the appliances with Alexa

Control the appliances with Alexa

After adding all the Tasmota devices to Amazon Alexa App, you can ask Alexa to turn on/off the light.

The Echo Dot and the ESP01 must be connected to the same Wi-Fi network.

But your mobile can be connected to any WiFi network. So you can control the appliances from anywhere in the world with the Amazon Alexa app.

Control the appliances with Switch

Control the appliances with Switch

If there is no internet, you can control the appliances with the manual switch.

Click Here for more such ESP8266 projects.

Please do share your feedback on this IoT project. Thank you for your time.