Keg Pi is a collection of packages that show how much beer is left in a keg. There are 3 packages that work together to do this: volumetracker, beerstats, and beerweb. They all share a PostgreSQL instance that is used to keep track of the keg over time.
Demo:
A few photos:
Keeps track of how much beer is poured based on data from the flow meter.
Gives a readout of approximately how much beer is left in the keg.
Manages the kegs. This is where the keg chaperone can create new kegs and choose the beer name to be displayed.
Keg Pi was tested on a Raspberry Pi 2 model B running Raspbian Jessie. It should theoretically run on any Raspberry Pi.
Keg Pi subtracts from the total keg quantity based on the output from a flow meter attached to the Raspberry Pi's GPIO pins.
Keg Pi was written to display stats on a 128x64 pixel SSD1306 OLED display like this; however, anything that can use the SSD1306 driver and be connected to the Raspberry Pi via I2C should work.
- Format an SD card and flash the stock Raspbian (or Raspbian Lite) image by following these instructions.
- Attach the flow meter and OLED display. By default the application expects:
- An SSD1306 128x64 pixel display connected via I2C
- A flow meter connected via GPIO pin number 23
- Enable the I2C kernel module
- Run
sudo raspi-config
- Choose Advanced Options, go to I2C and choose Yes at the two prompts
- Reboot
- Run
- Make sure you are in the pi user's home directory
cd ~
- Clone keg-pi repo
git clone https://github.com/bustinjailey/keg-pi.git
- Run
cd keg-pi && sudo install.sh
and enter a password to be used for the database user when prompted. The default israspberry
if you don't care to set your own password.
The install script is designed to be run on a fresh Raspbian installation and does a few things:
- Installs PostgreSQL
- Creates the keg-pi database schema
- Installs various package dependencies
- Installs the modules as daemons using
supervisor