Xiaomi Robot Vacuum Binding

is it possible to make the commands depend from other? for example to turn on the vacuum I need to use set_mode_withroom [0, 1, 0], but if I want to clean around the edges the command should be set_mode_withroom [1, 1, 0]…for example if the “checkbox” (or anything) is checked on clean around the edges and I start cleaning it will send set_mode_withroom [1, 1, 0]…i hope you understand what I was trying to explain, im very bad explaining stuff :sweat_smile:

Hello, I have two questions about this binding. The first is a problem with visualizing the fan and control elements for the 1st version of the Vacuum:


Thats my items:

String actionControl  "Vacuum Control"          {channel="miio:vacuum:67f48725:actions#control" }
Number actionFan      "Vacuum Fan"         (gVac)   {channel="miio:vacuum:67f48725:actions#fan" }

Thats in my sitemap:

Switch item=actionControl mappings=[vacuum="Vacuum", pause="Pause",spot="Spot", dock="Dock"]
Switch item=actionFan mappings=[38="Silent", 60="Normal", 77="Power",90="Full", -1="Custom"]

I copied it from some examples here and it should work. I am using OH2 v2.5.

Also, could you please add support for Xiaomi Air Purifier 3/3H ( zhimi-airpurifier-mb3 and zhimi-airpurifier-ma4). The protocol is a bit changed but they just add it in https://github.com/rytilahti/python-miio/pull/585
Thanks

If you don’t want the red circled stuff, just put an empty format into your item label:

"Vacuum Control []"
1 Like

Wow, didnt know its so easy. Thank you!

Is there a list which roborock models work with this binding?

Xiaomi roborock s50 is working? What about s60 or s5 max?

First post or the binding docs.

hi…
there is a new xiaomi yeelight ceiling light:
yilai.light.ceiling1
https://www.gearbest.com/smart-ceiling-lights/pp_009313773573.html

its (still) not working with this model string but with “yeelink.light.ceiling1”.
maybe you can add this thing.
thank you

itm_RoboActionCommand.sendCommand("get_recover_maps")
is working fine and in my case gives the following result:

{"result":[[1,1575723134],[2,1577540948],[3,1577807926]],"id":5272}

1,1575723134 is referring to the initial, not edited map
2,1577540948 is referring to the older backup map
3,1577807926 is referring to the newer backup map

Any idea how to set one of these recovery map as active (load one of the map)?
I managed to do it with the help of the library https://github.com/rytilahti/python-miio with the following command:

mirobo raw-command recover_map 2,1577540948

How can this be done in obenhab? I had no success with the command channel.
For further information please see my PR: https://github.com/rytilahti/python-miio/pull/608

Did you try
itm_RoboActionCommand.sendCommand(“recover_map [2,1577540948]”)
if not, check with mirobo in debug mode what is the formatting of the command send, than it should be possible to replicate in OH command channel.

You are right, itm_RoboActionCommand.sendCommand(“recover_map [2,1577540948]”) works, thx!

Update: Just realized, “recover_map [2]” is doing the same

hi,
my Roborock S5 Max get a new Token every morning.
I get the new token using the Packet Sender method and the Vacuum works perfectly again.
Unfortunately the day after the token is changed again.

I’m doing something wrong?
Thanks

I also own the S5 Max. Read out the token via the Xiaomi Home App 5.6.40 Works fine and the token has never changed before.

1 Like

Hi everybody,

I was running OH 2.4 for quite some time without any issues. I had (and still have) the Xiaomi Mi IO binding installed and my Xiaomi Vacuum v1 was working perfectly fine. It was integrated via .things and .items-file (not via PaperUI). PaperUI was always showing me a newly discovered thing which was of type generic. As my integration was working fine I didn’t bother and simply left it in my inbox. Now I upgraded to OH2.5 and without any change to my configuration my device is not communicating with OH anymore. I tried uninstalling and reinstalling the binding but it didn’t work.

Here is the log:
2020-01-09 15:02:29.262 [thome.event.ExtensionEvent] - Extension ‘binding-miio’ has been uninstalled.
2020-01-09 15:02:36.727 [thome.event.ExtensionEvent] - Extension ‘binding-miio’ has been installed.
2020-01-09 15:02:36.988 [hingStatusInfoChangedEvent] - ‘miio:vacuum:robocock’ changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to UNINITIALIZED (HANDLER_CONFIGURATION_PENDING)

Any idea of how to proceed? If I downgrade to 2.4 (by reapplying an older backup / image to the sd card) everything works again.

I dont use things file for my roborock. I use PaperUI to auto discover the things, and then I use items files.
If you need help with your problem, perhaps take a look at your thing file. Or better, remove it and use PaperUI to auto discover your device, and then rebuild you items file.

I installed this binding on my fresh copy of OH 2.5Release yesterday, and it´s working just fine for me.

Hi,
I updated my Roborock s50 to the newes beta software version 3.5.7_002008. With this version it’s possible to add rooms in my map and and I can vacuum a selected room. It’s the same feature than the S6, except that i’ts not possible to name a room and because of this it is also not possible to clean a specific room with Alexa etc. Do you have information if it’s or will be possible to recreate the feature with openhab?
Br

Edit:
I checked my log, but the status is not in the list and undef:
2020-01-09 22:54:16.120 [vent.ItemStateChangedEvent] - statusClean changed from 0 to 3
2020-01-09 22:54:16.123 [vent.ItemStateChangedEvent] - actionControl changed from dock to UNDEF

You can create one or more rules for the rooms that Alex calls. Within the rule you have to use the following command to clean single rooms:

Thanks for the answer! I have tried, but it seems not to work for my s5. The result is empty

2020-01-10 09:17:12.861 [nt.ItemStatePredictedEvent] - actionCommand predicted to become get_room_mapping

2020-01-10 09:17:12.891 [vent.ItemStateChangedEvent] - actionCommand changed from {“result”:[1],“id”:5634} to get_room_mapping

2020-01-10 09:17:12.985 [vent.ItemStateChangedEvent] - actionCommand changed from get_room_mapping to {“result”:,“id”:5640}

I am using the S1 where this is working fine.
Try setting your vacuum to “Map saving mode(Beta)” in your app.

here is the binding for the viomi vacuum, im not sure if its right as i dont know how to test it, my only concern is that to get any value i need to type get_prop [] but on the existing databases i didnt see any example with this type of structure

@merccooper does your vacuum also support requesting specific properties? So what happens if you request it as usual, e.g. get_prop[ “battary_life”]

If not, you can try the following: make a dummy channel with an empty property but with refresh = true for the other ones set it to refresh false. I would expect the binding to send an empty property, but as result refresh all. (dunno, maybe it even sends an empty get_propery if all the properties have refresh false)