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.

Introducing ESP / NodeMCU boards

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 Relays that will help to switch the Bellfire fireplace pins of the controller. Now we need to control the relays, we going to do this with an ESP board.

ESP boards are a low cost Wi-Fi chips that have built in flash chips allowing you to build a single chip device capable of connecting to Wi-Fi. newer versions like the ESP32 boards also provide you BLE (Bluetooth low energy) and there’s loads of variety of boards you can use.  

For this project, I’m using the ESP8266, NodeMCU board.  I prefer using a Development Board because it comes with a USB and all the pins are pre-soldered, making it easy to use. You can buy this board at your favorite Chinese shop somewhere for a price between 3-10 euros. I usually buy them at AlieExpress (cheap) or Amazon (faster delivery).

For the fireplace we are going to use the Digital pins D5, D6 and D7 to control the three relays on the board. Be aware that the printed names of the pins like D1 need to be translated to the according to GPIO number to address them in your code and configuration. I will refer to this image in the configuration section.

Now we have the relay and the ESP to use as a controller. Now we need software that will run on the ESP. Software that we can be used to expose the relays as switches to Home Assistant and define interaction with the GPIO pins on the ESP.  ESPHome is the perfect solution for this.

The next article will introduce ESPHome.

Introducing Relays

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

In previous article I addressed a way to make a Bellfire fireplace smart using the pins of the controller. To do this we need to use relays.

What is a relay?

In really short; A relay is an electrically operated switch.

How does it work?

A relay has two circuits:

  1. The control circuit.
    This circuit is used to control the switch, switching the control circuit will change the state of the load circuit switch
  2. The load circuit.
    The load circuit is where you connect the device that you want to interact with.

Both circuits are separated circuits, there is no direct connection or current flow between the control and the load circuit. This makes using relays very safe.

There is multiple variations of switching the load circuit. For usage with the ESP boards and 5v I prefer using Optocoupler relays. The switch is controlled using light and a photosensor to control the switch. Ensuring 100% separation of circuits.

For this solution, I’m using one board with 4 relays on it. You can buy it for a few dollars on AliExpress.

On the left we have IN top control the board; this is where you provide it with Power and one input to control every relay.

For OUT there are three outputs per relay:

  • Normal Close (NC)
  • Common, to close the circuit
  • Normal Open (NO)

You always connect the Common, but you need to choose between Normal Open and Normal Close. The difference between NO and NC is the default behavior for the relay if it is not power/switched on. If you select Normal Open the circuit will be not closed in a default state, when you use the Normal Close the relay will have a closed load circuit in a default state. 

Now we know we can use relays as a solution for the switches. But how are we going to control the relays? We need a solution to switch the controller circuit using high with voltage to close the control circuit and low voltage to open.  We need a controller for the relay, this is where the ESP boards come in.

The next article will introduce the ESP boards.

Speaking at the Home Assistant conference

At the end of October, the Home Assistant conference was announced. I’m very excited about home automation and sharing my knowledge. So I decided to submit a talk for the conference. Last week I received the good news that I’ve been selected as a speaker and have the honor to talk as one of the few during the conference.

I strongly recommend you to join the conference, it’s a virtual conference and you can just follow along from your couch. The conference has three tracks with amazing sessions. To help you pick your session, hopefully my session :), I would like to share with you more details of my 30-minute session.

Automate everything! How to make your stupid devices smart

Dec 13 9:00PM–9:30PM (CED – Central European time)
Advanced Track

Sounds great? But what’s the story

Three years ago I build our new house. In the new home, we wanted to have a gas (propane) fireplace. When selecting the fireplace I investigated integration options, the fireplace specs claimed 433MHZ remote controller. This 433MHZ remote should be easy to integrate with Home Assistant. After the fireplace was installed in the house I figured out that I received the new version of the fireplace. Which is always great, but the remote was updated to communicate with a variant of Zigbee. Meaning that I couldn’t integrate with Home Assistant.

During the conference, we will follow the story of how I managed to make my fireplace smart. Highlighting different options and routes available to make devices smart.

Wrapping up by sharing the final solution that made my dumb fireplace smart. I will show you how easy it is to make your dumb devices smart by using ESPHome, a cheap ESP WiFi board, relay modules, some basic wiring (no soldering), and a few lines configuration.

I’ll prove how easy it is by doing an end-to-end live demo and if everything goes well we will light up the fireplace in the last minute of the session*.

*only if demo gods are in favor

Get your 1$ conference ticket and join me in this session where I’ll take you along in the learning journey of my fireplace smart. Get inspired and join the movement, automate everything!

ESPeasy rules for Bellfire fireplace / mertik maxitrol

A back-up of the ESP easy rules that that I used to control my Bellfire fireplace . You can find the end-to-end integration of the Bellfire fireplace with Home Assistant here.

ESPeasy rules

//GIO14 == Relay 1
//GPIO4 == Relay 2
//GPIO 12 == Relay 3

on IGNITION do
  // Close relays contacts 
  gpio,14,1 
  gpio,12,1
  timerSet 1,1 // 1 second delay
  Publish,/fireplace/status,event,IGNITION
  
endon

On Rules#Timer=1 do 
   ///Open relays contacts 
  gpio,14,0
  gpio,4,0
  gpio,12,0
 
endon

on FIRE_OFF do
  // Close relays contacts 
  gpio,14,1 
  gpio,4,1
  gpio,12,1
  timerSet 1,1 // 1 second delay
  Publish,/fireplace/status,event,FIRE_OFF
endon

on SECONDBURNER_ON do
  // Close relays contacts 
  gpio,14,1 
  gpio,4,1
  timerSet 1,1 // 1 second delay
  Publish,/fireplace/status/centerfire,event,SECONDBURNER_ON
endon


on SECONDBURNER_OFF do
  // Close relays contacts 
  gpio,4,1 
  gpio,12,1
  timerSet 1,1 // 1 second delay
  Publish,/fireplace/status/centerfire,event,SECONDBURNER_OFF
endon

on INCREASE_FIRE do
  // Close relays contacts 
  gpio,14,1 
  timerSet 1,3 // 1 second delay
endon

on DECREASE_FIRE do
  // Close relays contacts 
  gpio,12,1 
  timerSet 1,3 // 1 second delay
endon

Wiring photos

Wiring to controller
Wiring from ESP to relay

Hope this helps.