[APP]PRO] Tesla

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.

App Image CommunityThread


This app is the successor of the “Tesla smartcharger” app. Tesla changed their API and introduced a new and more secure way to connect to your car.
The old app id deprecated, but will work until Tesla deactivates the Owner API (announced for Q1 2024).
Use this app as replacement. Because it’s a different app, you have to start from scratch. Add your car, migrate/adjust your flows, and if the old app isn’t needed anymore, you can remove it.

Stay tuned…it’s on the way.


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.

grafik

Every device has its own set of sensors, controls and flows.

While adding the car device, you have to authenticate with your tesla account. Then set the scopes, the app should be able to use.

After adding the car to Homey, continue the pair view and register the app in your car (if you want to send commands).
Klick on the Testa icon to start the app registration.
The link opens in Tesla app. If it’s opened in the browser, please scoll up and open it in the app.



Additional infomation

On my website you can find additional information (will be expanded in the future).

grafik

https://rwdevelopment.de

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


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!

btn_donate_LG1
paypal-logo-png-transparent
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.

8 Likes

ToDo list:

  • Add power measurement for Homey energy :white_check_mark:
  • Add open/close trunk :white_check_mark:
  • check navigate flow actions :computer: in progress, sending one location is possible
  • check shift state (P) :white_check_mark:
  • additional conditions :computer: in progress
  • schedule software update :white_check_mark:

Reserved 02

Reserved 03

Hi @RonnyW, thanks for building a brand new Tesla app.
Is there a way to make a “and” card for sentry mode and child lock?

There are not flow conditions added for “simple” values. Best would be to use logic cards and the global tokens. FLow conditiosn are added for complex checks (location) or value lists.

The Sentry mode is available for car device. Child lock is not added yet as capability.

Hi @RonnyW . This new app appears innovative, thanks. I’ve added the car device and battery/charging. I don’t see options like smart charging in the old app. Does it exist, or are there plans to implement this functionality?

There are no price dependet charge plans. The app only represents the car.
You can/should use flows to start/stop charging based on other triggers/apps (Tibber etc.).

Is ther a way to thank you whitout paypal?

1 Like

Thanks for creating this new app, after a brief check, it looks like it will work brilliantly for me!

One possible issue, added both the car and the batter and then started charging the car via the Tesla app. All the information regarding charging speed, voltage, amps and so on is show correctly but it seems like the power usage is not being included properly, it is not showing up for the device or the zone.

You are right. The app doesn’t use the standard capability.
I’ll check possibilities, e.g. device settings to add it individually.

I could share an IBAN via PM.

1 Like

An additional question: How are you using the energy consumption now?

I use the wallbox usage charging and the smart meter for the house itself (and PV).
If you are charging outside, Homey would still count your usage as it would be in your house.

Hi Ronny, I tried to create a device with the Tesla app, but I get an error 403 Forbidden when trying to connect. I had it connected at first, but then I realized I did not want to give it full access, so I removed the device and deinstalled the app, and then re-installed and trying to do it the correct way, but now I cannot add the car anymore

I have a meter for the entire house (Tibber Norway) and a bunch of smart devices, each individually measuring the power usage. My charging device is a Tesla charger v2 which does not allow for any kind of monitoring so the the charging power gets categorized into the generic “Other” bucket.

So maybe the solution would be to have an option for using the values from the Tesla charging device as a smart meter?

Guess you misunderstood me question. Would you make an en card for sentry mode and child lock?

You can use the logic card for that
Bildschirmfoto vom 2024-01-16 17-08-42

@RonnyW I can see the miscommunication already. Sentry Mode has been translated into Dutch which is not the intention. Sentry Mode is an international feature that’s why I couldn’t find it. I will do a PR. See Correct translation Sentry mode in Dutch by LRvdLinden · Pull Request #1 · RonnyWinkler/homey.tesla · GitHub

Hello and thank you for this application, I have a quick question, if I create a driver account for the application, does it work? I would like to keep my proprietary rights. Sorry for my broken English.

I’m not sure what happened in your case. The error (from diagnostics log) is raised during oAuth/authority check. Perhaps it’s buffered in browser popup.
The Tesla login popup remembers your session in the browser cache. I assume the login popup is not shown a second time (just closes). Perhaps clearing the browser cache helps.

To remove the rights, you have to remove the Homey app in your Tesla accont (Tesla website, not the app). If it’s removed, start device pairing again. You don’t need to delete the device or app. The login popup should appear again.

If you want to use the app to send commands to your car ( start/stop charging etc.) you will need all scopes. If you only want to read some data, some read-only scopes are ok.