Pulling data out Tesla Powerwall

If you can capture a sample of the json (pulling up the respective page in your browser maybe?) I would be willing to write up a driver for it to at least try to get the basics, or whatever is there.

I've logged into my powerwalls locally, but, on my Chromebook I'm not able to run the needed commands.

I started off on a driver, but got a bit sidetracked with the HoneyDo list this weekend. I will see if I can finish up the initial rough cut tonight.

I DOUBT it will work at first. I have only found API information other people have pieced together, plus you need a Tesla account (which I do not have). But hopefully after a couple attempts it will be functional at least. I hope.
:slight_smile:

I didn't need the Tesla account to access my gateway from the inside (which is where the Hubitat resides anyway), but I did need (struggling to remember) the Serial Number of the gateway or something like that. I'll probably have time to fiddle around this week and see if I can remember how to work it from Bash.

Scott

@scottgu3 If you open your app and switch from car to powerwall, then scroll to the bottom, you can tap to show your serial number (long hold to copy to clipboard) I had to reset my local password to access my web view as well.

I have now posted a topic [PROJECT] Driver for Connecting to Your Tesla Devices with a very early, MAYBE functional (but very limited) driver to try to obtain data from a Tesla Powerwall 2. If anyone can try it out and let me know how it goes (preferably with Debug or Trace logging if you find a problem) I would appreciate it.

This will hopefully be just the start and I will receive information to be able to make it better for everyone.

Lol. No car, just power wall. I'll play around with the python stuff this weekend...and @snells app. Unless I get a burst of energy this eve!

S.

1 Like

Sorry to show up late for the party, but I noticed the web referrals from the above link. As of January this app supports cross-platform operation on both Hubitat and SmartThings hubs:

3 Likes

I updated the Powerwall Manager App at the above link to provide an attribute tile for dashboard display of an iframe of the dynamic power flow from the local gateway web page. The app allows for some iframe size tailoring, but if Tesla changes the gateway web layout drastically, it could break the capability. This will definitely be subject to display quirks of specific browsers. Here's a sample shot:

1 Like

Hi. I am having trouble authenticating as every time I enter my Tesla account credentials, it will give an error message verifying the Tesla powerwall account. I already verified everything and even had to reset my tesla account password (as due to many attempts my tesla account was blocked). Any suggestions?

You are getting blocked using the app?

Yes, as of just a few days ago, the Powerwall Manager app is not working due to a change in the way Tesla is performing authentication. As part of Tesla's authentication flow, I believe I need access to the headers of an HTTP Post 302 redirect response itself rather than follow the redirect, and I can't find a way in Hubitat to perform that function.

If I'm understanding this correctly, the issue has been encountered before, but so far I haven't seen that there's been a response yet from @chuck.schwer on whether this might be a candidate for an enhancement update.

Hopefully, I'm just missing something, but otherwise, without an update from Hubitat, we may be dead in the water with getting this working again with the new Tesla authorization service.

1 Like

I have not heard of any issues with my driver yet (but I do not have any app).

@scottgu3 or @jared.zimmerman, everything still working? Hopefully mine is not going to get botched up because of their changes.

The changes are related to the authentication required for issuing commands and getting authenticated status from the Tesla server. I don't believe there are any issues getting non-authenticated data from the local gateway.

1 Like

Ah good. I did not know if maybe they were going to start doing more in-depth authentication on the local side.

No noted problems with mine at this time. Seems to be working perfectly.

I'm only looking at local status data though.

S

Actually, that is another question that I have. I understand that I can only connect to my local gateway 192.xxx.xx.xx only while I am connected to the wifi network fo the gateway (e.g. tegxxx). Although I have the gateway connected to my local network, I can only connect to my gateway if I select the wifi network of the gateway. So how the hubitat can connect to the local gateway? I tried just in case anyway entering the local ip address as instructed 192.xxx.xx.x and it couldnā€™t connect it. Sorry to bother with many questions...as you can see, I am really a rookie and just learning to get familiarized with my hubitat and its capabilities.

That's not the case. If the gateway is hardwired to your local network, then it should have an IP address on the local network that you can talk to it at. That is how my gateway is connected - in fact, I don't have the Powerwall's WiFi in use at all. (*)

If you log into the gateway, click "Network" to see what IP address it has on your local network.

(logging in requires you to use your email address and the first 5 chars of the code inside the gateway's door; google "login to powerwall").

(*) I was worried about this, as the Powerwall's WiFi is 2.4Ghz and using a band that conflicts with my Zigbee network. I asked about how to change or disable the WiFi it but never got a good answer from Tesla or anyone at TMC. But I've not noticed any Zigbee issues.

Uhmmm. Thanks for the clarification. I donā€™t have it connected by ethernet cable.

Wait... if you don't have it connected via a cable, what did you mean by "I have the gateway connected to my local network"?