Brewblox release 2021/02/25 [updated 2021/03/01]

Relevant links:

Brewblox release 2021/02/25

firmware release date: 2021/02/28

Update 2021/03/01:

We found another firmware bug with a quick fix, and decided we’d rather append this change now, before we start making major changes to support the new Spark board.
This fix reduces system load by checking its current IP less often, and prevents the IP address shown on the Spark display from flickering.

This release includes an update to the firmware bootloader. If your controller has Wifi, it will be downloaded automatically. Otherwise you need to run brewblox-ctl bootloader after updating.

This release fixes controller hangups when using Wifi, and provides a more permanent fix for IPv6-related issues.

When Wifi connections were less than perfect, the controller would slow down and freeze.
This was caused by the controller being slow to handle reconnects, which in turn caused memory issues.
We fixed the immediate problem, and improved handling for future out-of-memory errors.

We’ve been aware for a while now that there’s a bug in Docker where if your router supports IPv6, starting a container will cause all network interfaces to be reset.
This often leads to the Pi freezing up completely.

Previously, we fixed this by disabling IPv6 completely (brewblox-ctl disable-ipv6).
The problem with this approach is that it also disabled IPv6 for all other applications on the server.

An alternative solution is much less invasive, and only requires a change to the Docker settings.
This fix is applied during brewblox-ctl install, and during the next brewblox-ctl upgrade. It is also available as brewblox-ctl enable-ipv6.
Your next upgrade will also revert the configuration changes (if any) made by brewblox-ctl disable-ipv6.

Changes:

  • (feature) Added brewblox-ctl enable-ipv6. This function also runs during install and once during your next upgrade.
  • (removed) Removed brewblox-ctl disable-ipv6.
  • (docs) Added reference doc on how Influx data is stored and downsampled: https://brewblox.netlify.app/dev/reference/influx_downsampling
  • (docs) Added tutorial for setting up Chronograf to view raw history data: https://brewblox.netlify.app/dev/tutorials/chronograf
  • (enhancement) Improved brewblox-ctl log output, and made inclusion of system diagnostics optional.
  • (fix) All open connections in firmware are processed immediately.
  • (fix) Number of firmware Controlbox connections is limited to 4.
  • (fix) The controller now resets if it runs out of memory.
2 Likes

How can we check we have the latest bootloader (to see if the wifi update worked)?

It’s a case of “if it works, it’s good”. If you don’t have the right bootloader for your firmware version, your controller screen stays black, and it won’t connect. You can check the current firmware on the Spark service page.

So it’s different from this?

It updated to the correct version. The Spark will probably stay quiet for a bit while it downloads the bootloader, and then restart.

1 Like

My install is failing with:
INFO Using Docker config file /etc/docker/daemon.json
/bin/sh: 1: cannot create /etc/docker/daemon.json: Permission denied
Command ‘echo ‘{
“ipv6”: true,
“fixed-cidr-v6”: “2001:db8:1::/64”
}’ > ‘/etc/docker/daemon.json’’ returned non-zero exit status 2
Command ‘/usr/bin/python3 /home/pi/.local/bin/brewblox-ctl update --update-ctl-done --prune’ returned non-zero exit status 1

Thanks in advance for your help! I manually created the file with proper contents but install still does not proceed.
Chris

What version of brewblox-ctl is it using?

pip3 show brewblox-ctl

What are file permissions for the config file?

ls -l /etc/docker/daemon.json

If you run verbose install, what does it say?

brewblox-ctl -v install

pi@brewpi:~/brewblox $ pip3 show brewblox-ctl

Name: brewblox-ctl
Version: 0.24.2
Summary: Brewblox management tool
Home-page: None
Author: BrewPi
Author-email: development@brewpi.com
License: GPL-3.0
Location: /home/pi/.local/lib/python3.5/site-packages
Requires: docker-compose, zeroconf, requests, docker, click, configobj, pyyaml, python-dotenv

Permissions on file:

The file didn’t exist on my system. I created it and gave it 666 permissions, but that didn’t help. I’ve since deleted it.

Relevant portion from brewblox-ctl -v install:

