(brewblox) tuning ferment cool pid tips

It’s absolutely doable to keep within 2F of target temperature with BrewBlox, so there’s certainly room for improvement.

Could you please post a picture of your graph over a longer period? You can select periods in the actions button.

Also useful may be screenshots of your PID graphs (service page, select PID, PID actions, graph). You can also select time period there.

No problem, here’s a 1 day graph for the chamber, and the cool and heat PID’s:


Well, this may be part of the problem. Looks like it’s lost connectivity with the spark:

Here’s what the error log says:

“fetch”: [
“info”: “/spark-one/discover_objects”,
“body”: “500: CommandTimeout(DiscoverObjectsCommand)”,
“time”: “Sat Jul 13 2019 16:35:44 GMT-0700 (Pacific Daylight Time)”,
“status”: 500
“db”: []

As I’m writing this post, the Spark service is back, showing a boot time of 2 minutes.


Now I’m seeing this:

Here’s how things look from the command line:

grant@raspberrypi:~/brewblox$ brewblox-ctl status
The following shell commands will be used:

 echo "Your release track is \"$BREWBLOX_RELEASE\""; echo "Your config version is \"$BREWBLOX_CFG_VERSION\""; docker-compose ps

Press ENTER to continue, Ctrl+C to cancel

Running command:
echo “Your release track is “$BREWBLOX_RELEASE””; echo “Your config version is “$BREWBLOX_CFG_VERSION””; docker-compose ps

Your release track is “edge”
Your config version is “0.2.1”
Name Command State Ports

brewblox_datastore_1 tini – /docker-entrypoint … Up 4369/tcp, 5984/tcp, 9100/tcp
brewblox_eventbus_1 docker-entrypoint.sh rabbi … Up 25672/tcp, 4369/tcp, 5671/tcp, 5672/tcp
brewblox_history_1 python3 -m brewblox_history Up 5000/tcp
brewblox_influx_1 /entrypoint.sh influxd Up 8086/tcp
brewblox_mdns_1 python3 -m brewblox_mdns - … Up
brewblox_spark-one_1 python3 -m brewblox_devcon … Up 5000/tcp
brewblox_traefik_1 /traefik -c /dev/null --do … Up>443/tcp,>80/tcp
brewblox_ui_1 nginx -g daemon off; Up 80/tcp

Here’s my brewblox.log:

brewblox.log (195.2 KB)

Thanks for the comprehensive report!

It looks like your Spark is rebooting rather often. We had some issues with the Wifi stack a few weeks back. If you clear the Wifi credentials, and connect over USB, does the problem persist?

How do I clear the wifi credentials? When I go to Service -> Action -> Wifi, there aren’t any settings to clear. When I run brewblox-ctl wifi, I get stuck at the SSID prompt:

grant@raspberrypi:~/brewblox $ brewblox-ctl wifi
Please press ENTER when your Spark is connected over USB
The following shell commands will be used:

 docker-compose down
 docker pull brewblox/firmware-flasher:rpi-edge
 docker run -it --rm --privileged brewblox/firmware-flasher:rpi-edge wifi

Press ENTER to continue, Ctrl+C to cancel

Running command:
docker-compose down

Stopping brewblox_history_1 … done
Stopping brewblox_spark-one_1 … done
Stopping brewblox_eventbus_1 … done
Stopping brewblox_influx_1 … done
Stopping brewblox_ui_1 … done
Stopping brewblox_mdns_1 … done
Stopping brewblox_datastore_1 … done
Stopping brewblox_traefik_1 … done
Removing brewblox_history_1 … done
Removing brewblox_spark-one_1 … done
Removing brewblox_eventbus_1 … done
Removing brewblox_influx_1 … done
Removing brewblox_ui_1 … done
Removing brewblox_mdns_1 … done
Removing brewblox_datastore_1 … done
Removing brewblox_traefik_1 … done
Removing network brewblox_default

Running command:
docker pull brewblox/firmware-flasher:rpi-edge

rpi-edge: Pulling from brewblox/firmware-flasher
Digest: sha256:af25abef814f1a512a41a7fbca4c03832bf7eed721a07c90b6785f613d3b5df6
Status: Image is up to date for brewblox/firmware-flasher:rpi-edge

Running command:
docker run -it --rm --privileged brewblox/firmware-flasher:rpi-edge wifi

Important: Select no when asked to scan for Wi-Fi networks
? Should I scan for nearby Wi-Fi networks? No

Please enter a valid SSID

I probably should’ve mentioned that. My apologies.

https://docs.particle.io/tutorials/device-os/led/photon/#wi-fi-network-reset describes how to clear wifi credentials. On a Spark 3, the setup button is on the side. You’ll need a pin of some kind to press it.

I believe the sticker on the Spark indicates where the button is, but I don’t have one on hand to verify.

Thanks! The spark is now connected via USB.

Now back to adjusting the settings so that this can get my beer temp closer to my beer setting.

Any tips in this area would be appreciated.

Thanks for all of your help!


Well, darn. Things were going so well there for a few hours. The beer was actually being cooled down to 35F. Now the spark is rebooting every minute or so (I can hear the beep).

Attaching spark-one service view, json log and brewblox.log

brewblox-errors (3).json (266 Bytes)

brewblox.log (173.1 KB)

Any ideas on where to go from here would be appreciated.


The reset reason given by the spark is a watchdog reset: no control loop being run for 60s, which triggers a reset by design.

What is on the display and what is the color and pattern of the LED? Could something be pressing on the display holding it in the display calibration routine?
I don’t think this is WiFi related.

I get a screen like this when it’s rebooting. The led is white and “breathing” (wifi off)

I don’t have anything pressing against the screen, it’s attached to my control panel with velcro on the back.


Ah, I think I know what this is.
The OneWire bus master IC can get stuck after a sudden reboot and needs a power cycle.

If you remove the USB cable and 12V adapter and plug them back in, I think your problems will be over.

I think I might be able to do the power cycle in software, so I’ll add that to the next release.

My standard way of rebooting the spark has been to remove the USB and 12V cable to have it completely power off.

In this case, the problem may have started when the Spark rebooted during an update.

Could you please manually reboot / power cycle?

The system could indeed get in this hung up state due to restarting in DFU mode for flashing firmware at an unfortunate time.

I reproduced it and implemented a fix. Did a power cycle fix it for you?

I power cycled the spark, will keep you posted if the problem comes back.

To get the fix, do I need to do a “brewblox-ctl update” ?


The fix will be part of the next release, which is in a few days.

I have some troubles with settings for my setup as well.

My setup is a HERMS with 3 pans of 50 Liters. I would like to start testing with my HERMS setup but I have no clue with what settings to start. Can anybody help me out with some settings that give me a good start?

Besides that I am test running with barrel of water in my fridge for fermeting. I used the default settings from the fermenting fridge wizzard. I have some under and overshoot. So some finetuning is necessary. Any tips on what setting to change?

screenshot of testrun in fridge with default settings:

A high-level explanation of how to configure your system for mashing can be found at https://brewblox.netlify.com/user/control_chains.html#mashing-with-brewblox

The PID block has a preset for the HLT (HLT Setpoint Driver) and the MT/BK (Kettle heating element). You can find the presets under the actions dropdown in the PID widget -> block actions.

For tuning a PID, I hear good things about https://www.youtube.com/watch?v=3viD5ij60EI

The current fermentation fridge wizard does not use a fridge setpoint driver anymore and drives the actuators based on the beer temperature with 2 PIDs directly.

For a HERMS a setpoint driver actuator to drive the HLT setpoint works best. You can load the preset for a hlt setpoint driver for a PID with the HLT driver as output.

I recommend a Kp of mash volume divided by HLT volume. A Ti of 20 minutes and Td zero. Also add a 10 degree maximum constraint on your setpoint driver so the HLT will never get more than 10 degrees above your mash setpoint.