My Raspberry Pi Pool Timer — Software: Rasptimer

(Previously I discussed the the why of this project, the parts I selected to build with, setting up the Raspberry Pi itself, the electronic assembly, and the mechanical assembly in the backyard. Now we need real software to run.)

So far, I’ve switched the pumps on and off with the way of least resistance: To the right is a screen shot.

Obviously, this for geeks debugging wires, and it won’t do for my project. I can’t even remember which pin numbers I use from one invocation to the next. So I decide to hack something together that is more user-friendly. The result is Rasptimer, a simple PHP web application that allows non-geeks to start and stop the pumps, and to schedule daily runs. Here’s a current screen shot:

It’s on Github at, where there are installation instructions as well. I call it Rasptimer, because it runs on the Raspberry Pi and is a general-purpose timer application. License is GPL so anybody can do stuff with it.

Internally, other than PHP, it uses wiringPi, a great set of libraries and executables that makes it easy to talk to the I/O pins of the Raspberry Pi. It also uses Linux cron to switch pumps on and off, and so far doesn’t even need any local storage other than what’s written into the cron configuration.

When I show Rasptimer running on our pool’s Raspberry Pi to my son, he is so excited playing with it from his computer in his upstairs bedroom (where he has a good view on the pool), I have to put a password on the pool website! There’s definitely playing potential here with projects like this.

Now we are in business!

In the last post, I’ll put together a parts list and approximate cost.