Custom Component: Dreame Vacuum

Prefer cloud actually communicates with the device over cloud and not recommended to use if server and device are at the same network.

Please check this solution

Thank you for your reply. I do not know if it is coincidence but I added the device via Xiaomi Miot integration first using the IP address and token method. After that I add Dreame Vacuum integration and it seemed to work properly (added correctly without selecting prefer cloud)

Previously it would say Initializing and then fail, attempting to communicate with the device on the wrong IP without any ability to change.

Either way, thank you for this integration. I gave what I could, times are tough and I appreciate you making this.

Thanks for the contribution.
Dreame devices do not respond to api requests from different subnet and this is a known issue because of that Xiaomi Miot also uses similar feature like Prefer Cloud.

Hi all,
I bought a Dreame L10s Ultra which will arrive early January.
As far as I got from this topic, I need to use the Xiamoi Cloud in order to use the robot in HomeAssistant, right?
It is not working with the Dreame Cloud - so… are there any differences in the functionallity of the robot, or are there things that are not working when I use the Xiaomi Cloud instead of the Dreame Cloud?

What components can you suggest in addition to the Dreame Vacuum Integration?
I’ve already added the Xiamoi Vacuum Map and the Vacuum Card from HACS… is there anything else that would be worth to look at?

Unfortunately, since it will still take over a month until the robot will arrive here, I can’t start to create my Dashboard… for doing this, It would be required to have at least some “simulated entities” with which I could start creating the Dashboard… is there any option that I could use to start with the Dashboard in the meantime, so maybe adding some “templated” sensors or entities that can be used in the Dashboard for now?

Thanks :slight_smile:

Hi,

Thank for this integration. Does it work with Dreame L10 Plus?

L10 Plus is basically same device with the Z10 Pro, only difference is the battery capacity and yes it is supported.

Hi
I’m getting a weird issue with the integration
I have a z10 pro since over a year now,
I’ve downloaded the integration though HACS, then I add the integration, use my credentials, serveurs, After that it Ask me for some setting (notification, thème, Map option) and I let by default and validate

After that, it say me succes, my HA instance restart (is it expected ? ) And then, After restart the integration is not here anymore and I have no error message anywhere,
Can you help me ?
Thanks

Thanks Tasshack !
I definitly don’t know how to search properly :sweat_smile:

So it’s a ram issue with rpi3 …
Maybe it’s possible to fix adding a swap or some kind of ramdisk ?

I’ll try and give the result here

Hi Tasshack,

thank you for this amazing integration! Awesome work!
I’m creating an automation and I would like to insert a command that sends back the vacuum to the dock, is it possible? I can’t find a service that does this.
I hope it’s not a dumb question, noob here :slight_smile:

Thank you!

You can use the default return to base service from HA.

Thank you!
It was a dumb question indeed :smiley:
Didn’t think about looking into default services.

Best regards!

hi, i have a “dreame.vacuum.p2036 (Trouver LDS Finder)” . when I try to use room or zone cleaning I get that error and the cleaning does not start. is there any way to make it work? thank you

Hi There,
I do have the same error.
It seems, the map is trying to call the Service “xiaomi_miio/vacuum_clean_zone” - but the services provided by the Dreame Integration are called:

grafik

I’ve searched a bit more, and you can configure the service calls within the YAML code of the Card:

type: custom:xiaomi-vacuum-map-card
language: de
map_source:
  camera: camera.c_q21_map
calibration_source:
  camera: true
