nordicopen / easee_hass

Custom component for Easee EV charger integration with Home Assistant
211 stars 34 forks source link

Startup easee component error #37

Closed hmorkemo closed 3 years ago

hmorkemo commented 3 years ago

This error message appeared 12 times after startup of HA. Version 0.9.14 The car is not plugged in.

Logger: homeassistant.helpers.entity Source: custom_components/easee/sensor.py:152 First occurred: 19:49:53 (12 occurrences) Last logged: 19:51:23

Update for sensor.easee_charger_eh266759_consumption_days_1 fails Update for sensor.easee_charger_eh266759_consumption_days_30 fails aiohttp.client_exceptions.ClientResponseError: 503, message='', url=URL('https://api.easee.cloud/api/sessions/charger/EH266759/total/2020-09-18T19:49:53.632696/2020-09-19T19:49:53.632696')

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 469, in async_device_update await self.async_update() # type: ignore File "/config/custom_components/easee/sensor.py", line 152, in async_update self._state = await self.charger.get_consumption_between_dates( File "/usr/local/lib/python3.8/site-packages/easee/charger.py", line 90, in get_consumption_between_dates await self.easee.get(f"/api/sessions/charger/{self.id}/total/{from_date.isoformat()}/{to_date.isoformat()}") File "/usr/local/lib/python3.8/site-packages/easee/easee.py", line 86, in get await self.check_status(response) File "/usr/local/lib/python3.8/site-packages/easee/easee.py", line 99, in check_status await raise_for_status(response) File "/usr/local/lib/python3.8/site-packages/easee/easee.py", line 43, in raise_for_status raise Exception(data) from e Exception:

503 Service Temporarily Unavailable

503 Service Temporarily Unavailable

tmjo commented 3 years ago

Hi,

I've seen it too on my end (mentioned it yesterday in #29. I believe it means that the Easee API didn't respond (i.e. temporarily unavailable), and if that's the case there is not much we can do unless handle the error in a nicer way like we discussed in the other thread.

fondberg commented 3 years ago

We will fix this in #47

fondberg commented 3 years ago

Can you test with the new release?

fondberg commented 3 years ago

can you try with https://github.com/fondberg/easee_hass/releases/tag/v0.9.19?

TheAzzi commented 3 years ago

Not my issue, but while testing version 0.9.19 I have not had any startup issues. As for "503 Service Temporarily Unavailable" i have added my input in #29

astrandb commented 3 years ago

503 is sent from the Easee cloud servers now and then. It is on the TODO list to handle the error in a better way.