Skip to content

Commit 2efdbfb

Browse files
authored
Update Documentation
1 parent 6b73aef commit 2efdbfb

14 files changed

+261
-7
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ CMakeCache.txt
99
CMakeFiles
1010
CMakeScripts
1111
Testing
12-
Makefile
1312
cmake_install.cmake
1413
install_manifest.txt
1514
compile_commands.json
@@ -29,3 +28,8 @@ apidocs/
2928
*.sw?
3029

3130
src/Version.h
31+
32+
# Virtualenv / Sphinx
33+
/venv
34+
/docs/venv
35+
/docs/_build

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
# brewpi-esp
1+
# BrewPi-ESP
22
An implementation of the BrewPi firmware on the ESP8266, ESP32, and ESP32-S2 with additional, added features
33

44
## Introduction
5-
This project ports the BrewPi firmware to the ESP8266, ESP32, and ESP32-S2 controllers. It is compatible with [Fermentrack](http://www.fermentrack.com/) and [BrewPi-Remix](https://www.brewpiremix.com/).
5+
BrewPi provides a temperature controller which uses PID algorithms to tightly control a fermenting beer's temperature -- meaning that you can in many cases control the temperature of your fermenting beer to within _one tenth of a degree_. It was originally designed by Elco Jacobs, and used an Arduino running the BrewPi firmware to measure temperatures and toggle heating/cooling, paired with a Raspberry Pi to receive & graph temperature changes over time.
6+
7+
This project ports the BrewPi firmware to the ESP8266, ESP32, and ESP32-S2 controllers, eliminating the need for an Arduino. It is compatible with [Fermentrack](http://www.fermentrack.com/) and [BrewPi-Remix](https://www.brewpiremix.com/) - both of which can be installed on a Raspbery Pi to capture/graph temperatures similar to the original project.
68

79
### Documentation:
8-
* [Selecting your Hardware](docs/Selecting%20an%20ESP%20Board.md)
9-
* [Building a "Solder Free" BrewPi](docs/Solder%20Free%20BrewPi.md)
10-
* [Installing the Firmware](docs/Installing%20the%20Firmware.md)
11-
* [Developing/Contributing](docs/DEVELOP.md)
10+
* [Selecting your Hardware](docs/source/Selecting%20an%20ESP%20Board.md)
11+
* [Building a "Solder Free" BrewPi](docs/source/Solder%20Free%20BrewPi.md)
12+
* [Installing the Firmware](docs/source/Installing%20the%20Firmware.md)
1213
* [Hardware Information](https://github.com/thorrak/thorrak_hardware/blob/master/BrewPi-ESP8266.md) - PCB files, ordering and BOMs
1314

1415
## Expected Pinout

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=_build
12+
13+
%SPHINXBUILD% >NUL 2>NUL
14+
if errorlevel 9009 (
15+
echo.
16+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17+
echo.installed, then set the SPHINXBUILD environment variable to point
18+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
19+
echo.may add the Sphinx directory to PATH.
20+
echo.
21+
echo.If you don't have Sphinx installed, grab it from
22+
echo.https://www.sphinx-doc.org/
23+
exit /b 1
24+
)
25+
26+
if "%1" == "" goto help
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

docs/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
myst-parser==0.19.1
2+
sphinx==6.1.3
3+
sphinx_rtd_theme==1.2.0

docs/source/BrewPi Algorithm.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# BrewPi Algorithm
2+
3+
BrewPi uses a (PID algorithm)[https://en.wikipedia.org/wiki/PID_controller] to control the fermentation temperature of beer very precisely. The algorithm works by adjusting the temperature setting of the fridge a fermenter is in based on the desired temperature of the beer. This is done by an automated process, similar to stationing a robot next to your fridge's thermostat and telling it to adjust the thermostat up or down based on where you think it needs to be in order to get the beer temperature correct.
4+
5+
Just as when typically adjusting the thermostat on a refrigerator, whether or not the fridge turns on takes into account factors such as how far the current temperature is from the setpoint and how long it has been since the last cooling cycle took place (compressor protection). Heating or cooling will take place until the fridge temperature meets or surpasses the setpoint (though similar to the built in thermostat, there may be a "minimum run time" so as to protect the compressor). When using a heater the algorithm continues to simply change the fridge temperature setpoint - toggling cooling or heating depending on whether the fridge temperature is above or below the desired fridge setpoint.
6+
7+
The BrewPi algorithm determines the optimal fridge setpoint based on the beer temperature and how historically changing the fridge thermostat has affected the beer temperature. The PID algorithm measures error in the
8+
9+
However, the algorithm has limits, as it uses a single algorithm to control both heating and cooling. This assumption assumes that both heating and cooling will be impacted by the same degree of error which means that you will generally want to match your heating and cooling power, as well as the degree to which the heating/cooling can be picked up by the fridge sensor.
10+
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Controller Configuration Options
2+
3+
4+
## User Guide to Configuration
5+
6+
The majority of the configuration of your BrewPi happens behind-the-scenes, either handled automatically by the controller itself or managed by Fermentrack or BrewPi Remix.
7+
8+
9+
### "Low Delay" Mode
10+
11+
BrewPi implements a number of protections designed to prevent damage to compressor-based cooling systems such as refrigerators, kegerators, or keezers. These include requiring cooling to run for a minimum period of time before being turned off, requiring a minimum amount of time to pass with the cooling off before allowing it to come back on, and requiring a minimum amount of time to pass before switching between heat & cooling. Low Delay mode reduces the delays associated with cooling
12+
13+
| | **Normal** | **"Low Delay"** |
14+
|------------------------------------------------|------------|-----------------|
15+
| Minimum Cooling "Off" Time | 300s | 60s |
16+
| Minimum Heat "Off" Time | 300s | 300s |
17+
| Minimum Cooling "On" Time | 180s | 20s |
18+
| Minimum Heat "On" Time | 180s | 180s |
19+
| Min Cool "Off" Time (Fridge Constant Mode) | 600s | 60s |
20+
| Min time between switching between heat & cool | 600s | 600s |
21+
22+
23+
:::{Warning}
24+
Low Delay mode should never be used with compressor-based cooling as it may damage your equipment. Low Delay mode is intended for other types of cooling, such as glycol, chilled water pumps, fans/ice, or peltier coolers.
25+
:::
26+
27+
28+
### Rotate TFT
29+
30+
TFT-based builds (ESP32) can have the display rotated if it is inserted in the case upside down (or the manufacturer has changed the default orientation). If your screen is upside-down, toggle this on.
31+
32+
33+
34+
File renamed without changes.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Supported Temperature Sensors & Switches/Actuators
2+
3+
4+
## Actuators (Switches/Relays)
5+
6+
Two types of actuators are currently supported: Pin-based and Kasa WiFi Switches:
7+
8+
### Pin-based Actuators
9+
10+
Pin-based actuators are the traditional type used with BrewPi where an output pin on the controller turns on/off based on whether the controller is calling for heating or cooling. This pin is typically then connected to a relay which then switches the load of the heater/cooler. The "sainsmart" style relay boards are slightly unintuitive in that the pin being "high" (on) actually results in the load being turned _off_. To resolve this, there is an "Invert Pin" option that can be set to ensure that these style of boards are properly toggled on/off.
11+
12+
:::{important}
13+
When setting up a pin, make sure that the device is off when you expect it to be off, and is on when you expect it to be on. Setting the "invert" flag incorrectly can reverse these, resulting in frozen beer (or worse, if your heater runs indefinitely!)
14+
:::
15+
16+
### TPLink Kasa WiFi Smart Switches
17+
18+
Kasa WiFi Switches are "smart" plugs which allow for your cooling/heating source to be plugged into a WiFi-enabled device that can then be toggled over your network. BrewPi-ESP detects these devices when connected to the same WiFi network, and can control them without using TP Link's cloud. Initial connection of these devices to the internet (along with initial setup) is completed in the Kasa smart phone app -- once complete, these devices should be detected by BrewPi-ESP.
19+
20+
21+
## Temperature Sensors
22+
23+
There are three types of temperature sensors supported by BrewPi-ESP: OneWire (DS18b20) temperature sensors, Inkbird bluetooth temperature sensors, and Tilt Pro hydrometers. All three types of temperature sensors allow for a calibration offset to be defined: An amount - specified in 1/16 degree C - that will be added to/subtracted from each reading.
24+
25+
26+
### OneWire Sensors (DS18b20)
27+
28+
OneWire (DS18b20) temperature sensors are the type traditionally used with BrewPi, and are hard-wired to the controller. They can often be purchased in stainless, waterproof housing, connected to several meter long cables, ready for insertion into a thermowell. Most of these sensors are powered via discrete power, but parasite power versions exist -- BrewPi-ESP will not function with parasitic sensors.
29+
30+
31+
### Inkbird Bluetooth Temperature Sensors
32+
33+
Inkbird manufactures a number of wireless bluetooth temperature sensors, several of which have been tested and work with BrewPi-ESP:
34+
35+
* Inkbird IBS-TH1 Plus
36+
* Inkbird IBS-TH2 (both temperature only and temperature + humidity)
37+
* Inkbird IBS-TH2 Plus
38+
39+
The "plus" versions of these sensors typically come with an extendable temperature probe that can be inserted into a thermowell, and oftentimes also include a display.
40+
41+
42+
### Tilt Hydrometers
43+
44+
Tilt hydrometers are bluetooth devices that measure both the specific gravity and temperature of your fermenting beer. There are two versions available - the Tilt and the Tilt Pro. The Tilt Pro offers temperature resolution of 0.1 F whereas the regular Tilt offers temperature resolution of whole degrees fahrenheit. The Tilt is an ideal solution for setups that lack a thermowell (or instances where the Tilt would be utilized regardless).
45+
46+
:::{note}
47+
Due to their higher thermal mass and finer resolution, temperature control using a Tilt is only recommended with the Tilt Pro. Use of a non-Pro tilt is possible, but will result in less accurate temperature control.
48+
:::
49+

docs/source/Web Interface.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Using the BrewPi-ESP Web Interface
2+
3+
4+
## Dashboard
5+
6+
The dashboard contains a "virtual" LCD showing the state of the controller, as well as dashboard panels breaking out the various control points. From this panel you can also change the control mode the controller is using to manage temperatures by clicking the "Change" link on the Control Mode panel.
7+
8+
9+
### Changing Control Mode
10+
11+
After clicking the "Change" link a window will pop up allowing you to select the new control mode. There are three selectable modes from the web interface, and one mode that may appear if the controller is connected to BrewPi Remix or Fermentrack:
12+
13+
* **Off** - Temperature control is disabled, and cooling/heating will be turned off
14+
* **Fridge Constant** - The controller will control the fridge/chamber temperature to match a setpoint
15+
* **Beer Constant** - The controller will control the beer temperature, using the fridge temperature as an input to the algorithm
16+
* **Beer Profile** - _Not selectable from the web interface_ - If the controller is connected to BrewPi Remix or Fermentrack and is currently applying a fermentation temperature profile, the controller will be placed in Beer Profile mode. Beer Profile mode is not selectable from the web interface as management of the profile is handled by Fermentrack/BrewPi Remix.
17+
18+
When selecting Fridge Constant or Beer Constant mode you will be asked to provide a temperature setpoint to control to in the temperature units selected on the controller.
19+
20+
21+
## Set up Sensors/Actuators
22+
23+
BrewPi-ESP is designed to read temperatures from a number of different types of temperature data sources and use that to control temperature by actuating several types of switches. In order for this to work, BrewPi-ESP must be told which temperature sensors correspond with each data type (beer temp, fridge temp, or room temp) and which actuators correspond to heating/cooling. The Set Up Sensors/Actuators page allows you to see all sensors/actuators known to the controller and assign each device the relevant function.
24+
25+
More information on supported sensors and actuators can be found in [](Supported Sensors & Actuators.md).
26+
27+
28+
## Controller Settings
29+
30+
The Controller Settings page allows you to toggle certain settings associated with the controller. A discussion of these settings can be found in [](Controller Configuration Options.md).
31+
32+
33+
## About Controller
34+
35+
The About Controller page allows you to see the controller's firmware version, the time since last reboot, some debugging information around what caused the last reboot, and the amount of free memory available on the controller.
36+
37+
38+
## Technical Notes
39+
40+
The BrewPi-ESP front end is written in JavaScript + Vue. The source files for the interface are saved to a [separate repository on GitHub](https://github.com/thorrak/brewpi_esp_ui) and are governed by a different license from BrewPi-ESP. The front end primarily speaks to the controller via a number of JSON api endpoints that were designed specifically for this purpose. Please be aware that these endpoints are not expected to remain static between firmware versions, and _will_ change without notice.
41+
s

docs/source/conf.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# For the full list of built-in configuration values, see the documentation:
4+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
5+
6+
# -- Project information -----------------------------------------------------
7+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8+
9+
project = 'BrewPi-ESP'
10+
copyright = '2023, John Beeler'
11+
author = 'John Beeler'
12+
13+
# -- General configuration ---------------------------------------------------
14+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
15+
16+
extensions = ['myst_parser']
17+
18+
myst_enable_extensions = ["colon_fence"]
19+
20+
templates_path = ['_templates']
21+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
22+
23+
24+
25+
# -- Options for HTML output -------------------------------------------------
26+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
27+
28+
html_theme = 'sphinx_rtd_theme'
29+
html_static_path = ['_static']

docs/source/index.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.. BrewPi-ESP documentation master file, created by
2+
sphinx-quickstart on Thu Mar 2 08:43:24 2023.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
Welcome to BrewPi-ESP's documentation!
7+
======================================
8+
9+
10+
:::{toctree}
11+
:maxdepth: 1
12+
Installing the Firmware.md
13+
Controller Configuration Options.md
14+
Selecting an ESP Board.md
15+
Solder Free BrewPi.md
16+
Web Interface.md
17+
Supported Sensors & Actuators.md
18+
:::
19+
20+
21+
22+
23+
Indices and tables
24+
==================
25+
26+
* :ref:`genindex`
27+
* :ref:`modindex`
28+
* :ref:`search`

0 commit comments

Comments
 (0)