Porsche Connect

After a few searches I wasn’t able to come up with anything so figured I’d ask here.

Anyone seen a Home Assistant integration with ‘Porsche Connect’?

Thanks!

Not yet… but I am very interested ! :wink:

1 Like

Me too :stuck_out_tongue_winking_eye:

I’m working on one right now if anyone is interested, i haven’t published the actual integration yet, still some work to do. But the python library along with a basic CLI can be found here:

1 Like

Any progress on your integration? My BMW was nicely integrated as was my Tesla, but now I’ve got a 2021 Cayenne and I’m really missing having access to my car from my dashboard.

It’s been a little slow lately, but I aim to give it som more time soon. The client library for it is pretty much done so it’s just a matter of doing the integration sensors and switches. Currently away on vacation, will take a look when I get home :slight_smile:

1 Like

Hi Johan,

I hope you had a good vacation and have a lot of new energy to finish this ;-). My Taycan is arriving in January of 2022 and I would love to add it to my Smart Home through HA as my Tesla currently is.

Congrats to the Taycan, it’s a really nice car :slight_smile:
There has been some progress to it, another integration needed to be done in between but i’m almost done with that one and will get back to this.

2 Likes

Hi Johan! Appreciate your efforts on this!

You seem to really know your stuff in this area so I was wondering if you had any knowledge of how to go about creating an integration for Lexus, or even just how to access the API for the Lexus app. I’ve never attempted to build anything from scratch but it seems like a good learning experience if I had the right tools and knew who to talk to.

Is this via the regular ‘Porsche Connect’ subscription service? If you need a tester I’ve got a 958 GTS with an active subscription.

And to follow up on this, I got the cli installed and a ‘list’ command brought back my vehicle info. Nice!

These commands work, in that they return valid data:

list, summary and capabilities.

When I query a “cli position --vin XXXXXX” (with the correct VIN, obviously) I gives me back the error:

{
“pcckErrorKey”: null,
“pcckErrorMessage”: “Gray services are not offered for this vehicle.”,
“pcckErrorCode”: null,
“pcckIsBusinessError”: true
}

I believe I’ve got full subscription services paid up for this, am I missing something?

The same ‘gray services’ error also happens with triplongterm, tripshortterm, speedalerts and theftalerts.

I have seen ‘theft alerts’ in the android app (alarm set off by someone still in the vehicle). So there is data “online” for that. I don’t have any speed or geo boundaries set for it.

Capabilities is odd in that seat heating is present in the vehicle, both front and rear. But I suspect this has more to do with not being able to de/activate them remotely. Also it returns engineType and carModel as “UNKNOWN”

$ ./cli.py --vin WP1XXXXX capabilities
{
“displayParkingBrake”: true,
“needsSPIN”: false,
“hasRDK”: true,
“engineType”: “UNKNOWN”,
“carModel”: “UNKNOWN”,
“onlineRemoteUpdateStatus”: null,
“heatingCapabilities”: {
“frontSeatHeatingAvailable”: false,
“rearSeatHeatingAvailable”: false
},
“steeringWheelPosition”: “LEFT”,
“hasHonkAndFlash”: false
}

Where would I have set a PIN code? If I try lock/unlock it prompts me for one. Trying something random throws this error:

$ ./cli.py --vin WPXXXXX unlock
PIN code:
Traceback (most recent call last):
File “./cli.py”, line 4, in
cli()
File “/home/wkearney/projects/porsche/pyporscheconnectapi/pyporscheconnectapi/cli.py”, line 125, in cli
loop.run_until_complete(main(args))
File “/usr/lib/python3.8/asyncio/base_events.py”, line 616, in run_until_complete
return future.result()
File “/home/wkearney/projects/porsche/pyporscheconnectapi/pyporscheconnectapi/cli.py”, line 91, in main
data = await client.unlock(vin, pin, waitForConfirmation = not args.nowait)
File “/home/wkearney/projects/porsche/pyporscheconnectapi/pyporscheconnectapi/client.py”, line 168, in unlock
return await self._lockUnlock(vin, pin, ‘unlock’, waitForConfirmation=waitForConfirmation)
File “/home/wkearney/projects/porsche/pyporscheconnectapi/pyporscheconnectapi/client.py”, line 34, in _lockUnlock
result = await self._spinner(f"https://api.porsche.com/service-vehicle/remote-lock-unlock/{vin}/{progressResult[‘requestId’]}/status")
KeyError: ‘requestId’
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f4c676f7220>
ERROR:asyncio:Unclosed connector
connections: [’[(<aiohttp.client_proto.ResponseHandler object at 0x7f4c67715a60>, 7499699.935139161)]’]
connector: <aiohttp.connector.TCPConnector object at 0x7f4c676f7280>

