Beer Keg Scale – ESP32 + ESPHome + 4× HX711 + OLED + Home Assistant

Hi everyone! :beer:

I’d like to share a project I’ve been working on – a smart beer keg scale built with ESP32 and ESPHome, integrated into Home Assistant.


:beer: Beer Keg Scale

A DIY scale that sits under your keg in the fridge and tells you exactly how much beer is left – in kg and number of remaining half-pints.




:sparkles: Features

  • 4× load cells (HX711 24-bit ADC) with median + EMA filtering for stable readings
  • OLED display (SH1106 128×64) showing beer content in kg and beer count in real time
  • Two-step calibration (A: store zero / B: calculate scale) with persistent flash storage – survives restarts
  • Full Home Assistant integration via ESPHome API – sensors, controls, automations
  • Web interface on port 80
  • OTA firmware updates
  • Offline mode – works without Wi-Fi or HA
  • Automatic beer count (1 beer = 0.505 kg half-liter)
  • Adjustable empty keg offset with quick buttons for 10 / 15 / 30 / 50 L kegs

:wrench: Hardware

Component Spec Qty
ESP32 DevKit v1 38-pin
HX711 24-bit ADC
Load cell 20 kg bar type
OLED SH1106 128×64 I2C

Total cost: ~$30 USD


:house: Home Assistant Dashboard

The included HA-Dashboard.yaml uses Mushroom cards and shows beer content, beer count, keg offset slider, and quick-set buttons for common keg sizes.


:package: GitHub

Full documentation, wiring diagrams, ESPHome config, and HA dashboard card:
:point_right: GitHub - Samot89/Beer-Keg-Scale: Smart ESP32-based scale for real-time beer keg monitoring with Home Assistant integration, OLED display, and two-step calibration. · GitHub

Happy to answer any questions or hear your suggestions! :tada:

4 Likes

NICE!!! DO YOU HAVE THIS AT HOME? :smiley:

Thank you, yes, I do

1 Like

Home automation at its best! I love this. I don’t have a keg fridge but this would be a must have.

I did something very similar to this for measuring propane tanks for my grill and smoker. Unfortunately in my case (and confirmed by others) the load cell readings were significantly affected by temperature changes so they weren’t as reliable as I’d hoped. They would swing by as much as 5% over a temp range of 70 to 40 degrees F. So I no longer use them but I still have both of the scales I made and hope to find some use for them some day.

But that shouldn’t be an issue in your case since you are using them in a temperature controlled environment.

I even suggested my original set up to a guy at work for use for exactly the same thing but I don’t think he’s ever implemented it yet. maybe I’ll send him to your github for some inspiration. :smile: