Tweet-a-Watt + Google Powermeter!

Once you have the Tweet-a-Watt working with the python scripts, we can add a cool extension and have beautiful graphs generated thanks to Google Powermeter!

This code, based on the original T-a-W, was created by the super-rad Devlin Thyne! You can download it from our source repository on github which now includes this script.

Please note that this mod is new, and is still under development, if you are having difficulties, try posting to the forums.

Right now it's only tested to work with a single T-a-W!

Log in + Activate

Visit and log in with your google account.

Once you activate, you'll get a chunk of text in a box. Copy and paste this into a text file to save it:

Out of this text, there are two things we need, the token and the path. The token is between the text token= and the next &. The path is everything after path=.


So in this case, the token is ABCdefGHI-_JkLMNoP and the path is: /user/0123456789123456/7891234567819/variable/Adafruit.Tweet_a_Watt.AF000002

Save this in a text file, you'll need it for the next step!

Python code

Download the Google Powermeter python API scripts and place all the files in the same directory as the scripts.

Now edit to have the correct COM/Serial port and calibration data that you figured out in the previous steps. Also, find the two lines:

#Google PowerMeter stuff:
powerMeterToken = "paste your token info here"
powerMeterPath = "paste your path info here"

Edit them so that the token and path you got from google go in between the quotes. If you want lots of data spit out, edit:

QUIET = True

To be False

Save, Open up a command line as before and go to the wattcher directory and run python after a few minutes you shoould see data sent to google:

Now go back to your browser and click on "Check for measurements again"


Now we can get the graphs, Click "Add Powermeter to iGoogle"

And then, of course, the big shiny blue button.

Now you gots widgets!

This guide was first published on Dec 03, 2014. It was last updated on Dec 03, 2014.

This page (Powermeter) was last updated on Feb 14, 2013.

Text editor powered by tinymce.