entity: vacuum.c_q21
vacuum_platform: default
map_modes:
  - name: Zone reinigen
    icon: mdi:select-drag
    run_immediately: false
    coordinates_rounding: true
    selection_type: MANUAL_RECTANGLE
    max_selections: 5
    repeats_type: EXTERNAL
    max_repeats: 3
    service_call_schema:
      service: xiaomi_miio.vacuum_clean_zone
      service_data:
        zone: '[[selection]]'
        repeats: '[[repeats]]'
        entity_id: '[[entity_id]]'
    predefined_selections: []
    variables: {}
  - name: Pin & Go
    icon: mdi:map-marker-plus
    run_immediately: false
    coordinates_rounding: true
    selection_type: MANUAL_POINT
    max_selections: 999
    repeats_type: NONE
    max_repeats: 1
    service_call_schema:
      service: xiaomi_miio.vacuum_goto
      service_data:
        x_coord: '[[point_x]]'
        y_coord: '[[point_y]]'
        entity_id: '[[entity_id]]'
    predefined_selections: []
    variables: {}
  - name: Räume
    icon: mdi:floor-plan
    run_immediately: false
    coordinates_rounding: true
    selection_type: ROOM
    max_selections: 999
    repeats_type: REPEAT
    max_repeats: 3
    service_call_schema:
      service: xiaomi_miio.vacuum_clean_segment
      service_data:
        segments: '[[selection]]'
        entity_id: '[[entity_id]]'
    predefined_selections:
      - id: '1'
        icon:
          name: mdi:broom
          x: 4000
          'y': 1150
        label:
          text: Kitchen
          x: 4000
          'y': 1150
          offset_y: 35
        outline:
          - - 1600
            - -550
          - - 6400
            - -550
          - - 6400
            - 2850
          - - 1600
            - 2850
      - id: '2'
        icon:
          name: mdi:broom
          x: 4450
          'y': -1475
        label:
          text: Bathroom
          x: 4450
          'y': -1475
          offset_y: 35
        outline:
          - - 3350
            - -2050
          - - 5550
            - -2050
          - - 5550
            - -900
          - - 3350
            - -900
      - id: '3'
        icon:
          name: mdi:broom
          x: 1525
          'y': -2350
        label:
          text: Corridor
          x: 1525
          'y': -2350
          offset_y: 35
        outline:
          - - -300
            - -3850
          - - 3350
            - -3850
          - - 3350
            - -850
          - - -300
            - -850
      - id: '5'
        icon:
          name: mdi:broom
          x: -400
          'y': 1275
        label:
          text: Living Room
          x: -400
          'y': 1275
          offset_y: 35
        outline:
          - - -2400
            - -1100
          - - 1600
            - -1100
          - - 1600
            - 3650
          - - -2400
            - 3650
      - id: '6'
        icon:
          name: mdi:broom
          x: 4075
          'y': -4050
        label:
          text: Primary Bedroom
          x: 4075
          'y': -4050
          offset_y: 35
        outline:
          - - 3350
            - -5500
          - - 4800
            - -5500
          - - 4800
            - -2600
          - - 3350
            - -2600
    variables: {}
tiles:
  - tile_id: status
    entity: vacuum.c_q21
    label: Status
    attribute: status
    icon: mdi:robot-vacuum
    translations:
      starting: Starte
      charger disconnected: Ladegerät getrennt
      idle: Inaktiv
      remote control active: Fernsteuerung aktiv
      cleaning: Säubern
      returning home: Kehre zur Ladestation zurĂźck
      manual mode: Manueller Modus
      charging: Lade
      charging problem: Lade-Problem
      paused: Pause
      spot cleaning: Spot-Reinigung
      error: Fehler
      shutting down: Herunterfahren
      updating: Aktualisiere
      docking: Andocken
      going to target: Fahre zum Ziel
      zoned cleaning: Zonen-Reinigung
      segment cleaning: Segment-Reinigung
      emptying the bin: Leere den Staubbehälter
      charging complete: Ladung vollständig
      device offline: Gerät offline
  - tile_id: battery_level
    entity: vacuum.c_q21
    label: Batterie
    attribute: battery_level
    icon: mdi:battery
    unit: '%'
  - tile_id: fan_speed
    entity: vacuum.c_q21
    label: LĂźftergeschwindigkeit
    attribute: fan_speed
    icon: mdi:fan
    translations:
      silent: Leise
      standard: Standard
      medium: Medium
      turbo: Turbo
      auto: Auto
      gentle: Sanft
