Brewblox release 2020/08/26 (updated 2020/08/31)

After update, spark services no longer connect to spark hardware via wifi.

Tried all the following:

  • Remove (edit docker-compose.yml file) and re-add the service (brewblox-ctl add-spark)
  • Remove brewblox folder entirely and re-run brewblox-ctl setup

Both SparkV2 and SparkV3 connect fine if connected via USB.
Both Sparks are connected on Wifi (validated by checking live DHCP status on router).

Do controllers show up in brewblox-ctl discover?

Yes. Discover shows the one direct connected via USB and then both via wifi:

pi@raspberrypi:~/brewblox $ brewblox-ctl discover-spark
INFO       Discovering devices...
INFO       usb  4c003b000851353532343835 P1
INFO       wifi 4C003B000851353532343835 192.168.21.113 8332
INFO       wifi 2C002E000147373336323230 192.168.21.112 8332
INFO       Done!

Could you please run brewblox-ctl log? Can also check spark service logs yourself to see if anything stands out.

Logs uploaded to https://termbin.com/njbk

Logs for docker container (for spark3 service):

spark3_1     | 2020/08/30 20:13:51 INFO     brewblox_service.couchdb        <CouchDBClient for http://datastore:5984> Waiting for datastore...
spark3_1     | 2020/08/30 20:14:01 INFO     brewblox_service.couchdb        <CouchDBClient for http://datastore:5984> Waiting for datastore...
spark3_1     | 2020/08/30 20:14:11 INFO     brewblox_service.couchdb        <CouchDBClient for http://datastore:5984> Waiting for datastore...
spark3_1     | 2020/08/30 20:14:21 INFO     brewblox_service.couchdb        <CouchDBClient for http://datastore:5984> Waiting for datastore...
spark3_1     | 2020/08/30 20:14:31 INFO     brewblox_service.couchdb        <CouchDBClient for http://datastore:5984> Waiting for datastore...
spark3_1     | 2020/08/30 20:14:35 INFO     brewblox_service.couchdb        <CouchDBClient for http://datastore:5984> Existing document found (spark3-service-db)
spark3_1     | 2020/08/30 20:14:35 INFO     ...blox_devcon_spark.datastore  <CouchDBServiceStore for spark-service/spark3-service-db> Read 2 setting(s). Rev = 2-98cb6c1be86b5a61b94726537da869d4
spark3_1     | 2020/08/30 20:14:35 INFO     ...lox_devcon_spark.connection  Starting device discovery, type=all
spark3_1     | 2020/08/30 20:14:56 ERROR    brewblox_service.repeater       <SparkConduit for None> error during runtime: TimeoutError()
spark3_1     | 2020/08/30 20:14:58 INFO     ..._devcon_spark.communication  Retrying connection...
spark3_1     | 2020/08/30 20:14:58 INFO     ...lox_devcon_spark.connection  Starting device discovery, type=all
spark3_1     | 2020/08/30 20:15:20 INFO     ..._devcon_spark.communication  Retrying connection...
spark3_1     | 2020/08/30 20:15:20 INFO     ...lox_devcon_spark.connection  Starting device discovery, type=all
spark3_1     | 2020/08/30 20:15:42 INFO     ..._devcon_spark.communication  Retrying connection...
spark3_1     | 2020/08/30 20:15:42 INFO     ...lox_devcon_spark.connection  Starting device discovery, type=all
spark3_1     | 2020/08/30 20:16:04 INFO     ..._devcon_spark.communication  Retrying connection...
spark3_1     | 2020/08/30 20:16:04 INFO     ...lox_devcon_spark.connection  Starting device discovery, type=all
spark3_1     | 2020/08/30 20:16:26 INFO     ..._devcon_spark.communication  Retrying connection...
spark3_1     | 2020/08/30 20:16:26 INFO     ...lox_devcon_spark.connection  Starting device discovery, type=all
spark3_1     | 2020/08/30 20:16:48 INFO     ..._devcon_spark.communication  Retrying connection...
spark3_1     | 2020/08/30 20:16:48 INFO     ...lox_devcon_spark.connection  Starting device discovery, type=all
spark3_1     | 2020/08/30 20:17:06 ERROR    ...on_spark.api.error_response  [http://localhost/spark3/blocks/all/read] => TimeoutError()
spark3_1     | 2020/08/30 20:17:10 INFO     ..._devcon_spark.communication  Retrying connection...
spark3_1     | 2020/08/30 20:17:10 INFO     ...lox_devcon_spark.connection  Starting device discovery, type=all
spark3_1     | 2020/08/30 20:17:32 INFO     ..._devcon_spark.communication  Retrying connection...
spark3_1     | 2020/08/30 20:17:32 INFO     ...lox_devcon_spark.connection  Starting device discovery, type=all

Note: to get brewday going I built a spare RPi (from scratch) and connected to spark3 via USB. That RPi IS able to connect to the spark via wifi.

However, the logs above are from fermenter PC running Ubuntu 20.04.1 LTS (Focal Fossa) that I usually run everything from. It still won’t connect to either spark via wifi. Note though that I moved aside the old brewblox dir and started fresh so, I think, the only other thing to do is to re-install the OS but that seems un-related.

If you run brewblox-ctl discover-spark from your Ubuntu machine, do the Sparks show up there?

Can you ping the 192.168.21.112 / 192.168.21.113 addresses from Ubuntu?

If the answer to the above two are ‘yes’, you can also try restarting your avahi-daemon system service:

sudo systemctl restart avahi-daemon

Just updated though the CLI, everything woking fine.

1 Like

I can ping both IP’s from ubuntu.
Doesn’t look like there is an avahi service …

root@fermenator:~# systemctl restart avahi-daemon
Failed to restart avahi-daemon.service: Unit avahi-daemon.service not found.

However, upon installing it …

  • apt install avahi-daemon

and re-adding the spark …

  • brewblox-ctl add-spark
  • docker-compose up -d spark3

everything is working again and the spark3 service shows up successfully in the UI again!

Thanks for the help!

Is the new ‘Brew Kettle’ wizard what we want if we are doing BIAB?

I have just purchsed a new fridge to build a new ferementation chamber, as the compressor died in my last one (still running on BrewPi). Hoping it wasn’t due to it being overworked. Keen to get back in to brewing!

What kind of Ubuntu version are you using? (apart from “20.04”). I thought avahi came pre-installed on Debian-based systems.

Edit: never mind. Just checked myself, and Ubuntu desktop comes with avahi-daemon, but Ubuntu server does not include it by default.
Will add a note to add it to installed apt packages during install.

Yes. It will generate a setup with a single temp sensor and a single heating element.

1 Like

Kudos @Bob_Steers !

Yes, running Ubuntu server. And now I see in the Release Notes, in detail, wifi connectivity updates regarding avahi.

Keep on rocking it! :guitar:

I’m on ubuntu server and had to do it.

You do provide a warning that it’s not there :slight_smile:

That was enough of a hint for me to go install it.

Received this error when updating 8/26 release to 8/31

pi@raspberrypi:~/brewblox $ brewblox-ctl update
Do you want to remove old docker images to free disk space? [Y/n]:
Command is about to: Download and apply updates.
Do you want to continue? (yes, no, verbose, dry-run) [press ENTER for default value ‘yes’]
INFO Updating brewblox-ctl…
INFO Updating brewblox-ctl libs…
edge: Pulling from brewblox/brewblox-ctl-lib
22f291e0e0e9: Pull complete
Digest: sha256:55ec5f73e5b570c6c51e0fd62fdd677034fc48b928f423240870a07373680699
Status: Downloaded newer image for brewblox/brewblox-ctl-lib:edge
docker.io/brewblox/brewblox-ctl-lib:edge
501a062950bdc526233c98aca08e88f898f9b3f0ffa182d6b61b88f74d526b37
ctl-lib
Traceback (most recent call last):
File “/home/pi/.local/bin/brewblox-ctl”, line 7, in
from brewblox_ctl.main import main
File “/home/pi/.local/lib/python3.5/site-packages/brewblox_ctl/init.py”, line 5, in
from brewblox_ctl.utils import sh # noqa: F401
File “/home/pi/.local/lib/python3.5/site-packages/brewblox_ctl/utils.py”, line 5, in
from distutils.util import strtobool
File “”, line 969, in _find_and_load
File “”, line 958, in _find_and_load_unlocked
File “”, line 666, in _load_unlocked
File “”, line 577, in module_from_spec
File “/home/pi/.local/lib/python3.5/site-packages/_distutils_hack/init.py”, line 82, in create_module
return importlib.import_module(’._distutils’, ‘setuptools’)
File “/usr/lib/python3.5/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 981, in _gcd_import
File “”, line 931, in _sanity_check
SystemError: Parent module ‘setuptools’ not loaded, cannot perform relative import
Command ‘/usr/bin/python3 /home/pi/.local/bin/brewblox-ctl update --update-ctl-done --prune’ returned non-zero exit status 1

Whenever i run brewblox-ctl, I get the following now:

pi@raspberrypi:~/brewblox $ brewblox-ctl
Traceback (most recent call last):
File “/home/pi/.local/bin/brewblox-ctl”, line 7, in
from brewblox_ctl.main import main
File “/home/pi/.local/lib/python3.5/site-packages/brewblox_ctl/init.py”, line 5, in
from brewblox_ctl.utils import sh # noqa: F401
File “/home/pi/.local/lib/python3.5/site-packages/brewblox_ctl/utils.py”, line 5, in
from distutils.util import strtobool
File “”, line 969, in _find_and_load
File “”, line 958, in _find_and_load_unlocked
File “”, line 666, in _load_unlocked
File “”, line 577, in module_from_spec
File “/home/pi/.local/lib/python3.5/site-packages/_distutils_hack/init.py”, line 82, in create_module
return importlib.import_module(’._distutils’, ‘setuptools’)
File “/usr/lib/python3.5/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 981, in _gcd_import
File “”, line 931, in _sanity_check
SystemError: Parent module ‘setuptools’ not loaded, cannot perform relative import

What is the output from pip3 show setuptools?

pi@raspberrypi:~/brewblox $ pip3 show setuptools
-bash: /usr/bin/pip3: /usr/bin/python3: bad interpreter: No such file or directory

Not sure what’s going on there, but you may want to run

sudo apt update
sudo apt upgrade -y
sudo apt install -y python3 python3-pip

starting the install now, but leaving for work, hopefully it goes ok while I’m gone

1 Like

I was able to fix this with

pip3 install setuptools

and

export SETUPTOOLS_USE_DISTUTILS=stdlib

https://github.com/pypa/setuptools/blob/17cb9d6bf249cefe653d3bdb712582409035a7db/CHANGES.rst#v5000