Xiaomi Robot Vacuum Binding

Everything i know i learned from reading this topic. There are great examples above.
actionCommand is the ITEM from the robot that accepts commands and forwards them to the robot :wink:
the coordinates are in the brackets [ ].
The “0/0” of the robot is a 25500/25500 so i told the robot to move 0,5 m forward with the command i posted.

I have all my Yeelights autodiscovered, they all have deviceID, but today I’ve got the same error “maximum number of DatagramSockets reached”.
I’m using 2.5.0.201902052016 │ Xiaomi Mi IO Binding.

I’ve got this error after restart binding in console using bundle:restart.

Can you log an issue for the in GitHub. A workaround may be this

https://support.mulesoft.com/s/article/How-to-deal-with-the-java-net-SocketException-maximum-number-of-DatagramSockets-reached-exception

Do you have other binding using UDP add well?
It is strange that nothing really changed lately and this issue started appearing recently.

I’m maybe add some logging to track the opening and closing of the connections

Hi @marcel_verpaalen

I have a few things that work very well with this binding (vacuum cleaner, yeelight bulbs, Philips eyecare lamp etc) recently added to this 2 bulbs PHILIPS Zhirui and they sometimes work correctly but most of the time no, the log often appears “No response”

2019-02-12 13:38:16.085 [DEBUG] [nal.transport.MiIoAsyncCommunication] - No response from device 05792D41 at 192.168.1.126 for command {"id":9736,"method":"miIO.info","params":[]}.
2019-02-12 13:38:16.085 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping 05792D41 (192.168.1.126)
2019-02-12 13:38:16.088 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 05792D41 type: MIIO_INFO, result: null, fullresponse: {"error":"No Response"}
2019-02-12 13:38:16.091 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping 05792D41 (192.168.1.126) success
2019-02-12 13:38:16.092 [DEBUG] [internal.handler.MiIoAbstractHandler] - Error received: "No Response"
2019-02-12 13:38:16.097 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":9739,"method":"get_prop","params":["power","bright","cct","snm","dv"]} -> 192.168.1.126 (Device: 05792D41 token: XXXX Queue: 2)
2019-02-12 13:38:16.100 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping 05792D41 (192.168.1.126)
2019-02-12 13:38:16.108 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping 05792D41 (192.168.1.126) success
2019-02-12 13:38:16.112 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":9740,"method":"get_prop","params":[]} -> 192.168.1.126 (Device: 05792D41 token: XXXX Queue: 3)
2019-02-12 13:38:16.115 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping 05792D41 (192.168.1.126)
2019-02-12 13:38:16.121 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping 05792D41 (192.168.1.126) success
2019-02-12 13:38:16.125 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":9741,"method":"miIO.info","params":[]} -> 192.168.1.126 (Device: 05792D41 token: XXXX Queue: 4)
2019-02-12 13:38:16.128 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping 05792D41 (192.168.1.126)
2019-02-12 13:38:16.138 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping 05792D41 (192.168.1.126) success
2019-02-12 13:38:16.148 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 05792D41 type: GET_PROPERTY, result: ["off",1,1,0,0], fullresponse: {"result":["off",1,1,0,0],"id":9737}
2019-02-12 13:38:16.175 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 05792D41 type: GET_PROPERTY, result: [], fullresponse: {"result":[],"id":9738}
2019-02-12 13:38:16.190 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 05792D41 type: GET_PROPERTY, result: ["off",1,1,0,0], fullresponse: {"result":["off",1,1,0,0],"id":9739}
2019-02-12 13:38:16.213 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 05792D41 type: GET_PROPERTY, result: [], fullresponse: {"result":[],"id":9740}
2019-02-12 13:38:16.235 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 05792D41 type: MIIO_INFO, result: {"life":230458,"token":"XXXX","mac":"7C:49:EB:39:4B:3C","fw_ver":"1.3.0_0035","hw_ver":"ESP8266","uid":1639496817,"model":"philips.light.bulb","wifi_fw_ver":"1.5.0-dev(7f7a714)","ap":{"rssi":-63,"ssid":"XXXX","bssid":"XXXX"},"netif":{"localIp":"192.168.1.126","mask":"255.255.255.0","gw":"192.168.1.1"},"mmfree":3360}, fullresponse: {"result":{"life":230458,"token":"XXXX","mac":"7C:49:EB:39:4B:3C","fw_ver":"1.3.0_0035","hw_ver":"ESP8266","uid":1639496817,"model":"philips.light.bulb","wifi_fw_ver":"1.5.0-dev(7f7a714)","ap":{"rssi":-63,"ssid":"XXXX","bssid":"XXXX"},"netif":{"localIp":"192.168.1.126","mask":"255.255.255.0","gw":"192.168.1.1"},"mmfree":3360},"id":9741}
2019-02-12 13:38:16.913 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Communication error for Mi device at 192.168.1.126: Receive timed out
2019-02-12 13:38:16.916 [DEBUG] [nal.transport.MiIoAsyncCommunication] - No response from device 0531DEBB at 192.168.1.126 for command {"id":2003,"method":"miIO.info","params":[]}.
2019-02-12 13:38:16.918 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping 0531DEBB (192.168.1.126)
2019-02-12 13:38:16.931 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping 0531DEBB (192.168.1.126) success
2019-02-12 13:38:16.935 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0531DEBB type: MIIO_INFO, result: null, fullresponse: {"error":"No Response"}
2019-02-12 13:38:16.937 [DEBUG] [internal.handler.MiIoAbstractHandler] - Error received: "No Response"
2019-02-12 13:38:18.747 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Communication error for Mi device at 192.168.1.125: Receive timed out
2019-02-12 13:38:18.750 [DEBUG] [nal.transport.MiIoAsyncCommunication] - No response from device 05E0E682 at 192.168.1.125 for command {"id":540,"method":"miIO.info","params":[]}.
2019-02-12 13:38:18.752 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping 05E0E682 (192.168.1.125)
2019-02-12 13:38:18.760 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping 05E0E682 (192.168.1.125) success
2019-02-12 13:38:18.764 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 05E0E682 type: MIIO_INFO, result: null, fullresponse: {"error":"No Response"}
2019-02-12 13:38:18.766 [DEBUG] [internal.handler.MiIoAbstractHandler] - Error received: "No Response"
2019-02-12 13:38:23.770 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Periodic update for 'miio:generic:0573DAA1' (miio:basic)
2019-02-12 13:38:23.777 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping 0573DAA1 (192.168.1.125)
2019-02-12 13:38:23.791 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping 0573DAA1 (192.168.1.125) success
2019-02-12 13:38:23.804 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":705,"method":"get_prop","params":["power","bright","cct","snm","dv"]} -> 192.168.1.125 (Device: 0573DAA1 token: XXXX Queue: 1)
2019-02-12 13:38:23.811 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping 0573DAA1 (192.168.1.125)
2019-02-12 13:38:23.830 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0573DAA1 type: GET_PROPERTY, result: ["off",1,1,0,0], fullresponse: {"result":["off",1,1,0,0],"id":705}
2019-02-12 13:38:23.836 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping 0573DAA1 (192.168.1.125) success
2019-02-12 13:38:23.846 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":706,"method":"get_prop","params":[]} -> 192.168.1.125 (Device: 0573DAA1 token: XXXX Queue: 1)
2019-02-12 13:38:23.853 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping 0573DAA1 (192.168.1.125)
2019-02-12 13:38:23.869 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping 0573DAA1 (192.168.1.125) success
2019-02-12 13:38:23.928 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0573DAA1 type: GET_PROPERTY, result: [], fullresponse: {"result":[],"id":706}
2019-02-12 13:38:26.144 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Periodic update for 'miio:generic:05792D41' (miio:basic)
2019-02-12 13:38:26.150 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping 05792D41 (192.168.1.126)
2019-02-12 13:38:26.163 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping 05792D41 (192.168.1.126) success
2019-02-12 13:38:26.174 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":9742,"method":"get_prop","params":["power","bright","cct","snm","dv"]} -> 192.168.1.126 (Device: 05792D41 token: XXXX Queue: 1)
2019-02-12 13:38:26.182 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping 05792D41 (192.168.1.126)
2019-02-12 13:38:26.198 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping 05792D41 (192.168.1.126) success
2019-02-12 13:38:26.210 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":9743,"method":"get_prop","params":[]} -> 192.168.1.126 (Device: 05792D41 token: XXXX Queue: 1)
2019-02-12 13:38:26.217 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping 05792D41 (192.168.1.126)
2019-02-12 13:38:26.226 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 05792D41 type: GET_PROPERTY, result: ["off",1,1,0,0], fullresponse: {"result":["off",1,1,0,0],"id":9742}
2019-02-12 13:38:26.228 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping 05792D41 (192.168.1.126) success
2019-02-12 13:38:26.278 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 05792D41 type: GET_PROPERTY, result: [], fullresponse: {"result":[],"id":9743}
2019-02-12 13:38:29.293 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Periodic update for 'miio:basic:049833BE' (miio:basic)
2019-02-12 13:38:31.905 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":2004,"method":"miIO.info","params":[]} -> 192.168.1.126 (Device: 0531DEBB token: B8AF918A8F5C804088744993AA1ECBED Queue: 1)
2019-02-12 13:38:31.907 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping 0531DEBB (192.168.1.126)
2019-02-12 13:38:31.912 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping 0531DEBB (192.168.1.126) success
2019-02-12 13:38:33.713 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Periodic update for 'miio:basic:05E0E682' (miio:basic)
2019-02-12 13:38:33.734 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping 05E0E682 (192.168.1.125)
2019-02-12 13:38:33.749 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping 05E0E682 (192.168.1.125) success
2019-02-12 13:38:33.879 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Periodic update for 'miio:generic:0573DAA1' (miio:basic)
2019-02-12 13:38:33.881 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping 0573DAA1 (192.168.1.125)
2019-02-12 13:38:33.890 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping 0573DAA1 (192.168.1.125) success
2019-02-12 13:38:33.894 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":707,"method":"get_prop","params":["power","bright","cct","snm","dv"]} -> 192.168.1.125 (Device: 0573DAA1 token: XXXX Queue: 1)
2019-02-12 13:38:33.897 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping 0573DAA1 (192.168.1.125)
2019-02-12 13:38:33.911 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping 0573DAA1 (192.168.1.125) success
2019-02-12 13:38:33.915 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":708,"method":"get_prop","params":[]} -> 192.168.1.125 (Device: 0573DAA1 token: XXXX Queue: 2)
2019-02-12 13:38:33.919 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping 0573DAA1 (192.168.1.125)
2019-02-12 13:38:33.932 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping 0573DAA1 (192.168.1.125) success
2019-02-12 13:38:33.969 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0573DAA1 type: GET_PROPERTY, result: ["off",1,1,0,0], fullresponse: {"result":["off",1,1,0,0],"id":707}
2019-02-12 13:38:33.991 [DEBUG] [internal.handler.MiIoAbstractHandler] - Received response for 0573DAA1 type: GET_PROPERTY, result: [], fullresponse: {"result":[],"id":708}
2019-02-12 13:38:36.238 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Periodic update for 'miio:generic:05792D41' (miio:basic)
2019-02-12 13:38:36.244 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Sending Ping 05792D41 (192.168.1.126)
2019-02-12 13:38:36.256 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Ping 05792D41 (192.168.1.126) success

