TeslaPy
TeslaPy copied to clipboard
Move to Fleet API and Tesla Vehicle Command SDK
As announced by Tesla, the Owner API will stop working "starting 2024". TeslaPy will need to move to using the Fleet API (for pre-2021 cars) and Tesla Vehicle Command SDK (for post-2021 cars).
This is a critial issue, i am getting already the following erro:
requests.exceptions.HTTPError: 403 Client 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 for url: https://owner-api.teslamotors.com/api/1/vehicles/1492932313807820/command/charge_stop
However the deprication is set for next year TeslaPy stopped working for me :/
Hi, this may be seen as a blatant self-advertising, as it is: I just published my Python implementation of the new 2024 Tesla API here: tesla-api
So far it works for me including the whole registration process.
- If someone wants to hop in, you are invited.
- As the structure is simpler than TeslaPy, a pull request does not work so far.
For producing the signed commands I am currently using the tesla-command command line tool, written in Go by Tesla, which can also be compiled for Raspberry Pi. A python native implementation can be done, when the documentation from Tesla is published.
In the past I used TeslaPy, which worked great! If someone feels offended by this post, please let me know, I will delete/edit it asap. @tdorssers
Thanks!!
From: Fabianhu @.> Sent: Sunday, December 17, 2023 1:01 PM To: tdorssers/TeslaPy @.> Cc: Subscribed @.***> Subject: Re: [tdorssers/TeslaPy] Move to Fleet API and Tesla Vehicle Command SDK (Issue #150)
Hi, this may be seen as a blatant self-advertising, as it is: I just published my Python implementation of the new Tesla API here: tesla-apihttps://github.com/fabianhu/tesla_api
So far it works for me including the whole registration process. If someone wants to hop in, you are invited. As the structure is much simpler as TeslaPy, a pull request does not work so far.
For producing the signed commands I am using the tesla-command in written in go by tesla, which can also be compiled for Raspberry Pi. A python native implementation can be done, when the documentation from Tesla is published.
In the past I used TeslaPy, which worked great! If someone feels offended by this post, please let me know, I will delete/edit it asap. @tdorssershttps://github.com/tdorssers
— Reply to this email directly, view it on GitHubhttps://github.com/tdorssers/TeslaPy/issues/150#issuecomment-1859237323, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APN6O44TUC6JR6UH4ZYT363YJ4XMTAVCNFSM6AAAAAA7HRJW26VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJZGIZTOMZSGM. You are receiving this because you are subscribed to this thread.Message ID: @.@.>>
@tdorssers is this something you're (planning to be) working on? If so, any help needed?
I've made a Domoticz plugin around this library (which works really well I must say) so curious to know if and how to update when implementing the new Tesla API.
I just did the work for TWCManager. In short these were the required steps:
- Register an application with Tesla and your cars
- Get an OAuth token for each car (yes, there now is an official way to do this)
- Set up the proxy supplied by Tesla for your app
- Make the API server that TeslaPy uses configurable. This can be a FleetAPI region server or a proxy URL.
- Make the client_id of the app configurable in TeslaPy. This is needed for automated token refreshes.
- Don't use the car API ID in the command URLs. The proxy only supports the VIN in command URLs.
I'm not sure step 6 is needed for TeslaPy, maybe it already uses the VIN.