Getting Started with ESPHome: How to Install and Integrate it with Home Assistant?

Getting Started with ESPHome

ESPHome is a simple yet powerful system that allows users to control ESP boards using YAML configuration files. It allows users to quickly and easily build custom firmware for sensors and devices without any programming skills. ESPHome supports a long list of devices, sensors, and protocols that can be configured with just a few lines of YAML. Apart from that, it can also control lights, displays, and even more. It can be integrated with Home Assistant in few clicks.

 

There are mainly two methods for installing ESPHome. The quickest and easiest way is using the Home Assistant add-on, the second way is to install through python using pip. In this tutorial, we are going to install ESPHome through the Home Assistant add-on. Once the installation is complete, we will test it by controlling an LED and reading DHT11 sensor data. If you are not familiar with Home Assistant, follow our previous tutorial on Getting Started with Home Assistant. You can also check our previous tutorial on Flashing Tasmota on ESP8266-01.

 

Components Required for Installing ESPHome

  • ESP8266-01
  • Arduino Uno
  • LED
  • DHT11
  • Jumper Wires

 

Installing ESPHome

Installing the ESPHome through the ESPHome Home Assistant add-on is very easy. To install ESPHome, first, navigate to Home Assistant Web UI and from there navigate to the Supervisor panel, then search for ESPHome in the “Add-on Store” tab.

ESPHome Home Assistant

 

Open the ESPHome and then simply click on the Install button in order to install it. After that, wait until the add-on is installed. Then start the add-on and switch on the ‘Show in Sidebar’ option for ease of access. After that, click “Open Web UI”.

 Installing ESPHome

 

Now you will be redirected to ESPHome Web UI. Click on the “+” icon to add a new device.

ESPHome Web UI

 

In the first step, enter the device or project name. The device name must be in lowercase and must not contain any spaces. For example, my device name is ‘office_temperature’ but you can choose any name you like.

ESPHome Node Name

 

In the second step, select the correct board type. Here, I am using an ESP-01 Wi-Fi board so I selected ‘Generic ESP8266’.

ESPHome Device Type

 

Then in the next step, enter the SSID and password of the Wi-Fi network. You can also set an additional password for future OTA firmware updates.

ESPHome Wi-Fi and Updates

 

Once you have entered your credentials, click Next and then click Submit in the next step to finish the process, and the device will be added to the ESPHome UI. It will then ask to select a port. If you are using a Board that has a USB interface, connect it to Laptop and select the port; else ignore it.

ESPHome UI

 

Now to create a configuration for the ESP-01 device, click on ‘Edit’ from the menu of the device. You will be presented with the YAML file. If the YAML page is blank then click on ‘Overview’ or any other tab and then click back to ESPHome and click ‘Edit’ again. You will see a YAML file currently configured for your device.

ESP-01 Device Configuration

 

Now in the next step, we are going to add a light component (LED) and binary sensor (DHT11) in the configuration file. ESPHome has tons of compatible sensors and devices that you can find on their website. Add the below lines of code to the configuration file:

# Web server
web_server:
  port: 80
  auth:
    username: admin
    password: 312124dc
# Sensors config
sensor:
  - platform: dht
    pin: GPIO0
    model: DHT11
    temperature:
      name: "Living Room Temperature"
    humidity:
      name: "Living Room Humidity"
    update_interval: 20s
output:
  - platform: gpio
    pin: GPIO2
    id: main_relay
light:
  - platform: binary
    name: "Lamp 1"
    id: rele1
    output: main_relay
text_sensor:
  - platform: wifi_info
    ip_address:
      name: espname ESP IP Address

 

Now go ahead and click save. Then click on three dots in the top right corner and then click 'Compile'.

ESPHome Compilation

 

The compilation process may take a while. Once the compilation completes successfully, click on ‘Download Binary.’

Install ESPHome

 

Note: If you are using a board with a USB interface, then you can directly upload the code from ESPHome UI by selecting the serial port but as we are using an ESP-01 board, we will use Arduino Uno to upload the firmware.

 

Flashing ESPHome on ESP-01

There are generally two methods for flashing ESPHome on ESP8266. 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.

 

Step1: Preparing Hardware

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

ESP-01 with Arduino Uno

Connect the VCC and GND of ESP-01 to 3.3V and GND of Arduino; also connect CH_PD to 3.3V andGPIO_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: Download and install Tasmotizer

Tasmotizer is a specifically designed flashing tool for Tasmota but here we will use it to Flash ESPHome. Download the latest Tasmota version for your platform. After downloading, double click the downloaded file and it'll start, no installation is required.

 

