This is Clover
My beloved eastern mud turtle. She was given to me as a gift by my girlfriend in 2019 during our senior year of high school. Fast forward to 2026 — I've graduated college and work as a full-time software engineer, spending most of my time working from home. Since graduating I've been taking more and longer trips, and currently my mom handles feeding when I'm away. However, that won't always be the case, and when that time comes I need a solution.
autoFeeder is an automated device that not only drops food on a set schedule, but also records a video when it does and live streams a view of the tank.
sudo apt update
sudo apt upgradedmesg | grep -i imx708Look for a line like:
imx708 10-001a: camera module ID 0x0382The "fixed dependency cycle" messages are harmless.
sudo apt install -y rpicam-appsrpicam-jpeg --output test.jpgVerify the image by pulling it off with
rsync.
sudo apt install git
git clone https://github.com/HansChaudry/autoFeeder.git
cd autoFeederpython -m venv venv --system-site-packages
. venv/bin/activate
--system-site-packagesallows the venv to access system packages likepicamera2.
sudo apt install build-essential python3-dev
pip install --upgrade pip setuptools wheel
pip install -r requirements.txtIf you get a
libcaperror during pip install:sudo apt install libcap-devel
sudo apt install ffmpegnano .envEnsure the following variables are set:
| Variable | Description |
|---|---|
HOSTNAME |
MQTT broker hostname or IP |
PORT |
MQTT broker port |
inTopic |
MQTT topic for incoming commands |
streamTopic |
MQTT topic for camera stream |
streamURL |
Full RTSP URL e.g. rtsp://host:port/tankCam |
curl --progress-bar -L https://dl.min.io/aistor/mc/release/linux-arm64/mc \
--create-dirs \
-o ~/aistor-binaries/mcchmod +x ~/aistor-binaries/mcmc alias set hansololabMinio <url> <username> <password>Verify with
~/aistor-binaries/mc alias list
mkdir -p /home/clover/autoFeeder/mediaThe Pi streams to a MediaMTX instance running on the homelab server via RTSP. MediaMTX then serves the stream over HLS for the client app.
http://<server-ip>:8888/tankCam/index.m3u8
logLevel: info
api: yes
apiAddress: :9997
rtsp: yes
rtspAddress: :8554
hls: yes
hlsAlwaysRemux: yes
hlsAddress: :8888
webrtc: yes
webrtcAddress: :8889
rtspTransports: [tcp, udp]
paths:
tankCam:
source: publisherMake sure UFW allows port
8554(RTSP) and8888(HLS) from your local network.
Two n8n workflows handle automated feeding and notifications:
Workflow 1 — Scheduled Feeding
- Cron trigger → publish MQTT message to
inTopic - Discord notification: "Feeding triggered"
Workflow 2 — Feeding Confirmation
- MQTT trigger on
inTopic/done - Discord notification: "Feeding complete"
python main.pyPress CTRL+C to exit...
Connected to broker!
Message received on topic: <inTopic>
feeding
Stream started successfully
Recording started successfully
...Feeding.mp4: ████████████████████████████████ 100.0%
Stopping stream. PID: XXXX
Stream stopped successfully
Feeding done published
n8n (schedule feed trigger)
→ MQTT publish → Pi Zero 2W
→ stepper motor rotates drum → food drops
→ rpicam-vid + ffmpeg → RTSP → MediaMTX
→ ffmpeg records from RTSP → lastFeeding.mp4
→ mc uploads to MinIO
→ MQTT publish done message
→ n8n → Discord notification
Client App (Expo)
→ MQTT subscribe (start stream)
→ HLS stream from MediaMTX
→ Display the recording from the last feeding




