I need a feature where I can switch the current map in my Roborock S6 to be able to put him in another floor in my house and start cleaning of selected rooms on that floor. All controlled by Home Assistant (except moving him physically to the other floor ).
Current functions of the Xiaomi integration let me start and stop a cleaning of selected rooms with xiaomi_miio.vacuum_clean_segment
But if I start this service on floor A, but map from floor B is the current loaded map, the cleaning fails. The vacuum does not automatically load the correct map.
My Roborock S6 (Xiaomi) supports backup maps which can be used for multi floors in the house. It is possible to select the maps through the Xiaomi app. If I select the right map through the app first, room cleaning works as expected.
Target would be to have a service like xiaomi_miio.vacuum_restore_map which I can call before the segment cleaning service.
Thank you so much for your effort. Because of that I worked hard on installing miiocli. I finally got it to work.
Nevertheless, you are right. I tried both commands get_backup_maps and use_backup_map. Both return unknown_method.
I have a Roborock S6 and changing maps with the Android app works fine. Anything else I can try?
The command get_multi_maps_list works and returns: [{'max_multi_map': 4, 'max_bak_map': 0, 'multi_map_count': 2, 'map_info': [{'mapFlag': 0, 'add_time': 1610144299, 'length': 11, 'name': 'Erdgeschoss', 'bak_maps': []}, {'mapFlag': 1, 'add_time': 1613669204, 'length': 12, 'name': 'Obergeschoss', 'bak_maps': []}]}]
Very interesting and exactly the map description I see in the Android App from Xiaomi.
With the help of different command lists, I found a new command through try and error, which might help to recover a dedicated map of a floor/level: recover_multi_map []
It seems to be a valid method, but I could not figure out which parameters I have to provide. I called the commands with the mirobo tool in a Debian console ( mirobo --ip 192.168.x.x --token xxxxx raw-command recover_multi_map ). Responses of command: recover_multi_map -> Error: No response from device recover_multi_map 1 -> Error: {'code': -10005, 'message': 'Params is not an Array'} recover_multi_map [1] -> Error: {'code': -10005, 'message': 'First element in array is not an object'}
Any idea, what parameters I could try? It looks, we are close
I’ve got roborock connected to HA, but when I search for commands I can’t find the load_multi_map command? Do I need something more than the xiaomi integration?
The action type is Call Service and service is vacuum.send.command.
In the command section you can use (in my e.g.) app_segment_clean or this load_multi_map command.
Parameters are also important: 0-4
I’ve successfully configured switching maps on the vacuum using the load_multi_map command. BUT, is there a way to find out which map is currently restored on the vacuum, i.e. the active map index?
When you vacuum changes map, it will give you differents values as you can see :
The only thing you have to do is to watch the value of
{{ state_attr(“camera.roborock_s5_max_map”, “calibration_points”)[0][“map”][“x”] }} (in my case, it switches from 344 to 240)
or
{{ state_attr(“camera.roborock_s5_max_map”, “calibration_points”)[0][“map”][“y”] }}
to trigger an automation based on a template trigger like so :