Xiaomi Robot Vacuum Binding

Install “Xiaomi Mi IO Binding” (miio binding)

https://next-openhab-org.translate.goog/addons/bindings/miio/?_x_tr_sl=en&_x_tr_tl=ru&_x_tr_hl=nl&_x_tr_pto=nui#xiaomi-mi-io-binding

I installed “Xiaomi Mi IO Binding" last time. And i use your code items from this old post Xiaomi Robot Vacuum Binding - #2 by marcel_verpaalen
But I think now somewhere there is the latest code. Question is where? :grinning:
And why not working cleaning map?

About google. Sorry it is to hard for me google on english language.

Thank you @ Marcel! My Mijia Vacuum Robot (viomi.vacuum.v7) has worked. I can get all of its parameters (and set some others), as also control it to Start, Stop and Pause.
But I still don’t know how to get it to go home (dock). Vacuumaction only has 3 values: 1=Start, 0=Stop, 2=Pause, is there any value to get it to go to the dock? :slight_smile:

For users having problems logging on, you must use the Mi Home app, not the Roborock app when setting up your login credentials!!

Only took me about 4 hours to find this out…

1 Like

@downloadme4free can you try to send via the command channel set_charge [1] to see if that is the command for sending the vacuum to the dock. If so I can adjust the vacuum actions to incorporate the docking as well

I created a Number channel like this:

Number Vacuum_Dock "Docking" <house> (gVacuum) { channel="miio:basic:Culi:set_charge" }

send command ‘1’ and received this error in the log:

2021-12-06 10:41:29.898 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Vacuum_Dock' received command 1
2021-12-06 10:41:29.901 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Vacuum_Dock' predicted to become NULL

The vacuum robot was not reacted. Am I making it right?
And 1 more question: Is mop_type parameter indicates mopping by S or Y pattern? Because my robot’s mop_type parameter is always returned ‘0’, no matter if I set Mop Type to S or Y pattern in Mi Home app

You need to send the command to the command channel which is a string.
Best ot look at the log with debug enabled. See the binding readme (or exaples in this long thread) on how to send to the command channel & enable debug logging.
This could also give some more insights in the ‘real’ mop_type responses.

1 Like

Great! I confirm that sending set_charge [1] to actions#commands channel will send the robot to the dock! :slight_smile:

2021-12-07 22:06:22.179 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Vacuum_Command' received command set_charge [1]
2021-12-07 22:06:22.196 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Vacuum_Command' predicted to become set_charge [1]
2021-12-07 22:06:22.210 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Vacuum_Command' changed from NULL to set_charge [1]
2021-12-07 22:06:22.506 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Vacuum_Command' changed from set_charge [1] to {"result":["ok"],"id":3511}
2021-12-07 22:06:25.252 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Vacuum_State' changed from 1 to 4

==> /var/log/openhab/openhab.log <==
2021-12-07 22:06:25.252 [WARN ] [rm.AbstractFileTransformationService] - Could not transform '2104' with the file 'vacuum_error.map' : Target value not found in map for '2104'

Some error codes still missing. 2104 is Returning to the dock (I guess), and 2110 which I don’t know what is it

You can give this file a try (see readme on how to add local json file, after putting in the right folder, edit the thing and change something or restart the binding)
It has the menu with docking and vacuuming etc included. Also I included many of the known mappings

note. I added Mop Route channel which I think is the S/Y pattern

viomi.vacuum.v8.json (11.0 KB)

1 Like

What a shame! :smiley: I have read many posts here and binding’s readme but still don’t know how to add local JSON file.
I tried to copy viomi.vacuum.v8.json to /etc/openhab/misc/ and /srv/openhab-conf/misc folders, override model in .things file (changing from model=“viomi.vacuum.v7” to model=“viomi.vacuum.v8”), restart server but still no luck, everything stay the same as before.
I’m using openHAB 3.1 on Pi4

PS: OK I will try digging deeper tonight

Seeing your folders I expect it will be /etc/openhab/misc/miio/ or /srv/openhab-conf/misc/miio the miio part you’ll need to create yourself.
You may need to start oh or restart the binding the first time you create this folder.
note model v7 or v8 have no difference in the database, so no need to change it.

1 Like

