Are you frustrated in the office when there is never fresh coffee in the kitchen when you arrive?
This common office problem requires serious actions. With this instructable you can create a Slack integrated coffeebot for your coffee makers with small amount of money, equipment and effort.
Step 1: Get the Parts
For this project I searched many devices. I was hoping to find a device which is working for few goals:
- Slack integration
- Timer functionality
- Budget friendly
- Requires none/few hardware applications
The search resulted into Particle Internet Button (https://store.particle.io/products/internet-button). This fairly inexpensive device offered very easy Slack integration using IFTTT, timer functionality was able to achieve using LEDs and all hardware was in the package. One small downside was the lack of proper case, but fortunately Thingsverse offered a ready made 3D printer blueprint (https://www.thingiverse.com/thing:1090057). With a friend's help I was able to get this printed and the last problem was tackled.
Step 2: Starting Getting the Hardware and Software Together
First of all get the Particle Internet Button ready to go. I will not guide all the steps here, because they have good guide how to use it: https://docs.particle.io/quickstart/button/
Once the basics are ready, it's time to get the steak of this story on the table.
We should start by describing the preferred user stories:
- I would like to have notification through Slack, when someone brews coffee.
- When the coffee is brewed, I would like to see for how long ago the coffee was made. I don't want to check the most recent Slack message, while I'm at the kitchen. Something like 15min accuracy is reasonable here.
These two major issues was the aim. The attached file containing the source code has quite extensive amount of documentation and explanations how different parts work.
Once this source code is installed to the Internet Button, the last missing part is setting up IFTTT applet.
Step 3: Setting Up IFTTT Between Particle Cloud and Slack
This part is fairly straight forward and is well documented both from Particle and IFTTT side. Here are some screenshots of how the applet will look like at the end.
In Slack you only need to create a public channel. Nothing else is required.
Step 4: The Outcome and Usage
This is how the button will look like. You should install the button next to your office's coffee makers and guide your colleagues how to use it. In my use case there are two coffee makers, thus left and right buttons. With this code it is not possible to add more than that, but with some modifications third and fourth could be added, but then resetting need to be redesigned.
Few things to consider:
1. The wifi antenna is not very strong in the Photon, so the wifi router (2,4Ghz) should be located fairly close. In my occasion the wifi router was about 10 meters away across the room.
2. The Internet button is not waterproof, so I had it placed on top of container to keep it save from the coffee makers possible spills.
3. The mills() used in the code will zero itself every 49 days, so it might need a restart after that (I haven't been able to test this)