walthowd / ha-automower

Automower Custom Component for Home Assistant
38 stars 15 forks source link

401 Client Error #7

Open adandl opened 4 years ago

adandl commented 4 years ago

Hello! Component seems to work, however I receive many (> 2800 times) errors in the log-file like these:

I use HomeAssistant 0.108.6

Protokolldetails ( ERROR )
Logger: homeassistant.helpers.entity
Source: custom_components/automower/__init__.py:290
First occurred: 20. April 2020, 16:41:42 (2885 occurrences)
Last logged: 9:29:42

Update for vacuum.edelsgrub fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 476, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/automower/__init__.py", line 290, in update
    self._state = self._api.status()
  File "/usr/local/lib/python3.7/site-packages/pyhusmow/husmow.py", line 182, in status
    response.raise_for_status()
  File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://amc-api.dss.husqvarnagroup.net/v1/mowers/181003060-171934209/status

Can you please look into this and let me know if I can provide additional information / do testing, etc!

Thank you very much!

Albert

krconv commented 3 years ago

I got a similar error after about 20 days of uptime with no Home Assistant restarts

Stack trace
2021-09-13 05:16:07 ERROR (MainThread) [homeassistant.helpers.entity] Update for vacuum.mo fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 446, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 654, in async_device_update
    raise exc
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/automower/__init__.py", line 388, in update
    self._state = self._api.status()
  File "/usr/local/lib/python3.9/site-packages/pyhusmow/husmow.py", line 182, in status
    response.raise_for_status()
  File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 943, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://amc-api.dss.husqvarnagroup.net/v1/mowers/201106391-200652209/status
JoeAstor commented 2 years ago

Any update guy´s?