jnxxx / homeassistant-connectedcars_io

Home Assistant integration for connectedcars.io (Min Volkswagen)
17 stars 2 forks source link

Name space for Cupra #1

Closed a42wg closed 2 years ago

a42wg commented 2 years ago

Any chance of getting a namespace for Cupra Leon. Should be a Seat Leon, but with different url

reg Anders

jnxxx commented 2 years ago

Hi Anders,

I assume you have already tried "minseat"?

I do not see any other namespaces published by the API. You can try it here: https://api.connectedcars.io/graphql/graphiql/# Query for organizationNamespaces. The integration adds "samler:" to the namespace.

a42wg commented 2 years ago

Hi, yes I had, but... When I tried to login to Seat-connect I got a "wrong Password" indicating that Seat somehow knew my Email (it could easily bee, I had an Ateca until 2 month ago), so I asked for a PW reset. After reset I can login to" My Seat" and also "My Cupra" with the same credentials and they both take me to the Cupra side, showing my car.

I can now login to the minSeat namespace from ConnectedCars. After login it shows a dialog saying: "Success!, Created configuration for minseat", but I am not able to find any devices or entities. What am I missing?

I have enabled debug log as described, this is what I get after a restart: connectedCars.log

reg Anders

a42wg commented 2 years ago

Hi, I found a youtube video on how to use connectedcars.io from node-red. I build a similar flow and the answer from minseat was an auth error: "JWT token does not contain 3 dots". I have not been able to extract the token from the flow yet, but it seems that it is wrongly formatted for Seat.

Any idea how to fix this?

reg Anders

image

jnxxx commented 2 years ago

The attached log file shows that authentication went ok, but no cars were returned.

The apps "Min Seat" and "My Cupra App" are from two different vendors. Min Seat is from Connected cars, a company that seems to be owned by the Danish VW, Seat, Skoda and Audi importer. My Cupra App is from Seat Cupra in Spain.

I think it will be two different backends. Thus, you will not get Cupra info from Connected cars API.

I cannot see what is going wrong with the Node-red example, other than it probably fails to authenticate. The JWT is the same as the access token, which was successfully obtained by the integration. It consists of three parts, each base 64 encoded and separated by two dots/periods. It probably checks for the dots to see if it succeeded.

jnxxx commented 2 years ago

Closing issue as the Cupra is probably not using Connectedcars.