This thermostat requires the use of a DS18B20 temperature sensor. An alternative sensor can be used, but the getIndoorTemp.py file will need to be modified to gather and return the correct data. I may at some point add the option to use a DHT-22 (combo temp/humidity sensor); but this is adequate for now.
Your DATA line needs to be connected to your 3.3v POWER line with a 4.7K ohm resistor (the resistor is used as a 'pullup' for the data-line)
Then do the following:
DATA on gpio 4 (physical pin 7)
VDD/POWER on 5v rail (physical pin 2)
GROUND on any ground pin (physical pin 6)
Next, enable the 1-wire interface.
This can be done by adding the line
by using an up-to-date raspi-config (Advanced Options -> 1-Wire)
Reboot and your temperature sensor is good to go.
-GPIO to SYSTEM-
In order to control your ac system with your raspberry pi, you are going to need to use an intermediary known as a solid-state-relay or SSR. You can think of it as a series of light switches which can be turned on and off with your GPIO.
This section will vary depending on your system (my system uses a 4-wire ac/heat/fan/neutral).
Avoid using physical pins 8 & 10 (gpio 14 & 15) as they will output a signal when the system is booting up, which would temporarily activate your system.
I recommend using physical pins 11, 13, & 15 (GPIO 17, 27, & 22), but it's up to you. Then use physical pin 4 (5v) to power the logic chip on the ssr. You will tell the system which pins you are using while setting up the web interface.
On a fresh Raspbian Jessie image (full or lite)
cd ~ git clone https://github.com/mholgatem/ThermOS cd ~/ThermOS sudo bash install.sh
On a computer or smartphone, navigate to the ip address of your raspberry pi to finish setup.
ThermOS started life as Rubustat by Wyatt Winters and quickly took on a life of it's own; but there are still a few bits of code left over from those early days.
The following icons came from thenounproject.com
"Folder" (logs icon) by Oliviu Stoian
"Air Conditioner" (system icon) by Aaron K. Kim
"Computer Fan" (fan icon) by Creative Stall
"Thermometer" (hold icon) by icon 54
"Wrench" (settings icon) by useiconic.com
"Calendar" (schedule icon) by To Uyen
"Flame" (heat icon) by Nadav Barkan
"Snowflake" (ac icon) by Dilon Choudry
"Meter" (Favicon) by kiddo
This application is free, without restriction, or warranty.
Don't sue me bro!