Skip to content

Raspberry Pi / Powerplug / Slackbot for our coffee machine

Notifications You must be signed in to change notification settings

alasco-tech/shipit-coffee-machine

Repository files navigation

alasco-barista

Our hardware setup to monitor our espresso machine and let people know when there's fresh delicious coffee being brewed! This is an outcome of one of our quarterly ShipIt days.

Overview

In times of social distancing, we adopted the following rule around our espresso machine: If you use the machine, wear a face mask and gloves, announce it to the #random channel and serve espresso (via an espresso table) — for everyone showing up.

To smoothen this process, the coffee grinder automatically triggers a slack message when coffee is about to be prepared:

Coffee Process Visualization

We also include a picture of the person preparing the espresso, to make the slack post engaging and fun.

Hardware Setup

We use a Voltcraft SEM6000 smart power plug to monitor the real-time power consumption of the coffee grinder.

Detecting machine use via power consumption has the advantage of not interfering with the cleaning and maintenance of the coffee machine. The Voltcraft SEM6000 is an easy to use device for scripting, because somebody made a very nice command line tool to control it from a Linux machine.

A Raspberry Pi monitors the real-time wattage of the coffee grinder reported by the smart plug to observe when the machine is turned on. When detecting usage, a picture is taken via the Pi Camera Module and posted to slack, along with a message. Additionally, we count the number of espressi made and report it to Datadog.

Software Setup

Starting from a vanilla Raspberry Pi OS Lite installation, set up SSH and wifi credentials for headless usage.

Check out the alasco barista repository along with the Voltcraft SEM 6000 script in /home/pi and follow the instructions to configure the bluetooth plug as coffee_grinder.

Link the service file via sudo ln -s coffee_watcher.service /etc/systemd/system/ and use systemctl enable coffee_watcher to run the watcher script on boot.

Slack Bot

Make sure to follow the tutorial of the official python-slackclient to set up a slack bot that will be allowed to post on your behalf. The created credentials are needed in the config.ini!

Rename the config.ini.example to config.ini and ensure to add your slack-bot secrets as slack_token. Optionally, add your Datadog API key as dd_api_key.

About

Raspberry Pi / Powerplug / Slackbot for our coffee machine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published