The TeslaJS library currently supports all existing Tesla vehicles and Tesla Solar.
There are already several very good JavaScript libraries available for the Tesla. So why create another one? Rather than contribute to or modify one or more of the existing libraries, this library was created for a few reasons:
Notable Features
With the introduction of the new OAuth-based owner API, one of the features I wanted was the ability to make API calls without having to login each time a new process was invoked. Many existing libraries require a login transaction with each initiation of the library. With the TeslaJS library, once an auth token is retrieved it can be cached and used to make other Tesla API calls. For certain use cases, notably server logging of multiple vehicles, this can be important for moderating load on the Tesla login servers.
This is also important if you want to use the library to do server-based data logging. It is generally safer to store an OAuth token on the server rather than logon credentials. If the server is compromised only the OAuth token is at risk and all existing tokens can be invalidated by changing the password on the account.
Another feature that I wanted was API stateless-ness (achieved via an options parameter to API calls) so that it was possible to use the library to make multiple overlapping async calls to different vehicles for data-logging.
Project Principles
This project has a few principles that have and will continue to guide its development.
Documentation
We've recently added auto-generated documentation via jsdocs. See the DOCS for a mostly complete reference. Please let us know if you see something missing and we will continue to expand.
Contributing
Contributions are welcome, particularly bug fixes and enhancements! Refer to our Contribution Guidelines for details.
Please note that the Project owners reserve the right to accept or reject any PR for any reason.
Code of Conduct
Before contributing or participating in the TeslaJS community please be sure to familiarize yourself with our project CODE OF CONDUCT. These guidelines are intended to govern interactions with and within the TeslaJS community.
Tesla API Documentation
The Tesla API encapsulated by this library was documented through the collaboration of many Tesla owners. Please thank and support them for their continued efforts! The latest API documentation can be found here.
Warranty Disclaimer
You may use this library with the understanding that doing so is AT YOUR OWN RISK. No warranty, express or implied, is made with regards to the fitness or safety of this code for any purpose. If you use this library to query or change settings of your vehicle you understand that it is possible to make changes that could inadvertently lower the security of your vehicle, or cause damage, through actions including but not limited to:
Copyright © 2021 TeslaJS.org - All Rights Reserved.
Powered by GoDaddy Website Builder