Modify Tweet-A-Watt code to show electricity cost

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

Modify Tweet-A-Watt code to show electricity cost

Post by scott216 »

I'm new to python scripts. I'd like the tweet-a-watt to show the cost of my electricity. First step would be to add another column in log file that multiplies watts times electricity cost. Anyone know how to do this? It seems like it should be easy for anyone who's halfway decent at python. A little more ambitious would be to add the cost to the tweet. Even more ambitious would be to have a 2nd graph display the daily cost. For example, it would look at the instantaneous watts and calculate the daily cost at that usage rate. I would appreciate any help in doing any or all of these.

--Scott

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

Re: Modify Tweet-A-Watt code to show electricity cost

Post by adafruit »

python.org has tons of great tutorials!

User avatar
richms
 
Posts: 558
Joined: Tue Jan 20, 2009 3:05 am

Re: Modify Tweet-A-Watt code to show electricity cost

Post by richms »

Scott216 wrote:I'm new to python scripts. I'd like the tweet-a-watt to show the cost of my electricity. First step would be to add another column in log file that multiplies watts times electricity cost. Anyone know how to do this? It seems like it should be easy for anyone who's halfway decent at python. A little more ambitious would be to add the cost to the tweet. Even more ambitious would be to have a 2nd graph display the daily cost. For example, it would look at the instantaneous watts and calculate the daily cost at that usage rate. I would appreciate any help in doing any or all of these.

--Scott
Be wary extrapolating instantainous use and making a daily or hourly figure from it. A friend has a "Power saving" meter that does that, and occasionally it will chuck up figures like $25 an hour when everything is on at once, and his slightly crazy partner will start to run around turning things off because she seems to think thats what its actually costing, but the average is lower.

Base it on the last 5 mins use or something so you dont get those crazy numbers causing that sort of thing happening.

Also does your electricity cost the same across the whole day? off and on peak times are going to make it harder to calculate, you will need a table somewhere to have what times each rate costs, and if you have a base usage and then more usage per month is cheaper you will have to allow for that as well.

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

Re: Modify Tweet-A-Watt code to show electricity cost

Post by scott216 »

That's not quite what I wanted to display. The graph I want would look just like the graph showing the kwh - it would go up and down as the electricity usage varied, but the axis would be dollars instead of kwh. It might be a good idea to do a little averaging just so the graph looks smoother.

--Scott

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

Return to “XBee products (discontinued)”