Xiaomi Robot Vacuum Binding

No, that’s not right. I have the new Roborock Vacuum S5 Max (s5e) and the fan mode is as follows (data “fan_power” via the “get_status” command):

101=Silent
102=Balanced
103=Turbo
104=Max
105=Gentle
106=Customize (Auto)

I marked this on the image in the Xiaomi app settings:

However, the customize switch is only active when the mop mode has been also set correctly.
For the mop mode I would create a feature request in Github.

Because the fan values of the newer models are over 100, I think the format is no longer correct:

I think you are right in that respect.

Also we would need to add 106 to the mapping table. I see 105=gentle in your table, but we had it as mob in the table before. What is the value when you set the various mob levels? does it go beyond 106? Or are all the modes >100 mob modes?

101 to 106 are only values for fan power. Also the value 105 has no use for the mob, it is also a value for the fan.

The mob values start at 200, I have created a feature request for this. See here:

https://github.com/openhab/openhab2-addons/issues/6628

Let’s have that checked by someone that owns a regular S5 /S50.
Might be that it depends on the device.

@marcel_verpaalen do you have an idea how I could find out the method of adjusting the water flow? With get_status I get the values 200 to 205 for water_box_mode. But so far I have not been able to figure out how to set the values.

I just removed my complete userdata folder and started from scratch, but still have the same error.
When i downgrade to 2.4, it is working again, so the token shouldn’t be the problem, right?

here a trace log after restarting the binding:

2019-12-19 20:40:45.194 [DEBUG] [internal.handler.MiIoAbstractHandler] - Disposing Xiaomi Mi IO handler 'miio:vacuum:117978615'
2019-12-19 20:40:45.204 [DEBUG] [iio.internal.discovery.MiIoDiscovery] - Receiver thread received SocketException: Socket closed
2019-12-19 20:40:45.205 [DEBUG] [iio.internal.discovery.MiIoDiscovery] - Receiver thread ended
2019-12-19 20:40:45.207 [DEBUG] [iio.internal.discovery.MiIoDiscovery] - Stop Xiaomi  Mi IO background discovery
2019-12-19 20:40:45.232 [DEBUG] [iio.internal.discovery.MiIoDiscovery] - Start Xiaomi Mi IO background discovery
2019-12-19 20:40:45.239 [DEBUG] [iio.internal.discovery.MiIoDiscovery] - Getting new socket for discovery
2019-12-19 20:40:45.241 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Discovery sending ping to 172.17.255.255 from 0.0.0.0/0.0.0.0:46016
2019-12-19 20:40:45.243 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Discovery sending ping to 224.0.0.50 from 0.0.0.0/0.0.0.0:46016
2019-12-19 20:40:45.244 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Discovery sending ping to 172.18.255.255 from 0.0.0.0/0.0.0.0:46016
2019-12-19 20:40:45.244 [TRACE] [l.discovery.MiIoDiscoveryParticipant] - ServiceInfo: [ServiceInfoImpl@32563131 name: 'roborock-vacuum-s5_miio117978615._miio._udp.local.' address: '(null):54321' status: 'NO DNS state: probing 1 task: null', has NO data, empty]
2019-12-19 20:40:45.246 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Discovery sending ping to 172.19.255.255 from 0.0.0.0/0.0.0.0:46016
2019-12-19 20:40:45.247 [DEBUG] [l.discovery.MiIoDiscoveryParticipant] - mDNS roborock-vacuum-s5 identified as thingtype miio:vacuum with did 070835F7 (117978615)
2019-12-19 20:40:45.249 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Discovery sending ping to 224.0.0.1 from 0.0.0.0/0.0.0.0:46016
2019-12-19 20:40:45.250 [DEBUG] [iio.internal.discovery.MiIoDiscovery] - Starting discovery receiver thread for socket on port 46016
2019-12-19 20:40:45.252 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Discovery sending ping to 192.168.4.255 from 0.0.0.0/0.0.0.0:46016
2019-12-19 20:40:45.254 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Thread Thread[Thread-152,5,main] waiting for data on port 46016
2019-12-19 20:40:45.258 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Received 32 bytes response from 192.168.4.110:54321 on Port 46016
2019-12-19 20:40:45.259 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Discovery response received from 192.168.4.110 DeviceID: 070835F7
Message:
Header  : 21 31 00 20 00 00 00 00 07 08 35 F7 5D FB D2 3C
checksum: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
content : N/A
Header Details: Magic:21 31
Length:   32
Serial:   07 08 35 F7
TS:2019-12-19 20:40:44
2019-12-19 20:40:45.261 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Discovery responses from : 192.168.4.110:21 31 00 20 00 00 00 00 07 08 35 F7 5D FB D2 3C FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
2019-12-19 20:40:45.262 [DEBUG] [iio.internal.discovery.MiIoDiscovery] - Discovered Mi Device 070835F7 (117978615) at 192.168.4.110 as miio:generic:070835F7
2019-12-19 20:40:45.264 [DEBUG] [iio.internal.discovery.MiIoDiscovery] - No token discovered for device 070835F7. For options how to get the token, check the binding readme.
2019-12-19 20:40:45.270 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Thread Thread[Thread-152,5,main] waiting for data on port 46016
2019-12-19 20:40:45.271 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Received 32 bytes response from 192.168.4.110:54321 on Port 46016
2019-12-19 20:40:45.278 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Discovery response received from 192.168.4.110 DeviceID: 070835F7
Message:
Header  : 21 31 00 20 00 00 00 00 07 08 35 F7 5D FB D2 3C
checksum: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
content : N/A
Header Details: Magic:21 31
Length:   32
Serial:   07 08 35 F7
TS:2019-12-19 20:40:44
2019-12-19 20:40:45.280 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Thread Thread[Thread-152,5,main] waiting for data on port 46016

and this is my thing-config:

Thing miio:vacuum:117978615 "Bobbi" @ "Wohnzimmer" [ host="192.168.4.110", token="XXXXXXXXXXXXXXXX" ]

The log says:

2019-12-19 20:40:45.264 [DEBUG] [iio.internal.discovery.MiIoDiscovery] - No token discovered for device 070835F7. For options how to get the token, check the binding readme.

As I said, the same config works with openHAB 2.4 and the token is also working there

@marbon87
You miss the (mandatory) modelid in the text config, this should result in handler config error.
Maybe 2.5 is more strict in checking and not initiating the handler. But in 2.4 you will most likely have problems with the device stopping after a while

got most of the commands up and running for viomi-vacuum-v7, I still need to figure out how to change the water level used by the vacuum, but most of them are already there.

@merccooper if that is all, you can make a basic device database entry to (almost fully) support it.
Only the get_disturb would be trickey

Look at the existing database files, gives you direction on how to do. All the things you find in the get_prop section should have a corresponding property in the database.
The actions are to send the set_… commands

sorry, but could you be more precise?
do you mean that thing config shold look like this:

Thing miio:vacuum:070835F7 "Bobbi" @ "Wohnzimmer" [ host="192.168.4.110", token="XXXXXXXXX" ]

I already tried that and have the same problem, but other error

