I seem to remember a few people have got BrewBlox working on Synology NAS’s. I just wanted to check how people went about setting it up. The options seem to be to manually do the install without the aid of brewblox_ctl, manually install the right versions of python etc so I can use brewblox_ctl, or try and get pyenv installed and manage the python environment that way. Or have I completely missed a simpler way of going about this? Thanks in advance.
You can run brewblox_ctl with
python3 -m brewblox_ctl.
brewblox-ctl doesn’t work on the NAS.
If I remember correctly, I had to manually install python3 and docker from the GUI package manager.
Not sure about extra install steps I needed (can’t find my notes now), but after install you can use all of our tooling.
If you can keep notes on a fresh install, we can update our docs
Running up against this. Initially thought it might be a python3.5 vs 3.7 issue but doesn’t look like it
/volume1/@appstore/py3k/usr/local/bin/python3: Error while finding spec for 'brewblox_ctl.__main__' (<class 'AttributeError'>: module 'typing' has no attribute 'Text'); 'brewblox_ctl' is a package and cannot be directly executed
For completeness, this is the full traceback when I was trying using the alias
Traceback (most recent call last): File "/volume1/@appstore/py3k/usr/local/bin/brewblox-ctl", line 5, in <module> from brewblox_ctl.__main__ import main File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/brewblox_ctl/__init__.py", line 5, in <module> from brewblox_ctl.utils import sh # noqa: F401 File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/brewblox_ctl/utils.py", line 15, in <module> from dotenv import set_key File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/dotenv/__init__.py", line 2, in <module> from .main import load_dotenv, get_key, set_key, unset_key, find_dotenv, dotenv_values File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/dotenv/main.py", line 15, in <module> from .parser import Binding, parse_stream File "/volume1/@appstore/py3k/usr/local/lib/python3.5/site-packages/dotenv/parser.py", line 44, in <module> ("string", typing.Text), AttributeError: module 'typing' has no attribute 'Text'
Did you install it with this command?
sudo /usr/local/bin/python3 -m pip install -U brewblox-ctl
Just updated brewblox on my NAS. Needed to update the docker package to make it support our compose file version 3.7, but after that it worked without any issues.
Another issue you have to take into account is potential port conflicts.
brewblox-ctl setup --port-check will help with that. But I think that’s the default. I just reran it and it ran without problems (but I kept all my existing config, so might have not triggerd some potential errors).
Also, that is Python3.5, you would need to install Python3.7 on the NAS
works fine with 3.5 on mine.
Our containers use 3.7, but that’s inside the container. brewblox-ctl on the host works in 3.5 too.
We specifically use 3.5 as minimum version, as it’s the system default for debian 9. (Ubuntu 18.04 uses 3.6) We’ll likely update when we’re confident everyone is using debian/raspbian buster on their Pi.
I remember somebody else reporting the typing import error on Synology. I’ll try and dig up whether that was solved.
Just to add an update, I’ve discovered the user repos over at https://synocommunity.com/. They provide Python 3.5.6. I also had to add the package to PATH. For those playing along at home:
sudo python3 get-pip.py
sudo pip3 install -U setuptools brewblox-ctl
brewblox-ctl install, my issue is now that usermod (and other standard group commands) aren’t available on the synology nas.
Will have to pick this up again later.
The usermod command is optional. You can run
brewblox-ctl install --no-docker-user to skip it.
Afterwards, brewblox-ctl automatically prefixes docker commands with sudo if you’re not part of the docker group.
The check is done by calling
id -nG $USER. I believe this is available on Synology?
I don’t have a docker group on my nas and have to run docker commands with sudo.
My fix to the
usermod issue was to say
no to the following question:
Do you want to run Docker commands without sudo? [Press ENTER for default value 'Yes']
For completeness, the install step worked when using
brewblox-ctl install --no-docker-user
The only other thing I had to do was modify the ports in
.env. The dsefaults were already in use by the NAS.