Xiaomi Robot Vacuum Binding

Great! I will try that :slight_smile:

Hi again.
I managed to get the rrmap files.
But when I open the file (OSX) it doesn’t show the map but I can click on the java program and get coordinates.

When I try to open the java program on Windows 10 I get this error:

for this offline viewer, suggest to move the discussion to the dedicated viewer topic.
I responded to the similar question there.

Hi Marcel,
Any chance you can add support for the s6 pure?
roborock.vacuum.a08

Please give a try by changing the modelId in your thingConfig to the rockrobo.vacuum.v1 and see if you can control it that way. Based on the similarities, I believe it has high chance for success.
Pls feedback your results/findings

Changed the device model string as stated but no results. Just the basic generic channels are avaiable. Power on/off and execute test commands.

Log:
Mi Device model roborock.vacuum.a08 has model config: rockrobo.vacuum.v1. Unexpected unless manual override

pls add it manually then as miio:vacuum thing. the override message is expected and okay.

That seems to work. Thanks for the quick response.

Hello,

I have this Robot Vaccum: https://www.amazon.de/dp/B085BPCV7W/.
It shows as unsupported, what is needed to have it added and working in the binding ?

Since the binding does not support my viomi, i am using the exec script and miiocli:

I can also get state info, like dock State and so on :slight_smile:

State: ViomiVacuumState.Docked
Mode: ViomiMode.Vacuum
Error: Unknown error 2105
Battery: 100
Fan speed: ViomiVacuumSpeed.Turbo
Box type: ViomiBinType.Vacuum
Mop type: 0
Clean time: 0:01:11
Clean area: 51.6
Water grade: ViomiWaterGrade.High
Remember map: True
Has map: True
Has new map: True
Mop mode: ViomiMode.Vacuum

Can you please indicate the modelId you see in Openhab. Cannot judge from the cover…

Please give a try by manually add it as miio:vacuum device and changing the modelId in your thing config to the rockrobo.vacuum.v1 and see if you can control it that way.
Pls feedback your results/findings.

I think with the proper json db file this vacuum can largely be controlled by openhab if you configure it as basic device. If you want to try, let me know and we can try to develop a db file for it,

1 Like

I’m looking for a way to keep my Mi Robot from losing/rotating the map. Can I use the binding with Valetudo (e.g. fake the cloud connection)?

The model ID shown in the field Device Model String is: viomi.vacuum.v8

I will test this tomorrow and will post the results then.
Thank you for the quick help/response

1 Like

I never tried, but as what I understand from it, this should not be an issue.

Maybe the (OH) map feature does not work anymore as that is using the Xiaomi cloud and don’t know if that is still working when Valetudo is enabled. (in that case you might be able to pull it from the robot though with some clever scripting)

1 Like

That one indeed won’t work with the ‘trick’ I described.
For this model, we can try to control it as miio:basic device. Hence (manually) add it as miio:basic device
Than in your conf/misc folder, create a miio folder. and save this file there.
viomi.vacuum.v8.json (2.9 KB)

With the OH maps you can convert the numbers into readable values

Note the json file is untested, my best guess to the properties/values. Feel free to edit it.
Certainly some of the commands still need to be added

ERROR_CODES = {
500: “Radar timed out”,
501: “Wheels stuck”,
502: “Low battery”,
503: “Dust bin missing”,
508: “Uneven ground”,
509: “Cliff sensor error”,
510: “Collision sensor error”,
511: “Could not return to dock”,
512: “Could not return to dock”,
513: “Could not navigate”,
514: “Vacuum stuck”,
515: “Charging error”,
516: “Mop temperature error”,
521: “Water tank is not installed”,
522: “Mop is not installed”,
525: “Insufficient water in water tank”,
527: “Remove mop”,
528: “Dust bin missing”,
529: “Mop and water tank missing”,
530: “Mop and water tank missing”,
531: “Water tank is not installed”,
2101: “Unsufficient battery, continuing cleaning after recharge”,
}

ViomiVacuumSpeed
Silent = 0
Standard = 1
Medium = 2
Turbo = 3

ViomiVacuumState
Unknown = -1
IdleNotDocked = 0
Idle = 1
Idle2 = 2
Cleaning = 3
Returning = 4
Docked = 5
VacuumingAndMopping = 6

ViomiMode
Vacuum = 0 # No Mop, Vacuum only
VacuumAndMop = 1
Mop = 2

ViomiLanguage
CN = 1 # Chinese (default)
EN = 2 # English

ViomiLedState
Off = 0
On = 1

ViomiCarpetTurbo
Off = 0
Medium = 1
Turbo = 2

ViomiMovementDirection
Forward = 1
Left = 2 # Rotate
Right = 3 # Rotate
Backward = 4
Stop = 5
Unknown = 10

ViomiBinType
Vacuum = 1
Water = 2
VacuumAndWater = 3

ViomiWaterGrade
Low = 11
Medium = 12
High = 13

ViomiMopMode
“”“Mopping pattern.”“”
S = 0
Y = 1

2 Likes

Would it also be possible to start cleaning in a specific zone, for instance ,Kitchen‘?

Thanks for providing the json, I will try it later in :slight_smile:

The command to start cleaning is suppose to be (use the (advanced) command channel to send these to the vacuum)

set_mode_withroom[0, 1, 0]
the first part seems to be mopping in S (0) or Y(1) mode
the 2nd part represents start/stop/pause. (0 stop, 1 start, 2 pause)
the 3rd part dunno is the room nr. I guess 0 does them all.

I think you can get the rooms by issueing the get_room_mapping command.
You may want to check https://github.com/rytilahti/python-miio/issues/550 as there are more properties/commands that can be added

1 Like

For folks with vacuum with waterbox there is an experimental new release that adds channels for the waterbox.

It also contains an new channel for room cleaning (advanced). You need to provide the room# to start the cleaning.

You can download it here here

Note: This has now been merged. Hence you can download the official 2.5.9 snapshot binding as this functionality is included

Please feedback your experience if you tried it

Oh wow, thank you.

The following channels work for me with the Roborock s5e:
status#water_box_status
status#lock_status
status#water_box_mode
status#mop_forbidden_enable

It would be nice if the labels had a corresponding text like the other channels:

The channel “status#water_box_carriage_status” is not displayed and cannot be linked to an item, although the Roborock supports this:

{
    "result": [{
            "msg_ver": 2,
            "msg_seq": 4945,
            "state": 8,
            "battery": 100,
            "clean_time": 2930,
            "clean_area": 45495000,
            "error_code": 0,
            "map_present": 1,
            "in_cleaning": 0,
            "in_returning": 0,
            "in_fresh_state": 1,
            "lab_status": 1,
            "water_box_status": 1,
            "fan_power": 106,
            "dnd_enabled": 1,
            "map_status": 3,
            "is_locating": 0,
            "lock_status": 0,
            "water_box_mode": 204,
            "water_box_carriage_status": 1, ///////// see here /////////
            "mop_forbidden_enable": 1
        }
    ],
    "id": 77
}

Also the channel “actions#segment” is not displayed.

Would it also be possible to select several rooms, which are then cleaned one after the other? So far I have solved this in a rule with item.sendCommand("app_segment_clean[16, 17, 18]").
.