Sense ToU Calculator for PG&E


OK, I finally have some code that adds ToU tags to Sense hourly export files, then aggregates the data into daily and billing period summaries, so I can compare against my real PG&E billing data. The fun part is I can also pull out solar and see how much solar is saving me, though I might likely be using a different rate schedule if I didn’t have solar.

Here’s a view on the kWh comparison between my PG&E bills and Sense aggregation.

As I examined in the thread below, my Sense is about 1% optimistic (lower) than my PG&E numbers on an hourly basis, plus I had fair number of network related dropouts WRT Sense, especially within May and June, so this data appears to square with my hourly investigations.

And here’s a view of how much solar has saved me over the past year. Roughly 2K per year on a 15.5K total investment back in 2012. Sure there are better deals today.

Will have to try a comparison using the PG&E standard residential tiered model.

Disappointed in device discovery
Time of use metering

Here’s the actual code and side files to make it all work. Just change all the read_csv’s to point to where you locate your Sense hourly output data and the associated side files.

The R code -
SenseToUBillingPGEEVA.R (6.0 KB)

Holidays list for ToU - same for all PG&E customers:
pgeholidays.csv (1.9 KB)

Billing cycle list - yours will be different:
pgebillingcycle.csv (377 Bytes)

Pricing list for ToU - EV-A schedule. Can be modified for other ToU schedules:
rateschedule.csv (160 Bytes)


You’ve outdone yourself, Kevin. This is great!

Did you mean to upload a different doc for billing cycle list? I’m seeing pgeholidays again.


Thanks… Definitely doubled up on the holidays file. Have replaced with the real billing cycle file.

BTW - Have also tested using my PGE hourly data and it it comes out exactly matching my billing kWh, so I’m pretty confident that there aren’t any 1 hour off or 1 day offset kinds of issues that often occur with interval computations like this.


Here’s another view on costs… Time of Use EV-A schedule vs. the traditional E-1 residential schedule with tiering. It’s an eye chart but kind of shows all the computations that goes into each type of billing.

For my house the E-1 baseline is 10.1kWh/day during summer and 10.9kWh/day in winter. The three tiered costs per kWh today are: Tier 1 - $0.21536/kWh, Tier 2 - $0.28478/kWh, Tier 3 - 0.44095/kWh. The bottom line, I save about 750/year by using TOU and moving most of my car charging to off-peak.

And just for fun, I did a tiered estimate without solar (removed solar offset from the calculation). The combination of my solar investment and TOU saves me over 3,200$ / year on a 15.5K total investment.

Updated code that includes EV-A TOU schedule and E-1 Tiered schedule is here. Not so pretty but it works.

SenseToUBillingPGEEVA.R (7.4 KB)

Time of use pricing