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
Modify Tweet-A-Watt code to show electricity cost
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- scott216
- Posts: 163
- Joined: Sun Apr 12, 2009 11:08 am
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: Modify Tweet-A-Watt code to show electricity cost
python.org has tons of great tutorials!
- richms
- Posts: 558
- Joined: Tue Jan 20, 2009 3:05 am
Re: Modify Tweet-A-Watt code to show electricity cost
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.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
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.
- scott216
- Posts: 163
- Joined: Sun Apr 12, 2009 11:08 am
Re: Modify Tweet-A-Watt code to show electricity cost
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
--Scott
Please be positive and constructive with your questions and comments.