Dear Kegbotters,
With few months of sporadic incubator sessions, we managed to get the kegbot system working above and beyond.
After some extreme slop hacks mentioned below, any of our friends can now visit our kegbot site at SECRETDOMAIN dot com, and watch us drink a million beers.
One of us slaved away for months brewing >240L of the good stuff while we hacked the missing pieces of kegbot together.
Once we got it working, we hosted an Oktoberfest. All you can drink and eat for $50 boomer bucks.
Great success, Kegbot was a big hit. The photos are incredible: a series of nervous drinking, to heavy pints, to complete chaos; every attendee’s pour captured by our scuffed Kegbot Tablet camera. There were often queues to use the kegbot system, so most photos are mangled groupshots. 10/10.
We noticed the github is dead, forums mostly dead (appreciation4 @moad), but we got the system mostly working and it really is quite incredible. Here I list the parts we use, and some hacks that helped us get things working. Hopefully someone finds it useful.
Parts and Setup
Flow meters
Water flow sensor YF-S201
- https://www.aliexpress.com/item/1005005690527631.html
Data and power pins plugged into the Arduino.
Solenoid Valves
Solenoid pinch valve
- https://www.aliexpress.com/item/4000033436039.html
Power pins connected to 5v relay modules (generic) so that the Raspberry Pi pins can control the mains power to open/close them. Lookup circuitz online for how to arrange these.
Kegboard - Arduino Mega ATmega2560
Latest version from Github, flashed using Arduino software:
- GitHub - Kegbot/kegboard: Kegbot's Arduino Kegerator controller, a flexible multi-function board. Firmware, schematics, Python library. Flow sensing, DS1820 temperature sensing, relay control, ID-12 RFID, and buzzer support.
a6d0deebab289117186ad6083b1e197ee04b501d
Plugged directly into the Tablet via USB OTG cable!
Note: originally we thought the Arduino had to be plugged into the Raspberry Pi Kegbot Server - But this did not work!
You need to look at the pin layout of the Arduino and need to wire the appropriate pins to the flowmeters and/or solenoid valves.
Kegbot Tablet - Google Nexus 7 Tablet
MUST use this 2014 release of Kegbot Android, the app crashes on other versions.
2b36ffafeb71e17daf0484496992bb63a2439bf1
Flowmeter configured within app after connecting to Kegbot Server Pi over wifi.
Kegbot Server - Raspberry Pi 4
Running on recent version of Raspbian (likely any OS would work, specs below).
Tablet and web interface available on local IP (192.168.0.x - found using ifconfig
command).
Latest version of Kegbot Server from Github
- Kegbot Server
- GitHub - Kegbot/kegbot-server: Kegbot Server, the internet beer kegerator monitoring system.
e0f953137bc261519444cb769455317074c7253e
- Modified
docker-compose.yml
- Set to
stable
- My release is
357570b82a59bc5199fbb762c9882ab0ae11a73a07d9ec96f8a0a94b1ac0922f
- My release is
- Also replaced
CHANGEME
with a password
- Set to
version: '3'
services:
kegbot:
image: ghcr.io/kegbot/server:stable
restart: unless-stopped
command: run_server
build: .
ports:
- "8000:8000"
volumes:
- kegbot-data:/home/pi/kegbot-data
tmpfs:
- /tmp
- /var/tmp
environment:
REDIS_URL: redis://redis:6379/0
DATABASE_URL: mysql://kegbot_dev:CHANGEME@mysql/kegbot_dev
KEGBOT_ENV: "debug"
KEGBOT_SECRET_KEY: "CHANGEME"
workers:
image: ghcr.io/kegbot/server:stable
restart: unless-stopped
command: run_workers
volumes:
- kegbot-data:/home/pi/kegbot-data
tmpfs:
- /tmp
- /var/tmp
environment:
REDIS_URL: redis://redis:6379/0
DATABASE_URL: mysql://kegbot_dev:CHANGEME@mysql/kegbot_dev
KEGBOT_DEBUG: "true"
KEGBOT_SECRET_KEY: "CHANGEME"
mysql:
image: mysql:latest
restart: always
environment:
MYSQL_ROOT_PASSWORD: 'CHANGEME'
MYSQL_USER: 'kegbot_dev'
MYSQL_PASSWORD: 'CHANGEME'
MYSQL_DATABASE: 'kegbot_dev'
tmpfs:
- /tmp
- /var/tmp
volumes:
- mysql-data:/var/lib/mysql
redis:
image: redis:latest
restart: always
volumes:
mysql-data:
kegbot-data:
Exposing Kegbot Server
With the plain kegbot website in this setup, we had two issues,
- The images were not loading.
- Kegbot website was not accessible remotely or at a domain.
To fix these, we had to do some hacks. These details are bit flakely but I can assist upon request.
First, we had to change the base URL of the website (somehow) in the Kegbot server python files, so that images and static files would be read from the correct location (ip or domain).
Secondly, we made a mirror of the kegbot website’s docker filesystem, using system links, we positioned the images and static stuff under /var/www/kegbot
. And then we made an appropriate NGINX file, and also (optionally) pointed a domain.
Apparently you can just use KEGBOT_BASE_URL
for this, only just learned this. arhg
Raspberry Pi Specs:
_,met$$$$$gg. pi@raspberrypi
,g$$$$$$$$$$$$$$$P. --------------
,g$$P" """Y$$.". OS: Debian GNU/Linux 12 (bookworm) aarch64
,$$P' `$$$. Host: Raspberry Pi 4 Model B Rev 1.2
',$$P ,ggs. `$$b: Kernel: 6.6.20+rpt-rpi-v8
`d$$' ,$P"' . $$$ Uptime: 7 days, 2 hours, 52 mins
$$P d$' , $$P Packages: 1259 (dpkg)
$$: $$. - ,d$$' Shell: bash 5.2.15
$$; Y$b._ _,d$P' Terminal: /dev/pts/0
Y$$. `.`"Y$$$$P"' CPU: (4) @ 1.500GHz
`$$b "-.__ Memory: 1098MiB / 3792MiB
`Y$$
`Y$$.
`$$b.
`Y$$b.
`"Y$b._
`"""
Closing
We got stuck time and time again during the build process, months of wavering doubt that we’d ever get the system working. I thought it needed a full software rewrite and simplification, and I still do somewhat think this is the case. It would be a great project for someone, but so far we have avoided being nerdsniped too hard.
There are still some things which do not work perfectly, namely the NFC card to activate a user, the solenoid valves spam on and off for some reason.
Next, we would like to add Bitcoin lightning payments to open the valve and allow beer to flow. This would be fun and skips the need for cash or fiat infrastructure. People can just buy a prepaid NFC card that has bitcoin loaded on it. Instead of kegbot managing the valve, it’d just be a separate system running on the Pi.
- Buy preloaded bitcoin NFC card (cash or bank transfer)
- Tap card to pay and open valve
- Choose user
- Pour beer
Another idea we have is to use weight scales instead of flow meters, less foam, more accuracy. You could hack this into kegboard tbh. Do a rough calculation and translation of weight deltas into flow rates.
Later evolution is AI kegbot that can drink beer from itself. Coming soos
Cheers
Intermediate states
beer
cheers
-tonybingus