Newest powerwall code

The only lines to edit below now:
Lines 32-35.
The files are pretty much identical but the back up file has reserve for 100%
and time of use has reserve at 5% which is closest you can get to 0%

You should be able to use the code as is.

Steps to running the code:

Why I chose Solar?

Those that are interested in Solar power can read about how I made my decision to install Solar Panels with SRP and Sun Valley Solar. At the time Tesla energy was not an option when I installed panels in 2018, but I did try to reach out to Tesla only to be told that they did not work with SRP customers.

I believed I could reach ROI in 6-7 years on a smaller solar system that was solely reliant on minimizing the demand charges from the SRP Customer Generation plan.

So lets look at the charges for SRP Customer Generation Plan (CGP).
The price sheet is located here from SRP.

Grid fee service charge: $32.44

Fixed Grid charge for SRP E-27 Plan.

Each Solar price plan starts with the monthly service grid fee, we have 200Amp service so our grid fee is $32.44. No matter how many panels you have , you have to pay the monthly grid fee, this is just SRPs up front cost to having solar them servicing the grid infrastructure needed to deliver power from and away your house. In SRP non solar price plans these grid fees are built into the premium you pay when you pay sub 10cents per kwH up to 30cents per kwH.

Usage Fees: Average 5cents per kwh

After that are the usage fees for which are quite low, on average I would say its about half the costs of the national average, assuming the national average is around 10 cents per kwh. You are looking around 5 cents per kwH and so here is the first place solar customers can save, is just being on this price plan their usage fees are cut in half.

Usage Charges:
Summer 4.6 cents for on peak and 3.6 cents for off peak
Summer Peak 6.2 cents for on peak and 4.1 cents for off peak
Winter 4.1 cents for on peak and 3.7 cents for off peak

Demand Fee charges

The last fee for Solar customers on SRP or other plans, can be the demand fee. To understand more about demand first I urge you to watch this helpful video which to explain demand.

Demand is the amount of power that is used during certain peak periods. Those peak periods are defined as 5am – 9am and 5pm -9pm in Winter and 2pm-8pm in the Summer. Peak periods are when most people in the neighborhood territory most likely use power for their house. To get a rough idea you can calculate the amount of power your house uses during peak energy times.

If you turn on your water heater and it is electric , this could charge up to 6kw.
If you turn on an AC: that could charge up to 4kw per ac unit.
If you turn on the dryer and its electric consider that another 6kw charge.
So on these demand plans the goal is mostly to drive demand to be very low. I would say low would be like 3kw at most.
The demand charge is calculated by looking at the graphs below:
So lets say our demand is computed as 5kw in summer time
According the prices below: my first 3kw would be charged $7.89 per kw.
So we’ll compute the first 3, 3* $7.89 = $23.67 for the first 3 kw.

Since our demand was 5kw, we still have to add 2 more kw.
So according to this my next 7Kw ar charged at $14.37 so then I would do
2 * $14.37 = $28.74

So my total demand charge for 5kw in the summer would be : $23.67 for first 3Kw +
$28.74 for next 2Kw = $52.41.

Demand Usage charges for SRP E-27 Plan (Solar Customer Generation Plan)

Example usage:

Here is an example using the costs above of my May 2019 bill. The below bill was $123.90 in May 2019, and then we could look at a bill from May 2018 to see the savings achieved.

Service Grid Fee: $32.44
Demand Charge $36.60 @ 3.9kw demand
On Peak usage: $6.01 @ 130 kwh
Off Peak usage: $36.44 @ 1108 kwh
Before taxes: $111.49 after taxes $123.90

Previously the bill in May 2018 with no solar, just the EZ-3 Plan was about double $223.49. The usage in May 2018 was a little higher 2032 kwh vs 1238kwh. We have made other energy improvements , but the monthly service charge under this bill is $20.00, on peak $25.99 , off peak : $161.33.

SRP EZ 3 Price Plan

Off peak per kwh is 7.3 cents
On peak is around 10 cents per kwh
So just in the usage pricing the off peak is 7.3 cents per kwh vs 4.6 cents, 58.6% lower. So keeping all things equals and not accounting for high increases via demand charge, just switching to CGP could possibly decrease your bill 58.6%

So once I saw that it was possible to reduce the bill by just 50% I decided to minimize my demand and for my purposes used a google sheet that I made, where you could input data for demand, usage, and service fee charges to try to predict what my bills could be:

Google Sheet: Calculator for projecting costs for Solar with Demand

Ultimately why I chose Solar

  • Save 50% from being on cheaper power plan
  • Create a little green energy to make world better place
  • Take advantage of helpful federal and state tax credits

I installed solar cause the math made sense to me but when I went about this my thought process was the following. Also we bought the panels in cash, no lease, no loan 12k out of pocket before incentives. I think on the SRP plan your goal should just be getting enough panels to minimize your demand and adding additional panels in net metering does not really pay off, cause the main pay off is coming from just being on a close to 50% cheaper power plan. Overall I projected that I would reduce my power bill from 2018 to 2019 by 50%. Our system costs $7,700 after tax incentives which included 30% federal tax credit and $1000 federal tax credit. Our yearly bill was $2,500 a year and we planned and projected to reduce our bill by 50% as long as we stuck to a 4 kw demand. The projected charge for our power would be around $1250.

Later on I would continue optimizing this picture because we wished to bring down our demand charge from 4kw to completely down to 0, this is what caused me to later add on 2 power walls that I have created a program to control written in python.