TeslaLogger
TeslaLogger copied to clipboard
Tesla Fleet API migration
Tesla Fleet API migration
Tesla has officially shut down the "owner-api" Teslalogger used to get data from. It is still possible to get data from the old owner-api with some dirty tricks, but some cars are now returning an error if you want to send commands to the car (e.g turn on sentry mode).
{"response":null,"error":"Tesla Vehicle Command Protocol required, please refer to the documentation here: https://developer.tesla.com/docs/fleet-api#2023-10-09-rest-api-vehicle-commands-endpoint-deprecation-warning","error_description":""}
Here are the docs: https://developer.tesla.com/docs/fleet-api#fleet-telemetry
Latest beta is in branch "TeslaFleetAPI" https://github.com/bassmaster187/TeslaLogger/tree/TeslaFleetAPI
Todos:
- [x] Register Teslalogger as an app
- [x] Get Access Token & Refresh Token
- [x] Refresh Access Token from Refresh Token after it gets invalid
- [x] Support Europe endpoints
- [x] Trips logging
- [x] Charging logging
- [x] Nearby Superchargers
- [x] Streaming API - it works, but I'm pretty sure it will be shut down in favor for fleet-telemetry
- [x] Setup proxy server for end-to-end command authentication https://github.com/teslamotors/vehicle-command
- [x] Use proxy server to send commands to vehicle (e.g turn on sentry mode)
- [x] Detect if vehicle needs to use the proxy (Pre 2021 Model S / X are not supported)
- [x] Detect the required region endpoint for the car and use it (Europe, North America, China) https://developer.tesla.com/docs/fleet-api#region
- [x] Wait for CSR (Certificate signing request)
- [x] Setup fleet-telemetry server with signed certificate
- [ ] Detect if vehicle needs the fleet-api to communicate and migrate user to the new fleet api
- [x] Teslalogger communicate with fleet-telemetry
- [x] New features with fleet-telemetry. e.g percentage of driven by Autopilot https://github.com/teslamotors/fleet-telemetry/pull/96
- [ ] Check if user remove access to Teslalogger an stop logging
- [x] https://github.com/teslamotors/vehicle-command/issues/100
Maybe new todos will follow
Screenshots
Gain access to teslalogger
You can revoke access to apps anytime:
Which permissions from tesla api is required?
after successful switch to FleetAPI Teslalogger shows no more actual data for both my cars. Logfile error: 09.02.2024 11:21:32 : #1[Car_1:21]: GetVehicles Error: Object reference not set to an instance of an object
Which permissions from tesla api is required?
Does this answer your question? https://github.com/bassmaster187/TeslaLogger/blob/master/docs/en/tesla-fleet-permission.md
after successful switch to FleetAPI Teslalogger shows no more actual data for both my cars. Logfile error: 09.02.2024 11:21:32 : #1[Car_1:21]: GetVehicles Error: Object reference not set to an instance of an object
@Shrekmachine could you please send my your logfile
Which permissions from tesla api is required?
Does this answer your question? https://github.com/bassmaster187/TeslaLogger/blob/master/docs/en/tesla-fleet-permission.md
Yes, please, pin it up to main readme :D
after successful switch to FleetAPI Teslalogger shows no more actual data for both my cars. Logfile error: 09.02.2024 11:21:32 : #1[Car_1:21]: GetVehicles Error: Object reference not set to an instance of an object
@Shrekmachine could you please send my your logfile
on the way
Which permissions from tesla api is required?
Does this answer your question? https://github.com/bassmaster187/TeslaLogger/blob/master/docs/en/tesla-fleet-permission.md
Yes, please, pin it up to main readme :D
https://github.com/bassmaster187/TeslaLogger/commit/8c430a873f48737a4d3515c4e4c714401645d963 and https://github.com/bassmaster187/TeslaLogger/commit/c6b3ce46b2e85bcdb64d87b8cd205f5df554f035
after successful switch to FleetAPI Teslalogger shows no more actual data for both my cars. Logfile error: 09.02.2024 11:21:32 : #1[Car_1:21]: GetVehicles Error: Object reference not set to an instance of an object
After a couple of hours it started to work, without further action from my side