Brewblox install on a Synology NAS offical guide

Remove it there. The one on your Pi will send data directly to the eventbus / history service on your ubuntu machine.

@Bob_Steers, @j616s There seem to be more issues. We (or I ) post a message when these are solved.

Info about running Tilt remotely is now included in the docs https://github.com/j616/brewblox-tilt/blob/develop/README.md.

Thanks to @Bob_Steers and @j616s

It’s working now!

Hey I’m back again, I thought I had managed to install correctly on the NAS but I’m getting errors trying to get my spark started up…after reinstalling in correct directory with no issues or warnings through step 7 above:

Woodpile@NAS:~$ echo “alias brewblox-ctl=“python3 -m brewblox_ctl”” >> ~/.bashrc
Woodpile@NAS:~$ source ~/.bashrc
-sh: alias: brewblox-ctlpython3 -m brewblox_ctl: not found
Woodpile@NAS:~$ brewblox-ctl install --no-docker-user --no-reboot
Command is about to: Create Brewblox directory; install system dependencies; reboot.
Do you want to continue? (yes, no, verbose, dry-run) [press ENTER for default value ‘yes’]
Do you want to install with default settings? [Press ENTER for default value ‘Yes’]

INFO Apt is not available. You may need to find another way to install dependencies.
INFO Apt packages: “curl net-tools libssl-dev libffi-dev”
INFO Docker is already installed.
INFO docker-compose is already installed.
INFO Skipped: apt install.
INFO Skipped: docker install.
INFO Skipped: adding Woodpile to ‘docker’ group.
INFO Skipped: docker-compose install.
INFO Creating Brewblox directory (/volume1/homes/Woodpile/brewblox)…
INFO Setting variables in .env file…
INFO Done!
INFO Skipped: reboot.
Woodpile@NAS:~$

Finally got the spark connected and ran into an error running ‘brewblox-ctl setup’ (following the netify guide):

ERROR: for traefik Cannot start service traefik: driver failed programming external connectivit y on endpoint brewblox_traefik_1 (abb44b86e2e2a10616f98a3463496578eb74af7e05999807849f5c25d9bc0c 8f): Error starting userland proxy: listen tcp 0.0.0.0:443: bind: address already in use
ERROR: Encountered errors while bringing up the project.
Command ‘sudo docker-compose up -d --remove-orphans traefik influx history datastore’ returned n on-zero exit status 1

halp. (I can paste the full setup log if you want, the only other warning was regarding ports being used, i just hit return to continue)

Your NAS already listens on port 443. (Default https) You can tell brewblox to use something else by running brewblox-ctl ports

Something goes wrong with my installation I think.
Below a copy of the installtion via SSH. I did try it before so some items are skipped because it is already installed.
To access the breblox website I need to go to the IP of my NAS but which port?

