Kegberry/Kegbot New Installation

I am on board with that give me the info

1 Like

pls help, no admin tab show on page controller after installed Kegberry by single command.

Hi all,

I think I’ve done my home work before asking for help. The problem here is that Raspberry Pi does not detect the kegboard (Arduino Mega 2560 R3). Things I’ve tried so far:

  1. Installed latest Buster on RPi 3 and used Kegberry Single-Line Install Script to get back-end server installed. This completed without any issue but no matter what the kegoard did not show up under Controllers section.
  2. Tried to reinstall it several times as per original post quoted on the top
  3. Attached the board directly to a FireHD 10 tablet with kegbot running. The board got detected right away and started recording pours as soon as I started blowing into the flow meter.
  4. Installed Buster VM on my server and used again single-line install to get server setup, after first reboot I setup pass-through on the Hypervisor’s USB port where I connected kegboard and it got detected right away under Controller menu.
  5. I took drastic steps as I thought my RPi 3 might have an issue and ordered brand new RPi 4, installed with Buster, used single-line install, and yet again the kegboard did not get detected. Repeated reinstall at least three times.

Any of you guys had similar issue? Not sure how to explain it works all fine on the full x64 Debian install on a VM but it does not work on neither of my RPis

Are there any DEBUG logs I could have a look into to see why this does not get picked in the Kegberry app? I can see the board gets detected by the OS just fine:

root@raspberrypi:~# lsusb 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 2341:0042 Arduino SA Mega 2560 R3 (CDC ACM)
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Any help on this will be greatly appreciated.

Im a total noob with all of this… But can tell you that after numerous fresh installs my raspberry Pi has never detected my kegboard, until I connect to android device running the kegbot app. After that the kegboard pops up in the controllers on raspberryPi and works fine.

You perhaps have link to updated script? just want to make sure Im using newest, cause Im having issues with node. Its works fine when using the App, but if kegboard is plugged into raspberry the pours show while pouring, but does not register the pour on server or on the app. Not sure what Im doing wrong. Tried several times and on different Raspberry OS.

Thanks,

Yes your method works fine, as soon as I plug the kegboard to my FireHD the board pops up just fine in the settings, but then when I move the cable back to the RPi it doesn’t detect pours. Not sure here if you plugged the board to your tablet just to get the setting populated and then moved connection to the Pi and it kept on working… or you are using your setup with the board permanently connected to the tablet.

Basically I don’t want my kegboard to be attached to the android device, I would like it to be permanently attached to the RPi for recording pours.

I have now achieved it by installing kegberry using official docker composer method. This however created a new issue where the pours get recorded just fine but are not being shown on the tablet util auto recorded as guest. ie:

  1. Click on a drink on the tablet, and then choose my account to claim it
  2. I get a screen with the beer and oz poured,but the counter doesn’t move (log on the kegberry shows activity on flow0 just fine) and the beer to meter mapping is also correct)
  3. Eventually the pouring session expires as it doesn’t detect anything and the display comes back to the main screen where I can see ie: 10oz poured by guest 0 minutes ago…

I could possibly live with kegboard connected to the tablet but my FireHD has USB C and I can’t charge it at the same time as using OTG cable! I’ve already tried few different adapters from Fire Stick power injectors to quite expensive Lenovo USB C to NIC,HDMI,+3USB portd with dedicated PD port, all with same result you can either charge or use OTG but never both.

If you don’t mind sharing what tablet are you using? Is the kegboard working at the same time as charging the tablet?

Thanks

Aaah… Yea. I have the same problem. If I connect the kegboard to raspberry I also dont get any pours logged.
The reason why Im trying to get away from the tablet seems to be same as yours, cant charge and host at same time, and from what i’ve searched its NOT simply solved by buying a cable. Tried looking for older tablet with a dedicated or 2nd charging port but was unsuccessful.
Currently Im using a old android tv box with kegbot app loaded( instead of tablet)… and “log in” to kegberry via browser from the tv box. This works fine except I dont have the touch screen and using keyboard mouse to navigate app.So it seems that kegboard still needs to be connected directly to tablet or the android APP to work. I kinda thought that with the NodeJS it would be possible to skip the tablet…or maybe we just missing something.

Okay…managed to get mine working, kegboard connected directly to raspberry… all pour’s are registered and updated, I can see updated pours on kegbot app as well.
I had to change the format of this file /home/kegbot/.kegbot/pycore-flags.txt
so that it looks something like this:

–api_url=http://localhost/api
–api_key=2a54012341ba932a264182d45d35fe69

as can be seen in this post

https://forum.kegbot.org/t/kegberry-kegbot-new-installation/1017/36\

Mine was all in one line, I just changed it to this format, and Voila !
only thing that does not seem to update is the level of keg (image on tap screen) if half the volume is used the image still shows full… Correct levels is shown in the keg room and on app. but not on the Tap List screen or the keg list.
Hope it helps

