Adding centerfire, increase and decrease to your smart Bellfire fireplace solution

In previous article series I provided an overview and step by step instruction how to make you Bellfire fireplace with Mertik Maxitrol controller smart. This project that was presented during the Home Assistant Conference 2020.

In the article series and presentation I focused on the essential controls, basically turning the fireplace on and off. I received number of requests to extend the controls to support increasing and decreasing the fire and also activating the so called center burner.

After doing some research and trial and error I’ve found the combinations for the relays to add these features to your smart fireplace.

Continue reading “Adding centerfire, increase and decrease to your smart Bellfire fireplace solution”

Bellfire home automation project

This article provides you with an overview and links of all articles published around the Bellfire fireplace (Mertik Maxitrol controller) project that was presented during the Home Assistant Conference 2020.

Although this solution is presented around Home Assistant you can easily use the same solution in OpenHab, Domoticz or any other open home automation platform.

Slides

View Automate Everything! How to make your stupid device smart on Notist.

Introduction articles

The steps

Shopping list

  1. The ESPboard: ESP8266 board or ESP32 if you also want to use Bluetooth features on AliExpress.com, Banggood, Amazon
  2. The 4 channel relay board. Make sure you select the 5V version The relay: 5v relay board AliExpress.com or Banggood, Amazon
  3. If you don’t want to solder order:
    – Mini breadboards AliExpress.com or Banggood
    – Dupont cables male-female AliExpress.com or Banggood

Optional tools

Step 5: Wire the relays to the fireplace

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 final step, you can find all steps in the overview how it all going to work article.

Now everything is set. We now can connect the relays to the fireplace and light up the fireplace using Home Assistant.

The wiring

Again very basic wiring is needed.  I need to make sure that I connect the wiring to map the pinout of the fireplace.

If we look at the pin-out on the fireplace, going bottom up.

  • Pin 0 is the common circuit and need to be connected to the COM of all three relay.
  • Pin 1 wires to the Normal Open (NO) port of relay 1
  • Pin 2 wires to the Normal Open (NO) port of relay 3
  • Pin 2 wires to the Normal Open (NO) port of relay 3

See wiring details below.

wiring

That’s it! Now sit back, open Home Assistant and press the ignite button. Your fireplace will now lite up.

Step 4: Configure ESPHome to control the relays from Home Assistant

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 fourth step, you can find all steps in the overview how it all going to work article.

The wiring is now ready, let’s expose three switches to Home Assistant to control the relays.

Expose pins as switches

Open ESPHome and click EDIT on your node. The ESPHome configuration editor will now show. Add following configuration in the bottom of the configuration.

switch:
  - platform: gpio
    pin: GPIO13   #D7
    name: "IN1" 
    id: IN1
  - platform: gpio 
    pin: GPIO12  #D6
    name: "IN2"
    id: IN2
  - platform: gpio 
    pin: GPIO14  #D5
    name: "IN3" 
    id: IN3

Note: The PIN name is translated from the physical D number printed on the ESP to the addressable name used in configurations and programming.  E.g. pin D7 is referred to as GPIO13, all mappings can be found in the image in the ESP Intro section.

UPDATE (thanks Petr): “Fortunately ESPHome knows the mapping from the on-board pin numbers to the internal pin numbering, but you need to prefix the pin numbers with D as in the image below in order for this automatic mapping to occur. In general, it is best to just use the D0, D1, … pin numbering to avoid confusion”

We are adding three switches of the platform type GPIO, this means that the switch will 1:1 control the GPIO pins. For every switch we define the GPIO pin that is controlled, and we provide a name and ID.

Flash the firmware Over The Air (OTA)

That’s it, now flash the firmware of the ESP with the updated firmware based on our new configuration. We do not need to use the flasher tool anymore, we can use the Over-The-Air flash feature to flash the chip with the new firmware over the WiFi Connection. It is as easy as clicking the UPLOAD button.

