[PROJECT] Driver for Connecting to Your Tesla Powerwall

Thanks for that information! It is rare to get "failure modes" for much of anything, so I will see what I can do to add that in.

Let me know if there are any api endpoints you want me to dm a full copy of to you.

Updated Version(s):

  • TeslaDriver.groovy = 1.2.16
  • TeslaChild.groovy = 1.0.7

Change(s):

  • Added SystemStatus and BlocksWithFaults attributes to the parents to help identify if there are faults reported by the system.
  • TeslaChild also added a PowerwallStatus attribute to identify if the child has faulted.
  • Both had updates to their event and state handling methods.
  • TeslaChild also had the Tile method revised requiring a new format for it's preferences.
  • Battery value for individual Powerwalls have an additional method of being sent to the child device (if those are enabled).

Note(s):

  • Thanks to @cfoos1 for providing information about the fault values and for testing out some of the changes.
2 Likes

Updated Version(s):

  • TeslaDriver.groovy = 1.2.17

Change(s):

  • Removed accidental inclusion of DataValue code in Event handling.
  • Fixed error logging showing Aggregates method when that is not the method being performed.
  • Restored Aggregate data checking.
  • Attempt to correct battery % for non-faulted Powerwalls.
1 Like

Updated Version(s):

  • TeslaDriver.groovy = 1.2.18

Change(s):

  • Added attribute to the parent for "SolarCurtailFrequencyDroopConfigured" as this is apparently an important piece of information if configured as an override for certain systems. Thanks to @cfoos1 for bringing this up.
  • Correction to battery value formula
  • Removal of no-longer supported API calls for DataDump method

Note(s):

  • I just want to apologize to everyone for the multiple updates so close together and provide thanks for the information people provide. I try to avoid quick releases, but as I do not have a Powerwall (or any solar equipment) I am not able to test changes properly before publishing for this driver. Nor am I familiar with what might be important to Powerwall users. So I appreciate whenever people bring up things that appear odd or data they would like.
1 Like

Updated Version(s):

  • TeslaDriver.groovy = 1.2.19

Change(s):

  • Display of MaxCurrent value on the parent device.
  • Additional data handling for new fields being returned.
  • Another correction to the battery so it shows as whole # percentage, not fraction.
1 Like

Updated Version(s):

  • TeslaDriver.groovy = 1.2.20

Change(s):

  • Changes for when faults are corrected.
  • Change to number of batteries handling.
3 Likes

Hate to hit you with something so basic, but I'm struggling just to get it set up for my powerwall+ . Ive installed the drivers, added a virtual device, but logging in fails. I'm using the password from the gateway and connecting to the local ip.

dev:952025-06-16 18:12:22.241error
Powerwall+ - Timeout connecting to Tesla for SOE.
dev:952025-06-16 18:12:20.239error
Powerwall+ - Timeout connecting to Tesla for System_Status.
dev:952025-06-16 18:12:18.237error
Powerwall+ - Timeout connecting to Tesla for Sitemaster.
dev:952025-06-16 18:12:16.237error
Powerwall+ - Timeout connecting to Tesla for Grid_Status.
dev:952025-06-16 18:12:14.299error
Powerwall+ - Timeout connecting to Tesla for Aggregates.
dev:952025-06-16 18:12:12.222error
Powerwall+ - Exception when performing Login: groovyx.net.http.HttpResponseException: status code: 429, reason phrase: Too Many Requests
dev:952025-06-16 18:12:12.061error
Powerwall+ - AuthCookie and/or UserRecord missing, Login is required
dev:952025-06-16 18:12:10.059error
Powerwall+ - Exception when performing Login: java.net.SocketTimeoutException: Read timed out
dev:952025-06-16 18:12:00.030error
Powerwall+ - AuthCookie and/or UserRecord missing, Login is required

If I remember correctly, there is a password for the internal Powerwall WiFi and one for logging into the Powerwall. The latter was the last 5 characters of the WiFi password.

Thank you. I thought I tried the last 5 and was not successful, but perhaps I mistyped it or some such. I have it now.

2 Likes

Has anyone been able to connect a new Powerwall 3 recently? I've tried every variation of password I can find and none have worked; the Web based connection should suffice for my needs but none of the apps and websites I've found for generating the OAuth token seem to be working.

I've tried several of the websites using Chrome on my android phone as well as Chrome and Safari on my MacBook.

