Step 2: Flash ESP chip with ESPHome node firmware

This article is part of the Make your Bellfire fireplace smart project that I presented during the Home Assistant Conference 2020.

UPDATE: This article has been updated to reflect the changes in Home Assistant and ESPHome. Read the updated article to flash ESPhome on your ESP32 / ESP2866 NodeMCU board.

It’s time to execute the second step, you can find all steps in the overview how it all going to work article.

Make sure you have some ESP boards ready to go, you can buy ESP boards few dollar on AliExpress. Buy the ESP32 variant if you need Bluetooth (BLE) connectivity.

Now we need to load the configuration of your node to the ESP board. I recommend flashing the firmware from your local laptop and a USB cable, using the Flasher tool from ESPHome. Let’s get started.

Compile firmware

We need to start by compiling the firmware that we’ll use to flash the ESP chip.
In ESPHome select the menu of your node (three dots (…) in the top right of your node) and select Compile.

ESP home will now compile your firmware. After the compilation is finalized you can download the firmware.  Download and store the file somewhere you can find it later on.

Flash ESP with compiled firmware

Now we’re going to flash the ESP firmware with your compiled firmware.

  • Go to the esphome-flasher GitHub page and download the flasher for the OS you’re using. There is a esp home flash tool for macOS, Ubuntu and Windows :
    https://github.com/esphome/esphome-flasher/releases
  • Connect your ESP board with USB to your laptop.
  • Open the flasher tool
    • Serial port: select COM port where the board is connected (there is probably only one option 😊).
    • Firmware: Browse to the location where you downloaded your compiled firmware and select your firmware.
    • Click Flash ESP and wait
  • The ESP will be flashed now, you can follow the progress in the console window. When finished writing the firmware the ESP will restart and connect to your WiFi.
The ESP will be ready after it states that it’s ready for Over-The-Air Updates and that he API server is ready.

All good so far, now configure the device in Home Assistant.

Configure device in Home Assistant

Home Assistant will automatically recognize the ESP on the network and notify you about the new device found.  Click on the notification or click Configuration, Integrations. Find the new discovered device and click configure.

Provide the OTA password that you set during step 3 when you created the node in ESPHome.

Home Assistant will now add your ESP as a new device, there is not much you can do with the device as there are no entities to control.

In the next article, we’ll wire the relay to the ESP board.

Step 1: Install ESPHome in Home Assistant and create first Node

This article is part of the Make your Bellfire fireplace smart project that I presented during the Home Assistant Conference 2020.

It’s time to execute the first steps, you can find all steps in the overview how it all going to work article.

Install ESPHome

Installing ESPHome in Home Assistant is really easy. Go to Supervise, Add-on Store and search for ESPHome.

After installation starts the Add-On, make sure you select that ESPHome is visible in the side menu.

Create first Node

  1. Click on ESPHome in the sidemenu of Home Assistant, ESPHome will load.
  2. Click the green + icon in the button right corner to add a new node.
  3. Complete the new node wizard steps
    1. Node Name: provide the name of your node. Note: only lowercase and no spaces
    1. Device Type: Select the board you are using. I’m using the ESP8266, NodeMCU board.
    1. WiFI & Updates:
      1. Provide your WiFi network details
      1. OTA password: password use to integrate with Home Assistant and to flash the firmware in the future using WiFi.
  4. Finish: Click Submit. Congratulations, you created your first node.
More detailed steps can be found on the ESPHome site. They have a very detailed getting started guide.

Now we need to compile this node and flash the ESP with the firmware.

Home Assistant to Fireplace, how will it work together

This article is part of the Make your Bellfire fireplace smart project that I presented during the Home Assistant Conference 2020.

We now have all ingredients for our solution, covered in the in the previous articles in this series. Before we start building, let’s take a look at how this all will work together end-to-end.

  • Home Assistant, as home automation platform and for user interactions and automation
  • ESP chip low cost connected controller hardware, providing GPIO pins to control the relay and WiFi connectivity
  • ESPHome software that run’s on the ESP, providing the ability to configure actions with the relay and communication with Home Assistant.
  • Relay board with multiple relays that can control switches providing high or low power as input

In six simple steps we’ll make the fireplace smart.

  1. Install ESPHome in Home Assistant and create ESPHome node
  2. Flash ESP chip with vanilla ESPHome firmware
  3. Wire the relay to the ESP
  4. Configure ESPHome to control the relays
  5. Wire relays to fireplace
  6. Light fireplace!

That’s it, let’s go and start building this out! The next article will cover installing ESPHome in Home Assistant and reating your first ESPhome node.

Boom Emoji, Apple style

Introducing ESPHome

This article is part of the Make your Bellfire fireplace smart project that I presented during the Home Assistant Conference 2020.

In the previous article, we introduced ESP boards and Relays that will help to switch the Bellfire fireplace pins of the controller. Now we need to control software that connect the ESP to Home Assistant and that can control the relays using the ESP GPIO pins. We are going to do this with an ESPHome.

ESPHome — ESPHome

ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems like Home Assistant.

ESPHome is amazing, it’s extremely powerful and, more important very stable. It has never failed me. The integration with Home Assistant is seamless, including autodiscovery within Home Assistant and one-click configuration.

If you want, you can build advanced sensors with it. The good thing is that sensors are supported natively by ESPHome and can be used by easy configuration. The possibilities with ESPHome and Home Assistant are endless; the blocking factor is your own imagination.

Key features

  • Easy to work with, no programming needed
  • Seamless integration with Home Assistant
  • Over-The-Air flashing of the firmware
  • Supports a long list of devices.

We’ll use ESPHome to connect the ESP to Home Assistant and to control the relays using the GIO pins.

So we have Home Assistant, a relay, a ESP board, ESP home and a fireplace…. How is this all going to work together? I’m going to tell you that in the next article.