Water heater monitor

My wife accuses me of manipulating the water heater thermostat to save energy (I am innocent of these charges) so to find out why the water is not consistently third-degree-burning-hot I added an Imp and TMP36 temperature sensor to the exhaust vent. Now I know exactly when the water is heated every day and for how long.

Initially I powered the Imp with a battery, but ThingSpeak does not permit batch upload of data which would extend battery life. I prefer ThingSpeak because it’s open source. I noticed that the doorbell transformer is located on the wall nearby, so I scavenged a rectifier and a cap from a broken PC power supply to provide 10v DC to the Imp.

nice! thanks for sharing.

I used an imp on my hot water heat to track the ignition cycles when it intermittently failed to work. I already had a power meter so I used that. Failed ignition resulted in 3 bumps in the power draw as it lit the igniter, failed to light and then waited… repeat… I used Xively at the time to store the data but since have abandoned that service. Found that I take longer showers than both my wife and daughter so that was kind of funny.

What can you share about ThingSpeak - any code? who pays for Thingspeak. I spent a few moments on their site and did not find an FAQ nor any mention of how to pay or who is funding it. Last thing I want is to learn about a cool new service only to have it suddenly clamp on high fees or worse, fail.

(regarding the water heater, the failure reason was cracked solder joints on the coil that turned on the gas)

Thanks for the tip regarding the intermittent solder joints causing ignition problems.

Like you I couldn’t find any financial information about ThingSpeak. If you are concerned about losing data you can run the service on your own computer or even a Raspberry Pi.

The agent code to post data is very simple, which is another reason why I like it.

local thingspeakUrl = “http://api.thingspeak.com/update”;
local headers = {“Content-Type”: “application/x-www-form-urlencoded”,

function httpPostToThingspeak (data) {
local request = http.post(thingspeakUrl, headers, data);
local response = request.sendsync();
return response;

device.on(“updateTemp”, function(data) {
local response = httpPostToThingspeak(“field1=”+data.temp_hot+"&field2="+data.battery_voltage);


It looks like ThingSpeak is run by ioBridge (not sure if that helps at all, but might be a starting place to dig further).

For about $50-$75 per year you can have your own website and domain name on a shared webhost (like cleverdot.com or godaddy.com … many others). Then you can use PHP to do whatever you want, and MySQLi for all of your database needs. The possibilities are then endless.

I know it seems obvious, for most applications currently, the imp device talks to a Imp agent server, which then talk to another server like xively, thingspeak or your own webhost server etc, is it not conceivable in the future when Imp corporate is more established to encompass services (basic) like thingspeak etc on the agent server, then it is a one shop as each device already has its own common key, cutting out the middleware will make the code a lot more simpler. Perhaps it is already in Imp’s cunning long term plan to dominated the world.
Ken NZ