dreame-vacuum: Map cannot be updated live

Describe the bug Hi I can still not get my map live updated. The camera entity is updated every 3 seconds, but the map will only get updated after a long delay (several minutes). It doesn’t help to restart HA or reset the device.

Screenshots These 2 screenshots are taken nerely at the same time:

  • Map from dreame-vacuum: Map from dreame-vacuum
  • Map from Xiaomi-Cloud-Map-Extractor: Map from dreame-vacuum This map is updated with the following script every 5 seconds:
    service: xiaomi_miot.call_action
    data:
      entity_id: vacuum.dreame_p2027_27d7_robot_cleaner
      siid: 6
      aiid: 1
      params:
        - piid: 2
          value: "{\"req_type\":1,\"frame_type\":\"I\",\"force_type\":1}"
      throw: true
    

Additional Information (please complete the following information)

  • Model Name: dreame.vacuum.p2027
  • Firmware Version: 4.1.8_1092
  • Home Assistant Version: 20221010.0 - latest
  • Errors or warnings shown in the HA logs:
Logger: custom_components.dreame_vacuum.dreame.map
Source: custom_components/dreame_vacuum/dreame/map.py:435
Integration: Dreame Vacuum (documentation, issues)
First occurred: 16:55:51 (442 occurrences)
Last logged: 18:16:15

Map update Failed: get_device_property failed
Map update Failed: 'DreameVacuumDeviceStatus' object has no attribute 'silver_ion'
Send request map failed: No response from the device
Logger: homeassistant.helpers.entity
Source: helpers/entity.py:515
First occurred: 16:54:47 (36 occurrences)
Last logged: 18:06:22

Update of camera.w10 is taking over 10 seconds
Update of sensor.cleargrass_dk1_bcd0_temperature_humidity_sensor is taking over 10 seconds
Update of sensor.lumi_v1_2624_temperature_humidity_sensor is taking over 10 seconds
Update of vacuum.dreame_p2027_27d7_robot_cleaner is taking over 10 seconds
Logger: custom_components.dreame_vacuum.dreame.protocol
Source: custom_components/dreame_vacuum/dreame/protocol.py:379
Integration: Dreame Vacuum (documentation, issues)
First occurred: 17:43:14 (2 occurrences)
Last logged: 17:43:27

Got error when receiving: timed out
Logger: root
Source: custom_components/dreame_vacuum/dreame/types.py:587
Integration: Dreame Vacuum ([documentation](https://github.com/Tasshack/dreame-vacuum), [issues](https://github.com/Tasshack/dreame-vacuum/issues))
First occurred: 16:55:12 (1 occurrences)
Last logged: 16:55:12

Uncaught thread exception
Traceback (most recent call last):
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 564, in _update_task
    self.update()
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 939, in update
    raise DeviceUpdateFailedException(ex) from None
custom_components.dreame_vacuum.dreame.exceptions.DeviceUpdateFailedException: 'DreameVacuumDeviceStatus' object has no attribute 'silver_ion'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.10/threading.py", line 1378, in run
    self.function(*self.args, **self.kwargs)
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 570, in _update_task
    self._update_failed(ex)
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 557, in _update_failed
    self._error_callback(ex)
  File "/config/custom_components/dreame_vacuum/coordinator.py", line 255, in async_set_update_error
    super().async_set_update_error(ex)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 292, in async_set_update_error
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 110, in async_update_listeners
    update_callback()
  File "/config/custom_components/dreame_vacuum/entity.py", line 112, in _handle_coordinator_update
    super()._handle_coordinator_update()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 348, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 533, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 570, in _async_write_ha_state
    available = self.available  # only call self.available once per update cycle
  File "/config/custom_components/dreame_vacuum/entity.py", line 147, in available
    return self.entity_description.available_fn(self.device)
  File "/config/custom_components/dreame_vacuum/dreame/types.py", line 587, in <lambda>
    DreameVacuumAction.RESET_SILVER_ION: lambda device: bool(device.status.silver_ion < 100),
AttributeError: 'DreameVacuumDeviceStatus' object has no attribute 'silver_ion'
Logger: custom_components.dreame_vacuum
Source: helpers/update_coordinator.py:290
Integration: Dreame Vacuum ([documentation](https://github.com/Tasshack/dreame-vacuum), [issues](https://github.com/Tasshack/dreame-vacuum/issues))
First occurred: 16:55:12 (1 occurrences)
Last logged: 16:55:12

Error requesting dreame_vacuum data: 'DreameVacuumDeviceStatus' object has no attribute 'silver_ion'
Logger: custom_components.dreame_vacuum.dreame.device
Source: custom_components/dreame_vacuum/dreame/device.py:567
Integration: Dreame Vacuum ([documentation](https://github.com/Tasshack/dreame-vacuum), [issues](https://github.com/Tasshack/dreame-vacuum/issues))
First occurred: 16:55:12 (1 occurrences)
Last logged: 16:55:12

Update Failed: 'DreameVacuumDeviceStatus' object has no attribute 'silver_ion'

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 25 (13 by maintainers)

Most upvoted comments

Everything seems fine with the log and there are no errors and warnings regarding the dreame vacuum. Seems like rendering is taking too much time (between 1s-2s) and you are getting extra delays because of that. I will create a custom card for rendering map on front end to fix this issue like the valetudo map card does.

Even you don’t send map request action to device by script, both integrations are still requesting properties from the device at the background. If both integrations ask for properties from device at the same time, device wont respond to both them and that is why your are getting errors like Got error when receiving: timed out or Send request map failed: No response from the device. Waiting for device properties should not affect the map update performance because of that i will send you a new release for further investigating the issue but i am happy that your issue is partially fixed.

No this a different but similar to silver_ion issue, i will fix this too and release a new version.