Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register
  • Want to remove ads? Register an account and login to see fewer ads, and become a Supporting Member to remove almost all ads.
  • The final cut of TMC Podcast #34 is available now with topics timestamped. We covered Tesla's rollercoaster prices, Toyota pushing junk science, Mike's new Model 3, Optimizing track mode for snow driving, FSD V11 apparently coming by the end of this week, and more. You can watch and check out the chat replay on YouTube.

Discussion: How to get status information from your Powerwalls

Since we have a warranty that specifically covers degradation over 10 years, is there any way to actually monitor it?

When I log in to the gateway, i don't see it. I know there are a few undocumented json paths for more info, but I don't know them all.

Just wondering if there is a way other then a full discharge and seeing how much the battery output.
======================================

(moderator note: I am slightly hijaacking this first post to inform people looking at this thread, that poster @mjhwa has posted some instructions, with screenshots, that one can use that utilize google chrome and a google account, which are both free. That post is post #45 in this thread, and is linked here below:


A pre requisite for using the instructions in post 45 successfully is the ability to retrieve your tesla account token. There are a few different ways to generate your tesla token. Keep in mind that your tesla token gives full access to all of your tesla products, so caution should be taken to ensure that however you generate it, you use caution in where you store it, who you provide it to, etc.
 
Last edited by a moderator:

jmaddr

Active Member
Mar 29, 2019
1,221
1,227
Florida
Trending is a feature of data loggers such as TeslaFi and Stats for iOS. That’s the best way IMHO but certainly won’t hold up with Tesla. In the end, it is really up to them to determine if the battery has degraded enough to warrant replacement.
Here is my trending from Stats:


upload_2020-4-24_15-2-15.jpeg
 

Attachments

  • upload_2020-4-24_15-2-5.jpeg
    upload_2020-4-24_15-2-5.jpeg
    226.4 KB · Views: 1,136

jjrandorin

Moderator, Model 3, Tesla Energy Forums
Moderator
Nov 28, 2018
17,587
23,657
Riverside Co. CA
Trending is a feature of data loggers such as TeslaFi and Stats for iOS. That’s the best way IMHO but certainly won’t hold up with Tesla. In the end, it is really up to them to determine if the battery has degraded enough to warrant replacement.
Here is my trending from Stats:


View attachment 535424

This is the energy section, not the model 3 vehicle section. Do either of those tools (Stats or teslafi) work with Powerwalls?
 

bob_p

Active Member
Apr 5, 2012
3,738
2,949
Tesla only provides % of charge level in the Tesla app and the Gateway's web interface (though the percentage values are different because the app appears to build in a 5% buffer).

So you can't get a direct measurement of current charge level across all of the PowerWalls.

The best you may be able to do right now is estimate the charge capacity by noting the charge % in the early morning and late evening (before and after sun) and use the total amount of energy shown in the app put into and taken out of the PowerWalls during the day to make an estimate for 100% charge level (adding 5% back, since the app appears to show 0% when the batteries actually have 5% charge).

This may get you close, though there is energy loss when energy is put into and taken out of the PowerWalls, so the numbers won't be completely accurate - but should be close enough to determine if you've lost 30% of the capacity.
 
  • Like
Reactions: ybbor
Tesla only provides % of charge level in the Tesla app and the Gateway's web interface (though the percentage values are different because the app appears to build in a 5% buffer).

So you can't get a direct measurement of current charge level across all of the PowerWalls.

Actually, the live status API does return the total pack energy and total energy left in Wh, so while you can't (as far as I know) monitor the charge level of an individual power wall (assuming you have more than one), you can monitor the total power level if you query this API over time.
 

gpez

Member
Apr 25, 2019
794
662
USA
Actually, the live status API does return the total pack energy and total energy left in Wh, so while you can't (as far as I know) monitor the charge level of an individual power wall (assuming you have more than one), you can monitor the total power level if you query this API over time.

Interesting. Is that on the Tesla cloud APIs or the local Powerwall APIs? I looked at the local ones and didn't see anything about pack energy.
 
Interesting. Is that on the Tesla cloud APIs or the local Powerwall APIs? I looked at the local ones and didn't see anything about pack energy.

This is from the cloud API -> State And Settings
The information is incomplete on this site, but if you try calling this API with something like Postman you can see the full list of data available.
 

gpez

Member
Apr 25, 2019
794
662
USA
This is from the cloud API -> State And Settings
The information is incomplete on this site, but if you try calling this API with something like Postman you can see the full list of data available.

As soon as I posted I found this forum with the details.

Code:
curl --header "Authorization: Bearer <auth>" https://owner-api.teslamotors.com/api/1/powerwalls/<batteryid>/status
{"response":{"site_name":"Home Energy Gateway","id":"<id>","energy_left":12016.263157894738,"total_pack_energy":12231,"percentage_charged":98.24432309618788,"battery_power":0}}

Neat! Going to have to integrate this in to my home automation to see if I can predict how long the battery will last based on usage during an outage :)
 

gpez

Member
Apr 25, 2019
794
662
USA
Awesome, i'll need to build an app to query this for my powerwalls. Curious what it shows

@ybbor here are the Windows Curl commands I used to get it:

1) Get an authentication token using your Tesla account <email address> and <password>
curl -X POST -d "grant_type=password&client_id=81527cff06843c8634fdc09e8ac0abefb46ac849f38fe1e431c2ef2106796384&client_secret=c7257eb71a564034f9419ee651c7d0e5f7aa6bfbd18bafb5c5c033b093bb2fa3&email=<email address>&password=<password>" https://owner-api.teslamotors.com/oauth/token
This will return your bearer <token>, which is good for 45 days.

2) Query for products:
curl -v --header "Authorization: Bearer <token>" https://owner-api.teslamotors.com/api/1/products
This will return all of your products including the Powerwall, which will have the energy_left and total_pack_energy as well as percent_charged.

3) Products will give you your battery ID (STEXXXXXXXX-XXXXX) which you can then use in future requests to just get the individual battery status:
curl -v --header "Authorization: Bearer <token>" https://owner-api.teslamotors.com/api/1/powerwalls/<battery id>/status
Which will just be the one response.

Got excited and added "Runtime Remaining" to my status page on my home automation server :)

Homeseer Powerwall plugin v2.png
 
Last edited:
@ybbor here are the Windows Curl commands I used to get it:

1) Get an authentication token using your Tesla account <email address> and <password>
curl -X POST -d "grant_type=password&client_id=81527cff06843c8634fdc09e8ac0abefb46ac849f38fe1e431c2ef2106796384&client_secret=c7257eb71a564034f9419ee651c7d0e5f7aa6bfbd18bafb5c5c033b093bb2fa3&email=<email address>&password=<password>" https://owner-api.teslamotors.com/oauth/token
This will return your bearer <token>, which is good for 45 days.

2) Query for products:
curl -v --header "Authorization: Bearer <token>" https://owner-api.teslamotors.com/api/1/products
This will return all of your products including the Powerwall, which will have the energy_left and total_pack_energy as well as percent_charged.

3) Products will give you your battery ID (STEXXXXXXXX-XXXXX) which you can then use in future requests to just get the individual battery status:
curl -v --header "Authorization: Bearer <token>" https://owner-api.teslamotors.com/api/1/powerwalls/<battery id>/status
Which will just be the one response.

Got excited and added "Runtime Remaining" to my status page on my home automation server :)

View attachment 535556


Awesome!! Thank you!! This makes it pretty easy
 
@ybbor here are the Windows Curl commands I used to get it:

1) Get an authentication token using your Tesla account <email address> and <password>
curl -X POST -d "grant_type=password&client_id=81527cff06843c8634fdc09e8ac0abefb46ac849f38fe1e431c2ef2106796384&client_secret=c7257eb71a564034f9419ee651c7d0e5f7aa6bfbd18bafb5c5c033b093bb2fa3&email=<email address>&password=<password>" https://owner-api.teslamotors.com/oauth/token
This will return your bearer <token>, which is good for 45 days.

2) Query for products:
curl -v --header "Authorization: Bearer <token>" https://owner-api.teslamotors.com/api/1/products
This will return all of your products including the Powerwall, which will have the energy_left and total_pack_energy as well as percent_charged.

3) Products will give you your battery ID (STEXXXXXXXX-XXXXX) which you can then use in future requests to just get the individual battery status:
curl -v --header "Authorization: Bearer <token>" https://owner-api.teslamotors.com/api/1/powerwalls/<battery id>/status
Which will just be the one response.

Got excited and added "Runtime Remaining" to my status page on my home automation server :)

View attachment 535556


Do you happen to know if there is any way to get the total power of each powerwall, not just the combined total? Since I have two, it would be really interesting to see how they compare. I don't see anything in the API docs

I discharged yesterday from 100% to 35%, and app shows the two powerwalls discharged 13.6kwh. When I run the math on that based on the new energy density (13.5*3=27kwh), that means my two powerwalls have a current combined total energy total of 20.92kwh or that they are down 22% from factory (10 months old, inside insulated garage in San Diego - 107 total discharge cycles so far). Wondering if one of the powerwalls has degraded past 30 and the other is stilll close to factory.
 
