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
901 stars 113 forks source link

Support For Mova M1 dreame.vacuum.r2380 #607

Open Tasshack opened 5 months ago

Tasshack commented 5 months ago

Describe the bug Model is in supported devices list but not in the config flow therefore cannot be added to the HA.

https://github.com/Tasshack/dreame-vacuum/discussions/604

KingDispo commented 5 months ago

As you recommended: removing the "#" from model number in https://github.com/Tasshack/dreame-vacuum/blob/dev/custom_components/dreame_vacuum/config_flow.py#L123 and restarting HA worked for me. Could now add the Mova M1.

image

But then next problem occours:

image

Maybe thats why you remove MOVA M1 - dreame.vacuum.r2380?

Tasshack commented 5 months ago

@KingDispo Can you share the full HA log?

KingDispo commented 5 months ago

uploading the Full HA log ...

image

Tasshack commented 5 months ago

Can you change the log level, restart the HA and send me the log output again?

logger:
  default: warn
  logs:
    custom_components.dreame_vacuum: debug
KingDispo commented 5 months ago

Did that.

Tasshack commented 5 months ago

Can you override this file from custom_components/dreame_vacuum/dreame/protocol.py, restart the HA and send me the log output again?

protocol.zip

KingDispo commented 5 months ago

Here is the new log.

Tasshack commented 5 months ago

Overriding these two files will fix the issue and integration should start but I have remembered why I have opt out this model and that is because of it's TOF Lidar sensor. It may require additional processing like on the VSLAM vacuums so I am not sure map will render correctly when integration has been successfuly started after this fix.

dreame.zip

KingDispo commented 5 months ago

Thanks, but unfortunally even after overriding the two files the problem still exists:

image

Tasshack commented 5 months ago

It did go further this time and this should fix the new error. device.zip

We need to keep continue like this until integration been started successfully.

KingDispo commented 5 months ago

looks much better now!

image

Tasshack commented 5 months ago

None of the remaining errors are related to this integration and it looks to be working now. Can you test rest of the functions from HA and compare map image with the app to check it correctly renders?

Tasshack commented 5 months ago

I can rather check compatibility myself make necessary fixes to make it device fully supported if you prefer to give your device access to my dreame account over device sharing feature of the app.

KingDispo commented 5 months ago

Map renders correctly, but it changes every seconds to a non good rendered map. image

Here is a video:

https://github.com/Tasshack/dreame-vacuum/assets/67555214/b563bd74-e4c0-4a0b-a9d9-633128faa8e3

I can not controll the robot via HA.

image If i click on start or click on go to home nothing happens.

KingDispo commented 5 months ago

Yes, i can share the robot if you want.

Tasshack commented 5 months ago

Yes, i can share the robot if you want.

My userid is BP428398. I will fix all the issues and let you know when it is ready to use.

KingDispo commented 5 months ago

The Robot is now shared

KingDispo commented 5 months ago

After some tests i can confirm: controlling the robot via home assistant seems to work. I'm happy after some first tests.

Tasshack commented 5 months ago

Map is not working properly, I am afraid tof laser has some special processing needs that i have to implement now.

Tasshack commented 5 months ago

Can you remove the device from your HA until I finish my work because currently it is interfering with the cloud data by not working correctly?

KingDispo commented 5 months ago

the Robot is removed from home assistant

Message ID: @.***>

Tasshack commented 5 months ago

Thanks, but it still sends a new map data to the integration every second. I am not sure this is a bug from its firmware or a normal behaviour but I have never seen this on any other robot ever. I have found out why saved maps and rooms are not listing in the HA and fixed it but I still need to address the issue of vacuum sending the map data constantly even when it is sleeping and integration cannot handle them correctly.

Normally it should have been looked like this. Capture

Tasshack commented 5 months ago

Capture

Tasshack commented 5 months ago

Also I have never seen a device with negative device and map ids. Not sure what is going on but looks like Dreame has messed up badly when making this device. That is what I have exactly thought this may happen when I am opting out of this device from the supported devices list.

Tasshack commented 5 months ago

