Skip to content
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

Support for new Xiaomi Robot Vacuum X20+ #498

Open
stich86 opened this issue Apr 19, 2024 · 61 comments
Open

Support for new Xiaomi Robot Vacuum X20+ #498

stich86 opened this issue Apr 19, 2024 · 61 comments
Assignees
Labels
enhancement New feature or request

Comments

@stich86
Copy link

stich86 commented Apr 19, 2024

Can you please add support for Xiaomi Robot Vacuum X20+?
It's the twin of Dreame L10s Ultra

Currently when I add new account, it says that no robot has been found.

Thanks in advance

@stich86 stich86 added the enhancement New feature or request label Apr 19, 2024
@Tasshack
Copy link
Owner

Tasshack commented Apr 19, 2024

Which version are you using? Also I need the full model number.

@stich86
Copy link
Author

stich86 commented Apr 19, 2024

here is it: xiaomi.vacuum.c102gl
firmware version: 4.3.9_1066

@Tasshack
Copy link
Owner

I cannot access the miot right now to check it but that device probably not manufactured by Dreame therefore cannot be used with this integration.
I will notify you when miot-stats will be availabile again.

@Tasshack
Copy link
Owner

I can add it to the supported devices list if I can confirm that this is actually the same device with the L10s Ultra as you claimed.

@stich86
Copy link
Author

stich86 commented Apr 19, 2024

here is it: xiaomi.vacuum.c102gl

i've tried to add it to config_flow.py , but when it sends token there is no response from the device :(

@Tasshack
Copy link
Owner

here is it: xiaomi.vacuum.c102gl

i've tried to add to config_flow.py , but when it send token there is no response from the device :(

You need to select Prefer Cloud Connection since Dreame has disabled the local api recently. Also adding it to the config flow would not be enough since integration requires private key of the map for decoding it. Also if your are using the Beta, integration would require model capabilities to work properly.

@stich86
Copy link
Author

stich86 commented Apr 19, 2024

here is it: xiaomi.vacuum.c102gl

i've tried to add to config_flow.py , but when it send token there is no response from the device :(

You need to select Prefer Cloud Connection since Dreame has disabled the local api recently. Also adding it to the config flow would not be enough since integration requires private key of the map for decoding it. Also if your are using the Beta, integration would require model capabilities to work properly.

ok, i'll wait your feedback if it's possible to add or not
thanks :)

@Tasshack
Copy link
Owner

You can at least try to add the device using the Beta version of the integration by adding it to the config flow but just to confirm that this is a Dreame device. But remove it just after the confirmatiun to not to break anything until the new version is available.

@Tasshack
Copy link
Owner

I would be very nice if you enable the info logs and share me too.

@stich86
Copy link
Author

stich86 commented Apr 19, 2024

You can at least try to add the device using the Beta version of the integration by adding it to the config flow but just to confirm that this is a Dreame device. But remove it just after the confirmatiun to not to break anything until the new version is available.

i've seen that in the latest beta13 there was xiaomi.vacuum.c102cn, this one is c102gl (I presume global version because it's sold in Italy)

Which flags do I need to enable debug? It's not a problem for me to share logs :)

@stich86
Copy link
Author

stich86 commented Apr 19, 2024

ok looks like it attach after change c102cn to c102gl and use cloud connection (some items are missing, may be because not fully supported) - for instance, this version doesn't have detergent tank:

image image image image

@Tasshack
Copy link
Owner

Yeah it is the same device with same firmware but its model name still needs to be in the keystore list otherwise you cannot use the map function.

I won't be releasing a new version soon but I can send you the files need to be changed to make this device properly when I am available in couple of days.

@Tasshack Tasshack self-assigned this Apr 19, 2024
@stich86
Copy link
Author

stich86 commented Apr 19, 2024

Yeah it is the same device with same firmware but its model name still needs to be in the keystore list otherwise you cannot use the map function.

I won't be releasing a new version soon but I can send you the files need to be changed to make this device properly when I am available in couple of days.

that sounds good :)

i'm waiting your info, ATM i've added it so I can use basic command :)

@Tasshack
Copy link
Owner

Tasshack commented Apr 19, 2024

You can use basic services like start, stop but i don't recommend changing any setting because robot does not have checks for any wrong parameter and everything is only limited by the app. So if you try to change a setting on a device that does not support it, it still tries to do the related work and may break things with the operation.
As you already see, it still advertises the detergent settings even it does not have it, thats why integration needs to know capabilities of each model.

@alexflcl
Copy link

Also looking for these archives or implementation. Receiving mine in 3 days.

Thank you!

@joseluislucio
Copy link

Another one waiting for the X20+ integration :)

@gabriel-gfs
Copy link

Also patiently waiting for the integration 😊

