Support for (Xiaomi) Dream F9 Mop Vacuum

Have you tried my repo for the F9/D9?

hello @chris6 , thanks for you work
I tried with the D9, I have the card, but it doesnt work well : battery level is wrong, I can’t have the specs like Main brush time leff , Main brush life level or others.
I was able to start the robot 1 time :I pressed a random button then it starts moving, but i wasnt able to make it go to base or anything else.
And on the card, the robot is always in cleaning mode event if the robot is charging.

Just received my Dreame D9 and followed the steps mentionned by Hyyd1e. Everything seems to work well from the card and the details pop-up information are correct.
I will now move to the next step and try to get the map into HA and play with custom voices :slight_smile:
Thank you all for the hard work

I have an F9. I followed @Hyyd1e 's manual (great one!), but I got an error similar to @adumnov (AttributeError: ‘DreameStatus’ object has no attribute ‘water_level’). I tried the dummy approach and I just added everything related to ‘water_level’ that was there in the original dreamevacuum.py to the modified dreamevacuum.py. Now it seems to be working (at least on a basic level). Sorry - I’m not a developer and I don’t know how to share the updated file or share code updates properly. I will just paste the changes below. Maybe someone will do it properly?

Change #1
After this…

class VacuumSpeed(Enum):
    """Fan speeds, same as for ViomiVacuum."""

    Silent = 0
    Standard = 1
    Medium = 2
    Turbo = 3

…add this:

class WaterLevel(Enum):
    Low = 1
    Medium = 2
    High = 3

Change #2
After this…

    # siid 8: (): 3 props, 1 actions
    # piid: 1 (): (string, unit: None) (acc: ['read', 'notify'], value-list: [], value-range: None)
    timezone: str = field(
        metadata={"siid": 8, "piid": 1, "access": ["read", "notify"]},
        default=None
    )

…add this:

    # piid: 20 (): 
    water_level: int = field(
        metadata={
            "siid": 18,
            "piid": 20,
            "access": ["read", "write", "notify"],
            "enum": WaterLevel,
        },
        default=None
    )

Change #3:
After this…

    # aiid 2 : in: [] -> out: []
    @command()
    def test_sound(self) -> None:
        """aiid 3 : in: [] -> out: []"""
        return self.call_action(7, 2)

…add this:

@command(click.argument("water", type=int))
    def set_water_level(self, water):
        """Set water level"""
        return self.set_property(water_level=water)

Thank you all for the great explanations in this topic.
Following the steps listed here I was able to integrate my new F9 into Home Assistant and make its state visible with the vacuum-card.

Next I would like to command the F9 to start the cleanup of one of my detected rooms. Those are labled A, B, C, D and E in the Xiaomi-App. I also found the service “xiaomi_vacuum.vacuum_clean_room” in Home Assistant and hoped it would be easy to use it. Unfortunatley, I was not able to find any documentation for the service. Trying to make out the needed parameters brought me to

entity_id: vacuum.karl_heinz
repeats: 1
zone: "A"

Using those parameters does not raise any errors in Home Assistant Web UI and also no exceptions on the console. Unfortunately, nothing happens =(

I also tried other variations of the zone parameter, like “[A]” or “[‘A’]”. I even tried numers like “[1]” because it was adviced in other threads. But still the vacuum does nothing.

Has anyone managed to get the room cleanup working through home assistant?
Thanks in advance

No, that’s not how it works, you need to install the modified .apk for the xiaomi app, that will create a log file… In that file you can find the rooms … it’s not that easy as a , b …

The apk is in another thread , can’t find it right now

Edit: Xiaomi Mijia 1C Sweeping Vacuum Cleaner (white) (STYTJ01ZHM) - #55 by altagraft

Okay, cool, thank you.
I will try my luck with that approach.

I noticed today a new firmware for dreame f9, anyone knows the rls notes?

It is so good. Multiple passes, crisscross cleaning.

I am using GitHub - al-one/hass-xiaomi-miot: Automatic integrate all Xiaomi devices to HomeAssistant via miot-spec, support Wi-Fi, BLE, ZigBee devices. for my HA integration now.

Is that better then the custom one?

Did anyone figure out the problem with only being able to start the vaccum, and unknown statuses and wrong status on battery?

I followed the steps of @Hyyd1e and works fine with the initial dreamevacuum.py. When replacing it with the file in step 5 the vacuum becomes unavailable in HA. Any idea on this?
Thanks!

Strange, my dreame F9 works perfect

What steps did you do to make it work?

I’m using this component…

What component do you use?

Hi, has anybody have able to install Dreame Z10 bot to HA? I have tried with following steps and are able to get it to HA by those steps but it really don’t work there. All sensor data are basically wrong and the state of vacuum are always wrong. Think have to wait for Xiaomi Cloud Map Extractor HACS intregration to support Dreame.

and if you look log you can clearly see that it do not work right

the steps:

  1. Xiaomi Token + additional information using Xiaomi-cloud-tokens-extractor (Using command in ssh: bash <(curl -L https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor/raw/master/run.sh)))

  2. Installed HACS

  3. Install xiaomi_vacuum via HACS (GitHub - microfrost1/xiaomi_vacuum)

  4. Install vacuum-card via HACS (GitHub - denysdovhan/vacuum-card: Vacuum cleaner card for Home Assistant Lovelace UI)

  5. find dreamevacuum.py under “/custom_components/xiaomi_vacuum/miio/” and replace it with the file from here (Dreame F9 Robot Vacuum |dreame.vacuum.p2008| · Issue #812 · rytilahti/python-miio · GitHub). Attention
    When I did this I lost my vacuum entity complicity from HA

  6. Add following code (see Step 1) to the configfile configuration.yaml:
    image

  7. Restart Homeassistant (Configuration > General > Server Management > Restart)

  8. Add the Vaccuum Card (Home Assistant Overview page, click the three dots at the top right of the screen and select ‘Edit Dashboard’. Then click the blue ‘+ Add Card’ and scroll down to “custom: Vaccum Card”)

guys, are you seeing this too since updating to 2021.12.x ?

Entity vacuum.dreame (<class 'custom_components.xiaomi_vacuum.vacuum.MiroboVacuum'>) implements device_state_attributes. Please report it to the custom component author.

guys, who uses the Dreame F9 , and what integration are you using? thnx

First time here, redirect pls if wrong place.
My f9 is just month old and something went wrong(it was offline, even though it worked normally just few hours ago). I tried to delete it from mi home app and restart it but didnt helped. Power button flashing non-stop. There is no wifi light, home(dock) button is not flashing. 3sec restart, button restart, nothing works… I have guarantee but i l think it is just in some kind of loop and i just cant get it to work. btw, Few days ago, it stopped blinking, wifi came, i almost fixed it, but when i was adding it on the app , on last step (2/3) i didnt went through… So i guess it is not some major fault, but…

The mi servers (atleast for vacuums in europe) was down some days ago. Everyone in the family with the F9 could not access the map and controls. Multiple reports on different isitdown pages.