BrewBlox Basic questions

Hi Bob
I got the following reply when executing the commands
wget http://archive.raspbian.org/raspbian.public.key -O - | sudo apt-key add -
–2019-04-29 19:55:49-- http://archive.raspbian.org/raspbian.public.key
Resolving archive.raspbian.org (archive.raspbian.org)… 93.93.128.191, 2a00:1098:0:80:1000:75:0:2
Connecting to archive.raspbian.org (archive.raspbian.org)|93.93.128.191|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 1776 (1.7K) [application/octet-stream]
Saving to: ‘STDOUT’

  •                             100%[============================================================>]   1.73K  --.-KB/s    in 0s
    

2019-04-29 19:55:49 (3.66 MB/s) - written to stdout [1776/1776]

OK
curl -sSL https://get.docker.com | sh

Executing docker install script, commit: 2f4ae48

  • sudo -E sh -c apt-get update -qq >/dev/null
    W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.raspberrypi.org/debian stretch InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 82B129927FA3303E
    W: Failed to fetch http://archive.raspberrypi.org/debian/dists/stretch/InRelease The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 82B129927FA3303E
    W: Some index files failed to download. They have been ignored, or old ones used instead.
  • sudo -E sh -c apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
  • sudo -E sh -c curl -fsSL “https://download.docker.com/linux/raspbian/gpg” | apt-key add -qq - >/dev/null
    Warning: apt-key output should not be parsed (stdout is not a terminal)
  • sudo -E sh -c echo “deb [arch=armhf] https://download.docker.com/linux/raspbian stretch stable” > /etc/apt/sources.list.d/docker.list
  • sudo -E sh -c apt-get update -qq >/dev/null
    W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.raspberrypi.org/debian stretch InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 82B129927FA3303E
    W: Failed to fetch http://archive.raspberrypi.org/debian/dists/stretch/InRelease The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 82B129927FA3303E
    W: Some index files failed to download. They have been ignored, or old ones used instead.
  • [ -n ]
  • sudo -E sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
    E: Unable to locate package docker-ce

You could try:

gpg --keyserver keys.gnupg.net --recv-key 82B129927FA3303E
gpg -a --export 82B129927FA3303E | apt-key add -
curl -sSL https://get.docker.com | sh

If the output still ends with

Error: Command ‘curl -sSL https://get.docker.com | sh’ returned non-zero exit status 100

then the best choice is to restart the install guide. Make sure you safely eject the SD card after you flash it.

Hi Bob
I got the following response to the commands
pi@raspberrypi:~ $ gpg --keyserver keys.gnupg.net --recv-key 82B129927FA3303E
gpg: failed to start the dirmngr ‘/usr/bin/dirmngr’: No such file or directory
gpg: connecting dirmngr at ‘/run/user/1000/gnupg/S.dirmngr’ failed: No such file or directory
gpg: keyserver receive failed: No dirmngr
pi@raspberrypi:~ $ gpg -a --export 82B129927FA3303E | apt-key add -
gpg: WARNING: nothing exported
E: This command can only be used by root.
pi@raspberrypi:~ $ curl -sSL https://get.docker.com | sh

Executing docker install script, commit: 2f4ae48

  • sudo -E sh -c apt-get update -qq >/dev/null
    W: An error occurred during the signature verification. The repository is not updated and the previous indeified because the public key is not available: NO_PUBKEY 82B129927FA3303E
    W: Failed to fetch http://archive.raspberrypi.org/debian/dists/stretch/InRelease The following signatures
    W: Some index files failed to download. They have been ignored, or old ones used instead.
  • sudo -E sh -c apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
  • sudo -E sh -c curl -fsSL “https://download.docker.com/linux/raspbian/gpg” | apt-key add -qq - >/dev/null
    Warning: apt-key output should not be parsed (stdout is not a terminal)
  • sudo -E sh -c echo “deb [arch=armhf] https://download.docker.com/linux/raspbian stretch stable” > /etc/ap
  • sudo -E sh -c apt-get update -qq >/dev/null
    W: An error occurred during the signature verification. The repository is not updated and the previous indeified because the public key is not available: NO_PUBKEY 82B129927FA3303E
    W: Failed to fetch http://archive.raspberrypi.org/debian/dists/stretch/InRelease The following signatures
    W: Some index files failed to download. They have been ignored, or old ones used instead.
  • [ -n ]
  • sudo -E sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
    E: Unable to locate package docker-ce

