Giter Site home page Giter Site logo

ha-porscheconnect's Introduction

Porsche Connect

GitHub Release GitHub Activity License

pre-commit Black

hacs Project Maintenance BuyMeCoffee

Discord Community Forum

This custom component for home assistant will let you connect your Porsche Connect enabled car to Home Assistant. It does not work with Porsche Car Connect. Porsche Connect is available for the following Porsche models:

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

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

A Porsche Connect subscription also needs to be active.

It is currently in an early stage, more info will be added as the project develops. Feature requests and ideas are welcome, use the issue tracker for that, thanks!

This component will set up the following platforms.

Platform Description
binary_sensor Show something True or False.
sensor Show info from Porsche Connect API.
switch Switch something True or False.
device_tracker Show your vehicles location

HACS Installation

  1. Search for porscheconnect in HACS
  2. Install

Manual Installation

  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called porscheconnect.
  4. Download all the files from the custom_components/porscheconnect/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.
  6. Restart Home Assistant
  7. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Porsche Connect"

Using your HA configuration directory (folder) as a starting point you should now also have this:

custom_components/porscheconnect/translations/en.json
custom_components/porscheconnect/translations/fr.json
custom_components/porscheconnect/translations/nb.json
custom_components/porscheconnect/translations/sensor.en.json
custom_components/porscheconnect/translations/sensor.fr.json
custom_components/porscheconnect/translations/sensor.nb.json
custom_components/porscheconnect/translations/sensor.nb.json
custom_components/porscheconnect/__init__.py
custom_components/porscheconnect/api.py
custom_components/porscheconnect/binary_sensor.py
custom_components/porscheconnect/config_flow.py
custom_components/porscheconnect/const.py
custom_components/porscheconnect/manifest.json
custom_components/porscheconnect/sensor.py
custom_components/porscheconnect/switch.py

Configuration is done in the UI

Contributions are welcome!

If you want to contribute to this please read the Contribution guidelines

Credits

This project was generated from @oncleben31's Home Assistant Custom Component Cookiecutter template.

Code template was mainly taken from @Ludeeus's integration_blueprint template


ha-porscheconnect's People

Contributors

cjne avatar dependabot[bot] avatar dipeshc avatar fredriklj avatar jobvk avatar josiasmontag avatar wrt54g avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ha-porscheconnect's Issues

NoneType error

0.0.12

Configuration

Add your logs here.

Description

a nonetype error has consistently prevented operation for a few weeks now. Same error, causes all sensors to be unavailable. Tried uninstalling and reinstalling.

debug Logs


