Building a Pool Monitor with Raspberry Pi and Roboflow

Building a Pool Monitor with Raspberry Pi and Roboflow 图片 1
Building a Pool Monitor with Raspberry Pi and Roboflow 图片 2

Summary

How to use a Raspberry Pi, a phone camera, and a Roboflow classification model to know when a pool needs a refill. Follow along and build one in a weekend.

My colleague Michael keeps posting demos of Roboflow running at the edge on a Raspberry Pi. Every time one showed up in my feed I thought the same thing: I want to build something like that. So when I went home to Saint Louis, I brought my Raspberry Pi with me and took a note out of his book.

My dad supplied the use case. Our pool loses water over time, and if the level drops too far, the pump can run dry. He wanted to know, without walking outside and eyeballing it, whether the water level was low and it was time to turn on the hose. In other words, he wanted a computer vision model watching the pool for him.

That is a perfect edge deployment problem. The camera never moves, the question is simple, and there is no reason to stream video to the cloud all day to answer: "Is the water low?" Here is how the build went, including the parts that did not work on the first try, laid out so you can follow along.

What you need

  • A Raspberry Pi: I used a Pi 5, and any recent model with a few GB of RAM works. No GPU required.
  • A phone with an RTSP camera app: this becomes your wireless camera. A cheap RTSP security camera works too.
  • A laptop on the same WiFi network: for SSH and for opening the dashboard.
  • A free Roboflow account: for labeling, training, and building the Workflow.

Step 1: Set up the Raspberry Pi

Get the Pi on your network and confirm you can SSH into it from your laptop. Then install Docker:

curl -fsSL https://get.docker.com | sh

Docker is what runs Roboflow's inference server locally on the Pi, so every frame gets processed on the device instead of being sent to the cloud.

This is where I hit my first real snag. The managed Roboflow Edge container I started with was trying to load GPU and TensorRT dependencies.…

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论