CodeFoodPixels / robovac

Add a Eufy RoboVac easily to Home Assistant
Other
143 stars 32 forks source link

Unable to add devices #10

Closed DazOPC closed 1 year ago

DazOPC commented 1 year ago

Hi, a list of my vacuums shows up but when I select one and add the IP it does not get added.

I checked the logs and the only error I see is:

" File "/config/custom_components/robovac/vacuum.py", line 231, in init self._attr_access_token = item[CONF_ACCESS_TOKEN]


KeyError: 'access_token'"

Thanks

Edit

Found the proper log, see below:

2023-08-17 12:57:41.640 ERROR (MainThread) [homeassistant.components.vacuum] Error while setting up robovac platform for vacuum
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 362, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/robovac/vacuum.py", line 110, in async_setup_entry
    async_add_entities([RoboVacEntity(item)])
                        ^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/robovac/vacuum.py", line 231, in __init__
    self._attr_access_token = item[CONF_ACCESS_TOKEN]
                              ~~~~^^^^^^^^^^^^^^^^^^^
KeyError: 'access_token'
2023-08-17 12:58:43.373 ERROR (MainThread) [homeassistant.components.vacuum] Error while setting up robovac platform for vacuum
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 362, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/robovac/vacuum.py", line 110, in async_setup_entry
    async_add_entities([RoboVacEntity(item)])
                        ^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/robovac/vacuum.py", line 231, in __init__
    self._attr_access_token = item[CONF_ACCESS_TOKEN]
                              ~~~~^^^^^^^^^^^^^^^^^^^
KeyError: 'access_token'
CodeFoodPixels commented 1 year ago

Can you try going through the setup process again? Logging into eufy etc

DazOPC commented 1 year ago

Have tried multiple times, installed and unistalled the plugin, used version 1 and the main version nothing works for me :(

DazOPC commented 1 year ago

So I removed the previous login and tried re adding it, now I get the below.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/config/custom_components/robovac/config_flow.py", line 130, in async_step_user valid_data = await validate_input(self.hass, user_input) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/robovac/config_flow.py", line 112, in validate_input await hass.async_add_executor_job(get_eufy_vacuums, data) File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/robovac/config_flow.py", line 65, in get_eufy_vacuums response = eufy_session.get_user_info() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/robovac/eufywebapi.py", line 33, in get_user_info return requests.post( ^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/requests/api.py", line 115, in post return request("post", url, data=data, json=json, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/requests/adapters.py", line 532, in send raise ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='home-api.eufylife.com', port=443): Read timed out. (read timeout=1.5)

Thanks

CodeFoodPixels commented 1 year ago

That's it struggling to get to Eufy in time, if you give it another try, it should go through

CodeFoodPixels commented 1 year ago

Same as #2