Zero emissions. Zero compromises
Log your vehicle data, air conditioning before driving or optimize charging…
Countless ways to make your Tesla even smarter and integrate it into your smart home.
Preconditions
This app is using the Tesla Fleet-API. This API has a pricing based on usage. You get 10$ free for every month and if you need more data usage, you can add a payment to cover your costs.
To use this API, you need a Tesla developer account.
You can find instructions on my Blog or a short version in the car’s pair view.
How to start?
This app offers several devices you can add.
Start with the car device. This connects to your car and allows some central functions to be controlled.
Then add devices for special purposes you want to control like battery/charging, climate or location.
Every device has its own set of sensors, controls and flows.
First add a car device. The pair view gives you some instructions how to create a Tesla deleoper account and it will request the client_id and client_secret from your Tesla app.
Then you have to authenticate with your tesla account. Set set the scopes, the app should be able to use (select all as default).
After adding the car to Homey, continue the pair view and register the app in your car (if you want to send commands).
Klick the button to start the app registration.
The link opens in Tesla app. If it’s opened in the browser, please scroll up and open it in the app.
Additional infomation
On my website you can find additional information. Additional information will be added as Blog posts.
I will provide basic information about the app and the api (technology and security).
And in the blog I plan to show use cases and examples.
There you can register for a newsletter to get updated when a new blog post is published.
And you can ask for further blog posts about examples, HowTo’s and technical insights
Current Limitations
- The command logic changed for the new personal API usage.
Not all commands are working.
Details: check next post
What API is used?
This app uses the Tesla Fleet API.
Details...
You authenticate with your Tesla account (oAuth) and allow the app to connect to your car.
In addition you have to register the app in your car (like a key card) to allow the app to send commands.
Vehicle data is determined using interval retrievals. These request won’t wake up the car. But if the car is asleep or offline, the app won’t get updated data.
To control you car, commands are sent. There are two variants:
- Fleet API: The app sends simple https requests to the Fleet-API. Pre 2021 S/X models have to use this option
- Tesla Vehicle Command Protocol: The app sends encrypted and signed commands to your car. If the app is registered in your car as key, these commands are allowed and processed. This allows an end-to-end encryption and security policies. You can remove app command access in car security settings or remove the app completely in your Tesla account.
Dependent on your role (owner/driver) your car access could be restricted and it’s not allowed to register the app in your car. This can happen if the leasing company is the car owner. Please contact the leasing company and/or Tesla in this case.
Contributions:
The thanks go to…
- Bjørnar Almli for the Tesla smart charger app
- My beta testers who help find bugs and bring in good ideas
- Emanuele Iannone who built a good CommandAPI interface I could use
Help getting this app even better!
Please use “send to friends” to avoid fees.
This helps me to finance the necessary server that’s needed to provide the apps public key and the proxy server that is used for the command API.
Thanks.