Tasshack / dreame-vacuum

Home Assistant integration for Dreame robot vacuums with map support
https://community.home-assistant.io/t/custom-component-dreame-vacuum
MIT License
888 stars 111 forks source link

Cannot start integration #670

Closed gczobel closed 3 months ago

gczobel commented 3 months ago

Describe the bug After download the integration, try to add it on the integrations screen. The login screen reports "Could not login to Xiaomi Miio Cloud, check the credentials." but in the logs I see a warning asking to create an issue here.

To Reproduce Try to install the integration. Choose "With map (Automatic)". Add user/password/server country (like in the xiaomi integration) and receive the message "Could not login to Xiaomi Miio Cloud, check the credentials."

Expected behavior Successfully login.

Screenshots If applicable, add screenshots to help explain your problem.

Additional Information (please complete the following information)

2024-08-15 19:13:44.276 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/etc/localtime', 'rb') inside the event loop by custom integration 'dreame_vacuum' at custom_components/dreame_vacuum/dreame/protocol.py, line 67: timezone = datetime.datetime.now(tzlocal.get_localzone()).strftime("%z") (offender: /usr/local/lib/python3.12/site-packages/tzlocal/unix.py, line 189: with open(tzpath, "rb") as tzfile:), please create a bug report at https://github.com/Tasshack/dreame-vacuum/issues For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 641, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1990, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request resp = await request_handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle resp = await handler(request) File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 92, in security_filter_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 83, in forwarded_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 26, in request_context_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 85, in ban_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 242, in auth_middleware return await handler(request) File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 32, in headers_middleware response = await handler(request) File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 73, in handle result = await handler(request, **request.match_info) File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 81, in with_admin return await func(self, request, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 222, in post return await super().post(request, flow_id) File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 74, in wrapper return await method(view, request, data, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 122, in post result = await self._flow_mgr.async_configure(flow_id, data) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 368, in async_configure result = await self._async_configure(flow_id, user_input) File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 415, in _async_configure result = await self._async_handle_step( File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 518, in _async_handle_step result: _FlowResultT = await getattr(flow, method)(user_input) File "/config/custom_components/dreame_vacuum/config_flow.py", line 318, in async_step_with_map self.protocol = DreameVacuumProtocol(username=self.username, password=self.password, country=self.country, prefer_cloud=self.prefer_cloud) File "/config/custom_components/dreame_vacuum/dreame/protocol.py", line 477, in __init__ self.cloud = DreameVacuumCloudProtocol(username, password, country) File "/config/custom_components/dreame_vacuum/dreame/protocol.py", line 67, in __init__ timezone = datetime.datetime.now(tzlocal.get_localzone()).strftime("%z")

Tasshack commented 3 months ago

Install the Beta.