DasBasti / SmartHashtag

Homeassistant component for Smart #1/#3 API
MIT License
35 stars 1 forks source link

Server error '504 Gateway Timeout' #177

Open chriscatuk opened 4 days ago

chriscatuk commented 4 days ago

Version of the custom_component

0.5.2, with HASS 2024.10.1

Configuration

1 car identified by its VIN among 3 available in the list of cars on same account

Describe the bug

I have 3 cars with the same account. 1 car per Home Assistant. (one car per home).

Car A is working perfectly, even when I reload the integration.

Car B started failing with the error bellow 11 hours ago. Then, curious I restarted Car C integration and it started failing with the same error. Even if I reload.

Car B and C are from the French market. Car A is from UK market. So it could still be server maintenance one country at a time. It has been happening for at least 12 hours.

What troubles me, is that it still works in Hello #. So I wonder if it's not instead the way multiple cars are handled.

Debug log

Logbook Last update changed to 6 October 2024 at 08:08 (11 hours ago)


This error originated from a custom integration.

Logger: custom_components.smarthashtag
Source: helpers/update_coordinator.py:354
integration: Smart (documentation, issues)
First occurred: 09:44:03 (22 occurrences)
Last logged: 17:47:44

Unexpected error fetching smarthashtag data
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 354, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/smarthashtag/coordinator.py", line 44, in _async_update_data
    return await self.account.get_vehicles()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pysmarthashtag/account.py", line 101, in get_vehicles
    await self.config.authentication.login()
  File "/usr/local/lib/python3.12/site-packages/pysmarthashtag/api/authentication.py", line 122, in login
    token_data = await self._login()
                 ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pysmarthashtag/api/authentication.py", line 243, in _login
    r_api_access = await client.post(
                   ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1905, in post
    return await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1585, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1674, in send
    response = await self._send_handling_auth(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1702, in _send_handling_auth
    response = await self._send_handling_redirects(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1760, in _send_handling_redirects
    raise exc
  File "/usr/local/lib/python3.12/site-packages/httpx/_client.py", line 1742, in _send_handling_redirects
    await hook(response)
  File "/usr/local/lib/python3.12/site-packages/pysmarthashtag/api/authentication.py", line 296, in raise_for_status_handler
    response.raise_for_status()
  File "/usr/local/lib/python3.12/site-packages/httpx/_models.py", line 763, in raise_for_status
    raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Server error '504 Gateway Timeout' for url 'https://api.ecloudeu.com/auth/account/session/secure?identity_type=smart'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504
DasBasti commented 2 days ago

I do not see any 504 in my logs for a German market Smart #1. Is it working again now?

chriscatuk commented 2 days ago

Yes it's working again.

Thank you