Compare commits
2 commits
d3c444a9d3
...
a858b0a8a6
Author | SHA1 | Date | |
---|---|---|---|
a858b0a8a6 | |||
24a4105189 |
3 changed files with 29 additions and 81 deletions
|
@ -10,6 +10,8 @@ insert_final_newline = true
|
||||||
|
|
||||||
[*.md]
|
[*.md]
|
||||||
trim_trailing_whitespace = false
|
trim_trailing_whitespace = false
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
[*.{conf,hcl,json,xml,yml}]
|
[*.{conf,hcl,json,xml,yml}]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
|
|
13
Makefile
13
Makefile
|
@ -1,8 +1,9 @@
|
||||||
build:
|
GOK := gok --parent_dir ./deployments --instance fermentor
|
||||||
cd cmd/fermentord && GOARCH=arm GOARM=6 GOOS=linux go build
|
|
||||||
|
|
||||||
install: build
|
edit:
|
||||||
scp cmd/fermentord/fermentord fermentor.env.s18.joco.dk:
|
$(GOK) edit
|
||||||
ssh -t fermentor.env.s18.joco.dk sudo ./deploy.sh
|
|
||||||
|
|
||||||
.PHONY: build install
|
update:
|
||||||
|
$(GOK) update
|
||||||
|
|
||||||
|
.PHONY: edit update
|
||||||
|
|
95
README.md
95
README.md
|
@ -2,90 +2,35 @@
|
||||||
|
|
||||||
Control the temperature of your fermentation process.
|
Control the temperature of your fermentation process.
|
||||||
|
|
||||||
# Integrations
|
## Integrations
|
||||||
|
|
||||||
* NATS
|
- NATS
|
||||||
* Prometheus
|
- Prometheus
|
||||||
* Sentry
|
- Sentry
|
||||||
|
|
||||||
# Epics
|
## Metrics
|
||||||
|
|
||||||
## 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
|
Prometheus metrics
|
||||||
|
|
||||||
* Ambient temperature
|
- Ambient temperature
|
||||||
* Chamber temperature
|
- Chamber temperature
|
||||||
* Wort temperature
|
- Wort temperature
|
||||||
* Wort gravity
|
- Wort gravity
|
||||||
* Heater state
|
- Heater state
|
||||||
* Cooler state
|
- Cooler state
|
||||||
* Tank pressure
|
|
||||||
|
|
||||||
# Drivers
|
## Build
|
||||||
|
|
||||||
On the Raspberry Pi you'll need to add `dtoverlay=w1-gpio` (for regular
|
The firmware is built for [gokrazy](https://gokrazy.org). Identify the device
|
||||||
connection) or `dtoverlay=w1-gpio,pullup="y"` (for parasitic connection)
|
for your SD-Card, then run the command below to overwrite it. Ensure that no
|
||||||
to your /boot/config.txt. The default data pin is GPIO4, but that can be
|
partitions are mounted on the card prior to running the command.
|
||||||
changed from 4 to x with `dtoverlay=w1-gpio,gpiopin=x`.
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
echo dtoverlay=w1-gpio,gpiopin=4,pullup=0 >> /boot/config.txt
|
gok --parent_dir ./deployments --instance fermentor overwrite --full <device>
|
||||||
|
|
||||||
modprobe wire
|
|
||||||
modprobe w1-gpio
|
|
||||||
modprobe w1-therm
|
|
||||||
```
|
```
|
||||||
|
|
||||||
# Build
|
## TODO
|
||||||
|
|
||||||
A Raspberry Pi 1 is used, so we compile for ARMv6.
|
- hardware: Fix the LCD display contrast by adding a 3v3/5v logic level converter
|
||||||
|
- firmware: Add a way to control the runtime configuration
|
||||||
```bash
|
- use nats to control the runtime parameters
|
||||||
cd cmd/fermentord
|
|
||||||
GOARCH=arm GOARM=6 GOOS=linux go build
|
|
||||||
```
|
|
||||||
|
|
Loading…
Reference in a new issue