Summary : Thermostat controlled via GPIO pins to replace a 24vac thermostat that controls, Heat/Cool/Fan in my house. Once I finish basic functionality I plan to expand on it, including things like, 7 day schedule, Automatic learning, Automatic return to schedule after X minutes at override, multizone sensing, etc.
Mostly Completed Parts/classes:
get_temp (python, includes sanity check and avg value from X readings, currently 10, using DHT22)
control (python, turns heat/cool/fan on off, includes safety/tracking logic that stores data in sqlite)
dbinstall (python, builds sqlite db, and populates with starting data.) currently, holding 3 tables, settings[ hot,cold,off,fanauto, override, target, safetime ], live [ temp, humid ], states [ heat, cold, fan ] which I think covers the basics of what I need to get functionality going
Un-complete parts:
server/service (python, main python service controlling the thermostat, data/settings via sqlite)
webui (python, via Flask/Bootstrap, get/update data/settings via sqlite)
Thermostat itself: (note temp sensor not attached here)
5pins to rPi, 5v, Ground, GPIO 9,10,11 ( I realize these are using some SPI pins )
9=fan -> relay
10=cool -> relay
11=hot -> relay
Relays simply switch 24vac(R) to G/Y/W (Fan/Cold/Hot)
The cool relay is wired into the fan relay, so cool cannot turn on without the fan being on. I actually have not wired the hot relay yet, as we rarely use it and wanted to start simple.


I am pretty sure I am going to opensource everything once I can get the prototype/program in simple working order, maybe someone else will find it cool. I really want to print up a nice board for it as well but trying to tackle one thing at a time, should be pretty simple as circuits are not very complex.
Just looking for thoughts/feedback of any kind. Thanks for looking.
-T

