Your settings

The controller keeps its settings as JSON files in a separate part of the flash memory (the LittleFS partition). That partition survives firmware updates. OurBrewbot uses the same file names and field names as the original firmware, so if you install it on an existing MyBrewbot without erasing, your probes, fermenters and plugs are picked up automatically.

You can view the settings files in the admin page's file browser, or fetch them from /fs/files and /fs/file.

Hardware

OurBrewbot runs on the ESP8266 inside the MyBrewbot controller, or on a NodeMCU board with 4 MB of flash wired the same way:

FunctionGPIONodeMCU pinConnects to
Probe bus 1GPIO0D3Green jack (DS18B20)
Probe bus 2GPIO2D4Black jack (DS18B20)
RF transmitterGPIO4D2FS1000A 433 MHz TX
RF receiverGPIO14D5MX-RM-5V 433 MHz RX
Bluetooth (ESP TX)GPIO12D6HM-10 RX
Bluetooth (ESP RX)GPIO13D7HM-10 TX
LEDGPIO16D0NodeMCU built-in LED

Limits: 4 fermenters, 8 temperature probes, 10 RF smart plugs, 4 profiles of up to 15 steps, 8 Tilt colours and 4 iSpindels.

Home Assistant

Enable MQTT in the admin page and point it at your broker. With HA Discovery turned on, the controller announces itself to Home Assistant whenever it connects and whenever Home Assistant restarts. Entities then appear with no YAML to write.

Home Assistant deviceEntity typeFields
OurBrewbot (controller)sensorfirmware version, IP address, mDNS name, WiFi SSID, RSSI, free heap, uptime, chip ID, reboot reason and code
buttonreboot, all off
OurBrewbot F0–F3 (fermenters)sensorbeer and ambient temperature, gravity and its source, attenuation, status, profile step
binary_sensoralarm
switchpower, temperature control, profile running
numberceiling and floor temperature, hysteresis, compressor delay, OG, TG
text / selectname, beer name, yeast / profile number
OurBrewbot Probesensor, binary_sensortemperature, name, function, fermenter / active
OurBrewbot Tiltsensor, binary_sensortemperature, gravity, fermenter, function / active, is Pro
OurBrewbot iSpindelsensortemperature, gravity, corrected gravity, battery, RSSI, angle, run time

Controlling from Home Assistant

By default, Home Assistant can only read values. To let it change settings, turn on Allow HA Control in the MQTT settings. The controller then accepts commands on <baseTopic>/+/+/set for switches, numbers, text, selects and buttons. It ignores out-of-range values, and the entity goes back to the real value within about a minute.

Dashboard

A ready-made dashboard is in HomeAssistant/dashboard.yaml. It uses the Plotly graph, Mushroom and card-mod cards from HACS.

REST API

Everything the admin page does goes through a JSON API on the controller, at http://ourbrewbot-xxxxxx.local. It has no authentication, so keep the controller on a trusted network.

MethodEndpointDescription
GET/statusQuick status of all fermenters
GET/fermentersAll fermenter data
GET/fermenter?id=0One fermenter
POST/fermenterUpdate fermenter settings
POST/fermenter/profileProfile control: start, stop, pause, next, previous
GET/profilesFermentation profiles
POST/profileUpdate a fermentation profile
GET/probesAll temperature probes
POST/probesUpdate probe settings
GET/tiltsTilt settings and live readings
POST/tiltUpdate Tilt settings
GET/ispindelsiSpindel settings and live readings
POST/iSpindelReceives readings from an iSpindel
POST/ispindel/configUpdate iSpindel settings
GET/smartplugsRF smart plug settings
POST/smartplugUpdate a smart plug
POST/smartplug/testSend an RF on/off test
GET/controllerController settings and plugs
POST/controllerUpdate controller settings
GET/brewservicesBrewfather / Brewer's Friend settings
POST/brewservicesUpdate brew service settings
POST/brewservices/testTest a brew service connection
GET/mqttMQTT settings
POST/mqttUpdate MQTT settings
POST/mqtt/discoverResend Home Assistant discovery
POST/mqtt/testTest the MQTT connection
GET/syslogSyslog settings
POST/syslogUpdate syslog settings
GET/healthFree memory, uptime, WiFi signal
GET/board_info.jsonChip, firmware version and reset reason
GET/debugDebug mode and sensor overrides
POST/debugSet debug overrides (not saved)
GET/fs/filesList settings files
GET/fs/fileRead a settings file
POST/fs/saveSave a settings file
GET/updateFirmware update page
POST/updateUpload new firmware
POST/wifi/resetClear WiFi settings and reopen the setup hotspot
GET/rebootRestart the controller
GET/resetReset all settings to defaults

The pages /admin, /rf/sniff and /ble/sniff are the admin UI, an RF code sniffer and a Bluetooth console.

Building from source

  1. Install VS Code and the PlatformIO IDE extension.
  2. Clone the repository and open the folder. PlatformIO installs the ESP8266 toolchain and libraries the first time you open it.
  3. Set upload_port in platformio.ini to your controller's port.
  4. Build with pio run, or build and flash with pio run -t upload. Unit tests run on your computer with pio test -e native.

Getting help

Found a bug or have an idea? Open an issue on GitHub. If the controller restarted unexpectedly, include the DEFERRED lines it logs to syslog after it boots. They record why it restarted.