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

76 Comments

Just desire to say your article is as astounding. The clarity on your submit is simply excellent and that i can suppose you are an expert in this subject. Fine with your permission allow me to grasp your RSS feed to keep updated with coming near near post. Thanks one million and please continue the rewarding work.|

Thanks for the wonderful posting! I actually relished reading through it, you're a wonderful author. I will make sure to bookmark your website and can often come back eventually. I choose to inspire a single to continue your terrific work, Possess a awesome night! sasilu.se/map39.php lock f?¶r ?¶rat yrsel

I actually wanted to make a message so as to say thanks to you for these great instructions you are placing at this site. My time consuming internet lookup has at the end been rewarded with excellent know-how to write about with my friends and family. I 'd declare that many of us readers are undoubtedly lucky to be in a fine network with many perfect individuals with useful pointers. I feel extremely lucky to have discovered the weblog and look forward to some more awesome times reading here. Thanks once more for everything.

Thanks a lot for providing individuals with remarkably special chance to read articles and blog posts from here. It is always very cool plus jam-packed with a great time for me personally and my office fellow workers to visit your website at minimum thrice a week to learn the latest items you will have. And indeed, I am certainly fulfilled with the tremendous techniques you serve. Selected two areas in this post are indeed the simplest we have had.

My husband and i were so cheerful when Emmanuel managed to carry out his reports through the ideas he received while using the web pages. It is now and again perplexing to simply happen to be releasing points some people could have been making money from. And we also fully understand we have you to appreciate for this. These illustrations you have made, the straightforward web site navigation, the friendships your site make it possible to instill - it is mostly unbelievable, and it's leading our son and us understand the subject is pleasurable, and that's exceptionally mandatory. Thank you for all the pieces!

Thanks a lot for giving everyone remarkably pleasant possiblity to read articles and blog posts from this web site. It can be so excellent and as well , packed with a lot of fun for me personally and my office fellow workers to search your web site more than 3 times in a week to study the fresh stuff you have. And lastly, I'm also usually amazed with your effective advice served by you. Some 3 tips in this article are honestly the very best we have had.

My spouse and i got absolutely glad when Peter could do his researching by way of the precious recommendations he had out of your site. It's not at all simplistic to just always be freely giving key points people today have been making money from. And we all understand we need the writer to appreciate because of that. The explanations you have made, the simple site menu, the friendships you give support to instill - it's everything superb, and it's helping our son and the family believe that the subject is satisfying, and that's especially indispensable. Thank you for everything!

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.

When I initially commented I seem to have clicked on the -Notify me when new comments are added- checkbox and from now on each time a comment is added I receive 4 emails with the exact same comment. There has to be a way you are able to remove me from that service? Thank you!|

I and also my buddies appeared to be following the excellent tips located on your web blog and then the sudden got a horrible feeling I had not thanked the web blog owner for them. Those boys became absolutely excited to read them and have seriously been enjoying those things. Many thanks for really being well thoughtful and then for opting for this sort of important areas most people are really wanting to be aware of. Our own honest apologies for not expressing gratitude to sooner.

I simply desired to say thanks once more. I'm not certain the things I might have carried out without the entire methods documented by you concerning this field. This has been an absolute frightening crisis in my position, but taking note of this specialised mode you treated it made me to cry with delight. Extremely thankful for this information and thus hope you find out what a great job that you are doing instructing the rest through the use of your site. Probably you haven't got to know all of us.

I and also my guys were going through the great secrets on your site and so suddenly came up with a horrible feeling I never thanked the web blog owner for those tips. The young boys were as a consequence thrilled to read through them and have in effect clearly been loving these things. Appreciation for turning out to be quite kind and also for considering certain great ideas most people are really needing to know about. My honest apologies for not expressing gratitude to earlier.

I simply wanted to appreciate you yet again. I do not know the things that I would have handled in the absence of the aspects provided by you regarding such a subject matter. It was actually a real distressing situation in my position, but considering a specialized form you managed that forced me to weep with joy. I am thankful for this information and as well , wish you are aware of a powerful job you are always providing instructing most people via your web blog. I am certain you've never come across all of us.

Thank you a lot for giving everyone such a marvellous possiblity to discover important secrets from this site. It can be very beneficial and also full of a great time for me and my office mates to search your site nearly 3 times in 7 days to study the new stuff you have got. And of course, we're actually fascinated with the magnificent information served by you. Certain 1 tips in this post are really the very best we have all had.

