Getting Started with Tasmota on ESP8266-01: Control LED, Read DHT11, and Integrate Tasmota with Home Assistant

Getting Started with Tasmota on ESP8266-01

With the advancement in IoT, Home automation System is becoming a very popular and demanding concept. There are already many Home Automation platforms that allow users to control all the smart appliances using a standalone device; Tasmota is one of them. Tasmota was initially launched for sonoff devices but now Tasmota can be used with any ESP266 device. It allows easy and seamless integration with hundreds of smart home products and protocols.


So in this tutorial, we are going to flash Tasmota firmware on ESP8266-01. Then we will configure the Tasmota to control Neopixel LED. Later on, we will also integrate the Tasmota device with Home Assistant using MQTT. We have also previously built many IoT Home Automation projects; check them out if you are interested.


Components Required for Flashing Tasmota


What is Tasmota?

Tasmota is an open-source custom firmware that runs on any ESP8266 device. It provides local control of the connected device through MQTT, HTTP, Serial, or WEB UI. Tasmota initially started as a custom firmware for sonoff devices but it transformed into an incredibly powerful tool for controlling everything within the ESP chip. It comes with built-in drivers to control many popular sensors and chips. Tasmota also has an option to configure devices in case you want to add a device that is not on the list of built-in devices.


Flashing Tasmota on ESP-01

There are generally two methods for flashing Tasmota on ESP-01. One is Over the Air (OTA) and the other is using FTDI or Arduino Uno. In this project, we are going to use Arduino Uno for Flashing Tasmota on ESP-01.


Step1: Preparing Hardware

To flash a new firmware on ESP-01, connect ESP-01 with Arduino Uno as per the circuit diagram.

IoT Projects with Arduino

Connect the VCC and GND of ESP-01 to 3.3V and GND of Arduino; also connect CH_PD to 3.3V and GPIO_0 to GND of Arduino. Connect RX and TX of ESP-01 to RX & TX of Arduino Uno, respectively. GPIO_0 is grounded to enable the flashing mode of ESP8266-01. After making the circuit as per the diagram, connect the Reset pin of the Arduino to GND to bypass the Arduino. It will disable Arduino and upload the firmware directly to the ESP-01. Connect RST pin of ESP-01 to ground, remove the RST after half a second (the blue LED flashes for some millisecond).


Step 2: Tasmota Firmware Download

Now in the next step, download the Tasmota firmware file from There is a big list of firmware files. The difference between these bin files is that each one includes different built-in drivers for various sensors and other devices. If you're not sure which binary is the right one for you, just start with “tasmota.bin”. It includes all the features required for the majority of compatible hardware.

Tasmota Firmware Download


Step 3: Download and Install Tasmotizer

Tasmotizer is a specifically designed flashing tool for Tasmota. Download the latest Tasmota version for your platform. After downloading, double click the downloaded file and it'll start; no installation required.


Step4: Flashing the Tasmota Firmware

Now in the final step, select the port to which Arduino Uno is connected. Then browse to the Tasmota firmware binary you downloaded. You can take a backup of your original firmware by checking in the “Save original firmware” option. Click Tasmotize! and wait until it is done.

Download Tasmotizer


Step 5: Configure Wi-Fi

Once you have finished flashing the Tasmota Firmware, disconnect the GPIO-0 pin, then disconnect the ESP-01 power, and reconnect it. When the Tasmota firmware starts up, it provides a wireless access point for easy Wi-Fi configuration. It will have a name similar to “tasmota_XXXXXX-####”.


Connect to this Tasmota network using your Smartphone or laptop, and open in a web browser. It will take you to the Tasmota configuration page automatically. Enter Wi-Fi name in AP1 SSID box and Wi-Fi password in the AP1 Password box. You can also enter an alternative Wi-Fi in the next boxes. Click on 'Save' to apply the changes. The ESP8266 Tasmota device will restart and connect to the Wi-Fi network that you provided.

Tasmota Configuration


Controlling Neopixel using Tasmota

Once the Wi-Fi configuration is done, use an IP scanner to find the IP address of your Tasmota device. Enter the IP address into your browser URL and click Enter. It will take you to the Tasmota page.

Getting Started with Tasmota


To control the LED with Tasmota, we need to configure the module. For that, go to “Configuration” and then “Configure Module”

Tasmota Configuration


By default, the module type will be ‘Generic (0)’. So, you need to change it to ‘Generic (18)’. Then in GPIO 2, I selected ‘PWM’ to control LED and DHT11 on GPIO0, you can change it to Relay, Neopixel, or any other sensor.

Tasmota with Arduino Uno


After that, click on ‘Save’ to save the changes. The ESP-01 will restart. Then go to Main Menu and you will have fully functional LED controls on your Tasmota Web UI. Use the slider to change the LED brightness and the Toggle switch to turn on and off the LED.

Controlling Neopixel using Tasmota

Ok, so till now we flashed Tasmota firmware on ESP-01 and controlled a LED and DHT11 using the Tasmota device. Now, we are going to integrate Tasmota with Home Assistant. If you are new to Home Assistant, then follow our previous tutorial on Getting Started with Home Assistant.


Integrating Tasmota with Home Assistant

We are going to configure MQTT on Tasmota and Home Assistant so that the Tasmota device will auto-discover in Home Assistant. So, the first step will be installing the MQTT add-on on Home Assistant. Skip this step if you already installed MQTT on Home Assistant.


Open up Home Assistant in your browser and navigate to the Supervisor tab in the left-hand menu. Then click Add-on Store at the top of the page and search for Mosquito Broker.

Mosquito MQTT Broker


Now open the Mosquito MQTT Broker add-on and then click install. Once installed, click on Start, to start the Mosquito broker.

Tasmota MQTT


Now, navigate to your Tasmota Web UI and go to “Configuration” and then “Configure MQTT”

Configure MQTT on Tasmota


Now enter your Home Assistant server IP address under the host. Default port 1883 is already entered. Next, enter the MQTT broker username and password. Then enter the Topic name. This topic name will be used to communicate with the MQTT broker.

Tasmota Home Assistant server IP address


Now click on 'Save' and the Tasmota will restart. Then go to Console.

Integrating Tasmota with Home Assistant

Now, to turn on discovery mode on the Tasmota device, enter the following command in the Tasmota console and press 'Enter'.

SetOption19 on


Once you enter this command, your console screen will look something like this.

Tasmota Home Assistant


Now, again go to your Home Assistant Web UI, on the left-hand menu, click on Configuration to load the configuration page. Then go to Integrations.

Home Assistant Configuration


Now on the Integrations page, click on MQTT and you will find a list of all the devices discovered by Home Assistant. If you didn’t turn on the Edit mode on your Dashboard, Tasmota will be visible on the overview page. Otherwise, add it manually.

Integrate Tasmota with Home Assistant

This is how you can Flash Tasmota firmware on ESP8266-01 and integrate it with Home Assistant. A complete working video is given below. If you have any questions, please let me know in the comments below.



My spouse and i were ecstatic when Albert managed to do his web research from your ideas he received from your web page. It is now and again perplexing to simply always be giving for free secrets and techniques that men and women could have been making money from. We fully grasp we have the writer to give thanks to for that. All the illustrations you've made, the simple website navigation, the relationships your site aid to promote - it's most awesome, and it's helping our son and the family feel that this article is brilliant, which is highly pressing. Many thanks for everything!

I definitely wanted to develop a simple remark in order to appreciate you for these remarkable pointers you are showing on this site. My long internet look up has now been compensated with pleasant knowledge to talk about with my family members. I would state that that most of us readers are definitely endowed to dwell in a fantastic network with very many marvellous people with interesting ideas. I feel truly lucky to have used your entire web pages and look forward to so many more excellent minutes reading here. Thanks a lot once again for everything.

I precisely had to appreciate you once more. I am not sure what I would have tried without the actual points discussed by you relating to my question. It absolutely was a very alarming matter in my opinion, nevertheless encountering the very specialized style you processed the issue forced me to leap over gladness. I'm just thankful for the service and as well , hope that you recognize what an amazing job that you are carrying out instructing many others using your websites. Most probably you have never met all of us.

I am also commenting to make you know what a exceptional discovery my friend's daughter developed reading through yuor web blog. She figured out a good number of details, which include what it is like to have a wonderful helping spirit to let many more completely fully understand several impossible things. You truly exceeded people's expectations. I appreciate you for giving those powerful, trustworthy, informative and also easy tips about this topic to Janet.

When I initially commented I clicked the -Notify me when new comments are added- checkbox and now each time a comment is added I get 4 emails with the same comment. Is there any way you possibly can remove me from that service? Thanks!

