dreame-vacuum: Fails to start integration when "Prefer cloud connection" is unchecked

When the Prefer cloud connection configuration option is unchecked, the integration fails to start. It’s working when I do check this option (I’d prefer to get rid of the cloud entirely, BTW).

  • Model Name: dreame.vacuum.r2228o (L10s Ultra)
  • Firmware Version: 4.3.9_3031
  • Home Assistant Version: 2023.12.1
  • Configuration Type: With map support

Logs:

2023-12-13 03:45:39.917 WARNING (MainThread) [custom_components.dreame_vacuum] Integration start failed: Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/miio/miioprotocol.py", line 193, in send
    data, addr = s.recvfrom(4096)
                 ^^^^^^^^^^^^^^^^
TimeoutError: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/miio/miioprotocol.py", line 193, in send
    data, addr = s.recvfrom(4096)
                 ^^^^^^^^^^^^^^^^
TimeoutError: timed out
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/config/custom_components/dreame_vacuum/coordinator.py", line 326, in _async_update_data
    await self.hass.async_add_executor_job(self.device.update)
  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/dreame_vacuum/dreame/device.py", line 996, in update
    self.connect_device()
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 733, in connect_device
    self._request_properties()
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 262, in _request_properties
    result = self._protocol.get_properties(props[:15])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/dreame_vacuum/dreame/protocol.py", line 543, in get_properties
    return self.send("get_properties", parameters=parameters, retry_count=retry_count)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/dreame_vacuum/dreame/protocol.py", line 536, in send
    return self.device.send(method, parameters=parameters, retry_count=retry_count)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/miio/miioprotocol.py", line 233, in send
    return self.send(
           ^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/miio/miioprotocol.py", line 241, in send
    raise DeviceException("No response from the device") from ex
miio.exceptions.DeviceException: No response from the device

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 20 (9 by maintainers)

Most upvoted comments

Please check the vacuum and HA is at the same network subnet and if already is, probably you have previously installed your device to the Dreamehome App for getting the firmware updates and then you have switched to the Mi Home app without hard resetting the device. Device disables the local api when it is installed to the Dreamehome App and it does not re-enabled when reinstalled to the Mi Home app again. Only way to re-enable the local api is hard resetting the device.

Also you would be able to use the camera streaming feature (not within the integration yet) when you switched to the Dreamehome app.

Vacuum does everything same as the Mi Home cloud. Mqtt server is installed on the Dreame cloud machine and it relays vacuum update property requests internally. Integration justs subscribes it and listens the updates from cloud instead of requesting them periodically.

@ghmeister Dreamehome account support is available on Beta. You need to also install the Beta version of the integration from HACS.

as there is no information for the user. If this situation can be somehow detected, it would be great to propose the user the solution.

This issue can happen with multiple resons so there is no way to tell why the integration cannot reach to the device, it is same as like the device turned of completely. Not all vacuums can be installed to the Dreamehome app also switching between apps back and forth is not a normal user behaviour and not forseen even by Dreame engineers so they did not test this and has forgotten to add to code for re-enabling the local api from the device firmware.

If not, than at least a warning next to the checkbox would be nice. Or at least some kind info in the README.md 😉

Please do not forget that the warning you wanted to see must be short enough to fit to the mobile phone screen and should be translated to every availabile language just for covering this case. Most of the people just enable the checkbox and does not matter the rest even if I try to warn them to use this option only when vacuum and server are not in the same network. Miot does this automatically when it cannot be reached over local network.

Another option is installing the device to the Dreamehome app again and swiching to the Beta version of the integration that supports Dreamehome account login. Dreamehome cloud does not have local communication support but instead it has an mqtt server for supporting push messages so the integration does not need to send requests to the cloud constantly for getting updates. Don’t forget that integration also constantly sends requests to the cloud for getting the map data even you disable Prefer Cloud option so using Dreamehome app will also prevent that too even it requires constant cloud communication.