CJNE / ha-porscheconnect

Porsche Connect custom component for Home Assistant
MIT License
29 stars 12 forks source link

Does not work for Panamera 21 old PCM #135

Closed szymonzys closed 4 months ago

szymonzys commented 1 year ago

Version of the custom_component

Version 0.0.10

Configuration

Logs are as follows:

Logger: custom_components.porscheconnect
Source: custom_components/porscheconnect/__init__.py:100
Integration: Porsche Connect ([documentation](https://github.com/CJNE/ha-porscheconnect), [issues](https://github.com/CJNE/ha-porscheconnect/issues))
First occurred: 12:02:32 PM (1 occurrences)
Last logged: 12:02:32 PM

User is not granted access to vehicle VIN XXXXXXXXXXXXXXXXX, reason

Describe the bug

Integration does not create any entities in HA, error in the log.

Debug log

When I run CLI from python I noticed that carControlData entry is missing the data map.

data = await conn.get(f"https://api.porsche.com/core/api/v3/se/sv_SE/vehicles/{vehicle['vin']}")
print(f"Battery at {data['carControlData']['batteryLevel']['value']}%")
CJNE commented 1 year ago

The integration will check that the logged in user is allowed to access the API before it sets up any entities and starts fetching data. It does this by calling the isAllowed method in the client library.

It first check that your user is active and has the role status "enabled", it then checks that the returned data from the api profile endpoint contains the 'pcc' and 'confirmed' keys for your VIN.

What does the CLI command "permissions" output?

fredriklj commented 4 months ago

We're back to square one. See #242.