Xiaomi Robot Vacuum Binding

Hi @marcel_verpaalen,

Does this works with Viomi Robot Vacuum? Viomi Robot Vacuum now also controlled by Mi Home App .

Also struggling using Xiaomi Mi IO Marketplace binding (2.4.0) under OpenHab 2.4.0 (Raspberry Pi 3b+), i.e. identifying/connecting to Roborock S50.

When adding Xiaomi Robot Vacuum directly in PaperUI (having IP address and retrieved token, unsure about deviceID which is set as private vacuum name), I end up with error code:

Status: OFFLINE - COMMUNICATION_ERROR maximum number of DatagramSockets reached

Setting up device in .thing file (as described from your previous posts) generates a “no response from device”:

changed from OFFLINE to OFFLINE (COMMUNICATION_ERROR): No Response from device

@marcel_verpaalen
Little off-topic but do you have experience with Bluetooth only Xiaomi devices? (or anyone else here)
There are a few devices which I want to buy but they only have Bluetooth and it is not really convenient and if I can’t make it to work somehow from openHAB then there is no added value of these devices.
I know that there is a plugin for the plant sensors that sends data through MQTT. Would be nice if this can be achieved with other Xiaomi devices.

Update: I found this:

So it is not impossible, but still, only a few devices supported in these…

The deviceId needs to be exact the deviceId is as reported by the device. The datagram issues you see is due to the incorrect deviceid.

If you do discovery it will show you the id

Appreciate your response.

Although, for binding version 2.4.0 (PaperUI installation) / OpenHab 2.4.0, my Roborock S50 is not showing up in discovery. Are there any 2.4.0 SNAPSHOT version (jar files) to be used?


EDIT:
Not sure what happened, but reinstalled binding (PaperUI), and suddenly my existing PaperUI thing became only (automatically retrieving correct DeviceID).

Well, was a bit too early to celebrate…

After having Roborock online for some time (thus also having retrieved correct DeviceID), the connection dropped to offline. And now I am not able to re-connect, even though deleting thing / reinstalling binding etc, now using both IP, token, deviceid and device model as input for manual install in PaperUI. The Roborock remains OFFLINE.

1 Like

Make sure you don’t have the 2 things (1from config file and 1from paperui ) at the same time.
That will make the device will refuse the connection.
So either make the thing from file (using the correct deviceId) or from paperui

To answer my own question: yes, the 1S works fine with this binding.

It is autodiscovered as miio:generic and you need to manually add a thing as miio:vacuum and use the deive model rockrobo-vacuum-v1. After providing the token all channels are available.

@marcel_verpaalen, thank you very much for this amazing binding :+1:

Would it make sense to add the roborock.vacuum.m1s to the thingtype vacuum?

Yes, I am aware.

Have tried to delete .things file, have deleted thing in PaperUI followed by restart OH servce / deleting cache and *tmp files and uninstalling PaperUI binding.

However, still, re-installing binding / maunally installing PaperUI thing, I continue to get Offline_Communication_Error.

I actually can’t get this to work. @Flole can you think of any reason why the coordinates wouldn’t be copied to the clipboard?

Edit: Wrong quote in the original draft…

Hi,

i used this binding to integrate my roborock s5 into openhab since version 2.4.0 and it was working perfectly. Now i wanted to update to openhab 2.5.0.M4 but cannot get the roborock-items to work. The log does not show any errors for the binding. Are there any known bugs or breaking changes in the config in combination with the latest milestone?

Yes, it definitely does make sense. My dev environment is broken, need to rebuild it.
Than I can add this. (or feel free to submit a PR :wink: ) It should be as easy as modify the thingtype from unsupported to vacuum indeed.

Done:
https://github.com/openhab/openhab2-addons/pull/6274

1 Like

How can I obtain the tokens now?
The old android app doesn’t seem to work properly now. It doesn’t load the devices.
Also on the newest iOS app I was unable to extract readable data
Ps.: Now the tokens are also stored encrypted in iOS also. So you need to decrypt it to get it working.

I used this Russian app on Android:

https://www.smarthomeassistent.de/token-auslesen-roborock-s6-roborock-s5-xiaomi-mi-robot-xiaowa/ (sorry, German only)

1 Like

Short version on how to do it:

Uninstall the Mi Home app
Install the Russian app
Set the correct location
Read the token

Thanks that’s good to know.

There is a good tutorial on YouTube how I done it on iOS:

Basically:

  • Backup iPhone without authentication
  • Extract the _mihome.sqlite file (with some number prefix like 243243423__mihome.sqlite where the numbers are your accout number)
  • Open the database with some basic sqlite db viewer and run the query shown in the video
  • Decrypt the given tokens with some online tool.
2 Likes

First of all thanks a lot for this Binding - it is amazing and works perfectly at my place! :slight_smile:

However, I tried to do the same setup at a friends place - sadly without any luck.
I am always getting a Offline - CONFIGURATION_ERROR state after adding the robot to OpenHab 2.4.0.

The token extraction went smoothly with the methods proposed in this thread. The Thing is also discovered by the Binding. Initially, the Thing has an Online state and seems working. However, after a short time I am seeing in the logs:

2019-10-26 11:27:26.948 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Communication error for Mi device at 192.168.2.116: Receive timed out
2019-10-26 11:27:26.952 [DEBUG] [nal.transport.MiIoAsyncCommunication] - No response from device xxx at 192.168.2.116 for command {"id":52,"method":"miIO.info","params":[]}.
2019-10-26 11:27:26.955 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping xxx (192.168.2.116)
2019-10-26 11:27:26.965 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping xxx (192.168.2.116) success
2019-10-26 11:27:26.971 [DEBUG] [ing.miio.handler.MiIoAbstractHandler] - Received response for xxx type: MIIO_INFO, result: null, fullresponse: {"error":"No Response"}
2019-10-26 11:27:26.974 [DEBUG] [ing.miio.handler.MiIoAbstractHandler] - Error received: "No Response"

I repeated the setup several times (each time resetting the robot’s wifi and extracting a new token), but it always converges towards Offline - CONFIGURATION_ERROR state.

At the same time, the XiaoMi App is working properly with the robot - so I am assuming that the robot is connected properly to the router and that this might not be a network issue.

Do you have any idea what I am doing wrong?

Cheers,
Karl

Hi,
Today I received the Yeelight Meteorite LED lamp.
I am running 2.5M4 on x86.
The binding identifies it as yeelink.light.ceiling10 - and since this lamp is not included in the binding as of yet, the Thing is marked as " Unknown Mi IO Device/Unsupported Xiaomi Mi Device" and I only get the “on/off” and “execute command” items.
Trying the “Execute command” using the commands in yeelink.light.ceiling4.json it works as intended. I also tried the lamp with a direct telnet session, and can verify the commands from there as well (as per the Yeelight Inter Operation Specification").
Changing the “Device Model String” for the Thing in Paper UI from yeelink.light.ceiling10 to yeelink.light.ceiling4 does not give me any more Items, @marcel_verpaalen, is there anything I can do to get the items displayed. I belive there should be a duplicate entry in the database for the .ceiling10 that is identical to the .ceiling4 json.

Best regards /Daniel

@Daniel_Linder delete your things and manually add it as a basic device.
Change the model in the config (as you did ) to the yeelink.light.ceiling4
that should give you all the channels.

If it works than we can add yeelink.light.ceiling10 to the file as well and it detect it automatically