Access the Tesla API in Tasker (Android App)
This is a Tasker Profile to access the unofficial Tesla API.
The idea was born during discussing a feature request for TeslaMate
Why not using Tasker Plugin for Tesla? You never know what a closed source application will do with your credentials :-)
So this Project is different. Access token is generated: asked for Tesla account data with Tasker scene, store data only in local variable to get access token from Tesla and than destroy local copy of access data.
Token will be refreshed when expires in 10 or less days.
Everything not yet included will be when my Tesla is connected to my account and I am able to test the tasks.
Install Dependencies.
The easiest way is to open the Taskernet url on you Android Phone and press import.
If you prefer to install in manually: Import Tesla_API_in_Tasker.prj.xml on your Android Phone using Tasker, see Tasker-FAQs on how to import xml files. It is recommended to backup your data first.
To update Tesla API in Tasker the same steps as described under Installation are necessary.
This project provides Tasker tasks to access the Tesla API. To use them in your own automation projects/tasks/profiles/scenes in Tasker just call the function: use the "Perform Task" Action in Tasker to call the desired function.
If parameters are needed the function name gives you a hint about what is needed. For example: "set temps (driver temp, passenger temp default:20.5)" --> this function accepts two parameters, driver temp and passenger temp. If both or one is not given, the default value is taken, in this case 20.5. To call the function with the parameters use the "Perform Task" action and use "Parameter 1" and "Parameter 2" for the parameters you want to set.
You only need to call the function you want, for example set temps (driver temp, passenger temp default:20.5). The Tesla API in Tasker project does take care of the token, wakeup and other preconditions. The task return true if it was successful and false if not.
Do not store your own automation tasks within the Tesla API in Tasker Project in Tasker to prevent data loss when updating Tesla API in Tasker.
All contributions are welcome and greatly appreciated!
Maintaining this project isn't effortless, or free. If you would like to kick in and help me cover those costs, that would be awesome. If you don't, no problem; just share your love and show your support.
Please note that the use of the Tesla API in general and this software in particular is not endorsed by Tesla. Use at your own risk.