ESPHome will compile the new firmware, send it over to the ESP that will than flash itself. After flashing the ESP will come back online with the new firmware. It does not get much easier!

Control the relay from Home Assistant

Wait till the ESP has been flashed successful and is connected to the WiFi.

Find your device in Home Assistant, noticed that the device now has 3 entities. Click on the device and you’ll see that it has three switches, called IN1, IN2 and IN3.

Press the switches and enjoy the sound of clicking relays. Every switch should control the matching relay.

Create timing to control the fireplace

To control the fireplace I need to match following sequences with the switches:

  • Ignition, close contacts 1 and 3 simultaneously for 2 seconds
  • Fire off, clos contact 1,2, and 3 simultaneously for 1 second

We need to control the relays in these sequences with the ESP board. We can do this by extending the ESP configuration. We’ll add an Ignition switch that will execute sequences above when turned on and off.

Open ESP home and click edit on the node to go to the configuration editor.

Add a new Switch (right under IN3) with following configuration.

- platform: template
    name: "Fireplace_ignition"
    id: Fireplace_ignition
    turn_on_action:
      - then:
        - switch.turn_on: IN1
        - switch.turn_on: IN3
        - delay: 2s
        - switch.turn_off: IN1
        - switch.turn_off: IN3
        - switch.template.publish:
            id: Fireplace_ignition
            state: ON
    turn_off_action:
      - then:
        - switch.turn_on: IN1
        - switch.turn_on: IN2
        - switch.turn_on: IN3
        - delay: 1s
        - switch.turn_off: IN1
        - switch.turn_off: IN2
        - switch.turn_off: IN3
        - switch.template.publish:
            id: Fireplace_ignition
            state: OFF

Press the Upload to compile, upload and flash the ESP with the new firmware. Test your new switch and verify that the relay react as expected.

Now it’s time to for the last step, time to wire the relays to the fireplace.

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.

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

Investigating options for making the Bellfire fireplace smart

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 four ways of making your dumb devices smart. Let’s jump into the journey of how I made my fireplace smart and the steps that I took through this journey.

The fireplace

Three years back I built a new house. We wanted to have a gas/propane fireplace installed in the house. While ordering I did the normal investigations and comparing different fireplace, we decided to order the Bellfire fireplace. I confirmed that it had a 433MHZ remote, making it easy to automate using a RFXcom. When the house was finished and after using the fireplace a few times, it was time for me to automate the fireplace.

1. Sniffing the 433MHZ signal

I got my good old RFXcom and started to sniff for the remote signals
Nothing happened. No signals where found.

I started investigated the remote and noticed that I had a different version of the remote. After some Googling I noticed that I had the latest version of the fireplace, which is good news, however remote communication was now build based on a Zigbee with a brand-specific layer on top. This makes it hard for me to automate. Forcing me to investigate otherways to make this now dumb fireplace smart.

Don’t get me wrong, I’m very happy that my FIREplace uses an encrypted and more secure communication method than 433Mhz, it just made my automation life a lot harder.

Time for the next option.

2. Googling the “Bellfire homeautomation”

I start searching for “Bellfire homeautomation” which didn’t have any results that provided a solution to making the Bell fire smart.

One of the results was a Wi-Fi module that you could buy from Bellfire. This would make the device smart, but there where no open APIs or ways to integrate the fireplace with Home Assistant

Time do go one level deeper.

3. Time to open the maintenance latch of the fireplace

In the maintenance latch I located a controller. The controller was a Maxitrol from Mertik. I found the manual and it stated four pins for external operations.

Now I needed to find out what communication and interaction that connection accepted. After more research on the internet I stumbled on documentation of how to ignite and turn off the fireplace using the pins.

This manual shows that if I want to ignite the fireplace I need to close the contact 1 and 3 for two seconds.
And to turn off the fireplace I need to close Contacts 1, 2 and 3 for only one seconds.

This gives me something to work with! Next challenge how am I going to create these interactions with switches that I can control from Home Assistant. I need to get some relays!

Let’s introduce a relay is in the next article.