BK-G4M Gas Meter – Home Assistant

Updated – 12May 2024

I wanted to measure the volume of gas taken by my Ideal Vogue 18kW boiler in order to convert this to input energy in kW and therefore determine if the boilers displayed efficiency is accurate.

I decided to get a secondary gas meter fitted inline with the gas feed to the boiler, the meter was a BK-G4M from HERE.

The meter comes with a prewired switch assembly to count the number of 1/100 of m3 wheel rotations:

I’m a complete novice when it comes to Home Assistant and rely wholly on YouTube, community forums and search engines for information, and I would like to pass my sincere thanks onto all content creators who help folks like me.

I used a ESP8266 flashed from within Home Assistant with the coding configuration to enable the meters switch to increment the displayed gas reading on the dashboard of Home Assistant.

Current code used below:

The above code gives a stable output to Home Assistant with no creep over time 🙂

Once the data is being imported into Home Assistant you can manipulate in many ways:

ESP8266 mounted on breakout board from Aliexpress, the other items within the enclosure are an M-Bus reader and Open Energy Monitor Pi for my heat meter.

Links to Sources –