I only just started playing with the owner-api this weekend, so I wasn't aware of the total_pack_energy value until now. Querying my system, I see my year-old (within a few days) single PW reports 11466 Wh (sometimes 11465). Versus the nameplate 13500 Wh value that works out to ~85%. I see this reported value appears to already deduct the 5% delta between what the Gateway API reports and what the app sees (i.e. after 11466 Wh has been output energy_left would read 0 and percentage_charged would read 0 but the Gateway webpage would still show 5%). And I guess that suggests another 10% that Tesla is reserving on top of that (presumably some of the extra capacity you get during Storm Watch charging).

Now I guess a question is whether the total_pack_energy value actually varies from system to system (or varies over time for the same system), not sure who else has looked at this. Would be interesting to see on a Storm-Watch-charged PW also (I don't have that feature enabled, so I wouldn't know).

As I'm poking through the other energy queries the owner-api seems to offer, has anybody really poked at these? I can't seem to get energyhistory to work (I get a 500 error), powerhistory at least returns today's data. And I haven't gotten calendar_history to report anything other than today so far, either (kind = power assumes today as the webpage suggests, but kind = energy doesn't return any history, and kind = self_consumption returns a 500 error).
 
  • Like
Reactions: ybbor
I only just started playing with the owner-api this weekend, so I wasn't aware of the total_pack_energy value until now. Querying my system, I see my year-old (within a few days) single PW reports 11466 Wh (sometimes 11465). Versus the nameplate 13500 Wh value that works out to ~85%. I see this reported value appears to already deduct the 5% delta between what the Gateway API reports and what the app sees (i.e. after 11466 Wh has been output energy_left would read 0 and percentage_charged would read 0 but the Gateway webpage would still show 5%). And I guess that suggests another 10% that Tesla is reserving on top of that (presumably some of the extra capacity you get during Storm Watch charging).

Now I guess a question is whether the total_pack_energy value actually varies from system to system (or varies over time for the same system), not sure who else has looked at this. Would be interesting to see on a Storm-Watch-charged PW also (I don't have that feature enabled, so I wouldn't know).

As I'm poking through the other energy queries the owner-api seems to offer, has anybody really poked at these? I can't seem to get energyhistory to work (I get a 500 error), powerhistory at least returns today's data. And I haven't gotten calendar_history to report anything other than today so far, either (kind = power assumes today as the webpage suggests, but kind = energy doesn't return any history, and kind = self_consumption returns a 500 error).

I’ve been playing with these APIs quite a bit, since I am working on an iOS dashboard that shows all the data on one screen. I just received PTO on my PW+Solar Roof system a few weeks ago, so I don’t have a lot of history to refer to, but my 3 PW system reports a total energy of 40.5 kWh.

These APIs are also working for me: calendar_history, products, and live_status. For calendar_history, you must supply the “kind” param, and when “kind” is set to “energy” or “self_consumption” you must also supply the “period” param.
 
I'll add that calendar_history also takes an end_date parameter if you want to see something other than today. Looking at the app source code, the kinds that are supported are power, energy, self_consumption, backup, time_of_use_energy, and time_of_use_self_consumption. I'm not sure how to get data back for the last two, though.

There is also a period option of "custom" which then takes interval, start_datetime and end_datetime, but again I haven't yet found the constraints that don't get a server error for these.
 
The live_status and calendar_history endpoints are in the new-style /energy_sites endpoint, rather than the old /powerwalls endpoint. For example: /energy_sites/<site_id>/live_status.

Note that the site_id is not the index as in /powerwalls, but the erergy_site_id from the /products list.

My guess is that the /powerwalls APIs are deprecated since it appears /energy_site has a superset of the functionality provided there.
 
  • Like
Reactions: ybbor

h2ofun

Active Member
Aug 11, 2020
4,153
1,074
auburn, ca
Bump:

(Moderator note: community thoughts on making this thread a sticky, or, someone who has knowledge around this writing up a "how to" post for me to make a sticky post?"
If the batteries drop off as you as seeing, this would seem to be something all of us will deal with, maybe soon. And depending on what the warranty is, costs, etc. this could become a real big deal :)
 

About Us

Formed in 2006, Tesla Motors Club (TMC) was the first independent online Tesla community. Today it remains the largest and most dynamic community of Tesla enthusiasts. Learn more.

Do you value your experience at TMC? Consider becoming a Supporting Member of Tesla Motors Club. As a thank you for your contribution, you'll get nearly no ads in the Community and Groups sections. Additional perks are available depending on the level of contribution. Please visit the Account Upgrades page for more details.


SUPPORT TMC
Top