icons:
  - icon: mdi:play
    conditions:
      - entity: vacuum.c_q21
        value_not: cleaning
      - entity: vacuum.c_q21
        value_not: error
      - entity: vacuum.c_q21
        value_not: returning
    tooltip: Start
    tap_action:
      action: call-service
      service: vacuum.start
      service_data:
        entity_id: vacuum.c_q21
  - icon: mdi:pause
    conditions:
      - entity: vacuum.c_q21
        value_not: docked
      - entity: vacuum.c_q21
        value_not: idle
      - entity: vacuum.c_q21
        value_not: error
      - entity: vacuum.c_q21
        value_not: paused
    tooltip: Pause
    tap_action:
      action: call-service
      service: vacuum.pause
      service_data:
        entity_id: vacuum.c_q21
  - icon: mdi:stop
    conditions:
      - entity: vacuum.c_q21
        value_not: docked
      - entity: vacuum.c_q21
        value_not: idle
      - entity: vacuum.c_q21
        value_not: error
      - entity: vacuum.c_q21
        value_not: paused
    tooltip: Stop
    tap_action:
      action: call-service
      service: vacuum.stop
      service_data:
        entity_id: vacuum.c_q21
  - icon: mdi:home-map-marker
    conditions:
      - entity: vacuum.c_q21
        value_not: docked
      - entity: vacuum.c_q21
        value_not: returning
    tooltip: RĂźckkehr zur Basis
    tap_action:
      action: call-service
      service: vacuum.return_to_base
      service_data:
        entity_id: vacuum.c_q21
  - icon: mdi:map-marker
    tooltip: Finden
    tap_action:
      action: call-service
      service: vacuum.locate
      service_data:
        entity_id: vacuum.c_q21
  - icon: mdi:fan-remove
    conditions:
      - entity: vacuum.c_q21
        attribute: fan_speed
        value: Silent
    tooltip: Lßftergeschwindigkeit ändern
    tap_action:
      action: call-service
      service: vacuum.set_fan_speed
      service_data:
        entity_id: vacuum.c_q21
        fan_speed: Standard
  - icon: mdi:fan-speed-1
    conditions:
      - entity: vacuum.c_q21
        attribute: fan_speed
        value: Standard
    tooltip: Lßftergeschwindigkeit ändern
    tap_action:
      action: call-service
      service: vacuum.set_fan_speed
      service_data:
        entity_id: vacuum.c_q21
        fan_speed: Strong
  - icon: mdi:fan-speed-2
    conditions:
      - entity: vacuum.c_q21
        attribute: fan_speed
        value: Strong
    tooltip: Lßftergeschwindigkeit ändern
    tap_action:
      action: call-service
      service: vacuum.set_fan_speed
      service_data:
        entity_id: vacuum.c_q21
        fan_speed: Turbo
  - icon: mdi:fan-speed-3
    conditions:
      - entity: vacuum.c_q21
        attribute: fan_speed
        value: Turbo
    tooltip: Lßftergeschwindigkeit ändern
    tap_action:
      action: call-service
      service: vacuum.set_fan_speed
      service_data:
        entity_id: vacuum.c_q21
        fan_speed: Silent
  - icon: mdi:fan-alert
    conditions:
      - entity: vacuum.c_q21
        attribute: fan_speed
        value_not: Silent
      - entity: vacuum.c_q21
        attribute: fan_speed
        value_not: Standard
      - entity: vacuum.c_q21
        attribute: fan_speed
        value_not: Strong
      - entity: vacuum.c_q21
        attribute: fan_speed
        value_not: Turbo
    tooltip: Lßftergeschwindigkeit ändern
    tap_action:
      action: call-service
      service: vacuum.set_fan_speed
      service_data:
        entity_id: vacuum.c_q21
        fan_speed: Silent
two_finger_pan: true
map_locked: true

You’ll probably need to change all Service Calls where the Xiaomi Service will be used:

service: xiaomi_miio.vacuum_clean_zone
service: xiaomi_miio.vacuum_clean_segment
service: xiaomi_miio.vacuum_goto

etc.

Change it to:

dreame_vacuum.vacuum_clean_zone
dreame_vacuum.vacuum_clean_segment
dreame_vacuum.vacuum_clean_spot

That should solve your issue :slight_smile:

1 Like

it works, it’s wonderful!!! thanks thanks thanks !!

@CChris @xmaxtclub please refer to the How to use section of the readme for correctly configuring the integration with the map card using the template editor in the developer tools.

ok, but at the bottom it said “With Dreame Vacuum Card
Coming Soon” so I was waiting.

You can use Xiaomi Map Card until Dreame Vacuum Card is available.

2 Likes

yes, probably a Dreame Card will come “soon”… but atm you are using the xiaomii card - and therefore, the service calls are different by default :slight_smile:

@tasshack: thanks for the link to the HowToUse documentation.
TBH: I haven’t had a look into it, since the basic stuff was working and I have the robot only for a few days, so haven’t yet done much with ist… rather than “playing around” and using default options.

I will consider the HowToUse documentation if I detect any other issues… :slight_smile:
But I think, the service calls are working well so far… :wink:

Again, thanks for this great integration :slight_smile: