In this project, we are going to build a Tasmota Home Automation System with Alexa controlled features. Here we use the ESP8266 NodeMCU module as it is cheaper than ESP32. With the help of this project, we can operate 4 home appliances through the Tasmota dashboard, Alexa device and also physical switches. We can also operate this system by controlling the relays from the Alexa app from anywhere in the world. Internet issue is common in rural areas. So if there is no internet you can operate those appliances by manual switches.
Also, we don’t need to buy Alexa devices or any other smart devices for this home automation system. Because I made this project using all low-cost tools.
You just need to follow all the steps carefully. After this, you can easily make an Alexa Smart Home Automation System using Tasmota and Alexa to control the appliances using just your voice commands.
What is Tasmota?
Tasmota is a custom open-source firmware that can be run on ESP8266 and ESP32 development boards. We can connect devices as a local control via MQTT, HTTP, etc. At first, Tasmota is made for Sonoff smart devices but these days it is modified for free-source projects. Now it is a very effective and easy software for controlling the ESP chips. We can control many sensors by just using them. The main advantage of Tasmota is you can add or remove devices at any time which is not listed on built-in devices.
- NodeMCU ESP8266 Board
- PC817C Optocoupler (x4)
- 5 Volt Relay Module (x4)
- 1K Resistor (x4)
- 1N4007 Diode (x4)
- LEDs (x4)
- Push Buttons (x4)
- 5 Volt Power Supply
For removing messy wiring and give a clean look, I designed a PCB prototype for this project. It is also helpful for troubleshooting that runs great without any errors. To design this PCB board, I used EasyEDA as it is too easy to use. For ordering PCB for this, I prefer PCBWay.
Gerber file for Tasmota Home Automation System Gerber.
Order PCB From PCBWay
There are so many forums or communities for electronics online in today’s technical world, and one of the famous ones for PCB manufacturing is PCBWay. PCBWay is a place that brings manufacturers and customers together. They have more than a decade of experience in this field of fabrication, prototyping and assembling PCBs. PCBWay have proved their focus to their customers’ needs in terms of cost-effectiveness, delivery, and quality.
Monthly Submission for PCBWay
Great opportunity for showing your creativity in electronics right now. PCBWay’s Open Source Community is a platform for sharing creative electronic projects and insightful knowledge for global project makers.
You can express your own ideas about electronics and also receive feedback from the community that is ready for you! Whenever you have some useful and practical ideas on how to design or develop an electronic project, or anything that you think should be discussed at PCBWay. By writing articles on your own unique ideas, you can earn reward points basis on your project as well as earn money. You are always welcome to post articles about electronic projects in their community. For detailed information just check out this link and start a fresh beginning. Monthly Submission for PCBWay.
How PCB Manufacturing Process Done in PCBWay
Standard quality for any product needs to be maintained using some parameters. PCBWay gives that opportunity by quality control in designing and manufacturing. At first, they ensure accuracy, clarity, validity of the PCB files that we sent to them.
Then all the boards will go through the most stringent tests other than the basic visual check. They adopt most of the testing and inspecting equipment used in the industry, such as Flying Probe Tester, X-Ray Inspection Machine, Automated Optical Inspection (AOI) Machine. PCBWay are having 50+ new engineers on the daily basis around the world using PCBs for their work, who trust for their reliable quality. They produce high-quality pink, orange, grey, even transparent solder mask. Moreover, according to people needs, they can also provide Black core PCB. Check it out for a High-Quality PCB solder mask. There are some pictures below of the new colours of solder musks.
Features of PCBWay
PCB Prototyping & Manufacturing: PCBWay produces FR-4 and Aluminum boards and advanced PCBs like Rogers, HDI, Flexible and Rigid-Flex boards, at a very reasonable price. Just check this Instant Quote to order premium PCBs for your hobby projects.
PCB Assembly: It not only offers PCB Prototyping but also offers PCB Assembly service. You can order a full PCB board with attached components by uploading your file. SMT & THT assembly starts from only 30$ including free stencil and worldwide shipping. The components can be sourced and provided by PCBWay, or by clients themselves.
Open Source Community: It not only offers PCB Prototype & Assembly service but also gives opportunities to students for sponsorships. I think this is so great. They feature their projects on the website also.
3D Printing & CNC: It also produces Rapid Prototyping like 3D printing, CNC Machining, Sheet Metal Fabrication, and Injection Molding. The quality of the product is too premium and reliable. And also the best part is that you will receive your order within a minimum of 3 days.
PCBWay Store: More boutique gift modules are waiting for you to discover, giving your creativity wings. You can order all types of electronic equipment, components and many more with exciting offers. Go with the link and buy your needs, PCBWay Store.
Services: PCBWay offers great servicing of their products. It takes only 3 to 15 days according to courier service to deliver your products. Also, it has a live support facility. Whenever you have any problems, you can always reach a live customer service person to respond to your emails or messages. They have the “Return and Refund” principle, for every unusable board caused by PCBWay, they will rebuild and refund the order soon.
How to Flash Tasmota with ESP8266
There are two ways to flash Tasmota. The first process is the OTA (Over the Air) and the second one is FTDI or Arduino IDE. In this project, we use Arduino IDE to flash Tasmota on the ESP8266 development board.
Now we started with the connection of all components used in this project. You can connect ESP8266-01 with Arduino Uno as shown in the diagram.
Now connect VCC and GND of ESP-01 to 3.3V and GND of Arduino. Then connect CH_PD to 3.3V. Connect GPIO_0 pin to the GND of Arduino.
Now connect RX and TX of the ESP-01 to the RX and TX of the Arduino UNO. After connecting ESP8266-01, connect the reset pin of Arduino to the GND to bypass it. This technique disabled Arduino and firmware directly uploaded to the ESP8266 board. When the blue LED glows you can remove the RST pin from the GND pin.
How to Download & Install Tasmota Firmware?
Now the question is how to download Tasmota firmware. You can click this link – http://ota.tasmota.com/tasmota/release/. In this link, you can see a list of firmware files. All files have different built-in drivers for different sensors. You can use ‘tasmota.bin’. This file has all features of compatible hardware. After visiting the link you just need to scroll down and click on the first option and then click on Tasmotizer-1.2.exe.
The Tasmotizer is a tool for flashing Tasmota. You have to download the “latest Tasmota version” on your platform. Now just double-click on it and it will start.
Process for Flashing Tasmota
Now we are in the final part to flash Tasmota. Select the port where Arduino UNO is connected. Browse the Tasmota firmware binary you download. Then click Tasmotize. After a few times, it will be done.
How to Configure WiFi?
After Flashing Tasmota, we have to configure WiFi to control appliances by the Amazon Alexa app. After Flashing, you can see a ‘send config’ button. Click on it. Now enter your WiFi name and password and save it and now click on OK. Saving the process may take some time.
After 5 to 10 seconds later, you are able to next step. Now click on ‘get IP’. Here you can see the IP address of the WiFi. Copy it and paste it on Google or any browser. There you can see the dashboard where you can edit your project.
Configure Relays and Switches for Tasmota Home Automation System
Now click on ‘Configuration’ and then click ‘Configure module’. Now select the ‘Generic(0)’ and save it. Then return to the main menu and click on ‘Configuration’. Here you can see the ‘Generic (0)’ is selected. You have to configure all the GPIO pins connected to the relays.
Relay 1, 2, 3, 4 are connected to the pins D1, D2, D5 and D6 respectively and switches are connected to the pins SD3, D3, D7 and RX respectively. Then open the browser and select relay 1 in the GPIO5 for relay 1. Then do the same for GPIO4 and select relay 2. The same process is for relays 3 and 4 respectively.
Now the time is to connect the switches. At first, we can see the SD3 pin or GPIO10 is connected to switch 1. Now as I show you in the previous selection technique, select switch for the GPIO10 if you use manual switches or select buttons if you use push buttons. By this process select all four switches respectively.
Now save it and back to the main menu. In the dashboard, you can see four buttons. With these buttons, you can control these four relays.
Configure Amazon Alexa for Tasmota Home Automation System
To configure the Alexa app you have to back to the main menu. Select ‘Configuration’ and then ‘Configure other’. Now name this project and name all four channels. By these names, Alexa will identify this device. At last select ‘Hue bridge multi device’ and save it.
Step for Setup Amazon Alexa Mobile Application
- In the Alexa app, sign in with the email and password.
- Then Close it.
- Click on Discover Devices. Your device name is visible there in a few seconds.
- Then click on your device. Then select all the switches.
- If ESP8266 is connected with your WiFi, you can control all appliances from the Alexa app.
- Now you just need to say “Alexa, Turn On the light”. The light is on. With this voice command, you can control appliances using your voice.
Operation of Tasmota Home Automation System
The working principle is so easy for this project. You just need to say “Alexa turn on switch 1” and the switch is turned on. By this process, you can control four switches. You can also control it with the Alexa app.
When you have no WiFi connections, this project can be controlled manually by switches. When WiFi is connected, the Alexa app will show the notification of your appliances.
Advantages of Tasmota Home Automation System
- You can turn ON/OFF loads using your voice command.
- Increase or decrease the brightness of your room lights.
- You can also change the colour of the lights.
- You can check the room temperature by sensors.