@mc-flash
Copy link

mc-flash commented May 7, 2024

Last week Xiaomi started to sell the X20+ in Germany and I'm sure many guys are now waiting for the updated integration.

Thanks in advance @Tasshack

@papst01
Copy link

papst01 commented May 9, 2024

Got mine yesterday. Also waiting to get the integration working. Thx in advance

@radim-ek
Copy link

miot-spec : https://home.miot-spec.com/spec/xiaomi.vacuum.c102gl
Can I help with add this device? Thanks.

@martindybal
Copy link

martindybal commented May 27, 2024

@Tasshack @radim-ek Hi, I just got mine. I'm a developer so I can help with testing or development. Does anyone working on it?

@gunnm80
Copy link

gunnm80 commented Jun 4, 2024

ok. Thank you. Let me know if there is anything I can do to help.
Is Ko-Fi not an issue for you?

@privedentsev
Copy link

@Tasshack очень ждем интеграцию от Вас! Огромное спасибо за Ваши труды!

@Tasshack
Copy link
Owner

Support for xiaomi.vacuum.c102gl has been added on latest Beta release.
https://github.com/Tasshack/dreame-vacuum/releases/tag/v2.0.0b15

@Tasshack
Copy link
Owner

ok. Thank you. Let me know if there is anything I can do to help. Is Ko-Fi not an issue for you?

https://www.ko-fi.com/Tasshack

@privedentsev
Copy link

@Tasshack My card doesn't work.

@gunnm80
Copy link

gunnm80 commented Jun 11, 2024

So the commands such as “Start Fast Mapping” or “Start Mapping” work for me. This morning I briefly had a map under the “Current Map” entry after “Start Fast Mapping”. But unfortunately not the complete map and unfortunately it has disappeared again.
What also works well are the current values and statuses such as “Charging Status” or “Task Status”.

@mc-flash
Copy link

I am not familiar with this, what is the modification?

Modified app can handle all region locked Xiaomi devices on the same server. I have STYJ02YM vacuum, chinese version. With this app I can use it on German server.

I thought we could maybe log the traffic in the app to take a look where in the cloud the map is stored. Just an idea of a salesman :)

@Tasshack
Copy link
Owner

Modified app can handle all region locked Xiaomi devices on the same server. I have STYJ02YM vacuum, chinese version. With this app I can use it on German server.

This may be the reason why the integration is not working so I need to know what modification has been made to the app but I really don't have time for this right now also most of the information about the modified app is in Russian so I won't be installing it to any of my devices.

I thought we could maybe log the traffic in the app to take a look where in the cloud the map is stored.

Good luck logging an ssl encrypted traffic on a recent mobile OS.

@privedentsev
Copy link

privedentsev commented Jun 11, 2024

причиной

Modified app can handle all region locked Xiaomi devices on the same server. I have STYJ02YM vacuum, chinese version. With this app I can use it on German server.

This may be the reason why the integration is not working so I need to know what modification has been made to the app but I really don't have time for this right now also most of the information about the modified app is in Russian so I won't be installing it to any of my devices.

I thought we could maybe log the traffic in the app to take a look where in the cloud the map is stored.

Good luck logging an ssl encrypted traffic on a recent mobile OS.

У меня прекрасно все работает в родном приложении, не только карты. Весь функционал ведет себя правильно.
Версия пылесоса gl, регион MiHome - RU

@Tasshack
Copy link
Owner

Tasshack commented Jun 11, 2024

@privedentsev if you won't be using English please don't write anything.

@privedentsev
Copy link

@Tasshack I tested an HA vacuum cleaner with this integration.
All functionality of the vacuum cleaner works perfectly.
I have the native MiHome application, vacuum cleaner GL version, region RU

@privedentsev
Copy link

privedentsev commented Jun 11, 2024

@Tasshack I also added a vacuum cleaner to the Miot integration, but there it is limited in functionality
Снимок экрана 2024-06-11 в 19 47 19

@Tasshack
Copy link
Owner

Tasshack commented Jun 11, 2024

I need full log output from a not working device.

logger:
  default: warn
  logs:
    custom_components.dreame_vacuum: debug

@Tasshack
Copy link
Owner

Fastest way for me to fix this issue is reproducing it on my setup and for that I need someone willing to share their device with my MiHome account.

@privedentsev
Copy link

Fastest way for me to fix this issue is reproducing it on my setup and for that I need someone willing to share their device with my MiHome account.

I'm ready, what should I do?

@stich86
Copy link
Author

stich86 commented Jun 11, 2024

Fastest way for me to fix this issue is reproducing it on my setup and for that I need someone willing to share their device with my MiHome account.

I can share mine if you want, just don't start it during the night 😂

@Tasshack
Copy link
Owner

I won't be controlling the device in anyway. I just try to make it get the map data object name and file.

Account ID: 1724225515

@stich86
Copy link
Author

stich86 commented Jun 11, 2024

1724225515

Shared let me know (it's called Duster 😅)

@Tasshack
Copy link
Owner

Tasshack commented Jun 11, 2024

@stich86 got the access, reproduced the issue, understand the reason and fixed it. Thanks

Turns out the changes that I have made for 102cn version to work correctly causes map data to not to be retrieved on EU model because CN version uses the V3 and latest version of the cloud storage access endpoint but I didn't know that the EU model still uses old cloud api.
I will make the changes for integration use V3 api endpoints only when connected to the CN server but I need to make sure this is not a firmware version related issue and won't be changed after a firmware upgrade.

@stich86 app says there is a new version of the firmware available, is that a specific reason that you did not upgrade your device or can I start upgrade to make sure integration still be working fine after the upgrade especially with the changes I have made now?

@stich86
Copy link
Author

stich86 commented Jun 11, 2024

If you want to test proceed to upgrade. No problem for me :)

I need to make sure the device still be using the old storage cloud api after the upgrade otherwise integration won't be working again like now after my fix.

@Tasshack
Copy link
Owner

@stich86 I cannot see the firmware upgrade menu in settings because I am not the owner of the device. App asked me when I have first added the device but I cannot upgrade it now since I have dismissed that popup. Can you start upgrade from your app?

@stich86
Copy link
Author

stich86 commented Jun 11, 2024

Ok I'll send you a msg here when upgraded

@stich86
Copy link
Author

stich86 commented Jun 11, 2024

@stich86 I cannot see the firmware upgrade menu in settings because I am not the owner of the device. App asked me when I have first added the device but I cannot upgrade it now since I have dismissed that popup. Can you start upgrade from your app?

Ok it's updated let me know

@Tasshack
Copy link
Owner

It's upgraded and still working fine with my fix. Thanks for the help.

@stich86
Copy link
Author

stich86 commented Jun 11, 2024

I'll keep it shared until you have fixed and test all stuff, let me know. For me isn't a problem ;)

@mc-flash
Copy link

Guys, you are awesome!!

@Tasshack
Copy link
Owner

I'll keep it shared until you have fixed and test all stuff, let me know. For me isn't a problem ;)

@stich86 I don't need the access anymore but I have noticed some very important differences within the app from the Dreame variant of this device. For example; Dreame app has one more option for both mopping prefences and setting the one that does not present in the Mi Home app may break the operation of the device since we cannot make sure why those options are discarded from the same hardware from different brand. Because of that, I would like to address those differences in the integration too when I have the time working on it agai so it would be very nice to keep the access for that time. Your device is only installed on my dev machine and that device is only running while I am developing.

@Tasshack
Copy link
Owner

I have commited the fix but I won't be releasing a new version soon so anyone who don't want to wait this issue to be closed with the new release can download and override this file manually with the custom_components/dreame_vacuum/dreame/protocol.py one.

@stich86
Copy link
Author

stich86 commented Jun 11, 2024

I'll keep it shared until you have fixed and test all stuff, let me know. For me isn't a problem ;)

@stich86 I don't need the access anymore but I have noticed some very important differences within the app from the Dreame variant of this device. For example; Dreame app has one more option for both mopping prefences and setting the one that does not present in the Mi Home app may break the operation of the device since we cannot make sure why those options are discarded from the same hardware from different brand. Because of that, I would like to address those differences in the integration too when I have the time working on it agai so it would be very nice to keep the access for that time. Your device is only installed on my dev machine and that device is only running while I am developing.

No problem, let me know if you need something else :)

@stich86
Copy link
Author

stich86 commented Jun 11, 2024

I have commited the fix but I won't be releasing a new version soon so anyone who don't want to wait this issue to be closed with the new release can download and override this file manually with the custom_components/dreame_vacuum/dreame/protocol.py one.

I have commited the fix but I won't be releasing a new version soon so anyone who don't want to wait this issue to be closed with the new release can download and override this file manually with the custom_components/dreame_vacuum/dreame/protocol.py one.

so that version make Maps work? Thx!

@wmnl25
Copy link

wmnl25 commented Jun 11, 2024

Amazing work guys! Can confirm this version now displays a map :)!

Scherm­afbeelding 2024-06-11 om 21 55 49

@papst01
Copy link

papst01 commented Jun 12, 2024

Awesome work. Can also confirm (gl-version in region DE) that the map is working with the adapted protocol.py file without any rooting or whatsoever

Repository owner deleted a comment from privedentsev Jun 13, 2024
Repository owner locked and limited conversation to collaborators Jun 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests