Xiaomi Robot Vacuum Binding

I tried the link I posted but get the same result sorry.

thanks, but I’m getting an error that says “missing ‘]’ at ‘deviceID’”

here’s my thing file:-

Thing miio:vacuum:0xxxxxx7	"Xiaomi Robot Vacuum x"	[ host="192.168.1.xxx", token="7xxxxxxxxxxxxxxxxxxxxxx2" deviceId="0xxxxxx7"]

FYI: I’m running the latest milestone build.

Did you delete the old thing? (as your one is stilla miio:unsupported… it needs to be a miio:basic)

Is the , not missing in your config between the token & deviceId?

Hi Marcel
Yes i have deleted the thing from PaperUI & re added it but still get

2019-02-02 19:57:03.507 [INFO ] [internal.handler.MiIoAbstractHandler] - Mi Device model chuangmi.plug.m3 identified as: Unknown Mi IO Device (unknown). Matches thingtype miio:unsupported

it was - thanks for spotting my error. It’s now working OK.

Ok, I’ll need to double check than if the that last addition went well.
To get it going, please manually add the thing as a miio:basic, leave the model empty, see if that works.
If still does not work, override the modelId with the m1 like you did before.

Hi Marcel

I added a thing manually but do not get the on/off channel as I previously had? How do I change the model manually in the .things file?

Thing miio:basic:07138991	"Oliver Night Light"	[ host="192.168.10.230", token="6cb9d0b08620b03f2d70ba2b9cd7637e", deviceId="07138991" ]

Hi Marcel

I got it to work correctly & it is now updating when manually switching the switch on the device with the following .thing

Thing miio:basic:07138991	"Oliver Night Light"	[ host="192.168.10.230", token="6cb9d0b08620b03f2d70ba2b9cd7637e", model="chuangmi.plug.m1", deviceId="118720913" ]

Great… though looking @ the code… I’m rather confident it should be in
You may want to see if the latest snapshot is truly running by removing the binding, checking it with bundle:list | grep Mi that it is gone and load the latest snapshot binding once more.

I removed the jar file & confirmed no MIIO Binding is loaded then added the latest jar file again and confirmed it loaded.

This is the Binding Version:
2.5.0.201902020559 | Xiaomi Mi IO Binding

hhmm. than it is bit of mystery to me why it is not getting the device as supported than…
Anyway… it works now for you

hi marcel, I’ve noticed what might be a bug with the things file, that’s changed behaviour since deviceID was added to it.

If my things file includes ‘@ “location”’ (see below) it’s not active after a reboot (with no error in the log). Oddly it does work OK if the location is added to the file when the binding is already working.

Thing miio:vacuum:0xxxxxx7	"Xiaomi Robot Vacuum" @ "Back Room" [ host="192.168.1.xxx", token="7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx2", deviceId="0xxxxxx7"]

Can you send me a log with and without to see what it’s happening.
The binding is not aware of the location as far as I know, so something else must be happening that is causing this behaviour

Hi there,
Where can i define the robot in this szenario?
actionCommand.sendCommand(…) how does it know to send the command to the robot?

I am really missing a great part and cant find documentation anywhere.
Trying this for over 3 Weeks now.

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