2019-12-20 10:18:27.600 [DEBUG] [iio.internal.discovery.MiIoDiscovery] - Receiver thread received SocketException: Socket closed
2019-12-20 10:18:27.600 [DEBUG] [iio.internal.discovery.MiIoDiscovery] - Stop Xiaomi  Mi IO background discovery
2019-12-20 10:18:27.601 [DEBUG] [iio.internal.discovery.MiIoDiscovery] - Receiver thread ended
2019-12-20 10:18:27.693 [DEBUG] [iio.internal.discovery.MiIoDiscovery] - Start Xiaomi Mi IO background discovery
2019-12-20 10:18:27.698 [DEBUG] [iio.internal.discovery.MiIoDiscovery] - Getting new socket for discovery
2019-12-20 10:18:27.699 [DEBUG] [iio.internal.discovery.MiIoDiscovery] - Starting discovery receiver thread for socket on port 48427
2019-12-20 10:18:27.699 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Discovery sending ping to 172.17.255.255 from 0.0.0.0/0.0.0.0:48427
2019-12-20 10:18:27.700 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Thread Thread[Thread-393,5,main] waiting for data on port 48427
2019-12-20 10:18:27.702 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Discovery sending ping to 224.0.0.50 from 0.0.0.0/0.0.0.0:48427
2019-12-20 10:18:27.703 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Discovery sending ping to 172.18.255.255 from 0.0.0.0/0.0.0.0:48427
2019-12-20 10:18:27.705 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Discovery sending ping to 172.19.255.255 from 0.0.0.0/0.0.0.0:48427
2019-12-20 10:18:27.707 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Discovery sending ping to 224.0.0.1 from 0.0.0.0/0.0.0.0:48427
2019-12-20 10:18:27.708 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Discovery sending ping to 192.168.4.255 from 0.0.0.0/0.0.0.0:48427
2019-12-20 10:18:27.711 [TRACE] [l.discovery.MiIoDiscoveryParticipant] - ServiceInfo: [ServiceInfoImpl@17026561 name: 'roborock-vacuum-s5_miio117978615._miio._udp.local.' address: '(null):54321' status: 'NO DNS state: probing 1 task: null', has NO data, empty]
2019-12-20 10:18:27.712 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Received 32 bytes response from 192.168.4.110:54321 on Port 48427
2019-12-20 10:18:27.714 [DEBUG] [l.discovery.MiIoDiscoveryParticipant] - mDNS roborock-vacuum-s5 identified as thingtype miio:vacuum with did 070835F7 (117978615)
2019-12-20 10:18:27.714 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Discovery response received from 192.168.4.110 DeviceID: 070835F7
Message:
Header  : 21 31 00 20 00 00 00 00 07 08 35 F7 5D FC 91 E3
checksum: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
content : N/A
Header Details: Magic:21 31
Length:   32
Serial:   07 08 35 F7
TS:2019-12-20 10:18:27
2019-12-20 10:18:27.715 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Thread Thread[Thread-393,5,main] waiting for data on port 48427
2019-12-20 10:18:27.715 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Discovery responses from : 192.168.4.110:21 31 00 20 00 00 00 00 07 08 35 F7 5D FC 91 E3 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
2019-12-20 10:18:27.716 [DEBUG] [iio.internal.discovery.MiIoDiscovery] - Discovered Mi Device 070835F7 (117978615) at 192.168.4.110 as miio:generic:070835F7
2019-12-20 10:18:27.716 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Received 32 bytes response from 192.168.4.110:54321 on Port 48427
2019-12-20 10:18:27.718 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Discovery response received from 192.168.4.110 DeviceID: 070835F7
Message:
Header  : 21 31 00 20 00 00 00 00 07 08 35 F7 5D FC 91 E3
checksum: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
content : N/A
Header Details: Magic:21 31
Length:   32
Serial:   07 08 35 F7
TS:2019-12-20 10:18:27
2019-12-20 10:18:27.718 [DEBUG] [iio.internal.discovery.MiIoDiscovery] - No token discovered for device 070835F7. For options how to get the token, check the binding readme.
2019-12-20 10:18:27.719 [TRACE] [iio.internal.discovery.MiIoDiscovery] - Thread Thread[Thread-393,5,main] waiting for data on port 48427

It is so easy to set this up with autodiscovery. :sunglasses:

You do it as per the binding readme incl the model &deviceId:

Thing miio:vacuum:070835F7 "Bobbi" @ "Wohnzimmer" [ host="192.168.4.110", token="put here your token", deviceId="0326xxxx" ,model="rockrobo.vacuum.v1"]
 ]

If this helps, then I have this:

Thing miio:vacuum:s50 "vacuum" @ "vacuum" [ host="192.168.215.20", token="xxxxxxx", deviceId="0470DD46", model="roborock.vacuum.s5" ]
1 Like

@marcel_verpaalen & @Olymp thanks a lot! Not it’s working with 2.5.

This works for me:
openHAB 2.5.0 Release Build

Oh, what a typo. I wanted to write:
Now it’s working with 2.5.

Sorry :see_no_evil:

Did you got an answer to your question?

As long as my Roborock S6 is connected the a wifi with internet access everything is working fine.
As soon as I deny internet for the Roborock S6 he no longer response any openhab commands. Though Openhab is still able to contact the Roborock.

Is there no possibility to use the binding without allowing internet connection for the Roborock?

@glompf I think the only way to cut off access to the cloud is by using dustcloud or valentuo