overview throws this error:

$ cli.py --vin WP1XXXX overview
Traceback (most recent call last):
File “./cli.py”, line 4, in
cli()
File “/home/wkearney/projects/porsche/pyporscheconnectapi/pyporscheconnectapi/cli.py”, line 125, in cli
loop.run_until_complete(main(args))
File “/usr/lib/python3.8/asyncio/base_events.py”, line 616, in run_until_complete
return future.result()
File “/home/wkearney/projects/porsche/pyporscheconnectapi/pyporscheconnectapi/cli.py”, line 57, in main
data = await client.getCurrentOverview(vin)
File “/home/wkearney/projects/porsche/pyporscheconnectapi/pyporscheconnectapi/client.py”, line 192, in getCurrentOverview
spinnerResult = await self._spinner(f"https://api.porsche.com/service-vehicle/se/sv_SE/vehicle-data/{vin}/current/request/{progressResult[‘requestId’]}/status")
KeyError: ‘requestId’
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f4612ff3190>
ERROR:asyncio:Unclosed connector
connections: [’[(<aiohttp.client_proto.ResponseHandler object at 0x7f461300aa60>, 7499233.125293788)]’]
connector: <aiohttp.connector.TCPConnector object at 0x7f4612ff31f0>

emobility errors out with:

{
“pcckErrorKey”: “GRAY_SLICE_ERROR_UNKNOWN_MSG”,
“pcckErrorMessage”: null,
“pcckErrorCode”: null,
“pcckIsBusinessError”: true
}

Likewise climate-on and climate-off also throw an error. But I don’t believe the non-EV variants can even DO remote climate controlling (it doesn’t show up as an option in the Porsche android app). Same with directcharge-on and directcharge-off.

1 Like

Thanks!
Yes the intention is to make this work for any Porsche with a “Porche Connect” subscription.
I have only been able to test this myself with a Porsche Taycan, so help testing other models is very appreciated.

For the unsupported commands, perhaps those capabilites are not supported by your model?
Or perhaps it’s using some different API endpoint. Anything that works in the Porsche Connect Web UI and/or app should be possible to do here as well.

I see that you have opened an issue in the Github repo, that’s great, let’s continue there :slight_smile:

1 Like

Hey,

I have just installed the custom component in HA. Fisrt impression is really good, it took all the info about my Cayenne e-hybrid (2018 model). I got 1 device (the Cayenne), 12 entities and 2 controls (Direct charge and Direct Climatisation). Everything looks pretty good.

I will report anything I find along the way. Any questions please reach out to me. I can help on the testing of my model.

Great job and great thanks

1 Like

(and for those following, the github issues section is over here: Issues · CJNE/pyporscheconnectapi · GitHub )

1 Like

I have updated the README for my integration with information on supported models.
It turns out that some models have support for a system called Porsche Car Connect instead of Porsche Connect, my integration (or library) currently have no support for Porsche Car Connect.

This library will let you access your car equipped with Porsche Connect. It does not work with the predecessor Porsche Car Connect.
Porsche Connect is available for the following Porsche models:

  • Taycan
  • 911 (from 992)
  • Cayenne (from 2017, E3)
  • Panamera (from 2021, G2 PA)

You can also take a look here, select your model and see if it has Porsche Connect:
https://connect-store.porsche.com/

A Porsche Connect subscription also needs to be active for it to work.

1 Like

IIRC, the E3 Cayenne didn’t start delivering until the 2018 model year.

I say this because I have a 2017 model year Cayenne, E2.

I hope to get some http proxying rigged up and try to debug what ‘Car Connect’ is using.

1 Like

Interestingly, Porsche just sent out an e-mail informing me that due to AT&T discontinuing 3G services there will be a free replacement made of the Connect services module in my GTS.

Wonder if it will impact the service API the device uses? We’ll see, come January, I guess.