Time of use pricing

Here’s the R code to add PG&E EV-A TOU tags to your Sense 1 hour export data. 6 things to notice:

  • This script reads in two files directly out of Sense export, one from 2017 and one from 2018 and binds them together.
  • My DateTime is synced to “US/Pacific” - you need to change if you are in a different timezone.
  • I do a data completeness check to look for any missing hours from the Sense export. I have 7 full hour dropouts over the year from Aug 17 to Aug 18. Look in MissingSenseHours, after running, if you want to see if you are missing any.
  • The script also reads file that fills in missing days - not really needed. You can remove.
  • I also use a special .csv side file that includes vacation days for PG&E TOU purposes. I’ll provide in .csv Excel format in the next forum response.
  • If everything works, you should get a graph similar to the one above that shows your TOU hours are distributed correctly.

UPDATE: The R code is directly downloadable. Fire up in R Studio, configure in the needed packages, and let it rip on your Sense output data.

SenseAudit.R (5.1 KB)

2 Likes

Here’s the associated PG&E Holidays file. Download it, read it into Excel, then save as a .csv. Then it’s ready for action.

UPDATE: Sense forums now allow you to post .csv files ! No renaming needed.

pgeholidays.csv (1.8 KB)

no matter what the Sense people come up with it will never be perfect for everyone but many months have passed and still not improvements to the cost per hour function. The new trending to goals function is a great idea but kind of useless since the cost per hour isn’t available to change in the app.

1 Like

duke-snip

i wish the energy monitor could do something similar to this. Here in Florida duke energy
(our only energy supplier) charges us for one price for the first 1000 kw and another price for
the kw used after.

Duke Energy here too. Would like to see this as well along with their strange billing cycles.

@kevin1 Thank you so much for sharing your files. I updated those to work with Duke Energy here in NC TOU settings. This is a cross post to my question from here: What's new in Web App v4: Data Export - #21 by cgray
I noticed that the R script in my case was accumulating all data from the csv file that I exported as I got values that are quite high. I added a filter step to just get mains and solar and this looks now more reasonable.

How did you solve that problem?

Thanks
Stephan

@stephan.hesmer,

In my TOU R script posted here:

I decided to do the TOU cost calculations for all devices on an hourly basis, but then separate out by device Name, as well as BillingMonth and TOU Period when it comes time to aggregate.

# Aggregate data by billing month
SenseBill <- aggregate(cbind(kWh, Cost) ~ BillMonth + BillTo + Name + TOUPeriod, data=SenseDaily, FUN=sum)

When it came to aggregating kWh to do the Tiering calculation, I used:

data = SenseBill[SenseBill$Name %in% Totals,] where Totals is c(“Total Usage”, “Solar Production”).

to filter out just the mains and solar, in this step:

# Aggregate all Total Usage and Solar Production regardless of TOU to get monthly usage for tiered costing
NetBillkWh <- aggregate(kWh ~ BillMonth + BillTo, data = SenseBill[SenseBill$Name %in% Totals,], FUN=sum )

I should also note that with PG&E, Tiered pricing and TOU pricing are mutually exclusive. Tiered pricing is the default, but typically more expensive for big users of electricity (folks with EVs and AC).

1 Like

Allow me to briefly intrude. Many of you in this thread may find interest in the new Data Analysis category: https://community.sense.com/t/new-category-data-analysis/3617/3

1 Like

Thanks Kevin,

I just recently got a Testa and I have 3 AC units for my house, so I am looking to analyze the data that Sense got me since beginning of the year to see if TOU pricing is better for me or not with the current usage pattern.

I really appreciate the R scripts you provided already.

FYI, another little thing I added is the monthly base price to get comparison with the real bill.

1 Like

That’s great to hear… Love the Tesla. Love the enhanced R scripts. When you get it working, you can pay it forward by putting your Duke Energy script out in Data Analysis area. Good luck and I’ll be interested to see if TOU is right for you.

Add me to the list of those waiting patiently on TOU options. The pricing options as they are currently offered are just useless to me even if I take an average across the bill and program it in that way. It’s useless because with 2EV’s in our house, although we usually try to charge them during off peak (for obvious reasons) there are times where we may choose to charge during our mid or even on-peak periods. 15 or 20+KW used during an on peak period is a big enough bell curve to totally destroy an averaging assumptions.

Yup, want this feature.

I definitely need this as well.

i don’t know about everyone in other states, but under PG&E in my part of California, we have peak use and off peak use times. and costs vary based on the time of day.
example:
2pm-8pm = $0.36Kw
8pm-2pm = $0.24Kw

it would be nice to be able to do that in sense to get an accurate reading of daily/monthly costs.

1 Like

They’re working on it! APS here in AZ is ridiculously complicated.

2 Likes

That’s crazy expensive power even at off-peak times!

Really need this feature.

We have an “Electric Vehicle” rate with both time of day & calendar dimensions.
11p-7a every day is super off peak
2p-7p M-F from June 1 to Sept 30 is peak (except holidays)
7a-11p is off peak other than when overridden by peak

Right again, @NJHaley. We are hoping to get this into the app soon. Thanks for your patience!

1 Like

While I’m not experiencing any where near the TOD Rates that @craft211 has, my utility, Excel, is threatening to implement TOD rate as follows:
• On-Peak = $0.18 per kWh 2pm - 6pm
• Shoulder = $0.13 per kWh 9am - 2pm & 6pm - 9pm
• Off-Peak = $0.08 per kWh 9pm - 9am

I installed the Sense monitor to let me know what to expect my new billing will be and the cost of moving my big users to off-peak. My EV is my biggest user. Looking forward to tagging it’s load.

Mine changes depending on the season. It will also be preferred if the rate we input into the app does not affect costs calculated for previous months(historical data). My utility has rate increases and decreases year over year. They cut the rate 30% last year and its the lowest its been in 5yrs so it is bound to go up again

3 Likes