Taycan Client Software Development

DubaiEye

Active Member
First Name
Fares
Joined
Jan 9, 2021
Messages
27
Reaction score
58
Location
Dubai UAE
Website
volt.ae
Vehicles
21Taycan TS,AC Cobra,Tesla X,Tesla 3,Zoe,Fiat 500e
Country flag
Friendly warning This is not the usual car tec talk. If SDK, API, REST doesn't mean anything to you, you can stop reading here without regret.

Fantasizing on a big vision how a Garmin Watch (has an SDK, can interact thru REST API's) might somehow connect to a Taycan, I set out for a Google session.

After a while, this has been found:
https://www.hackathon-stuttgart.de/hackathon-porsche/

Interesting enough, but it hintsinbeneath other interesting links) on
https://high-mobility.com/learn/documentation/rest/reference/v2/

That exceeded by far my hopes and expectations. May be I'm dead wrong, but it seems that a seasoned software engineer (f/m) might be able to do some (rich) rest based interaction with that car, either as an app, a web client or another plattform.
If so, the offered functionallity by far exceeds what the Porsche Connect App offers:
* /browser/load
* /climate/defogging/start
...
A big challenge but might be Authorization/Authentification then...

Just wanted to share my excitement.

I totally Agree with you


If someone was able to Tap on the API's and security Token to redesign the APP

am happy to Help with Idea's as i have done it for the Tesla and have close people who i know have the knowledge





Advertisement

 

DubaiEye

Active Member
First Name
Fares
Joined
Jan 9, 2021
Messages
27
Reaction score
58
Location
Dubai UAE
Website
volt.ae
Vehicles
21Taycan TS,AC Cobra,Tesla X,Tesla 3,Zoe,Fiat 500e
Country flag
what would be cool is if we could get the data from the car hosted on Raspberry Pi and have live stream
 

Oink

Well-Known Member
Joined
Sep 8, 2020
Messages
114
Reaction score
72
Location
Norway
Vehicles
Audi A4, Taycan 4S+
Country flag
So, a quick tutorial...
This requires a valid cert in your php.ini. Get the latest here: https://curl.haxx.se/docs/caextract.html

And in your php.ini add (use
Code:
curl.cainfo = E:\LOCATION\cacert-SOME-DATE.pem
There is a way to skip this with curl, but due to it being a security nightmare I won't tell you how.

To get your API and Auth just hit up the network tab in the inspect window as outlined in the quoted post, refresh, and then just search for "Bearer" like so:
1611432083375.png


Click on the "Authoriz..." text and the right part of the window will show you both the apikey and auth headers under "Request Headers", highlighted in yellow for you.


Someone else is going to have to come up with logging in and capturing token to get correct auth for each and every option. This all reminded me of how much I despise web development.
 
Last edited:

cjne

Active Member
First Name
Johan
Joined
Sep 22, 2020
Messages
36
Reaction score
46
Location
Sweden
Vehicles
Taycan Turbo S 2021, Tesla Model S P100D 2019
Country flag
Nice to see some work being made on the API's, there's a lot of interesting things one can do!
I'm thinking of making a Home Assistant integration, i just need to figure out the Oauth2 stuff so that it can obtain the access token programmatically and renew it as needed. If anyone has it figured out i would love to get some pointers in the right direction :)
 

cjne

Active Member
First Name
Johan
Joined
Sep 22, 2020
Messages
36
Reaction score
46
Location
Sweden
Vehicles
Taycan Turbo S 2021, Tesla Model S P100D 2019
Country flag
This bit is okay. You post your MyPorsche username and password to a auth endpoint and get back an auth token that you use on a Bearer header in subsequent calls to authenticated endpoints.
Hey! I’m having some issues with this step, I get an error that’s says invalid redirect url. Sounds like you have managed to get it working?
 

cjne

Active Member
First Name
Johan
Joined
Sep 22, 2020
Messages
36
Reaction score
46
Location
Sweden
Vehicles
Taycan Turbo S 2021, Tesla Model S P100D 2019
Country flag
Hey! I’m having some issues with this step, I get an error that’s says invalid redirect url. Sounds like you have managed to get it working?
Replying to myself here ;)
I have the auth bit sorted now and have a foundation for a python client library in the works, will soon push it to Github.
The idea is then to use that library for the Home Assistant integration.
Are there any other users of Home Assistant here?
I'm thinking i should mimic the Tesla integration as far as possible but if anyone else has any ideas i'd be interested to hear them!
 