SOLVED: It was the Glen1978 solution, turns out my API key updated through all my updates and re-imaging but the file had an old API key in it for some reason. Also, I put a space between the two lines and think that might have caused issues, so for others I would make sure to keep exactly as written above.


Hello, @johnnyruz your posts are awesome! I have followed your single line install and have the “kegberry” on my raspberry pi so can setup the server and have my kegs setup via the web/keg-bot app.

I am unable to register my Arduino Mega board with 3 sensors though (I started testing with 1 sensor). When I plug into raspberry pi via USB it doesnt seem to register and the server site says " Note: Controllers can be created and edited in the Kegbot app." but then nothing can be configured in the app. I have reinstalled from scratch (ie from Buster OS) several times but nothing seems to work to register the board/sensors to monitor flow.

I have tested the board with sensors + Kegbot code on my PC where I flashed the file via arduino IDE and get the welcome message + any flow sensing via serial monitor so the board seems to be working, just cant make the connection to the Pi to get it to the server. Also updated the pycore-flags file as per Glen1978 above and still no luck. USB ports work on raspberry pi with USB mouse/keyboard + giving the board power, and the board is found on the Pi via ls /dev/tty*

Any idea how I can trigger the raspberry Pi to recognize this board?

I just reinstalled stretch and followed these instructions - Kegberry/Kegbot New Installation

I am still getting the below errors

INFO : Installing Kegbot …
Traceback (most recent call last):
File “/home/kegbot/kegbot-server.venv/bin/kegbot”, line 56, in
django.setup()
File “/home/kegbot/kegbot-server.venv/lib/python2.7/site-packages/django/ini t.py”, line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File “/home/kegbot/kegbot-server.venv/lib/python2.7/site-packages/django/apps/ registry.py”, line 85, in populate
app_config = AppConfig.create(entry)
File “/home/kegbot/kegbot-server.venv/lib/python2.7/site-packages/django/apps/ config.py”, line 87, in create
module = import_module(entry)
File “/usr/lib/python2.7/importlib/init.py”, line 37, in import_module
import(name)
File “/home/kegbot/kegbot-server.venv/lib/python2.7/site-packages/imagekit/i nit.py”, line 3, in
from . import conf
File “/home/kegbot/kegbot-server.venv/lib/python2.7/site-packages/imagekit/con f.py”, line 1, in
from appconf import AppConf
File “/home/kegbot/kegbot-server.venv/lib/python2.7/site-packages/appconf/in it.py”, line 1, in
from .base import AppConf # noqa
File “/home/kegbot/kegbot-server.venv/lib/python2.7/site-packages/appconf/base .py”, line 107
class AppConf(metaclass=AppConfMetaClass):
^
SyntaxError: invalid syntax
ERROR: Command returned non-zero exit status (1)

