Taycan Client Software Development

AMERCY

Well-Known Member
First Name
Christof
Joined
Oct 30, 2020
Threads
7
Messages
86
Reaction score
100
Location
Germany, Stuttgart region
Vehicles
Macan '19 (Crayon), Taycan 4S+ '21 (Black)
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.
Sponsored

 

Dave T

Well-Known Member
Joined
Jan 14, 2020
Threads
75
Messages
728
Reaction score
367
Location
Boston
Vehicles
2020 Taycan Turbo
Country flag
Sounds cool, but what do you think you’d be able to do that isn’t already provided by the stanky Porsche connect app?
 

tigerbalm

Well-Known Member
First Name
Damien
Joined
Oct 11, 2020
Threads
77
Messages
2,773
Reaction score
6,196
Location
Ireland
Vehicles
Taycan Turbo S, Fiat 500 EV
Country flag
I have a good bit of the RESTful API used by the apps reverse engineered (by using the app with a man-in-the-middle reverse proxy to capture the requests/responses).

What I can say is that the responses returned by the Porsche endpoints are very detailed – they return over 100 parameters about the state of the car – from battery state of charge, current speed, location, ride height, etc.

I am using it to build a custom interface while I am driving that feeds real-time data into ABRP (thank you guys there for giving me api access).

I'll be sharing my work if I can get my lawyers to sign off me reverse engineering it. I think I'll probably be okay – but I value my customer relationship with Porsche and don't want to sour it.

Similar efforts have been done successfully with Tesla – and an ecosystem is building up around it. It would be in Porsche's interest to allow it.

FWIW, their APIs are comprehensive. Not super pretty in some cases, but they were never made for public consumption so that is understandable.
 
Last edited:

tigerbalm

Well-Known Member
First Name
Damien
Joined
Oct 11, 2020
Threads
77
Messages
2,773
Reaction score
6,196
Location
Ireland
Vehicles
Taycan Turbo S, Fiat 500 EV
Country flag
A big challenge but might be Authorization/Authentification then...
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.
 
Last edited:


Oink

Well-Known Member
Joined
Sep 8, 2020
Threads
11
Messages
379
Reaction score
268
Location
Norway
Vehicles
Taycan 4S+, M3P
Country flag
Decompile the latest android APK and you'll find enough to get your authentication along with various other software API secrets and keys.
 

tigerbalm

Well-Known Member
First Name
Damien
Joined
Oct 11, 2020
Threads
77
Messages
2,773
Reaction score
6,196
Location
Ireland
Vehicles
Taycan Turbo S, Fiat 500 EV
Country flag
Sounds cool, but what do you think you’d be able to do that isn’t already provided by the stanky Porsche connect app?
I use data like this:

