Code Monkey home page Code Monkey logo

shipit-coffee-machine's Introduction

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.

shipit-coffee-machine's People

Contributors

chrisittner avatar wearebasti avatar

Stargazers

 avatar

Watchers

Dmitry Shevelev avatar Martin Vielsmaier avatar Sergei Kolobov avatar Martin Kapfhammer avatar Raul Taranu avatar James Cloos avatar Greg Signal avatar Vadim avatar Uliana Caceres avatar  avatar Ilia Novikov avatar Ewa Nestorowicz avatar Samuel Dantas avatar Thomas Mueller avatar Zeyad Obaia avatar  avatar Mohamed Hussein avatar  avatar Bahram Aghaei avatar Deni Cho avatar Sebastian Mark avatar Mohammad Taghi Khavari avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.