The Coffee-Cam: How Our Office Coffee Machine Learned to Talk

It all started — like many great ideas — with coffee. Or rather, the lack of it. In our office, we kept running into the same annoyance: you’d walk up to the coffee machine, full of caffeine dreams, only to find it mid-cleaning cycle. 30 minutes of nothing but frustration. There had to be a better way. The Idea That Was Born at the Coffee Machine One day, someone joked: “Wouldn’t it be nice if we could see from our desks whether the machine is cleaning or not?” Sadly, our coffee machine doesn’t come with an API - even though it’s a Pro-User product. But we had a spare Raspberry Pi and an old webcam lying around. And just like that, a tiny coffee-fueled hackathon began. Step 1: Camera + Motion We mounted the webcam on the coffee machine and installed Motion on the Raspberry Pi. It gave us a simple web interface that streamed frames from the camera — perfect for keeping an eye on the machine’s display. From there, it was easy to tell manually whether the “Cleaning” box was on screen or not. Go to your browser, type the Raspberry Pi’s IP and have a look at the webcam. Good first step. But having to check the browser every time? Still not ideal. So, back to the drawing board… Step 2: Image Classification with TensorFlow We needed automation. The camera position is fixed, thus it should give us a great playground to differentiate between images. So I fired up TensorFlow and started training a tiny neural network. I collected screenshots from the camera feed — some with the cleaning screen visible, some without. With just a few dozen examples per category, the model got surprisingly reliable at classifying whether the machine was in cleaning mode or ready for action. A small excerpt of what i had to cope with: Step 3: A Slackbot With Attitude The last missing piece: notifications. As the coffee machine is the hardest worker in most offices, plain messages would’ve been boring. So the bot got a bit of personality. I used ChatGPT to generate a few, here are the ones that I integrated: messages = [ "

Apr 25, 2025 - 17:24
 0
The Coffee-Cam: How Our Office Coffee Machine Learned to Talk

It all started — like many great ideas — with coffee. Or rather, the lack of it.

In our office, we kept running into the same annoyance: you’d walk up to the coffee machine, full of caffeine dreams, only to find it mid-cleaning cycle. 30 minutes of nothing but frustration.

There had to be a better way.

The Idea That Was Born at the Coffee Machine

One day, someone joked:

“Wouldn’t it be nice if we could see from our desks whether the machine is cleaning or not?”

Sadly, our coffee machine doesn’t come with an API - even though it’s a Pro-User product. But we had a spare Raspberry Pi and an old webcam lying around. And just like that, a tiny coffee-fueled hackathon began.

Step 1: Camera + Motion

We mounted the webcam on the coffee machine and installed Motion on the Raspberry Pi. It gave us a simple web interface that streamed frames from the camera — perfect for keeping an eye on the machine’s display.

The webcam attached to the coffee machine (Top right)

From there, it was easy to tell manually whether the “Cleaning” box was on screen or not. Go to your browser, type the Raspberry Pi’s IP and have a look at the webcam.

Good first step. But having to check the browser every time? Still not ideal.

So, back to the drawing board…

Image description

Step 2: Image Classification with TensorFlow

We needed automation.

The camera position is fixed, thus it should give us a great playground to differentiate between images.

So I fired up TensorFlow and started training a tiny neural network. I collected screenshots from the camera feed — some with the cleaning screen visible, some without.

With just a few dozen examples per category, the model got surprisingly reliable at classifying whether the machine was in cleaning mode or ready for action.

A small excerpt of what i had to cope with:

Someone grabbing a cup, a colleague messing up my test set, the cleaning box, and no box at all (TL to BR)

Step 3: A Slackbot With Attitude

The last missing piece: notifications.

As the coffee machine is the hardest worker in most offices, plain messages would’ve been boring. So the bot got a bit of personality.

I used ChatGPT to generate a few, here are the ones that I integrated:

messages = [
    "