Thank you!
If i run into this error once more I will log this issue to GitHub with debug info.
List of bindings I’m using:
193 │ Active │ 80 │ 2.2.0.201708090807 │ MySensors Binding
219 │ Active │ 80 │ 0.10.0.oh240 │ Eclipse SmartHome Astro Binding
220 │ Active │ 80 │ 0.10.0.oh240 │ Eclipse SmartHome MQTT Binding
221 │ Active │ 80 │ 0.10.0.oh240 │ Eclipse SmartHome MQTT Thing Binding
222 │ Active │ 80 │ 0.10.0.oh240 │ Eclipse SmartHome NTP Binding
249 │ Active │ 80 │ 2.4.0 │ Exec Binding
250 │ Active │ 80 │ 1.13.0 │ openHAB HTTP Binding
252 │ Active │ 80 │ 2.4.0 │ Xiaomi Mi Smart Home Binding
254 │ Active │ 80 │ 2.4.0 │ Network Binding
255 │ Active │ 80 │ 1.13.0 │ openHAB NetworkUpsTools Binding
256 │ Active │ 80 │ 1.13.0 │ openHAB Serial Binding
257 │ Active │ 80 │ 1.13.0 │ openHAB SNMP Binding
258 │ Active │ 80 │ 2.4.0 │ Systeminfo Binding
259 │ Active │ 80 │ 1.13.0 │ openHAB TCP-UDP Binding
260 │ Active │ 80 │ 1.13.0 │ openHAB WoL Binding
262 │ Active │ 80 │ 2.4.0 │ YamahaReceiver Binding
287 │ Active │ 80 │ 2.4.0 │ openHAB Cloud Connector Bundle
288 │ Active │ 80 │ 2.5.0.201902052016 │ Xiaomi Mi IO Binding

