Instructables
Picture of Tweet-a-Pot: Twitter Enabled Coffee Pot
Like the idea of making coffee on the fly? from your bed? While you're on the bus coming home? Then the Tweet-a-pot is for you!

Tweet-a-pot is the next in fancy twitter enabled devices. This coffee pot enables its owner to make a pot of coffee from anywhere they have cell phone reception, using twitter and an arduino board.

The tweet-a-pot is the easy implementation for remote device control! with a bit of code and some hardware, you can have your very own twitter enabled coffee pot.

Take a look at this quick video, Special thanks to Sam:

 
Remove these adsRemove these ads by Signing Up

Step 1: Supplies

Picture of Supplies
To make your very own tweet-a-pot you will need the following

1 Power Switch Tail, this is basically a relay that is used to interface with the AC voltage
1 Arduino Board (any will do)
1 Computer running the arduino IDE and Python
1 Drip Coffee Pot

Step 2: Setting Up Your Computer

Picture of Setting Up Your Computer
First you need to set up your receiving computer.

To interface between the arduino and twitter, we are going to use python. There is a library that is already put together that enables us to use the twitter API. It's called python-twitter.

After you have installed python, install the python-twitter library and all its dependencies. If you run into trouble just consult the documentation over on the python-twitter website.

Next, install the Arduino IDE so you can program your arduino and talk to it via serial port.

Once those are set up and working, time to go grab your credentials from twitter.com
escaleraalcielo made it!13 days ago

It's working!!!

Greetings from Mexico

Captura de pantalla (12).pngCaptura de pantalla (13).pngCaptura de pantalla (14).pngCaptura de pantalla (15).pngCaptura de pantalla (16).png

To connect to the serial port i use this code instead of the suggested one because allows to search in more than one serial port :D

##set to your serial port

#to use with linux locations = ['/dev/ttyACM0', '/dev/ttyACM1', '/dev/ttyACM2']

locations = ['COM3','COM4','COM5','COM6'] #to use with windows

for device in locations:

try:

ser = serial.Serial(device, baudrate=9600, bytesize=8,

parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE)

print ("\nArduino found on: " + ser.portstr + " please wait...\n")

time.sleep(2)

break

except:

print "Failed to connect on", device

To register a new app you must go to the next link https://apps.twitter.com/

Because dev.twitter send you to download fabric, the new Builder from twitter

great design, could a raspberry pi work as the receiving computer?

Hummm? Can the Arduino IDE run in Linux(Raspberry Pi). That is a good question.

Great idea. Thanks for sharing us

This is an amazing idea, but I was wondering that the requirement of a Laptop to be present doesn't make it as portable so what if we use a wifi shield to connect to the Arduino. I saw this in a different project that scanned twitter for particular phrases. Would we have to change the programming or will it remain the same. I am a curious Engineering Student and wanted to learn about this. Would appreciate your help.

luketyrel1 month ago

This is a really cool idea. Just wondering do you sell this device with out the coffee machine. I'm looking to buy a working version or pay a developer to create one with a simple laptop and AC switch.

Thanks

Luke

FranciscoC3 months ago

Great tutorial, how can anyone activate the Coffee by sending a tweet? Is this possible to do in this example or similar?

danmellow3 months ago

wow this can be used for something bigger may be

LadySith1 year ago
I always come back to this page. Loved the idea since I saw it. We were planning on doing it for our space but we can't find a relay switch anywhere. Is there any way we can effectively mutilate a regular power supply to work as a relay switch?
ChrisW3 LadySith3 months ago

I know it is a bit late but did you try Radio Shack? Also Jameco (online or catalog) has a really good selection of loads of different things. Good luck to you!

where did you get the serial module

Be sure to run the install command with sudo.

Ya I am having the same problem. I tried downloading a serial module from here http://pypi.python.org/pypi/pyserial but when I run the program I get an error.


yeah that module didn't work for me either.
HomuraRun2 years ago
I keep getting "Index Error: list index out of range". What does that mean?

This is due to you not having any tweets. Post a dummy tweet and problem solved.

I also get that error. Could you find any solutions?
jdawgaz8 months ago

I am not sure why there is an arduino at all here. This could be done more simply by just using one of the gpio pins on the rpi.

even the original powerswitch tail only draws 40ma and 3.3v dc is good enough to switch the relay: well within the rpi tolerance.

this would eliminate the need for the serial library. and all of it could be done with just the python program.

The tutorial is for Arduino, not rpi. It's very useful exercise for going Arduino training.

mist42nz1 year ago
What functionality is the Arduino providing in this circuit? It looks redundant, the output signal could be used to drive relay on the tail in a similar manner to how computer tills used to be activated by the serial port. The laptop is providing all the controller "decisions"
Hi, I'm writing a blog post about cool home automation Arduino based projects and your's is going to be there. Do you allow me to use one or two of your pictures in the post? I'm linking the reference to tweet-a-pot back to this page.
nice one
Kelly021 year ago
nice idea.
pnoytech1 year ago
Activating my arduino projects thru twitter is awesome! Thank you so much!
Nice Instructable!

There are some really good things for people to learn here. (from your instructions, especially)
very cool
This is a fairly simple arduino project.
JensonBut1 year ago
I am fairly new to Instructables so I will have to take a look at putting it together. I definitely want to get a video up. I'll let you know when I get either up. (I tried replying but the captcha thing seems messed up)
tcerier2 years ago
Hi, I'm following this, and i'm having some issues. it would be great if someone could help me.

-first: when running, does the arduino need to be connected via a serial cable? or can one use the usb cable?

-Also, (my main problem) i recieve a serial error... what could this be?
thanks!
tcerier
for my twitter app these are the only keys I received
# Consumer key
*****************************
# Consumer secret
***************************************
# Request token URL
http://twitter.com/oauth/request_token
# Access token URL
http://twitter.com/oauth/access_token
# Authorize URL
http://twitter.com/oauth/authorize

so what would I use for
access_token_key='accesskey', access_token_secret='accesssecret')

thanks

there should be a button that says "Show me my access token...(etc).

I've got an instructable here detailing the process of getting your tokens. Like everything, it's simple once you know how....

http://www.instructables.com/id/Simple-Tweet-Arduino-Processing-Twitter/step4/Twitter/

The access_key and access_secret keys need to be generated separately and are unique to each user and twitter application.

After searching the python twitter library, I was having trouble finding how this library generates these keys. So sorry I don't think I can help you there.

But another similar python library I found for twitter called Tweepy does have lots of documentation!

And a nice example of how to get started!

check it out - http://jeffmiller.github.com/2010/05/31/twitter-from-the-command-line-in-python-using-oauth
frenzy (author)  MattDurr3 years ago
the keys come out of the twitter API not the python script.
crob092 years ago
I am stumped...

What GUI are you using?
Is it Python?
I really don't understand how I execute the .py file you included, uploading the sketch is simple.

Thanks for your help,

Rob
area362 years ago
Can anyone help? I download the arduino twitter library and python but It waln't work. I have tried time and time again but it doesn't work.
area362 years ago
I got my code fixed by eliminating any white space within the Python code. Python seams to be terrified of space.
Frnc112 years ago
Has anyone found a way to create a stand-alone version of this Instructable? In other words, I would like to be able to tweet the Arduino itself and not a computer "middle-man".

Also, any suggestions for interfacing with a Keurig machine?
rzitex2 years ago
But can it use Hyper Text Coffee Pot Control Protocol (http://tools.ietf.org/html/rfc2324). Yea, sure you can text the coffee machine to make coffee, but HTCPCP can be controlled by EMACS. Even has a stop pouring milk functionallity.
Brennn102 years ago
Can anybody walk me through how to download the Python-Twitter library? I just downloaded Python, but I can't seem to figure out how to install the dependencies and the Python-twitter library. Thanks for your help!
willdex2 years ago
Frenzy, though I understand that you don't want a dedicated computer, you may still want to look into Raspberry Pi model B, as it has an Ethernet port, is credit-card sized, can do a whole lot more than a simple Ethernet shield, and will be about $35 when comes out again.
Does anyone know of how to connect a visual basic application with twitter because I am writing some HA software and would like to give it web access?
Edit: I managed to find a DLL for visual basic and then downgraded the project to .NET 3.5 and the code worked magically!
virtualmix3 years ago
Thanks for sharing this, I really like the idea.
I have a similar device at home but instead of using an Arduino I use a girlfriend.
> Send text message to GF: "Make me a coffee please."
> Go home: coffee is ready, with sugar and spoon. Coffee maker and GF are clean, ready to receive next command. AMAZING!
LMAO!! Classic!
Wow, that is so geeky it's actually cool.

- Sean Brown, CEO
windows tablet|ipad alternatives|sylvania tablet
yep, all this automation, even I am interested in, is done automatically by that "good help so hard to find."
LOL you lucky one!
HAHAHAHAHAHA Awesome!!!
LOL :D
At work I tweet the secretary :D

btw, inspiring instructables! ;)
P1d40n33 years ago
I am having a problem with the pySerial library also (if that is indeed the library you are using!). It's not send or recieving signals correctly, interpreting even simple debug messages as garabage. What version of the library did you use to get this working?
asarr3 years ago
im also getting syntax error when i try to run the code in python
can u reply soon please
pdxnat3 years ago

A terrific, well written instructable! Also a great Intro-to-Python project. I expected to see info on how to hack the coffee pot's circuits, but this project just controls the power to the pot. Clever. And obviously generic. . Controlling the power source ("PowerSwitchTail") via tweets can have many applications.

http://powerswitchtail.com/default.aspx

https://www.adafruit.com/products/268


ToolboxGuy3 years ago
I don't even drink coffee and I think this is cool!

Seems that (at work) the engineers, capable of generating software and commanding large salaries, yet are totally incapable of making a new pot of coffee for the next person. Is it entitlement issues, inconsiderate people, or plain laziness?

Again, I don't drink coffee but I hear the fireworks of the next person's meltdown.

Is there a "Make a new pot when you take the last of the coffee or I rate limit your Internet connection to 300 baud" feature? (or wrap out their port to a dead VLAN, modify their network settings, let *all* of the spam from the Internet get into their e-mail....)

How about an Arduino driven camera that senses each time the coffee pot is lifted, taking a picture/video, as well as weighing how much is left, so we can scold the "lazy person" by sending this photo/video over e-mail?

dunnos3 years ago
Wow, I want one of those mugs!
carlsmart3 years ago
Cool idea!
sunami3 years ago
Is it possible to do this without an arduino?
Spydamonky3 years ago
why dont you make it so that theres a button to turn it off on the coffee machine witch toggles it in the code. That would make it a lot more convenient. But also keep the #driptwitstop function for if you forget to switch it off when you're there or just to lazy to walk over to turn it off. :D
or what about a timer to shut it down after say 2 hours or somthing
puchandi3 years ago
hey im getting syntax error when i compile ths code in python. can u help me out.
element143 years ago
Great idea! Thought you may be interested in knowing you can load this or any other Arduino project video on element14 for your chance to win a soldering iron. Details and instructions can be found here: http://www.element-14.com/community/videos/1608
mman15063 years ago
i did the same but with a fog machine and i use the twitter 4j libary with the proccesing instead of python
you should write an instructable for that!
any chance you could share that processing code?
here's the code

l
ink

i
t actually uses the  tweet stream libary thats here
http://mccv.github.com/processing-tweet-stream/


the main part of the tweet code is this line "TweetStream s = new TweetStream(this, "stream.twitter.com", 80, "1/statuses/filter.json?track=fogger", "mman1506", "password")"

which looks for a tweet that says fogger

then this line "void tweet(Status tweet) {" executes the code under it when it receives a applicable tweet


the only problem is the code can be unreliable so i would prefer a python version




maxca3 years ago
thankkkkkk
A great proof of concept, but probably a more efficient way to do this would be to use one of those tiny stand-alone web servers, rather than leaving your laptop running, a la this 'ible:

http://www.instructables.com/id/tweettree-Twitter-controlled-Christmas-tree/

Now, granted I'm a huge hypocrite because I leave an old P4 slimline box running 24/7 because I use it as my alarm clock. :-P But I want a micro-ATX to do that job.
Or the Arduino Ethernet shield. I forgot they had that sucker, too XD
ixetl3 years ago
OMFG!!! This is just amazing!!! XD
ah013 years ago
One suggestion. You should implement HTCPCP (Hyper Text Coffee Pot Control Protocol) – it's special internet communication protocol for this purpose :)
tjesse ah013 years ago
i agree
vincent75203 years ago
Great !…
You should have added how Twitter puts water in the tank and coffee in the filter !…
RetroTechno3 years ago
Wow...the possibilities of this may actually inspire me to join Twitter!
premkumar3 years ago
Will be happy if someone can clean the coffee pot for me. :D
ahh thats so cute I dont drink coffee or tweet but i still want one. Maybe i can rig up my hot pot and have hot co-co when i tweet-- awesome instructable
shinjielric3 years ago
This is amazing! My only question is whats stopping someone else from tweeting my pot?
Love this.
Neato. I have used an old bare bones p2 computer to reduce resources. Twidge (and or curl) and bash do all the work. No need for both the computer and the arduino.
fvtop3 years ago
amazing!!! seems very convenient!
bertus52x113 years ago
Very nice and what a possibilities!
action_owl3 years ago
We have the same netbook! is that XFCE4?
Dr. Pepper3 years ago
AWESOME!!!!
randofo3 years ago
Tweet me some coffee intern!