nordicopen / easee_hass

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

Errors in log every minute after upgrading to latest version #48

Closed TheAzzi closed 3 years ago

TheAzzi commented 3 years ago

Hi I noticed after upgrading to latest version (0.9.16) I had errors logged every minute. Just now I removed the component and started from scratch, just to make sure the error is not in my configuration.

Running latest HA (0.115.6) and latest Easee charger component (0.9.16).

The errors repeats constantly like this every minute:

2020-10-06 12:12:31 ERROR (MainThread) [easee.easee] Got other exception from status 2020-10-06 12:12:31 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved Traceback (most recent call last): 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 40, in raise_for_status raise NotFoundException(data) easee.exceptions.NotFoundException The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/config/custom_components/easee/entity.py", line 49, in async_refresh self.schedule = await self.charger.get_basic_charge_plan() File "/usr/local/lib/python3.8/site-packages/easee/charger.py", line 120, in get_basic_charge_plan plan = await self.easee.get(f"/api/chargers/{self.id}/basic_charge_plan") 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 107, in check_status raise Exception(ex) from ex Exception 2020-10-06 12:13:31 ERROR (MainThread) [easee.easee] Got other exception from status 2020-10-06 12:13:31 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved Traceback (most recent call last): 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 40, in raise_for_status raise NotFoundException(data) easee.exceptions.NotFoundException The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/config/custom_components/easee/entity.py", line 49, in async_refresh self.schedule = await self.charger.get_basic_charge_plan() File "/usr/local/lib/python3.8/site-packages/easee/charger.py", line 120, in get_basic_charge_plan plan = await self.easee.get(f"/api/chargers/{self.id}/basic_charge_plan") 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 107, in check_status raise Exception(ex) from ex Exception 2020-10-06 12:14:31 ERROR (MainThread) [easee.easee] Got other exception from status 2020-10-06 12:14:31 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved Traceback (most recent call last): 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 40, in raise_for_status raise NotFoundException(data) easee.exceptions.NotFoundException The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/config/custom_components/easee/entity.py", line 49, in async_refresh self.schedule = await self.charger.get_basic_charge_plan() File "/usr/local/lib/python3.8/site-packages/easee/charger.py", line 120, in get_basic_charge_plan plan = await self.easee.get(f"/api/chargers/{self.id}/basic_charge_plan") 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 107, in check_status raise Exception(ex) from ex Exception 2020-10-06 12:15:31 ERROR (MainThread) [easee.easee] Got other exception from status 2020-10-06 12:15:31 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved Traceback (most recent call last): 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 40, in raise_for_status raise NotFoundException(data) easee.exceptions.NotFoundException The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/config/custom_components/easee/entity.py", line 49, in async_refresh self.schedule = await self.charger.get_basic_charge_plan() File "/usr/local/lib/python3.8/site-packages/easee/charger.py", line 120, in get_basic_charge_plan plan = await self.easee.get(f"/api/chargers/{self.id}/basic_charge_plan") 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 107, in check_status raise Exception(ex) from ex Exception

TheAzzi commented 3 years ago

I also just now tried it in my HA virtual test instance (which is basically a default HA installation). I got exactly the same errors in that instance as well.

TheAzzi commented 3 years ago

I downgraded to 0.9.15 now, and the error messages disappeared.

fondberg commented 3 years ago

We are working on a large rewrite which will fix a lot of issues with regards to errors.

Most errors so far is due to their backend responding with either 429 or 50x

fondberg commented 3 years ago

Can you test with the new release?

TheAzzi commented 3 years ago

OK, testing with newest release 0.9.17.

The good news: Previously mentioned error messages disappeared. :-) The bad news: New error message every 10 minutes:

2020-10-07 10:57:44 ERROR (MainThread) [easee.easee] Got other exception from status: NotFoundException 2020-10-07 11:07:44 ERROR (MainThread) [easee.easee] Got other exception from status: NotFoundException 2020-10-07 11:17:44 ERROR (MainThread) [easee.easee] Got other exception from status: NotFoundException

TheAzzi commented 3 years ago

Also not able to switch cable_permanently_locked_charger on/off with this new release 0.9.17. I will downgrade to 0.9.15 again now, but I am happy to test again when needed.

2020-10-07 15:24:58 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140568649062096] 'ChargerData' object has no attribute 'async_refresh' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 137, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1315, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1350, in _execute_service await handler.func(service_call) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service await self.hass.helpers.service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 459, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 655, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 490, in _handle_entity_call await result File "/config/custom_components/easee/switch.py", line 35, in async_turn_off await self.charger_data.async_refresh() AttributeError: 'ChargerData' object has no attribute 'async_refresh' 2020-10-07 15:25:14 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140568649062096] 'ChargerData' object has no attribute 'async_refresh' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 137, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1315, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1350, in _execute_service await handler.func(service_call) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service await self.hass.helpers.service.entity_service_call( File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 459, in entity_service_call future.result() # pop exception if have File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 655, in async_request_call await coro File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 490, in _handle_entity_call await result File "/config/custom_components/easee/switch.py", line 27, in async_turn_on await self.charger_data.async_refresh() AttributeError: 'ChargerData' object has no attribute 'async_refresh'

fondberg commented 3 years ago

We have been tweaking how to fetch data from Easee which returns errors quite often. Can you try with can you try with https://github.com/fondberg/easee_hass/releases/tag/v0.9.19?

TheAzzi commented 3 years ago

Hi,

Did some quick testing of 0.9.19 and so far it seems like a great release!

Resolved many of my issues:

However I'm still able to find some issues: