User avatar
scrishton
Posts: 49
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
Contact: Website

Raspberry Pee

Wed Sep 04, 2013 8:24 pm

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...

User avatar
joan
Posts: 15122
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Raspberry Pee

Wed Sep 04, 2013 8:28 pm

:D

Forris
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 319
Joined: Fri Jan 06, 2012 7:46 pm

Re: Raspberry Pee

Wed Sep 04, 2013 8:41 pm

It sounds complicated, unnecessary and over-the-top....brilliant!! :lol:

User avatar
scrishton
Posts: 49
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
Contact: Website

Re: Raspberry Pee

Fri Sep 06, 2013 8:35 am

And here's the control panel....

Image

No, really. It's all in a table in a php script, background texture, switches and warning lamp downloaded from th' interweb, dymo labels generated by http://acme.com/labelmaker/labelmaker.cgi

The software setup was based on http://www.instructables.com/id/Web-Con ... y-Pi-GPIO/ by drcurzon, but with a python program replacing the shell script to give me more control over automatic override.

I'd love to put a link to the actual control panel, but my garden would look like a disco as soon as you lot started clicking switches.

Return to “Automation, sensing and robotics”