Custom Component: Dreame Vacuum

I found the button without touching the template manually, thanks for the hint :slight_smile:

Hello! I’m trying to connect X30 pro via home assistance. Everything seems to have been done correctly, but the vacuum cleaner does not accept commands from the HA. All analytics are visible on the vacuum cleaner card (battery charge, position, etc.), but when commands are sent to the vacuum cleaner, the latter does not respond. What could be the catch? I also noticed that when registering the vacuum cleaner in the DREAMHOME application, the start/stop buttons did not become active, but the battery charge and name were determined correctly. these buttons are illuminated only when the vacuum cleaner is activated manually using the buttons on the vacuum cleaner itself.

2024-01-03 19:42:26.026 ERROR (SyncWorker_2) [custom_components.dreame_vacuum.dreame.device] Property not updated: RESUME_CLEANING: 1 → 0

2024-01-03 19:49:18.771 ERROR (SyncWorker_5) [custom_components.dreame_vacuum.dreame.device] Send action failed START (None): {‘did’: ‘760595068’, ‘siid’: 2, ‘aiid’: 1, ‘code’: -1}

This is because your device is region locked and you should already know this from the App.

Hello, I have a problem and would be happy to get some help. I would like to use an Ikea shortcut button to clean my DremeBot L10s Ultra in the same place every time. I would be happy about help. Thanks.

This is the automation:

alias: Test 1
description: “”
trigger:

  • device_id: b595688d48ad09f18ae5c6rdt6bd59bc
    domain: zha
    platform: device
    type: remote_button_short_press
    subtype: turn_on
    condition:
    action:
  • service: vacuum.send_command
    data:
    command: app_segment_clean
    params:
    map_idx: 1
    zone_coordinates:
    - - 3470
    - 3282
    - 2055
    - 2009
    target:
    device_id: cebfcddab4c51c39re519561096a13a4

Hello, there is a service that I can call from a simple button to press PLAY? so I can use the clean sequence and the customized cleaning just clicking a button, without opening the vacuum status. And there is a way to do that for a single room? thanks

m30 pro plz…

I think M30 is a Roborock device and not Dreame.

Hi team,
I’ve installed the plugin for manage Dreame D9 Vaccum; I’m able to connect start it and see the map.
If use the room clean selection doesn’t work with this issue:

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:238
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 11:56:17 (8 occurrences)
Last logged: 12:25:38

[139690967461440] No response from the device
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 “/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py”, line 238, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/core.py”, line 2149, in async_call
response_data = await coro
^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/core.py”, line 2186, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/entity_component.py”, line 272, in handle_service
return await service.entity_service_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 882, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/service.py”, line 952, in _handle_entity_call
result = await task
^^^^^^^^^^
File “/config/custom_components/dreame_vacuum/vacuum.py”, line 734, in async_send_command
await self._try_command(
File “/config/custom_components/dreame_vacuum/entity.py”, line 119, in _try_command
await self.hass.async_add_executor_job(partial(func, *args, **kwargs))
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 1207, in send_command
self._protocol.send(command, parameters, 1)
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

Shall i choose different method on configuration?

Thanks

---- UPDATE -----
if I use the call from services it works:

Device is not responding because you are sending something not supposed to be sent to it therefore it does not understand the command.

I just selected the room and press the button from map card:

Should be the same command test clean segment?

— FIXED— choose the right configration from menu for dreame vacuum.

trying to add my D10 plus… in home assistent, but in the config… i get failed to connect

image

how can i resolve

i have the same problem… failed to connect… how to resolve… what log do you want to see,… because i checked to log and see no entry about this

for those who have a fail to connect too…

if you have the edream app on your phone and the xiaomi app… and you use the edream app… then it won;t work… make sure all is set in the xiaomi app not the edream app

1 Like

Hello all and thanks to @tasshack for this excellent integration! i am looking for a way to use Scheduler in order to set-up at a certain time and days the cleaining (sweeping_and_mopping) for all the rooms, but i can’t finsd out a symple way to call this service. Nowadays i create a input_boolean that through an automation set the conditions i need (sweeping_and_mopping and all the rooms)
the automation:

alias: Robot
description: ""
trigger:
  - platform: state
    entity_id:
      - input_button.avvio_lavaggio_e_aspirazione
condition: []
action:
  - service: dreame_vacuum.vacuum_set_cleaning_sequence
    target:
      entity_id:
        - vacuum.dreamebot_l10s_ultra
    data:
      cleaning_sequence: 1,2,3
  - service: select.dreamebot_l10s_ultra_cleaning_mode
    target:
      entity_id:
        - vacuum.dreamebot_l10s_ultra
    data:
      cleaning_mode: sweeping_and_mopping
  - service: vacuum.turn_on
    metadata: {}
    data: {}
mode: single

How do you figured out to set a scheduler for your vacuum?
is there a different way thasn mine (not yet fully tested in any case)
thanks

1 Like

Hi All!
I have integrated an L20. So far so good. I wanted to ask if there is a way to access the “shortcuts” directly from HA? Thank you!

1 Like

You can find the shortcut in “Setting - Devices & Services - Entities.”
I create a button as trigger in my desktop. Hope this help.

thanks for yout help…I can not find the shortcuts in the Entities…how are these named in your list?

After you create the shortcut with the mobile app, it should be visible in entities. My shown has “button.dreamebot_l20_ultra_shortcut_1”

I can not see my shortcuts there…Because of the l20, I`ve installed the beta version 2.0.0.b11…Which version do you use?

thanks!