At the top of the hill on my rural property is a bore that provides stock water for my stock and three neighboring properties.
So what does this have to do with thingspeak?
From time to time faults in the various farm system drain water from the header tank faster than the bore pump can pull water out of the ground.... so the pump runs continually. Expensive on power but also potentially damaging. Normal use is about 1 hour per day in summer, much less in winter.
The problem was how to know if the pump was running excessively without climbing the hill.... and even if I did check it was hard to know if the pump was running because it had just reached to refill point or had been running for three days.
A couple of years back I built a bore monitor that used an IR beam to determine of the bore pump was running and could be queried over the wireless network by a ruby application.
The IR source and receiver are both powered by PICAXE08M microcontrollers.
(IR Beam Sender)
(IR Beam Receiver)
The PICAXE code for the IR Beam Sender and Receiver are available here. The Receiver uses a TTL output to indicate the bore running state.
By querying every 5 minutes and storing the data in a MYSQL database on my server I could graph daily usage over time and see when things had gone awry.
The network connection in the original design was performed using an AVR AT90S8515 and a Packet Wacker ethernet interface. For 2 years this worked well and then the Packet Wacker died.
Around this time i had been playing with DLink DSL-502T ADSL models and reflashing them with OpenWRT to provide Amateur Radio IGate services. These worked really well in the APRS application so I wrote a Ruby application that monitors the IR sensor via a GPIO pin on the DSL and provides a browser based summary of the last 30 days activity.
The status pages work well inside my network but I wasn't keen on opening a port on my router so I can check the status while I was at work or on vacation. Unfortunately problems only happen when you go on vacation.
Thingspeak to the rescue....