Teslatte 🚗🔋☀️☕
⚠️ Alpha Warning! ⚠️
This Rust crate is still in alpha stage. It is something I quickly put together if anyone needed it. I'm aiming to work on it as I need more features.
0.1.xwill have breaking API changes. Don't rely on this project for anything important yet.Using Rust nightly until
async_fn_in_traitis stable.
Teslatte is both a CLI and a Rust crate for interacting with the Tesla API.
It is fairly trivial to add in new endpoints if you feel like creating a PR, but please:
- Write some unit tests if it relies on new or changed data structures.
- Let me know if your PR is a massive change before spending a lot of time on it.
APIs implemented
Only the Owner API is partially supported by this crate, with plans to support the Fleet API and the Command Mode SDK.
API.md contains a table of all known Tesla APIs (official and unofficial) and if Teslatte supports it, and where the API details were scraped from.
References
Thanks to https://tesla-api.timdorr.com/ for their excellent reference.
Tesla recently released API documentation for their "Fleet API" which appears to be similar to the Tesla Owner API.
Tesla also recently released a Command Mode SDK which also includes a proxy for the Fleet API.
CLI
There is a CLI that can be used to interact with the API. Example:
)
# Prints a URL to start the OAuth flow, then asks for the token URL, then saves the token to `cli.json`.
# Lists your vehicles:
{
}
)
<ID>
{ }
Crate example
A basic example: examples/basic.rs
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.