Step3: Flashing the Firmware

Now in the final step, select the port to which Arduino Uno is connected. Then browse to the ESPHome 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.

Flashing the ESPHome Firmware

Once the Flashing is done, disconnect the RX, TX, CH_EN pins and connect an LED to GPIO2 and DHT11 to GPIO0 of ESP-01 as shown in the image given.

 

Wait until the ESP-01 connects to Wi-Fi and then click on Configuration to load the configuration page, then go to Integrations.

Home Assistant Configuration

 

Now on the Integrations page, you will see that Home Assistant has already discovered the ESPHome device.

ESPHome Device

 

If you didn’t turn on the Edit mode on your Dashboard, ESPHome will already be visible on the overview page, otherwise, add it manually.

ESPHome with Home Assistant

 

You can even access the ESPHome Web UI without Home Assistant. For that enter the IP address of ESP8266 into the browser URL and click Enter. It will ask you to enter the Username and Password that you provided in the configuration file.

ESPHome Web UI without Home Assistant

 

After entering the User name and Password, click on Sign in and you will be redirected to ESPHome Web UI.

ESPHome Web Server API

This is how you can integrate ESPHome with Home Assistant. It's that easy to add sensors and devices using ESPHome. A complete working video is given below. If you have any questions, please let me know in the comments below.

Video

856 Comments

I am also writing to make you be aware of of the amazing experience our girl had browsing your web site. She came to find some things, with the inclusion of what it's like to possess an ideal coaching nature to let men and women really easily know just exactly specific impossible subject areas. You really exceeded our own expected results. Thank you for rendering these informative, safe, explanatory and as well as fun thoughts on your topic to Evelyn.

My spouse and i felt glad Jordan managed to finish up his researching from the precious recommendations he had from your own web site. It is now and again perplexing to simply continually be handing out tips and tricks that many some people have been trying to sell. We take into account we now have the website owner to be grateful to for this. The illustrations you made, the simple website navigation, the relationships you can help to engender - it's got many fantastic, and it's really facilitating our son in addition to our family believe that this subject matter is amusing, which is tremendously important. Many thanks for the whole thing!

I definitely wanted to type a quick comment in order to thank you for all the lovely guides you are sharing here. My long internet look up has at the end been paid with incredibly good content to go over with my pals. I would state that that many of us website visitors are really lucky to be in a decent site with so many wonderful people with interesting advice. I feel extremely happy to have discovered your entire web pages and look forward to some more amazing minutes reading here. Thanks a lot once more for all the details.

I intended to create you the little note just to say thank you as before about the stunning tips you've documented on this page. This is certainly generous with you to provide extensively precisely what most of us could possibly have marketed for an e book to get some profit for themselves, mostly since you could possibly have done it in case you considered necessary. The good ideas additionally acted to be a great way to fully grasp that most people have the identical eagerness the same as mine to understand a good deal more on the subject of this problem. I'm certain there are millions of more pleasant times ahead for many who start reading your blog post.

I precisely wanted to thank you so much again. I'm not certain the things that I could possibly have taken care of in the absence of these tactics discussed by you about my area of interest. Completely was an absolute distressing difficulty in my position, however , viewing a specialized form you treated it took me to weep with delight. Extremely happier for this advice as well as have high hopes you comprehend what a great job you have been doing educating the others by way of your webblog. I know that you've never encountered all of us.

I would like to point out my admiration for your kindness supporting individuals who should have help with this study. Your special dedication to passing the message around was exceedingly powerful and has consistently allowed girls like me to attain their goals. The informative guide means a great deal to me and further more to my mates. Thanks a lot; from all of us.

A lot of thanks for your entire hard work on this web site. Ellie really loves participating in research and it's really simple to grasp why. My partner and i learn all about the lively medium you convey practical thoughts by means of your web site and in addition increase participation from other individuals about this concern so my simple princess is actually being taught a great deal. Have fun with the rest of the new year. You're doing a tremendous job.

I must express some thanks to this writer just for bailing me out of this particular difficulty. Because of browsing throughout the online world and coming across methods which are not beneficial, I believed my life was gone. Being alive minus the answers to the difficulties you have solved as a result of your post is a critical case, as well as those which may have in a wrong way damaged my career if I hadn't encountered the website. Your actual expertise and kindness in handling every item was important. I am not sure what I would have done if I had not come upon such a point like this. I'm able to at this point relish my future. Thanks for your time so much for your specialized and sensible guide. I won't hesitate to propose your blog post to any individual who should receive support about this area.

