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

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:

Command to µC Answer from µC
Get current temperature (Process Value) PV? 21.0
Get current SetPoint SP? 20.7
Set SetPoint SP=20.6 20.6
Get OutPut (0/1) OP? 0 or 1
Set Outside Temperature OT=-1.6 -1.6
Set (Outside) Atmospheric pressure OA=0999 0999
Set Year YY=19 19
Set Month MM=03 03
Set Day DD=09 09
Set hour hh=10 10
Set minutes mm=58 58
unknown blabla ?

Pictures PCB

pcb1

pcb2

pcb3

pcb4

pcb5

case

case new LCD

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
  • 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.

Screenshots

Index

index

Users

users

Rules

rules

Log

log