Adding scales to ESPhome

Hello, Im very new to all of this and Im following a tutorial that shows you how to make scales to go under beer kegs so you know how much beer you have left in the keg. The scales use load cells connected to a HX711 amplifier board which then sends the signal to an esp8266 board.
Ive installed home assistant on a raspberry Pi 2 (I found a Pi 2 install file) Ive also added esphome and configured and installed a YAML file onto my ESP32. (Well I think I have anyway).
When I go into esphome within HA I see the attached image.

The next step of the project the guy says to do this…
Once Home Assistant is installed, install ESPHome from Settings→Add-ons to add your scale to Home Assistant. Plug the scale into the computer running Home Assistant. In ESPHome, choose to install a new device. Follow the prompts to complete the installation.

What does he mean by plug the scale into the computer? Does he mean the esp32 with the scales connected? And if so what computer do I plug the esp32 into? My Rpi as thats what’s running home assistant? Im very confused and would appreciate some help.

The instructions you are referring to are configuring the esp32 with its yaml code. It sounds like you may have already done this?

The “plug in” part of the instructions are due to the fact you need a method to initially setup the yaml in the esp device. This is done with a “hardwired” connection initially but can be done wirelessly, ota “over the air” once the device is initially setup.

1 Like

I think you’re gonna have trouble compiling ESPHome YAML on this. I had a Pi3 that would crash when compiling all but the most simple of code due to running out of RAM. Before I moved to an old laptop that I currently HA on, I just compiled it on my windows laptop.

1 Like

But I already have the esphome yaml installed on the rpi2, havent I? Isnt that whats in the screen shot?

Ahh ok yeh I get the part about once its been setup via usb I can then setup OTA.
So once I have my scales and they are connected to the esp32 device where do I go into the HA page to setup cards for the scale display?

No, you’ve just written the code. Clicking the 3 dots and install is when it will actually compile and install wirelessly (or you’ll download the file and install via serial connection for the first time).

I can pretty well guarantee it will crash your Pi during compiling.

From your screenshot the “overview” on the left hand side is your “dashboard” there should be an edit option with three dots on top right hand side where you can add cards.

1 Like

Ok so you recommend I should buy a RPi4?

Ok thank you I will play around with that tonight when Im home. Thanks very much.

Not an expert, but my understanding is a Pi2 is just too underpowered for HA anymore.

I ran mostly okay with a Pi3 (excluding compiling ESPHome projects as I mentioned, which you can do that on a separate PC).

I’m currently using a quite old laptop I had lying around, which has been working very well. I also have a Pi4 for a HA server I have in my travel trailer. There are TONS of hardware options for running HA; it really just comes down to personal preference as well as what you may already have on-hand.

1 Like

I only want to use HA to connect some load cells for weighing beer in my kegs and telling me how much beer I have left. I will dispaly this on cards on an old Ipad I have.
I wont be adding anything else to it. Would an RPI do for this as I prefer something that is always on?

Otherwise I have an old Mac Mini I could use but I wasnt sure if I can install HA on the mac mini as I didnt understand all of this virtual machine stuff in the MAC install instructions?

For sure a Pi will be more than sufficient. Outside of the compiling thing, a Pi3 will still be overkill for your needs.

Sounds like you have a plan! I did a similar project some years ago long before I was even aware of HA. Maybe you’ll find something useful; obviously I’d do a lot different if I were starting over again. :slight_smile:

OMG Yeh thats exactly what Im trying to do and sounds like you know how to do it…lol. I like your diea of putting all of the HX amplifiers in one box. What is in the sealed section in the middle of your scales where the screws are though?
Im actually trying to follow this here… DIY Keg Beer Level Management System - Brew Your Own (byo.com)

But his instructions are very vague so Im trying to wing it. Should I keep going with HA and ESp32? Or is there a better way?

It’s just where I make all the connections for the strain gauges.

I use HA for ALL my projects (well, at least the ones I’ve made since I started using it) as well as quite a few off-the-shelf things I’ve bought for my house (and trailer). ESPHome is just SO convenient for making projects as the boring stuff is all handled for you that I don’t really see doing a project without it again.

That being said, if you have no intentions of using HA for anything else then I’m not sure it makes as much sense for you. I’d just go with whatever you’re most comfortable with.

Thanks again, Ive got an old Mac Mini and looking at the forum posts I can install the generic setup directly to the mini so I’ll give that a try before lashing out on a new Rpi4. BTW Some interesting beers you had on tap back then, are you still brewing?

Sounds like a good plan on hardware.

Yeah, although not as much as I used to. I just rarely drink it so it lasts a LONG time. Ha

Yeh I know what you mean, 4 kegs lasts me months…lol

Ok so whilst I wait to grab my Mac mini from my girlfriends house I thought Id see how far I could go with installing the Yaml onto the esphome. I used ESPhome web to first set it up on my ESP32.

Im not exactly sure what order this was all done in as Im now at work but I clicked on the 3 dots and chose install. And created a YAMl called kegscales. (See screen shots below.) As I left for work it was still installing. is this when its most likely to crash?

Im not sure whats actually happening here? Is it installing this file onto the ESP32 or onto the Raspberry Pi 2?




Yeah, mine always just crashed at some point during compiling (HA would go down and I’d have to power-cycle it). It took quite a while before realized it was an issue of it just not being capable of doing it versus me doing something wrong.

Ohh ok yeh well at least Im learning what to do so when I get the mac mini I can do it all again on that.

So is it writing this script or file to the ESP32 or to the Pi itself?