Twitter Connection Error with Tweet-A-Watt

XBee projects like the adapter, xBee tutorials, tweetawatt/wattcher, etc. from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
scott216
 
Posts: 163
Joined: Sun Apr 12, 2009 11:08 am

Twitter Connection Error with Tweet-A-Watt

Post by scott216 »

I'm building Tweet-A-Watt and it's coming along pretty well. I've got watcher displaying the data in the Command Prompt window. But I'm getting an error when wattcher.py tries to post the data to Twitter. I modified wattcher.py with my username and password, but I get this error when wattcher tries to post:

twittertime!
Couldn't connect, check network, username and password!

I doubled checked my username and password were correct. I do have an Astaro firewall which uses HTTP Proxy and authentication to let users surf the web. To see if the firewall was the cause I temporarily disabled the HTTP proxy and even created a temporary packet filter rule to let everything through from my PC, but it didn't make a difference with Tweet-A-Watt. I never used Python before. How can I go about debugging this?

--Scott

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Twitter Connection Error with Tweet-A-Watt

Post by adafruit »

hmm, you could see if in the twitter python code you can make it print out a debug statement. we've never seen this problem before...
can you telnet to twitter.com port 80 from your computer?
maybe twitter was down?

User avatar
scott216
 
Posts: 163
Joined: Sun Apr 12, 2009 11:08 am

Re: Twitter Connection Error with Tweet-A-Watt

Post by scott216 »

How do I make it print out the debug code?

Twitter was up at the time. I had just made a regular post to insure I had my username and password correct.

I'll try the telnet to twitter. Do you know what ports tweet-a-watt uses when connecting to twitter?

--Scott

User avatar
scott216
 
Posts: 163
Joined: Sun Apr 12, 2009 11:08 am

Re: Twitter Connection Error with Tweet-A-Watt

Post by scott216 »

To telnet twitter, do I just type "telnet www.twitter.com 80" from the DOS command prompt and if I don't get an error it's okay. I tried it just now from work (no firewall, just a wifi router) and it seemed to work (i.e. no error). I'll try it from home later and see what happens.

If tweet-a-watt only uses port 80 I don't see why my firewall would cause a problem.

BTW, I am running the python script this on Windows 7.

--Scott

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Twitter Connection Error with Tweet-A-Watt

Post by adafruit »

ok try at home. after you telnet in to port 80
type in "GET /" and hit return
if you get a bunch of HTML then at least that works :)

User avatar
scott216
 
Posts: 163
Joined: Sun Apr 12, 2009 11:08 am

Re: Twitter Connection Error with Tweet-A-Watt

Post by scott216 »

It's definitely my firewall. I got it working when I opened up the firewall. Now I need to figure out how to create a rule in the firewall for just twitter.

--Scott

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Twitter Connection Error with Tweet-A-Watt

Post by adafruit »

Good you figured it out! Pesky firewalls ;) Telnet is great for debugging internet connections

Locked
Please be positive and constructive with your questions and comments.

Return to “XBee products (discontinued)”