Go Down

Topic: Online Thermostat (Read 10543 times) previous topic - next topic


This is my first big project with the Arduino. I'm trying to make a thermostat that I can set from the internet. I've gotten to the point that I can sense the temperature using a thermistor. I also have the official Arduino Ethernet board. I tried using Pachube, but was having problems with it. I would rather not use pachube if I could avoid it. I am planning on using a relay to control the heater or AC.

What I would like to be able to do is to have a page of some sort that I can access from a browser using any computer. On the page I would like it to display the current temperature in my house, the current temperature setting, and whether the system is on or off. I would also like to be able to turn the system on or off and set the temperature for the thermostat.

My first question would be what ethernet library(ies) would best help me with this. I've looked around and have noticed that there are a few libraries out there. If I can get some suggestions on the libraries to use, it would be a good starting point for me. Thanks!


I'd start with the regular library and use it until it doesn't do something you want it to do.
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0


I did this with two thermostats in my house as part of an energy saving project I've been working of for a couple of years now.  I don't allow the thermostats to be seen outside the house, but I control them over my house network.  Thermostats on the internet didn't seem like too good an idea to me.


This is an ongoing project (meaning I'll probably never completely finish it), and what I have gotten done is available on the site above.
Trying to keep my house under control http://www.desert-home.com/


Think it would be easy to control your heating over the internet but you should apply some security measures, at least a password. 

Did some experiments with - http://www.no-ip.com/ - to get an webaddress that can be tunneled (most routers support this) to my Arduino behind my firewall etc. worked quite well.

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)


Feb 22, 2011, 12:10 pm Last Edit: Feb 22, 2011, 12:25 pm by pluggy Reason: 1
I have a system set up to do this, but I use a hacked NAS box as a small server that does the web interface and the arduino is connected to it via USB.  I use lighttpd (sort of a poor mans apache) on Debian Linux and use a password protected folder for the heating controls.  I don't think an arduino would have enough grunt to do all its doing now and run a web interface with security as well. The server draws pretty graphs from the data the arduino collects which is obviously way beyond an arduino. It does other duties not connected with the arduino (print server and local file server) on top of that. It runs it's own firewall (another no-no for an arduino) to keep the bad guys out. It doesn't show anything but a standard web interface (port 80) to the world but shows more to a few select IP addresses that I control.    As it is, on the heating front, the arduino just knows how to maintain a temperature and the server alters that to suit different times of day (standard cron jobs) or it can be overriden from the web.  There isn't an 'off' position as such but turn it down far enough and it doesn't come on.


Peek behind the password protected 'Heating Controls' :



I decided to go with the Tiny Web Server library found here: http://www.webweavertech.com/ovidiu/weblog/archives/000484.html

I got the BlinkLED example working and it seems to have the functionality I'm looking for. I just need to figure out the code to work it for my needs. If anyone has any ideas, I could probably use some help. I'm not a great coder... I'm trying to decipher the code in the program and matching it with the html in the files. I'm not exactly sure what points to where at this point.


Feb 24, 2011, 02:30 pm Last Edit: Feb 24, 2011, 02:32 pm by tkbyd Reason: 1
Back to the "security" issue...

Perhaps needing a password to alter the thermostat is overkill for your needs...

But if you live in an area where pipes can freeze if the heat is turned off, maybe the following would be wise, not just to thwart malevolent people, but also mis-behaving circuits and programming?

Equip your system with a SIMPLE, old-fashioned, hard wired ALTERNATIVE "turn the heat on" system which will over-ride your fancy web-etc based system any time the fancy system is failing to say "turn heat on" if temperature is below, say, 48 F?

The alternative would probably just be a traditional thermostat wired in parallel with whatever turns the heat on when your fancy system thinks there's a need.

If your house is often unattended, perhaps another traditional thermostat should be wired in series with your fancy circuits to over-ride the "turn heat on" signal any time the house temperature is above, say, 75 F?

An ounce of prevention....?

While it doesn't address your "control the thermostat" wants, a system for watching the temperatures in a home from anywhere on the internet is explained at.....



You are definitely right, and keep in mind that a good heating system has at least two temp sensors (inside, outside) but probably more that can trigger the system as you described. But it would be neat if only the part that is in danger of freezing would be heated => intelligent valves (per room?)

Much depend on how the building is located, what is it coldest point, windcatch etc.

2 cnts :)
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)


@tkbyd - Thanks for your suggestions. The site that you posted about displaying the temperature looks like it requires a computer running. I'm trying to avoid having a computer running while I'm away. It just sucks up too much power. I would rather it all be controlled with the Arduino which consumes much less electricity. I think the Tiny Web Server that I mentioned earlier should do the trick for me.

I did think about the too cold issue to prevent freezing. I actually have a space heater that works nicely and it has an anti-freeze setting. It keeps the place warm enough to prevent the pipes from freezing.

I do like the idea of having a simple thermostat that won't allow the temp to go too high though. Just in case. I will have to do some testing when I get things set up


That's the reason I use a hacked NAS box and not a computer, it uses around 5w - less than a unit a week.  All the advantages of a computer without the computers appetite for power.

It doesn't run Windows though.....




Below is a simple way I controlled a t-stat just for fun a long time ago. Now days most t-stats are digital, so operating them will probably be more involved, or a special t-stat may be required.

Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0


Zoomcat, that is so COOL.  My problem with that would be that I would be  constantly playing with it to watch the servo move the lever.  I'd mess with the temperature constantly just because I could.  I may have to use your idea to build a finger that can press my remote control for the TV.

Very clever and fun.
Trying to keep my house under control http://www.desert-home.com/


I may have to use your idea to build a finger that can press my remote control for the TV.

Using a pair of 4051 multiplex chips, you probably have total control of a tv remote. Below is a hack I did so I could change tv channels from work so I could watch the news of the first gulf war via a webcam program I had.

Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0


Just an update with what I've been doing with this project.

I've started to really work on programming. I've been learning some programming languages. I kind of dipped into C++ and I've really been working on Java lately. I'm thinking about learning some objective-c next and maybe go back and go more in depth with C++. This all kind of random in how I'm choosing the languages because I knew practically nothing except for very basic things about programming before this. I'm hoping that as I go through these languages, it will start to shed some light on the Tiny Web Server programming that I want to use. If there are any coders out there who want to help me out by looking through the code a little bit, it might help to know what language I should be going into. Here's the link again for the Tiny Web Server: http://www.webweavertech.com/ovidiu/weblog/archives/000484.html

I am really starting to enjoy programming though.


Hi all,

I've almost finished this project from Practical Arduino http://www.freetronics.com/pages/online-thermometer - it's basically an online thermometer which displays temps from Dallas DS18B20s on a web server.

How easy would it be to extend this project into an online-controllable thermostat? I was thinking of just having a box on the web page where you can input a set point, and then the arduino switches the boiler on and off via a relay.

My programming skills are rank beginner at best, so I'm sure this isn't as simple as I think it is!

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131