Dennis@NASSIE:~$ echo "alias python3=/volume1/@appstore/python3/bin/python3" >>                                                                                                              
.bashrc
Dennis@NASSIE:~$ source ~/.bashrc
Dennis@NASSIE:~$ python3 --version
Python 3.6.8
Dennis@NASSIE:~$
Dennis@NASSIE:~$ python3 -m pip install --user --upgrade pip
Requirement already up-to-date: pip in ./.local/lib/python3.6/site-packages (20.                                                                                                          
1.1)
Dennis@NASSIE:~$ python3 -m pip install --user --upgrade brewblox-ctl
Requirement already up-to-date: brewblox-ctl in ./.local/lib/python3.6/site-pack                                                                                                             
ages (0.21.6)
Requirement already satisfied, skipping upgrade: click<8.0.0,>=7.1.1 in ./.local                                                                                                                     
/lib/python3.6/site-packages (from brewblox-ctl) (7.1.2)
Requirement already satisfied, skipping upgrade: docker-compose<2.0.0,>=1.26.0 i                                                                                                             
n ./.local/lib/python3.6/site-packages (from brewblox-ctl) (1.26.0)
Requirement already satisfied, skipping upgrade: python-dotenv[cli]<0.14.0,>=0.1                                                                                                             
3.0 in ./.local/lib/python3.6/site-packages (from brewblox-ctl) (0.13.0)
Requirement already satisfied, skipping upgrade: pprint<0.2,>=0.1 in ./.local/li                                                                                                             
b/python3.6/site-packages (from brewblox-ctl) (0.1)
Requirement already satisfied, skipping upgrade: docker<5.0.0,>=4.2.1 in ./.loca                                                                                                             
l/lib/python3.6/site-packages (from brewblox-ctl) (4.2.1)
Requirement already satisfied, skipping upgrade: pyyaml<6.0.0,>=5.3.1 in ./.loca                                                                                                             
l/lib/python3.6/site-packages (from brewblox-ctl) (5.3.1)
Requirement already satisfied, skipping upgrade: requests<3.0.0,>=2.23.0 in ./.l                                                                                                             
ocal/lib/python3.6/site-packages (from brewblox-ctl) (2.24.0)
Requirement already satisfied, skipping upgrade: texttable<2,>=0.9.0 in ./.local                                                                                                             
/lib/python3.6/site-packages (from docker-compose<2.0.0,>=1.26.0->brewblox-ctl)                                                                                                              
(1.6.2)
Requirement already satisfied, skipping upgrade: docopt<1,>=0.6.1 in ./.local/li                                                                                                             
b/python3.6/site-packages (from docker-compose<2.0.0,>=1.26.0->brewblox-ctl) (0.                                                                                                             
6.2)
Requirement already satisfied, skipping upgrade: jsonschema<4,>=2.5.1 in ./.loca                                                                                                             
l/lib/python3.6/site-packages (from docker-compose<2.0.0,>=1.26.0->brewblox-ctl)                                                                                                              
(3.2.0)
Requirement already satisfied, skipping upgrade: cached-property<2,>=1.2.0 in ./                                                                                                             
.local/lib/python3.6/site-packages (from docker-compose<2.0.0,>=1.26.0->brewblox                                                                                                             
-ctl) (1.5.1)
Requirement already satisfied, skipping upgrade: six<2,>=1.3.0 in /volume1/@apps                                                                                                             
tore/python3/lib/python3.6/site-packages (from docker-compose<2.0.0,>=1.26.0->br                                                                                                             
ewblox-ctl) (1.11.0)
Requirement already satisfied, skipping upgrade: websocket-client<1,>=0.32.0 in                                                                                                              
./.local/lib/python3.6/site-packages (from docker-compose<2.0.0,>=1.26.0->brewbl                                                                                                             
ox-ctl) (0.57.0)
Requirement already satisfied, skipping upgrade: distro<2,>=1.5.0 in ./.local/li                                                                                                             
b/python3.6/site-packages (from docker-compose<2.0.0,>=1.26.0->brewblox-ctl) (1.                                                                                                             
5.0)
Requirement already satisfied, skipping upgrade: dockerpty<1,>=0.4.1 in ./.local                                                                                                             
/lib/python3.6/site-packages (from docker-compose<2.0.0,>=1.26.0->brewblox-ctl)                                                                                                              
(0.4.1)
Requirement already satisfied, skipping upgrade: idna<3,>=2.5 in /volume1/@appst                                                                                                             
ore/python3/lib/python3.6/site-packages (from requests<3.0.0,>=2.23.0->brewblox-                                                                                                             
ctl) (2.7)
Requirement already satisfied, skipping upgrade: urllib3!=1.25.0,!=1.25.1,<1.26,                                                                                                             
>=1.21.1 in ./.local/lib/python3.6/site-packages (from requests<3.0.0,>=2.23.0->                                                                                                             
brewblox-ctl) (1.25.9)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in ./.local/                                                                                                             
lib/python3.6/site-packages (from requests<3.0.0,>=2.23.0->brewblox-ctl) (2020.6                                                                                                             
.20)
Requirement already satisfied, skipping upgrade: chardet<4,>=3.0.2 in ./.local/l                                                                                                             
ib/python3.6/site-packages (from requests<3.0.0,>=2.23.0->brewblox-ctl) (3.0.4)
Requirement already satisfied, skipping upgrade: pyrsistent>=0.14.0 in ./.local/                                                                                                             
lib/python3.6/site-packages (from jsonschema<4,>=2.5.1->docker-compose<2.0.0,>=1                                                                                                             
.26.0->brewblox-ctl) (0.16.0)
Requirement already satisfied, skipping upgrade: attrs>=17.4.0 in ./.local/lib/p                                                                                                             
ython3.6/site-packages (from jsonschema<4,>=2.5.1->docker-compose<2.0.0,>=1.26.0                                                                                                             
->brewblox-ctl) (19.3.0)
Requirement already satisfied, skipping upgrade: setuptools in /volume1/@appstor                                                                                                             
e/python3/lib/python3.6/site-packages (from jsonschema<4,>=2.5.1->docker-compose                                                                                                             
<2.0.0,>=1.26.0->brewblox-ctl) (40.6.2)
Requirement already satisfied, skipping upgrade: importlib-metadata; python_vers                                                                                                             
ion < "3.8" in ./.local/lib/python3.6/site-packages (from jsonschema<4,>=2.5.1->                                                                                                             
docker-compose<2.0.0,>=1.26.0->brewblox-ctl) (1.7.0)
Requirement already satisfied, skipping upgrade: zipp>=0.5 in ./.local/lib/pytho                                                                                                             
n3.6/site-packages (from importlib-metadata; python_version < "3.8"->jsonschema<                                                                                                             
4,>=2.5.1->docker-compose<2.0.0,>=1.26.0->brewblox-ctl) (3.1.0)
Dennis@NASSIE:~$
Dennis@NASSIE:~$ echo "alias brewblox-ctl=\"python3 -m brewblox_ctl\"" >> ~/.bas                                                                                                             
hrc
Dennis@NASSIE:~$ source ~/.bashrc
Dennis@NASSIE:~$ brewblox-ctl install --no-docker-user --no-reboot
Command is about to: Create Brewblox directory; install system dependencies; reb                                                                                                             
oot.
Do you want to continue? (yes, no, verbose, dry-run) [press ENTER for default va                                                                                                             
lue 'yes']
Do you want to install with default settings? [Press ENTER for default value 'Ye                                                                                                             
s']

INFO       Apt is not available. You may need to find another way to install dep                                                                                                             
endencies.
INFO       Apt packages: "curl net-tools libssl-dev libffi-dev"
INFO       Docker is already installed.
INFO       Skipped: apt install.
INFO       Skipped: docker install.
INFO       Skipped: adding Dennis to 'docker' group.
INFO       Creating Brewblox directory (/volume1/homes/Dennis/brewblox)...
INFO       Setting variables in .env file...
INFO       Done!
INFO       Skipped: reboot.

The install looks fine. You still need to run brewblox-ctl setup to complete the installation.

If your NAS already uses port 443, you’ll need to run brewblox-ctl ports after the setup.
You choose the port for the brewblox UI there.

1 Like

Got brewblox running! Apparently the port I used in my first try is blocked by default in chrome. (port 101)

Good to hear!
When choosing custom ports, it’s best not to pick values under 1024: many are reserved for official protocols.

Working! I think…
FYI running ‘brewblox-ctl ports’ resulted in:

Woodpile@NAS:~/brewblox$ brewblox-ctl ports
Usage: main.py [OPTIONS] COMMAND [ARGS]…
Try ‘main.py --help’ for help.

Error: No such command ‘ports’.
Woodpile@NAS:~/brewblox$

I ran ‘brewblox-ctl service ports’ instead (there was a warning during the setup process that listed this command) which possibly created an .env file in the brewblox directory. I edited the file so all 3 ports had random numbers above 1024 and saved the changes, ran setup again and I think I’m in!

Thanks for all the help, time to play with brewblox!

1 Like

Seems to be working so far, however I have a feeling (and think I may have read somewhere but can find itagain) that using wifi connection is not currently possible when running on the NAS? If this is the case, are there any plans to include wifi functionality in the future? If I’m mistaken, how do you get the wifi access working?

Wifi is supported on NAS. If the Spark does not have an IP address yet, you do need to first connect over USB, and set up Wifi in the UI.

https://brewblox.netlify.app/user/startup.html#step-8-use-the-system

Good to know, I did try configuring the wifi in brewblox as noted in the guide with the spark connected by USB but it would not establish any connection… I will try again tonight.

Sorry I’m bad at this and didn’t realize Spark doesn’t like 5G…Just tried 2.4G and works fine… Thanks again!

I have brewblox running on my NAS now. Now I’m trying to get the tilt data from a raspberry pi to the NAS.

I installed brewblox to get all the neccesary stuff installed. After that I removed the dir brewblox.

after that I did according to the readme at github from the tilt

mkdir tilt
cd ./tilt
curl -O https://raw.githubusercontent.com/j616/brewblox-tilt/develop/install_tilt.py

I created a docker-compose.yml in the tilt directory with the contents mentioned earlier in this topic. Eventbus host is the IP-address of my NAS. Brewblox is running on port 2001 https. Should I replace the port to the port brewblox is running on? I tried both and it doesnt work.

python3 ./install_tilt.py
docker-compose up -d

the service starts without any errors after this but the data doesnt show in brewblox.
Maybe I must configure something on muy NAS?

this is what i get when I run docker logs tilt_tilt_1 -f

usage: __main__.py [-h] [-H HOST] [-p PORT] [-o OUTPUT] [-n NAME] [--debug]
                   [--eventbus-host EVENTBUS_HOST]
                   [--eventbus-port EVENTBUS_PORT]
                   [--mqtt-protocol {mqtt,mqtts,ws,wss}]
                   [--mqtt-host MQTT_HOST] [--mqtt-port MQTT_PORT]
                   [--mqtt-path MQTT_PATH] [--history-topic HISTORY_TOPIC]
                   [--state-topic STATE_TOPIC] [--lower-bound LOWER_BOUND]
                   [--upper-bound UPPER_BOUND]
__main__.py: error: unrecognized arguments: --192.168.1.105

Ok, I think we need to take a step back and get some overview.

What do you mean with “Tilt data”? The configuration to get the Tilt connected, or the graph data?

You completely removed the brewblox directory?

If you go into the tilt directory, and run pwd, what is the output?

If you have --eventbus-host=192.168.1.2001, then 2001 is not the port. It is the last section of the IP address. The address 192.168.0.1 with port 2001 would be formatted as 192.168.0.1:2001.

Could you please run docker-compose config | nc termbin.com 9999?

With tilt data I mean the graph data. It is not showing up in brewblox.

Yes i completely removed the brewblox dir.

pwd in tilt dir gives the following: /home/pi/tilt

That is a typo. the ip address is 192.168.1.105 and port 2001.

https://termbin.com/chuo

The stuff in the brewblox directory is neccessary to run brewblox - even if you only want to use a Tilt.
Tilt graph data is not stored in the tilt/ directory, but in the Influx database (influxdb/ directory).

The best course of action is to run:

cd /home/pi/tilt
docker-compose down --remove-orphans
cd ..
sudo rm -rf tilt/
brewblox-ctl install
cd brewblox
brewblox-ctl service ports --http 2000 --https 2001 --mdns 2002
brewblox-ctl setup
curl -O https://raw.githubusercontent.com/j616/brewblox-tilt/develop/install_tilt.py
python3 ./install_tilt.py

Replace the values in brewblox-ctl service ports with the ones you want to use.
After this, you should be able to open the UI, and create a graph for new Tilt data.
To get the old Tilt graph data from the Pi, copy the influxdb/ directory from the Pi (/home/pi/brewblox/influxdb) to your NAS (/home/pi/brewblox/influxdb).

Ways to copy files are described in https://brewblox.netlify.app/dev/tutorials/remote_scripts.html

If you only want to use a Tilt on your NAS, you can remove the default spark-one Spark service by running

brewblox-ctl service remove --name spark-one

Oke that worked so far! According to the log below the tilt is found but there is an error on the data publishing.

pi@raspberrypi:~/brewblox $ docker logs brewblox_tilt_1 -f
2020/07/14 11:35:23 WARNING  brewblox_tilt                   Calibration file not found: /share/SGCal.csv Calibrated values won't be provided.
2020/07/14 11:35:23 WARNING  brewblox_tilt                   Calibration file not found: /share/tempCal.csv . Calibrated values won't be provided.
2020/07/14 11:35:23 INFO     brewblox_service.service        Service name: tilt
2020/07/14 11:35:23 INFO     brewblox_service.service        Service info: v1.0.2-59-g7629bed@ Sat Jun 27 12:19:18 UTC 2020
2020/07/14 11:35:23 INFO     brewblox_service.service        Service config: {'host': '0.0.0.0', 'port': 5001, 'output': None, 'name': 'tilt', 'debug': False, 'eventbus_host': 'eventbus' , 'eventbus_port': 5672, 'mqtt_protocol': 'wss', 'mqtt_host': '172.17.0.1', 'mqtt_port': None , 'mqtt_path': '/eventbus', 'history_topic': 'brewcast/history', 'state_topic': 'brewcast/state', 'lower_bound': 0.5, 'upper_bound': 2}
2020/07/14 11:35:23 INFO     brewblox_service.mqtt           Starting <EventHandler for wss://172.17.0.1:443/eventbus>
2020/07/14 11:35:23 INFO     brewblox_tilt                   Started TiltScanner
2020/07/14 11:35:23 INFO     brewblox_tilt                   Found Tilt: Black
2020/07/14 11:35:23 ERROR    brewblox_tilt                   Error when publishing data ConnectionError('Publish error="The client is not currently connected.", topic="brewcast/history"')
2020/07/14 11:35:24 ERROR    brewblox_tilt                   Error when publishing data ConnectionError('Publish error="The client is not currently connected.", topic="brewcast/history"')
2020/07/14 11:35:25 ERROR    brewblox_tilt                   Error when publishing data ConnectionError('Publish error="The client is not currently connected.", topic="brewcast/history"')

If you open the graph, and set it to 5 mins duration, are you getting new data?
These errors are from the first few seconds after startup. It’s likely that at that point the eventbus wasn’t done starting up yet.