meow's notes

· 4 min read

Building a cat feeder that logs to Grafana

The commercial auto-feeders I looked at all wanted a cloud account, a phone app, and faith that the company would still exist in three years. So I built one instead, which took a weekend longer than buying one but at least the data stays on my own network.

Parts

Firmware

Nothing fancy — the ESP32 runs a small sketch that turns the stepper a fixed number of steps on a schedule or on demand, then reads the load cell before and after to log how much actually dropped. Everything gets published over MQTT to a broker running in the homelab.

feeder/scheduled_dispense   -> steps, timestamp
feeder/bowl_weight          -> grams, every 30s
feeder/dispense_result      -> requested_g, delivered_g

The dashboard nobody needed

Telegraf picks the MQTT topics up and writes them into InfluxDB, and from there it's a Grafana panel showing bowl weight over the day, with annotations for each dispense event. It's a wildly overengineered way to confirm that yes, the cats are in fact being fed, but the graph is oddly satisfying to look at, and it did catch one jammed dispenser at 6am before anyone was hungry enough to complain about it.

Total cost was under €30 in parts. Total time was not under 30 hours, but nobody's tracking that metric.