Tasmota NodeMCU Alexa Smart Home System 2021 Without Coding

by techstudycell

Introduction

In this Internet of Things (IoT) project, learn how to create an IoT-based Smart Home Automation system using Tasmota firmware, an ESP8266 NodeMCU, and Amazon Alexa. This system allows you to control 4 home appliances via manual switches and the Amazon Alexa App. If the internet is unavailable, you can still control appliances using the manual switches.

This guide provides all the steps to build this smart home system, requiring no coding skills, making it accessible to everyone.

Key Features:

  1. Control home appliances with voice commands using Alexa.
  2. Control home appliances with manual switches.
  3. Monitor real-time feedback in the Alexa App.
  4. Control home appliances manually without internet connectivity.

You can easily build this home automation project using a NodeMCU and a 4-channel relay module, or opt for a custom-designed Printed Circuit Board (PCB) for a more integrated solution.

Required Components:

To build this project, you will need the following components:

Step 1: Circuit Diagram

This section details the complete circuit diagram for the home automation project. The circuit is designed to be simple. The GPIO pins D1, D2, D5, and D6 on the NodeMCU are used to control the 4 relays. The GPIO pins SD3, D3, D7, and RX are connected to the push buttons for manual control of the 4 relays.

The project utilizes the INPUT_PULLUP function in the Arduino IDE, eliminating the need for external pull-up resistors. A 5V mobile charger is used to power the smart relay module. It is important to note that the D3 pin should not be connected to GND during the booting process of the NodeMCU.

Diagram Description: A schematic shows the NodeMCU board connected to a 4-channel relay module. Lines indicate connections from specific NodeMCU GPIO pins (D1, D2, D5, D6) to the control inputs of the relays. Other NodeMCU pins (SD3, D3, D7, RX) are shown connected to pushbuttons, which are also wired to the relay module. The relay module is powered by a 5V supply and connected to AC loads (lights) via terminal connectors.

Step 2: Control Relays With Amazon Alexa

Once the NodeMCU is connected to your Wi-Fi network, you can control your home appliances through the Amazon Alexa App and also via the manual switches. The system allows you to monitor the real-time status of the relays directly within the Alexa App from anywhere in the world. An Amazon Echo device is required for this voice-controlled home automation functionality.

Screenshot Description: The screenshots show a setup with an Amazon Echo Dot, a NodeMCU board connected to a relay module controlling several lamps. One image shows a smartphone displaying the Alexa app interface with controls for the lights, and another shows a hand pressing a physical switch connected to the relay module.

Step 3: Control Relays Manually With Switches

You can also control the relays directly using the connected switches or pushbuttons. The real-time feedback of the relay status can be monitored either in the Tasmota dashboard or within the Alexa App. Refer to the circuit diagram for the correct wiring of the pushbuttons or switches.

Step 4: Design the PCB for This Smart Home System

To create a more compact and professional-looking device, a custom PCB was designed after thoroughly testing all features of the smart relay module. You can download the PCB Gerber files for this home automation project from the following link: PCB Gerber Files Download.

Diagram Description: Images display the design of the custom PCB. One shows a top-down view of the PCB layout with traces and component footprints. Another provides a 3D rendering of the assembled PCB, showcasing its compact design and professional finish.

Step 5: Order the PCB

After downloading the Gerber files, you can easily order the custom PCB:

  1. Visit JLCPCB.com and sign in or sign up.
  2. Click on the QUOTE NOW button.
  3. Click on the "Add Gerber file" button, then browse and select the downloaded Gerber file.

Screenshot Description: The screenshots illustrate the JLCPCB website interface. One shows the homepage with an offer for aluminum boards, and the other guides the user through the process of uploading the Gerber file and initiating a quote.

Step 6: Uploading the Gerber File and Set the Parameters

After uploading the Gerber file, set the required parameters such as Quantity, PCB masking color, and other specifications. Once all parameters are selected, click the SAVE TO CART button.

Screenshot Description: The screenshots show the JLCPCB interface where users select PCB parameters like quantity, board thickness, color, and surface finish. It also shows the process of adding the configured PCB to the shopping cart.

Step 7: Select Shipping Address and Payment Mode

Next, enter your shipping address and select your preferred shipping method. After confirming these details, submit the order and proceed to payment. You can track your order status on JLCPCB.com.

The author notes that their PCBs were manufactured in 2 days and arrived within a week via DHL Express, highlighting the good quality and affordable price.

Screenshot Description: The screenshots display the JLCPCB checkout process, showing fields for entering the shipping address, selecting shipping methods (like DHL Express), and choosing payment options (Credit Card, PayPal). It also shows a summary of the order total.

Step 8: Solder All the Components on PCB

After receiving the PCB, solder all the components onto the board according to the circuit diagram. Once soldering is complete, connect the NodeMCU board to the assembled PCB.

Image Description: Images show a person carefully soldering electronic components onto a green PCB. Another image shows the NodeMCU board being connected to the populated PCB.

Step 9: Download the Tasmota Firmware to Flash ESP8266

To flash the ESP8266 NodeMCU, you need to download two essential files:

Screenshot Description: A screenshot of the Tasmota firmware download page is shown, listing various firmware versions and types (e.g., tasmota.bin, tasmota-zigbee.bin) with download links and file sizes.

Step 10: Flash ESP8266 With Tasmota Firmware

Follow these steps to flash the ESP8266 with the Tasmota firmware:

  1. Connect the NodeMCU to your laptop.
  2. Open the Tasmotizer.exe application.
  3. Select the correct COM port for your NodeMCU.
  4. Select the tasmota.bin file by browsing to its location.
  5. Check the "Self-resetting device" and "Erase before flashing" options.
  6. Click on the Tasmotize button.

Upon successful flashing, you will receive a confirmation message.

Screenshot Description: The screenshots show the Tasmotizer application interface. One displays the main window with options to select the COM port, choose the firmware file, and enable flashing options. Another shows the progress or completion status of the flashing process.

Step 11: Update the WiFi Credentials

To configure the device's network connection, update the Wi-Fi credentials:

  1. In Tasmotizer, click on Send Config.
  2. Enter your Wi-Fi Network Name (SSID) and Wi-Fi password.
  3. Click on Save.

Wait for approximately 5-10 seconds for the configuration to be applied.

Screenshot Description: The screenshot shows the Tasmotizer "Send configuration to device" window, where fields for SSID, Password, MQTT settings, and other device configurations are present.

Step 12: Get the IP to Access the Tasmota Dashboard

After the configuration is sent, click on the Get IP button to retrieve the device's IP address. Copy this IP address.

Open any web browser and enter the copied IP address to access the Tasmota dashboard. Ensure your device and computer are connected to the same Wi-Fi network.

Screenshot Description: The screenshot shows the Tasmotizer window displaying the device's IP address (e.g., 192.168.0.3). Another screenshot shows the Tasmota web dashboard interface with controls for the relays.

Step 13: Configure the ESP8266 Module (GPIO)

Configure the ESP8266 module's General Purpose Input/Output (GPIO) pins within Tasmota:

  1. Navigate to Configuration, then click on Configure Module.
  2. Select the module type as Generic (0).
  3. Click Save and return to the Main Menu.
  4. Go back to Configuration and select Configure Module again.
  5. Map all the GPIO pins connected to relays and switches. For example, if using an active LOW relay module, select "Relay_i"; otherwise, choose "Relay". For pushbuttons/momentary switches, select "Button"; for latched switches, select "Switch".
  6. Click Save and return to the "Main Menu".

You can now control the relays directly from the Tasmota dashboard.

Screenshot Description: Screenshots show the Tasmota "Configure Module" page. One displays the initial module selection (Generic), and another shows the detailed GPIO mapping where specific pins are assigned functions like "Relay i" or "Button".

Step 14: Configure Alexa for Tasmota Devices

To enable Amazon Alexa integration for your Tasmota devices:

  1. Go to Configuration, then click on Configure Module.
  2. Enter a descriptive Friendly Name for each device (e.g., "Kitchen Light").
  3. Select Hue Bridge Emulation.
  4. Click Save and return to the "Main Menu".

Alexa will identify and control your devices using these friendly names.

Screenshot Description: The screenshots show the Tasmota "Configure Module" page with "Hue Bridge Emulation" selected and friendly names assigned to different relay outputs. The main dashboard also shows the friendly names controlling the lights.

Step 15: Configure the Alexa App to Connect Tasmota Devices

Open the Amazon Alexa App and follow these steps to connect your Tasmota devices:

  1. Tap on Devices, then tap the + (Add Device) icon.
  2. Select Light, then choose Others.
  3. Go to Alexa and tap on DISCOVER DEVICES. This process may take a minute. Ensure your ESP8266 and Echo Dot are connected to the same Wi-Fi network during discovery.
  4. After discovery, tap on Devices and then Lights to view and control your connected devices.

Screenshot Description: The screenshots illustrate the Amazon Alexa app interface. They show the process of adding a new device, selecting "Light" and "Others", initiating device discovery, and finally viewing the discovered lights (e.g., "Kitchen Light", "Night Lamp") on the "Lights" screen.

Step 16: Turn ON the Supply

Connect and turn on the main 110V/230V AC power supply for the appliances and the 5V DC power supply for the NodeMCU and relay module.

Step 17: Finally! The Tasmota Alexa Home Automation System Is Ready

Congratulations! Your Tasmota Alexa Home Automation system is now ready to use, all without writing a single line of code. You can now control your appliances from anywhere in the world using the Amazon Alexa app, or operate them via the manual switches, while also monitoring real-time feedback.

The author hopes you enjoyed this Alexa home automation project and has shared all the necessary information. Feedback is appreciated, and any queries can be posted in the comment section. Happy Learning!

Image Description: The final images show the completed smart home setup with the NodeMCU, relay module, and controlled lights, demonstrating the system working with voice commands via the Echo Dot and control through the Alexa app.

PDF preview unavailable. Download the PDF instead.

Tasmota-NodeMCU-Alexa-Smart-Home-System-2021-Witho wkhtmltopdf 0.12.6 Qt 4.8.7

Related Documents

Preview HOW TO: TASMOTA SML - Konfiguration und Anleitung
Umfassende Anleitung zur Kompilierung und Konfiguration des Tasmota SML Treibers für das Auslesen von Smart Metern (OBIS, SML, Modbus RTU) mit ESP8266-Hardware. Beinhaltet Hardware-Setup, Firmware-Kompilierung mit PlatformIO, Software-Konfiguration und Fehlerbehebung.
Preview Tasmota Smart WiFi Curtain Module L12T User Guide
User guide for the Tasmota Smart WiFi Curtain Module L12T, covering connection, configuration, and integration with smart home systems.
Preview Tasmota Smart WiFi Curtain Module L12T: User Guide and Configuration
A comprehensive user guide for the Tasmota Smart WiFi Curtain Module L12T, detailing setup, connection, template configuration, operation commands, reset procedures, and smart home integration options.
Preview Tasmota NOUS L1T Instruction Manual and Setup Guide
Detailed instructions for connecting, configuring, and integrating the Tasmota NOUS L1T smart switch. Includes wiring diagrams, setup steps, template parameters, and smart home compatibility.