Pulling data out Tesla Powerwall

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"?

The gateway of the powerwall can be connected via ethernet or wifi. I have it connected to my network via Wifi.

You should be able to connect to it using whatever IP your network has provided it whether wifi or wired.

1 Like

Hey Darwin, I've spoken to you over on the TMC forum in the past. Been using your PW Manager since August to change modes, reserve levels, and stormwatch status, worked great until Tesla's changes last week.

I've hacked together a workaround (for reserve levels only) using python script developed by blueice89 over on TMC to control the powerwalls, and using a node.js script running on a Raspberry Pi to listen for a web request, then call the python script with the appropriate parameters. It's not ideal, but was the best I could do given my lack of programming knowledge. The web request is triggered by Hubitat. It works to keep me running on PWs during the peak period....not quite as nice as your solution, but it does the job. I'm leaving the PWs in Self-Powered mode all the time, and just changing the reserve to 0% at start of peak period and 100% at end of peak period.

I can share the info with you if you were interested in taking a look, either for your own usage or if you were interested in modifying the PW Manager app to do something similar.

Is anyone else seeing the same using the local gateway now? I had to sign back in on a web browser to see the local PW status, wondering if Tesla changed the local API as well.

Another user has indicated that they DO appear to have changed the API and now have a cookie needed after authentication.

Somewhat fitting considering your profile picture.

1 Like