Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vehicle ID supplied to the /vehicles/{id} endpoint has changed to id_s #224

Closed
milesburton opened this issue Oct 2, 2020 · 5 comments
Closed

Comments

@milesburton
Copy link

Tesla have changed what is supplied to the /vehicles/{id} to {id_s}. You can get this id from the same /vehicles endpoint.

@timdorr
Copy link
Owner

timdorr commented Oct 2, 2020

These fields literally have the exact same number. They provide the id_s version, as the numeric form in id is beyond the 32-bit limit and many languages and JSON libraries either won't parse it or parse it incorrectly. I would check that your libraries have support for large numbers. But the data coming over the wire has the exact same values for id vs id_s, just numeric vs string form.

@timdorr timdorr closed this as completed Oct 2, 2020
@milesburton
Copy link
Author

milesburton commented Oct 2, 2020 via email

@milesburton
Copy link
Author

Here's an example straight off the Tesla site. (I've removed the previous characters for anonymity

"id": 76 , "id_s": "79",

@ltfiend
Copy link

ltfiend commented Oct 2, 2020

Both exist and both are contain the same data as Tim said. I just verified on mine in the raw data

for reference:

{'id': xxxxxxxxxxxxxxx87, 'user_id': xxxxx1, 'vehicle_id': xxxxxxxx6, 'vin': '5Yxxxxxxxxxxxxx', 'display_name': 'Tess', 'option_codes': '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', 'color': None, 'access_type': 'OWNER', 'tokens': ['xxxxxxxxxxxxxx', 'xxxxxxxxxxxxxxx'], 'state': 'online', 'in_service': False, 'id_s': 'xxxxxxxxxxxxxxx87',

@milesburton
Copy link
Author

OK Confirmed, it looks like the number is trunced in JS so it doesn't decode correctly. This is down to the javascript number datetype we think. Likely why Tesla included the string variant.

Thanks Both

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants