DurgNomis-drol / ha_toyota

Toyota Connected Services integration for Home Assistant.
MIT License
148 stars 29 forks source link

Failed setup and no logs #238

Closed daha76 closed 7 months ago

daha76 commented 7 months ago

Describe the bug Hello, Since I updated HA Core to 2024.2.1 I can't get this integration to work as before. Even worse I can't see any logs from this integration. No matter which level I set (I set it to debug, I get detailed log output from everything but Toyota integration log messages were missing...). I tried to reinstall the integration, but no go. I also tried debug log switch provided by integration, but still no logs. Am I doing something wrong?

To Reproduce Supervised installation of HA 2024.2.1 on RPi 4B 4GB. Toyota Integration installed via HACS - latest version 2.0.1.

Install and try to set up the integration in HA 2024.2.1.

Expected behavior It will work and there will be some log messages in HA logs.

Additional context Add any other context about the problem here.

LarsLautrup commented 7 months ago

I have the same issue. Deleted, rebooted, reinstalled and rebooted. Same issue.

CM000n commented 7 months ago

Unfortunately, there is not much we can do without logs.

Which version of the custom component do you currently have installed and which installation type of Home Assistant are you using? There may be a hint in the stdout and stderr messages of your system. It is probably also this error: https://github.com/DurgNomis-drol/ha_toyota/issues/236

You could also explicitly activate DEBUG logging in the mytoyota python lib. But for this you might need a little more understanding of python and have to manually change a line of code in the installed package.

meanmrgreen commented 7 months ago

I get this aswell. Only error message i have found is error 500 internal server error.

Using the latest version released a few days ago

daha76 commented 7 months ago

Unfortunately, there is not much we can do without logs.

Which version of the custom component do you currently have installed and which installation type of Home Assistant are you using? There may be a hint in the stdout and stderr messages of your system. It is probably also this error: #236

You could also explicitly activate DEBUG logging in the mytoyota python lib. But for this you might need a little more understanding of python and have to manually change a line of code in the installed package.

I updated the description with additional details of my installation.

CM000n commented 7 months ago

Unfortunately, there is not much we can do without logs. Which version of the custom component do you currently have installed and which installation type of Home Assistant are you using? There may be a hint in the stdout and stderr messages of your system. It is probably also this error: #236 You could also explicitly activate DEBUG logging in the mytoyota python lib. But for this you might need a little more understanding of python and have to manually change a line of code in the installed package.

I updated the description with additional details of my installation.

Have you looked at your stdout / stderr?

daha76 commented 7 months ago

Unfortunately, there is not much we can do without logs. Which version of the custom component do you currently have installed and which installation type of Home Assistant are you using? There may be a hint in the stdout and stderr messages of your system. It is probably also this error: #236 You could also explicitly activate DEBUG logging in the mytoyota python lib. But for this you might need a little more understanding of python and have to manually change a line of code in the installed package.

I updated the description with additional details of my installation.

Have you looked at your stdout / stderr?

Not yet, I will check it when I am back at home. But HA supervised runs as a service so I can check service logs/status with systemctl/journalctl or you are interested in something else?

UPDATE: I haven't found anything in the log files...

flynnjonsson commented 7 months ago

Same problem for me, but I have not yet upgraded to 2024.2.1, I am running on 2023.10.3. It worked 2 days ago. I updated the integration. Error Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble

Nothing in the log.

thmz82 commented 7 months ago

Same here. The last history entries of my Toyotas entities are from 2024-02-12 around 6:45am (CET). I also did not update HA for a few weeks now (running version 2024.1.3).

In the System Logs via UI I don't see anything regarding the Toyota integration. But in the docker logs I found the following error message (multiple times):

2024-02-12 06:47:09 ERROR Unexpected error fetching toyota data: 1 validation error for VehiclesResponseModel
payload -> 0 -> shopGenuinePartsUrl
  none is not an allowed value (type=type_error.none.not_allowed)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 300, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 256, in _async_update_data
    return await self.update_method()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/toyota/__init__.py", line 71, in async_get_vehicle_data
    vehicles = await asyncio.wait_for(client.get_vehicles(metric=use_metric_values), 15)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/tasks.py", line 489, in wait_for
    return fut.result()
           ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/mytoyota/client.py", line 64, in get_vehicles
    vehicles = await self._api.get_vehicles_endpoint()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/mytoyota/api.py", line 81, in get_vehicles_endpoint
    parsed_response = await self._request_and_parse(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/mytoyota/api.py", line 55, in _request_and_parse
    return model(**response)
           ^^^^^^^^^^^^^^^^^
  File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
CM000n commented 7 months ago

So it is the same error already reported here 😉 https://github.com/DurgNomis-drol/ha_toyota/issues/236

I will close this issue as duplicate but will see if we can get better logging of model Validation Errors in the future.

daha76 commented 7 months ago

It seems like the latest update helped and integration is working again, thanks a lot.