Processing triggers for libc-bin (2.24-11+deb9u4) …
SHELL sudo apt install -y curl net-tools libssl-dev libffi-dev avahi-daemon
Reading package lists… Done
Building dependency tree
Reading state information… Done
avahi-daemon is already the newest version (0.6.32-2).
curl is already the newest version (7.52.1-5+deb9u13).
libffi-dev is already the newest version (3.2.1-6).
libssl-dev is already the newest version (1.1.0l-1~deb9u3).
net-tools is already the newest version (1.60+git20161116.90da8a0-1).
The following packages were automatically installed and are no longer required:
coinor-libipopt1v5 libbluray2 libmumps-seq-4.10.0 libraw15 lxkeymap python-cairo python-gobject python-gobject-2 python-gtk2
python-xklavier realpath
Use ‘sudo apt autoremove’ to remove them.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
INFO Skipped: docker install.
INFO Enabling IPv6 support in Docker…
SHELL ps aux | grep dockerd
INFO Using Docker config file /etc/docker/daemon.json
SHELL echo ‘{
“fixed-cidr-v6”: “2001:db8:1::/64”,
“ipv6”: true
}’ > ‘/etc/docker/daemon.json’
/bin/sh: 1: cannot create /etc/docker/daemon.json: Permission denied
Command ‘echo ‘{
“fixed-cidr-v6”: “2001:db8:1::/64”,
“ipv6”: true
}’ > ‘/etc/docker/daemon.json’’ returned non-zero exit status 2

It looks like our final version for Python 3.5 was an intermediate where this bug is still present.
Python 3.5 is no longer supported. We kept it alive until now, but it’s end-of-life date was september 2020, and we’re now getting compatibility errors from dependencies. I’ll look at leaving the last python 3.5-compatible version in a better state, but that’ll mostly involve big red warning signs.

For more info, see https://brewblox.netlify.app/user/system_upgrades.html.

To fix: flash your SD card with the latest version of Raspberry Pi OS. If you already had a Brewblox install on this machine, you can use brewblox-ctl snapshot save to seamlessly migrate your data. This is described in detail in the link above.

Ok, thank you. In the meantime, how can I reinstall the previous version?

You can explicitly ignore the python version requirement: (latest is 0.24.4)

pip3 install --user --upgrade --no-cache-dir --no-warn-conflicts --ignore-requires-python brewblox-ctl

Right now this will probably work without errors.

If you run brewblox-ctl update, use the --no-update-ctl argument.

Update: we released a small bugfix to firmware.

Everything I’ve tried hits that same daemon.json issue. Is there a way to use my brewblox.tar.gz snapshot (created before I ran ‘brewblox-ctl -v install’ above) and reinstall release 2021/02/03? Fingers crossed I haven’t accidentally blown something away.

There’s multiple ways it can be fixed or be compatible, but to do a sanity check first: what was the previous state of your system, and why are you running brewblox-ctl install?

Previous state was running without error before I attempted upgrade to 2/25 release. I ran verbose install because you asked me to above.

Then you don’t need the install command - that is only required for first-time installs.

To get your current system updated and working, manually create the /etc/docker/daemon.json file with content:

{
  "ipv6": true,
  "fixed-cidr-v6": "2001:db8:1::/64"
}

then run:

sudo systemctl restart docker
brewblox-ctl env set BREWBLOX_CFG_VERSION 0.6.1
brewblox-ctl update

This will skip the (broken) daemon config change, and update everything else.

I’m back up and running. Thank you VERY much for your time! I won’t attempt another update until I flash my Raspberry Pi. I bought this system off of someone a year ago, so now need to go research how to flash the Pi. :slight_smile:

Happy to hear it works again =)

Our install guide has a step-by-step explanation of how to flash your Pi.
The upgrade guide I linked earlier includes instructions on how and where to use a snapshot while otherwise following the default install guide.

I upgraded to the new release and ran the wizard setup for my fermentation fridge.
Under the Ferment Assistant widget I see warnings that say: Settings in cool PID do not match settings stored in mode. I also have the same warning for the heat PID. Which is the latest PID settings to use Active or Stored? Thanks for the help.

It looks like we don’t automatically convert default stored settings to *F. You can press both “store” buttons, and it’ll save your current settings.