Xiaomi Robot Vacuum Binding

What firmware do you have installed on your Roborock S5 V2? I’ve seen that there is again a new FW available for my devices and there was a change for the maps:

image

But I did not install yet because I’m not 100% sure if the binding still works with the newest FW.

mine is the latest 3.5.7_002008, and it seems that is doesn’t work with the latest alpha binding, see few post belows.
but the official miiO binding works like a charm with this firmware

Ive tried and failed.
How do get Rename the rooms in the Mihome app. I can edit them. divide and merge. but cannot rename

I have been able to trouble shoot the room numbers for a few of the rooms by using app_segment_clean and typing 0 1 2 3 4 5 and so on.
I can get it to work with 1 2 3 and 4. anything more and it doesn’t find the room. But there are still rooms on my map that i cannot find this way. Also get_room_mapping[] returns nothing. no errors. I just get a {“result”:[],“id”:11299} with nothing else.

Nevermind. Seems as though i have the S5 and the command get room mapping is not available. I was able to find the rooms by trial and error.
even though i have only about 8 rooms. My room numbers go up to 18 with blank rooms in between.

room namming only available on S6 or S5 max

Hi all, do you confirm that on roborock s50 with fw 3.5.7_002008 the power commands are no more 38, 60, 77, 90, 105 and -1 ?

yes, with newest FW power commands seem to have changed. How to get the new commands? With old commands roborock doesnt accept the values.

Which vacuum model that is?
You can try to check the log of Mi Home app version 5.4.49 which has debug logging on.
See if what it is sending. Alternatively you can try to decompile the vacuum helper apk.
3rd option: set it with the app and see in OH what are the related % values. Indeed they seem to differ a bit in the various firmwares

Hi!

Thanks for your work, I got almost everything working! The cloud discovery works like a charm :slight_smile: I’ve only one issue with the map, there I get the following error in the logs:

2020-03-15 10:44:38.809 [INFO ] [g.miio.internal.cloud.CloudConnector] - Getting vacuum map roboroommap%XXXXXXXXXXX%2FX from Xiaomi cloud server: 
2020-03-15 10:44:38.810 [INFO ] [miio.internal.cloud.MiCloudConnector] - Send request: {"obj_name":"roboroommap%XXXXXXXXXXX%2FX"} to https://cn.api.io.mi.com/app/home/getmapfileurl
2020-03-15 10:44:38.815 [INFO ] [miio.internal.cloud.MiCloudConnector] - Error while executing request to https://cn.api.io.mi.com/app/home/getmapfileurl :java.net.UnknownHostException: cn.api.io.mi.com: No address associated with hostname

Can you guess why resolving the url fails, but only for getting the map? I have a v1 roboter.

Edit:

I can use the German server, but then, the device is not known. I guess this makes sense since the device is registered (in the Mi Home app) on the Chinese server.

2020-03-15 11:13:13.859 [INFO ] [miio.internal.cloud.MiCloudConnector] - Send request: {"obj_name":"roboroommap%XXXXXXXXXXX%2FX"} to https://de.api.io.mi.com/app/home/getmapfileurl
2020-03-15 11:13:13.886 [INFO ] [miio.internal.cloud.MiCloudConnector] - Received  JSON message {"code":-6,"message":"invalid device","result":null}

Also, the device discovery works. Although here, the request goes to a url without the country code:

2020-03-15 11:21:19.241 [INFO ] [miio.internal.cloud.MiCloudConnector] - Send request: {"getVirtualModel":false,"getHuamiDevices":0} to https://api.io.mi.com/app/home/device_list
2020-03-15 11:21:20.208 [INFO ] [miio.internal.cloud.MiCloudConnector] - Devices token info saved to /var/lib/openhab2/miio/miioTokens-cn.json

Edit2:

Alright, I got it working :slight_smile: I had to move the device to the German server and then everything works. Seems to be something weird with the route to the Chinese server (?)

Best
Stefan

Hallo Stefan,
You can try to keep the server in the binding config empty, than all the known servers are tested.
There’s only a few servers for the whole world.
The exact logic for linking av country to a server is not known to me yet.

You can see which servers know your vacuum of they provide a token for it. If there is only one server that your vacuum is defined in, it will add that server during the discovery. In case of multiple it will check in which it is defined as online.

In the userdata/miio folder there is a json for each server for further exploration

1 Like

This is by design… The CN server uses a domain name without the country… cn.api.io.mi.com does not exist (strangely)

Another strange thing I found is that you can sometimes receive a map from a server that is not related to your vacuum. This does not work for tokens (each server has a different token for the device)

Ah, interesting! So probably it could be bug in the API call for the map that the country code for China has been added to this call?

Yes I think that is a bug… I thought I included some logic to remove the .CN

seems to be a firmware bug, cant even change clean modus via Xiaomi app. Seems we have to wait for FW update?

Hi marcel,

is it normal that the map channel won’t show the correct map with firmware 3.5.7_002008

Hi Jo,
No idea. Map is very experimental.
Can you send a rrmap file so we can see what it is for your device.

You can find these files in userdata/miio folder.

Hi,

here it is :

https://www.transfernow.net/1Kfdtu032020

yes, that does not give a sweet picture.
The file version it indicates is same as for other ones, I’m trying to see if there is some other parameter that maybe not yet understood is different in your file.

Did all files come out this way, or did you get a proper map in OH before?
Do you have a screenshot of what I should expect at the same time? (is it like below)
image

Did all files come out this way

YES

did you get a proper map in OH before

NEVER

here is my map throught the alpha binding:

and what we should expect:

in reddit i saw that is impossible to load the map with the new firmware 3.5.7 in flolevac.
https://www.reddit.com/r/homeautomation/comments/f2h95b/roborock_s5_357_firmware_not_loading_map_on/
maybe the same cause for your alpha version??

I think I’ll figure it out… my quick experimenting so far looks already bit in the right direction
Got most new features now. Will make a new release in the next couple of days

2 Likes