Porsche Connect

Sorry, I missed to say you need to do the addition of the repository in HACS as the instruction says.

HACS Installation

  1. Add this repository to “Custom repositories”
  2. Add and search for porscheconnect in HACS
  3. Install

No need to go to the SSH nor use the CLI. The HA custom component and integration package for you what the CLI code does.

Oh man, I totally missed that. It was this project that spurred me into looking into this and just now getting to understand the different names/references to the installation types. Thank you for that.

1 Like

In case someone is using older versions of this integration, please update to the latest version (0.0.4).
Older version might behave in a way that can look suspicious in the Porsche backend systems and we should try to avoid that if at all possible :slight_smile:

Sounds promising, I don’t know if this means it will move to Porsche Connect, let’s hope this is the case then :slight_smile:

To save a few people a step, the integration is at the following URL:

Previously in this thread the repo for the API was mentioned, but this took a few extra clicks to find. This is what has to be added as a custom repo in HACS.

1 Like

Can’t get this to work. Not manually and not through HACS. What I did notice is that the file api.py is NOT in the github repository…

Could that be the issue ?

You state it is only a few clicks away yet I cannot find it :wink:

Any suggestions ?

It works… Me happy!

I just installed this today, worked flawlessly, thanks for the great work on this. Wanted to share this Taycan card, which borrows on the Tesla card (but slightly less complex):

Here’s the YAML for the card:

    - type: vertical-stack
      cards:
          card:
            type: custom:stack-in-card
            cards:
              - type: picture-elements
                elements:
                  - type: state-label
                    entity: sensor.taycan_4s_range_sensor
                    style:
                      top: 70%
                      left: 1%
                      transform: none
                  - type: state-label
                    entity: sensor.taycan_4s_battery_sensor
                    style:
                      top: 70%
                      left: 88%
                      transform: none
                  - type: conditional
                    conditions:
                      - entity: device_tracker.taycan_4s
                        state: not_home
                    elements:
                      - type: state-icon
                        entity: device_tracker.taycan_4s
                        icon: mdi:home-export-outline
                        style:
                          top: 1%
                          left: 91%
                          transform: none
                  - type: conditional
                    conditions:
                      - entity: device_tracker.taycan_4s
                        state: home
                    elements:
                      - type: state-icon
                        entity: device_tracker.taycan_4s
                        icon: mdi:home
                        style:
                          top: 1%
                          left: 91%
                          transform: none
                  - type: conditional
                    conditions:
                      - entity: lock.taycan_4s_door_lock
                        state: unlocked
                    elements:
                      - type: state-icon
                        entity: lock.taycan_4s_door_lock
                        icon: mdi:shield-lock-open
                        style:
                          top: 1%
                          left: 1%
                          transform: none
                  - type: conditional
                    conditions:
                      - entity: lock.taycan_4s_door_lock
                        state: locked
                    elements:
                      - type: state-icon
                        entity: lock.taycan_4s_door_lock
                        icon: mdi:shield-lock
                        style:
                          top: 1%
                          left: 1%
                          transform: none
                image: /local/pics/taycan_pic.png
              - type: custom:bar-card
                entities:
                  - entity: sensor.taycan_4s_battery_sensor
                columns: '0'
                entity_row: true
                positions:
                  icon: 'off'
                  indicator: 'off'
                  name: 'off'
                  minmax: 'off'
                  value: 'off'
                color: '#03fd73'
                severity:
                  - from: '0'
                    to: '19'
                    color: '#db1414'
                  - from: '20'
                    to: '25'
                    color: '#fcca03'
                  - from: '80'
                    to: '100'
                    color: '#54cfff'
                height: 5px    

Just tried using it and the logs report:

user.log:Oct 24 08:01:42 ha-supervised afeb6a4abdb3[1128505]: #033[33m2022-10-24 08:01:42.305 WARNING (MainThread) [custom_components.porscheconnect] User is not granted access to vehicle VIN WP1AD2XXXXXX, reason #033[0m

So it was able to connect, found my VIN… but then says not granted access? What’s necessary for this? I have active subscriptions for Remote, Safety and Security services.

Hi SDC, my Taycan integration was working fine for many months. I have now upgraded to the new PCM (the one with the coloured icons) and now it does not work anymore. Do you have the PCM with the coulred icons ?

Thx, Midget

Oh no - good to know! Was going to do the upgrade in the next few weeks, i’m still on the old PCM…

How do you like the new PCM?

New PCM is great with additional functionality, especially for Taycan: option to select hyper fast chargers only in your navigation.

Am I the only person who is experiencing issues as a result of the update ? Integration no longer works…

Just got the PCM 6 upgrade, car is back and it looks like the integration is still functional. Dealer had the car in “private mode” while doing the work, which broke the integration, once they set it back out of private mode everything shows up as it previously did, maybe check that.

I have “private mode” unchecked so that is not the issue.
I still get the follow error in the log;

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 225, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/porscheconnect/__init__.py", line 175, in _async_update_data
    vin = vehicle["vin"]
TypeError: string indices must be integers

What Model Year is your Taycan? Confirming works well on MY2020.

MY22, everything worked fine untill I had the ‘WNK1’ update installed. Ever since I am getting the message: ‘TypeError: string indices must be integers’.

@ wkearney99

I’m getting this same error message in the logs since installing the integration a couple of weeks ago. Did you or anyone else figure this out?

Anyone found a reliable way of getting notified when you forget to lock car (easily done moving from Tesla) I have tried “if android Auto goes to off”, also tried “if parking brake off”, but i often get out without applying parking brake. Both sometimes works but a little too unreliable. Any other ideas sppreciated.

The integration worked perfectly for about 1 hour, but then all entities became “unavailabe”. It seems that my credentials are wrong, but they are correct and it worked for an hour…

I can still log in to porsche.de, but I mentioned that I sometimes have to enter a captcha.

This is the error log from homeassistant:

Logger: homeassistant.config_entries
Source: custom_components/porscheconnect/__init__.py:94
Integration: Porsche Connect (documentation, issues)
First occurred: 10:50:58 (2 occurrences)
Last logged: 12:10:16

Error setting up entry mxxxxxxxx.de for porscheconnect
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 388, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/porscheconnect/__init__.py", line 94, in async_setup_entry
    access_tokens = await controller.getAllTokens()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyporscheconnectapi/client.py", line 32, in getAllTokens
    return await self._connection.getAllTokens()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyporscheconnectapi/connection.py", line 195, in getAllTokens
    token = await self._requestToken(application)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyporscheconnectapi/connection.py", line 202, in _requestToken
    await self._login()
  File "/usr/local/lib/python3.11/site-packages/pyporscheconnectapi/connection.py", line 149, in _login
    raise WrongCredentials(message['message'])
                           ~~~~~~~^^^^^^^^^^^
KeyError: 'message'