I must express my gratitude for your generosity supporting folks who have the need for assistance with your idea. Your personal commitment to passing the message all around was incredibly interesting and have usually empowered guys and women much like me to attain their pursuits. Your new important advice implies so much a person like me and far more to my colleagues. Thanks a ton; from all of us.

Thanks for all of your labor on this web page. My niece takes pleasure in participating in investigations and it's really easy to see why. My partner and i know all concerning the dynamic medium you give insightful solutions via the web site and even increase contribution from the others on the content while our favorite simple princess is now discovering a lot of things. Enjoy the rest of the new year. You are always performing a useful job.

I'm also writing to let you be aware of of the extraordinary discovery my princess went through browsing your blog. She figured out too many pieces, most notably what it's like to have an excellent helping character to make the rest without problems learn about a variety of hard to do subject areas. You truly surpassed visitors' expectations. Thank you for presenting the warm and helpful, safe, revealing and even cool tips on your topic to Mary.

Thank you a lot for providing individuals with an extraordinarily wonderful opportunity to check tips from this website. It is usually so enjoyable and packed with fun for me and my office friends to visit your site more than 3 times in a week to read through the latest guides you will have. And of course, I am also certainly contented with your astounding pointers you serve. Selected 1 ideas in this posting are undoubtedly the most suitable we have ever had.

I just wanted to construct a simple note to appreciate you for all the unique guidelines you are giving out at this website. My considerable internet lookup has finally been paid with extremely good suggestions to go over with my pals. I would admit that most of us readers actually are definitely lucky to live in a fantastic site with so many lovely people with valuable points. I feel pretty privileged to have seen your entire weblog and look forward to some more entertaining minutes reading here. Thank you again for a lot of things.

My husband and i felt really glad Peter managed to deal with his survey through the entire ideas he received through your web pages. It is now and again perplexing to simply always be handing out information and facts which a number of people may have been selling. Therefore we fully understand we have the writer to thank because of that. The entire illustrations you've made, the straightforward blog menu, the friendships your site aid to create - it's mostly remarkable, and it's aiding our son in addition to us feel that that article is cool, which is certainly really indispensable. Thanks for everything!

I as well as my pals came digesting the great techniques from your website and so all of a sudden got a horrible feeling I never expressed respect to the site owner for those secrets. Those people were consequently very interested to learn all of them and have now without a doubt been loving them. Many thanks for simply being really kind as well as for pick out these kinds of superior resources most people are really needing to be aware of. My honest regret for not saying thanks to earlier.

I must convey my admiration for your generosity supporting men and women who require help with your content. Your personal dedication to getting the solution along turned out to be astonishingly valuable and has continually allowed girls just like me to realize their goals. Your useful recommendations denotes this much a person like me and somewhat more to my office colleagues. Regards; from all of us.

Needed to create you one very small remark to be able to thank you so much once again for your personal pleasing tips you've documented here. It has been unbelievably generous with you to provide unreservedly just what a lot of people might have made available as an electronic book in order to make some bucks on their own, certainly considering the fact that you could have tried it if you ever decided. Those things also worked to be the fantastic way to fully grasp that the rest have similar dream just like mine to grasp more with reference to this matter. I think there are lots of more fun occasions up front for people who read through your blog.

I just wanted to develop a simple note to be able to say thanks to you for those awesome strategies you are showing at this site. My extensive internet research has at the end of the day been honored with reliable strategies to write about with my good friends. I 'd assume that many of us website visitors are definitely blessed to exist in a really good place with many brilliant professionals with valuable points. I feel truly grateful to have used your entire site and look forward to many more enjoyable moments reading here. Thanks a lot again for all the details.

My husband and i were really joyful when Michael managed to deal with his homework by way of the ideas he was given using your weblog. It is now and again perplexing to just continually be handing out strategies which usually others may have been selling. And now we remember we have got you to thank because of that. The main explanations you made, the simple blog navigation, the friendships your site make it possible to engender - it's got mostly remarkable, and it is assisting our son in addition to us feel that the subject is excellent, which is tremendously indispensable. Thank you for the whole lot!

I needed to write you that little bit of remark to finally give thanks as before on your pleasant secrets you've provided here. It has been so shockingly generous with people like you to supply openly just what a lot of folks would have sold for an ebook to end up making some dough for their own end, mostly now that you might have done it in case you wanted. The basics additionally worked like the great way to be certain that most people have a similar zeal similar to mine to understand more and more with reference to this condition. I am certain there are thousands of more enjoyable times up front for those who view your site.

I want to show some appreciation to you just for rescuing me from such a matter. Because of checking through the the net and coming across solutions which were not beneficial, I believed my entire life was gone. Existing devoid of the approaches to the difficulties you have resolved through your good posting is a serious case, and the ones that might have in a negative way affected my entire career if I hadn't encountered your blog. Your main expertise and kindness in dealing with almost everything was very useful. I'm not sure what I would have done if I had not discovered such a subject like this. I'm able to now look forward to my future. Thanks a lot very much for this expert and effective guide. I will not hesitate to endorse your web sites to any person who should receive support about this subject matter.

I have to convey my love for your kind-heartedness giving support to persons who have the need for guidance on your subject matter. Your special dedication to getting the solution all-around became certainly useful and has consistently empowered girls like me to realize their ambitions. This useful suggestions can mean this much a person like me and additionally to my fellow workers. With thanks; from each one of us.

I simply desired to say thanks once again. I am not sure the things that I would've gone through in the absence of the actual methods documented by you about such field. Entirely was the frustrating crisis in my opinion, however , seeing the professional avenue you resolved the issue made me to leap for contentment. I will be happy for this information as well as hope you realize what a powerful job you're carrying out instructing the rest via a blog. Most likely you've never come across all of us.

A lot of thanks for your whole hard work on this web page. Ellie really loves participating in internet research and it's obvious why. All of us notice all relating to the compelling mode you produce valuable tips and tricks via the blog and as well boost response from other people about this area so my girl is truly being taught a whole lot. Have fun with the rest of the new year. You have been conducting a first class job.

I and my pals were actually taking note of the best things found on the website while suddenly I got an awful suspicion I had not thanked the blog owner for them. All the young men had been so passionate to learn all of them and already have in actuality been loving these things. Many thanks for actually being really accommodating and also for making a decision on such good issues millions of individuals are really desirous to learn about. Our honest apologies for not expressing appreciation to sooner.

My wife and i have been now joyous that Albert could carry out his preliminary research by way of the precious recommendations he got using your site. It's not at all simplistic to simply find yourself giving away points that many many others have been trying to sell. We really understand we have the blog owner to be grateful to because of that. The type of illustrations you've made, the straightforward website menu, the relationships you assist to engender - it's got most incredible, and it is letting our son in addition to our family consider that the issue is brilliant, which is particularly vital. Thanks for all the pieces!

I actually wanted to jot down a small remark to be able to appreciate you for the great advice you are giving out at this website. My time-consuming internet look up has now been compensated with reasonable concept to go over with my best friends. I would admit that many of us visitors actually are unquestionably endowed to exist in a remarkable website with so many marvellous people with very beneficial plans. I feel quite lucky to have seen your webpage and look forward to plenty of more amazing times reading here. Thank you again for everything.

I just wanted to compose a quick note to thank you for these fabulous concepts you are placing at this site. My prolonged internet research has finally been honored with awesome facts to share with my great friends. I would express that most of us readers actually are quite endowed to dwell in a great website with so many wonderful professionals with very beneficial techniques. I feel really blessed to have discovered the webpages and look forward to many more amazing times reading here. Thanks again for a lot of things.

I enjoy you because of your whole efforts on this site. Betty enjoys carrying out internet research and it's really simple to grasp why. Most of us notice all relating to the powerful ways you make both interesting and useful items on this web blog and as well welcome participation from other ones on the point then our daughter is truly learning a lot of things. Take advantage of the rest of the new year. You are carrying out a stunning job.

Thanks so much for giving everyone an extraordinarily superb chance to read in detail from here. It is always so pleasing and jam-packed with a lot of fun for me personally and my office co-workers to visit your blog the equivalent of 3 times weekly to find out the newest guidance you have. And indeed, I'm always contented considering the superb tips and hints you give. Some 1 tips in this post are in fact the most impressive we have all had.

I have to get across my passion for your kindness in support of men who really want assistance with this particular idea. Your real commitment to getting the solution all around appeared to be remarkably powerful and has helped ladies just like me to arrive at their targets. Your entire useful tutorial can mean this much a person like me and further more to my office workers. Thanks a lot; from each one of us.