Indeed, thanks,

Note that it may be a more generic issue somehow as I can see also

Hi all, I just upgraded my roborock sw to 3.3.9_001702 version, but the binding is no longer able to control or retrieve data from robot. Where’s the problem? How can I have a look to the binding logs? Thanks in advance.

To look at the logs
execute these in the karaf console:

log:set debug org.openhab.binding.max
log:tail org.openhab.binding.max
bundle:restart org.openhab.binding.max

I can just say, that I got my first roborock s50 yesterday with the same firmware. works like a charm. maybe your token changed?

1 Like

beginner question: do I see this correctly that the DND (do not disturb) function cannot be set via any channel? It seems the channels are READ-ONLY

Indeed, it is not supported by the binding. If you want to switch on/off the DND you can do so by making a rule and send the right command via the command channel

e.g. set_dnd_timer [22,0,8,0] [start hour, start minutes, end hour, end minutes]

1 Like

thanks a lot, but this goes beyond my expertise. I know how to write rules but what is “set_dnd_timer”? In general I wonder myself where I can find more information about available commands?

see the Sending custom commands in the very first topic for some more info on sending commands and which commands are known. In this (long) topic you find several examples of folks writing rules for it

1 Like

fantastic! wouldn’t it make sense to copy/paste this to the binding documentation?

using the instructions and links above I noticed that the fan modes are differnet for my vacuumer.
Doc says:

Mode Level
Quiet 38
Balanced 60
Turbo 75
Max 100
Mob 105

But in my case (Roborock S50) it’s

Mode Level
Quiet 101
Balanced 102
Turbo 103
Max 104
Mob 105

Is this a “known issue”?

1 Like

You were right. Thanks. For an unknown reason the token changed :slight_smile:

1 Like

I cant add this item ‘items/XiaomiMiRoborockVacuum_Cleaning_CleaningFinished’ with an invalid item type ‘Boolean’ because it i preset as an boolean

@StefanH yes, more or less. Though I did not have the correct mapping confirmed though.

My understanding is that the above 100 values are the mobbing modes, where the vacuum is actually slower than in the ‘usual modes’. Is that correct?

not sure I can follow. As far as I could see, I can just control fan power, not speed. In the original Mi Home app this is called Cleanup Mode. The different fan settings are named like MAX or Mob. In Mob setting, the fan is just turned off. This way the roborock will make no noise, just mob

Hi all, I noticed a slowdown in the reactivity of the vacuum to the commands sent through the binding with the latest fw update. Do you notice the same issue?