Xiaomi Robot Vacuum Binding

The tokens for both Xiaomi product that I access via this binding are of exactly the same length, I’ve replaced some numbers in letters in the original and posted it below.
What is strange is that it used to work previously, and even yesterday, after my first post where I stated the problem, it kinda sorted itself out. But today the same error returned without me doing anything.

Thing miio:basic:airpurifier “Mi Air Purifier Pro” [host=“192.168.xx.123”, token=“a093430950439435943a504395a66003”, deviceId=“airpurifier”, model=“zhimi.airpurifier.v7”]
Thing miio:vacuum:S55 “Roborock S55” [host=“192.168.xx.138”, token=“7033247238676a78b87c8d093472536e”, deviceId=“S55”, model=“roborock.vacuum.s5”]

1 Like

Dear all,
I am somehow lost and hope you can help me:

  • The thread is called “Xiaomi Robot Vacuum Binding” while the openhab docu calls it “Xiaomi Mi IO Binding”. Is it the same thing with different names or are the two different bindings?
  • The official docu states the option for cloud connection but using version 2.5 (the latest one) this is not shown in paper UI - any hint?

Thanks and best
Matthias

Hallo @Matthias_Kaufmann it is the same thing…
The binding started only with vacuums, later the basic part was added and it became miio binding.

The current release 2.5.4 and 2.5.5-snapshot have cloud functionality. Go to the binding list in paperUI and you see the possibility to enter your credentials.
Look in this thread about 2 months back and you see some screenshots of it.

Hello, the mapping does not appear in openhab. I’ve seen cloud related topics in previous comments but I can’t get them to work. Can you help me? Thanks in advance.

I had the same issue as @kovaga

    2020-04-30 21:55:18.724 [WARN ] [nal.transport.MiIoAsyncCommunication] - Error while polling/sending message
    java.lang.ArrayIndexOutOfBoundsException: null
    	at java.lang.System.arraycopy(Native Method) ~[?:1.8.0_211]
    	at org.openhab.binding.miio.internal.MiIoCrypto.iv(MiIoCrypto.java:52) ~[bundleFile:?]
    	at org.openhab.binding.miio.internal.MiIoCrypto.encrypt(MiIoCrypto.java:74) ~[bundleFile:?]
    	at org.openhab.binding.miio.internal.transport.MiIoAsyncCommunication.sendCommand(MiIoAsyncCommunication.java:257) ~[bundleFile:?]
    	at org.openhab.binding.miio.internal.transport.MiIoAsyncCommunication.sendMiIoSendCommand(MiIoAsyncCommunication.java:173) ~[bundleFile:?]
    	at org.openhab.binding.miio.internal.transport.MiIoAsyncCommunication$MessageSenderThread.run(MiIoAsyncCommunication.java:232) [bundleFile:?]

for me it helped changing the token in my *.things file (changing a letter, saving, changing back and saving)
I had the issue after update to 2.5.4

2 Likes

Dear Marcel,

thank you for the information.
I went through some learnings I want to share in case they are relevant for others:

  • You have to use Mi Home app, Roborock app is not supported (check out the difference of the apps here)
  • I was not aware that openhab 2.5.4 (or later) is required for the cloud functionality. I had 2.5.0 and upgraded. This brought up the cloud config parameter in paper Ui that have been missing before
  • Is there any channels list for the Roborock S5 max (the link here promisses, but does not work: https://www.openhab.org/addons/bindings/miio/#roborock-vacuum-s5e)?
  • Even the map is working on my side - very nice feature!
  • Even though I can receive the DND status, activating / deactivating DND does not work at my side using the channel as below (any hint)?
Switch     RoborockS5MaxRockyDndDndFunction                 "Do not disturb functionality"        (gRoborock) {channel="miio:vacuum:rocky:dnd#dnd_function"}

Thanks and best
Matthias

1 Like

All vacuums use the same channels. Look for the v1 example

Dnd channel is a read only channel at the moment, so indeed changing will not send anything to your vacuum. If I recall well it is due to the fact it requires you to send the time in the command, not simply on or off

I solve it with hashing the line in .thing, saving, then enabling it again.
The errors dissapears for some time, but return later.

Dear Marcel,

thank you for the hint. I got my roborock S5 Max working via cloud and use the advanced command quite a lot to set volume, read room ids, send the robot for room specific cleaning etc. I use this page as you linked it at the beginning of the thread.

Trying to activate and deactivate DND is use the DND timer. Interestingly there are just times, no enabling itself.
So I tried the following three command, all with a OK response but when checking the DND status afterwords, the old values (8 to 22) are sent:

  • [12,01,12,00] => as documented
  • [0,12,01,12,00] => adding a 0 for deactivation at the beginning as this is the response format (just trying it out)
  • [12,01,12,00,0] => adding a 0 for deactivation at the end as this is part of the response I receive (see this: {“result”:[{“start_hour”:22,“start_minute”:0,“end_hour”:8,“end_minute”:0,“enabled”:0}],“id”:8126})

Any idea?

Thanks and best
Matthias

Can anybody help how to send customs commands to Roborock S5 Max?
I can find command from https://github.com/marcelrv/XiaomiRobotVacuumProtocol … let’s say “get_water_box_custom_mode”

But when i look at debug log it says unknown :frowning:

2020-05-02 12:30:58.558 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {“id”:6420,“method”:“get_water_box_custom_mode”,“params”:[]} -> 1.1.1.1 (Device: 1XXXXXX3 token: 3977446BXXXXXXXXXXXXXXXX54617A73 Queue: 1)
2020-05-02 12:30:58.580 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 1XXXXXX3 type: UNKNOWN, result: [201], fullresponse: {“result”:[201],“id”:6420}

No not really. You could try the vevs version of mihome app, it the debug version from the first post and see what it sends n the log

That is nothing to worry about. It just means that the binding itself is not knowing the command, however as you can see your vacuum respond with something 201. Don’t know what it means, but that is the water_box_custom_mode it seems

the binding seems to have stopped working (with the last OH update, i think) for my Mi Air Purifier 2S. I’ve checked the token hasn’t changed (it hasn’t).

Any ideas…?

if you are using text config, add the model= to your config. Something seems to have changed in the OH framework that it now does no longer work without.

Thanks Marcel.

That fixed it - after I’d remembered the comma between parameters.

@marcel_verpaalen something is wrong with my yeelights color v1.As soon as i changed brightness from number to dimmer i have this problem: by moving the brightness slider at PaperUi i can dim and bright from 1 to 99 and back .If i try to do it using a rule i can dim ,for example from 99 to 20 but i can not bright from 20 to 99.I give a sendCommand(99) to brightness but nothing happens and at log i get

2020-05-05 21:06:08.645 [vent.ItemStateChangedEvent] - YeelightColorBulb1_Brightness changed from 20 to 99
2020-05-05 21:06:08.918 [vent.ItemStateChangedEvent] - YeelightColorBulb1_Brightness changed from 99 to 20

@Constantinos_Contis which version are you using? Suggest to use the 2.5.5 snapshot which has the fix for your issue.

This should be solved in the latest 2.5.5-snapshot build. Please test and confirm if it works now.

1 Like

This is fixed in the latest 2.5.5-snapshot build.
Please test of it fixed your issue

1 Like

Hallo Mischa,
This is fixed in the latest 2.5.5 -snapshot build. Please test and feedback