I precisely had to say thanks all over again. I do not know the things that I might have carried out in the absence of these suggestions shared by you about such a theme. It was before a real fearsome problem for me personally, however , finding out a skilled approach you treated it forced me to weep over fulfillment. I am just happy for this advice and believe you recognize what an amazing job that you're carrying out training some other people all through your blog post. Most likely you have never come across any of us.

Thank you a lot for providing individuals with an extraordinarily splendid possiblity to read critical reviews from this blog. It's usually very beneficial and as well , jam-packed with fun for me personally and my office fellow workers to search your web site at minimum 3 times per week to see the new things you will have. And definitely, I'm certainly pleased for the perfect solutions served by you. Some 4 areas in this article are truly the most beneficial we have ever had.

I have to express my thanks to the writer just for rescuing me from this particular scenario. After researching throughout the online world and meeting opinions that were not pleasant, I assumed my entire life was well over. Existing devoid of the strategies to the difficulties you have sorted out all through the blog post is a serious case, and the kind that could have in a wrong way affected my entire career if I hadn't come across your web blog. The capability and kindness in handling every part was helpful. I don't know what I would have done if I had not come upon such a point like this. I'm able to at this moment look ahead to my future. Thanks so much for your specialized and result oriented guide. I won't be reluctant to refer your blog to any person who should get support about this issue.

I want to show thanks to the writer for bailing me out of this particular scenario. Just after researching throughout the internet and seeing advice that were not beneficial, I assumed my entire life was done. Existing minus the solutions to the difficulties you have sorted out through your good guideline is a crucial case, as well as the ones that would have badly affected my career if I hadn't discovered your web blog. That training and kindness in maneuvering the whole lot was valuable. I'm not sure what I would have done if I hadn't come across such a step like this. I can at this moment relish my future. Thanks so much for the impressive and results-oriented help. I will not think twice to endorse your web blog to anybody who would need guidance on this problem.

Thanks for every one of your efforts on this web site. Gloria loves getting into investigation and it's really obvious why. My partner and i learn all about the powerful form you deliver rewarding suggestions by means of this web site and even strongly encourage participation from website visitors on that issue so our favorite princess is always understanding a lot. Have fun with the remaining portion of the new year. You're the one doing a really great job.

Thank you a lot for providing individuals with an extraordinarily splendid opportunity to read articles and blog posts from here. It really is very superb and as well , full of fun for me personally and my office acquaintances to search your blog at least thrice in 7 days to read through the latest guidance you have got. Of course, we are always pleased considering the remarkable concepts served by you. Selected two points on this page are undoubtedly the most suitable we have had.

I am writing to make you be aware of of the outstanding experience our girl undergone viewing your web site. She even learned plenty of issues, most notably what it is like to have a great coaching nature to make the mediocre ones easily know selected grueling matters. You undoubtedly surpassed our expected results. Thank you for giving the practical, trusted, edifying not to mention easy tips about this topic to Ethel.

An attention-grabbing discussion is value comment. I believe that it is best to write extra on this topic, it may not be a taboo subject however typically individuals are not enough to talk on such topics. To the next. Cheers

Thank you so much for providing individuals with a very superb possiblity to read articles and blog posts from this site. It can be very brilliant and jam-packed with fun for me personally and my office acquaintances to search your blog at the very least 3 times in a week to see the newest tips you will have. Not to mention, I am certainly fascinated with all the dazzling principles you give. Certain 4 points in this post are truly the best I've had.

Thanks so much for providing individuals with remarkably memorable opportunity to check tips from this site. It's always so cool and also jam-packed with a lot of fun for me and my office fellow workers to visit the blog at minimum 3 times every week to study the newest secrets you have. And indeed, I'm actually satisfied for the astounding creative ideas you serve. Certain 3 ideas on this page are without a doubt the very best I have had.

I must show appreciation to the writer just for rescuing me from this dilemma. After checking throughout the world-wide-web and finding principles which were not productive, I was thinking my entire life was gone. Being alive without the approaches to the issues you have fixed all through this report is a critical case, as well as the kind which could have in a negative way affected my career if I had not noticed the blog. Your main mastery and kindness in controlling the whole lot was very helpful. I am not sure what I would've done if I had not encountered such a thing like this. I am able to now look ahead to my future. Thanks a lot very much for this high quality and effective help. I will not be reluctant to recommend your web blog to any individual who would need guidance on this issue.

}Now that you've come to the end of this article, you can see that being in fashion is not out of your reach. You can also have fun at the same time. Lift your spirits and look your best by using the great suggestions you have just read and get started today.

Add new comment

The content of this field is kept private and will not be shown publicly.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.