BrewPi Spark not auto discovered

Good Afternoon Guys,

My BrewPi Spark showed up and I finally got around to setting it up, I had been running a simulation on my RaspberryPi 4. The Spark is connected via usb to my rPi4 and rPi4 is using a power supply.

The issue I am having now is after removing the simulated Spark and all blocks and dashboards my web interface does not auto discover the physical Spark. Also I notice on my Spark screen 6 empty boxes a USB icon and 0.0.0.0 in upper left and 61% 70% in upper right corner. Also have a blue light in upper left corner of case front.

I have also plugged in 1 temp probe but do not see it anywhere either.

I have tried brewblox-ctl add-spark and I noticed the blue light slowly pulses but i get the message… ‘No devices discovered… no valid combination of device ID and device host.’

I’m sure I missed a step or should just start over, but any ideas as to what may be wrong would be helpful.

Mahalo,
Brandon

UPDATE: I followed the Remove and Reinstall from scratch instructions here… https://brewblox.netlify.app/user/removing_things.html#remove-spark-service

The result is my spark was auto discovered now but the service is telling me the following:
Service not connected to controller

Handshake not performed

Service not synchronized

Your Spark service is online, but not connected to your controller.

  • Is your controller turned on? YES
  • Does your controller have the correct firmware? YES
  • WiFi: Does your controller display its IP address? NO
  • Are there any error messages in your service logs? idk ( https://termbin.com/mc0d )
  • USB: Your service must have been (re)started after plugging in the USB cable.
  • USB: Can your service access USB devices? (Mac hosts)

Try a different usb cable, and another. This is almost always the cause.

@Elco & @Bob_Steers - so after trying both suggested previous steps of:
try diff cables - at 3x the 2x prior always worked before no issue, but now all of a sudden there is.

pi@Brewpi:~/brewblox $ docker-compose ps
Name Command State Ports

brewblox_eventbus_1 /docker-entrypoint.sh /usr … Up 0.0.0.0:1883->1883/tcp
brewblox_history_1 python3 -m brewblox_history Up 5000/tcp
brewblox_redis_1 docker-entrypoint.sh --app … Up 6379/tcp
brewblox_spark-one_1 python3 -m brewblox_devcon … Up 5000/tcp
brewblox_traefik_1 /entrypoint.sh --api.dashb … Up 0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp
brewblox_ui_1 /docker-entrypoint.sh ngin … Up 80/tcp
brewblox_victoria_1 /victoria-metrics-prod --r … Up 8428/tcp
pi@Brewpi:~/brewblox $ brewblox-ctl down

pi@Brewpi:~/brewblox $ brewblox-ctl makecert

unknown flag: --pull

See ‘docker run --help’.

Command ‘docker run --rm --privileged --pull always -v “/home/pi/brewblox/traefik”:/certs/ brewblox/omgwtfssl:edge’ returned non-zero exit status 125.
pi@Brewpi:~/brewblox $ docker run --rm --privileged --pull always -v “/home/pi/brewblox/traefik”:/certs/ brewblox/omgwtfssl:edge

unknown flag: --pull

See ‘docker run --help’.

pi@Brewpi:~/brewblox $ sudo chmod 644 “/home/pi/brewblox/traefik/brewblox.crt”

chmod: cannot access ‘/home/pi/brewblox/traefik/brewblox.crt’: No such file or directory

pi@Brewpi:~/brewblox $ sudo chmod 600 “/home/pi/brewblox/traefik/brewblox.key”

chmod: cannot access ‘/home/pi/brewblox/traefik/brewblox.key’: No such file or directory

pi@Brewpi:~/brewblox $ brewblox-ctl up

Also - here are the logs: https://termbin.com/qi58

thanks guys.

  • I have just tried to remove and reinstall fresh and I still get this after:
brewblox-ctl down
cd ..
sudo rm -rf ./brewblox/

You can then use brewblox-ctl install and brewblox-ctl setup to reinstall your system.

  • I did all the above, now I get this:

pi@Brewpi:~/brewblox $ brewblox-ctl setup
brewblox-ctl requires extensions that match your Brewblox release. Do you want to download them now? [Press ENTER for default value ‘yes’]

SHELL docker rm ctl-lib
SHELL docker pull brewblox/brewblox-ctl-lib:edge
edge: Pulling from brewblox/brewblox-ctl-lib
Digest: sha256:2154260754efc123028c55804bd4a8bbddca55a19da4555cc03a73a8314bbbe9
Status: Image is up to date for brewblox/brewblox-ctl-lib:edge
docker.io/brewblox/brewblox-ctl-lib:edge
SHELL docker create --name ctl-lib brewblox/brewblox-ctl-lib:edge
0d76e1eea67b818a2910e53a66950a717d64d97b0dece985a153882830b2c461
SHELL rm -rf ./brewblox_ctl_lib
SHELL docker cp ctl-lib:/brewblox_ctl_lib ./
SHELL docker rm ctl-lib
ctl-lib
INFO Checking ports…
INFO Setting .env values…
INFO Checking Avahi config…
INFO Copying docker-compose.shared.yml…
INFO Copying docker-compose.yml…
INFO Stopping services…
Removing network brewblox_default
WARNING: Network brewblox_default not found.
INFO Pulling docker images…
Pulling redis … done
Pulling ui … done
Pulling traefik … done
Pulling victoria … done
Pulling spark-one … done
Pulling eventbus … done
Pulling history … done
INFO Creating datastore directory…
INFO Creating history directory…
INFO Creating gateway directory…
INFO Creating SSL certificate…
unknown flag: --pull
See ‘docker run --help’.
Command ‘docker run --rm --privileged --pull always -v “/home/pi/brewblox/traefik”:/certs/ brewblox/omgwtfssl:edge’ returned non-zero exit status 125.
pi@Brewpi:~/brewblox $

The --pull argument was introduced in Docker 19.03.

You can check your version with docker version, and update it by running

sudo apt update
sudo apt upgrade -y

Calculating upgrade… Done

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

pi@Brewpi:~/brewblox $

pi@Brewpi:~/brewblox $ docker version

Client: Docker Engine - Community
Version: 19.03.13
API version: 1.40
Go version: go1.13.15
Git commit: 4484c46
Built: Wed Sep 16 17:06:16 2020
OS/Arch: linux/arm
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 19.03.13
API version: 1.40 (minimum version 1.12)
Go version: go1.13.15
Git commit: 4484c46
Built: Wed Sep 16 17:00:14 2020
OS/Arch: linux/arm
Experimental: false
containerd:
Version: 1.3.7
GitCommit: 8fba4e9a7d01810a393d5d25a3621dc101981175
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683

ook these are the results I get from that.

this is also another error I get from:
pi@Brewpi:~ $ pip3 install --user setuptools brewblox-ctl

Successfully built pynacl

Failed to build cryptography

ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly

What is the output from lsb_release -a? Docker 19.03 is an older release (and apparently I have to look up introduction of --pull again), and the pip error also suggests pip is outdated.

pi@Brewpi:~ $ lsb_release -a

No LSB modules are available.

Distributor ID: Raspbian

Description: Raspbian GNU/Linux 9.9 (stretch)

Release: 9.9

Codename: stretch

Also running/trying - pip3 install --user --no-cache-dir -I -U docker
results in:
Installing collected packages: urllib3, idna, charset-normalizer, certifi, websocket-client, requests, docker

ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.

docker-compose 1.29.2 requires websocket-client<1,>=0.32.0, but you have websocket-client 1.2.1 which is incompatible.

Successfully installed certifi-2021.5.30 charset-normalizer-2.0.4 docker-5.0.0 idna-3.2 requests-2.26.0 urllib3-1.26.6 websocket-client-1.2.1

The short answer is that your OS itself is outdated. For more info see Upgrading your system | Brewblox.

Did you manually upgrade your python version btw? brewblox-ctl is supposed to print a warning whenever you run it on python 3.5 (the default for stretch).

I may have at some point a long time ago I don’t recall. I will try your suggestion - hopefully that will help - as usual thanks again for your time and support with all this, otherwise I would be “stuck”. :slight_smile:

Ok so I basically updated the OS and still running into the same issues.
https://termbin.com/yb2x
thoughts?

I see undervoltage detected on the raspberry pi logs.
You are probably not providing enough power to the raspberry pi, which can give all kinds of weird errors and data loss.

well did a fresh install, again. and now im getting this:
of note - this is the same power supply I have had on this RPI for years. I have unplugged the RJ12 data cables. so idk what the logs will show but hopefully that helps.

pi@raspberrypi:~/brewblox $ brewblox-ctl up
ERROR:
Can’t find a suitable configuration file in this directory or any
parent. Are you in the right directory?

    Supported filenames: docker-compose.yml, docker-compose.yaml, compose.yml, compose.yaml

Command 'docker-compose up -d ’ returned non-zero exit status 1.
pi@raspberrypi:~/brewblox $ brewblox-ctl log
INFO Log file: /home/pi/brewblox/brewblox.log
INFO Writing Brewblox .env values…
INFO Writing software version info…
INFO Writing active containers…
INFO Writing docker-compose configuration…
[Errno 2] No such file or directory: ‘docker-compose.yml’

Did you install the os from scratch?
Did you follow all the steps of the install guide, including brewblox-ctl setup?

What kind of power supply do you have on the pi? And are you powering extra things from the pi?

Note that a 3A power supply (that is not a phone charger!) is required for the pi 4. For the 3 I believe it was 2A. Phone chargers can cause problems, especially if they use separate thin USB cables.

As long as this warning is in your logs
Aug 26 06:34:04 brewpi kernel: [ 9.754549] Under-voltage detected! (0x00050005)
I am not even going to look for other potential causes of problems.

yes from scratch following @Bob_Steers directions.
yes I went line by line, to verify no errors or issues.
as stated in the SSR expansion post - it is a 5V 2.5Amp power supply for the RPI 3 which according to their website/google that is the requirement. When I ran the logs that was with the old power supply. Here is the result with the new PS and with the expansion boards connected.
https://termbin.com/ms5h
here is the log without the expansion boards:
https://termbin.com/u86a

this should give you a good cross comparison being only a few minutes apart.

There seem to be two things going on:

  • power supply issues: all logs show multiple under-voltage warnings
  • missing docker-compose.yml file

Elco already addressed the first. The second depends on the install process. Did you install from scratch, or using a snapshot? Could you please run ls ~/brewblox ?

Ok so are you suggesting that maybe the power supply needs to be more than the recommended 5V 2.5A? like a 3A or? Currently directly off the pins with the multimeter on the Brewpi I get 1.26A but with the connector and the wires the highest it got was 2.16 still not close to the 5 I thought we needed. is is possible that having 4x expansion boards through the data cable is too much somehow? When I connect the data cable for the valves and the 8x relay board the Voltage drops to 2.06 from 2.16. I understand the power supply is the potential issue/data cable - I have tried 3x diff data cables at this point and the Volts doesnt seem to change much with the testing results, maybe 0.01-2 difference. (I have ordered a replacement PS that is a “Charger 5V 2A 2.5A 3A 3.5A for Raspberry Pi 3 2 B+ Power Supply”) - Im hoping this will be enough juice to resolve the errors that we are seeing.
results:
pi@raspberrypi:~/brewblox $ ls -all

total 180

drwxr-xr-x 8 pi pi 4096 Aug 26 22:04 .

drwxr-xr-x 16 pi pi 4096 Aug 27 09:56

drwxr-xr-x 2 pi pi 4096 Aug 26 21:57 brewblox

drwxr-xr-x 5 pi pi 4096 Aug 26 13:40 brewblox_ctl_lib

-rw-r–r-- 1 pi pi 137014 Aug 26 22:13 brewblox.log

-rw-r–r-- 1 pi pi 2382 Aug 26 22:02 docker-compose.shared.yml

-rw-r–r-- 1 pi pi 180 Aug 26 22:02 docker-compose.yml

-rw------- 1 pi pi 234 Aug 26 22:04 .env

drwxr-xr-x 2 pi pi 4096 Aug 26 22:04 mosquitto

drwxr-xr-x 2 999 pi 4096 Aug 26 22:06 redis

drwxr-xr-x 2 pi pi 4096 Aug 26 22:04 traefik

drwxr-xr-x 7 pi pi 4096 Aug 26 22:06 Victoria

I see the file you say is missing so idk…

Yes, it looks like after the earlier post where brewblox-ctl up gave an error, the file is now there. That’s good =)

For the power supply issues, does your Spark have a separate power supply, or is it also drawing from the Pi?

Drawing from the RPI3
Of note I just flashed it - apparently it needed to be updated. With that said now the 4x relay board is lit up and the 8x relay board is not. 0 change in moving or adjusting wires.

Peripherals partially working is a somewhat common symptom for power issues, especially with multiple relays connected.

I recommend using an external power supply for the Spark, as your Spark and its peripherals appear to be causing power issues for the Pi as well.

If you want to, you can verify this by checking for warnings with an without relays:

  • detach all relays
  • run brewblox-ctl down
  • open a second ssh session, and run dmesg -w (this will remain active until you press Ctrl-C)
  • run brewblox-ctl up, and check the dmesg terminal. It should not show any new under-voltage errors.
  • run brewblox-ctl down
  • attach the relays to the Spark
  • run brewblox-ctl up. We would now expect warnings to show up in dmesg.