By using the InvIoT U1 and a 4 relay arduino compatible module, I build a thermostat for heat/AC. It works with or without force air (FAN).
There is an RTC clock on the U1 board and the sketch has also the ability to set a 24 time zones with different temperatures.
Step1: Connect relay, upload sketch
1. Download the library for the U1 model at InvIoT.com/download
2. Load the sketch in your arduino IDE. Go to menu file/examples/InvIoT/applications/thermostat
3. Set the pins depending on the relay module you have got.
4. Connect the wires to your heater/AC unit
5. Upload the sketch
Step 2: Setup menu:
Press the home button on U1 to set up the menu.
First setup the time and the unit that you are using (C / F).
Try different time zones.
Used at your own risk. All the info, software and hardware is "AS-IS".
Step 3: ESP8266 WIFI
There is a ESP8266 WiFiplug on the U1 board and also an EEPROM. So you store the HTML strings on the EEPROM, (look how to store and retrieve Strings to EEPROM in the arduino ID Examples/InvIoT_U1/EEPROM)
That way can control the functions of your thermostat over the internet. In the future I will build an example like that.