OP
AMERCY

AMERCY

Well-Known Member
First Name
Christof
Joined
Oct 30, 2020
Messages
55
Reaction score
51
Location
Germany, Stuttgart region
Vehicles
Macan '19 (Crayon), Taycan 4S+ '21 (Black)
Country flag
  • Thread starter
  • Thread Starter
  • #37
Replying to myself here ;)
I have the auth bit sorted now and have a foundation for a python client library in the works, will soon push it to Github.
The idea is then to use that library for the Home Assistant integration.
Are there any other users of Home Assistant here?
I'm thinking i should mimic the Tesla integration as far as possible but if anyone else has any ideas i'd be interested to hear them!
Even a CLI derived from your works would already be an asset.
 

cjne

Active Member
First Name
Johan
Joined
Sep 22, 2020
Messages
36
Reaction score
46
Location
Sweden
Vehicles
Taycan Turbo S 2021, Tesla Model S P100D 2019
Country flag
Even a CLI derived from your works would already be an asset.
Creating a CLI using the python library would be very easy, i can include some examples.
Anything in particular you would like to see/do with a CLI?
 

Oink

Well-Known Member
Joined
Sep 8, 2020
Messages
114
Reaction score
72
Location
Norway
Vehicles
Audi A4, Taycan 4S+
Country flag
The login and oauth key would be a good start. At least for me. Only part that has stumped me.
 

cjne

Active Member
First Name
Johan
Joined
Sep 22, 2020
Messages
36
Reaction score
46
Location
Sweden
Vehicles
Taycan Turbo S 2021, Tesla Model S P100D 2019
Country flag
Thank you kindly!
You're welcome :)
I've now added some documentation for making custom requests (to request any endpoint in the API), it should be possible to access most things using this method.
 

Oink

Well-Known Member
Joined
Sep 8, 2020
Messages
114
Reaction score
72
Location
Norway
Vehicles
Audi A4, Taycan 4S+
Country flag
You're welcome :)
I've now added some documentation for making custom requests (to request any endpoint in the API), it should be possible to access most things using this method.
Just converted your code to PHP for fun. Works great! Will see if I can't get it converted to Kotlin for Android this weekend. Sadly no mac anymore so no Xcode. Guess I'll have to use my old Samsung for funsies.

1611887908551.png

1611890810526.png


Magic mirror next mayhaps? I mean, the API serves you correct images for your vehicle so it could look quite snazzy with some animations and be able to set heating while brushing your teeth f.ex.

Ah, possibilities.
 
Last edited:
OP
AMERCY

AMERCY

Well-Known Member
First Name
Christof
Joined
Oct 30, 2020
Messages
55
Reaction score
51
Location
Germany, Stuttgart region
Vehicles
Macan '19 (Crayon), Taycan 4S+ '21 (Black)
Country flag
  • Thread starter
  • Thread Starter
  • #44
I've published a very basic version of a client library for Python, it can just list cars for your account at the moment but it has the auth part. So from here it's very easy to add stuff.
https://github.com/cjne/pyporscheconnectapi
Looked at the code. Not too trivial, really. You are not doing this the first time. Kudos.

tack
 

jmi91

Active Member
First Name
Jean-Marc
Joined
Jul 10, 2020
Messages
28
Reaction score
14
Location
France
Vehicles
Audi RS5 Convertible, Porsche Taycan Turbo S
Country flag
Just converted your code to PHP for fun. Works great! Will see if I can't get it converted to Kotlin for Android this weekend. Sadly no mac anymore so no Xcode. Guess I'll have to use my old Samsung for funsies.
Hi Oink, can you share your php code please ?
Thank you for your work !
 
Last edited:

Advertisement





 
ZYRUS


Advertisement
Top