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
700 stars 90 forks source link

Support For Mova M1 dreame.vacuum.r2380 #607

Open Tasshack opened 2 weeks ago

Tasshack commented 2 weeks 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 2 weeks 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 2 weeks ago

@KingDispo Can you share the full HA log?

KingDispo commented 2 weeks ago

uploading the Full HA log ...

image

Tasshack commented 2 weeks 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 2 weeks ago

Did that.

Tasshack commented 2 weeks 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 2 weeks ago

Here is the new log.

Tasshack commented 2 weeks 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 2 weeks ago

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

image

Tasshack commented 2 weeks 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 2 weeks ago

looks much better now!

image

Tasshack commented 2 weeks 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 2 weeks 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 2 weeks 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 2 weeks ago

Yes, i can share the robot if you want.

Tasshack commented 2 weeks 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 2 weeks ago

The Robot is now shared

KingDispo commented 2 weeks 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 1 week ago

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

Tasshack commented 1 week 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 1 week ago

the Robot is removed from home assistant

Message ID: @.***>

Tasshack commented 1 week 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 1 week ago

Capture

Tasshack commented 1 week 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 1 week 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 1 week 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 1 week 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 1 week 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 1 week 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 1 week ago

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

Tasshack commented 1 week 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 1 week ago

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

KingDispo commented 1 week 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 1 week 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 40 minutes 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 24 minutes 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.