“I’m fed up with feeding my cat!”

Resurrecting a bankrupt company’s automated feeder from the dead with Docker Compose, Raspberry Pi and DNS server routing.

Snir Sharristh
4 min readJul 28, 2021

Introduction

A couple of months ago, my girlfriend came from the States with an old smart cat feeder she had, saying “Well, it doesn’t work anymore, but I’m sure you can do something about it”.

I’ve never tried to do anything like that, I’ve never owned a Raspberry Pi and never really done anything related to Hardware/Reverse engineering, but I always love to challenge myself and this time the challenge came with a really high reward, making my little furry friend super happy and full 😁

Annie — The real customer

Background

The feeder is a “PetNet v2 Feeder”. After some browsing and googling, I found out that it’s company (“PetNet”) is no longer active, and its customers lost the ability to use the feeder service and its app, leaving it useless.
I did some further investigation and found out the GitHub project (mentioned below under Credits), “FeederNet”, that had a really good repo and a “How To” guide for making the feeder work again!

The Machine — PetNet feeder V2

The idea

After I’ve read some of the documentation, some of the manuals, and even a little of code digging, I understood what I need to do and divided my approach to the solution into three stages.

First Stage: check how it works and get it running on a local machine that I have (a Windows 10 PC).
Seconde Stage: after running it, purchase a Raspberry Pi of some sorts, install it on the Pi and leave it rotting in some closet so it’ll be nicely hidden and secret 😉.
Third Stage: create a DNS route that will route the requested “PetNet” server (api.arrowconnect.io) to my Raspberry Pi ZeroW.
Boss Fight: Just kidding, Annie (the cat) is full and asleep, job well done 👍.

A Raspberry Pi Zero WiFi
Raspberry Pi Zero W first plugging in and installation

Implementation -> Installation -> Frustration -> Repeat

The process itself seemed quite easy, download Docker and docker-compose, download the configuration files, edit them to fit your setup,
run the docker-compose command that will initiate the service and run it on your machine (CHECK THE LOGS) and then create a hosts file (the sweet DNS magic) and then, well, connect the device and Voilà!

https://youtu.be/x4z9BnzJDA8 (Demo of the working dashboard)

What seemed to be easy, soon became a failure. I had to understand how the Docker image worked and it’s YAML configuration file. You also need to understand how to fix the IP for the Pi, enable SSL (There’s no point in running the GUI for your Pi and really connecting it to a screen every-time you want to change/configure/update something) and configure the DNS routing. Those took a couple of hours to understand and configure correctly.

Screenshots from the working app!

Conclusion

As a developer, I mostly appreciate the lack of fear for technology, code and an unknown eager to fix things that seem “Impossible” to fix.
I’ve learned a lot from this tiny journey, about docker-compose and the way it works (I really wanted to just run everything remotely and realized that the machine’s network card is locked to the old server, thus you need to run it locally), about networks and routing and the proper way to do so in your local network and even got my cat happy in the process.

Well, now I just need to find a bankrupt water fountain company and a bankrupt smart litter box company, a couple of Raspberry Pi‘s and my cat will rule the world.

I hope this will give you some gut to go and create a Side project or even fix some old machine that you have, and if you do want to do something like that, join our Side Project Club:(https://www.facebook.com/groups/sideprojectil/).

Bonus funny snapchat filter: https://snaplensfinder.com/lens/angry-anime-cat/

Credits

Credit where credit’s due. A huge shoutout(!!!) to FeederNet (check the project and repos at https://github.com/feedernet) for creating this amazing API replication and service, you guys are the real heroes! 🥳

--

--