Then your best option is to restart the brewblox install guide from step 1.

I will do a complete reinstall from step 1 as you recommend, thank you for your assistance.

I have an error coming up on the screen connected to the PI saying that (under voltage detected (0x00050005), Even I use the original power supply rated 5.00V@1.00A.

Do you think this could be an issue

BR Ken

A Raspberry Pi requires a +5.1V / 2.5A power supply.
It’s likely not the cause for this issue.

I will order a new power supply rated 5.1 V and 2,5 A, and then redo the installation of the SD card. I will keep you informed on the results then.

Thank you !

Cheers Ken

Show relations shows nothing.

.

Could you please export your service, and post the file? This will allow us to try and reproduce the problem.

Services can be exported in the Service action menu (the same you used to open the block relations page)

Hi Bob, I am not able to upload jason file here. How do I do that then.

Screenshot%20from%202019-05-03%2017-46-24

This should be the upload button. I’m not 100% certain whether there are any restrictions on when you can use it.

Jason files is not on the list of filetypes to be uploaded

We just fixed that. If you refresh your page, you should be able to upload the file.

Ok, here it is:

brewblox-blocks-spark-one.json (7.3 KB)

Thanks! I’m also seeing the problem here, and will have a look at why it’s happening.

1 Like

Hi Bob,
I have now installed the entire Brewblox system without running into any errors. The only difference was that I replaced the power supply with the official Raspberry PI power supply 5V 2,5 A :smile:

During execution of Step 6: Flash the firmware from ~/brewblox and with the Spark connected to USB I got the following error at the end of the installation:

login as: pi
pi@192.168.0.18’s password:
Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat May 4 13:05:28 2019 from 192.168.0.19

SSH is enabled and the default password for the ‘pi’ user has not been changed.
This is a security risk - please login as the ‘pi’ user and type ‘passwd’ to set a new password.

pi@raspberrypi:~ $ cd ./brewblox
pi@raspberrypi:~/brewblox $ brewblox-ctl setup
Welcome to the BrewBlox menu!
brewblox-ctl scripts are not yet installed in this directory. Do you want to do so now? [Y/n]
Y
The following shell commands will be used:

     docker rm ctl-lib || echo "you can ignore this error"
     docker pull brewblox/brewblox-ctl-lib:rpi-edge || true
     docker create --name ctl-lib brewblox/brewblox-ctl-lib:rpi-edge
     rm -rf ./brewblox_ctl_lib || echo "you can ignore this error"
     docker cp ctl-lib:/brewblox_ctl_lib ./
     docker rm ctl-lib

Press ENTER to continue, Ctrl+C to cancel

Running command:
docker rm ctl-lib || echo “you can ignore this error”

Error: No such container: ctl-lib
you can ignore this error

Running command:
docker pull brewblox/brewblox-ctl-lib:rpi-edge || true

rpi-edge: Pulling from brewblox/brewblox-ctl-lib
0a5e68c477a2: Pull complete
Digest: sha256:f6c1103884203a14a3aa8836ada6793595b6972aeaf082ba50eb75c2588495be
Status: Downloaded newer image for brewblox/brewblox-ctl-lib:rpi-edge

Running command:
docker create --name ctl-lib brewblox/brewblox-ctl-lib:rpi-edge

5d75b0fdcafdd5cff394e3cfa1b300cdfa790997f1e01c74f1c25364a6bddcf3

Running command:
rm -rf ./brewblox_ctl_lib || echo “you can ignore this error”

Running command:
docker cp ctl-lib:/brewblox_ctl_lib ./

Running command:
docker rm ctl-lib

ctl-lib
Running commands: setup
Do you want to check whether ports are already in use? [Y/n]
Y
The following shell commands will be used:

     sudo netstat -tulpn | grep ":80[[:space:]]" || true
     sudo netstat -tulpn | grep ":443[[:space:]]" || true
     sudo netstat -tulpn | grep ":5000[[:space:]]" || true

Press ENTER to continue, Ctrl+C to cancel
Checking port 80…
Checking port 443…
Checking port 5000…
Done checking ports. If you want to change the ports used by BrewBlox, you can u se “brewblox-ctl ports”
Do you want to update brewblox-ctl? [Y/n]
Y
The following shell commands will be used:

     cp -f ./brewblox_ctl_lib/config_files/docker-compose_armhf.yml ./docker                      -compose.yml
     docker-compose down --remove-orphans
     docker-compose pull
     sudo /usr/bin/python3 -m pip install -U brewblox-ctl
     sudo rm -rf ./couchdb/; mkdir ./couchdb/
     sudo rm -rf ./influxdb/; mkdir ./influxdb/
     sudo rm -rf ./traefik/; mkdir ./traefik/
     sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout traefi                      k/brewblox.key -out traefik/brewblox.crt
     sudo chmod 644 traefik/brewblox.crt
     sudo chmod 600 traefik/brewblox.key
     docker-compose up -d --remove-orphans traefik influx history datastore
     /usr/bin/python3 brewblox_ctl_lib/cli.py http wait https://localhost:44                      3/datastore
     /usr/bin/python3 brewblox_ctl_lib/cli.py http put https://localhost:443                      /datastore/_users
     /usr/bin/python3 brewblox_ctl_lib/cli.py http put https://localhost:443                      /datastore/brewblox-ui-store
     /usr/bin/python3 brewblox_ctl_lib/cli.py http post https://localhost:44                      3/datastore/brewblox-ui-store/_bulk_docs -f ./brewblox_ctl_lib/config_files/pres                      ets/services.json
     /usr/bin/python3 brewblox_ctl_lib/cli.py http post https://localhost:44                      3/datastore/brewblox-ui-store/_bulk_docs -f ./brewblox_ctl_lib/config_files/pres                      ets/dashboards.json
     /usr/bin/python3 brewblox_ctl_lib/cli.py http post https://localhost:44                      3/datastore/brewblox-ui-store/_bulk_docs -f ./brewblox_ctl_lib/config_files/pres                      ets/dashboard-items.json
     /usr/bin/python3 brewblox_ctl_lib/cli.py http wait https://localhost:44                      3/history/_service/status
     /usr/bin/python3 brewblox_ctl_lib/cli.py http post https://localhost:44                      3/history/query/configure
     docker-compose down
     /usr/bin/python3 -m dotenv.cli --quote never set BREWBLOX_CFG_VERSION 0                      .2.1

Press ENTER to continue, Ctrl+C to cancel

Running command:
cp -f ./brewblox_ctl_lib/config_files/docker-compose_armhf.yml ./docker -compose.yml

Running command:
docker-compose down --remove-orphans

Removing network brewblox_default
WARNING: Network brewblox_default not found.

Running command:
docker-compose pull

Pulling mdns … done
Pulling traefik … done
Pulling influx … done
Pulling datastore … done
Pulling eventbus … done
Pulling spark-one … done
Pulling history … done
Pulling ui … done

Running command:
sudo /usr/bin/python3 -m pip install -U brewblox-ctl

Requirement already up-to-date: brewblox-ctl in /usr/local/lib/python3.5/dist-pa ckages
Requirement already up-to-date: click in /usr/local/lib/python3.5/dist-packages (from brewblox-ctl)
Collecting requests (from brewblox-ctl)
Using cached https://files.pythonhosted.org/packages/7d/e3/20f3d364d6c8e5d2353 c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl
Requirement already up-to-date: python-dotenv[cli] in /usr/local/lib/python3.5/d ist-packages (from brewblox-ctl)
Requirement already up-to-date: urllib3<1.25,>=1.21.1 in /usr/local/lib/python3. 5/dist-packages (from requests->brewblox-ctl)
Requirement already up-to-date: certifi>=2017.4.17 in /usr/local/lib/python3.5/d ist-packages (from requests->brewblox-ctl)
Requirement already up-to-date: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3. 5/dist-packages (from requests->brewblox-ctl)
Collecting idna<2.9,>=2.5 (from requests->brewblox-ctl)
Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1 cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
Installing collected packages: idna, requests
Found existing installation: idna 2.7
Uninstalling idna-2.7:
Successfully uninstalled idna-2.7
Found existing installation: requests 2.20.1
Uninstalling requests-2.20.1:
Successfully uninstalled requests-2.20.1
Successfully installed idna-2.8 requests-2.21.0

Running command:
sudo rm -rf ./couchdb/; mkdir ./couchdb/

Running command:
sudo rm -rf ./influxdb/; mkdir ./influxdb/

Running command:
sudo rm -rf ./traefik/; mkdir ./traefik/

Running command:
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout traefi k/brewblox.key -out traefik/brewblox.crt

Generating a RSA private key
…+++++
… …+++++
writing new private key to ‘traefik/brewblox.key’

You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter ‘.’, the field will be left blank.

Country Name (2 letter code) [AU]:DK
State or Province Name (full name) [Some-State]:Denmark
Locality Name (eg, city) []:Nivaa
Organization Name (eg, company) [Internet Widgits Pty Ltd]:MollyBrew
Organizational Unit Name (eg, section) []:Nivå Brewery
Common Name (e.g. server FQDN or YOUR name) []:Ken Vejbaek
Email Address []:kenbvej@gmail.com

Running command:
sudo chmod 644 traefik/brewblox.crt

Running command:
sudo chmod 600 traefik/brewblox.key

Running command:
docker-compose up -d --remove-orphans traefik influx history datastore

Creating network “brewblox_default” with the default driver
Creating brewblox_influx_1 … done
Creating brewblox_traefik_1 … done
Creating brewblox_datastore_1 … done
Creating brewblox_eventbus_1 … done
Creating brewblox_history_1 … done

Running command:
/usr/bin/python3 brewblox_ctl_lib/cli.py http wait https://localhost:44 3/datastore

Connecting https://localhost:443/datastore, attempt 1/60
Connecting https://localhost:443/datastore, attempt 2/60
Connecting https://localhost:443/datastore, attempt 3/60
Connecting https://localhost:443/datastore, attempt 4/60
Success!

Running command:
/usr/bin/python3 brewblox_ctl_lib/cli.py http put https://localhost:443 /datastore/_users

{“ok”:true}

Running command:
/usr/bin/python3 brewblox_ctl_lib/cli.py http put https://localhost:443 /datastore/brewblox-ui-store

{“ok”:true}

Running command:
/usr/bin/python3 brewblox_ctl_lib/cli.py http post https://localhost:44 3/datastore/brewblox-ui-store/_bulk_docs -f ./brewblox_ctl_lib/config_files/pres ets/services.json

[{“ok”:true,“id”:“services__spark-one”,“rev”:"1-ba6302508411be44854e33a20eff7e12 "}]

Running command:
/usr/bin/python3 brewblox_ctl_lib/cli.py http post https://localhost:44 3/datastore/brewblox-ui-store/_bulk_docs -f ./brewblox_ctl_lib/config_files/pres ets/dashboards.json

[{“ok”:true,“id”:“dashboards__dashboard-home”,“rev”:“1-d4f31855b317c8afb3fe68491 fc24d72”}]

Running command:
/usr/bin/python3 brewblox_ctl_lib/cli.py http post https://localhost:44 3/datastore/brewblox-ui-store/_bulk_docs -f ./brewblox_ctl_lib/config_files/pres ets/dashboard-items.json

[]

Running command:
/usr/bin/python3 brewblox_ctl_lib/cli.py http wait https://localhost:44 3/history/_service/status

Connecting https://localhost:443/history/_service/status, attempt 1/60
Success!

Running command:
/usr/bin/python3 brewblox_ctl_lib/cli.py http post https://localhost:44 3/history/query/configure

{“results”: [{“statement_id”: 0, “series”: [{“name”: “databases”, “columns”: [“n ame”], “values”: [[“brewblox”], [“internal"]]}]}, {“statement_id”: 1, “series”: [{“columns”: [“name”, “duration”, “shardGroupDuration”, “replicaN”, “default”], “values”: [[“autogen”, “24h0m0s”, “6h0m0s”, 1, true], [“downsample_1m”, “0s”, " 168h0m0s", 1, false], [“downsample_10m”, “0s”, “168h0m0s”, 1, false], [“downsamp le_1h”, “0s”, “672h0m0s”, 1, false], [“downsample_6h”, “0s”, “672h0m0s”, 1, fals e]]}]}, {“statement_id”: 2, “series”: [{“name”: “brewblox”, “columns”: [“name”, “query”], “values”: [[“cq_downsample_1m”, "CREATE CONTINUOUS QUERY cq_downsample 1m ON brewblox BEGIN SELECT mean(*) AS m, sum(/(m)* Combined Influx points/) A S m INTO brewblox.downsample_1m.:MEASUREMENT FROM brewblox.autogen././ GROUP BY time(1m), * END"], [“cq_downsample_10m”, "CREATE CONTINUOUS QUERY cq_downsample _10m ON brewblox BEGIN SELECT mean() AS m, sum(/(m)* Combined Influx points/) AS m INTO brewblox.downsample_10m.:MEASUREMENT FROM brewblox.downsample_1m././ GROUP BY time(10m), * END"], [“cq_downsample_1h”, "CREATE CONTINUOUS QUERY cq_do wnsample_1h ON brewblox BEGIN SELECT mean() AS m, sum(/(m_)* Combined Influx po ints/) AS m INTO brewblox.downsample_1h.:MEASUREMENT FROM brewblox.downsample_10 m././ GROUP BY time(1h), * END"], [“cq_downsample_6h”, "CREATE CONTINUOUS QUERY cq_downsample_6h ON brewblox BEGIN SELECT mean() AS m, sum(/(m_)* Combined Inf lux points/) AS m INTO brewblox.downsample_6h.:MEASUREMENT FROM brewblox.downsam ple_1h./.*/ GROUP BY time(6h), * END”]]}, {“name”: “_internal”, “columns”: [“nam e”, “query”]}]}]}

Running command:
docker-compose down

Stopping brewblox_history_1 … done
Stopping brewblox_datastore_1 … done
Stopping brewblox_traefik_1 … done
Stopping brewblox_eventbus_1 … done
Stopping brewblox_influx_1 … done
Removing brewblox_history_1 … done
Removing brewblox_datastore_1 … done
Removing brewblox_traefik_1 … done
Removing brewblox_eventbus_1 … done
Removing brewblox_influx_1 … done
Removing network brewblox_default

Running command:
/usr/bin/python3 -m dotenv.cli --quote never set BREWBLOX_CFG_VERSION 0 .2.1

BREWBLOX_CFG_VERSION=0.2.1
All done!
pi@raspberrypi:~/brewblox $ brewblox-ctl flash
Welcome to the BrewBlox menu!
Running commands: flash
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 tri                      gger-dfu
     docker run -it --rm --privileged brewblox/firmware-flasher:rpi-edge fla                      sh

Press ENTER to continue, Ctrl+C to cancel

Running command:
docker-compose down

Removing network brewblox_default
WARNING: Network brewblox_default not found.

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

rpi-edge: Pulling from brewblox/firmware-flasher
05276f4299f2: Pull complete
5657e63df536: Pull complete
5d6832deb2d6: Pull complete
400b3e2413eb: Pull complete
ff56fa8df3d3: Pull complete
142413ffe2f4: Pull complete
ba5ed5285133: Pull complete
118a6e9a2b5c: Pull complete
7cf434d4886c: Pull complete
237c6fb4a075: Pull complete
4f61d9c235c5: Pull complete
2e51636e001b: Pull complete
1840cc4d439f: Pull complete
Digest: sha256:978e9355defe83925825ba866c417ead005fabbd4feca191dff7fadf5652366c
Status: Downloaded newer image for brewblox/firmware-flasher:rpi-edge

Running command:
docker run -it --rm --privileged brewblox/firmware-flasher:rpi-edge tri gger-dfu

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

No compatible USB devices found
pi@raspberrypi:~/brewblox $ brewblox-ctl bootloader
Welcome to the BrewBlox menu!
Running commands: bootloader
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 fla                      sh-bootloader

Press ENTER to continue, Ctrl+C to cancel

Running command:
docker-compose down

Removing network brewblox_default
WARNING: Network brewblox_default not found.

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

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

Running command:
docker run -it --rm --privileged brewblox/firmware-flasher:rpi-edge fla sh-bootloader

No compatible USB devices found
pi@raspberrypi:~/brewblox $

As a side note: when adding a log, please save it as text file, and attach it to the post. This makes your post a lot shorter, and avoids weird formatting in the log.

That said: which model Spark are you using, and was it connected to the Raspberry Pi with an USB cable?

If it is connected, could you please run the lsusb command on your Pi, and upload the output?

Hi Bob,
BrewPI Spark 3 with firmware 0.5.5 is connected to USB on the Raspberry Pi. I have restarted the PI after connecting the Spark.
BR Ken
Respond to lsusb command.txt (405 Bytes)

It is not showing up as a USB device at all. Please try a different USB cable, because that is the most likely cause.

Hi Elco,
I have tried to replace the cable and use another USB port on the PI with the results shown in the attached file. A USB device 7 is now added?
BR Ken
Respond to lsusb command.txt (920 Bytes)