Custom Component: Dreame Vacuum

Nice statement from you. Good luck with your problem.

Hey there! Iā€™m trying to add this integration but it asks for a Xiaomi Miio cloud account? I donā€™t have that, Iā€™m using a Dreame account with their app. Did I do something wrong perhaps? The Dreameā€™s account didnā€™t work for me (it said the credentials are wrong or something similar)
I have a Dreame Ultra L20 something (not sure if itā€™s L20s Ultra or whatever) and I really want it added to my Home Assistant. Any help on doing so would be greatly appreciated!

1 Like

Iā€˜ve a very short question:
Can this integration be used in parallel to the normal dreame app ?

I assume it does but I want to keep the wife acceptance factor of my Home Assistent as high a possible.
She wants to use the dreame app first because weā€˜ve had some self created trouble with our Home Assistent instance the last weeks.

Does anyone have the YAML for this?

rooms

Beta version can.

Install Beta version.

Yeah, as I told you directly, the Bot has two apps: the Home version that uses the cloud setup and the bot-only version that does not provide access to or information about the cloud.

So, if you, like me, only use the bot app, you are missing the core of whatā€™s needed to make your app work. It might be worth sharing this as part of the setup.

You may be offended, but asking and seeing things differently adds value to your project and improves it.

Then do it yourself. You should not be concerning about the value of a project you donā€™t event understand.

works great, thanks :slight_smile:

Hello everyone. As i can see some people already mentioned the issue I am facing but I was not able to see any solutions so PLEASE HELP :rofl:

I have a dream l10s ultra which I am controlling over dreame app. i installed the dreame integration and in order to access it using my dreame account, I need to download the beta but it keeps changing the selection backto 1.0.4. I first downloaded 1.0.4 and then I tried to redownload the beta version but that did not work as well. Can someone please explain me what am I doing wrong here ?

Have you tried removing it before trying to install the Beta?

So you do not want to know when things related to the project like dependence is not the same for all users or locations, like the app that do not use the general cloud for storage that you depend on?

A Funny way to improve a project, good luck with that development technique,

Why do you say I do not understand something, you do not know me, and you have no idea about what I understand or not, You are just rude and condescending because I found a flaw in your solution and somehow think that a personal thing and not opportunity to improve it,

thanks for the code and your comments, and good luck with the project

Hi, I just installed v2.0.0b14 because I ha problems with the service calls in my scripts. I deinstalled the old version (b11), did a reboot, reinstalled b14, reboot and tried to setup my l10s ultra afterwards. I always get a timeout:

2024-05-27 10:32:16.026 INFO (MainThread) [custom_components.dreame_vacuum] Integration loading: Kevin
2024-05-27 10:32:16.029 INFO (MainThread) [custom_components.dreame_vacuum] Integration starting...
2024-05-27 10:32:16.030 DEBUG (SyncWorker_13) [custom_components.dreame_vacuum.dreame.device] Device update: 5
2024-05-27 10:32:17.131 INFO (SyncWorker_13) [custom_components.dreame_vacuum.dreame.device] Connecting to device
2024-05-27 10:32:17.224 INFO (SyncWorker_13) [custom_components.dreame_vacuum.dreame.device] Connected to device: dreame.vacuum.r2228o 4.3.9_3204
2024-05-27 10:32:21.323 ERROR (SyncWorker_13) [miio.miioprotocol] Got error when receiving: timed out
2024-05-27 10:32:21.333 WARNING (MainThread) [custom_components.dreame_vacuum] Integration start failed: Traceback (most recent call last):
  File "/usr/local/lib/python3.12/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.12/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 437, in _async_update_data
    await self.hass.async_add_executor_job(self._device.update)
  File "/usr/local/lib/python3.12/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 2526, in update
    self.connect_device()
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 1844, in connect_device
    self._request_properties()
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 645, in _request_properties
    result = self._protocol.get_properties(props[:15])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/dreame_vacuum/dreame/protocol.py", line 1233, in get_properties
    return self.send("get_properties", parameters=parameters, retry_count=retry_count)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/dreame_vacuum/dreame/protocol.py", line 1230, in send
    return self.device.send(method, parameters=parameters, retry_count=retry_count)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/miio/miioprotocol.py", line 233, in send
    return self.send(
           ^^^^^^^^^^
  File "/usr/local/lib/python3.12/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

2024-05-27 10:32:21.333 INFO (MainThread) [custom_components.dreame_vacuum.dreame.device] Disconnect
2024-05-27 10:32:21.344 DEBUG (MainThread) [custom_components.dreame_vacuum] Finished fetching dreame_vacuum data in 5.315 seconds (success: False)

Has anyone a hint whatā€™s going wrong? The vacuum works via the xiaomi app. It does not matter if I configure it with my xiaomi account with or without cloud nor the manual configuration with IP and tokenā€¦

Real humor in this is the thing you have wanted is already in the project but you donā€™t have any idea because you donā€™t read anything related to the project. Thatā€™s why you got a response like this and not that because you found a flaw or a missing thing about me or my work.
And finally, I really donā€™t care people are linking this project or cannot use it. Its just a piece of code that I have choose to share to the world for free and you should be thankful for that.

1 Like

Is the vacuum and server are on the same network subnet?

Who can point me in the right direction. Iā€™m totally new to Home Assistant, not new to home automation software but I wanted to give it a try and this Dreame integration is one of the main reasons (really good work:) )

So I installed the HACS, the Dreame Vacuum integration and Iā€™m trying to configure/connect my device.
I own a Dreame X20 Pro, I have a Chinese Mainland account where the vacuum is added to, when I add the credentials and choice the correct server region (in my case Deutschland), I canā€™t connect with the prefer cloud connection, if I donā€™t check the box and press send, it seems to connect, but after 10 secondes or so, it gives an error ā€œfailed to connectā€ with the description how to obtain the token.

So I tried the methode with the ā€œGet Mi Home device tokenā€ app from GitHub, I can login and see that the Deutsche server is correct, but also the pre-filled token is correct, so if I press send again, it still keeps giving the ā€œfailed to connectā€ error.

Is there another way to connect to my vacuum?

I was reading some old posts and saw some replies with similar problems and that they should try the beta version, so I did as well.

With that version I was able to configure my device with the Dreame login option during configuration, great work!

Since this is a region locked device (Dreame X20 Pro), Iā€™m able to change some settings that I couldnā€™t edit before, thanks so much!!

Will deffinitly donate that coffee to you @tasshack :slight_smile:

For the people that are having issues upgrading the integration.

Good morning, can you give me some help with using the custom clean service on the newest beta, please? I have a Dreame L10s Ultra, and I want to set an automation to change the cleaning from Sweeping to Sweeping and Mopping based on day. The trigger isnā€™t an issue rather it is the action that I cannot seem to get working.

Currently I have it configured as follows:

service: dreame_vacuum.vacuum_set_custom_cleaning
target:
  entity_id: vacuum.eve_2_0
data:
  repeats:
    - 1
  water_volume:
    - 3
    - 3
    - 3
  suction_level:
    - 2
    - 2
    - 2
  cleaning_mode:
    - 'Cleaning and mopping'
  segment_id:
    - 1
    - 2
    - 3

I checked the States in Developer Tools to confirm room idā€™s and used the numbers presented there. When I try to run the action it gives me an unknown error.

Is this the correct way to pull down the segment idā€™s? Also, anyone have any ideas on how to correct what I have?

Thank you in advance!