Xiaomi Robot Vacuum Binding

Not expected anytime soon. From what I have seen this device uses different commands than the regular vacuums, it is more like a basic thing, also can’t be fully solved with the basic thing.
It will need a new thingtype which will be some sort of fusion between the vacuum code and then basic thing code. I’d say: we welcome your contribution :smiley:

thanks @mas this is a clear bug.
I’ve created a PR to fix this

@rkrisi I think it is. What is the model Id you see in the screen?
I think we have in the database yeelink.light.bslamp1 & yeelink.light.bslamp2

im not sure where to begin, but I would be glad to help if you can give me some instructions on how to start (i am veeery new to openhab)

Would start by documenting the exact commands needed by your device, and the exact responses it produces to those commands. Can take a peek at python-miio for usable ones. (use github, you can create a public gist, that allows me to look along and may be able to help you underway)

Add (manually) a miio:vacuum thing, overwrite the model with rockrobo.vacuum.v1. and proper token. Ensure to enable the command channel and debugging (see in this thread how to). This allows you to send and experiment with the commands. If there are things that are working similar, maybe with the existing binding limited functionality is already available

In order to make your device work, setup a development environment, read on how to develop a binding. take the miio binding, add the definition for a new thingtype. Than suggest to copy the vacuum handler and start modifying it to send the commands your vacuum needs.

1 Like

I have done the upgrade to openhab2.5.
But now the miio-binding does not recognize my vacuum (Roborock S50) anymore .
With openhab2.4 there were no problems and i could control the roborock without problems.
I work with text-based files for the definitions of bindings, things and items.
On the Roborock there is valetudo0.4.0 installed.

Has anyone the same problems after upgrading to OH2.5 ?
Does anyone have a solution ?

I think the same problem has already been raised by marbon87 on October 22nd (Xiaomi Robot Vacuum Binding).

Many thanks

Wolfgang

1 Like

Xiaomi 1S is still working fine with Snapshot #1779.

I don’t think that a snapshot is the same as the stable release.
But by the way, where can I find the snapshot 1779 and how can I install them (question for learning) ?

Great binding !
Question, can we use the binding to clean specific room ? (supported by S6)

Yes, see some posts above.

On the day of the Release version the Snapshot version is the same as the Release version.

Snapshot Release

The snapshot build is created almost daily, and include the latest changes to the openHAB 2 core and add-ons. These changes are often unstable, so you should use this branch only for testing or development purposes.

I have not upgraded myself yet, but can say that there were recent no breaking developments done on the binding. Hence not expecting it to stop working.

i still have the problem. The thing is in HANDLER_CONFIGURATION_PENDING and there are no log messages

I think the error usually points to missing configuration details.
Have you tried to get the binding going by having it discover an item and then configure it?
Suggest to set the logging to debugging and see if it is talkative around the issue found.
It normally spits out what is the issue at hand if it is reaching the normal initiation of the handler.

also searching the forum, you see many advices of cleaning cache etc

what I can see from now is that the viomi vacuum is in a different container called viomivacuum (not in the vacuum container) so sending the commands are probably useless, as the command should be structurized differently, as I understood it doesn’t uses miio.vacuum for this type of vacuum, it uses miio.viomivacuum …or I could be wrong

i got the first command!

ill do a list later, for now sending

set_mode_withroom [0, 1, 0]

will start the vacuum

I added my Roborock s50 to OH2.5
It went online and then a minute later to OFFLINE. The fact that it has been online i guess shows that the settings are ok.

Any idea what is going wrong ?

2019-12-19 10:44:24.757 [hingStatusInfoChangedEvent] - 'miio:vacuum:0F85F601' changed from UNINITIALIZED to INITIALIZING
2019-12-19 10:44:24.779 [hingStatusInfoChangedEvent] - 'miio:vacuum:0F85F601' changed from INITIALIZING to OFFLINE
2019-12-19 10:44:34.803 [hingStatusInfoChangedEvent] - 'miio:vacuum:0F85F601' changed from OFFLINE to ONLINE
2019-12-19 10:45:34.930 [hingStatusInfoChangedEvent] - 'miio:vacuum:0F85F601' changed from ONLINE to OFFLINE (CONFIGURATION_ERROR)

i added the binding through addons.cfg and the think and items through PaperUI

You need to be more specific…
Did you add the token as well?
I believe you can experience to see a thing going online, and a few minutes after it turns to offline due to configuration issues. I have seen this before.

In case you´re absolutly sure there is no config error, then perhaps try restart openhab and/or try clear the cache/tmp. Sometimes these “things” simply mess up, and a clear cache/tmp as well as restart is needed to correct it.

I have my Roborock S55 online, and it´s working great.

I checked the token again with the altered Mi Home app … and the last 3 digits of the token had changed … with the new token it now works! But when does it change ? Each time i start the app?

No, the token should ONLY change, when the Wifi setting of the Roborock changes. (Ie if you reset the configuration of the Roborock and add it to your WiFi network again, it will create a new token).
Its weird that yours are changing… How is your WiFi network set up?