ESPHome Xiaomi Petfeeder 1

Well, today I’m going to tell you the story of my very first maker project.

Let’s start with the “why”:
Meet Ari. He’s a young, large, and… let’s just say, slightly “chonky” cat.


I needed to control his food intake more strictly, so I decided to get a pet feeder.

Since I have a lot of Xiaomi gear, I went with the Xiaomi Pet Feeder 1. I found a good deal on Vinted, but when it arrived, it was broken. The seller knew and tried to scam me, but I managed to get a refund and—luckily—got to keep the unit.
​I tried to figure out why it wasn’t working. After several tests, I realized it was a firmware issue because the hardware components were all functional. I contacted Xiaomi to buy replacement parts, but they refused to repair it or even sell me the parts because it had been purchased from an unofficial store (likely Amazon). Since I didn’t have the original invoice and Xiaomi wouldn’t help me even if I offered to pay, I thought: What if I just rebuilt the brain?
​And so, it began.

​The Build
​The project is built using an ESP32 (WROOM32) and a dual DC motor controller. After carefully identifying all the sensors and motors, I started writing and testing the project on a breadboard. It took about a month—mostly because I didn’t have much free time—but I finally managed to solder everything to the board and start writing the final code. I started with Arduino and eventually moved to ESPHome.
​Currently, everything is running locally on ESPHome with the following features:
​Customized Portions: Tailored to Ari’s diet.
​Scheduled Feedings: Fully automated.
​Tracking: Daily and monthly portion counts (in grams).
​Last Feeding Log: Knowing exactly when he last ate.
​Food Delivery Error: A smart alert that triggers if the motor turns but the output sensor doesn’t detect food.
​Capacity Sensor: Real-time status (Low food / Food OK).



​Redundancy & Safety
​I also built in several redundant safety systems. If Home Assistant goes down, I can still access the feeder via a web browser. While the schedules usually sync with the Home Assistant clock, the device will pull time from an NTP server if the connection is lost. As a fail-safe, if the router is off, the ESP creates its own Internal Access Point so I can still connect. There is also a physical button on the lid that dispenses food without any connection at all (just power, of course).

​This was a challenging project, especially since I had never done anything like this before—I had never programmed or even touched a breadboard. I managed to pull it off with the help of a great friend João Lima and some assistance from VSCode Copilot.

I added some photos of the process and the final result. Please dont mind my dodgy soldering skills.

​Eat this, Xiaomi.

1 Like