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 http://www.google.com/powermeter/about/ and log in with your google account.
To activate your Tweet-a-Watt:
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=.
hash=0123456789abcdef0123456789abcdef,0123456789abcdef0123456789abcdef,0123456789abcdef0123456789abcdef&token=ABCdefGHI-_JkLMNoP&path=/user/0123456789123456/7891234567819/variable/Adafruit.Tweet_a_Watt.AF000002
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 Wattcher.py scripts.Now edit gmeter-wattcher.py 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 gmeter-wattcher.py, Open up a command line as before and go to the wattcher directory and run python gmeter-wattcher.py after a few minutes you shoould see data sent to google:
And then, of course, the big shiny blue button.
Now you gots widgets!
Text editor powered by tinymce.