Connect Roborock Q5 Pro to Xiaomi binding

I tried to connect my Roborock Q5 Pro to openhab via the Xiaomi binding. I’ve read various topics to extract the token and DID but have not succeeded.

What I’ve done in short:

  • Vacuum wifi reset, connect both my Macbook and phone to the Roborock Wifi.
  • Run Wireshark on the Mac and intercept the message from the device to my phone while doing the wifi-reset
  • Data received is 32 bytes, whereof the last 16 bytes (32 characters) should be the token according to various search-results on google
  • Create a Generic Xiaomi thing and fill in this token and the DID with info from Roborock app

This gives me the following error:

2024-03-22 13:03:41.036 [WARN ] [nal.transport.MiIoAsyncCommunication] - Error while polling/sending message for rr_2S3NuVXXXXXXXXXXPl4qdL
java.lang.StringIndexOutOfBoundsException: String index out of range: 25
        at java.lang.StringLatin1.charAt(StringLatin1.java:47) ~[?:?]
        at java.lang.String.charAt(String.java:693) ~[?:?]
        at org.openhab.binding.miio.internal.Utils.hexStringToByteArray(Utils.java:59) ~[bundleFile:?]
        at org.openhab.binding.miio.internal.transport.MiIoAsyncCommunication.sendCommand(MiIoAsyncCommunication.java:308) ~[bundleFile:?]
        at org.openhab.binding.miio.internal.transport.MiIoAsyncCommunication.sendMiIoSendCommand(MiIoAsyncCommunication.java:176) ~[bundleFile:?]
        at org.openhab.binding.miio.internal.transport.MiIoAsyncCommunication$MessageSenderThread.run(MiIoAsyncCommunication.java:278) [bundleFile:?]

If I change the DID to 2S3NuVXXXXXXXXXXPl4qdL, the error reads

2024-03-22 13:18:11.049 [WARN ] [nal.transport.MiIoAsyncCommunication] - Error while polling/sending message for 2S3NuVG372KPAX4YPl4qdL
java.nio.BufferOverflowException: null
        at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:221) ~[?:?]
        at java.nio.ByteBuffer.put(ByteBuffer.java:914) ~[?:?]
        at org.openhab.binding.miio.internal.Message.createMsgData(Message.java:70) ~[bundleFile:?]
        at org.openhab.binding.miio.internal.transport.MiIoAsyncCommunication.sendCommand(MiIoAsyncCommunication.java:308) ~[bundleFile:?]
        at org.openhab.binding.miio.internal.transport.MiIoAsyncCommunication.sendMiIoSendCommand(MiIoAsyncCommunication.java:176) ~[bundleFile:?]
        at org.openhab.binding.miio.internal.transport.MiIoAsyncCommunication$MessageSenderThread.run(MiIoAsyncCommunication.java:278) [bundleFile:?]

So the string index out of range is gone but it come up with a Communication_error on the Thing page.

Anyone any ideas? Did I mis anything? Ideally, I don’t want to use the Xiaomi app.

The binding you use (miio) is not working with the roborock app.
When the vacuum is connected to the roborock app, the protocol is different/not compatible.

So you either can use the mi home app and use the miio binding, or currently you can’t intrgrate your vacuum with openhab…(at least not that I’m aware of)