Skip to content

A never-ending supply of cold beer at KI labs to maintain employee happiness

License

Notifications You must be signed in to change notification settings

KI-labs/BeerBot

Repository files navigation

BeerBot

GitHub license

This repository is the central location for all things related to the beloved BeerBot.

Tread carefully since this is an extremely important project within KI labs.

alt text

Features

BeerBot is a slackbot capable of the following:

  • checking beer (or bottled beverages) in the fridge
  • identify and analyze whether bottled beverages are cold
  • automatically alert when beer is running low

Processing Pipeline

alt text

Installation

BeerBot can be installed by cloning this repo and its python requirements.

$ pip3 install -r requirements.txt

Configuration

Minimal configuration with a .envrc file based on .envrc.template is required in order to link with Slack.

SLACK_OAUTH_TOKEN=
SLACK_BOT_OAUTH_TOKEN=
CHANNEL=
LISTEN_DELAY=1
ALERT_DELAY=10
MIN_BEER_THRESHOLD=5
DATA_DIR="/home/pi/BeerBot/data"
TZ="Europe/Berlin"

Deployment

There are three scripts for running the BeerBot engine.

  • ./beerbot.py
    • engine for checking door state and image processing
  • ./slackbot_alert.py
    • responsible for alerting when beer supply is critically low
  • ./slackbot_listener.py
    • responsible for listening to when users want beer supply or coldness information

These processes are deployed with supervisor in ./supervisor/*.conf, see this for installation and setup.