I built smart fridge scales so I stop running out of milk, now I want to automate the actual order

Hi everyone,

I was tired of constantly forgetting to buy milk and then suddenly discovering that we had completely run out.

So I decided it was time to solve this with Home Assistant. I bought the necessary components and, with the help of Claude Code, vibe-coded the firmware for the controllers, as well as a Home Assistant dashboard.

The scales broadcast BLE messages with the current weight once every two hours. The rest of the time, the controller is asleep, so I’m hoping the battery will not need charging very often in this mode.

I have a couple of questions.

First: what would be the best way to automate ordering milk from an online grocery store? I’m based in London, and I was very surprised to find that none of the major supermarkets seem to provide an API for this kind of use case.

Second: what kind of load cells would you recommend for making the scales flatter? I’m now thinking about building similar scales for bread, eggs, and other basic groceries that regularly run out and are almost always needed.

But I would really like a flatter design, so the scales do not take up too much space in the fridge.









Hm component list would be nice :wink:

Then I'm afraid you're SOL with this one.

Best you can do is have an automation which adds milk to your shopping list & sends you an actionable notification when it has done so, so you can either order online or pop to the shops on the way to work.

In ancient times, there used to be a product called the Amazon Shelf, which essentially does the same thing you built + had automated Amazon ordering. It's been killed off for a long time now, so this piece of info doesn't help you much.
However, I seem to recall it was much thinner & came in a variety of sizes. You might wanna search these forums because I seem to remember people were able to hack them once they got a hold of them.

You are assuming the location of the milk (cow or oat) in the fridge remains consistent for your weighing device, otherwise you may wish to build a base your milk container can be fitted to when it first enters the premises and the two become a smart container as a single unit. 3D printers may be of assistance - you must surely have one if you are looking at this kind of project.

What if there are two milk containers? Will emptying one being weighed result in a re-order, and your second one goes off as it wasn't being used?

What if somebody buys a carton of the 2 litre one, and you have carefully calibrated for the 1 litre one? The shelf width for your sensor pad seems a little wide - what if the carton is not placed centrally or an adjacent one leans on it?

Your battery life will be considerably shorter in the cold. Would two wires snaking out of your fridge be an unpopular impost for the power supply or even all the smarts excluding the load sensor?

Buying a cheap human weight scale that has BLE integrated and disassembling it for parts to fit your fridge may be an option. The sensors are pretty universal, and you may find the one that can read 200kg (four 50Kg load cells) may actually be sensitive enough to measure a litre of milk down to the thimblefull. If not, check the associated chip data sheet (often a HX711) and substitute the appropriate load sensor. Countless such projects are out there. Even for ESPHome and HomeAssistant already done for you.

Are there others in the household that will carefully reorganise your fridge each day, and will need to be politely asked not to move your container? Annoying little sisters or toddlers??

Solve those problems first before tackling the weight sensing and re-ordering issues.

Consider doing that for all the other items in your fridge and also your pantry, and the cost of hiring a (human) maid, carer if you are disabled, or just hassling your mother to do all this for you may become far more attractive.

AI optical recognition, where a snapshot is taken of your containers when the door is opened, and again when closed, and calculations made of consumption and trends may offer a different approach. Of course all items will have to be sufficiently visible as to how much content is left.

You could develop a database and have everybody fill out what they used from the fridge each time they opened it. This may prove onerous and you may find yourself ostracised (or murdered).

You may ask your oaf milk vendor if they have self re-ordering containers, or smart fridges and cupboards. You might invent a new form of shopping and make Jeff Bezos a pauper.