I not to mention my guys have been checking the best guidelines on your web blog then the sudden I had a horrible suspicion I never expressed respect to the web site owner for those strategies. All of the people happened to be as a result stimulated to see all of them and have sincerely been having fun with those things. Thank you for actually being quite kind and for obtaining such useful ideas millions of individuals are really desperate to be informed on. My sincere apologies for not expressing appreciation to earlier.

I am writing to let you know of the helpful experience our princess had checking your site. She even learned a wide variety of issues, with the inclusion of what it's like to have an incredible coaching nature to make certain people without hassle thoroughly grasp specific complicated subject areas. You actually exceeded my expectations. Many thanks for producing such powerful, dependable, explanatory as well as unique thoughts on that topic to Ethel.

A lot of thanks for all your valuable hard work on this website. My mother delights in engaging in research and it's easy to understand why. My spouse and i learn all of the compelling ways you give both useful and interesting thoughts on this blog and therefore improve response from some other people about this topic while our own girl is without question becoming educated a lot. Have fun with the remaining portion of the year. Your carrying out a powerful job.

I not to mention my guys have been studying the nice pointers found on the website while all of the sudden got a terrible feeling I never expressed respect to the site owner for those tips. All of the men are already certainly excited to study all of them and already have certainly been making the most of them. Appreciation for actually being really helpful and also for having this sort of helpful themes millions of individuals are really needing to discover. My sincere apologies for not saying thanks to you earlier.

I actually wanted to write down a small note so as to express gratitude to you for those remarkable secrets you are giving here. My particularly long internet research has now been compensated with awesome tips to talk about with my companions. I would believe that we website visitors are quite lucky to be in a decent community with very many brilliant individuals with valuable techniques. I feel somewhat lucky to have seen your webpages and look forward to so many more fabulous moments reading here. Thank you again for all the details.

I really wanted to write a simple comment to be able to express gratitude to you for some of the magnificent secrets you are showing at this site. My considerable internet research has finally been recognized with reliable concept to share with my colleagues. I would assume that we site visitors actually are very lucky to exist in a superb site with so many awesome people with very beneficial opinions. I feel somewhat lucky to have discovered the site and look forward to plenty of more awesome moments reading here. Thanks a lot once again for a lot of things.

I抦 impressed, I must say. Actually hardly ever do I encounter a blog that抯 both educative and entertaining, and let me let you know, you've hit the nail on the head. Your thought is excellent; the problem is something that not sufficient persons are speaking intelligently about. I'm very completely satisfied that I stumbled throughout this in my search for something referring to this.

I am commenting to let you know of the incredible discovery my wife's girl gained reading through your web site. She came to understand lots of things, including what it is like to possess a great helping heart to have the mediocre ones without problems fully grasp specific extremely tough matters. You truly exceeded people's expected results. I appreciate you for coming up with such invaluable, healthy, educational and also unique tips on your topic to Gloria.

I together with my buddies were actually digesting the nice helpful tips from your site and before long developed an awful feeling I never thanked the web site owner for those tips. All of the boys ended up consequently glad to read all of them and have in effect without a doubt been enjoying those things. Thanks for genuinely indeed thoughtful and also for selecting this kind of quality subject areas most people are really eager to learn about. Our sincere regret for not expressing appreciation to you sooner.

I together with my buddies were found to be looking through the excellent key points from your web page and so before long developed a terrible feeling I had not expressed respect to the website owner for those secrets. My ladies are actually for this reason excited to see them and have in effect certainly been using these things. Thank you for indeed being so accommodating as well as for utilizing varieties of important ideas millions of individuals are really desperate to discover. Our own honest apologies for not expressing appreciation to sooner.

I simply desired to say thanks once more. I'm not certain what I might have worked on without the type of techniques contributed by you regarding that problem. It truly was a very intimidating problem in my opinion, however , encountering this expert technique you treated it forced me to cry over gladness. Now i am happy for the work and then expect you recognize what an amazing job you were putting in teaching most people using your web site. I am certain you've never got to know any of us.

I simply wished to appreciate you once again. I do not know what I could possibly have created in the absence of those thoughts shared by you over this subject. It previously was a very frightening scenario for me personally, but viewing the well-written manner you dealt with that took me to cry for joy. Extremely grateful for your help and in addition hope you really know what an amazing job you are always providing educating men and women all through a site. More than likely you haven't encountered any of us.

I have to point out my respect for your kindness supporting those individuals that really want help on this content. Your real dedication to getting the message up and down had been definitely beneficial and has truly encouraged those like me to attain their desired goals. Your entire informative recommendations means so much to me and somewhat more to my colleagues. Regards; from all of us.

I and also my buddies came digesting the best hints on your site then suddenly got a terrible suspicion I never thanked the website owner for them. All the men had been consequently joyful to see them and have in effect extremely been tapping into them. We appreciate you genuinely well accommodating as well as for selecting this kind of exceptional subject areas most people are really eager to learn about. My sincere apologies for not saying thanks to you earlier.

Thank you for all your labor on this web page. Kate take interest in going through investigation and it's obvious why. My partner and i hear all concerning the lively method you produce rewarding tactics through this blog and as well as recommend participation from other people on the area plus my simple princess is really learning a whole lot. Have fun with the remaining portion of the new year. You are always carrying out a dazzling job.

I not to mention my buddies appeared to be studying the excellent tricks from the blog then all of the sudden I had a horrible feeling I never thanked the web blog owner for those secrets. The ladies had been for that reason thrilled to see them and now have in actuality been having fun with these things. Appreciate your being well helpful and also for obtaining certain good areas millions of individuals are really eager to be informed on. My very own honest regret for not expressing gratitude to you earlier.

I wanted to write you one little bit of note in order to give thanks again for these splendid basics you have contributed in this article. It was quite shockingly open-handed with you to offer unreservedly just what a number of people might have made available for an electronic book to help make some money for themselves, most importantly given that you might well have tried it if you decided. These ideas additionally served to be the fantastic way to understand that some people have a similar eagerness just as my personal own to learn much more with respect to this condition. I believe there are numerous more pleasant periods in the future for those who go through your blog.

I needed to create you a very little remark to be able to thank you once again just for the nice methods you have provided in this case. This has been certainly strangely generous with people like you giving unreservedly all some people might have supplied for an e-book to make some profit on their own, mostly now that you could possibly have tried it in case you considered necessary. Those suggestions in addition worked to become fantastic way to know that many people have a similar fervor similar to my very own to realize many more on the subject of this matter. I'm sure there are many more fun instances ahead for individuals that examine your blog post.

I have to express appreciation to you for rescuing me from this particular situation. Just after searching through the the web and getting ideas that were not beneficial, I assumed my entire life was over. Being alive without the presence of approaches to the problems you've solved by way of the post is a serious case, and those that might have badly affected my career if I hadn't noticed your website. Your personal mastery and kindness in taking care of all the pieces was invaluable. I am not sure what I would've done if I hadn't encountered such a solution like this. I'm able to at this time look ahead to my future. Thanks a lot so much for this professional and amazing help. I will not hesitate to propose the website to anyone who will need tips about this subject.

Thanks for your own labor on this blog. My niece take interest in engaging in internet research and it's really obvious why. Most people hear all regarding the dynamic tactic you give very useful strategies through this website and as well attract response from other individuals on this topic so our favorite child is always discovering a lot. Have fun with the remaining portion of the new year. You are always carrying out a first class job.

I must show my passion for your kindness giving support to folks who actually need help with in this niche. Your very own commitment to passing the message up and down had been particularly valuable and have without exception permitted guys and women much like me to achieve their endeavors. Your interesting advice indicates a great deal to me and especially to my office workers. Thanks a ton; from everyone of us.

I am just writing to make you understand what a nice discovery our child developed viewing the blog. She figured out too many details, with the inclusion of what it's like to possess a wonderful teaching mood to let many others completely have an understanding of some grueling topics. You truly exceeded our desires. Thanks for producing these beneficial, dependable, educational and even unique tips about this topic to Ethel.

Good post. I study something more difficult on completely different blogs everyday. It would always be stimulating to read content from other writers and practice slightly one thing from their store. I抎 choose to make use of some with the content on my blog whether or not you don抰 mind. Natually I抣l give you a hyperlink in your net blog. Thanks for sharing.

ich habe alles installiert und compeliert. Auf den D1_mini übertragen und dann tat sich nichts mehr . im Wifi-Netz wird kein Modul angezeigt. Mit dem Ergebniss kann ich nicht arbeiten. Fertige Bin-Files, die ich testen kann finde ich brauchbarer. Bin entteucht.

I wish to express my respect for your generosity supporting individuals that really need assistance with in this issue. Your personal dedication to getting the message all around had become surprisingly useful and has usually permitted regular people much like me to reach their endeavors. The interesting help and advice denotes a lot to me and extremely more to my colleagues. Thanks a lot; from everyone of us.

Thank you for your entire effort on this blog. My niece enjoys working on internet research and it's obvious why. Most of us learn all about the dynamic tactic you deliver valuable tricks through the website and as well attract contribution from some others on the topic then my girl is truly discovering so much. Have fun with the remaining portion of the year. You are always conducting a superb job.

I wanted to put you this very small note just to give thanks the moment again on your pleasant knowledge you've documented at this time. It was really tremendously generous of you to present without restraint just what numerous people could have supplied for an ebook to earn some dough on their own, even more so given that you might have done it if you desired. The advice likewise served to become a fantastic way to know that most people have the same fervor similar to my personal own to realize way more in terms of this matter. I think there are numerous more pleasurable situations ahead for many who discover your blog.

I'm just writing to make you be aware of of the fabulous experience our child undergone studying your site. She realized numerous pieces, with the inclusion of what it's like to possess a great helping nature to make other individuals very easily thoroughly grasp certain problematic issues. You really surpassed visitors' expected results. Many thanks for displaying these beneficial, dependable, informative and also fun thoughts on that topic to Ethel.

I not to mention my friends have already been reviewing the good items located on your web site while quickly I got an awful feeling I had not expressed respect to the website owner for those secrets. All the young boys had been absolutely joyful to study them and have in effect sincerely been using those things. Appreciate your being simply thoughtful as well as for obtaining such great subject matter most people are really needing to know about. My personal honest apologies for not expressing gratitude to you sooner.

A lot of thanks for each of your labor on this web site. Kate enjoys going through internet research and it is simple to grasp why. Almost all know all regarding the dynamic ways you create sensible solutions on the web site and boost contribution from some other people on the area so our own girl is becoming educated a great deal. Enjoy the remaining portion of the new year. Your conducting a brilliant job.

Thanks a lot for providing individuals with an extremely memorable possiblity to read in detail from this website. It really is very kind and also full of a good time for me personally and my office co-workers to visit your website on the least three times in a week to read the latest items you have. And indeed, we're certainly fulfilled with the magnificent hints you serve. Some 1 areas in this article are without a doubt the finest I have ever had.

I precisely needed to appreciate you all over again. I'm not certain the things I would have done in the absence of those pointers discussed by you on my concern. It actually was a real distressing issue in my circumstances, however , finding out the specialized manner you managed the issue forced me to cry over happiness. Extremely thankful for the information and then believe you really know what a powerful job you're getting into instructing the mediocre ones through your site. I am certain you have never met all of us.

I precisely needed to thank you so much yet again. I am not sure the things that I might have worked on without the type of techniques discussed by you about that concern. Completely was a real horrifying problem in my position, nevertheless looking at a new specialised form you resolved it took me to weep for gladness. I will be happier for the information as well as hope you know what an amazing job your are accomplishing teaching the rest all through your blog post. Probably you haven't encountered any of us.

I must express some appreciation to you for rescuing me from this type of circumstance. Right after scouting throughout the online world and finding methods which are not powerful, I assumed my entire life was done. Being alive without the presence of strategies to the issues you have sorted out by means of your good posting is a critical case, and the ones which could have in a negative way affected my entire career if I had not encountered your website. That mastery and kindness in playing with all the things was vital. I'm not sure what I would've done if I hadn't come across such a subject like this. I can now look forward to my future. Thanks for your time very much for the skilled and results-oriented guide. I won't hesitate to endorse the sites to anybody who would like guidelines about this matter.

I have to express some appreciation to the writer just for rescuing me from this circumstance. Right after browsing through the the net and meeting concepts that were not powerful, I was thinking my life was well over. Living without the answers to the problems you have solved by means of your good article is a crucial case, and the kind which could have in a wrong way affected my career if I had not noticed your website. The talents and kindness in maneuvering all the stuff was very helpful. I'm not sure what I would have done if I had not come upon such a solution like this. It's possible to at this time look ahead to my future. Thank you very much for your high quality and sensible help. I will not be reluctant to refer your site to anybody who needs and wants care about this subject matter.

My husband and i got really contented that Jordan could round up his reports with the ideas he gained through your blog. It is now and again perplexing to just always be giving for free tactics that some others have been selling. And now we take into account we now have the blog owner to be grateful to for that. The specific explanations you've made, the easy site menu, the relationships you aid to promote - it's many overwhelming, and it is assisting our son and the family recognize that the matter is enjoyable, which is extraordinarily essential. Thanks for all the pieces!

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.