2021-08-10 21:29:24 +00:00
|
|
|
# fermentord
|
|
|
|
|
|
|
|
Control the temperature of your fermentation process.
|
|
|
|
|
2022-03-18 12:41:34 +00:00
|
|
|
# Integrations
|
2022-03-07 14:54:36 +00:00
|
|
|
|
2022-03-18 12:41:34 +00:00
|
|
|
* NATS
|
|
|
|
* Prometheus
|
|
|
|
* Sentry
|
2022-03-07 14:54:36 +00:00
|
|
|
|
2021-08-10 21:29:24 +00:00
|
|
|
# Epics
|
|
|
|
|
|
|
|
## Heater/Cooler
|
|
|
|
|
|
|
|
| Persona | Description |
|
|
|
|
|----------|--------------------------------------------------------------------------------|
|
|
|
|
| Brewer | The person responsible for the wort and the fermentation process |
|
|
|
|
| Operator | The person responsible for the fermentation tank and the system controlling it |
|
|
|
|
|
|
|
|
*As a brewer I need to maintain the wort at a specific temperature so that my fermentation process is predictable*
|
|
|
|
*As an operator I need an alert if the system can't maintain the temperature, so that I may correct the problem*
|
|
|
|
|
|
|
|
## Ambient temperature
|
|
|
|
|
|
|
|
* Ambient temperature
|
|
|
|
* Case temperature
|
|
|
|
* Wort temperature
|
|
|
|
* Wort gravity
|
|
|
|
|
|
|
|
# User stories
|
|
|
|
|
|
|
|
## Acceptance criteria
|
|
|
|
|
|
|
|
* Given the wort is at or above the requested temperature and the heater is running then stop the heater
|
|
|
|
* Given the wort is above the requested temperature and the heater is not running then start the cooler
|
|
|
|
* Given the wort is above the requested temperature
|
|
|
|
|
|
|
|
* Given the wort is too cold and the cooler is running then stop the cooler
|
|
|
|
* Given the wort is too cold and the cooler is not running then start the heater
|
|
|
|
|
|
|
|
* Given the cooler is running
|
|
|
|
* Given the cooler is running when then the heater may not start
|
|
|
|
* Given the heater is running then the cooler may not start
|
|
|
|
* Given the temperature is
|
|
|
|
|
|
|
|
# Data logging
|
|
|
|
|
|
|
|
* Ambient temperature
|
|
|
|
* Case temperature
|
|
|
|
* Wort temperature
|
|
|
|
* Wort gravity
|
|
|
|
|
|
|
|
* Data is stored in sqlite3
|
|
|
|
* Data is scraped and stored in PostgreSQL
|
|
|
|
* Data is removed from sqlite3 when confirmed in PostgreSQL
|
|
|
|
|
|
|
|
# Metrics
|
|
|
|
|
|
|
|
Prometheus metrics
|
|
|
|
|
|
|
|
* Ambient temperature
|
2022-03-10 07:23:19 +00:00
|
|
|
* Chamber temperature
|
2021-08-10 21:29:24 +00:00
|
|
|
* Wort temperature
|
|
|
|
* Wort gravity
|
|
|
|
* Heater state
|
|
|
|
* Cooler state
|
2022-03-10 07:23:19 +00:00
|
|
|
* Tank pressure
|
2021-08-30 20:46:38 +00:00
|
|
|
|
|
|
|
# Drivers
|
|
|
|
|
|
|
|
On the Raspberry Pi you'll need to add `dtoverlay=w1-gpio` (for regular
|
|
|
|
connection) or `dtoverlay=w1-gpio,pullup="y"` (for parasitic connection)
|
|
|
|
to your /boot/config.txt. The default data pin is GPIO4, but that can be
|
|
|
|
changed from 4 to x with `dtoverlay=w1-gpio,gpiopin=x`.
|
|
|
|
|
|
|
|
```bash
|
2022-03-06 21:52:21 +00:00
|
|
|
echo dtoverlay=w1-gpio,gpiopin=4,pullup=0 >> /boot/config.txt
|
2021-08-30 20:46:38 +00:00
|
|
|
|
|
|
|
modprobe wire
|
|
|
|
modprobe w1-gpio
|
|
|
|
modprobe w1-therm
|
|
|
|
```
|
2022-02-18 20:59:32 +00:00
|
|
|
|
|
|
|
# Build
|
|
|
|
|
2022-03-10 07:23:19 +00:00
|
|
|
A Raspberry Pi 1 is used, so we compile for ARMv6.
|
|
|
|
|
2022-02-18 20:59:32 +00:00
|
|
|
```bash
|
|
|
|
cd cmd/fermentord
|
2022-03-06 21:52:21 +00:00
|
|
|
GOARCH=arm GOARM=6 GOOS=linux go build
|
2022-02-18 20:59:32 +00:00
|
|
|
```
|