XiaomiRobotVacuumProtocol
XiaomiRobotVacuumProtocol copied to clipboard
Zone CleanUp
How to start cleaning in the specified zone.(area) If I set this mode through mobile app I receive status=17. (getStatus)
Hi @putti23 , I think this is for the new model with mob. Unfortunately this is not yet known to me. Do you have that model? Would be nice to get some more details from it. I have not seen many topics about it, besides that the most of the current commands seem to be supported.
(e.g. what is the identification string, and even better, try to capture the commands, esp the new ones like area clean and mobbing)
Yes, It comes from MiRobot 2. Standard functions work correctly, but I want to synchronize cleaning with my Fibaro HC2 and schedules cleaning only some parts of the house. Today I will try to capture UDP traffic (wireshark) and encode the command. If I fail I will send you HEX data and my actual token.
What I capture: Command name : app_zoned_clean. Status while working is 17. In params are coordinates of regions and number of repetitions (1, 2 or 3). Sample: ( {"id":8338,"method":"app_zoned_clean","params":[[26234,26042,27284,26642,2],[26232,25304,27282,25804,2],[26246,24189,27296,25139,2]]}
The whole map has 51200 x 51200. In the middle of this area is docstation. BUT: I've got two problems:
- The orientation of map sometimes changes in the app.;-(
- Even if I manually send the same command, vacuum starts cleaning with correct sound ("Starting Zone Cleanup"), but after 3 sec finishes with sound ("Finished zone cleanup", "Going back to the dock")
I suppose there is additional communication with mihome cloud (maybe app sends maps and region to the cloud before send command to vacuum, and vacuum download and compare this map)
created some initial info based on your input #2 What is the response you get to the command? the usual ok?
Can it be that it needs in the command all of the coordinates in some sort of sequence (e.g. somewhat similar as the remote control. That each coordinate pair is just a line from the map)?
Can you also log the command for mobbing?
I'm interested to know how can you capture that input data (the params passed to the vacuum). Maybe with some more inputs in the matter we could get how it works.
Is it possible to retrieve the coordinates of the actual position?
I have the same issue with zone cleanup. I have that Roborock s50 (mirobot2) with mop. When I send it for zone cleanup using { "entity_id": "vacuum.xiaomi_vacuum_cleaner", "command": "app_zoned_clean", "params": [[17300,21800,20600,19200,1]] } it only enter the area, then repeat few same movements and after a minute says completed zone cleanup and return to dock. When I draw same are via Mi Home app it cleans it perfectly.
@FixxCZ are you able to validate that the parameters over your command are the same that the ones (same coordinates) sent with the Mi Home app?
The method for executing zone clear = app_zoned_clean
The params: "params": [{17300,21800,20600,19200,1}] which are [{x,y,x1y1, # of cleans}]
The zone coordinates can now be found using the offline viewer. #37 See the rrmap folder with details how to run it.
Is it possible to retrieve the coordinates of the actual position?
This is included in the rrmap file. There is no other (current way) to get the coordinates from the vacuum