My 'better half' wanted a water feature in the garden.
I often work long hours far from home, and for the last hour or so of my journey home there's nowhere for a 'comfort break'. So the idea of getting out of the car right next to running water while fumbling for the house keys presented a bit of a problem.
So the Raspberry Pi solution - a Pi Model A running headless in the shed connected to a Sainsmart solid state relay board switching the power to the water pump (and eventually to some garden lights when I get round to it). An Edimax wifi dongle to connect to the home network. Apache2 web server and phpMyAdmin to run a webpage on the Pi, connecting through a MySQL database to a python script to switch the GPIOs controlling the relays.
So now I have a remote control system to switch the lights and water feature from any computer, iPad, iPod or iPhone connected to the home network.
Now the important part. The python program regularly pings the network to see if my iPhone is connected to the wifi. If the iPhone doesn't respond a counter is incremented. If the iPhone does respond, the counter is zeroed and the ping routine is skipped for a minute or so. If the counter reaches a predefined number, ie the iPhone has been off the network for a few hours, a flag is set. Now next time the iPhone responds to the ping the flag is cleared and a five minute countdown timer is started. While the countdown timer is greater than zero, the water feature relay is inhibited. I get safely into the house and, well you get the idea...