Getting Serious on power automation with Tesla Powerwall

So I am based in Australia, and use AGL for electricity supply.

They have changed the way they are now charging me for power.

A base rate throughout the day and then a demand surcharge.

They take the highest use in the calendar month between 5-9pm then multiply that by the number of days in the month by the demand surcharge and then add that to my base usage.

I have solar and a Tesla Powerwall so it’s time to really put the automation power of HA to work here.

The normal controls in Powerwall App don’t allow me to make the best use of the battery.

I want to run the house entirely on battery between 5-9pm. Pretty simple when the sun shines all day. A little harder when the sun doesn’t shine all day. The idea here is if there is no sun to ensure 100% battery is available at 5pm each day to change the settings on the Tesla to force it to charge from the grid before 5pm.

There are various references to the reverse engineered Tesla REST API on the web.

Before I start the journey has anyone done something similar already?

Does anyone want to join me on the journey to see if we can make it happen?

I have a tesla powerwall as well as a very large solar array (15.9 kW past the inverter). My utility charges me a surcharge of 2.00/kW for peak usage for the month between 16:00 and 21:00. So if I use 5kW anytime between 16:00 and 21:00 during the month I get $10.00 added to my bill. So I have tried to avoid this. Mostly I have enough power to power batteries and run both A/C and fans without using power. Because of the size of my system I am not net metered (Colorado USA law). I pay 2.5x more for power than I get in return.

I use schedule on my thermostats to give me a hope of not hitting the peak. I over cool in the morning to put less load on the A/C in the afternoon. I have not written automations to power the batteries during non-peak rates. I have generation capacity when I don’t get monsoon rain clouds.

I am interested and will help where I can. Not a CS person but am an engineer. The biggest issue I see is turning on and off the battery charge in the Tesla app. It does not have an equivalent entity in HA.

Here is my energy balance on a very overcast afternoon when my scheme failed me. The blue is energy from the grid.

Thanks J, like you I am an engineer.

The first question we need to resolve is can we change the configuration of the Powerwall using the API. Search begins :grinning:

Jase

Hello all. I’m new the community as I’m heading down this HA journey coming from a SmartThings ecosystem. All my SmartThings still going, but it doesn’t support the things I want to do with my Powerwalls that I’m seeing mentioned here. Looks like HA may be an additional solution just for my Powerwalls and maybe eventually a full migration over here to centralize my home automation.

The discussion above is several months old so I’m checking in if a solution has been found to force the battery to charge at nights via the grid or some trigger event. ie. predicted lower solar generation the following day. Thanks! I love the dashboard @AllHailJ @meremortal

I have not found one. I have peak usage charges of $2.00 per month per maximum KW used from 4-9 and I have not found a way to access the API. I have to do it on the app on my phone. Painful

Bummer. I find myself manually going into the Tesla app most nights to “top off” my PW batteries manually. That’s why this thread got interesting as I was hoping to trigger the top off.

If nothing else, the HA dashboard is cool looking. Debating now if that alone is enough motivation to move to the HA since the PW trigger isn’t available.

Has anyone looked at the below?

and the related dashboard:

The proxy seems to allow API calls to the gateway which allows it to query metrics populate the dashboard. I’m wondering if it’ll allow commands to trigger charge functions.