At telegea.org we have started developing an open source smart thermostat based on the Telegea ptatform which runs on the RPi. It controls the heating/cooling devices with an additional relay card. The relay cards can be simple cards connected via GPIO pins of the RPi or USB relay cards. The thermostat also supports a simple touch display (e.g Adafruit PiTFT).
The current version controls 2 devices or 2 fan speeds of the same device. The temperature is measured with a DS18B20 1-wire temperature sensor (alternatively SHT21 or DHT22 temperature and humidity sensors).
Temperature values can be recorded and visualized graphically on the telegea.org Web interface.
But sending the sensor data to EmonCMS is also possible, so the data can be processed there. This is OpenSource, you can play with it
If you are interested there is quite some documentation available on Github e.g. hardware docs or a detailed description of the thermostat software and thermostat GUI modules.
This thermostat has been working fine at my house and in the office for more than a year but it lacks some features. So at the moment we are rewriting the thermostat module software, porting it to Python. The new version will have lots of new features, like fan speed control (low, medium, high), multiple zone support, smartphone app, etc.
Also the possibility of using the emonTH sensors for temperature reading is something we are looking into at the moment.