Red Squirrel
[H]F Junkie
- Joined
- Nov 29, 2009
- Messages
- 9,211
I've been posting tidbits here and there but figured I should maybe make a thread and keep it as a progress log.
For the longest time I always wanted to make a thermostat that I can access via a web interface, and have very advanced scheduling features. Most off the shelf thermostats will allow you to make 4 to 6 programs per day, usually it's Mon-Fri and Sat-Sun. Well what if you work shifts, or get up on a different time on Sunday to go to church, or have a day off and want to override without actually changing the schedule? So I decided I wanted to code a custom coded app that could do that.
After thinking this over and doing research I finally decided to start making this a reality. First, I need a USB controlled relay board and USB controlled temp sensor. I found http://www.canakit.com which is actually here in Canada, and they have a 4 relay board with 6 temp sensors. How convenient, it's all in one piece of hardware. I need 1 relay for heat, 1 relay for the fan and 1 relay for the AC, which I don't yet have, but plan to get eventually. That leaves me with a spare relay I can do something else with in the future. It creates a virtual serial connection so it's very easy to code for, which is nice. I bought it not really knowing how easy it would be to interface with, so I got lucky.
Also bought two temp sensors, they come with a resistor as they need to be connected a certain way with a resistor as part of the circuit.
To make it easier to work with, I made a little circuit board using a random piece of plastic...
Crude, but should work. For now I'll be hiding one behind the existing thermostat if I can make some room, and the other I'm not sure yet, I just bought two in case I screw one up. I want one outside too but given it's winter I don't really want to be making holes in my outside walls, then going outside to work while I freeze my nuts off, so maybe adding the outside sensor could be a summer project in ~6 months from now.
Now to interconnect all of this to the server, I wanted something that is clean and that can be disconnected easily, so upon my search for different types of terminal blocks, I decided that a DIN rail would be pretty cool to put on my server rack, so I settled with that.
Just got that and terminal connectors the other day. Also bought some small wire for misc use as it was cheap. Got it at http://www.automationdirect.com.
I started a bit on coding a C++ class that can interface with the relay/temp board. Once I get that class working, I will then start on the actual control app and implement the class. I'm making this as modular as possible in case I use different hardware down the line, I can just code a class for that hardware then plug it in to the program, so to speak.
The program itself will store data in SQL and I'll be coding a web front end which I'll be easily able to access from any web enabled device. The scheduling and other settings will be in SQL, making it easy to code the front end.
I'm hoping to finish a rough app within the next few weeks. Given I work all day I only really get weekends to work on this. I sometimes work a bit on it during the week but not much.
For the longest time I always wanted to make a thermostat that I can access via a web interface, and have very advanced scheduling features. Most off the shelf thermostats will allow you to make 4 to 6 programs per day, usually it's Mon-Fri and Sat-Sun. Well what if you work shifts, or get up on a different time on Sunday to go to church, or have a day off and want to override without actually changing the schedule? So I decided I wanted to code a custom coded app that could do that.
After thinking this over and doing research I finally decided to start making this a reality. First, I need a USB controlled relay board and USB controlled temp sensor. I found http://www.canakit.com which is actually here in Canada, and they have a 4 relay board with 6 temp sensors. How convenient, it's all in one piece of hardware. I need 1 relay for heat, 1 relay for the fan and 1 relay for the AC, which I don't yet have, but plan to get eventually. That leaves me with a spare relay I can do something else with in the future. It creates a virtual serial connection so it's very easy to code for, which is nice. I bought it not really knowing how easy it would be to interface with, so I got lucky.
Also bought two temp sensors, they come with a resistor as they need to be connected a certain way with a resistor as part of the circuit.
To make it easier to work with, I made a little circuit board using a random piece of plastic...
Crude, but should work. For now I'll be hiding one behind the existing thermostat if I can make some room, and the other I'm not sure yet, I just bought two in case I screw one up. I want one outside too but given it's winter I don't really want to be making holes in my outside walls, then going outside to work while I freeze my nuts off, so maybe adding the outside sensor could be a summer project in ~6 months from now.
Now to interconnect all of this to the server, I wanted something that is clean and that can be disconnected easily, so upon my search for different types of terminal blocks, I decided that a DIN rail would be pretty cool to put on my server rack, so I settled with that.
Just got that and terminal connectors the other day. Also bought some small wire for misc use as it was cheap. Got it at http://www.automationdirect.com.
I started a bit on coding a C++ class that can interface with the relay/temp board. Once I get that class working, I will then start on the actual control app and implement the class. I'm making this as modular as possible in case I use different hardware down the line, I can just code a class for that hardware then plug it in to the program, so to speak.
The program itself will store data in SQL and I'll be coding a web front end which I'll be easily able to access from any web enabled device. The scheduling and other settings will be in SQL, making it easy to code the front end.
I'm hoping to finish a rough app within the next few weeks. Given I work all day I only really get weekends to work on this. I sometimes work a bit on it during the week but not much.