I and also my buddies appeared to be taking note of the best secrets located on your web site while suddenly I had an awful feeling I had not expressed respect to the site owner for those secrets. My boys had been as a result happy to learn them and have now clearly been tapping into these things. I appreciate you for truly being indeed kind and then for picking out certain brilliant tips millions of individuals are really eager to learn about. Our own sincere regret for not expressing appreciation to you sooner.

Needed to put you the tiny observation in order to say thanks once again on the superb strategies you've shared on this site. It was so pretty open-handed of you giving easily what a few people could have offered for sale for an e-book to earn some money for themselves, particularly seeing that you could have tried it if you wanted. The good ideas in addition acted to be the fantastic way to recognize that other people online have the identical dream like my own to grasp somewhat more regarding this matter. I am certain there are thousands of more fun sessions up front for many who scan through your blog post.

I precisely desired to thank you very much yet again. I am not sure the things that I could possibly have done in the absence of the recommendations contributed by you directly on such a area. It was actually a real distressing difficulty for me, nevertheless observing the specialised mode you resolved the issue forced me to jump for delight. I'm grateful for this advice and in addition expect you find out what a powerful job you are undertaking instructing many others thru your website. I know that you've never met any of us.

A lot of thanks for all of your work on this web page. My mom really likes managing research and it is easy to understand why. My spouse and i notice all of the lively way you make practical tips and hints through your website and as well foster response from website visitors on this situation so our favorite princess is always starting to learn a great deal. Enjoy the rest of the new year. You are always conducting a stunning job.

I definitely wanted to send a simple word in order to say thanks to you for these wonderful tips and tricks you are posting at this website. My long internet lookup has now been recognized with professional know-how to write about with my visitors. I would point out that many of us readers are quite blessed to dwell in a perfect place with many brilliant professionals with very beneficial tips. I feel really privileged to have come across the weblog and look forward to so many more excellent moments reading here. Thanks a lot again for a lot of things.

I am glad for writing to make you be aware of of the amazing experience my daughter gained going through your webblog. She mastered so many things, including what it's like to have a wonderful helping nature to get many people clearly know just exactly a variety of extremely tough matters. You truly exceeded her desires. I appreciate you for supplying the practical, trusted, educational and also cool tips on this topic to Jane.

I intended to write you one bit of remark to be able to thank you as before for your personal spectacular pointers you've shared on this website. It's quite shockingly generous of you in giving publicly just what a lot of folks could possibly have offered for an e book in order to make some bucks for their own end, principally considering the fact that you could have tried it if you ever wanted. The secrets also served to become a good way to fully grasp that other people online have the same dream much like my own to realize a great deal more when it comes to this matter. I know there are some more pleasurable sessions up front for individuals that look into your blog post.

I simply wanted to send a brief message in order to appreciate you for those fabulous advice you are sharing on this website. My time-consuming internet lookup has finally been recognized with pleasant concept to exchange with my pals. I would mention that most of us readers are very much lucky to dwell in a fabulous place with many marvellous individuals with valuable tips. I feel pretty grateful to have come across your web site and look forward to tons of more entertaining minutes reading here. Thank you once again for all the details.

I precisely had to thank you so much once more. I am not sure the things that I might have tried in the absence of these hints shared by you directly on that situation. Completely was an absolute terrifying case in my view, however , taking a look at the very skilled approach you treated the issue took me to cry for delight. Now i'm happy for this information and thus sincerely hope you comprehend what a powerful job you are accomplishing educating people with the aid of a web site. Most likely you have never come across any of us.

I am glad for writing to let you understand of the remarkable experience my wife's daughter encountered browsing your blog. She even learned a good number of things, which include how it is like to possess an amazing coaching heart to have certain people quite simply grasp a variety of very confusing issues. You truly did more than her desires. Many thanks for showing those necessary, trustworthy, informative and in addition cool tips on your topic to Gloria.

I needed to send you this little bit of observation just to thank you very much again over the remarkable pointers you've provided in this article. It was simply seriously open-handed of you giving unreservedly what numerous people would have marketed as an e-book to get some money on their own, especially since you might well have done it if you decided. These techniques likewise acted to provide a easy way to be certain that other people have a similar desire just as my very own to understand more and more on the topic of this issue. I'm sure there are several more pleasurable periods in the future for many who look over your site.

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.