Logger: custom_components.porscheconnect
Source: custom_components/porscheconnect/__init__.py:194 
Integration: Porsche Connect ([documentation](https://github.com/CJNE/ha-porscheconnect), [issues](https://github.com/CJNE/ha-porscheconnect/issues)) 
First occurred: 12:00:48 (8 occurrences) 
Last logged: 12:02:39

Unexpected error fetching porscheconnect data: 'NoneType' object has no attribute 'get'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 250, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/porscheconnect/__init__.py", line 194, in _async_update_data
    permission_for_vin = await self.controller.isAllowed(vin)
  File "/usr/local/lib/python3.10/site-packages/pyporscheconnectapi/client.py", line 430, in isAllowed
    reason = service_status.get(
AttributeError: 'NoneType' object has no attribute 'get'

Taycan EV Charging Power

Hi, it's possible to add a KW indicatort entity to know , while charging, power incoming from WallBox ?
Now is only possible to se if are/not charging.
Thanks

Integration does no longer work after PCM upgrade - can be Closed

After the upgrade to PCM 6 (the 'colored icons' update) the integration is no longer working.

Error message:

Logger: custom_components.porscheconnect
Source: custom_components/porscheconnect/init.py:175
Integration: Porsche Connect (documentation, issues)
First occurred: 20:01:37 (13 occurrences)
Last logged: 20:14:07

Unexpected error fetching porscheconnect data: string indices must be integers
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, 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

updated to HA2024.2.1 now connect error...

Hello. Been working fine, updated to HA2024.2.1 and will now not connect. Connect app working fine and login details checked.. Any advice on how to resolve please. Version .18 of component. Thx

Captcha Required

This morning HA wasn't showing any information from my Taycan.

On checking the log I could see

_File "/usr/local/lib/python3.11/site-packages/pyporscheconnectapi/connection.py", line 175, in login
raise CaptchaRequired("Captcha required")
pyporscheconnectapi.exceptions.CaptchaRequired

I manage to solved this by login into the website on my browser three times. On the third time the capture wasn't required.
ha-porcheconnect then started working.

I suspect Porsche's servers are trusting requests when they see the come from an IP address that has already been through the capture process.

I use IPv4 which is NAT'ed, so my laptop and HA have the same external address. I also use IPv6 which might defeat this.
Does anyone have any contacts at Porsche we could ask if we could registered our HA external addresses as being trusted?

Tom

Real Time Location Updates

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

I am trying to setup automation so when I arrive home with my Taycan, it opens my garage door. Unfortunately, there is roughly a 10 minute delay with this plug-in for status updates.

Describe the solution you'd like
A clear and concise description of what you want to happen.

When my Taycan is marked "Home", I am able to run Home Assistant actions.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

string indices must be integers (vin = vehicle["vin"])

Version of the custom_component

V0.0.9

Configuration

There are not config parameters

Describe the bug

Integration has stopped working and the below log shows a problem in the code probably due to a change of Porsche in their API

Debug log

2022-09-14 21:37:22.220 ERROR (MainThread) [custom_components.porscheconnect] Unexpected error fetching porscheconnect data: string indices must be integers Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, 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

Error Finished fetching porscheconnect data in 2.286 seconds (success: False)

Version of the custom_component

0.0.16

Configuration

Describe the bug

Integration suddenly stop working during the weekend 30/09 - 01/10 and remains unsable.

Debug log

2023-10-02 18:04:26.336 DEBUG (MainThread) [custom_components.porscheconnect] Saving tokens
2023-10-02 18:04:26.336 DEBUG (MainThread) [custom_components.porscheconnect] Init new data update coordinator
2023-10-02 18:04:26.337 DEBUG (MainThread) [custom_components.porscheconnect] <homeassistant.config_entries.ConfigEntry object at 0xffff7d3c8380>
2023-10-02 18:04:26.830 INFO (MainThread) [custom_components.porscheconnect] User is authorized for vehicle vin WP1ZZZ9YZKDA99999
2023-10-02 18:04:26.920 DEBUG (MainThread) [custom_components.porscheconnect] Fetching initial data for vehicle WP1ZZZ9YZKDA99999
2023-10-02 18:04:28.594 DEBUG (MainThread) [custom_components.porscheconnect] Finished fetching porscheconnect data in 2.257 seconds (success: False)
2023-10-02 18:05:05.780 DEBUG (MainThread) [custom_components.porscheconnect.config_flow] Attempt login...
2023-10-02 18:05:06.885 DEBUG (MainThread) [custom_components.porscheconnect] Saving tokens
2023-10-02 18:05:06.885 DEBUG (MainThread) [custom_components.porscheconnect] Init new data update coordinator
2023-10-02 18:05:06.885 DEBUG (MainThread) [custom_components.porscheconnect] <homeassistant.config_entries.ConfigEntry object at 0xffff7399c040>
2023-10-02 18:05:07.375 INFO (MainThread) [custom_components.porscheconnect] User is authorized for vehicle vin WP1ZZZ9YZKDA99999
2023-10-02 18:05:07.469 DEBUG (MainThread) [custom_components.porscheconnect] Fetching initial data for vehicle WP1ZZZ9YZKDA99999
2023-10-02 18:05:08.999 DEBUG (MainThread) [custom_components.porscheconnect] Finished fetching porscheconnect data in 2.114 seconds (success: False)
2023-10-02 18:05:08.999 WARNING (MainThread) [homeassistant.config_entries] Config entry '[email protected]' for porscheconnect integration not ready yet: Error communicating with API: ; Retrying in background
2023-10-02 18:05:14.146 DEBUG (MainThread) [custom_components.porscheconnect] Saving tokens
2023-10-02 18:05:14.146 DEBUG (MainThread) [custom_components.porscheconnect] Init new data update coordinator
2023-10-02 18:05:14.146 DEBUG (MainThread) [custom_components.porscheconnect] <homeassistant.config_entries.ConfigEntry object at 0xffff7399c040>
2023-10-02 18:05:14.446 INFO (MainThread) [custom_components.porscheconnect] User is authorized for vehicle vin WP1ZZZ9YZKDA99999
2023-10-02 18:05:14.517 DEBUG (MainThread) [custom_components.porscheconnect] Fetching initial data for vehicle WP1ZZZ9YZKDA99999
2023-10-02 18:05:15.801 DEBUG (MainThread) [custom_components.porscheconnect] Finished fetching porscheconnect data in 1.655 seconds (success: False)
2023-10-02 18:05:26.032 DEBUG (MainThread) [custom_components.porscheconnect] Saving tokens
2023-10-02 18:05:26.032 DEBUG (MainThread) [custom_components.porscheconnect] Init new data update coordinator
2023-10-02 18:05:26.032 DEBUG (MainThread) [custom_components.porscheconnect] <homeassistant.config_entries.ConfigEntry object at 0xffff7399c040>
2023-10-02 18:05:26.389 INFO (MainThread) [custom_components.porscheconnect] User is authorized for vehicle vin WP1ZZZ9YZKDA99999
2023-10-02 18:05:26.474 DEBUG (MainThread) [custom_components.porscheconnect] Fetching initial data for vehicle WP1ZZZ9YZKDA99999
2023-10-02 18:05:27.780 DEBUG (MainThread) [custom_components.porscheconnect] Finished fetching porscheconnect data in 1.748 seconds (success: False)
2023-10-02 18:05:47.981 DEBUG (MainThread) [custom_components.porscheconnect] Saving tokens
2023-10-02 18:05:47.981 DEBUG (MainThread) [custom_components.porscheconnect] Init new data update coordinator
2023-10-02 18:05:47.981 DEBUG (MainThread) [custom_components.porscheconnect] <homeassistant.config_entries.ConfigEntry object at 0xffff7399c040>
2023-10-02 18:05:48.516 INFO (MainThread) [custom_components.porscheconnect] User is authorized for vehicle vin WP1ZZZ9YZKDA99999
2023-10-02 18:05:48.591 DEBUG (MainThread) [custom_components.porscheconnect] Fetching initial data for vehicle WP1ZZZ9YZKDA99999
2023-10-02 18:05:50.267 DEBUG (MainThread) [custom_components.porscheconnect] Finished fetching porscheconnect data in 2.286 seconds (success: False)

Problem to start/create the integration: KeyError: 'access_token' / TypeError: 'HassLogger' object is not callable

Version of the custom_component

0.0.14

Configuration

Through the integration (no yaml)

Describe the bug

Impossible to start the integration or even reload it... If I recreate the integration, I cannot login... so no debug log available as the integration has been removed and no way to recreate it...

Debug log

2023-06-15 08:26:59.223 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for porscheconnect doing blocking calls at custom_components/porscheconnect/__init__.py, line 94: access_tokens = await controller.getAllTokens()
2023-06-15 08:27:02.022 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for porscheconnect doing blocking calls at custom_components/porscheconnect/__init__.py, line 94: access_tokens = await controller.getAllTokens()
2023-06-15 08:27:04.918 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry <email_removed> for porscheconnect
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, 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 204, in getAllTokens
    token = await self._requestToken(application)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyporscheconnectapi/connection.py", line 229, in _requestToken
    jwt = self.jwt_payload_decode(token_data["access_token"])
                                  ~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 'access_token'

If I try to reload the integration, I am getting this error

2023-06-15 08:28:29.874 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry <email_removed> for porscheconnect
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, 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 204, in getAllTokens
    token = await self._requestToken(application)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyporscheconnectapi/connection.py", line 211, in _requestToken
    await self._login()
  File "/usr/local/lib/python3.11/site-packages/pyporscheconnectapi/connection.py", line 128, in _login
    _LOGGER("We already have a code in session, skip login")
TypeError: 'HassLogger' object is not callable

Nach Update anmelden nicht mehr möglich Fehler: "connect"

Nach jedem Update von HA verliert die Integration den Zugang.
Neues anmelden mit den gültigen Zugangsdaten ist nicht möglich.
Immer der Fehler "connect"

Komplettes entfernen der Integration und erneutes hinzufügen bringt keine Änderung.

Anmelden über die Porsche Homepage ist kein Problem.

Hat jemand dieses Problem gelöst?

Porsche connect disconnect after some day

The connection to Porsche connect is interrupted after a few days of operation. At that point you always need to reinstall the integration. Does anyone have the solution?

directCharge.isActive switch does not work

Version of the custom_component

0.0.13

Configuration

N/A

Describe the bug

The switch directCharge.isActive does not work, when trying to execute the swith.turn.on service it produces an error. Log attached. Nevertheless, it works fine from the mobile app and when directCharge is activated by the App the switch gets its satus updated inHA.

Debug log

2023-05-25 14:09:18.961 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [281472504004032] unexpected character: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 199, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1849, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1889, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 226, in handle_service
await service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 798, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 980, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 838, in _handle_entity_call
await result
File "/config/custom_components/porscheconnect/switch.py", line 38, in async_turn_on
await self.coordinator.controller.directChargeOn(self.vin, None, True)
File "/usr/local/lib/python3.10/site-packages/pyporscheconnectapi/client.py", line 401, in directChargeOn
return await self._setDirectCharge(
File "/usr/local/lib/python3.10/site-packages/pyporscheconnectapi/client.py", line 100, in _setDirectCharge
progressResult = await self._connection.post(
File "/usr/local/lib/python3.10/site-packages/pyporscheconnectapi/connection.py", line 213, in post
return await resp.json()
File "/usr/src/homeassistant/homeassistant/helpers/aiohttp_client.py", line 72, in json
return await super().json(*args, loads=loads, **kwargs)
File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 1120, in json
return loads(stripped.decode(encoding))
orjson.JSONDecodeError: unexpected character: line 1 column 1 (char 0)

User is not granted access to vehicle VIN

No cars (devices/entities) show up and logs shows this error:

This error originated from a custom integration.

Logger: custom_components.porscheconnect
Source: custom_components/porscheconnect/init.py:100
Integration: Porsche Connect (documentation, issues)
First occurred: 20:48:19 (2 occurrences)
Last logged: 20:51:02

User is not granted access to vehicle VIN WP0ZZZXXXXXXXXXXX, reason

(end)

Any clue? My Porsche app and site work fine.

Cannot login anymore since installation of the latest version 0.0.16

Version of the custom_component

0.0.16

Configuration

Message received at startup

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.get('message', message.get('description', 'Unknown error')))
pyporscheconnectapi.exceptions.WrongCredentials

Describe the bug

Cannot login anymore since upgraded from 0.0.15 to 0.0.16 (WrongCredentials)
Was working fine with previous version and fix for the API to 0.1.5

Debug log


Add your logs here.

typo in parkingbreak 992 GT3

Version of the custom_component

Current

Configuration

NA

Describe the bug

Homeassistant entity binary_sensor.911_gt3_parkingbreak is incorrect, it should be parkingbrake.

Debug log

NA

Use UnitOfLength.KILOMETERS

LENGTH_KILOMETERS was used from porscheconnect, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfLength.KILOMETERS instead

Does not work for Panamera 21 old PCM

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']}%")

Lock/Unlock Function

Hi, great integration thanks. Lock unlock doesnt seem to function and wondered about how to deal with the likely PIN code issue that is the most likely reason for it not running ? Tried hard coding the PIN in the lock.py code and also same issue when adding the lock to the Alexa and using its optional unlock code feature. Error in HA is Failed to call service lock/unlock

IndexError: tuple index out of range

Version of the custom_component

0.0.13

Configuration

n/a

Describe the bug

integration porscheconnect is generation the following Error in the Log.

Debug log

2023-06-14 23:01:51.272 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry ***** for porscheconnect
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, 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.10/site-packages/pyporscheconnectapi/client.py", line 32, in getAllTokens
return await self._connection.getAllTokens()
File "/usr/local/lib/python3.10/site-packages/pyporscheconnectapi/connection.py", line 135, in getAllTokens
token = await self._requestToken(application)
File "/usr/local/lib/python3.10/site-packages/pyporscheconnectapi/connection.py", line 167, in _requestToken
last_location = resp.history[len(resp.history) - 1].headers["Location"]
IndexError: tuple index out of range

Unexpected error fetching porscheconnect

Hello,

A of 11:41 CET today I am getting the below error every 5 minutes (on each pooling) and also all Prosche connect related entities appear as unavailable.

2022-02-04 11:44:05 ERROR (MainThread) [custom_components.porscheconnect] Unexpected error fetching porscheconnect data: Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/porscheconnect/init.py", line 218, in _async_update_data
vdata = await self._update_data_for_vehicle(vehicle)
File "/config/custom_components/porscheconnect/init.py", line 145, in _update_data_for_vehicle
**await self.controller.getStoredOverview(vin),
File "/usr/local/lib/python3.9/site-packages/pyporscheconnectapi/client.py", line 418, in getStoredOverview
data = await self._connection.get(
File "/usr/local/lib/python3.9/site-packages/pyporscheconnectapi/connection.py", line 183, in get
return await resp.json()
File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1119, in json
return loads(stripped.decode(encoding))
File "/usr/local/lib/python3.9/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Integration is using deprecated `DEVICE_CLASS_*` constants

Version of the custom_component

All

Configuration

n/a

Describe the bug

This custom integration uses deprecated DEVICE_CLASS_* constants in its codebase.

The DEVICE_CLASS_* constants have been deprecated and replaced in Home Assistant Core 2021.12 (over a year ago). I would highly suggest updating/migrating this integration to the new enums.

For example, for the device classes supported by the sensor platform, there is now a SensorDeviceClass enum. So if a sensor previously used the DEVICE_CLASS_ENERGY constant, it should now use SensorDeviceClass.ENERGY. Other platforms (like binary_sensor, and number) provide similar enumerations for their supported device classes.

The migration thus only consists of replacing constants with an enumeration member and is, therefore, very low impact and should be fairly straightforward.

If I can help resolve any questions regarding this change or migration, feel free to ask or respond to this issue. I'm happy to help!

Kindest regards,

../Frenck

Debug log


n/a

{'error': 'invalid_grant', 'error_description': 'Invalid authorization code'}

Version of the custom_component

0.0.14

Describe the bug

Adding of integrations fails without real error message.
Tried 0.0.13, 0.0.14 and main.

Debug log / Description

This morning found the integration entities unavailable with these in the logs:

2023-06-15 06:51:40.774 ERROR (MainThread) [custom_components.porscheconnect] Unexpected error fetching porscheconnect data: tuple index out of range
  File "/config/custom_components/porscheconnect/__init__.py", line 248, in _async_update_data
  File "/config/custom_components/porscheconnect/__init__.py", line 146, in _update_data_for_vehicle
  File "/usr/local/lib/python3.11/site-packages/pyporscheconnectapi/client.py", line 483, in getServices
  File "/usr/local/lib/python3.11/site-packages/pyporscheconnectapi/connection.py", line 200, in get
  File "/usr/local/lib/python3.11/site-packages/pyporscheconnectapi/connection.py", line 254, in _createhead
  File "/usr/local/lib/python3.11/site-packages/pyporscheconnectapi/connection.py", line 167, in _requestToken
2023-06-15 06:56:40.649 ERROR (MainThread) [custom_components.porscheconnect] Unexpected error fetching porscheconnect data: tuple index out of range
  File "/config/custom_components/porscheconnect/__init__.py", line 248, in _async_update_data
  File "/config/custom_components/porscheconnect/__init__.py", line 146, in _update_data_for_vehicle
  File "/usr/local/lib/python3.11/site-packages/pyporscheconnectapi/client.py", line 483, in getServices
  File "/usr/local/lib/python3.11/site-packages/pyporscheconnectapi/connection.py", line 200, in get
  File "/usr/local/lib/python3.11/site-packages/pyporscheconnectapi/connection.py", line 254, in _createhead
  File "/usr/local/lib/python3.11/site-packages/pyporscheconnectapi/connection.py", line 167, in _requestToken

Saw there was an update to 0.0.14 available so I updated to 0.0.14.
Still no improvement after installing and restarting.
So I deleted the integration to re-add it (just to be sure).

Now if I enter the credentials, the logs show:

2023-06-15 08:40:00.547 DEBUG (MainThread) [custom_components.porscheconnect.config_flow] Attempt login...
2023-06-15 08:40:01.139 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for porscheconnect doing blocking calls at custom_components/porscheconnect/config_flow.py, line 35: await conn._login()
2023-06-15 08:40:03.831 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for porscheconnect doing blocking calls at custom_components/porscheconnect/config_flow.py, line 35: await conn._login()

and after a few seconds the setup shows up again like this:

image

Not sure where to go from here. Debug for the integration is already enabled. Can I enable debugging for HA configflow somehow?

Retrying setup: 'chargingProfiles'

Since the latest update it seems if you don't have an electric car chargingProfiles breaks the integration

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 187, in _async_refresh self.data = await self._async_update_data() File "/config/custom_components/porscheconnect/__init__.py", line 188, in _async_update_data vdata = await self._update_data_for_vehicle(vehicle) File "/config/custom_components/porscheconnect/__init__.py", line 149, in _update_data_for_vehicle if vdata["chargingProfiles"] is not None: KeyError: 'chargingProfiles'

Hopefully it's an easy fix :)

Unexpected error fetching porscheconnect data: 'code'

Version of the custom_component

0.0.8

Configuration

Setup thru GUI

Describe the bug

Effect: All porscheconnect entities unavailable.
Background info: I recently had the car (Taycan) at the dealer for firmware-upgrades and it was mostly reset afterwards. I did not
setup the S-PIN (which I guess is the "code" here) yet because I didn't need it.
I'm confused why it only started in the logs at 2022-06-30 11:34:02. The car-reset was around 3 weeks ago.
Maybe something in the API was changed?
I will try to setup the S-PIN later to see if it changes something.

Debug log

Logs from the last restart of HA:


2022-06-29 21:02:07 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration porscheconnect which has not been tested by Home Assistant. This componen
t might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-06-30 01:59:51 ERROR (MainThread) [custom_components.porscheconnect] Timeout fetching porscheconnect data
2022-06-30 08:12:35 ERROR (MainThread) [custom_components.porscheconnect] Timeout fetching porscheconnect data
2022-06-30 10:24:43 ERROR (MainThread) [custom_components.porscheconnect] Timeout fetching porscheconnect data
2022-06-30 11:34:02 ERROR (MainThread) [custom_components.porscheconnect] Unexpected error fetching porscheconnect data: 'code'
  File "/config/custom_components/porscheconnect/__init__.py", line 165, in _async_update_data
  File "/usr/local/lib/python3.9/site-packages/pyporscheconnectapi/client.py", line 32, in getAllTokens
  File "/usr/local/lib/python3.9/site-packages/pyporscheconnectapi/connection.py", line 120, in getAllTokens
  File "/usr/local/lib/python3.9/site-packages/pyporscheconnectapi/connection.py", line 153, in _requestToken
2022-06-30 11:39:02 ERROR (MainThread) [custom_components.porscheconnect] Unexpected error fetching porscheconnect data: 'code'
  File "/config/custom_components/porscheconnect/__init__.py", line 165, in _async_update_data
  File "/usr/local/lib/python3.9/site-packages/pyporscheconnectapi/client.py", line 32, in getAllTokens
  File "/usr/local/lib/python3.9/site-packages/pyporscheconnectapi/connection.py", line 120, in getAllTokens
  File "/usr/local/lib/python3.9/site-packages/pyporscheconnectapi/connection.py", line 153, in _requestToken
2022-06-30 11:44:02 ERROR (MainThread) [custom_components.porscheconnect] Unexpected error fetching porscheconnect data: 'code'
  File "/config/custom_components/porscheconnect/__init__.py", line 165, in _async_update_data
  File "/usr/local/lib/python3.9/site-packages/pyporscheconnectapi/client.py", line 32, in getAllTokens
  File "/usr/local/lib/python3.9/site-packages/pyporscheconnectapi/connection.py", line 120, in getAllTokens
  File "/usr/local/lib/python3.9/site-packages/pyporscheconnectapi/connection.py", line 153, in _requestToken
2022-06-30 11:49:02 ERROR (MainThread) [custom_components.porscheconnect] Unexpected error fetching porscheconnect data: 'code'
  File "/config/custom_components/porscheconnect/__init__.py", line 165, in _async_update_data
  File "/usr/local/lib/python3.9/site-packages/pyporscheconnectapi/client.py", line 32, in getAllTokens
  File "/usr/local/lib/python3.9/site-packages/pyporscheconnectapi/connection.py", line 120, in getAllTokens
  File "/usr/local/lib/python3.9/site-packages/pyporscheconnectapi/connection.py", line 153, in _requestToken
...
...


permissions check not working anymore

ha-porscheconnect cannot get the permissions for the VIN anymore. API change maybe?
Taking out the function call in ha-porscheconnect//custom_components/porscheconnect)/init.py will makes it work temporarily (lines 194-201).

Trying from the pyporscheconnectapi CLI (v0.0.25):

porschecli -e [email protected] -p xxx permissions -a

None
Traceback (most recent call last):
  File "/usr/local/bin/porschecli", line 10, in <module>
    sys.exit(cli.cli())
  File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/cli.py", line 268, in cli
    loop.run_until_complete(main(args))
  File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/cli.py", line 73, in main
    data = await client.isAllowed(vin)
  File "/usr/local/lib/python3.7/dist-packages/pyporscheconnectapi/client.py", line 430, in isAllowed
    reason = service_status.get(
AttributeError: 'NoneType' object has no attribute 'get'
ERROR:asyncio:Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7f99a40ec748>
ERROR:asyncio:Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f99a41048d0>, 3743445.337643096)]']
connector: <aiohttp.connector.TCPConnector object at 0x7f99a40ec780>

Stops working after a couple of days

Version of the custom_component

0.0.16

Configuration

Describe the bug

I installed the integration through HACS. Then i added my credentials and it was working for a couple of days and then it stopped working. I removed everything and reinstalled it and tried to add it again and now I get the error message mentioned below in my core logs.

Debug log

Logger: homeassistant.config_entries
Source: custom_components/porscheconnect/__init__.py:94
Integration: Porsche Connect ([documentation](https://github.com/CJNE/ha-porscheconnect), [issues](https://github.com/CJNE/ha-porscheconnect/issues))
First occurred: August 28, 2023 at 6:46:26 PM (2 occurrences)
Last logged: August 28, 2023 at 6:49:20 PM

Error setting up entry ***my-em@ail*** 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 167, in _login
    resume_url = resp.headers['Location']
                 ~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'Location'

add car images

I'd like to pull the car images so I can use them in a dashboard. The Rivian integration does this and it is pretty nice!

Porsche Macan

I can log into my Porsche Macan on the my Porsche app as I used to on the my BMW app yet the integration will not load my car

I understand it’s not listed as a compatible vehicle but surely someone who is much smarter than me as a lot of these integrations are awesome can work this out.

deprecated methods on an instance of NumberEntity and will be unsupported from Home Assistant 2022.10.

Here is the warning message (it is just a warning for the time being...) I am getting at startup:

custom_components.porscheconnect.number::PorscheChargingLevel is overriding deprecated methods on an instance of NumberEntity, this is not valid and will be unsupported from Home Assistant 2022.10. Please report it to the custom integration author.

Version of the custom_component

version 0.0.8

Configuration

Add your logs here.

Describe the bug

A clear and concise description of what the bug is.

Debug log


Add your logs here.

Integration not functional: TypeError: 'HassLogger' object is not callable

Version of the custom_component

0.0.15

Configuration

Using the integration... no yaml

Describe the bug

Integration loaded at boot but after some time, I am getting an error and no way to have the integration up and running...

Debug log

2023-06-15 22:23:23.503 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry <email_removed> for porscheconnect
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, 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 118, in _login
    _LOGGER("We already have a code in session, skip login")
TypeError: 'HassLogger' object is not callable

Sensor for PRIVACY_MODE

Is your feature request related to a problem? Please describe.
When the car goes to privacy mode (either intentionally or because of e.g. a backend error), all the sensors will go to unavailable.

Describe the solution you'd like
It would be nice to have a binary_sensor for privacy mode. This way one could catch that in the GUI or in automations. The JSON return from the server delivers this with the disabledReason:

...{'serviceId': 'rlu_v1', 'disabled': True, 'disabledReason': 'PRIVACY_MODE'...

Describe alternatives you've considered
A template-sensor that would show the privacy mode if multiple sensors go to unavailable. But that would be a bit hacky...

Since upgrading HA core to latest GA version the integration fails to load with the folklowing error

Error setting up entry Porsche Connect for porscheconnect

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, 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'

Unexpected error fetching porscheconnect data: 'nickName'

Version of the custom_component

Configuration

None... Using integration menu (login successful but error related to the Nickname)

Describe the bug

Error while loading the integration... Integration not loaded correctly. Removing/adding the integration did not fix the issue.

Debug log


-------------------------------------------------------------------
porscheconnect
Version: 0.0.8
This is a custom integration!
If you have any issues with this you need to open an issue here:
https://github.com/cjne/ha-porscheconnect/issues
-------------------------------------------------------------------

2022-07-23 17:26:48 DEBUG (MainThread) [custom_components.porscheconnect] Saving tokens
2022-07-23 17:26:48 DEBUG (MainThread) [custom_components.porscheconnect] Init new data update coordinator
2022-07-23 17:26:50 INFO (MainThread) [custom_components.porscheconnect] User is authorized for vehicle vin WP1XXXXXXXX
2022-07-23 17:26:50 WARNING (MainThread) [homeassistant.helpers.frame] Detected integration that uses deprecated `async_get_registry` to access device registry, use async_get instead. Please report issue to the custom component author for tahoma using this method at custom_components/tahoma/__init__.py, line 141: device_registry = await dr.async_get_registry(hass)
2022-07-23 17:26:50 DEBUG (MainThread) [custom_components.porscheconnect] Fetching initial data for vehicle WP1XXXXXXXX
2022-07-23 17:26:50 ERROR (MainThread) [custom_components.porscheconnect] Unexpected error fetching porscheconnect data: 'nickName'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/porscheconnect/__init__.py", line 187, in _async_update_data
    vehicle["name"] = summary["nickName"] or summary["modelDescription"]
KeyError: 'nickName'
2022-07-23 17:26:50 DEBUG (MainThread) [custom_components.porscheconnect] Finished fetching porscheconnect data in 2.574 seconds (success: False)

Integration not showing up in UI

Version:

ha-porscheconnect 0.0.8
core-2022.6.7
Home Assistant OS 8.2
supervisor-2022.05.3

Configuration

n.a.

Describe the bug

Not sure it is a integration bug, don't hesitate to delete if it is not the right place.

Installed HACS and added the custom integration, but the integration does not show up in:

Settings -> 'Devices & Services' -> '+ Add Integration'

Screenshot 2022-06-23 at 21 09 55

Custom integration correctly added in HACS:

Screenshot 2022-06-23 at 21 12 23

And present in the custom_components folder:

Screenshot 2022-06-23 at 21 32 17

Debug log

log I could find (debug level configured, search for word Porsche) :

2022-06-23 21:23:39 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration porscheconnect which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2022-06-23 21:23:47 DEBUG (MainThread) [homeassistant.helpers.translation] Cache miss for en-GB: syncthing, nanoleaf, smhi, hangouts, ukraine_alarm, unifiprotect, blebox, filesize, insteon, aladdin_connect, waze_travel_time, mullvad, totalconnect, tesla_wall_connector, yolink, overkiz, smartthings, version, evil_genius_labs, uptimerobot, ambee, meteoclimatic, yale_smart_alarm, wemo, ridwell, rfxtrx, deconz, spotify, atag, hunterdouglas_powerview, slimproto, openuv, flunearyou, hisense_aehw4a1, life360, luftdaten, hyperion, kaleidescape, vicare, google_travel_time, solax, recollect_waste, control4, moon, huisbaasje, almond, adax, airly, azure_event_hub, fivem, nws, rtsp_to_webrtc, sentry, webostv, foscam, guardian, twinkly, whirlpool, mysensors, alarmdecoder, ipp, tibber, tomorrowio, slack, ambient_station, netgear, geofency, samsungtv, intellifire, coolmaster, nuki, co2signal, xiaomi_miio, gree, neato, cloudflare, wiffi, aurora, airnow, azure_devops, flux_led, velbus, ovo_energy, pi_hole, aussie_broadband, mikrotik, opentherm_gw, daikin, icloud, switcher_kis, keenetic_ndms2, iqvia, mjpeg, rainmachine, flipr, simplisafe, qnap_qsw, launch_library, lookin, balboa, withings, directv, harmony, lutron_caseta, octoprint, ezviz, traccar, tradfri, buienradar, powerwall, solaredge, tellduslive, wled, meteo_france, zerproc, ondilo_ico, august, tplink, melcloud, rdw, roomba, songpal, picnic, smarttub, nzbget, tautulli, litejet, somfy, airthings, arcam_fmj, adguard, volumio, gios, habitica, onewire, hacs, blink, pure_energie, omnilogic, tankerkoenig, laundrify, mazda, nexia, tailscale, sensibo, steamist, efergy, cpuspeed, philips_js, dlna_dms, synology_dsm, isy994, dexcom, freedompro, fritzbox_callmonitor, trafikverket_train, yeelight, eafm, elgato, minecraft_server, sharkiq, flume, ps4, iss, met_eireann, baf, islamic_prayer_times, openweathermap, environment_canada, trafikverket_weatherstation, broadlink, faa_delays, threshold, vilfo, dynalite, hue, plex, roon, metoffice, risco, subaru, nmap_tracker, local_ip, geonetnz_volcano, tile, esphome, zwave_me, plugwise, bosch_shc, twilio, oncue, progettihwsw, airzone, starline, freebox, enphase_envoy, screenlogic, elmax, coronavirus, wilight, mill, forecast_solar, dunehd, venstar, upnp, goalzero, deluge, aemet, upb, pvoutput, knx, plum_lightpad, yamaha_musiccast, opengarage, google, amberelectric, brother, homematicip_cloud, gpslogger, nightscout, github, hvv_departures, vera, here_travel_time, watttime, unifi, system_bridge, heos, modern_forms, min_max, fronius, abode, renault, dialogflow, gdacs, ambiclimate, vlc_telnet, dsmr, coinbase, bsblan, youless, litterrobot, panasonic_viera, awair, upcloud, ios, derivative, iotawatt, squeezebox, nina, switchbot, vesync, lyric, airtouch4, dnsip, prosegur, devolo_home_network, kostal_plenticore, motioneye, ring, vizio, sms, ruckus_unleashed, tuya, vulcan, nam, advantage_air, integration, rainforest_eagle, forked_daapd, trafikverket_ferry, speedtestdotnet, epson, denonavr, somfy_mylink, geocaching, wiz, canary, porscheconnect, sonarr, tractive, flick_electric, honeywell, ialarm_xr, agent_dvr, fireservicerota, peco, smappee, rituals_perfume_genie, onvif, cert_expiry, aseko_pool_live, brunt, asuswrt, mutesync, emonitor, elkm1, sleepiq, monoprice, xbox, homekit_controller, season, iaqualink, wolflink, shelly, devolo_home_control, zwave_js, fibaro, senz, nest, fjaraskupan, tolo, kodi, huawei_lte, tasmota, bond, kulersky, juicenet, discord, radio_browser, ipma, tado, generic, glances, braviatv, kraken, emulated_roku, verisure, hlk_sw16, syncthru, switch_as_x, home_connect, steam_online, open_meteo, point, accuweather, transmission, cast, owntracks, sql, nuheat, p1_monitor, goodwe, poolsense, meater, roku, apple_tv, ws66i, airvisual, sia, stookalert, twentemilieu, sense, zha, rachio, logi_circle, enocean, toon, motion_blinds, utility_meter, notion, nut, jellyfin, moehlenhoff_alpha2, nfandroidtv, myq, pvpc_hourly_pricing, mailgun, senseme, xiaomi_aqara, aurora_abb_powerone, sonos, whois, androidtv, garages_amsterdam, home_plus_control, tod, modem_callerid, mobile_app, spider, econet, izone, axis, doorbird, geonetnz_quakes, smart_meter_texas, konnected, fritzbox, locative, sabnzbd, kmtronic, shopping_list, flo, acmeda, homekit, crownstone, sma, plaato, lifx, surepetcare, solarlog, netatmo, growatt_server, srp_energy, vallox, soma, bmw_connected_drive, homewizard, ialarm, fritz, hive, ecobee, wallbox, ifttt, profiler, gogogate2, uptime

2022-06-23 21:23:50 DEBUG (SyncWorker_9) [homeassistant.util.json] JSON file not found: /config/custom_components/porscheconnect/translations/en-GB.json

2022-06-23 21:23:51 DEBUG (MainThread) [homeassistant.components.websocket_api.http.connection] [139822996016528] Sending {"id":45,"type":"result","success":true,"result":{"resources":{"component.uptime.title":"Uptime","component.gogogate2.title":"Gogogate2 and ismartgate","component.profiler.title":"Profiler","component.ifttt.title":"IFTTT","component.ecobee.title":"ecobee","component.wallbox.title":"Wallbox","component.hive.title":"Hive","component.fritz.title":"AVM FRITZ!Box Tools","component.ialarm.title":"Antifurto365 iAlarm","component.homewizard.title":"HomeWizard Energy","component.bmw_connected_drive.title":"BMW Connected Drive","component.soma.title":"Soma Connect","component.vallox.title":"Vallox","component.srp_energy.title":"SRP Energy","component.growatt_server.title":"Growatt","component.netatmo.title":"Netatmo","component.solarlog.title":"Solar-Log","component.surepetcare.title":"Sure Petcare","component.lifx.title":"LIFX","component.plaato.title":"Plaato","component.sma.title":"SMA Solar","component.crownstone.title":"Crownstone","component.homekit.title":"HomeKit","component.acmeda.title":"Rollease Acmeda Automate","component.flo.title":"Flo","component.shopping_list.title":"Shopping List","component.kmtronic.title":"KMtronic","component.sabnzbd.title":"SABnzbd","component.locative.title":"Locative","component.fritzbox.title":"AVM FRITZ!SmartHome","component.konnected.title":"Konnected.io","component.smart_meter_texas.title":"Smart Meter Texas","component.geonetnz_quakes.title":"GeoNet NZ Quakes","component.doorbird.title":"DoorBird","component.axis.title":"Axis","component.izone.title":"iZone","component.econet.title":"Rheem EcoNet Products","component.spider.title":"Itho Daalderop Spider","component.mobile_app.title":"Mobile App","component.modem_callerid.title":"Phone Modem","component.tod.title":"Times of the Day","component.home_plus_control.title":"Legrand Home+ Control","component.garages_amsterdam.title":"Garages Amsterdam","component.androidtv.title":"Android TV","component.whois.title":"Whois","component.sonos.title":"Sonos","component.aurora_abb_powerone.title":"Aurora ABB PowerOne Solar PV","component.xiaomi_aqara.title":"Xiaomi Gateway (Aqara)","component.senseme.title":"SenseME","component.mailgun.title":"Mailgun","component.pvpc_hourly_pricing.title":"Spain electricity hourly pricing (PVPC)","component.myq.title":"MyQ","component.nfandroidtv.title":"Notifications for Android TV / Fire TV","component.moehlenhoff_alpha2.title":"M\u00f6hlenhoff Alpha 2","component.jellyfin.title":"Jellyfin","component.nut.title":"Network UPS Tools (NUT)","component.notion.title":"Notion","component.utility_meter.title":"Utility Meter","component.motion_blinds.title":"Motion Blinds","component.toon.title":"Toon","component.enocean.title":"EnOcean","component.logi_circle.title":"Logi Circle","component.rachio.title":"Rachio","component.zha.title":"Zigbee Home Automation","component.sense.title":"Sense","component.twentemilieu.title":"Twente Milieu","component.stookalert.title":"RIVM Stookalert","component.sia.title":"SIA Alarm Systems","component.airvisual.title":"AirVisual","component.ws66i.title":"Soundavo WS66i 6-Zone Amplifier","component.apple_tv.title":"Apple TV","component.roku.title":"Roku","component.meater.title":"Meater","component.poolsense.title":"PoolSense","component.goodwe.title":"GoodWe Inverter","component.p1_monitor.title":"P1 Monitor","component.nuheat.title":"NuHeat","component.sql.title":"SQL","component.owntracks.title":"OwnTracks","component.cast.title":"Google Cast","component.transmission.title":"Transmission","component.accuweather.title":"AccuWeather","component.point.title":"Minut Point","component.open_meteo.title":"Open-Meteo","component.steam_online.title":"Steam","component.home_connect.title":"Home Connect","component.switch_as_x.title":"Switch as X","component.syncthru.title":"Samsung SyncThru Printer","component.hlk_sw16.title":"Hi-Link HLK-SW16","component.verisure.title":"Verisure","component.emulated_roku.title":"Emulated Roku","component.kraken.title":"Kraken","component.braviatv.title":"Sony Bravia TV","component.glances.title":"Glances","component.generic.title":"Generic Camera","component.tado.title":"Tado","component.ipma.title":"Instituto Portugu\u00eas do Mar e Atmosfera (IPMA)","component.radio_browser.title":"Radio Browser","component.discord.title":"Discord","component.juicenet.title":"JuiceNet","component.kulersky.title":"Kuler Sky","component.bond.title":"Bond","component.tasmota.title":"Tasmota","component.huawei_lte.title":"Huawei LTE","component.kodi.title":"Kodi","component.tolo.title":"TOLO Sauna","component.fjaraskupan.title":"Fj\u00e4r\u00e5skupan","component.nest.title":"Nest","component.senz.title":"nVent RAYCHEM SENZ","component.fibaro.title":"Fibaro","component.zwave_js.title":"Z-Wave JS","component.devolo_home_control.title":"devolo Home Control","component.shelly.title":"Shelly","component.wolflink.title":"Wolf SmartSet Service","component.iaqualink.title":"Jandy iAqualink","component.season.title":"Season","component.homekit_controller.title":"HomeKit Controller","component.xbox.title":"Xbox","component.monoprice.title":"Monoprice 6-Zone Amplifier","component.sleepiq.title":"SleepIQ","component.elkm1.title":"Elk-M1 Control","component.emonitor.title":"SiteSage Emonitor","component.mutesync.title":"mutesync","component.asuswrt.title":"ASUSWRT","component.brunt.title":"Brunt Blind Engine","component.aseko_pool_live.title":"Aseko Pool Live","component.cert_expiry.title":"Certificate Expiry","component.onvif.title":"ONVIF","component.rituals_perfume_genie.title":"Rituals Perfume Genie","component.smappee.title":"Smappee","component.peco.title":"PECO Outage Counter","component.fireservicerota.title":"FireServiceRota","component.agent_dvr.title":"Agent DVR","component.ialarm_xr.title":"Antifurto365 iAlarmXR","component.honeywell.title":"Honeywell Total Connect Comfort (US)","component.flick_electric.title":"Flick Electric","component.tractive.title":"Tractive","component.sonarr.title":"Sonarr","component.porscheconnect.title":"Porsche Connect","component.canary.title":"Canary","component.wiz.title":"WiZ","component.geocaching.title":"Geocaching","component.somfy_mylink.title":"Somfy MyLink","component.denonavr.title":"Denon AVR Network Receivers","component.epson.title":"Epson","component.speedtestdotnet.title":"Speedtest.net","component.trafikverket_ferry.title":"Trafikverket Ferry","component.forked_daapd.title":"forked-daapd","component.rainforest_eagle.title":"Rainforest Eagle","component.integration.title":"Integration - Riemann sum integral","component.advantage_air.title":"Advantage Air","component.nam.title":"Nettigo Air Monitor","component.vulcan.title":"Uonet+ Vulcan","component.tuya.title":"Tuya","component.ruckus_unleashed.title":"Ruckus Unleashed","component.sms.title":"SMS notifications via GSM-modem","component.vizio.title":"VIZIO SmartCast","component.ring.title":"Ring","component.motioneye.title":"motionEye","component.kostal_plenticore.title":"Kostal Plenticore Solar Inverter","component.devolo_home_network.title":"devolo Home Network","component.prosegur.title":"Prosegur Alarm","component.dnsip.title":"DNS IP","component.airtouch4.title":"AirTouch 4","component.lyric.title":"Honeywell Lyric","component.vesync.title":"VeSync","component.switchbot.title":"SwitchBot","component.nina.title":"NINA","component.squeezebox.title":"Squeezebox (Logitech Media Server)","component.iotawatt.title":"IoTaWatt","component.derivative.title":"Derivative","component.ios.title":"Home Assistant iOS","component.upcloud.title":"UpCloud","component.awair.title":"Awair","component.panasonic_viera.title":"Panasonic Viera","component.litterrobot.title":"Litter-Robot","component.youless.title":"YouLess","component.bsblan.title":"BSB-Lan","component.coinbase.title":"Coinbase","component.dsmr.title":"DSMR Slimme Meter","component.vlc_telnet.title":"VLC media player via Telnet","component.ambiclimate.title":"Ambiclimate","component.gdacs.title":"Global Disaster Alert and Coordination System (GDACS)","component.dialogflow.title":"Dialogflow","component.renault.title":"Renault","component.abode.title":"Abode","component.fronius.title":"Fronius","component.min_max.title":"Min/Max","component.modern_forms.title":"Modern Forms","component.heos.title":"Denon HEOS","component.system_bridge.title":"System Bridge","component.unifi.title":"UniFi Network","component.watttime.title":"WattTime","component.here_travel_time.title":"HERE Travel Time","component.vera.title":"Vera","component.hvv_departures.title":"HVV Departures","component.github.title":"GitHub","component.nightscout.title":"Nightscout","component.gpslogger.title":"GPSLogger","component.homematicip_cloud.title":"HomematicIP Cloud","component.brother.title":"Brother Printer","component.amberelectric.title":"Amber Electric","component.google.title":"Google Calendars","component.opengarage.title":"OpenGarage","component.yamaha_musiccast.title":"MusicCast","component.plum_lightpad.title":"Plum Lightpad","component.knx.title":"KNX","component.pvoutput.title":"PVOutput","component.upb.title":"Universal Powerline Bus (UPB)","component.aemet.title":"AEMET OpenData","component.deluge.title":"Deluge","component.goalzero.title":"Goal Zero Yeti","component.upnp.title":"UPnP/IGD","component.venstar.title":"Venstar","component.dunehd.title":"Dune HD","component.forecast_solar.title":"Forecast.Solar","component.mill.title":"Mill","component.wilight.title":"WiLight","component.coronavirus.title":"Coronavirus (COVID-19)","component.elmax.title":"Elmax","component.screenlogic.title":"Pentair ScreenLogic","component.enphase_envoy.title":"Enphase Envoy","component.freebox.title":"Freebox","component.starline.title":"StarLine","component.airzone.title":"Airzone","component.progettihwsw.title":"ProgettiHWSW Automation","component.oncue.title":"Oncue by Kohler","component.twilio.title":"Twilio","component.bosch_shc.title":"Bosch SHC","component.plugwise.title":"Plugwise","component.zwave_me.title":"Z-Wave.Me","component.esphome.title":"ESPHome","component.tile.title":"Tile","component.geonetnz_volcano.title":"GeoNet NZ Volcano","component.local_ip.title":"Local IP Address","component.nmap_tracker.title":"Nmap Tracker","component.subaru.title":"Subaru","component.risco.title":"Risco","component.metoffice.title":"Met Office","component.roon.title":"RoonLabs music player","component.plex.title":"Plex Media Server","component.hue.title":"Philips Hue","component.dynalite.title":"Philips Dynalite","component.vilfo.title":"Vilfo Router","component.threshold.title":"Threshold","component.faa_delays.title":"FAA Delays","component.broadlink.title":"Broadlink","component.trafikverket_weatherstation.title":"Trafikverket Weather Station","component.environment_canada.title":"Environment Canada","component.openweathermap.title":"OpenWeatherMap","component.islamic_prayer_times.title":"Islamic Prayer Times","component.baf.title":"Big Ass Fans","component.met_eireann.title":"Met \u00c9ireann","component.iss.title":"International Space Station (ISS)","component.ps4.title":"Sony PlayStation 4","component.flume.title":"Flume","component.sharkiq.title":"Shark IQ","component.minecraft_server.title":"Minecraft Server","component.elgato.title":"Elgato Light","component.eafm.title":"Environment Agency Flood Gauges","component.yeelight.title":"Yeelight","component.trafikverket_train.title":"Trafikverket Train","component.fritzbox_callmonitor.title":"AVM FRITZ!Box Call Monitor","component.freedompro.title":"Freedompro","component.dexcom.title":"Dexcom","component.isy994.title":"Universal Devices ISY994","component.synology_dsm.title":"Synology DSM","component.dlna_dms.title":"DLNA Digital Media Server","component.philips_js.title":"Philips TV","component.cpuspeed.title":"CPU Speed","component.efergy.title":"Efergy","component.steamist.title":"Steamist","component.sensibo.title":"Sensibo","component.tailscale.title":"Tailscale","component.nexia.title":"Nexia/American Standard/Trane","component.mazda.title":"Mazda Connected Services","component.laundrify.title":"laundrify","component.tankerkoenig.title":"Tankerkoenig","component.omnilogic.title":"Hayward Omnilogic","component.pure_energie.title":"Pure Energie","component.blink.title":"Blink","component.hacs.title":"HACS","component.onewire.title":"1-Wire","component.habitica.title":"Habitica","component.gios.title":"GIO\u015a","component.volumio.title":"Volumio","component.adguard.title":"AdGuard Home","component.arcam_fmj.title":"Arcam FMJ Receivers","component.airthings.title":"Airthings","component.somfy.title":"Somfy","component.litejet.title":"LiteJet","component.tautulli.title":"Tautulli","component.nzbget.title":"NZBGet","component.smarttub.title":"SmartTub","component.picnic.title":"Picnic","component.songpal.title":"Sony Songpal","component.roomba.title":"iRobot Roomba and Braava","component.rdw.title":"RDW","component.melcloud.title":"MELCloud","component.tplink.title":"TP-Link Kasa Smart","component.august.title":"August","component.ondilo_ico.title":"Ondilo ICO","component.zerproc.title":"Zerproc","component.meteo_france.title":"M\u00e9t\u00e9o-France","component.wled.title":"WLED","component.tellduslive.title":"Telldus Live","component.solaredge.title":"SolarEdge","component.powerwall.title":"Tesla Powerwall","component.buienradar.title":"Buienradar","component.tradfri.title":"IKEA TR\u00c5DFRI","component.traccar.title":"Traccar","component.ezviz.title":"Ezviz","component.octoprint.title":"OctoPrint","component.lutron_caseta.title":"Lutron Cas\u00e9ta","component.harmony.title":"Logitech Harmony Hub","component.directv.title":"DirecTV","component.withings.title":"Withings","component.balboa.title":"Balboa Spa Client","component.lookin.title":"LOOKin","component.launch_library.title":"Launch Library","component.qnap_qsw.title":"QNAP QSW","component.simplisafe.title":"SimpliSafe","component.flipr.title":"Flipr","component.rainmachine.title":"RainMachine","component.mjpeg.title":"MJPEG IP Camera","component.iqvia.title":"IQVIA","component.keenetic_ndms2.title":"Keenetic NDMS2 Router","component.switcher_kis.title":"Switcher","component.icloud.title":"Apple iCloud","component.daikin.title":"Daikin AC","component.opentherm_gw.title":"OpenTherm Gateway","component.mikrotik.title":"Mikrotik","component.aussie_broadband.title":"Aussie Broadband","component.pi_hole.title":"Pi-hole","component.ovo_energy.title":"OVO Energy","component.velbus.title":"Velbus","component.flux_led.title":"Magic Home","component.azure_devops.title":"Azure DevOps","component.airnow.title":"AirNow","component.aurora.title":"Aurora","component.wiffi.title":"Wiffi","component.cloudflare.title":"Cloudflare","component.neato.title":"Neato Botvac","component.gree.title":"Gree Climate","component.xiaomi_miio.title":"Xiaomi Miio","component.co2signal.title":"CO2 Signal","component.nuki.title":"Nuki","component.coolmaster.title":"CoolMasterNet","component.intellifire.title":"IntelliFire","component.samsungtv.title":"Samsung Smart TV","component.geofency.title":"Geofency","component.netgear.title":"NETGEAR","component.ambient_station.title":"Ambient Weather Station","component.slack.title":"Slack","component.tomorrowio.title":"Tomorrow.io","component.tibber.title":"Tibber","component.ipp.title":"Internet Printing Protocol (IPP)","component.alarmdecoder.title":"AlarmDecoder","component.mysensors.title":"MySensors","component.whirlpool.title":"Whirlpool Sixth Sense","component.twinkly.title":"Twinkly","component.guardian.title":"Elexa Guardian","component.foscam.title":"Foscam","component.webostv.title":"LG webOS Smart TV","component.sentry.title":"Sentry","component.rtsp_to_webrtc.title":"RTSPtoWebRTC","component.nws.title":"National Weather Service (NWS)","component.fivem.title":"FiveM","component.azure_event_hub.title":"Azure Event Hub","component.airly.title":"Airly","component.adax.title":"Adax","component.almond.title":"Almond","component.huisbaasje.title":"Huisbaasje","component.moon.title":"Moon","component.control4.title":"Control4","component.recollect_waste.title":"ReCollect Waste","component.solax.title":"SolaX Power","component.google_travel_time.title":"Google Maps Travel Time","component.vicare.title":"Viessmann ViCare","component.kaleidescape.title":"Kaleidescape","component.hyperion.title":"Hyperion","component.luftdaten.title":"Sensor.Community","component.life360.title":"Life360","component.hisense_aehw4a1.title":"Hisense AEH-W4A1","component.flunearyou.title":"Flu Near You","component.openuv.title":"OpenUV","component.slimproto.title":"SlimProto (Squeezebox players)","component.hunterdouglas_powerview.title":"Hunter Douglas PowerView","component.atag.title":"Atag","component.spotify.title":"Spotify","component.deconz.title":"deCONZ","component.rfxtrx.title":"RFXCOM RFXtrx","component.ridwell.title":"Ridwell","component.wemo.title":"Belkin WeMo","component.yale_smart_alarm.title":"Yale Smart Living","component.meteoclimatic.title":"Meteoclimatic","component.ambee.title":"Ambee","component.uptimerobot.title":"UptimeRobot","component.evil_genius_labs.title":"Evil Genius Labs","component.version.title":"Version","component.smartthings.title":"SmartThings","component.overkiz.title":"Overkiz (by Somfy)","component.yolink.title":"YoLink","component.tesla_wall_connector.title":"Tesla Wall Connector","component.totalconnect.title":"Total Connect","component.mullvad.title":"Mullvad VPN","component.waze_travel_time.title":"Waze Travel Time","component.aladdin_connect.title":"Aladdin Connect","component.insteon.title":"Insteon","component.filesize.title":"File Size","component.blebox.title":"BleBox devices","component.unifiprotect.title":"UniFi Protect","component.ukraine_alarm.title":"Ukraine Alarm","component.hangouts.title":"Google Chat","component.smhi.title":"SMHI","component.nanoleaf.title":"Nanoleaf","component.syncthing.title":"Syncthing"}}}

2022-06-23 21:23:52 DEBUG (MainThread) [custom_components.hacs] <Integration CJNE/ha-porscheconnect> Getting repository information

2022-06-23 21:23:52 DEBUG (MainThread) [custom_components.hacs] <Integration CJNE/ha-porscheconnect> Running checks against 0.0.8

Integration got stuck in privacy mode

Version of the custom_component

version 0.0.11 (latest)

Configuration

n/a

Describe the bug

The integration got stuck in privacy mode, although the vehicle had (and always have had) the privacy mode disabled. I had to comment out the code at row 160-162 in init.py in order to get updates again. Have not had the time to investigate further at this point, but it seems to me as if the API reports the vehicle to be in privacy mode, although it clearly isn't.

Controls are working and I get position from the vehicle, while the binary_sensor still indicates 'on' (after commenting out the lines mentioned).

Debug log


2023-01-14 12:52:51.425 DEBUG (MainThread) [custom_components.porscheconnect] Vehicle xxx is in privacy mode, will not fetch data
2023-01-14 12:52:51.425 DEBUG (MainThread) [custom_components.porscheconnect] {'privacyMode': True, 'services':...

Authentication flow not working anymore

Version of the custom_component

0.0.16

Configuration

Module installed via HACS

Describe the bug

It is impossible to add a new account, the only error received is "connect".
After investigation, it seems the authentication flow changed for Porsche Connect (see CJNE/pyporscheconnectapi#34).

I've made a PR to the underlying library (CJNE/pyporscheconnectapi#35) that fixes it, once merged this module should be updated to use the correct dependency and that should fix it.
I've tested it in my on HA setup and it works with the proposed PR.

Debug log


N/A

New error

I have got a new error (at least for me it is new)

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/porscheconnect/init.py", line 215, in _async_update_data
vehicle["services"] = await self.controller.getServices(vin)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyporscheconnectapi/client.py", line 488, in getServices
is_privacy = data['vehicleServiceEnabledMap']['VSR'] == 'DISABLED'

KeyError: 'vehicleServiceEnabledMap'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.