Thanks!

I believe that Tesla has locked down local APIs (or at least the "simple" way) to get to the data).

https://github.com/jasonacox/pypowerwall#local-setup---option-1

I have a Powerwall 2 so I can still get to the data but I also use a paid service Teslemetry (Tesla Cloud API) as a backup (though I use Node-RED to get the data). Teslemetry also has a Home Assistant solution that I believe works with Powerwall 3 (again using their cloud APIs) but I believe they are working on a local solution too (again will be via HA).

Hope this helps.

I heard they had new API’s for the v3’s, but I don’t know anyone than that.

The issue is with local connections. There is a convoluted way to get local access that I think is discussed on the Github page that I linked above. I think Tesla is pushing everyone to Cloud access via their Fleet APIs (and the requirement for that is even more arduous). That's one of the reasons I decided to go with Teslemetry and also have Tessie as a backup - so essentially there 3 fallbacks 1) Local access for Powerwall 2 2) Parallel cloud access via Teslemetry and Tessie if Teslemetry gives an error. Way overkill but I expect Tesla to shut down local access for Powerall 2 in the future.

1 Like

Yes, I've found indications that the local API isn't accessible using legacy methods. I'm fine with using the web API but I'm really hoping to access it directly in Hubitat via this driver.

Right now, I'm just looking looking to get notifications for various Powerwall events since I've not been able to get Hubitat control for the few things that I would want to adjust in case of power outages (a Pentair variable speed pump with WiFi and a pair of LG mini-split hear pumps). I'm having a bit of a chicken or the egg issue - there is an LG ThinQ driver for Hubitat that covers a wide variety of LG products, but it's not quite fully functional for heat pumps and I don't want to spend the time working with it if I can't get info from my Powerwalls while I can get some usefulness from the Powerwall integration even without heat pump integration.

If none of this is possible, I'll just pay for the NetZero subscription to get notifications and manually change the heat pump settings via the LG ThinQ app. I have other ideas for the pool pump but it's power draw is much less than the heat pumps (plus I'd need to do some automation for a solar pool heater that has limited to no automation capabilities before I can do much other than just cutting the pump off to get any benefit).

Thanks for your input!

1 Like

I tried to look into it... From what I gathered it looks like:
Powerwall 1 & 2 still work
Powerwall 3 is "broken" due to the major changes Tesla has made to the firmware. The requirement to directly connect to the Powerwall's WiFi AP to even access THAT is pretty much a show-stopper for the Hubitat. From what I can find the Hubitat cannot be connected to both Ethernet and WiFi concurrently (it cannot USE both at the same time), which would prevent this.

1 Like

Thanks for the response!

Amy thoughts on the cloud access issues I'm having with getting an authorization token?

Are you referring to getting an authorization token from Tesla for the cloud integration? This app only connects to Powerwall 2 (not Powewall 3) on your local network.

For cloud integration, you basically have two choices:

  1. Get a developer account from Tesla (https://developer.tesla.com/en_US/) but the process of getting access tokens is not simple and there is no direct integration with Hubitat.
  2. Sign up with one of the providers that do the heavy lifting for you (Tessie, Teslemetry, NetZero) but there is no current integration with Hubitat.

Hmmm...

"Powerwall Manager
v0.3.84.20240405
You can connect to the Powerwall through the Tesla server, your local gateway, or both. A Tesla server connection is required for commanding Powerwall state changes. A local gateway connection allows more frequent Powerwall status updates than when connecting through the Tesla server alone."

And:

Tesla Token Information
This app currently requires a Tesla token generated using another app, such as the Tesla Auth App for IOS or Android, a web-based Tesla token generator, or from a script running on a local server.

Am I totally misunderstanding what this information from the app is saying? Or is this info on server access only valid for earlier editions of the Powerwall?

Regardless, I see that NetZero has an API that looks like allows getting and setting the Powerwall status and configuration; it's accessible via http get and post commands; these require an NetZero Auth token, but the app provides one. I also see that Hubitat Rules Machine does get and post, so this may be a route for what I'm hoping to do. If course, that's adding two web dependencies, one for the NetZero API and then another between NetZero and Tesla.

Thanks!

Snell, do you know if the server access part still works with Powerwall 3? Per my initial message, I think that will meet my needs but have been unable to test due to not being able to get an Auth token using any of the simple methods I've found.

Thanks!