Tasshack / dreame-vacuum

Home Assistant integration for Dreame robot vacuums with map support
https://community.home-assistant.io/t/custom-component-dreame-vacuum
MIT License
747 stars 92 forks source link

Support request for the New XIAOMI MIJIA OMNI 2 #216

Closed robertfgoodworth closed 11 months ago

robertfgoodworth commented 11 months ago

Is your feature request related to a problem? Please describe. The current dreame-vacuum version fails to add the New XIAOMI MIJIA OMNI 2, unknown model. Connects to the Xiaomi app CN cloud server ok,

Describe the solution you'd like Support for the new the New XIAOMI MIJIA OMNI 2 smart robot.

Describe alternatives you've considered None, being a new model it's model number (C102CN) is unknown so this integration does not add it. reference to the new cleaner = "https://www.aliexpress.us/item/1005005890721767.html?spm=a2g0o.order_list.order_list_main.10.32901802AE5w3A&gatewayAdapt=glo2au"

Additional context It's almost the same as the S1, if supportable and then can get it to work with Home Assistant then i'm more than happy to donate some funds.

Tasshack commented 11 months ago

Looks like a device made by Dreame but i cannot do anything without the model number.

robertfgoodworth commented 11 months ago

model number (C102CN) is on that webpage, if that's not the model number you need would you mind advising how I can get the data you need? I did try adding it to your integration so perhaps the number is in a log somewhere.

Tasshack commented 11 months ago

https://github.com/PiotrMachowski/Xiaomi-cloud-tokens-extractor

robertfgoodworth commented 11 months ago

Requested data from above token extractor


NAME: Robot Vacuum Mop ID: 1058899139 MAC: 70:C9:32:28:1??:8?? IP: 192.168.??.?? TOKEN: 4c3356385468484e3571346764647535 MODEL: xiaomi.vacuum.c102cn

Tasshack commented 11 months ago

All Dreame models including 1S has dreame.vacuum. prefix on their model number. Even this device does not have that prefix I really belive this is a Dreame device and can be added to this integration too. I just need to extract its private key from the plugin but they did not upload plugin for this device on miotspec yet so i have to get it from api.

robertfgoodworth commented 11 months ago

how do i go about doing that ?

robertfgoodworth commented 11 months ago

FYI, while scrolling through the MI Home app for this robot, although all in Chinese I found a reference to model R2307 could this be what your looking for ? as in dreame.vacuum.r2307 close to the 1S model. Also on a side note this robot came with an attachment that connects to my house water supply and sewage, your remove the two container in the station and replace with this, then connect to the house water supply and sewage. I've not seen this option in any of the Dreame websites.

Tasshack commented 11 months ago

Currently integration is designed to only handle dreame.vacuum. model name prefix and i don't want to change that if your device is not compatible with the dreame api. It would be very easy for me if you are willing to share device to my Mi Home account. This way i can also test it the device and see it is compatible or not before making significant changes to the integration for handling just this device.

robertfgoodworth commented 11 months ago

How do I go about doing that ? "share device to my Mi Home account" The Vacuum is in my "Mi Home App".

Tasshack commented 11 months ago

Open Mi Home App -> Press Profile -> Press Share -> Press Share the device -> Select your device -> Press + Share Device -> Press Xiaomi Account -> Enter 1724225515

robertfgoodworth commented 11 months ago

Hi There,

Done I think, you show up as shared

Regards

Rob

From: Tasshack @.> Sent: Monday, September 18, 2023 7:00 AM To: Tasshack/dreame-vacuum @.> Cc: RGoodworth @.>; Author @.> Subject: Re: [Tasshack/dreame-vacuum] Support request for the New XIAOMI MIJIA OMNI 2 (Issue #216)

Mi Home App -> Press Profile -> Press Share -> Press Share the device -> Select your device -> Press + Share Device -> Press Xiaomi Account -> Enter 1724225515

— Reply to this email directly, view it on GitHub https://github.com/Tasshack/dreame-vacuum/issues/216#issuecomment-1722567588 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AHHUHEBETL252BTSAJEWJH3X25QE7ANCNFSM6AAAAAA4UM6JOE . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AHHUHEFNCMVECPXR5FQXK7TX25QE7A5CNFSM6AAAAAA4UM6JOGWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTGVRF2I.gif Message ID: @. @.> >

robertfgoodworth commented 11 months ago

Done, you show up as shared now.

Tasshack commented 11 months ago

Ok, i have got the device access, i will quickly check and give you information about the result.

Tasshack commented 11 months ago

@robertfgoodworth I cannot access the device over the integration because you have shared the whole house devices. Can you remove the house sharing and only leave the device sharing.

Tasshack commented 11 months ago

@robertfgoodworth I have just added the shared home device adding feature to the integration now. I have accidentaly removed the shared home from my account, can you share the Home again?

robertfgoodworth commented 11 months ago

I've shared the home with you again.

Tasshack commented 11 months ago

Ok, I have added your device to my HA but for some reason i cannot get the map data from the cloud otherwise everything is working, I just need to this the map issue.

robertfgoodworth commented 11 months ago

Anything you need me to do regarding the map? you are shared as a user not administrator, do you need administrator access for the map issue?

robertfgoodworth commented 11 months ago

Oh and THANKYOU, I really appreciate your effort on this integration.

Tasshack commented 11 months ago

I can see the map from app so integration should be too using the same account. I just need to find out how map requesting is different from other dreame devices by looking at the app source code.

Tasshack commented 11 months ago

I have fixed the map issue and added your device on supported devices list. You can use your device with v2.0.0b6. https://github.com/Tasshack/dreame-vacuum/releases/tag/v2.0.0b6

robertfgoodworth commented 11 months ago

THANKYOU so much, I will test it shortly, Do you still need access to my robot? happy to allow ongoing access for development & testing purposes. Oh and what donation would you like for your efforts?

robertfgoodworth commented 11 months ago

Hi Again, Sorry to advise but the HA integration failed to initialise my vacuum, Integration loaded, I added my Mi account, seems to of found my robot, listed a whole heap of configuration options, I just went with the defaults, but then i get "failed to setup, will retry", now it keeps trying to initialise. do you need logs? if so where do i find them?

robertfgoodworth commented 11 months ago

UPDATE: I tryed all different configuration option, and using the "Prefer cloud connection" works. Does that mean local does not work? what can I do to make local (as in not "Prefer cloud connection") to work? Or is this robot only Cloud Connection.

Tasshack commented 11 months ago

Do you still need access to my robot?

You can remove the access if you have tested the integration and everything is working fine.

Oh and what donation would you like for your efforts?

You can decide the amount, thanks.

Does that mean local does not work? what can I do to make local (as in not "Prefer cloud connection") to work? Or is this robot only Cloud Connection.

Server and vacuum must be at the same subnet to local api to work, this is a limitation from Xiaomi devices. https://python-miio.readthedocs.io/en/latest/troubleshooting.html#discover-devices-across-subnets If your device and server are at the same subnet and you still not be able to connect the integration without prefer cloud connection setting, you can try to hard reset the device and if it still not works that means your vacuum does not have local api enabled and it cannot be controlled without internet connection.