Code Monkey home page Code Monkey logo

Comments (12)

nitishsingla91 avatar nitishsingla91 commented on June 2, 2024 1

@slashmili
It appears that the contract has been updated;
https://developer.tesla.com/docs/fleet-api#register

They are now accepting only one parameter: (DOMAIN)

curl --header 'Content-Type: application/json' \ --header "Authorization: Bearer $TESLA_API_TOKEN" \ --data '{"**domain**":"string"}' \ 'https://fleet-api.prd.na.vn.cloud.tesla.com/api/1/partner_accounts'

from fleet-telemetry.

slashmili avatar slashmili commented on June 2, 2024 1

@jbanyer Yeah that was the idea. However since then ca is removed from the docs

So I'd assume that's an invalid configuration.

Is that working? Were you instructed to use the same key for both purposes?

No it didn't work 😭

Basically I've gave up on fleet-telemetry for now. we are planing to call the APIs every 5 min until this issue #41 is addressed.

from fleet-telemetry.

davidlin2k avatar davidlin2k commented on June 2, 2024

Any luck with share a vehicle configuration with Tesla?

from fleet-telemetry.

slashmili avatar slashmili commented on June 2, 2024

Short answer No.

I shared my client_config.json with Tesla Fleet support and I was instructed to take this approach instead which I did. However I've come to the conclusion that this is not the way to share the 3rdparty fleet-telemetry server with the car.

from fleet-telemetry.

davidlin2k avatar davidlin2k commented on June 2, 2024

Short answer No.

I shared my client_config.json with Tesla Fleet support and I was instructed to take this approach instead which I did. However I've come to the conclusion that this is not the way to share the 3rdparty fleet-telemetry server with the car.

Thanks for the update, I guess we will have to wait for more instructions

from fleet-telemetry.

nitishsingla91 avatar nitishsingla91 commented on June 2, 2024

@slashmili

I am also experiencing TLS Handshake Error, Have you get success with this step?

2023/11/15 22:48:22 http: TLS handshake error from 100.94.115.106:38807: EOF

Could you provide guidance on troubleshooting at least for this step?

from fleet-telemetry.

slashmili avatar slashmili commented on June 2, 2024

@nitishsingla91 From my understand that is meant to be like that!

As mentioned in the readme, this server relies on mTLS. Only clients that have "Tesla" certificates can make a successful communication to this server.

from fleet-telemetry.

nitishsingla91 avatar nitishsingla91 commented on June 2, 2024

@slashmili
I have one more question for you. You said in your first comment that you submitted client-certificate.pem as the CA.
Where did you submitted it exactly?

I followed your steps, created the KEYS, and then created the partner token. But when I tried to call the Partner Account Endpoint with the same token, I got this error:
{ "response": null, "error": "https://auth.tesla.com:443/oauth2/v3/clientinfo => operation_timedout with 7s timeout", "error_description": "" }

from fleet-telemetry.

slashmili avatar slashmili commented on June 2, 2024

@nitishsingla91 I was using this api

curl https://fleet-api.prd.<region: na|eu>.vn.cloud.tesla.com/api/1/partner_accounts \
    -h 'Authorization: Bearer <PARTNER-JWT-TOKEN>` \
    --data '{"domain": "<your-domain>", "ca": "-----BEGIN CERTIFICATE-----\n...."}'

{
    "response": {
        "client_id": '....',
        "domain": "<your-domain>",
        "ca": "-----BEGIN CERTIFICATE-----\n....",
        "public_key": "04418....b3c9",
   }
}

It was working when I tried!

Make sure your domain is publicly available servers the public key under https://<your-domain>/.well-known/appspecific/com.tesla.3p.public-key.pem

from fleet-telemetry.

jbanyer avatar jbanyer commented on June 2, 2024

I create the keys:

openssl ecparam -name prime256v1 -genkey -noout -out private-key.pem
openssl ec -in private-key.pem -pubout -out com.tesla.3p.public-key.pem
openssl req -new -x509 -key private-key.pem -out client-certificate.pem

@slashmili are you attempting to use the same private key for both vehicle command signing and also fleet telemetry mTLS?

Is that working? Were you instructed to use the same key for both purposes?

from fleet-telemetry.

jbanyer avatar jbanyer commented on June 2, 2024

However I see that it doesn't work. No data in log nor in Kafka, the LB is receiving many request while I'm driving the car but all I see in the fleet-telemtey log is TLS errors.

@slashmili does that mean your vehicle was sending telemetry to your load balancer at mysubdomain.high-mobility.com?

How did you configure your vehicle to start sending telemetry?

Did you:

  1. send your client_config.json to Tesla
  2. install your public key (virtual key) on the vehicle as per this instruction

If so, it appears that installing the public key (the one used for command signing) on the vehicle also enables the vehicle to send telemetry to the same domain that was registered?

ps - thanks for answering my questions!

from fleet-telemetry.

slashmili avatar slashmili commented on June 2, 2024

does that mean your vehicle was sending telemetry to your load balancer at mysubdomain.high-mobility.com?

That was my feeling! because there were so many parts in the middle, I was not able to debug further(or rather didn't want :D)

How did you configure your vehicle to start sending telemetry?
Did you:

  1. send your client_config.json to Tesla
  2. install your public key (virtual key) on the vehicle as per this instruction
  1. Actually I did sent my client_config.json to Tesla! However I got a reply back:

third party apps can and should use the mobile app pairing flow documented in the Vehicle Command SDK

  1. Yes I installed it that way.

Initially I thought these two domain are the same but I think this is not the case:

  1. If I start fleet-telemetry project, there is no option(as of today) to put the public key in /.well-known/appspecific/com.tesla.3p.public-key.pem
  2. Even if I patch the code to host the public key in this path, when I call register API, I get an error that the Tesla server was not able to fetch the public key from my server because of mTLS.

from fleet-telemetry.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.