{"property":[{"key":"D_CHARGING_LEVL","value":"41","updateDate":"2020-11-05T14:37:04"},{"key":"D_CHARGING_PLUG","value":"NOT_CONNECTED","updateDate":"2020-11-05T14:37:04"},{"key":"D_CHARGING_STAT","value":"STANDBY","updateDate":"2020-11-05T14:37:04"},{"key":"D_EXT_AC_VOLTAG","value":"0","updateDate":"2020-11-05T14:37:04"},{"key":"D_REM_CHARG_TIM","value":"0","updateDate":"2020-11-05T14:37:04"},{"key":"D_CHARGING_MODE","value":"MANUAL","updateDate":"2020-11-05T14:37:04"},{"key":"D_CHARGING_TYPE","value":"NONE","updateDate":"2020-11-05T14:37:04"},{"key":"D_CHARGING_NEXT","value":"0","updateDate":"2020-11-05T14:37:04"},{"key":"D_EXT_AC_VOLTAG","value":"0","updateDate":"2020-11-05T14:37:04"},{"key":"D_REM_DISTANCE","value":"175.0","updateDate":"2020-11-05T14:37:04","unit":"KM"},{"key":"D_REM_EV_DIST","value":"12.0","updateDate":"2020-11-05T14:37:04","unit":"KM"},{"key":"D_FUEL_PERCENTG","value":"29","updateDate":"2020-11-05T14:37:04"},{"key":"C_SPECIAL_MODE","value":"GARAGE=N|TRANSPORT=N|FORCED_UNSET=N","updateDate":"2020-11-02T15:54:48"},{"key":"S_GROUP3_DATE","value":"2020-11-05T14:37:04","updateDate":"2020-11-05T14:37:05"},{"key":"S_THEFT","updateDate":"2020-07-12T19:36:57"},{"key":"D_VEHICLE_INFO","value":{"BUS_ON":"ON","ENGINE_ON":"ON","KEY_INSERTED":"ON","PASSENGER_PRESENT":"ON"},"updateDate":"2020-11-05T14:37:04"},{"key":"D_AIR_COND_STAT","value":"OFF","updateDate":"2020-11-05T14:37:04"},{"key":"D_VEHICLE_TIME","value":"2020-11-05T14:37:01","updateDate":"2020-11-05T14:37:04"},{"key":"PROFILE1_LABEL"},{"key":"PROFILE2_LABEL"},{"key":"PROFILE3_LABEL"},{"key":"C_CHARG_TS1_ON","value":"23:00","updateDate":"2020-11-02T13:59:14"},{"key":"C_CHARG_TS1_OFF","value":"23:00","updateDate":"2020-11-02T13:59:14"},{"key":"C_CHARG_TS2_ON","value":"23:00","updateDate":"2020-11-02T13:59:14"},{"key":"C_CHARG_TS2_OFF","value":"23:00","updateDate":"2020-11-02T13:59:14"},{"key":"C_CHARG_TS3_ON","value":"23:00","updateDate":"2020-11-02T13:59:14"},{"key":"C_CHARG_TS3_OFF","value":"23:00","updateDate":"2020-11-02T13:59:14"},{"key":"C_TIMER1_SCHEDU","value":{"FRIDAY":"ON","MONDAY":"ON","SATURDAY":"ON","SUNDAY":"ON","THURSDAY":"ON","TUESDAY":"ON","WEDNESDAY":"ON"},"updateDate":"2020-11-02T13:59:14"},{"key":"C_TIMER1_TIME","value":"2000-01-01T05:00:00","updateDate":"2020-11-02T13:59:14"},{"key":"C_TIMER2_SCHEDU","value":{"SINGLE":"ON"},"updateDate":"2020-11-02T13:59:14"},{"key":"C_TIMER2_TIME","value":"2017-01-01T12:00:00","updateDate":"2020-11-02T13:59:14"},{"key":"C_TIMER3_SCHEDU","value":{"SINGLE":"ON"},"updateDate":"2020-11-02T13:59:14"},{"key":"C_TIMER3_TIME","value":"2017-01-01T12:00:00","updateDate":"2020-11-02T13:59:14"},{"key":"C_TIMER1_CHG_TS","value":"1","updateDate":"2020-11-02T13:59:14"},{"key":"C_TIMER2_CHG_TS","value":"2","updateDate":"2020-11-02T13:59:14"},{"key":"C_TIMER3_CHG_TS","value":"3","updateDate":"2020-11-02T13:59:14"},{"key":"D_CHARGING_NEXT","value":"0","updateDate":"2020-11-05T14:37:04"},{"key":"D_VEHICLE_TIME","value":"2020-11-05T14:37:01","updateDate":"2020-11-05T14:37:04"},{"key":"D_VEHICLE_UNITS","value":"DISTANCE=KM|SPEED=KM/H|CONSUMPTION=L/100KM|VOLUME=LITER|DATE=DMY|PRESSURE=BAR|TIME=24H|EV_CONSUMPTION=KWH/100KM","updateDate":"2020-11-05T14:37:04"},{"key":"GPSLatitude","value":"+53.39288","updateDate":"2020-11-05T14:36:59"},{"key":"GPSLongitude","value":"-006.39376","updateDate":"2020-11-05T14:36:59"},{"key":"GPSSpeed","value":"6.84","updateDate":"2020-11-05T14:36:59"},{"key":"GPSDirection","value":"314","updateDate":"2020-11-05T14:36:59"},{"key":"D_GPS_DATE","value":"2020-11-05T14:36:59","updateDate":"2020-11-05T14:37:05"}]

to poll for my current charging status and log this to a Google Doc Sheet. I do this from a server, not my app. So basically I can charge away as normal and all my charging data is pored into a spreadsheet.

I like doing things like this. Doing things like this after all is what allowed me to afford Porsche's :)
 

tigerbalm

Well-Known Member
First Name
Damien
Joined
Oct 11, 2020
Threads
77
Messages
2,773
Reaction score
6,196
Location
Ireland
Vehicles
Taycan Turbo S, Fiat 500 EV
Country flag
I used the passenger occupancy data of my Panamera (measuring how often seats were actually sat on) to determine my Taycan config more objectively.

There is so much one can do with apis and data!
 


Oink

Well-Known Member
Joined
Sep 8, 2020
Threads
11
Messages
379
Reaction score
268
Location
Norway
Vehicles
Taycan 4S+, M3P
Country flag
I hope what you're used to making isn't as bloated as the Connect app. So many "return null" from getters. I assume some dev got the call to just finish the app and took the easy way out on a lot of things.

/r/programminghorror
 

Jancha

Well-Known Member
First Name
Janis
Joined
Oct 1, 2020
Threads
12
Messages
183
Reaction score
203
Location
Latvia
Vehicles
911 Cabrio (ex Taycan 4s+)
Country flag
Th
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.
this looks fantastic :)
Will give it spin in a free moment
 

rs38

