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

API trip information / energy consumption

This site may earn commission on affiliate links.
Is there any API endpoint I have missed? I want to get out the information from the "trips", for example energy consumed since last charge etc... Because I cannot find kWh or any other figure in any of the below endpoints :/

{
'mobile_enabled': 'https://owner-api.teslamotors.com/api/1/vehicles/%d/mobile_enabled',
'charge_state': 'https://owner-api.teslamotors.com/api/1/vehicles/%d/data_request/charge_state',
'climate_state': 'https://owner-api.teslamotors.com/api/1/vehicles/%d/data_request/climate_state',
'drive_state': 'https://owner-api.teslamotors.com/api/1/vehicles/%d/data_request/drive_state',
'gui_settings': 'https://owner-api.teslamotors.com/api/1/vehicles/%d/data_request/gui_settings',
'vehicle_state': 'https://owner-api.teslamotors.com/api/1/vehicles/%d/data_request/vehicle_state',
}
 
Tesla doesn't give you information on kWh consumed on a trip. If you charge nightly you can do some math to see how much kWh you added during the charge and how many miles (rated and normal) you drive and then get consumption data. Thats the sort of stuff I tweet our daily on @Teslaliving.

If you save the charge information from the last charge you can get the latest estimate for kWh for a rated mile and then use that for math for newer trips etc.

The short of it is that it would be really nice for Tesla to add that to the (unoffocial) API.
 
Yes, they should add that. I'm doing the math, so i already have some approximation :)

Currently I'm using available battery % together with added energy as approximate for energy consumption.

How do you do it?