Tesla Fleet configuration issues

Trying to setup the Tesla Fleet integration and having some issues on the Tesla Developer site. Few days ago I followed the instructions from Tesla Fleet - Home Assistant but messed up the key generation so Telsa wouldn’t accept it. I had got through the part of hosting the key on Fleet Key for Home Assistant and then creating the Application in Tesla Developer site successfully.

I’ve now created the correct key type and am trying to either update the existing application to point to the new fleetkey.cc hosted public key but it’s complaining that:
“Domain is not valid. Please ensure it is registered with a certificate authority, does not include “Tesla”, and is not being used with a reverse proxy setup”

The instructions for the integration talk about choosing between “Just for me” or “For my business” which I thought were the options I saw initially. On the Tesla Developer site I’m now seeing “Authorisation Code and Machine-to-Machine” or “Machine-to-Machine only (Recommended for Enterprise Only)” options instead.

I’m wondering if this is a change on the Tesla Developer site that has broken the existing process or if there’s something else wrong with what I’m doing? TIA

5 Likes

I have the exact same issue, hopefully someone has a solution

Yep, same issue here

Messaged FleetKey / Teslemetry; this is a known issue that they’ve raised with Tesla and are awaiting a response / fix.

Also having the same issue. At first I thought maybe DNS hadn’t fully propagated the domain name, but finding this thread seems to suggest that isn’t the issue.

this is still an issue it seems

Hi guys, Tried today and got the same issue. Have anyone solved the problem?

Hello everyone,

just to keep this topic hot, I have the same issue today.

Developer has told me that he’s not has any success with Tesla support. Guess we all continue to wait or choose one of the other options.

So after a bit of digging, and found this and made it work.
I would argue that it is even better because I host my key this way :slight_smile:

of course it requires that you have some way of accessing your server from outside, but I use nabucase and worked just fine :slight_smile:

1 Like

hey there.

Thanks for the link.

I tried to setup this up but i get an “failed setup error”. i confirmed that my public key is being served correctly.
I’m guessing I probably messed up on the subsequent steps. How did you configure the API on Tesla’s developer website? On Allowed origin(s) i put just my Nabu Casa URL without any additional path since it was giving an error. Is that the correct approach?

Thanks

this is how it looks on tesla dev site.

Also, I redid the whole shenaningans here, all steps!

And in the step “Register your application as a Fleet API partner”
since I am (and my car is) in EU, I changed this link to the EU one.
This is not written in the steps, I just found it in some git or some other site comment
NA one:
https://fleet-api.prd.na.vn.cloud.tesla.com
EU one:
https://fleet-api.prd.eu.vn.cloud.tesla.com

Thanks for the additional information.
i figured out that i missed the “Register your application as a Fleet API partner” step.
I read through the documentation and honestly i’m not familiar with curl commands. Is there a tutorial on how to do it? is it as simple as just copy pasting the code into a terminal window?

i dont know anythign about them, i used some gpt help

i did all through powershell, gpt had to transform the curl commands to fit with PS syntax, and then i just took a step by step approach with it. asked gpt to descxribe what the next step is, what it does, what result i shoudl expect etc. and then we wnet command by command.

I see that the Tesla Fleet setup instructions have had a major update and most of the original setup steps are no longer required. I wasn’t able to work out the NGINX configuration but did get the Public key hosted using the custom integration @HarsiTomiii provided (thank you very much for sharing).

It wasn’t clear on the first several attempts of installing the Tesla Fleet integration, but it creates its own Private key (and I think will overwrite your own if you’ve created one). At the end of the process it provides a text version of the Public key that you then need to save into a file on HA. Once I realised it was overwriting my Private key but expected me to update the Public key manually, the integration was able to connect and see / control the car.

I found it was useful to have the “File editor” Add-on installed for creating and manipulating the files and folders. The “Advanced SSH & Web Terminal” Add-on’s web terminal also came in handy cleaning up various failed attempts.

Hoping someone can help. I am following the documentation for configuring the tesla fleet integration. However, I don’t get an option to enter domain as indicated in Step 4. The setup just asks me to select the area for the car and finishes there. No public key is shown either.

The car appears as a device and shows all sensors but as expected I cannot issue any commands.

Am I doing something wrong here?

I had a fair amount of trouble getting this setup.

Have you got the public key hosted somewhere yet? I know it will be wanting to generate its own as part of the Integration setup but I found it was easier to confirm it was available and then just update once the integration installs.

Do you have File editor and/or Web terminal installed so you can see if the integration has created the Private key? Should be \config\tesla_fleet.key

And I’m assuming you have the Tesla Dev app already created as you need that for the Client ID and Secret to create the application credentials.

Once I had all these in place the Integration installed successfully.

Where are you located? If you generate they keys manually, there’s a different location URL you need to use depending if you’re in North America/Asia-Pacific or Europe/Middle East/Africa. I’m not sure if the integration handles that?

Yep, the integration generated this but didn’t show me any public key.

So, if I am reading this right - you are suggesting that I generate my own private/public key and replace what the integration generates. Is that correct?

I am in Australia.

Is there an article somewhere that shows how to generate my own keys and use them instead?

You shouldn’t need to generate your own keys; I’m in Australia too and the integration handled my setup fine.

How are you hosting the public key? I found it was easiest to get that setup first; the place holder file can probably be any text file rather than an actual key, just confirm that it’s downloaded when you go to the URL.

I tried two ways of hosting the public key (I had to manually generate my public key from the tesla_fleet.key.

  1. Using the custom component technique from above. so at the same sub-domain as my HA. hass.example.com
  2. Through my Apache minimal add-on at a different sub-domain tesla.example.com

My domains are through a Cloudflare tunnel. Not sure if this is a problem.

I used to have Tesla Custom integration through the Tesla Http Proxy. This used to work but I have now broken everything trying to move to Tesla Fleet :smiley:

BTW, is the integration setup supposed to have a step that asks to configure the key domain (Step 4 in the doco)? I don’t get prompted for this.

Edit: Sorry, I should have mentioned this. I get the “This third party isn’t registered with Tesla. We can’t grant them access at this time” error.