Well-Known Member
Joined
Nov 16, 2020
Threads
19
Messages
621
Reaction score
651
Location
west germany
Vehicles
taycan,gt2,i8
Country flag
Decompile the latest android APK and you'll find enough to get your authentication along with various other software API secrets and keys.
not necessary!

the plain web interface from https://connect-portal.porsche.com/core/de/de_DE/home/WP0ZZZ....
is already quite rich, there is nothing I'm missing what is included in the App. Very easy to check with every browser by hitting "F12".

if you need a starting point in code, search github and you will cross some more contributions e.g. Updates to Porsche Vehicle API by DerAndereAndi · Pull Request #512 · andig/evcc · GitHub
 

rs38

Well-Known Member
Joined
Nov 16, 2020
Threads
19
Messages
621
Reaction score
651
Location
west germany
Vehicles
taycan,gt2,i8
Country flag
what I really miss much more is some diagnostics software (via OBD). Durametic is too old, VCDS and OBD11 are supporting nearly any VAG brand from Bentley to Lamborghini, but nearly nothing from Porsche even if some ECU Data from latest Cayenne Battery would behave very similar to the Taycan's. PIWIS3 seems some dark mystery, but this will somehow contain the missing ASAM definition data.
If someone knows a bit more or even a solution, please share!
 
OP
OP
AMERCY

AMERCY

Well-Known Member
First Name
Christof
Joined
Oct 30, 2020
Threads
7
Messages
86
Reaction score
100
Location
Germany, Stuttgart region
Vehicles
Macan '19 (Crayon), Taycan 4S+ '21 (Black)
Country flag
what I really miss much more is some diagnostics software (via OBD). Durametic is too old, VCDS and OBD11 are supporting nearly any VAG brand from Bentley to Lamborghini, but nearly nothing from Porsche even if some ECU Data from latest Cayenne Battery would behave very similar to the Taycan's. PIWIS3 seems some dark mystery, but this will somehow contain the missing ASAM definition data.
If someone knows a bit more or even a solution, please share!
One thing does not exclude the other. The Taycan is rich on "Interfaces", like
* obd (as you mentioned)
* usb-c (can we attach an hub - and then a mouse - can we "see" from a Latop into the head unit.. - partially mentioned in this forum soewhere already)
* on-board wifi ("fing")
* HomeLink
* the communication path from Porsche Server into the car (LTE or so, surely the car has an IP address)
* Bluetooth
* plug & charge (ISO 15118)
* car key (added later)
* mobile charger connect (added later)
* .. and may be others
All of which are interesting on their own.

Would be nice to have an Alexa Skill for the Taycan.
"Taycan, I want to leave in 30min" would start the pre-heating/cooling, or so (like "Hey Porsche").
More easy to implement than a app/web UI - as the complexity of implementing a GUI is being taken out, and REST based samples exist (AFAIK).
 
Last edited:

Jancha

Well-Known Member
First Name
Janis
Joined
Oct 1, 2020
Threads
12
Messages
183
Reaction score
203
Location
Latvia
Vehicles
911 Cabrio (ex Taycan 4s+)
Country flag
So, a quick tutorial:

1) go to https://connect-portal.porsche.com/
2) login
3) navigate to e-mobility page (for instance)
4) open console (right click inspect element)
5) go to network tab and enable logging
6) refresh page
7) Find Api key and Bearer headers.

Create a simple porsche.php:

PHP:
<?php


$vin = "VIN of your car";
$apikey = "apikey";
$bearer = "bearer";

$url = "https://api.porsche.com/service-vehicle/de/de_DE/e-mobility/J1/$vin?timezone=Europe%2FRiga";
$headers = [
    "apikey: $apikey",
    "Authorization: Bearer $bearer"
];
$s = curl_init();
curl_setopt($s,CURLOPT_URL,$url);
curl_setopt($s,CURLOPT_HTTPHEADER,$headers);
curl_setopt($s,CURLOPT_RETURNTRANSFER,true);
curl_setopt($s,CURLOPT_FOLLOWLOCATION,true);
curl_setopt($s,CURLOPT_HEADER,true);

$out = curl_exec($s);
$info = curl_getinfo($s,CURLINFO_HTTP_CODE);
curl_close($s);


var_dump($out);
var_dump($info);
And execute it:

php -q porsche.php

And you have your direct access to the data ;) Of course use other apis to for get/put to do more magic.

Porsche Taycan Taycan Client Software Development Screenshot 2021-01-21 at 11.04.16
 

ccooke01

Well-Known Member
First Name
Carl
Joined
Oct 27, 2020
Threads
7
Messages
70
Reaction score
54
Location
UK
Vehicles
Taycan 4S and ID.4
Country flag
Looking at the API's available I see a few related to charging, make me wonder if its possible to create a simple scheduling app that would allow you to define the charging period and the max charge on a single screen, rather than having to have a profile and a timer.
Sponsored

 
 




Top