Generated configuration:
CACHES = None
DATABASES = {‘default’: {‘ENGINE’: ‘django.db.backends.mysql’, ‘NAME’: 'kegbot ', ‘HOST’: ‘’, ‘USER’: ‘root’, ‘PASSWORD’: ‘’, ‘OPTIONS’: {‘init_command’: ‘SET storage_engine=INNODB’}}}
KEGBOT_ROOT = ‘/home/kegbot/kegbot-data’
MEDIA_ROOT = ‘/home/kegbot/kegbot-data/media’
SECRET_KEY = ‘4a_h8-^0zrv@j(hh$%v&a*_nw#wpc5^3xdo=pu8*xa_y241o&1’
STATIC_ROOT = ‘/home/kegbot/kegbot-data/static’

Writing settings to /home/kegbot/.kegbot/local_settings.py …
Finishing setup …
Running command: kegbot syncdb --noinput -v 0

ERROR : Command returned error:
ERROR : Command: sudo su -l kegbot -c “. /home/kegbot/kegbot-server.venv/bin /activate && setup-kegbot.py --interactive=false --db_type=mysql --db_database=\ “kegbot” --data_root=/home/kegbot/kegbot-data”
ERROR : Return code: 1
Traceback (most recent call last):
File “/usr/local/bin/kegberry”, line 7, in
app.run()
File “/usr/local/lib/python2.7/dist-packages/kegberry/app.py”, line 210, in ru n
command_fn(*args)
File “/usr/local/lib/python2.7/dist-packages/kegberry/app.py”, line 293, in in stall
run_in_virtualenv(SERVER_VENV, cmd)
File “/usr/local/lib/python2.7/dist-packages/kegberry/app.py”, line 154, in ru n_in_virtualenv
return run_as_kegberry(cmd, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/kegberry/app.py”, line 148, in ru n_as_kegberry
return run_command(wrapped, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/kegberry/app.py”, line 142, in ru n_command
raise e
subprocess.CalledProcessError: Command ‘sudo su -l kegbot -c “. /home/kegbot/keg bot-server.venv/bin/activate && setup-kegbot.py --interactive=false --db_type=my sql --db_database=“kegbot” --data_root=/home/kegbot/kegbot-data”’ returned non -zero exit status 1

I’ll have to run through things again. There’s likely something with Python2.7 packages that aren’t working since that has gone EOL. Haven’t had time to work on the newer Docker-based version that was released or run a fresh install just to see what happens. If I get a chance this week I’ll let you know if I find a work-around.

All good John, I went the digital ocean route and the docker process was fine. I think the Pi I was using was just under specd

I’m really late to this party. I have been brewing and kegging for close to 10 years. I recently starting looking for automation projects and would like to automate my keezer taplist.

I have a 4 node Docker Cluster running on Raspberry Pi 4 2GB nodes. When I deploy the docker compose file for Kegbot, I get the following error in the Kegbot Container:

OverflowError: Python int too large to convert to C long

Anyone encounter this and have a resolution before I dive in?

This sounds like a 32 bit vs 64 bit architecture issue.

The docker images are built for amd64 and arm/v7. Does this match your platform?

I’m running 4 Raspberry Pi 4 2GB nodes using arm/v8 64-bit host OS.

Switched from trying to deploy the stack from within Portainer and moved to the command line:
docker stack deploy -c /media/kegberry/docker-compose.yml kegberry
Profit! Everything is running.

Took a little tweaking to get the mysql container configured correctly, but once that was done, I was able to complete the setup process. I have added my 4 taps and 3 current kegs.

I had not accessed my kegberry in a couple months but now getting the 502 Bad Gateway error. i attempted these commands and get a favorable response to the first 2 but get get “failed to connect to localhost port 8000: Connection refused” message when use curl localhost:8000 command. i also checked the pyflags and local_settings files and all look good. i have port 8000 open on my router. any ideas?

does anyone know if the support packages (specifically set serial number) is installed with the docker method of the server?

Nevermind I just installed on a local linux machine and ran it.

I am having another issue getting a backup via the docker deployment, do I need to modify permissions somewhere?

I have been stuck on this for days. Any help is appreciated.

INFO : Updating package list …
INFO : Installing required packages …
b"Reading package lists…\nBuilding dependency tree…\nReading state information…\nPackage mysql-server is not available, but is referred to by another package.\nThis may mean that the package is missing, has been obsoleted, or\nis only available from another source\n\nE: Package ‘mysql-server’ has no installation candidate\n"

ERROR : Command returned error:
ERROR : Command: sudo bash -c “DEBIAN_FRONTEND=noninteractive apt-get -yq install build-essential nginx-light libjpeg-dev supervisor python-setuptools python-dev default-libmysqlclient-dev mysql-server redis-server”
ERROR : Return code: 100
Traceback (most recent call last):
File “/usr/local/bin/kegberry”, line 7, in
app.run()
File “/usr/local/lib/python3.9/dist-packages/kegberry/app.py”, line 210, in run
command_fn(*args)
File “/usr/local/lib/python3.9/dist-packages/kegberry/app.py”, line 242, in install
self._update_packages()
File “/usr/local/lib/python3.9/dist-packages/kegberry/app.py”, line 234, in _update_packages
run_command(‘sudo bash -c “DEBIAN_FRONTEND=noninteractive apt-get -yq install {}”’.format(
File “/usr/local/lib/python3.9/dist-packages/kegberry/app.py”, line 142, in run_command
raise e
File “/usr/local/lib/python3.9/dist-packages/kegberry/app.py”, line 131, in run_command
return fn(cmd, stderr=subprocess.STDOUT, shell=True,
File “/usr/lib/python3.9/subprocess.py”, line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File “/usr/lib/python3.9/subprocess.py”, line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command ‘sudo bash -c “DEBIAN_FRONTEND=noninteractive apt-get -yq install build-essential nginx-light libjpeg-dev supervisor python-setuptools python-dev default-libmysqlclient-dev mysql-server redis-server”’ returned non-zero exit status 100.

Any help here? I am completely stuck.

Looks like the mysql package that the build file is looking for doesn’t exist anymore. If I remember correctly, MariaDB became the default mysql flavor packaged with versions of Debian after 10. I don’t remember what solution I came up with when I was working through all of the various installation options discussed in this thread last year.

Which install directions and instructions are you trying to follow from this thread?

EDIT: poking around the repo in github, I’m not seeing any references to mysql-server. My recommendation would be to start from the instructions in the README there, since there’s been a fair bit of additional development in the repo since this thread was last updated, I believe: GitHub - Kegbot/kegberry: Kegbot on Raspberry Pi.