Tesla's recent rollout of fleet-telemetry empowers authorized users to seamlessly stream real-time data directly from Tesla vehicles. Let's delve i...
For further actions, you may consider blocking this person and/or reporting abuse
I was considering writing an article just like this a few hours ago, so glad to see you already have. I got access to Fleet Telemetry this morning and have successfully implemented it on teslemetry.com to send Webhooks or Server Side Events.
So you subscribe on their behalf and post it back out to their provided webhook on each report?
One question, why do we need to send
ca
in the body ofSend Fleet Telemetry Config
?I'm asking because in practice it means every 3 months that the TLS certificate changes(assuming I'm using let's encrypt) I have to resubmit my whole fleet configs.
Or is it only needed on the first time when the vehicle is configured?
Theoretically the CA shouldn't change if you generate with the same CA each time. It's probably easiest to self-sign your certificate. I will update the article soon to show how to do this.
when editing the config.json I need to fill the content of the full certificate chain file:
"ca": "content of full certificate chain file from previous step"
But the content is multiline code like this:
-----BEGIN CERTIFICATE-----
12345
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
abcde
-----END CERTIFICATE-----
How can I add this multiline code to the config.json?
OK, found it. Every line need a \n and then join to one line...
Now I can use the check script but it gives me:
What can be the problem here?
Looks like verification is passing with
-partial_chain
flag. From openssl docs:Allow verification to succeed if an incomplete chain can be built. That is, a chain ending in a certificate that normally would not be trusted (because it has no matching positive trust attributes and is not self-signed) but is an element of the trust store. This certificate may be self-issued or belong to an intermediate CA.
Hi Patrick, thank you for this tutorial. I helps a lot! I still have some questions?
=> My app domain is registered like
www.your-domain.com
not with a classic your-domain.com (newbie error), will it work to have : telemetry.your-domain.com? (certificate has been generated properly)=> I have sent a CSR to tesla for your-domain.com, I got a response 200 with :
"response": {
"account_id": "4625141***",
"domain": "www.*****.com",
"name": "***",
"description": "***",
"csr": null,
"client_id": "****",
"ca": null,
"created_at": "2023-10-25T17:17:48.744Z",
"updated_at": "2023-11-17T23:14:46.079Z",
"enterprise_tier": "free",
"issuer": null,
"csr_updated_at": null,
"public_key": "0451016f6299****"
}
But I see null for CA and CSR. Do you think that the CSR will be processed? Should I do something else?
Thank you!
Yes, that will work. I'm using "tesla.mydomain.com" for my app registration and "telemetry.mydomain.com" for the fleet-telemetry server and it seems ok with that. Granted I can't get my certs to load correctly yet so I can't prove it...
Strange, the telemetry-config has been synced to the car, my server is running, the CSR-request was accepted by Tesla, check_server_cert states 'The server certificate is valid.', but I do not get any data... If I query the Fleet Telemetry Errors endpoint with my partner bearer token, I get an empty fleet_telemetry_errors return...
Ok, seems like I missed only one step. Although I think the README.md on the github page did not described it a week ago. You need to redirect the owner of the vehicle you want to install the virtual key on to tesla.com/_ak/your-domain.com and let the owner accept this with his app... After doing this last step, data began streaming into my server.
I updated the readme to make the steps clearer a while back. I'll update this post as well.
How long is shortly? Just to have an idea. I've sent the config to a MY 2023 model, which accepted it. When requesting its config, the 'synced' field remains 'false'. Even after > 1 hour and waking up de tesla and even driving it for 2 minutes...
ok, the vehicle now states 'synced'='true'. I guess it may take a while...
Yeah, there's no hard rule on when the vehicle will receive the config. It depends on if it's connected to the server, has a solid internet connection, etc.
Hello and thanks for this great post!
May I ask you how long it took for Tesla to get back to you after you submitted the CSR?
In step 9 of their fleet api Github repo they mention it may take up to two weeks
github.com/teslamotors/fleet-telem...
Have you contacted them via email or just waited for them to get back to you?
Did they get back to you?
I'm still waiting since 2024-03-31
It took more than the advertised 2 weeks for me - just got my response this week and probably submitted it around the same time you did.
Thank you Steve, There were a problem on my account CSR was not attached but it is fixed!
Is there any information out there about rate/data limits? I swear I had seen some at one point, and maybe I'm just blind and am missing it, but I know if I try to be too aggressive it tells me, but what can I get away with?
More info about rate limits and billing plans is slated for later this quarter or early Q3.
In your example telemetry server config you have "path to certificate from previous step" but really this is some path expected inside the container, isn't it?
Yes, you need to make sure the path is accurate however you're running the fleet-telemetry server. If you're running it using Docker, make sure the path corresponds with the mounted volume.