Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Using API to gather individual battery cell voltage?

This site may earn commission on affiliate links.
I thought I saw this information somewhere before, but it may have been a screen dump from one of the Tesla hackers rooting efforts and not an output from the API.

I trouble-shooting a potential battery pack issue and would like to gather my own data in conjunction with Tesla Service running a diag on the battery. I can't say Tesla has ever done this to me, but other manufacturers run their diag and "don't find anything" and then 30 days out of warranty I have a problem with exactly what they couldn't find and I suspected all along. :roll:

Anyway, if I could get a list of all known parameters, I'll be glad to wade through until I find what I need.

I RTFM'd this forum, but either my search criteria was inadequate or there's nothing posted.

Thanks.
 
I've seen folks using OBDII type readers to get cell voltages (you have to get to the diagnostic port deep in the center console and then you need an adapter cable.) TMSpy is the app, I believe.
That was going to be another direction. I have the "console cable" for my model, but I'd like to use the API if possible. Failing that, my next question will be what parameters need to be passed in the console connection to gather that data.
 
Here's some pretty good documentation for the online API: Data

I've used it myself after generating an auth token using TeslaJS: teslajs

Unfortunately, I think the parameters returned via the online API are pretty general; I don't see anything close to individual cell voltages, unless you may be able to calculate something like that from things like total kW and SOC.
 
  • Informative
Reactions: Buckminster
Here's some pretty good documentation for the online API: Data
Thanks for the response Willow. I have followed Tim Dorr and his posts on here and GitHub. I think I've seen this list, but I'm not sure it is comprehensive or there are some "hidden" values. I've read so much in the last couple of years, that it could have easily been another BMS output I'm thinking of as I also design and build EV conversations as a hobby.

Unfortunately, I think the parameters returned via the online API are pretty general; I don't see anything close to individual cell voltages, unless you may be able to calculate something like that from things like total kW and SOC.
Good thought, but I'm trying justify consumption and capacity (kW and SOC) based on potential bad cells. I'm not getting the range I should be despite the consumer displays telling me I should be. Car says 260+ at 100% SOC and I'm pushing to get 210. The average kW usage seems out of whack based on projected-to-actual as well.
 
Thanks for the response Willow. I have followed Tim Dorr and his posts on here and GitHub. I think I've seen this list, but I'm not sure it is comprehensive or there are some "hidden" values. I've read so much in the last couple of years, that it could have easily been another BMS output I'm thinking of as I also design and build EV conversations as a hobby.


Good thought, but I'm trying justify consumption and capacity (kW and SOC) based on potential bad cells. I'm not getting the range I should be despite the consumer displays telling me I should be. Car says 260+ at 100% SOC and I'm pushing to get 210. The average kW usage seems out of whack based on projected-to-actual as well.

Just based upon the Model 3 option codes, there must be either some undocumented endpoints or an internal API only accessible by certain services. The Account page can query my car's options and correctly render an image of it, so they must be keeping all those details in a database somewhere!
 
Just based upon the Model 3 option codes, there must be either some undocumented endpoints or an internal API only accessible by certain services. The Account page can query my car's options and correctly render an image of it, so they must be keeping all those details in a database somewhere!
Interesting perspective. I always assumed the specs were in some back end Tesla database and they used the VIN as the SeqID field. I know they can't extract all the option codes solely from the VIN (not enough detail fields). Of course, the big options are there, but certainly not color, wheel choice, interior, etc.

On a related note: I have seen references to wheel sizes in some parameters. That might be used for some kind of calibration on mileage, range, speed, whatever. Owners have noted that Service Centers have to change something in the car's systems to account for wheel changes, so that correlates with the references.
 
Interesting perspective. I always assumed the specs were in some back end Tesla database and they used the VIN as the SeqID field. I know they can't extract all the option codes solely from the VIN (not enough detail fields). Of course, the big options are there, but certainly not color, wheel choice, interior, etc.

On a related note: I have seen references to wheel sizes in some parameters. That might be used for some kind of calibration on mileage, range, speed, whatever. Owners have noted that Service Centers have to change something in the car's systems to account for wheel changes, so that correlates with the references.

Judging by the Model S in your profile pic, I'm assuming you haven't tried looking up Model 3 option codes?

They're all static, weirdly enough. Every single model 3 returns the following:

AD15,MDL3,PBSB,RENA,BT37,ID3W,RF3G,S3PB,DRLH,DV2W,W39B,APF0,COUS,BC3B,CH07,PC30,FC3P,FG31,GLFR,HL31,HM31,IL31,LTPB,MR31,FM3B,RS3H,SA3P,STCP,SC04,SU3C,T3CA,TW00,TM00,UT3P,WR00,AU3P,APH3,AF00,ZCST,MI00,CDM0

I checked with a LR owner, an MR owner, and myself with an SR+. The API doesn't even distinguish between battery sizes.

After learning this fact, I can only assume that Tesla is keeping some endpoints hidden or inaccessible.
 
Judging by the Model S in your profile pic, I'm assuming you haven't tried looking up Model 3 option codes?
Correct. All my efforts are around the Model S and occasionally the Model X (there are some similarities).

They're all static, weirdly enough. Every single model 3 returns the following:
That is very strange. Are the displays in the Model 3 consoles model specific like the S? I don't spent much time in the Model 3. They must be different in the more prominent options: like there wouldn't be sunroof opening options in the console if you didn't have a sunroof. Color, wheels, etc. might be generic across the displays though.
 
Correct. All my efforts are around the Model S and occasionally the Model X (there are some similarities).


That is very strange. Are the displays in the Model 3 consoles model specific like the S? I don't spent much time in the Model 3. They must be different in the more prominent options: like there wouldn't be sunroof opening options in the console if you didn't have a sunroof. Color, wheels, etc. might be generic across the displays though.

The car displays correctly on the infotainment screen and on the Tesla Account page; colors, wheels, etc. So for some reason Tesla is keeping an entirely separate API somewhere just for Model 3 options.
 
I'll do some research in the area you've indicated, but it doesn't look likely. The link you posted is for the Openpilot wiki and doesn't say anything about sniffing CANBUS for individual battery cell voltages.

In that thought, it seems very likely that individual battery cell information is sent over CANBUS. Do you have a username or email address of someone who is getting this information via that method I can contact?