Xiaomi Robot Vacuum Binding

@marcel_verpaalen Can we crop somehow the blue background so the map looks bigger at Habpanel?Or is there a way to edit the map to make it bigger, in mi home app?

1 Like

Not necessarily, hd-nguyen is using openHAB 2.4, not 2.5. Is the new binding backwards compatible with OH2.4?

Hi,
I was able to setup my Vacuum via the Xiaomi binding. I’m able to start the Vacuum via the Panel UI.
Then I created an item to use the vacuum with google assistant in a .items file:

Switch XiaomiMiDevice034xxxx_Actions_PowerOnOff “name” (gRoom) { ga=“Vacuum” }

I can see the vacuum in google assistant, but while I’m able to turn on and off blinds and lights with voice command, it doesn’t start the Vacuum. I wasn’t able to find any answer searching the forum.
could someone point me in the right direction?

if i recall right it is the # of seconds the consumable is already in use

Hi @marcel_verpaalen
I tried to use your latest one org.openhab.binding.miio-2.5.4-SNAPSHOT.jar
Then, I reverted to version of OH2.4, it can work well now.

@marcel_verpaalen i updated my openhabian 2.5.3.1 to 2.5.4 snapshot and using ur latest jar i get

[INFO ] [miio.internal.cloud.MiCloudConnector] - Error logging on to Xiaomi cloud (0): Error getting logon sign. Cannot parse response: null

is that normal?

No, it is not normal… It is the quick fix (more graceful error) for the issue that you had before.
As I’m still not clear of what is causing your issue, this is still the old error, but now it does not prevent the binding for starting.

Maybe you can send in private mail a more detailed log on the cloud process. I expect the cloud is giving some strange answer (or at least unexpected from binding point of view) that is causing this.

Yes, it is on my wishlist… together with many more… your contribution is welcome :slight_smile:

1 Like

sure mate,anything i can do to help.Please guide me how to take a more detailed log of the cloud process please.

Pls log the cloud login this way:

log:set trace org.openhab.binding.miio.internal.cloud
log:tail org.openhab.binding.miio.internal.cloud

This will give just the cloud details in the most detailed form incl server responses.

Note wrt to credentials / cloud log. I don’t think there is high risk in sharing, passwords are as far as I know not in the logging. It does show your userId & token (change a few chars)
When you send, you may want to change few chars in the passtoken as the passtoken temporary allows access to the account (or logon once more as that invalidates the old passtoken).

i sent u message with my log

i got the same error message

Error logging on to Xiaomi cloud (0): Error getting logon sign. Cannot parse response: null

here is my log:

16:15:50.639 [DEBUG] [.miio.internal.cloud.MiCloudConnector] - Xiaomi cloud login with userid xx@xx.com
16:15:50.648 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Xiaomi Login step 1
16:15:50.650 [DEBUG] [.miio.internal.cloud.MiCloudConnector] - Xiaomi cloud login with userid xx@xx.com
16:15:50.659 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Xiaomi Login step 1
16:15:51.851 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Xiaomi Login step 1 content response= &&&START&&&{"notificationUrl":"","qs":"%3Fsid%3Dxiaomiio%26_json%3Dtrue","code":0,"ssecurity":"x5CIgOxboeHWv+/ug9xk6w==","passToken":"V1:XXXXXWNpiBsvOsUotVDOnA3+iGHM+IKdMobh9V13EOwr09y50znEF2Map5tdEWCc3lhjAB+iZctblWdj51ZsokCZEZprjh5aHDmjMaDpLabCouRtyMGudjB/kHEJaUUpREzRgJ4cgA1pJy9CsPPs/yZm/QIeeLvX9kpPYmvdtWNWdm/6MF/QLJPEUc4ouUeV/dOtvefcddUWG8GYdnnyesbT1jUyVqwplPwAajZ67uzhzgkzEQEh2UhMm+N9uquATiC2ulrdnKXUB06PrdsqLA==","securityStatus":0,"nonce":6048667275241213952,"userId":1905967057,"cUserId":"07GXXLFierzY3decLMwnnB7OO4s","psecurity":"eFlMEV3xHuLBg7WLeOYChQ==","captchaUrl":null,"location":"https://sts.api.io.mi.com/sts?pwd=0&d=wqrcoj&tsl=0&p_ts=1585923038000&p_lm=1&auth=prs8oes9OfXoMH%2FXUkB1rZPVUobcn1PK7SsluhFzMTvqdbQqozvOUljb0iTRa2XVEKXj963lvLpdruNNXWg4AmZ81%2Fw1O5XxInDC4p3iAmYh%2FoZ2TrUgN%2FHOe7Gha6j%2FjPpPM%2FVH5kSQA4cRN2w0JMkVwlLfiDRmrl5xQkPMBNs%3D&m=1&nonce=PZOdGcin%2FVsBk1I3&_ssign=f8qbhYyBiRvRh635qwTiLCFHd2k%3D","pwd":1,"desc":"成功"}
16:15:51.855 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Xiaomi Login step 1 content response= &&&START&&&{"notificationUrl":"","qs":"%3Fsid%3Dxiaomiio%26_json%3Dtrue","code":0,"ssecurity":"4Sn4c16e38i/qhRmJJs8ug==","passToken":"V1:XXXXXXXpiBsvOsUotVDOnA3+iGHM+IKdMobh9V13EOwr09y50znEF2Map5tdEWCc3lhjAB+iZctblWdj51ZsokCZEZprjh5aHDmjMaDpLabCouRtyMGudjB/kHEJaUUpREzRgJ4cgA1pJy9CsPPs/yZm/QIeeLvX9kpPYmvdtWNWdm/6MF/QLJPEUc4ouUeV/dOtvefcddUWG8GYdnnyesbT1jUyVqwplPwAajZ67uzhzgkzEQEh2UhMm+N9uquATiC2ulrdnKXUB06PrdsqLA==","securityStatus":0,"nonce":8304548838885015552,"userId":1905967057,"cUserId":"07GXXLFierzY3decLMwnnB7OO4s","psecurity":"eFlMEV3xHuLBg7WLeOYChQ==","captchaUrl":null,"location":"https://sts.api.io.mi.com/sts?pwd=0&d=wqrcoj&tsl=0&p_ts=1585923038000&p_lm=1&auth=nxQLKZfxsQguRCpk1zyHUOEpLZ1z2X3tnSINn0Tk5CGFJq8BK2ie1pVEBTuOnZBiZi6h440gtKcm2FW2e1a%2BsgPRXHnS0AYsfqK1sqeN5Gp4tqnOMBJChwSh2VegxT7FBmIb8NGj2qpOkWdU40e3RYGSr0RaZTsnzKY0kxOYcx8%3D&m=1&nonce=Etx%2FCAET8xwBk1I3&_ssign=cvUBPCAqXpuuTyIuqXAd8NXnPeo%3D","pwd":1,"desc":"成功"}
16:15:51.873 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Xiaomi Login step 1 response = HttpContentResponse[HTTP/1.1 200 OK - 946 bytes]
16:15:51.882 [INFO ] [.miio.internal.cloud.MiCloudConnector] - Error logging on to Xiaomi cloud (0): Error getting logon sign. Cannot parse response: null
16:15:51.873 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Xiaomi Login step 1 response = HttpContentResponse[HTTP/1.1 200 OK - 956 bytes]
16:15:51.899 [INFO ] [.miio.internal.cloud.MiCloudConnector] - Error logging on to Xiaomi cloud (0): Error getting logon sign. Cannot parse response: null

Yes, it’s compatible except above problem.
As my observation, I have to scan several times for discovering a device.
How can I increase the scanning time?

i fixed it like this: i removed the .jar from addons folder,deleted the miio folder at data .Then reinstall the jar to addons folder,wait to find devices,add my login details at binding config and it worked just fine.

Did you restart openhab?
If someone had the same, can you see what happens if your restart the binding ( bundle:list than bundle:restart with the number from bundle list)
If that does not solve it, test of it is solved by restart of openhab.
I have an idea what can cause the issue

A restart of openhab solved the problem! :slight_smile:

Thanks, that confirms my suspicion. The cookie with the passtoken is still send along and still valid at the new logon request. The binding expects to execute the full logon sequence, but the cloudserver responds different basically already reconfirms the existing logon.

The cookie is not wiped with binding restart, but is cleared with OH restart.

1 Like

The map is also working :+1:

yeap ,a restart fixed everything,plus the device discovery works just fine now ,finding all the devices “with token” its really something!Very nice work mate,very nice! :slight_smile:
Any estimate when the changes will be merged to openhab?

I have good hopes for coming week. Need to nail that re-logon issue you found.
@cpmeister is suburb in the reviewing, giving fast & helpful feedback. Besides the obvious feature improvements, I expect the overall stability of the binding is improving as well because of the many small fixes.

Hi there,
I’m new to the binding and I have a Roborock S5 (S50). I’d like to clean my rooms with the app_segment_clean Command. The rooms are setup in the app.
As mentioned above the get_room_mapping is available but returns an empty string on the S5.

With try&error I figured out 4 of my 6 rooms. I tried numbers 0-31 (above 31 does not work). The other rooms are not found… any ideas how to figure out which room-numbers actually exists on the S5?

Can anyone help me? Would really like to get that going. :slight_smile:

edit: now 5 of 6 rooms. Numbers are 4,16,17,18,19… one room still missing (the one where the charger is placed)