Chamber controller#
Self Hosted: needs validation Cloud Hosted: needs validation
A chamber controller reports the chamber (fridge) temperature and the beer temperature, and can take its temperature target from BrewGraph. This page shows how to point the controller at BrewGraph and how to let a batch’s fermentation steps drive the target. It works with the open source chamber-controller firmware, a PID controller for heating and cooling that runs on ESP32 boards.
Note
Chamber control is new; tell us if something does not work as described.
What you need#
A chamber controller device added in BrewGraph under Devices. BrewGraph shows its device token on the device page. You need the token to get any reading accepted.
The device linked to a batch, so the readings show up where you can use them.
Configure the controller#
The controller sends a POST to
https://ingest.brewgraph.com/ingest/chamber with a JSON body and the device
token. See Device Tokens.
Field |
Value |
|---|---|
Server URL |
|
Token |
The device token from the BrewGraph device page. |
Polling interval |
Not shorter than |
A poll that arrives earlier than 290 seconds after the previous one is refused
with 429. The controller then keeps its previous settings until the next
poll, so the first poll after a restart can be refused.
Payload#
BrewGraph reads these fields:
tokenbeer_temperatureandfridge_temperature, at least one of themtemp_units(CorF)current_mode:B(beer),F(fridge or chamber),O(off) orR(restore)current_target, the target the controller is using nowlocal_timestampandtimezone, optional, used to decide which fermentation step applies todayrssi
A typical payload:
{
"token": "<token>",
"beer_temperature": 18.4,
"fridge_temperature": 17.2,
"temp_units": "C",
"current_mode": "F",
"current_target": 18.0,
"rssi": -62
}
Each poll stores the beer temperature as a beer reading and the fridge temperature as a chamber reading.
The reply is JSON with target_temperature, temp_units and mode. The
mode in the reply is B, F or R. R with a null target means that
BrewGraph does not control the temperature, and the controller should return to
its own settings.
Save the payload as payload.json and replace <token> in the file with
the device token. Then send it:
curl -X POST 'https://ingest.brewgraph.com/ingest/chamber' \
-H 'Content-Type: application/json' --data-binary @payload.json
Control the temperature from fermentation steps#
The batch’s fermentation steps drive the target. Each step has a temperature, a number of days, and a control:
Chamber controls the fridge air temperature. This is the default.
Beer controls on the beer probe.
A step with no device is controlled by the chamber controller you select on the batch. A step that names a device is controlled only by that device.
Temperature control is started by you. Open the batch, go to the Actions
tab and choose Activate chamber control. It needs at least one fermentation
step and a chamber controller selected on the batch. Activating recomputes the
step dates from today. Deactivate returns the controller to R.
The controller gets R with no target until control is activated, after the
last step, and on any day where no step matches.
Check that it works#
Save the configuration and wait for one polling interval.
Open the device in BrewGraph. The latest beer and chamber temperatures should appear on the device page.
Link the device to the batch to see the readings with the batch.
To test control, activate chamber control on the batch and check that the next poll returns a target and the mode
BorF.
Troubleshooting#
401: the token is unknown. Copy it again from the device page.422: the poll has neitherbeer_temperaturenorfridge_temperature. Send at least one of them.429: the poll came sooner than 290 seconds after the previous one. Raise the polling interval. The controller keeps its previous settings until the next poll.200with modeRand a null target: chamber control is not activated for the batch, no fermentation step matches today, or the device is not assigned to the step.
For every status code and what to do about it, see Ingest error codes.
The batch page and the Chamber tab of the device show the target and mode the controller gets, and say why it gets no target. A failed request in the app shows its request id; include it when you contact support. On a Self Hosted install that does not load, see Startup failed.