-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Images not provided anymore #289
Comments
HTTP error 504 usually indicates server-side problems. Can you confirm that this problem is temporary? Is the problem still there If you restart you home assistant now, a few days later? |
Hi @fredriklj, |
Do you still get |
Yes, i do. In the meanwhile the porsche app itself works fine (all picture in "car details" are available), 2025-01-12 10:28:17.403 ERROR (MainThread) [pyporscheconnectapi.vehicle] Could not get capabilities, error communicating with API: UNKNOWN_ERROR_502 The above exception was the direct cause of the following exception: Traceback (most recent call last): 2025-01-12 10:28:21.913 ERROR (MainThread) [homeassistant.components.image] Error while setting up porscheconnect platform for image 2025-01-12 12:00:11.408 ERROR (MainThread) [pyporscheconnectapi.vehicle] Could not get current overview, error communicating with API: 'UPSTREAM_TIMEOUT The above exception was the direct cause of the following exception: Traceback (most recent call last): |
I see you are getting Would it be possible for you to try the cli, to see if that works?
|
I have the same problem that the images are not available in HA. Here is my output from the cli: DEBUG:pyporscheconnectapi.account:Building vehicle list |
Thanks for the cli output as well. I can't reproduce this myself, and a |
yes, the VIN is correct. The API was able to get the information about the vehicle, it's just the images that are not working. |
Yup, I can see that, was just wondering if there were some characters in the VIN that messed up the URI. I still think this may be an error on the server side, in perhaps one of the instances (but not others). The app could perhaps cache the images, making it harder for them to detect it. For the time being, I think we will just have to wait and see if it resolves itself or if this is a change that gets rolled out globally. |
I got the same problem, the images are not showing up in the app and not in HA. It's probably a server-side issue - is there a way that we could add caching into HA? Maybe save the pic locally and only refresh it periodically? I don't think the image of the car is going to change that often 😁 |
Version of the custom_component
0.1.2
Configuration
No Integration specific entry ?
Describe the bug
After updating to homeassistant to 2025.1.2 i noticed, that the images provided by the Integration are not available anymore
(maybe it's independant to the update, noticed it just afterwards)
Debug log
(VIN manually replaced)
2025-01-10 08:45:02.215 WARNING (SyncWorker_0) [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
2025-01-10 08:45:28.885 ERROR (MainThread) [pyporscheconnectapi.vehicle] Could not get capabilities, error communicating with API: UNKNOWN_ERROR_502
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/pyporscheconnectapi/connection.py", line 96, in request
resp.raise_for_status() # A common error seem to be: httpx.HTTPStatusError: Server error '504 Gateway Time-out'
~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/httpx/_models.py", line 763, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Server error '502 Bad Gateway' for url 'https://api.ppa.porsche.com/app//connect/v1/vehicles/>VIN</pictures'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/pyporscheconnectapi/vehicle.py", line 308, in get_picture_locations
resp = await self.connection.get(
^^^^^^^^^^^^^^^^^^^^^^^^^^
f"/connect/v1/vehicles/{self.vin}/pictures",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/site-packages/pyporscheconnectapi/connection.py", line 69, in get
return await self.request("GET", url, params=params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pyporscheconnectapi/connection.py", line 99, in request
raise PorscheExceptionError(exc.response.status_code) from exc
pyporscheconnectapi.exceptions.PorscheExceptionError
2025-01-10 08:45:30.487 WARNING (ImportExecutor_0) [py.warnings] /usr/local/lib/python3.13/site-packages/miio/miot_device.py:23: FutureWarning: functools.partial will be a method descriptor in future Python versions; wrap it in enum.member() if you want to preserve the old behavior
Bool = partial(_str2bool)
2025-01-10 08:45:33.771 ERROR (MainThread) [homeassistant.components.image] Error while setting up porscheconnect platform for image
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 366, in _async_setup_platform
await asyncio.shield(awaitable)
File "/config/custom_components/porscheconnect/image.py", line 75, in async_setup_entry
PorscheImage(hass, coordinator, vehicle, description)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/porscheconnect/image.py", line 103, in init
self._attr_image_url = vehicle.picture_locations[description.view]
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
KeyError: 'frontView'
2025-01-10 09:00:36.181 ERROR (MainThread) [pyporscheconnectapi.vehicle] Could not get capabilities, error communicating with API: UNKNOWN_ERROR_502
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/pyporscheconnectapi/connection.py", line 96, in request
resp.raise_for_status() # A common error seem to be: httpx.HTTPStatusError: Server error '504 Gateway Time-out'
~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/httpx/_models.py", line 763, in raise_for_status
raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Server error '502 Bad Gateway' for url 'https://api.ppa.porsche.com/app//connect/v1/vehicles/>VIN</pictures'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/pyporscheconnectapi/vehicle.py", line 308, in get_picture_locations
resp = await self.connection.get(
^^^^^^^^^^^^^^^^^^^^^^^^^^
f"/connect/v1/vehicles/{self.vin}/pictures",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/local/lib/python3.13/site-packages/pyporscheconnectapi/connection.py", line 69, in get
return await self.request("GET", url, params=params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pyporscheconnectapi/connection.py", line 99, in request
raise PorscheExceptionError(exc.response.status_code) from exc
pyporscheconnectapi.exceptions.PorscheExceptionError
The text was updated successfully, but these errors were encountered: