Add support for Tesla Powerwall

Amazing, thank you so much Mark!

Awesome work Mark !

Hi guys, a quick question…has anyone else noticed that their power wall does not charge at the previous kWh rates that it used to? About a week ago my powerwall stopped charging overnight to the programmed SOC that HA set using the Solacast predictions. It’s taken me a while to work through all the different HA options that might have caused this…I ended up finding that I could now achieve the highest charging rate when in the “Time-Based Control” move, but that obviously now limits me to charging only during the off peak times.

From my memory I used to get the following charging rates:

Backup: 3.2kWh
Self-Powered: 1.7~2.2kWh

The old integrations “Autonomous”: 3.6kWh

In the past week I have only achieved the following:
Backup: 2.5kWh
Self-Powered: 1.5kWh
Time-Based Control: 3.7kWh

I’m just wondering if Tesla have pushed any software updates in this part 7-10 days?

I’m in the UK and running on Octopus Go with single phase setup.

I have never managed to get to a 5kWh charging rate since the PW was installed some 2 years ago. If there is any installer on here that could check my screen shots of my PW installer web pages or let me know what could stop a full 5kWh charging rate I would love to hear from you.

I also have an EV with a Zappi and so the maximum grid pull that I typically see is 7.2kWh on the Zappi, 3.2-3.7kWh on the PW and anywhere around 400w to 1.8kWh for the house demand (at the OctopusGo cheap rate time slot

Thanx Chris.

My experience is

  • Set BackupReserve > SOC I get about 1.8 kW, six months ago it was 1.7 kW
  • Backup Mode I get about 3.7 kW
  • TBC with Off-Peak/ Super-Peak I get 5 kW

I’m currently on firmware 23.28.2, what firmware are you on?

There are variables for maximum discharge rate you can query through the localAPI:

https://192.168.86.61/api/system_status

Have a look at max_discharge_power, I have 3x Powerwall so I have 15,000

{
  "command_source": "Schedule",
  "battery_target_power": 4981,
  "battery_target_reactive_power": 0,
  "nominal_full_pack_energy": 42050,
  "nominal_energy_remaining": 12184,
  "max_power_energy_remaining": 0,
  "max_power_energy_to_be_charged": 0,
  "max_charge_power": 15000,
  "max_discharge_power": 15000,
  "max_apparent_power": 15000,
  "instantaneous_max_discharge_power": 27890,
  "instantaneous_max_charge_power": 21000,
  "instantaneous_max_apparent_power": 16500,
  "hardware_capability_charge_power": 0,
  "hardware_capability_discharge_power": 0,
  "grid_services_power": -5184.81233272255,
  "system_island_state": "SystemGridConnected",
  "available_blocks": 3,
  "available_charger_blocks": 0
}
1 Like

Hi and thanx Mark,

Yes I’m on the same software version 23.28.2. Discharging power has never been a problem on my side, only the PW charging rates. I have struggled with charging above 3.2kWh and only that when in “Backup” mode. 1.7kWh when in “Self-Powered”. Someone else that I help manage his HA system has single phase and his PW charges at 5kWh.

I joined my home network and attempted to use the old web log in but seems that Tesla discontinued that access method, so I was unabl to try the Local-ip/api/system_status method that you shared. I now get the below screen when trying to log in via the Local IP:

They aren’t making it easy, but keep clicking though and you can still get to the local login screen.



1 Like

I’m VERY new to HA, but I seem to have got the Backup Reserve working as described above.
But, I was looking at the default “Energy” Dashboard in HA and trying to configure it to take the data from the powerwall as this seems to have everything this page needs.
But when I attempt to add a source of information, my Powerwall isn’t showing as a sensor.
Following the link to “learn more about statistics” points me to the Developer Tools > States section of HA.
Here is states that the “device_class” must be “energy”, but when I look at my entity “sensor.ger_y_nant_grid_power” the “device_class” appears to be “power”.

Am I missing something as the support says I should create a support ticket, but since I’ve only been on here about 5 minutes, I thinking I’m missing something…

Any help would be appreciated for a newbie! :slight_smile:

1 Like

^ No I don’t think you are missing anything
Whilst setting the backup reserve slider using this HACS app is useful (it still doesn’t sync directly with the Telsa app)
However, with this app, you can’t see any appropriate import/export battery sensors
Unlike the official HA app, in this app, there are no sensors for energy in and energy out of the battery that can be added in the Energy card of HA (or none that I can find)
So I went back to the official one (as it seems both can’t be run together)

I think Tesla must have pushed out some firmare update yesterday? Over night my PW did not switch over to the charging mode and it also happened to my firends system. We both use the Tesla Custom app to switch to grid charging and to control the over night charge. @markpurcell are you aware of any issues and possibly updates for the integration?

Just to confirm that I am also seeing the same issue.

1 Like

THere must have been a lot of 0% SOC’s this morning :slight_smile:

Thank you for the fixed update! :heart_eyes:

Yes have been living the drama all day with the lack of control.

First we thought it was the FleetAPI, of which we don’t have an energy solution writing just yet.

But it turns out the need was for an X-Tesla-User-Agent header.

If you update manafest.json in the tesla_custom folder to the teslajsonpy version 3.9.9 you can control for another day.

1 Like

I’m brand new to HA and just setting up HA on a RPi5, and get an error when trying to add the Tesla integration. I have SolarEdge inverters, and 2 Tesla Powerwalls, and can’t get the Tesla integration to connect. I have set a static IP for the Tesla Powerwall, and tried using the last 5 of the password listed in their Control panel in both upper and lower case and it still gives an error. I have the usage module with SolarEdge, but HA does not seem to have an option to use Solar Edge as both coming in from the Grid and Exporting that I can see.

Hi Paul,

Can you check if the installer changed the original password? Can you log in to the actual PW gateway using the web link but with your PW IP: https://192.168.86.61/api/system_status

As with Mark’s post above: Add support for Tesla Powerwall - #405 by markpurcell

Has anyone got a work through how to control the battery now the tesla pro app is now forced?

Ive tried the Teslemety Integration but theres no control other then force charge by moving the slider.

Sorry for the noob questions.

Teslemetry provides all the controls from the API.

What were you missing?

From this menu, How do you force dicharge?

I have set the export to battery and nothing

Tesla don’t have a simple mode to force discharge to grid :frowning:

You can however get it to force discharge by using the TBC hack:

I use this daily to force exports to the grid from my battery when the feed in tariff is high.

hey how did you change your house layout in the app?