@KingDispo I see that your device never goes to sleep mode and also it is acting like it is moving all the time by sending a new map data every second indicates that there is something wrong with it. Normally integration gets an initial map data from the device and device sends partial map data when the map data changes which contains only the changed parts of the map. That means every partial map data must be parsed within their frame order but the integration/app may have some missing frames before the latest partial map. When that happens integration/app requests that specific partial frame from device to fill the gap and parse rest of the partial frames. Your device skips a frame after the initial map data when sending a partial map and it does not respond to anything when integration requests the missing frame from it (thats why map gets blurred because device will become unavailable) so integration cannot parse the consecutive frames and there is nothing I can do to fix that.

Is it possible for you to hard reset the device and install it again to check the issue has been resolved, otherwise I am not sure what to do here.

KingDispo commented 5 months ago

I can try to reset the device. In the instruction papers there is only the reset of the network configuration descriped. Hope that is enough to fix the problem.



Tasshack commented 5 months ago

It should reset when you hold wifi button until it reboots. Normally all dreame devices reboot at 03:00 local time so I am pretty sure rebooting won't fix it.

KingDispo commented 5 months ago

Robot was reset and did his first drive to create first map. After adding to Home Assistant the current map Sensor is refreshed every minute. Do you think it is possible to deactivate the map features as a workaround? Only controlling the robot via Home Assistant is an important basic feature for me.

Tasshack commented 5 months ago

It is not possible to use the integration wihout map with dreamehome account also you cannot use room cleaning feature without map.

Tasshack commented 5 months ago

Can you share the device with my account again so I can check any changes?

Tasshack commented 5 months ago

I will also check the app source code as last resort to see how actually app handles the situation. I hope I can find a solution there.

KingDispo commented 5 months ago

Device is shared with your account again. Thanks for your work and your help.

KingDispo commented 5 months ago

Because of performance issues in HA i deleted the robot in home assistant - now everythink is fine again. Unfortunally without the Mova M1 (in HA)

Tasshack commented 5 months ago

Because of performance issues in HA i deleted the robot in home assistant - now everythink is fine again. Unfortunally without the Mova M1 (in HA)

It's normal due to integration is trying to keep up with the vacuum sending a new map data to be processed every three seconds. I could't had time to look at the issue again but I hope I can find some time in a couple of days.

At the worst case, I can disable partial map processing for this device and map won't be refreshing at the rate is should be but at least you will be able to use the integration. Adding that feature to the integration also will take time and I am pretty sure this is a firmware bug that will be fixed as soon as Dreame realizes that devices won't go to sleep so I prefer not to make unnecessary changes to the integration yet.

KingDispo commented 4 months ago

Thanks for your help and your integration. I sent the device back to the seller. Looking for another vacuum with with fewer problems

Tasshack commented 4 months ago

Thanks for your help and your integration. I sent the device back to the seller. Looking for another vacuum with with fewer problems

Sorry for that, now I am never be able to fix the issue and no choice to keep device unsupported.

pezlin commented 3 months ago

I have just purchased a Dreame Mova M1. Can I support in any way?

Tasshack commented 3 months ago

I have just purchased a Dreame Mova M1. Can I support in any way?

Have you read the whole converstation?

pezlin commented 3 months ago

I have just purchased a Dreame Mova M1. Can I support in any way?

Have you read the whole converstation?

Yes, and to my understanding the issue with the map is still unresolved due to that you had no device to test with. I haven't installed the integration yet but I noticed in the instructions that it was possible to choose "Without map".

Tasshack commented 3 months ago

I have removed it from supported devices list due to this bug so you won't be able to add this device to your HA right now.

I can take a look at the issue again if you share your device with my account but I really don't have much time for that right now.

Also I am still not sure that I need to take action about this because the behaviour of the device seems very wrong and probably due some bug that will be fixed by the Dreame soon.

Can you check from the app that your device goes to sleep when charging is completed or is it always stays idle?

pezlin commented 3 months ago

I can only see that it says Charging completed in the app. Not sure how to see if it goes to sleep or is idle.

I installed it yesterday and got a new firmware update installed so perhaps this issue is solved.

Tasshack commented 3 months ago

Probably fixed, so you can give it a shot by uncommenting the model line from config_flow.py

pezlin commented 3 months ago

Seems to be working now. At least when doing a quick test.

crembz commented 2 weeks ago

In thinking of getting one of these as a secondary vac. Is the integration working?