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:
| Function | GPIO | NodeMCU pin | Connects to |
|---|---|---|---|
| Probe bus 1 | GPIO0 | D3 | Green jack (DS18B20) |
| Probe bus 2 | GPIO2 | D4 | Black jack (DS18B20) |
| RF transmitter | GPIO4 | D2 | FS1000A 433 MHz TX |
| RF receiver | GPIO14 | D5 | MX-RM-5V 433 MHz RX |
| Bluetooth (ESP TX) | GPIO12 | D6 | HM-10 RX |
| Bluetooth (ESP RX) | GPIO13 | D7 | HM-10 TX |
| LED | GPIO16 | D0 | NodeMCU 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 device | Entity type | Fields |
|---|---|---|
| OurBrewbot (controller) | sensor | firmware version, IP address, mDNS name, WiFi SSID, RSSI, free heap, uptime, chip ID, reboot reason and code |
| button | reboot, all off | |
| OurBrewbot F0–F3 (fermenters) | sensor | beer and ambient temperature, gravity and its source, attenuation, status, profile step |
| binary_sensor | alarm | |
| switch | power, temperature control, profile running | |
| number | ceiling and floor temperature, hysteresis, compressor delay, OG, TG | |
| text / select | name, beer name, yeast / profile number | |
| OurBrewbot Probe | sensor, binary_sensor | temperature, name, function, fermenter / active |
| OurBrewbot Tilt | sensor, binary_sensor | temperature, gravity, fermenter, function / active, is Pro |
| OurBrewbot iSpindel | sensor | temperature, 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.
| Method | Endpoint | Description |
|---|---|---|
| GET | /status | Quick status of all fermenters |
| GET | /fermenters | All fermenter data |
| GET | /fermenter?id=0 | One fermenter |
| POST | /fermenter | Update fermenter settings |
| POST | /fermenter/profile | Profile control: start, stop, pause, next, previous |
| GET | /profiles | Fermentation profiles |
| POST | /profile | Update a fermentation profile |
| GET | /probes | All temperature probes |
| POST | /probes | Update probe settings |
| GET | /tilts | Tilt settings and live readings |
| POST | /tilt | Update Tilt settings |
| GET | /ispindels | iSpindel settings and live readings |
| POST | /iSpindel | Receives readings from an iSpindel |
| POST | /ispindel/config | Update iSpindel settings |
| GET | /smartplugs | RF smart plug settings |
| POST | /smartplug | Update a smart plug |
| POST | /smartplug/test | Send an RF on/off test |
| GET | /controller | Controller settings and plugs |
| POST | /controller | Update controller settings |
| GET | /brewservices | Brewfather / Brewer's Friend settings |
| POST | /brewservices | Update brew service settings |
| POST | /brewservices/test | Test a brew service connection |
| GET | /mqtt | MQTT settings |
| POST | /mqtt | Update MQTT settings |
| POST | /mqtt/discover | Resend Home Assistant discovery |
| POST | /mqtt/test | Test the MQTT connection |
| GET | /syslog | Syslog settings |
| POST | /syslog | Update syslog settings |
| GET | /health | Free memory, uptime, WiFi signal |
| GET | /board_info.json | Chip, firmware version and reset reason |
| GET | /debug | Debug mode and sensor overrides |
| POST | /debug | Set debug overrides (not saved) |
| GET | /fs/files | List settings files |
| GET | /fs/file | Read a settings file |
| POST | /fs/save | Save a settings file |
| GET | /update | Firmware update page |
| POST | /update | Upload new firmware |
| POST | /wifi/reset | Clear WiFi settings and reopen the setup hotspot |
| GET | /reboot | Restart the controller |
| GET | /reset | Reset 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
- Install VS Code and the PlatformIO IDE extension.
- Clone the repository and open the folder. PlatformIO installs the ESP8266 toolchain and libraries the first time you open it.
- Set
upload_portinplatformio.inito your controller's port. - Build with
pio run, or build and flash withpio run -t upload. Unit tests run on your computer withpio 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.