Thermostat
This is a personal project where I’m creating a smart thermostat. The idea is to make a dumb thermostat where you can change the setpoint over bluetooth. A small computer like the Raspberry Pi communicates with this dumb thermostat over bluetooth to make the dumb thermostat smart.
Theoretically it is possible to let just a computer like the Raspberry Pi control the heating, but I don’t trust computers enough to let them do the control directly. Think about things like sd-card or file system corruption, which on occasion can happen.
By making use of a dumb microcontroller based thermostat, it’s still possible to control the heating when the smart part fails.
pic18f1320 : dumb thermostat
- schematic diagram
- software, written in assembler (gpasm - GNU PIC assembler)
Commands
By using a HC-05 Bluetooth module connected to the pic18f1320 microcontroller it’s possile to send commands to the thermostat.
The following commands are recognized by the thermostat:
Pictures PCB
Raspberry Pi : smart thermostat
JAVA Spring Boot program that:
- communicates with dumb thermostat over bluetooth
- checks if a user is home by checking smartphone/bluetooth or smartphone/IP-address
- creates a web interface at port 8080
- reads the outside temperature and atmospheric pressure from https://tgftp.nws.noaa.gov/data/observations/metar/stations/
- use the outside temperature and atmospheric pressure to lower the setpoint if it’s warm outside
- it’s possible to add/delete/change “users”,”rules” and “configuration” by using the web interface
Source
https://gitlab.com/jan.wagemakers/thermostat/
Demo
A demo version of the web interface is available at http://janw.mooo.com:24388.
Note that in this demo version it’s not possible to change the database (“rules”, “users”, “configuration”). The current temperature it shows is just a random value. It’s just there to show the current interface.