Central heating system and other tools.
- This repository has now been succeded (sort of) by OpenCentralHeating which focuses just on the central heating features.
My setup involves 3 physical machines, a Raspberry Pi 3B, running Ubuntu Server 20.04, as the main server connected to the relay that controls the central heating, a NodeMCU ESP8266 microcontroller running MicroPython that acts as a temperature sensor and serves JSON data, and a separate Raspberry Pi Zero W, running Raspian Lite, as a security camera.
-Full write-up of initial build-
- Clone the repository
- Install requirements:
pip install -r requirements.txt
- run server with uvicorn, eg.
uvicorn server:app
N.B. Music over bluetooth (mpv
) functionality currently in development.
Additional requirement: sudo apt install libmpv-dev
or similar depending on your distro.
- copy
temp_api.py
andnetwork_check.sh
to the temperature sensor machine (in my case, the Pi Zero W) and set theSENSOR_IP
inheating.py
on the main machine to the local IP of this machine. - set up BME280 or similar temperature sensor module with GPIO pins according to pins used in
temp_api.py
(or adjust code to reflect pins you use) pip3 install flask
- make
network_check.sh
executable (chmod +x
) and add to your cron tab to run every few hours (this will solve the problem of your Pi Zero W shutting off wi-fi to save power, you should also disable power saving in the pi's wi-fi settings, but this was not a complete fix for me, hence the shell script.)
microcontroller script/documentation to follow