BnMcG / HomeAssistant-RoboVac

Component to implement Eufy RoboVac support in Home Assistant
Apache License 2.0
45 stars 14 forks source link

RuntimeError: I/O must be done in the executor #16

Open halots opened 3 years ago

halots commented 3 years ago

Looks like a new error, not sure if anyone is working this, or maybe I'm doing something wrong?

2021-05-02 08:00:53 WARNING (MainThread) [homeassistant.components.vacuum] VacuumDevice is deprecated, modify RobovacVacuum to extend VacuumEntity 2021-05-02 08:00:56 WARNING (MainThread) [homeassistant.util.async_] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for eufyrobovac doing I/O at custom_components/eufyrobovac/vacuum.py, line 49: local_code = get_local_code(eufy_username, eufy_password, ip_address) 2021-05-02 08:00:56 ERROR (MainThread) [homeassistant.components.vacuum] Error while setting up eufyrobovac platform for vacuum Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 205, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/eufyrobovac/vacuum.py", line 49, in async_setup_platform local_code = get_local_code(eufy_username, eufy_password, ip_address) File "/usr/local/lib/python3.8/site-packages/robovac/robovac.py", line 31, in get_local_code login_request = requests.post("https://home-api.eufylife.com/v1/user/email/login", json=login_payload) File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 119, in post return request('post', url, data=data, json=json, kwargs) File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, kwargs) File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send r = adapter.send(request, kwargs) File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 394, in _make_request conn.request(method, url, httplib_request_kw) File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 234, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "/usr/local/lib/python3.8/http/client.py", line 1255, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/local/lib/python3.8/http/client.py", line 1266, in _send_request self.putrequest(method, url, skips) File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 214, in putrequest return HTTPConnection.putrequest(self, method, url, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/util/async.py", line 150, in protected_loop_func checkloop() File "/usr/src/homeassistant/homeassistant/util/async.py", line 139, in check_loop raise RuntimeError( RuntimeError: I/O must be done in the executor; Use await hass.async_add_executor_job() at custom_components/eufyrobovac/vacuum.py, line 49: local_code = get_local_code(eufy_username, eufy_password, ip_address)

belta1 commented 2 years ago

Hi, I am getting the exact same error when installing for the first time. I installed this custom integration via HACS: 2021-09-24 01:08:02 WARNING (MainThread) [homeassistant.util.async_] Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for eufyrobovac doing I/O at custom_components/eufyrobovac/vacuum.py, line 49: local_code = get_local_code(eufy_username, eufy_password, ip_address) 2021-09-24 01:08:02 ERROR (MainThread) [homeassistant.components.vacuum] Error while setting up eufyrobovac platform for vacuum Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/eufyrobovac/vacuum.py", line 49, in async_setup_platform local_code = get_local_code(eufy_username, eufy_password, ip_address) File "/usr/local/lib/python3.9/site-packages/robovac/robovac.py", line 31, in get_local_code login_request = requests.post("https://home-api.eufylife.com/v1/user/email/login", json=login_payload) File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 119, in post return request('post', url, data=data, json=json, kwargs) File "/usr/local/lib/python3.9/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, kwargs) File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 542, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 655, in send r = adapter.send(request, kwargs) File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 394, in _make_request conn.request(method, url, httplib_request_kw) File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 234, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "/usr/local/lib/python3.9/http/client.py", line 1257, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/local/lib/python3.9/http/client.py", line 1268, in _send_request self.putrequest(method, url, skips) File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 214, in putrequest return HTTPConnection.putrequest(self, method, url, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/util/async.py", line 151, in protected_loop_func checkloop() File "/usr/src/homeassistant/homeassistant/util/async.py", line 140, in check_loop raise RuntimeError( RuntimeError: I/O must be done in the executor; Use await hass.async_add_executor_job() at custom_components/eufyrobovac/vacuum.py, line 49: local_code = get_local_code(eufy_username, eufy_password, ip_address)