Well, I copied viomi.vacuum.v8.json into /etc/openhab/misc/miio folder, and received this log:

2021-12-11 10:54:03.669 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Using device database: /etc/openhab/misc/miio/viomi.vacuum.v8.json for device viomi.vacuum.v7

So I think now the JSON file is put into the right folder, as your instructions
Then I try to send 3 command to miio:basic:Culi:vacuumaction channel, vacuum robot was not reacted, and the log was:

11:18:34.833 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Locating action for miio:basic:Culi channel 'vacuumaction': '3'
11:18:34.842 [TRACE] [.miio.internal.basic.ActionConditions] - Matching '1' with '3': false
11:18:34.849 [TRACE] [.miio.internal.basic.ActionConditions] - Matching '2' with '3': false
11:18:34.857 [TRACE] [.miio.internal.basic.ActionConditions] - Matching '3' with '3': true
11:18:34.862 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Sending command set_mode_withroom[0,3,0]
11:18:34.867 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":167,"method":"set_mode_withroom","params":[0,3,0]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 1).
11:18:34.872 [TRACE] [.miio.internal.basic.ActionConditions] - Matching '4' with '3': false
11:18:34.876 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Conditional command set_charge[] not send, condition 'matchValue' not met
11:18:34.946 [TRACE] [rnal.transport.MiIoAsyncCommunication] - Connection 192.168.0.210:55921
11:18:35.028 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Periodic update for 'miio:basic:Culi' (miio:basic)
11:18:35.037 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":168,"method":"get_prop","params":["run_state","mode","err_state","battary_life","box_type"]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 1).
11:18:35.042 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Skip refresh of channel mop_route for miio:basic:Culi as it is not linked
11:18:35.047 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Skip refresh of channel remember_map for miio:basic:Culi as it is not linked
11:18:35.051 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Skip refresh of channel has_map for miio:basic:Culi as it is not linked
11:18:35.055 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Skip refresh of channel is_mop for miio:basic:Culi as it is not linked
11:18:35.060 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Skip refresh of channel has_newmap for miio:basic:Culi as it is not linked
11:18:35.064 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":169,"method":"get_prop","params":["s_time","s_area","suction_grade","water_grade"]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 2).
11:18:35.095 [TRACE] [rnal.transport.MiIoAsyncCommunication] - Message Details:Message:
Header  : 21 31 00 40 00 00 00 00 10 91 AC D0 61 B4 26 9A
checksum: DC A3 F4 27 57 80 3D 18 23 AD 69 31 7A 5F 26 6C
content : FC 1E CE EC A9 78 CB 4B 78 37 16 23 F6 3E AF 3E F4 3D E0 9D 6A 8F D3 6F 4A C3 6A 13 FB CD B5 07
Header Details: Magic:21 31
Length:   64
Serial:   10 91 AC D0
TS:2021-12-11 11:18:34
11:18:35.102 [TRACE] [rnal.transport.MiIoAsyncCommunication] - Received response from 192.168.0.210: {"result":["ok"],"id":167}
11:18:35.108 [TRACE] [rnal.transport.MiIoAsyncCommunication] - Received  JSON message {"result":["ok"],"id":167}
11:18:35.113 [TRACE] [rnal.transport.MiIoAsyncCommunication] - inform listener org.openhab.binding.miio.internal.handler.MiIoBasicHandler@1faefd7, data org.openhab.binding.miio.internal.MiIoSendCommand@1610833 from org.openhab.binding.miio.internal.MiIoSendCommand@1610833
11:18:35.118 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: UNKNOWN, result: ["ok"], fullresponse: {"result":["ok"],"id":167}
11:18:35.124 [TRACE] [rnal.transport.MiIoAsyncCommunication] - Connection 192.168.0.210:55921
11:18:35.232 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'CameraRecordingGif' changed from 5 to 0
11:18:35.275 [TRACE] [rnal.transport.MiIoAsyncCommunication] - Message Details:Message:
Header  : 21 31 00 50 00 00 00 00 10 91 AC D0 61 B4 26 9A
checksum: 12 66 D6 5C 65 B2 7D 18 0A A4 4F AE 7C A4 C0 70
content : FA BF 85 35 DD CF 86 37 A9 34 45 E5 8D A2 2D 47 15 D4 B8 14 CB 5F 40 7A C0 EC 80 95 21 6C 35 16 11 C7 86 4C 10 E4 72 7A D3 44 7D A7 38 0D 5D FA
Header Details: Magic:21 31
Length:   80
Serial:   10 91 AC D0
TS:2021-12-11 11:18:34
11:18:35.281 [TRACE] [rnal.transport.MiIoAsyncCommunication] - Received response from 192.168.0.210: {"result":[2,0,0,92,3],"id":168}
11:18:35.285 [TRACE] [rnal.transport.MiIoAsyncCommunication] - Received  JSON message {"result":[2,0,0,92,3],"id":168}
11:18:35.290 [TRACE] [rnal.transport.MiIoAsyncCommunication] - inform listener org.openhab.binding.miio.internal.handler.MiIoBasicHandler@1faefd7, data org.openhab.binding.miio.internal.MiIoSendCommand@4b9a8f from org.openhab.binding.miio.internal.MiIoSendCommand@4b9a8f
11:18:35.297 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: GET_PROPERTY, result: [2,0,0,92,3], fullresponse: {"result":[2,0,0,92,3],"id":168}
11:18:35.311 [TRACE] [rnal.transport.MiIoAsyncCommunication] - Connection 192.168.0.210:55921
11:18:35.461 [TRACE] [rnal.transport.MiIoAsyncCommunication] - Message Details:Message:
Header  : 21 31 00 40 00 00 00 00 10 91 AC D0 61 B4 26 9A
checksum: 3A D5 5A CA BB B6 BE 2B 9F 8E 15 14 0D 94 81 14
content : 92 E4 70 2A 48 22 21 38 0B 91 73 CD 81 F8 82 8B 21 28 42 08 06 93 02 05 FE 7B 99 27 97 6F 18 29
Header Details: Magic:21 31
Length:   64
Serial:   10 91 AC D0
TS:2021-12-11 11:18:34
11:18:35.476 [TRACE] [rnal.transport.MiIoAsyncCommunication] - Received response from 192.168.0.210: {"result":[0,0,0,12],"id":169}
11:18:35.483 [TRACE] [rnal.transport.MiIoAsyncCommunication] - Received  JSON message {"result":[0,0,0,12],"id":169}
11:18:35.491 [TRACE] [rnal.transport.MiIoAsyncCommunication] - inform listener org.openhab.binding.miio.internal.handler.MiIoBasicHandler@1faefd7, data org.openhab.binding.miio.internal.MiIoSendCommand@9ccf54 from org.openhab.binding.miio.internal.MiIoSendCommand@9ccf54
11:18:35.504 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: GET_PROPERTY, result: [0,0,0,12], fullresponse: {"result":[0,0,0,12],"id":169}
11:18:37.880 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Periodic update for 'miio:basic:Culi' (miio:basic)
11:18:37.890 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":170,"method":"get_prop","params":["run_state","mode","err_state","battary_life","box_type"]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 1).
11:18:37.895 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Skip refresh of channel mop_route for miio:basic:Culi as it is not linked
11:18:37.905 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Skip refresh of channel remember_map for miio:basic:Culi as it is not linked
11:18:37.910 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Skip refresh of channel has_map for miio:basic:Culi as it is not linked
11:18:37.914 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Skip refresh of channel is_mop for miio:basic:Culi as it is not linked
11:18:37.921 [TRACE] [rnal.transport.MiIoAsyncCommunication] - Connection 192.168.0.210:55921
11:18:37.921 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Skip refresh of channel has_newmap for miio:basic:Culi as it is not linked
11:18:37.932 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":171,"method":"get_prop","params":["s_time","s_area","suction_grade","water_grade"]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 1).
11:18:38.042 [TRACE] [rnal.transport.MiIoAsyncCommunication] - Message Details:Message:
Header  : 21 31 00 50 00 00 00 00 10 91 AC D0 61 B4 26 9C
checksum: 54 AA FC 58 11 57 E3 2B 41 93 7D E9 B3 7D 50 C7
content : FA BF 85 35 DD CF 86 37 A9 34 45 E5 8D A2 2D 47 9E 42 C1 84 63 A1 BB 3A 40 00 17 1F 9C 90 3A AB 9F C2 0B FC B8 3D AF C3 F6 34 03 0A 25 EF 6D 96
Header Details: Magic:21 31
Length:   80
Serial:   10 91 AC D0
TS:2021-12-11 11:18:36
11:18:38.050 [TRACE] [rnal.transport.MiIoAsyncCommunication] - Received response from 192.168.0.210: {"result":[2,0,0,92,3],"id":170}
11:18:38.053 [TRACE] [rnal.transport.MiIoAsyncCommunication] - Received  JSON message {"result":[2,0,0,92,3],"id":170}
11:18:38.057 [TRACE] [rnal.transport.MiIoAsyncCommunication] - inform listener org.openhab.binding.miio.internal.handler.MiIoBasicHandler@1faefd7, data org.openhab.binding.miio.internal.MiIoSendCommand@18fa80c from org.openhab.binding.miio.internal.MiIoSendCommand@18fa80c
11:18:38.061 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: GET_PROPERTY, result: [2,0,0,92,3], fullresponse: {"result":[2,0,0,92,3],"id":170}
11:18:38.071 [TRACE] [rnal.transport.MiIoAsyncCommunication] - Connection 192.168.0.210:55921
11:18:38.210 [TRACE] [rnal.transport.MiIoAsyncCommunication] - Message Details:Message:
Header  : 21 31 00 40 00 00 00 00 10 91 AC D0 61 B4 26 9D
checksum: 96 4B 05 C1 AA CA F6 63 57 7F 52 F5 C6 38 9E 01
content : 92 E4 70 2A 48 22 21 38 0B 91 73 CD 81 F8 82 8B 82 EC 31 24 FA 72 4D A2 DC 92 25 AF 6E 0C 95 0C
Header Details: Magic:21 31
Length:   64
Serial:   10 91 AC D0
TS:2021-12-11 11:18:37
11:18:38.216 [TRACE] [rnal.transport.MiIoAsyncCommunication] - Received response from 192.168.0.210: {"result":[0,0,0,12],"id":171}
11:18:38.219 [TRACE] [rnal.transport.MiIoAsyncCommunication] - Received  JSON message {"result":[0,0,0,12],"id":171}
11:18:38.223 [TRACE] [rnal.transport.MiIoAsyncCommunication] - inform listener org.openhab.binding.miio.internal.handler.MiIoBasicHandler@1faefd7, data org.openhab.binding.miio.internal.MiIoSendCommand@494c39 from org.openhab.binding.miio.internal.MiIoSendCommand@494c39
11:18:38.229 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: GET_PROPERTY, result: [0,0,0,12], fullresponse: {"result":[0,0,0,12],"id":171}

If I send set_charge [1] to miio:basic:Culi:actions#commands channel robot is go to the Dock normally
Please help!

Sorry I see my mistake…
I have it in the drop-down with 3 for docking, but in the conditions I send the return to dock command when the value is 4

You can either edit the json file change the matchvalue part from 4 to 3, or send 4 to test it.

1 Like

I edited line 66 in viomi.vacuum.v8.json, from “matchValue”: “4”, to “matchValue”: “3”, then retried, still no luck. But I think that I know why when I take a look at the log:

2021-12-11 15:53:01.604 [DEBUG] [io.internal.handler.MiIoBasicHandler] - Sending command set_charge["1"]
2021-12-11 15:53:01.608 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":86,"method":"set_charge","params":["1"]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 1).
2021-12-11 15:53:16.769 [TRACE] [nal.transport.MiIoAsyncCommunication] - No response from device 1091ACD0 at 192.168.0.210 for command {"id":86,"method":"set_charge","params":["1"]}.
2021-12-11 15:53:28.548 [DEBUG] [nal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":92,"method":"set_charge","params":[1]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 1).
2021-12-11 15:53:43.611 [TRACE] [nal.transport.MiIoAsyncCommunication] - No response from device 1091ACD0 at 192.168.0.210 for command {"id":92,"method":"set_charge","params":[1]}.

Maybe 2 unwanted double quotes around 1 cause the problem? I think you can tell me to fix it easily :slight_smile:

From your earlier test I thought it expected a number without the quotes.
But seems the device did not responded to both.
Maybe short disruption, or device being overwhelmed.

I don’t really know can only recommend to test once more and see which one works. Can it be that the vacuum first needs to be vacuuming before you send the command?

Note would switch to debug logging instead of trace as it will make it much more readable

1 Like

Yes, the robot has to vacuum or move away from the dock before it can return to the dock.
In the log above, the first command id=86 is done by sending 1 to channel “miio:basic:Culi:vacuumaction”. Robot does not react with this.
The second command id=92 is done by sending string set_charge [1] to the channel “miio:basic:Culi:actions#commands”, as you told me last time. It was successful and robot started going to the dock.
I noticed a difference between 2 commands is the first (unsuccess) command has a couple of double quotes “1” around the value, but the second command does not have. I wonder if it is the problem?

viomi.vacuum.v8.json (11.0 KB)
Here’s the version which should fix the 3/4 mistake and should be sending the command without the quotes

1 Like

Well done! It works! :slight_smile:
This is the log in sequence of 3 commands: Start, Stop and Dock:

10:40:38.380 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Locating action for miio:basic:Culi channel 'vacuumaction': '1'
10:40:38.388 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Sending command set_mode_withroom[0,1,0]
10:40:38.398 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":126,"method":"set_mode_withroom","params":[0,1,0]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 1).
10:40:38.404 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Conditional command set_charge[] not send, condition 'matchValue' not met
10:40:40.552 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: UNKNOWN, result: ["ok"], fullresponse: {"result":["ok"],"id":126}
10:40:41.408 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Periodic update for 'miio:basic:Culi' (miio:basic)
10:40:41.413 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":127,"method":"get_prop","params":["run_state","mode","err_state","battary_life","box_type"]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 1).
10:40:41.419 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":128,"method":"get_prop","params":["mop_route","s_time","s_area","suction_grade","water_grade"]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 2).
10:40:41.429 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":129,"method":"get_prop","params":["remember_map","has_map","is_mop","has_newmap"]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 3).
10:40:41.655 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: GET_PROPERTY, result: [3,0,2110,100,3], fullresponse: {"result":[3,0,2110,100,3],"id":127}
10:40:41.712 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: GET_PROPERTY, result: [0,0,0,0,12], fullresponse: {"result":[0,0,0,0,12],"id":128}
10:40:41.762 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: GET_PROPERTY, result: [1,1,0,0], fullresponse: {"result":[1,1,0,0],"id":129}
10:40:45.267 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Locating action for miio:basic:Culi channel 'vacuumaction': '0'
10:40:45.286 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Sending command set_mode_withroom[0,0,0]
10:40:45.290 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":130,"method":"set_mode_withroom","params":[0,0,0]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 1).
10:40:45.296 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Conditional command set_charge[] not send, condition 'matchValue' not met
10:40:48.302 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Periodic update for 'miio:basic:Culi' (miio:basic)
10:40:48.309 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":131,"method":"get_prop","params":["run_state","mode","err_state","battary_life","box_type"]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 1).
10:40:48.315 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":132,"method":"get_prop","params":["mop_route","s_time","s_area","suction_grade","water_grade"]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 2).
10:40:48.321 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":133,"method":"get_prop","params":["remember_map","has_map","is_mop","has_newmap"]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 3).
10:40:49.097 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: UNKNOWN, result: ["ok"], fullresponse: {"result":["ok"],"id":130}
10:40:49.143 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: GET_PROPERTY, result: [1,0,0,100,3], fullresponse: {"result":[1,0,0,100,3],"id":131}
10:40:49.209 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: GET_PROPERTY, result: [0,0,0,0,12], fullresponse: {"result":[0,0,0,0,12],"id":132}
10:40:49.260 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: GET_PROPERTY, result: [1,1,0,0], fullresponse: {"result":[1,1,0,0],"id":133}
10:40:52.141 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Periodic update for 'miio:basic:Culi' (miio:basic)
10:40:52.135 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Locating action for miio:basic:Culi channel 'vacuumaction': '3'
10:40:52.152 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":134,"method":"get_prop","params":["run_state","mode","err_state","battary_life","box_type"]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 1).
10:40:52.155 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Conditional command set_mode_withroom[0,"$value$",0] not send, condition 'matchValue' not met
10:40:52.159 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":135,"method":"get_prop","params":["mop_route","s_time","s_area","suction_grade","water_grade"]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 2).
10:40:52.165 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Sending command set_charge[1]
10:40:52.170 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":136,"method":"get_prop","params":["remember_map","has_map","is_mop","has_newmap"]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 3).
10:40:52.178 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":137,"method":"miIO.info","params":[]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 3).
10:40:52.183 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":138,"method":"set_charge","params":[1]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 4).
10:40:52.224 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: GET_PROPERTY, result: [1,0,0,100,3], fullresponse: {"result":[1,0,0,100,3],"id":134}
10:40:52.291 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: GET_PROPERTY, result: [0,0,0,0,12], fullresponse: {"result":[0,0,0,0,12],"id":135}
10:40:52.346 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: GET_PROPERTY, result: [1,1,0,0], fullresponse: {"result":[1,1,0,0],"id":136}
10:40:52.379 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: MIIO_INFO, result: {"hw_ver":"Linux","fw_ver":"3.5.3_0047","ap":{"ssid":"Kit Kat","bssid":"04:d4:c4:5f:e7:98"},"netif":{"localIp":"192.168.0.210","mask":"255.255.255.0","gw":"192.168.0.1"},"model":"viomi.vacuum.v7","mac":"50:EC:50:EF:4F:27","token":"4e634d5175695036415a49535233637a","life":919}, fullresponse: {"partner_id":"","id":137,"code":0,"message":"ok","result":{"hw_ver":"Linux","fw_ver":"3.5.3_0047","ap":{"ssid":"Kit Kat","bssid":"04:d4:c4:5f:e7:98"},"netif":{"localIp":"192.168.0.210","mask":"255.255.255.0","gw":"192.168.0.1"},"model":"viomi.vacuum.v7","mac":"50:EC:50:EF:4F:27","token":"4e634d5175695036415a49535233637a","life":919}}
10:40:52.387 [DEBUG] [.internal.handler.MiIoAbstractHandler] - No RSSI info in response
10:40:54.566 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: UNKNOWN, result: ["ok"], fullresponse: {"result":["ok"],"id":138}
10:40:55.189 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Periodic update for 'miio:basic:Culi' (miio:basic)
10:40:55.194 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":139,"method":"get_prop","params":["run_state","mode","err_state","battary_life","box_type"]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 1).
10:40:55.199 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":140,"method":"get_prop","params":["mop_route","s_time","s_area","suction_grade","water_grade"]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 2).
10:40:55.206 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":141,"method":"get_prop","params":["remember_map","has_map","is_mop","has_newmap"]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 3).
10:41:10.288 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Communication error for Mi device at 192.168.0.210: Receive timed out
10:41:10.293 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - No response from device 1091ACD0 at 192.168.0.210 for command {"id":139,"method":"get_prop","params":["run_state","mode","err_state","battary_life","box_type"]}.
10:41:10.301 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Received message is without id: {"error":"No Response"}
10:41:10.312 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: GET_PROPERTY, result: null, fullresponse: {"error":"Received message is without id"}
10:41:10.317 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Error received: "Received message is without id"
10:41:10.483 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: GET_PROPERTY, result: [0,0,0,0,12], fullresponse: {"result":[0,0,0,0,12],"id":140}
10:41:10.631 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: GET_PROPERTY, result: [1,1,0,0], fullresponse: {"result":[1,1,0,0],"id":141}
10:41:22.183 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Periodic update for 'miio:basic:Culi' (miio:basic)
10:41:22.188 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":142,"method":"get_prop","params":["run_state","mode","err_state","battary_life","box_type"]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 1).
10:41:22.200 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":143,"method":"get_prop","params":["mop_route","s_time","s_area","suction_grade","water_grade"]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 2).
10:41:22.212 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":144,"method":"get_prop","params":["remember_map","has_map","is_mop","has_newmap"]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 3).
10:41:22.404 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: GET_PROPERTY, result: [4,0,2104,99,3], fullresponse: {"result":[4,0,2104,99,3],"id":142}
10:41:22.506 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: GET_PROPERTY, result: [0,0,0,0,12], fullresponse: {"result":[0,0,0,0,12],"id":143}
10:41:22.618 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: GET_PROPERTY, result: [1,1,0,0], fullresponse: {"result":[1,1,0,0],"id":144}
10:41:52.222 [DEBUG] [iio.internal.handler.MiIoBasicHandler] - Periodic update for 'miio:basic:Culi' (miio:basic)
10:41:52.231 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":145,"method":"get_prop","params":["run_state","mode","err_state","battary_life","box_type"]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 1).
10:41:52.242 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":146,"method":"get_prop","params":["mop_route","s_time","s_area","suction_grade","water_grade"]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 2).
10:41:52.247 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":147,"method":"get_prop","params":["remember_map","has_map","is_mop","has_newmap"]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 3).
10:41:52.252 [DEBUG] [rnal.transport.MiIoAsyncCommunication] - Command added to Queue {"id":148,"method":"miIO.info","params":[]} -> 192.168.0.210 (Device: 1091ACD0 token: 4E634D51XXXXXXXXXXXXXXXX5233637A Queue: 4).
10:41:52.314 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: GET_PROPERTY, result: [5,0,2103,99,3], fullresponse: {"result":[5,0,2103,99,3],"id":145}
10:41:52.365 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: GET_PROPERTY, result: [0,0,0,0,12], fullresponse: {"result":[0,0,0,0,12],"id":146}
10:41:52.410 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: GET_PROPERTY, result: [1,1,0,0], fullresponse: {"result":[1,1,0,0],"id":147}
10:41:52.428 [DEBUG] [.internal.handler.MiIoAbstractHandler] - Received response for Culi type: MIIO_INFO, result: {"hw_ver":"Linux","fw_ver":"3.5.3_0047","ap":{"ssid":"Kit Kat","bssid":"04:d4:c4:5f:e7:98"},"netif":{"localIp":"192.168.0.210","mask":"255.255.255.0","gw":"192.168.0.1"},"model":"viomi.vacuum.v7","mac":"50:EC:50:EF:4F:27","token":"4e634d5175695036415a49535233637a","life":979}, fullresponse: {"partner_id":"","id":148,"code":0,"message":"ok","result":{"hw_ver":"Linux","fw_ver":"3.5.3_0047","ap":{"ssid":"Kit Kat","bssid":"04:d4:c4:5f:e7:98"},"netif":{"localIp":"192.168.0.210","mask":"255.255.255.0","gw":"192.168.0.1"},"model":"viomi.vacuum.v7","mac":"50:EC:50:EF:4F:27","token":"4e634d5175695036415a49535233637a","life":979}}
10:41:52.435 [DEBUG] [.internal.handler.MiIoAbstractHandler] - No RSSI info in response

Mop Route is also working :slight_smile: , with 0 = S Pattern, 1 = Y Pattern (with my robot, in Mi Home there’s no C-Curved as given in your JSON file).

By the way, I need more help with:

  • I’m using network ping to detect whether the robot is online or offline. Is there a smarter way to do this?
  • Is it possible to list the maps stored in the Mi Home app, and then set the current map? Because I have 2 rooms with some “restricted areas” that I don’t want robot to go in.
    Thank you!
1 Like

Dear all,
I have a question conerning support for Mi Universal Remote (chuangmi.ir.v2).
I use it for some christmas lamps. Last year (still OH 2.4) I could use the device with this binding with genuine channel MiUniversalRemote_Actions_ExecuteCommand.
Now, the device gets discovered offering the following (test) channels as switch

  • Power On/Off
  • (experimental)Execute test to find supported channels
  • (experimental) Create experimental support for new MIOT protocol devices

I tried the last channel to send my payload as usual

MiUniversalRemote_Actions_ExecuteCommand.sendCommand(" miIO.ir_play {\"freq\": 38400, \"code\": \"Z6XQA4gBAAC6AwAAYQcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEAAREAABAQESEA==\"} ")

with no success. Is there a way to make the device useful again for OH users?

Thank your very much for your support!

Suggest to check the Xiaomi Mi Infrared Remote Control topic.

I actually prepared a regular json file for the device recently, but did not test it. I’ll try to upload it tonight for testing. In the mean time, would be good to see the debug log when you send the command to better understand what the device is responding. (as the mihome plugin uses very diferent commands involving the cloud). Please post in the remote topic.

Note you can connect the execute actions channel just the same in the 3.x versions. As before this channel is marked advanced, hence only visible when you check the ‘show advanced’ box

2 Likes