Xiaomi Robot Vacuum Binding

Hallo Sebasian,

Either download the one in post Xiaomi Robot Vacuum Binding (if you use this, please send me a debug log file so the issue can be better understood)
or disable the map channel & Cloud functionality (=no userId/password), which will make it behave as before the new functionality was introduced.

Hi Marcel,

a cache clean and reinstall fixed the issue, just to let you know!

Thanks for the great work!

HI
I saw the icon of vacum, but cannot find now, can somaone share ?

First I want to thank you for this great binding, now here comes the questions:

  1. Is there a way to configure the binding username and password through config files rather than paperui?
  2. EDIT: Why am I sometimes getting duplicated commands when clicking a switch:

2020-05-13 18:18:52.298 [nt.ItemStatePredictedEvent] - MiPowerPlugPower predicted to become OFF
2020-05-13 18:18:52.336 [vent.ItemStateChangedEvent] - MiPowerPlugPower changed from ON to OFF
2020-05-13 18:18:53.672 [vent.ItemStateChangedEvent] - MiPowerPlugPower changed from OFF to ON
2020-05-13 18:19:06.899 [vent.ItemStateChangedEvent] - MiPowerPlugPower changed from ON to OFF

This makes the switch on the basic ui pannel to “flicker” when I click on it.

  1. Can I pair this plug directly to OpenHAB without the Xiaomi App? As currently I can’t discover it as a thing in PaperUI if I don’t have it paired on my phone with the Xiaomi App. EDIT: I guess not, as I saw the switch needs to be connected to WiFi first, and the only way to do that is through the Xiaomi App, correct?

yes, that is possible. Please see this post: Xiaomi Robot Vacuum Binding - #1432 by kovaga

This may happen if there are still unprocessed commands in the queue for the device. So if your device still has a properties refresh in the queue, executing that will cause the UI to switch back (the plug did not yet receive the command you executed), after that the command is executed, changing the switch state, the following refresh will update the UI to the new state that you were expecting.

Note that some of the powerplugs have rather poor wifi causing lot of connection losses and delayed execution. I’ve seen similar behavior indeed with my plug.

and indeed… there little possibility to connect without first using Xiaomi app.
(in theory you can, but you need to connect to your plug’s wifi, you could control it that way. If you are ready to experiment you can issue the commands to change the wifi settings and hope that the binding cloud connectivity picks up the new token… note: untested territory but probably possible)

Hi @marcel_verpaalen
I am on latest stable where the binding does discover the token in its own.
Since then I have the issue that it eats threads like hell. (Mi IO MessageSenderThread: TIMED_WAITING)

I was firstly thinking it was related to another binding. Therefore the info is here :

Zigbee Channel?

Are you using the released version, would you mind trying the 2.5.5 snapshot version as at least one cause of the leaking threads has been fixed.

can i uninstall and reinstall on 2.5.4. stable or do I need to drop the jar to get it?

I think you best uninstall the 2.5.4 one and then drop the 2.5.5 one in the add-on folder

I think few topics up I looked up the download link

ok - I did and will monitor.

for now I can say that the “old” threads that were created by the 2.5.4 are NOT gone after uninstall and dropping the jar.
So most likely a restart of openhab is needed to get rid of those.

Yes indeed, if the device did not respond, they were opened and never closed.
OH restart is the only way to close them

I think this has been fixed in 2.5.6 stable that is about to be released today.

is the scaling interface included in 2.5.5 stable binding?

No it is not… currently the only way to change is to change the scale and recompile yourself
Here is the scale:

I still have threads running up with that downloaded version

Hi,

being on OH 2.5.5 I am still unable to login into the cloud. @marcel: any hint greatly appreciated.

Peter

16:01:38.234 [DEBUG] [.miio.internal.cloud.MiCloudConnector] - Xiaomi cloud login with userid nXXXXX@XXX.XXX
16:01:38.245 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Xiaomi Login step 1
16:01:46.356 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Xiaomi Login step 1 content response= &&&START&&&{"serviceParam":"{\"checkSafePhone\":false}","qs":"%3Fsid%3Dxiaomiio%26_json%3Dtrue","code":70016,"captchaUrl":null,"callback":"https://sts.api.io.mi.com/sts","location":"","_sign":"0psXfr43eNI0IX6q9Suk3qWbRqU=","desc":"登录验证失败","sid":"xiaomiio"}
16:01:46.368 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Xiaomi Login step 1 response = HttpContentResponse[HTTP/1.1 200 OK - 268 bytes]
16:01:46.376 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Xiaomi Login step 1 sign = 0psXfr43eNI0IX6q9Suk3qWbRqU=
16:01:46.386 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Xiaomi Login step 2
16:01:46.833 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Xiaomi login step 2 response = HttpContentResponse[HTTP/1.1 200 OK - 1373 bytes]
16:01:46.839 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Xiaomi login step 2 content = &&&START&&&{"sid":"xiaomiio","callback":"https://sts.api.io.mi.com/sts","qs":"%3Fsid%3Dxiaomiio%26_json%3Dtrue","securityStatus":1,"notificationUrl":"/identity/authStart?sid=passport&context=zu39Doq%2B%2B6Xfv4gbrzho572zTvFtZfmwaU%2FWHtu4X7tf2PJGEldEqiJpsrEzz9zo3r0o%2FpqLY22EbZ9bx0Tort4E1XA51cpJwaoycgNxV6nzBBHcfCo5iH40skzIyVt5OQeWEzbfqui353nqibNd3kxGbXAHWjm4yk1lgEwDX54h5ai9QiwW1O3omT5po6vBXAaUEHRy36qDPNY7u%2F2WWs3fpEUh0vEll2ZTCSKIu4QBqjk0Sr7ZGWe6bBpfwG5JXaSllwSlTUG%2FCLfHgcpe1R9zEiZv0zcM0KO45YjzVVkj0gUMZQg3AuqqBsCRE75%2FpJMwYfVgV8kNuAxZhNiE6i7LaL%2Focu6Vur9X5clJ9fovzgt4U3mGfPwIP1dM0oAQX68eNbBnguoHp1hvvMKNXIFYGaPdBPAcg2De2C5CKTAx8gkrQZ46ttf55YKbvv77jpJ%2B9xtX2owFcCI5hGcz8CHblooAChwsUie%2FPhhY23cjMXZspRavFgphaq%2BPbEmt6FM98gAm3C1baBvliStZ8Ajl1tQzXorJCjSoZZBgyzb0sz87Ni5yU77%2FVqCxPgQ2CWQoc%2BVu%2BN7NSO97epIc5XtvGgbiVF8mIgCzM%2FeiM1M8dCDCHgynSsNxoJLm0%2B%2F%2F3UPbihWzGSgxh5qvmYSw5ut5V5FjC5XG4chlBqrxWmylfpU7IRucAqbd2954NPulaDIe0TWRgv%2Bzo0dvruepfGkypDaSjzDGY%2FPjKKqbhWMoRfCA1a9EeAgfPfw163VO5It2SL9gIuTZxQqqvgeouC6ZZ8vHiRbsQWRi8ZzWFeQA4VVt5mpLtUjdu7XbSrllXlroxNjv9QeFBYLZvipFKsUEDH12edatZRh2JWfWrG3gwqJYFeUqN%2F4%2FVI%2BOCQF19cLP57CwTWD2kcr9YNqpfXAhSLjjwQDXDY1o4rE6JcUGiY8Ap0YaWjQ8wwaLUF%2FnpSiU7xZM1cLF36xMFDopFHR6eLxCrMhzV2k3pzBAUR%2FEPSvb0FjoblGRx7%2BtUeGV","pwd":0,"code":0,"desc":"成功","location":"","captchaUrl":null,"_sign":"0psXfr43eNI0IX6q9Suk3qWbRqU="}
16:01:46.854 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Xiaomi login ssecurity =
16:01:46.859 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Xiaomi login userId =
16:01:46.863 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Xiaomi login cUserId =
16:01:46.867 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Xiaomi login passToken =
16:01:46.871 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Xiaomi login location =
16:01:46.875 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Xiaomi login code = 0
16:01:46.881 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Cookie dump for https://account.xiaomi.com/pass/serviceLoginAuth2
16:01:46.888 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Cookie (.xiaomi.com) : sdkVersion --> accountsdk-18.8.15     (path: /. Removed: false)
16:01:46.894 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Cookie (.xiaomi.com) : deviceId --> dogvyo     (path: /. Removed: false)
16:01:46.902 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Cookie (.xiaomi.com) : uLocale --> de_CH     (path: /. Removed: false)
16:01:46.908 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Cookie (account.xiaomi.com) : pass_trace --> vImI3ISiEI4KJ0P2raNJ2CpCDMinz5lRLOXtXXzbP4WzslzjX603OiSjIKprzSaJr1twUp/JFhPiB/QdyTjTDw==     (path: /. Removed: false)
16:01:46.915 [TRACE] [.miio.internal.cloud.MiCloudConnector] - Cookie (account.xiaomi.com) : pass_ua --> web     (path: /. Removed: false)
16:01:46.935 [INFO ] [.miio.internal.cloud.MiCloudConnector] - Error logging on to Xiaomi cloud (0): Error getting logon location URL. Return code: 0

Hello everyone.
I tried everything, but I don’t get my vacuum roborock s6 to work with the mi io binding. :frowning:

The Thing shows the follwoing status no matter what I do.

Status: OFFLINE - COMMUNICATION_ERROR No Response from device

I already updated openhab from 2.4 to the latest 2.5.5 and reinstalled the mi io binding (2.5.5). (Because the roborock s6 was not listet in the binding version 2.4) I created the thing via paper ui, deleted that, created it via thing file… nothing works.

I took the token from an old mi home app version.

Anyone an idea? I read that a few of you get it to work with the s6…
Btw.: Via mobile the vac can be controlled as normal.

Thanks in advance.
Dennis

code 70016 = wrongs userID/Password. Double check your credentials.

@masterds163 try to get the right token via the cloud. Your error is typical for wrong token.
the S6 should be recognized as vacuum with the 2.5.5 binding.
If issues persist, share a debug log… bug again, if there are no responses, the token is wrong.

@marcel_verpaalen: I have “Error getting logon location URL. Return code: 0”
So token should not be my problem? Any idea?

It is the cloud user id/pass that is wrong.

Of you can’t get that to work, use ‘the old way’ of getting the token. See the first topic