Custom Component: Dreame Vacuum

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!

Looks like the latest firmware (4.3.6_1639) on the L20, broke this component. I get the following error message when I try to execute a command.

Anybody having a similar issue?

Thanks

It’s not the firmware but latest version of HA breaks it and you should upgrade your integration too.

Still on HA 2024.4, but today my camera image stopped working on the X40.
It was working fine till today. New map, shortly the camera runs. untll a certain point and i loose the image again. Does anyone have this?

@tasshack can you help / make suggestions?


Map update Failed: Traceback (most recent call last): File "/config/custom_components/dreame_vacuum/dreame/map.py", line 1212, in update self.request_map_list() File "/config/custom_components/dreame_vacuum/dreame/map.py", line 1417, in request_map_list saved_map_data = DreameVacuumMapDecoder.decode_saved_map( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dreame_vacuum/dreame/map.py", line 2728, in decode_saved_map return DreameVacuumMapDecoder.decode_map(raw_map, vslam_map, rotation, iv)[0] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dreame_vacuum/dreame/map.py", line 2720, in decode_map return DreameVacuumMapDecoder.decode_map_data_from_partial( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dreame_vacuum/dreame/map.py", line 3594, in decode_map_data_from_partial return map_data, saved_map_data ^^^^^^^^^^^^^^ UnboundLocalError: cannot access local variable 'saved_map_data' where it is not associated with a value

ogger: custom_components.dreame_vacuum
Source: helpers/update_coordinator.py:427
integration: Dreame Vacuum ([documentation](https://github.com/Tasshack/dreame-vacuum), [issues](https://github.com/Tasshack/dreame-vacuum/issues))
First occurred: 6:53:54 PM (2 occurrences)
Last logged: 7:20:10 PM

Error requesting dreame_vacuum data: cannot access local variable 'saved_map_data' where it is not associated with a value

Log details (ERROR)

This error originated from a custom integration.

Logger: custom_components.dreame_vacuum.dreame.map
Source: custom_components/dreame_vacuum/dreame/map.py:6284
integration: Dreame Vacuum ([documentation](https://github.com/Tasshack/dreame-vacuum), [issues](https://github.com/Tasshack/dreame-vacuum/issues))
First occurred: 6:53:53 PM (10 occurrences)
Last logged: 7:20:14 PM

Map render Failed: Traceback (most recent call last): File "/config/custom_components/dreame_vacuum/dreame/map.py", line 6040, in render_map image = self.render_objects(cached_layers, map_data, robot_status, station_status, image, object_scale) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dreame_vacuum/dreame/map.py", line 6588, in render_objects cached_layers[MapRendererLayer.SEGMENT][k] = self.render_segment( ^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dreame_vacuum/dreame/map.py", line 7681, in render_segment self.color_scheme.segment[segment.color_index][1] ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ TypeError: tuple indices must be integers or slices, not NoneType

Issue still persists on HA 2024.5 and Dreame v2.0.0b15

Found the issue in Vacuum map (camera image) is not available anymore · Issue #591 · Tasshack/dreame-vacuum · GitHub

Thanks!!

Latest firmware of the X40 breaks the integration. I suggest not to upgrade it until v2.0.0b16 is released.

Dreame integration is on v2.0.0b11 and running the latest version of HA. No issue with HA, but the integration is still broken. Can I assume that an upcoming integration update will resolve this matter?
Thanks.

Upgrade it to v2.0.0b15.

I installed the original integration via HACS. How do I upgrade to the latest beta from GitHub? Thanks.

I am sure you will find the answer if you will ever decide reading contents of the issue that i have just shared.

Never mind.

You don’t deserve to use this integration. I hope you couldn’t figure it out and never be able to use it ever.

I just installed and signed in using my Dreame account through the beta app.

Very easy to do and now working as expected. Lots of functionality which already which is a big improvement over my previous Ecovacs device/integration.

Thank you @tasshack

1 Like

Hi, I just bought the Dreame L10s Pro gen 2 and I see today that we can still only login with the mi cloud credentials. Is there a plan to make the HA integration work directly with the Dreame home credentials ? thanks :slight_smile:

Install the Beta.

@tasshack I’m running the beta and finding that the integration uses 1.6gb of memory. Is this expected? It is a 200% increase to where my normal base line is with roughly 25 other integrations running.

What can I do to help troubleshoot?

It is normal due to caching of high resolution map images. You can enable Low Resolution Map from configuration options in Beta version for lower memory consumption.
High memory usage of the integration is the main reason that it cannot be used on RPI3 devices.