-
-
Notifications
You must be signed in to change notification settings - Fork 561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Dreame D9 Robot Vacuum (dreame.vacuum.p2009) #870
Comments
That would be great! And if I havent missed some critical point, it seems not THAT hard to get this done. By getting the commands from miot-spec you can write py-functions to controll the bot ... and hide that behind a nice UI ;-) Slightly off-topic, but does the bot have to be conected to the internet to receive those "locale" commands? |
Yes, there is a script in
No idea, sorry. It really depends on the device, but at the moment I cannot recall issues regarding to blocking the internet access, outside https://python-miio.readthedocs.io/en/latest/troubleshooting.html#intermittent-connection-issues-timeouts-xiaomi-vacuum . |
Hi guys, is there already something new regarding this robot? I got this model last week and would like to implement it into home assistant. |
Caused by (the pandemic- and the holiday-caused ^^) lockdown I had not much time yet. I tried to capture the commands of the App with wireshark, but had no luck. I guess a stupid little issue but my brain was just to lazy from all the eating to see it ;-) Would be nice if someone could try that too.
As soon as possible i'll try that.
Sounds promising. Strange, I searched like crazy for such informations but no luck. Thats why I like to "ask" stuff, humans are much better search-engines ;-) |
Any news at this issue? I have a d9 too and it would be very nice if I could control it with oh and Alexa :) |
I have a Dreame D9 and it does work with Home Assistant. Just follow a post from Hyyd1e here for support for F9, apparently this works for D9 too - https://community.home-assistant.io/t/support-for-xiaomi-dream-f9-mop-vacuum/220858/14 |
Hello, |
Hi. Unfortuanely, no, i haven't. It seems kinda tricky to set up, it involves extracting the coordinates for rooms or zones, and making the scripts to incorporate them in the card. I was trying to read up on the procedure for Xiaomi Mijia 1C which is similar to Dreame D9, but i didn't have the time to actually do it. You can find the discussion here https://community.home-assistant.io/t/xiaomi-mijia-1c-sweeping-vacuum-cleaner-white-stytj01zhm/185089/95 , let me know if you succeed. |
If the format is similar to the roborock models you can use this tool to extract coordinates from the map |
Thank you, I use for my Roborock S5, and it works very well. |
To extract coordinates, you need to download that customized xiaomi .apk, it will create a log file on android with the coordinates, from there you can use them in your scripts... It's discussed on the community forums |
Thanks pergolafabio, where can I download this apk? |
There was link posted on the forums, let me know if you can't find it, I have it also local... |
Difficult to find without knowing the exact name of the file! |
MiHome_6.1.700_63410_vevs.apk The file will surely infringe some copyright and so I didn't want to post the direct link. |
Thanks, great, I found it. |
Hello, I installed the apk but I don't see how to recover the card !! |
It's not possible to extract map , only coordinates that are in a log file |
And how do we get the coordinates? |
Look here, you need to manually create the folder first, then start a normal clean, it will create a file then... |
Thank you pergolafabio, I had to create the 3 directories as indicated, I got a file, but I don't really see any coordinates. |
Same for me, i cannot find them with the log file method. Nothing in there resembles to the coordinates as for the other Xiaomi vacuums, so i guess Dreame D9 shows them in a like a different value or something. Also, even if i found and extracted them, i cannot use them anyway, since the vacuum.send_command is giving me "failed to call service". So using it with the F9 method i linked only gets you so far. Someone with the higher knowledge and D9 needs to work on this, if we want to make zone cleaning and live maps available. |
thank you, |
search for something like this "siid":4,"aiid":1,"in":[{"piid":1,"value":19},{"piid":10,"value":X}] X contains json with areas. i'm pretty sure d9 uses same cmd for room/zone clean as f9. |
Thank you for your help. An extract of my file compared to your indication, but I do not see what to recover! |
Are you starting a room cleaning? Or are you drawing an rectangle? Room cleaning commands are not supported yet i think |
1/18 is room clean which uses array of selects (rooms) in this format
1/19 is zone/area clean. |
@pooyashahidi I am glad that my solution to room cleaning helps others. You could add me as a contributor if you find it appropriate. I am not so savvy at coding so I do not create my own repository publicly. After using D9 for a few months, the main issue with this bot is no persistent map control. Map constantly get updated and overwrite the previous save map after each successful clean. Any change in the environment would cause the map to to shift from a few inches to a few feet from the original map in random direction. This could render zone cleaning to fail and its a hassle to fix each and every script built for automation. Thus room clean id service helps since map could be reset, but with static room mapping following the order created in the schedule in Mi Home app would avoid recreate the existing automation script. Hopefully, the next firmware update could address the persistent map issue with few other minor issues. Until then, we'll see if any way to improve the usability of this bot. Note: Do you know that we could the bot run more than 2 passes per room? I have set mine to run 4 to 6 times per room for complete deep clean :)) |
@need2buy I'm also not really a python developer myself (I learn as I go). So I thought maybe I can make something relatively well documented so that others don't have to go through the same thing.
okay it in fact does do more than 2 cleaning passes (yaay). |
@pooyashahidi Hi I have installed the custom component from your repository and I can confirm that it also works with the dreame l10 pro. So it will be nice if you could update the docs to make other people know that it also works with this device. |
Hello, I'am new here. Can you tell me, where i have to introduce new services and include the script. THX |
@pooyashahidi thank you for you work! Can you share you custom lovelace card? Looks amazing! |
unfortunately I do not have it anymore. I moved on from using that widget and made one in HA using this fantastic work as inspiration. I rooted my D9 and currently use my repo in conjunction with Valetudo Map Card to get this result: |
@pooyashahidi Wow, that looks really nice. I had no idea that rooting the D9 is even doable, let alone getting jt to work with Valetudo. Mind sharing a bit more detailed (i mean the rooting part step by step) procedure how to achieve that? :) Thanks in advance, would love to implement it on my dashboard ASAP :) |
Indeed, that's new either, i have a F9 model, should work too... Are there improvements with newer firmware? |
I really don't want to hijack this issue as it is mainly about adding D9 support to Python-miio. I am fine discussing my fork since it uses python miio and could have as well been done here (probably will not) but Valetudo is definitely outside of that area. So i keep it short. You can find almost all the info required for rooting and installing valetudo in their last github release. There you will also find a link to the telegram group where stuff is discussed and some* help is given. But it is mostly from people who are starters like myself. The admins are mostly ignoring messages regarding problems that they don't want to answer. Using search in the group is probably a good thing to do.
I am using firmware 1093 which is apparently a leaked beta or something (which i found out after installing it) not really the most stable thing but it works. I would probably stick to the older stable firmwares, that being said I think (probably placebo) there are some improvements in how the bot moves. I think it hits less stuff when cleaning. But still dumb af when it comes to getting out of tight spaces. |
ok, seems we need to buy some hardware to root it :-) https://valetudo.cloud/pages/general/rooting-instructions.html To do this, you’ll only need a pry tool, and a 3.3V USB UART Adapter (Like CP2102 or Pl2303) as well as basic linux knowledge. |
Indeed we do. @pooyashahidi Thanks for the write-up. I have read the messages in Telegram group, and have mixed feelings about the rooting process. On one hand, sounds simple enough if you read all the steps in the guides, but on the other hand i am not thrilled about the risk of rooting process failing. They do mention it is eventually fixable, but dunno, chance of soft bricking the robot does not sound great. About the hardware needed, I have asked if it is doable with ESP32 boards since i have a couple laying around, but no response. I also have a CH341A mini programmer i bought ages ago on AliExpress, but i have found out it is actually 5V instead of 3.3V, and i would need to solder some wires to make it 3.3V - all that sounds like a hassle :) In any case, i would still need to order those F2M jumper wires for the connection between uart and the robot... I surely am tempted to go with the rooting process, but it does involve some risks. Rewards are cool though, you just need to be willing to get the needed tools and crack open the robot :) If someone else decides to go through it, let us know how it went. Also, sorry for hijacking the topic with rooting stuff, but this is a convenient place to write about it. |
Yeah, do we have actually any advantages when it's rooted? Besides a live card in HA? |
@GizmoLibre sorry I don't know about the esp32 but the ttl programmers are really cheap like a couple euros. I had one laying around so I tried the UART method. it couldn't be any simpler really. |
hi guys, is it possible to change the voice and put a custom one like in My Vacuum or Roborock? Would it be the same process? I wanted to put the voice of darth vader :p thanks |
@pooyashahidi Can you please tell me how you did that? Bought a new D9 this month and I am trying to root it for two weeks now with no luck. I can see the boot message when device starts (reboot) and everything I type is echoed, but cannot get a shell. Only my typed letters are displayed (so the UART-Device and connection is working), but no command line, nothing, after pressing wifi button for 3 seconds. If the D9 is docked or not also makes no difference. Thanks in advance! |
I went ahead and rooted my D9 a couple of days ago, it was too tempting to pass. I cannot say it was an easy task, even with the guides provided (yes, there are several in the Telegram group), as you need to decipher what is the correct wiring for your chosen method, i mean between TTL and the robot - ended up using my ESP32S board that i used for temperature sensors in Home Assistant, worked just fine. I did however need to order jumper wires, as you can't do anything without them. Also, backup procedure can be confusing, commands in the shell, etc. Not at all hard for someone that has the knowledge about this kind of stuff, but for someone that never done this kind of tinkering with your hardware, it won't be easy. But hey, you end up learning something new. Valetudo is a better local alternative to MiHome, as you can simply do more with your HA integration - i love it. It is such a pain trying to apply what matt8707 and you did in my existing lovelace config. I like your version of it more to be honest, and i want to recreate it. Mind sharing your lovelace config? I am stuck, from your screenshot it looks the status, control and Map is one wide card? Also the custom cleanup part is interesting to me. It will be easier if i can take a look at your config and modify it to my case. So far i am testing it in a separate dashboard. |
@Handy-E @GizmoLibre did you copy themes file? it looks to me like the theme is missing:-? I think it's the fact that it is not in a popup and has no background is what makes it look odd. |
Hi Guys, |
Hi, Everyone, |
That file is for Xiaomi C1, which has different commands. I think instead of making many different files here, it would have been better to make a generic vacuum file and use different mappings and handle supported and unsupported features. Or have a generic file and use that for every device with minimal redundant code and so on. |
Hi @need2buy, i ask for help, why it does not work: |
hi guys , move services.yaml to correct dir.. Can some one tell me were this is located ?? |
Hi, I have tried the Xiaomi-cloud-tokens-extractor any ideas? Thank you! |
Got it working now. Installed python on my Windows PC. Now I have the token. But den vacuum can't be really controlled and shows wrong number for battery etc. |
Hello, the supported devices list claims that the Dreame D9 is supported but it's currently not working. Its model name is dreame.vacuum.p2009. Could you add its support to the official python-miio for Home Assistant ? I used this old unmaintained repository to make it work but its support could drop anytime. Feel free to ask me more details if needed ! Thanks. P.S: @pooyashahidi thanks a lot for you work on your xiaomi_vacuum repository ! I don't know if you could port your repo to this one to support Dreame D9 |
Hi, Are there scripts for the D9 Pro ? tnx. |
The Dreame D9 Robot Vacuum is launched in Europe and has some interesting specs and feature.
Device information:
Name(s) of the device: Dreame D9 Robot Vacuum
Link: https://www.dreame-technology.com/products/dreame-d9
Model: dreame.vacuum.p2009
Hardware version: -
Firmware version: -
Additional context
As there is already the miot-spec out there (http://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:vacuum:0000A006:dreame-p2009:1) it should be possible to add support?! As I am new to this, I have no Idea where to start, but would like to contribute (when my robot arrives ^^)
The text was updated successfully, but these errors were encountered: