Yes, I expect this will come soon.
Need to tidy my updated cloud code and find a nice way to integrate in openhab flow.
Note: for me the python token extractor also did not work… This only supports the capcha feature. But if you are ‘lucky’ like I was as well, you also need the 2FA code. This is not (yet?) supported by the python tool. miio binding will soon support both capcha and 2FA features
my lovely roborock s50 is working just fine with this awesome binding and the map feature is so usefull for me…I think that this year i will retire my robo and go for a new full of new features robo vacuum like Mova V50 complete,but i am still thinking about it cause i will miss the map and all the stuff i can use with this binding.Thank you mate.
Here is the first alpha version of a new logon method.
Way of working:
Binding discovers a new thing “Cloud Connector”
Fill in the userId in the thing properties
connect the image channel
upon the start, there will be an QRcode as image, scan it and logon
once logged on, the logon token will be stored and you should be able to login without needing the QR
Note: If you were late with he response to the qrcode, disable the thing and enable it again. This will initiate the logon procedure
Once the logon tokens are retreived, they are stored as thing properties. Once they are available, the QR logon will no longer be invoked. If for some reason you want to invoke the qrlogon once more, remove the data (note, marked as advanced so you need to click
If for some reason logon authentication does not work, you may also try other tools to get the userId, ssecurity and serviceToken values. These will be used for further logons when populated.
Known issues:
Thing shows offline, communication error –> ignore for now. It works when you see in the debug log that your device detailed get pulled from the cloud.
During the star of the binding you see “No Xiaomi cloud credentials. Cloud connectivity disabled” as the original cloud credentials are not used anymore. Logon will happen bit later when the cloudconnector thing is enabled
Logon mode with userId/password is most likely not working well. / not fully implemented yet
Captcha processing seems okay, but 2FA response stopped working again after another change at Xiaomi side and needs fixing again.
yes, unfortunately due to some updated library in the openhab framework, the 5.1 snapshot is not directly compatible with the 5.0.2 stable version.
As nothing in the code depends on anything specific 5.1, I’ll try to recompile it to the 5.0.2 version.
when we have few folks confirming it works well for them, I’ll submit it for inclusing in the normal builds
Its works pretty well for me now on the stable version.
P.s. it took me hours to recognize that I had my 2 devices on the ignore list in openhab… I don’t know why. But yeah after removing them from the ignore list, the scan was recognizing them immidiatly, then I just had to switch to cloud mode and since than its running smooth, with the minor bugs you described.
For info to all, This works as it should be. I, firstly, struggled to log in via QR, next day it worked. After that, I moved my vacuum items to new binding. Map is created by binding and all other items are working. I’m creating a rule set that vacuum go to a preset location for manual dust bin emptying. Hence I say command channel also works.
Thanks for the great work on the binding and new login method update @marcel_verpaalen
I spend last week several hours cleaning the code and making improvements, but after it it stopped working - I think I handle some exception response too good and it stops halfway.
Long story short.. was aiming to get it clean for loading in the regular build, but needs some more time.
But as we have a new release, hope to get it in the new dev build in the next 2 weeks or so
No worries, it takes as long as it takes – I was just curious.
In the meantime, I’ve just deleted the login credentials, so no rush from my side.
One quick question though: Would the 5.0.2 JAR file also work with openHAB 5.1, or are there compatibility issues?
I think there are some version differences, but the version that works is the link with 5.1 snapshot in the name. It is the same code as the 5.0.2 one.