Tesla integration updates

I’m looking for help from people who own Tesla vehicles older than 2021.

Tesla is changing their API which breaks the tesla_custom integration for newer vehicles. With my 2021 Model 3, I can still read sensors but cannot send commands. The new protocol is more secure, and only supports newer vehicles. Details here: GitHub - teslamotors/vehicle-command

I’m working on updating the tesla_custom integration, which will require changes to teslajsonpy library as well as a new add-on to implement their security requirements.

My new add-on is here: GitHub - llamafilm/tesla-http-proxy-addon: Tesla HTTP Proxy Add-on for Home Assistant

I need help from someone with an older vehicle to verify that my changes don’t break anything for you.

3 Likes

Can you clarify what you mean by “older”? I have a 2019 X. I am guessing, though, that you mean even older than that?

I recenty started thinking it would be nice to be able to tell HA to prepare my car for driving. I quickly found out that sending even the WAKE_UP command was failing, though. I would be sweet if you could get this working again.

Thanks.

Hi , Thank you for doing this work to get around this problem , but I am having problems with your instructions setting up the fleet api as they are different to the screen I see in the Tesla dev account. I did manage to get the client id and secret but then when you say Using iOS or Android Home Assistant Companion app, navigate to this add-on, select Web UI and click Generate OAuth Token . There is no option in the companion app that I can find for Web UI , so can you clarify … When you day Navigate to … to what . Could you update your instructions please to explain where to navigate to for us more simpler folk please. Thank you

Sorry just to add the integration wont let me add the fleet api as it produces an unknown error occurred … any ideas on how I can fix this and get it working please? thank you

I have a late 2020 Model 3. I recently installed HACS updates to Tesla addon which resulted in Home Assistant erroring suggesting that a new refresh token was required. On obtaining the new token (valid only for 8 hours) the Tesla app now errors along the lines of “Invalid flow specified”.

Googling this problem found this thread to identify that I may need to set up the HTTP proxy now.

I’m commenting here in case this helps anyone else find this thread.

Happy to assist with OP’s workarounds for 2020 and older cars.

1 Like

Yep, updated 12 hours ago and hit the same problem after wards.

The Web UI button is here.

From Tesla’s documentation:

Pre-2021 Model S and X vehicles do not support this new protocol. Fleet API will continue to work on these vehicles.

I’ve been trying to setup the new fleet API using the Tesla HTTP Proxy Add-on but no luck. The Docs say to use Nginx SSL proxy add-on and it should pickup my config automatically but it doesn’t. I’m stuck.

The domain name I enter, should that be a subdomain for example that isn’t being used for anything yet (e.g. tesla.DOMAIN.com) or should it be my Home Assistant’s address?

Some help would be really appreciated. Thanks.

You should use a new subdomain, different than home assistant core.
Make sure nginx is set with active: true so it will use extra conf files. That was a mistake earlier in the docs, where it said the opposite.

I know this is stated as a issue on the github page, but I’m getting the same error as some others are getting when they try to use this add on, namely, an error in the logs that reads “Fix public key before proceeding.” after which the add on errors out.

Can anyone point me in the right direction to solve this?

Thanks

I have the very similar error and I’m a little confused on where to fix the public keys.

Does anyone have this add-on running with CloudFlare tunnel in place for HAOS? Any help is much appreciated.

1 Like

Someone wrote a guide to use this with CloudFlare Argo tunnel. It might change, as I am thinking about how to simplify this.

1 Like

Please do … I tried following that guide and couldn’t get it to work. I think I’ve probably put 20 hours into trying to make this work, trying different guides, variations, etc. with no success. I’m sure you’ll get it simplified eventually for those of us having trouble with this, but it’s still really frustrating for now!

The wiki has been updated, I followed it to the letter and it worked: Specific setups how‐to · llamafilm/tesla-http-proxy-addon Wiki · GitHub

Not sure how I feel about exposing HA to the Internet though…

I agree. I really don’t want to expose my HA server to the internet. This is where I would want this to become a “standard” integration offering and then be covered by Nabu Casa’s brokering.

I’ve asked the author if the access needs to be permanent or only during the initial setup, please upvote my question to increase visibility: Does Tesla need permanent access to Home Assistant from the Internet? · llamafilm/tesla-http-proxy-addon · Discussion #75 · GitHub

EDIT: It needs to be publicly accessible at all times since every call checks the certificate.

I followed this guide but I am still getting a “Fix public key before proceeding” error. Does that mean the Tesla HTTP Proxy can’t see itself from the internet through the CloudFlare Tunnel?
The setup on the SSL proxy side seems to be working but just can’t get past the above error. I too have spent a ton of time on this already. I feel like I’m getting closer but I’m still missing something.

Any chance this could be setup with the “Nginx Proxy Manager” plugin instead? Not sure if I’m just wasting my time trying…