Xiaomi Robot Vacuum S20+ (xiaomi.vacuum.b108gl)

The documentation for the Xiaomi Wifi devices (Mi IO) binding asks

share the logfile and json files on the openHAB forum or the openHAB GitHub to build future support for this model.

I have an S20+ vacuum, and using the Create support for new devices based on online published spec database method seem to be able to control basic functionality. I haven’t tested most of the options, but below is the json file that the binding generated for this device. I hope it is useful for someone, and I’m happy to test and fiddle if anyone would like more information!

{
	"deviceMapping": {
		"id": [
			"xiaomi.vacuum.b108gl"
		],
		"propertyMethod": "get_properties",
		"maxProperties": 1,
		"channels": [
			{
				"property": "",
				"friendlyName": "Actions",
				"channel": "actions",
				"type": "String",
				"stateDescription": {
					"options": [
						{
							"value": "vacuum-start-sweep",
							"label": "Vacuum Start Sweep"
						},
						{
							"value": "vacuum-stop-sweeping",
							"label": "Vacuum Stop Sweeping"
						},
						{
							"value": "vacuum-start-only-sweep",
							"label": "Vacuum Start Only Sweep"
						},
						{
							"value": "vacuum-start-mop",
							"label": "Vacuum Start Mop"
						},
						{
							"value": "vacuum-start-sweep-mop",
							"label": "Vacuum Start Sweep Mop"
						},
						{
							"value": "vacuum-pause-sweeping",
							"label": "Vacuum Pause Sweeping"
						},
						{
							"value": "vacuum-get-zone-configs",
							"label": "Vacuum Get Zone Configs"
						},
						{
							"value": "vacuum-get-room-configs",
							"label": "Vacuum Get Room Configs"
						},
						{
							"value": "vacuum-set-zone",
							"label": "Vacuum Set Zone"
						},
						{
							"value": "vacuum-set-room-clean-configs",
							"label": "Vacuum Set Room Clean Configs"
						},
						{
							"value": "vacuum-split-room",
							"label": "Vacuum Split Room"
						},
						{
							"value": "vacuum-merge-rooms",
							"label": "Vacuum Merge Rooms"
						},
						{
							"value": "vacuum-start-vacuum-room-sweep",
							"label": "Vacuum Start Vacuum Room Sweep"
						},
						{
							"value": "vacuum-start-build-map",
							"label": "Vacuum Start Build Map"
						},
						{
							"value": "battery-start-charge",
							"label": "Battery Start Charge"
						},
						{
							"value": "brush-cleaner-reset-brush-life",
							"label": "Brush Cleaner Reset Brush Life"
						},
						{
							"value": "brush-cleaner-reset-brush-life",
							"label": "Brush Cleaner Reset Brush Life"
						},
						{
							"value": "filter-reset-filter-life",
							"label": "Filter Reset Filter Life"
						},
						{
							"value": "brush-cleaner-reset-brush-life",
							"label": "Brush Cleaner Reset Brush Life"
						},
						{
							"value": "vacuum-extend-continue-sweep",
							"label": "Vacuum Extend Continue Sweep"
						},
						{
							"value": "vacuum-extend-remote-control",
							"label": "Vacuum Extend Remote Control"
						},
						{
							"value": "vacuum-extend-add-order-clean",
							"label": "Vacuum Extend Add Order Clean"
						},
						{
							"value": "vacuum-extend-edit-order-clean",
							"label": "Vacuum Extend Edit Order Clean"
						},
						{
							"value": "vacuum-extend-delete-order-clean",
							"label": "Vacuum Extend Delete Order Clean"
						},
						{
							"value": "vacuum-extend-find-vacuum",
							"label": "Vacuum Extend Find Vacuum"
						},
						{
							"value": "vacuum-extend-start-custom-sweep",
							"label": "Vacuum Extend Start Custom Sweep"
						},
						{
							"value": "vacuum-extend-try-listen",
							"label": "Vacuum Extend Try Listen"
						},
						{
							"value": "vacuum-extend-start-remote-up",
							"label": "Vacuum Extend Start Remote Up"
						},
						{
							"value": "vacuum-extend-start-remote-left",
							"label": "Vacuum Extend Start Remote Left"
						},
						{
							"value": "vacuum-extend-start-remote-right",
							"label": "Vacuum Extend Start Remote Right"
						},
						{
							"value": "vacuum-extend-start-remote-down",
							"label": "Vacuum Extend Start Remote Down"
						},
						{
							"value": "vacuum-extend-stop-remote",
							"label": "Vacuum Extend Stop Remote"
						},
						{
							"value": "vacuum-extend-exit-remote",
							"label": "Vacuum Extend Exit Remote"
						},
						{
							"value": "vacuum-extend-stop-and-gocharge",
							"label": "Vacuum Extend Stop And Gocharge"
						},
						{
							"value": "vacuum-extend-get-system-info",
							"label": "Vacuum Extend Get System Info"
						},
						{
							"value": "vacuum-extend-upload-log",
							"label": "Vacuum Extend Upload Log"
						},
						{
							"value": "vacuum-map-clean-permanent-map",
							"label": "Vacuum Map Clean Permanent Map"
						},
						{
							"value": "vacuum-map-delete-permanent-map",
							"label": "Vacuum Map Delete Permanent Map"
						},
						{
							"value": "vacuum-map-set-permanent-map",
							"label": "Vacuum Map Set Permanent Map"
						},
						{
							"value": "vacuum-map-save-permanent-map",
							"label": "Vacuum Map Save Permanent Map"
						},
						{
							"value": "vacuum-map-auto-room-partition",
							"label": "Vacuum Map Auto Room Partition"
						},
						{
							"value": "vacuum-map-set-map-name",
							"label": "Vacuum Map Set Map Name"
						},
						{
							"value": "vacuum-map-clean-history",
							"label": "Vacuum Map Clean History"
						},
						{
							"value": "vacuum-map-set-map-control",
							"label": "Vacuum Map Set Map Control"
						},
						{
							"value": "vacuum-map-get-one-history-map",
							"label": "Vacuum Map Get One History Map"
						},
						{
							"value": "language-download-voice",
							"label": "Language Download Voice"
						},
						{
							"value": "language-get-download-status",
							"label": "Language Get Download Status"
						}
					]
				},
				"refresh": false,
				"actions": [
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 2,
						"aiid": 1,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-start-sweep"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 2,
						"aiid": 2,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-stop-sweeping"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 2,
						"aiid": 3,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-start-only-sweep"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 2,
						"aiid": 4,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-start-mop"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 2,
						"aiid": 5,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-start-sweep-mop"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 2,
						"aiid": 6,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-pause-sweeping"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "UNKNOWN",
						"parameters": [
							13.0
						],
						"siid": 2,
						"aiid": 7,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-get-zone-configs"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "UNKNOWN",
						"parameters": [
							13.0
						],
						"siid": 2,
						"aiid": 8,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-get-room-configs"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "UNKNOWN",
						"parameters": [
							10.0
						],
						"siid": 2,
						"aiid": 9,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-set-zone"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "UNKNOWN",
						"parameters": [
							14.0
						],
						"siid": 2,
						"aiid": 10,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-set-room-clean-configs"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "UNKNOWN",
						"parameters": [
							15.0
						],
						"siid": 2,
						"aiid": 11,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-split-room"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "UNKNOWN",
						"parameters": [
							15.0
						],
						"siid": 2,
						"aiid": 12,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-merge-rooms"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "UNKNOWN",
						"parameters": [
							13.0
						],
						"siid": 2,
						"aiid": 13,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-start-vacuum-room-sweep"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 2,
						"aiid": 14,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-start-build-map"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 3,
						"aiid": 1,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "battery-start-charge"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 8,
						"aiid": 1,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "brush-cleaner-reset-brush-life"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 9,
						"aiid": 1,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "brush-cleaner-reset-brush-life"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 10,
						"aiid": 1,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "filter-reset-filter-life"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 11,
						"aiid": 1,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "brush-cleaner-reset-brush-life"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 6,
						"aiid": 1,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-extend-continue-sweep"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 6,
						"aiid": 2,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-extend-remote-control"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "UNKNOWN",
						"parameters": [
							12.0
						],
						"siid": 6,
						"aiid": 3,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-extend-add-order-clean"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "UNKNOWN",
						"parameters": [
							12.0
						],
						"siid": 6,
						"aiid": 4,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-extend-edit-order-clean"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "UNKNOWN",
						"parameters": [
							12.0
						],
						"siid": 6,
						"aiid": 5,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-extend-delete-order-clean"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 6,
						"aiid": 6,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-extend-find-vacuum"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 6,
						"aiid": 7,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-extend-start-custom-sweep"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 6,
						"aiid": 8,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-extend-try-listen"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 6,
						"aiid": 9,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-extend-start-remote-up"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 6,
						"aiid": 10,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-extend-start-remote-left"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 6,
						"aiid": 11,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-extend-start-remote-right"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 6,
						"aiid": 12,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-extend-start-remote-down"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 6,
						"aiid": 13,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-extend-stop-remote"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 6,
						"aiid": 14,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-extend-exit-remote"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 6,
						"aiid": 15,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-extend-stop-and-gocharge"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 6,
						"aiid": 16,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-extend-get-system-info"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 6,
						"aiid": 17,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-extend-upload-log"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 7,
						"aiid": 1,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-map-clean-permanent-map"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "UNKNOWN",
						"parameters": [
							6.0
						],
						"siid": 7,
						"aiid": 2,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-map-delete-permanent-map"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "UNKNOWN",
						"parameters": [
							6.0
						],
						"siid": 7,
						"aiid": 3,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-map-set-permanent-map"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 7,
						"aiid": 4,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-map-save-permanent-map"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 7,
						"aiid": 5,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-map-auto-room-partition"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "UNKNOWN",
						"parameters": [
							7.0
						],
						"siid": 7,
						"aiid": 6,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-map-set-map-name"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 7,
						"aiid": 7,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-map-clean-history"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "UNKNOWN",
						"parameters": [
							7.0
						],
						"siid": 7,
						"aiid": 8,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-map-set-map-control"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "UNKNOWN",
						"parameters": [
							7.0
						],
						"siid": 7,
						"aiid": 9,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "vacuum-map-get-one-history-map"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "UNKNOWN",
						"parameters": [
							1,
							5,
							6.0
						],
						"siid": 14,
						"aiid": 1,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "language-download-voice"
								}
							]
						}
					},
					{
						"command": "action",
						"parameterType": "EMPTY",
						"siid": 14,
						"aiid": 2,
						"condition": {
							"name": "matchValue",
							"parameters": [
								{
									"matchValue": "language-get-download-status"
								}
							]
						}
					}
				]
			},
			{
				"property": "status",
				"siid": 2,
				"piid": 1,
				"friendlyName": "Robot Cleaner - Status",
				"channel": "status",
				"type": "Number",
				"stateDescription": {
					"readOnly": true,
					"options": [
						{
							"value": "1",
							"label": "Idle"
						},
						{
							"value": "2",
							"label": "Charging"
						},
						{
							"value": "3",
							"label": "BreakCharging"
						},
						{
							"value": "4",
							"label": "Sweeping"
						},
						{
							"value": "5",
							"label": "Paused"
						},
						{
							"value": "6",
							"label": "Go Charging"
						},
						{
							"value": "7",
							"label": "Remote"
						},
						{
							"value": "8",
							"label": "Charged"
						},
						{
							"value": "9",
							"label": "Mapping"
						},
						{
							"value": "10",
							"label": "Updating"
						}
					]
				},
				"refresh": true,
				"actions": [],
				"readmeComment": "Value mapping [\"1\"\u003d\"Idle\",\"2\"\u003d\"Charging\",\"3\"\u003d\"BreakCharging\",\"4\"\u003d\"Sweeping\",\"5\"\u003d\"Paused\",\"6\"\u003d\"Go Charging\",\"7\"\u003d\"Remote\",\"8\"\u003d\"Charged\",\"9\"\u003d\"Mapping\",\"10\"\u003d\"Updating\"]"
			},
			{
				"property": "fault",
				"siid": 2,
				"piid": 2,
				"friendlyName": "Robot Cleaner - Device Fault",
				"channel": "fault",
				"type": "Number",
				"stateDescription": {
					"minimum": 0,
					"maximum": -1,
					"step": 1,
					"pattern": "%.0f",
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "sweep-mop-type",
				"siid": 2,
				"piid": 3,
				"friendlyName": "Robot Cleaner - Sweep Mop Type",
				"channel": "sweep_mop_type",
				"type": "Number",
				"stateDescription": {
					"options": [
						{
							"value": "1",
							"label": "Sweep"
						},
						{
							"value": "2",
							"label": "Mop"
						},
						{
							"value": "3",
							"label": "Sweep Mop"
						},
						{
							"value": "4",
							"label": "Sweep Before Mopping"
						}
					]
				},
				"refresh": true,
				"actions": [
					{
						"command": "set_properties",
						"parameterType": "NUMBER"
					}
				],
				"readmeComment": "Value mapping [\"1\"\u003d\"Sweep\",\"2\"\u003d\"Mop\",\"3\"\u003d\"Sweep Mop\",\"4\"\u003d\"Sweep Before Mopping\"]"
			},
			{
				"property": "sweep-type",
				"siid": 2,
				"piid": 4,
				"friendlyName": "Robot Cleaner - Sweep Type",
				"channel": "sweep_type",
				"type": "Number",
				"stateDescription": {
					"options": [
						{
							"value": "1",
							"label": "Global"
						},
						{
							"value": "5",
							"label": "Maping"
						},
						{
							"value": "6",
							"label": "GoCharging"
						},
						{
							"value": "7",
							"label": "RemoteControl"
						},
						{
							"value": "8",
							"label": "SelectRoom"
						},
						{
							"value": "9",
							"label": "CustomClean"
						},
						{
							"value": "4",
							"label": "Area"
						}
					]
				},
				"refresh": true,
				"actions": [
					{
						"command": "set_properties",
						"parameterType": "NUMBER"
					}
				],
				"readmeComment": "Value mapping [\"1\"\u003d\"Global\",\"5\"\u003d\"Maping\",\"6\"\u003d\"GoCharging\",\"7\"\u003d\"RemoteControl\",\"8\"\u003d\"SelectRoom\",\"9\"\u003d\"CustomClean\",\"4\"\u003d\"Area\"]"
			},
			{
				"property": "cleaning-area",
				"siid": 2,
				"piid": 5,
				"friendlyName": "Robot Cleaner - Cleaning Area",
				"channel": "cleaning_area",
				"type": "Number",
				"stateDescription": {
					"minimum": 0,
					"maximum": -1,
					"step": 1,
					"pattern": "%.0f",
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "cleaning-time",
				"siid": 2,
				"piid": 6,
				"friendlyName": "Robot Cleaner - Cleaning Time",
				"channel": "cleaning_time",
				"type": "Number:Time",
				"unit": "seconds",
				"stateDescription": {
					"minimum": 0,
					"maximum": -1,
					"step": 1,
					"pattern": "%.0f %unit%",
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "clean-times",
				"siid": 2,
				"piid": 7,
				"friendlyName": "Robot Cleaner - Clean Times",
				"channel": "clean_times",
				"type": "Number",
				"stateDescription": {
					"options": [
						{
							"value": "1",
							"label": "One Time"
						},
						{
							"value": "2",
							"label": "Two Time"
						}
					]
				},
				"refresh": true,
				"actions": [
					{
						"command": "set_properties",
						"parameterType": "NUMBER"
					}
				],
				"readmeComment": "Value mapping [\"1\"\u003d\"One Time\",\"2\"\u003d\"Two Time\"]"
			},
			{
				"property": "suction-level",
				"siid": 2,
				"piid": 8,
				"friendlyName": "Robot Cleaner - Suction Level",
				"channel": "suction_level",
				"type": "Number",
				"stateDescription": {
					"options": [
						{
							"value": "1",
							"label": "Silent"
						},
						{
							"value": "2",
							"label": "Basic"
						},
						{
							"value": "3",
							"label": "Strong"
						},
						{
							"value": "4",
							"label": "Full Speed"
						}
					]
				},
				"refresh": true,
				"actions": [
					{
						"command": "set_properties",
						"parameterType": "NUMBER"
					}
				],
				"readmeComment": "Value mapping [\"1\"\u003d\"Silent\",\"2\"\u003d\"Basic\",\"3\"\u003d\"Strong\",\"4\"\u003d\"Full Speed\"]"
			},
			{
				"property": "mop-water-output-level",
				"siid": 2,
				"piid": 9,
				"friendlyName": "Robot Cleaner - Mop Water Output Level",
				"channel": "mop_water_output_level",
				"type": "Number",
				"stateDescription": {
					"options": [
						{
							"value": "0",
							"label": "Off"
						},
						{
							"value": "1",
							"label": "Level1"
						},
						{
							"value": "2",
							"label": "Level2"
						},
						{
							"value": "3",
							"label": "Level3"
						}
					]
				},
				"refresh": true,
				"actions": [
					{
						"command": "set_properties",
						"parameterType": "NUMBER"
					}
				],
				"readmeComment": "Value mapping [\"0\"\u003d\"Off\",\"1\"\u003d\"Level1\",\"2\"\u003d\"Level2\",\"3\"\u003d\"Level3\"]"
			},
			{
				"property": "zone-ids",
				"siid": 2,
				"piid": 10,
				"friendlyName": "Robot Cleaner - Zone IDs",
				"channel": "zone_ids",
				"type": "String",
				"stateDescription": {
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "restricted-sweep-areas",
				"siid": 2,
				"piid": 11,
				"friendlyName": "Robot Cleaner - Restricted Sweep Areas",
				"channel": "restricted_sweep_areas",
				"type": "String",
				"refresh": true,
				"actions": [
					{
						"command": "set_properties",
						"parameterType": "STRING"
					}
				]
			},
			{
				"property": "restricted-walls",
				"siid": 2,
				"piid": 12,
				"friendlyName": "Robot Cleaner - Restricted Walls",
				"channel": "restricted_walls",
				"type": "String",
				"refresh": true,
				"actions": [
					{
						"command": "set_properties",
						"parameterType": "STRING"
					}
				]
			},
			{
				"property": "mode",
				"siid": 2,
				"piid": 16,
				"friendlyName": "Robot Cleaner - Mode",
				"channel": "mode",
				"type": "Number",
				"stateDescription": {
					"options": [
						{
							"value": "1",
							"label": "Silent"
						},
						{
							"value": "2",
							"label": "Basic"
						},
						{
							"value": "3",
							"label": "Strong"
						}
					]
				},
				"refresh": true,
				"actions": [
					{
						"command": "set_properties",
						"parameterType": "NUMBER"
					}
				],
				"readmeComment": "Value mapping [\"1\"\u003d\"Silent\",\"2\"\u003d\"Basic\",\"3\"\u003d\"Strong\"]"
			},
			{
				"property": "edge-swing-tail-sweep",
				"siid": 2,
				"piid": 17,
				"friendlyName": "Robot Cleaner - Edge Swing Tail Sweep",
				"channel": "edge_swing_tail_sweep",
				"type": "Switch",
				"refresh": true,
				"actions": [
					{
						"command": "set_properties",
						"parameterType": "ONOFFBOOL"
					}
				]
			},
			{
				"property": "edge-sweep-frequency",
				"siid": 2,
				"piid": 18,
				"friendlyName": "Robot Cleaner - Edge Sweep Frequency",
				"channel": "edge_sweep_frequency",
				"type": "Number",
				"stateDescription": {
					"options": [
						{
							"value": "1",
							"label": "7 Sweeps"
						},
						{
							"value": "2",
							"label": "Every Time"
						}
					]
				},
				"refresh": true,
				"actions": [
					{
						"command": "set_properties",
						"parameterType": "NUMBER"
					}
				],
				"readmeComment": "Value mapping [\"1\"\u003d\"7 Sweeps\",\"2\"\u003d\"Every Time\"]"
			},
			{
				"property": "notice",
				"siid": 2,
				"piid": 19,
				"friendlyName": "Robot Cleaner - Notice",
				"channel": "notice",
				"type": "String",
				"stateDescription": {
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "carpet-cleaning-method",
				"siid": 2,
				"piid": 20,
				"friendlyName": "Robot Cleaner - Carpet Cleaning Method",
				"channel": "carpet_cleaning_method",
				"type": "Number",
				"stateDescription": {
					"options": [
						{
							"value": "0",
							"label": "Self Adaption"
						},
						{
							"value": "1",
							"label": "Avoid"
						},
						{
							"value": "2",
							"label": "Ignore"
						}
					]
				},
				"refresh": true,
				"actions": [
					{
						"command": "set_properties",
						"parameterType": "NUMBER"
					}
				],
				"readmeComment": "Value mapping [\"0\"\u003d\"Self Adaption\",\"1\"\u003d\"Avoid\",\"2\"\u003d\"Ignore\"]"
			},
			{
				"property": "carpet-discriminate",
				"siid": 2,
				"piid": 21,
				"friendlyName": "Robot Cleaner - Carpet Discriminate",
				"channel": "carpet_discriminate",
				"type": "Switch",
				"refresh": true,
				"actions": [
					{
						"command": "set_properties",
						"parameterType": "ONOFFBOOL"
					}
				]
			},
			{
				"property": "battery-level",
				"siid": 3,
				"piid": 1,
				"friendlyName": "Battery - Battery Level",
				"channel": "battery_level",
				"type": "Number:Dimensionless",
				"unit": "percentage",
				"stateDescription": {
					"minimum": 0,
					"maximum": 100,
					"step": 1,
					"pattern": "%.0f %unit%",
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "charging-state",
				"siid": 3,
				"piid": 2,
				"friendlyName": "Battery - Charging State",
				"channel": "charging_state",
				"type": "Number",
				"stateDescription": {
					"readOnly": true,
					"options": [
						{
							"value": "1",
							"label": "Charging"
						},
						{
							"value": "2",
							"label": "Not Charging"
						},
						{
							"value": "3",
							"label": "Not Chargeable"
						}
					]
				},
				"refresh": true,
				"actions": [],
				"readmeComment": "Value mapping [\"1\"\u003d\"Charging\",\"2\"\u003d\"Not Charging\",\"3\"\u003d\"Not Chargeable\"]"
			},
			{
				"property": "voltage",
				"siid": 3,
				"piid": 3,
				"friendlyName": "Battery - Voltage",
				"channel": "voltage",
				"type": "Number",
				"stateDescription": {
					"minimum": 0,
					"maximum": 65535,
					"step": 1,
					"pattern": "%.0f",
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "alarm",
				"siid": 4,
				"piid": 1,
				"friendlyName": "Alarm - Alarm",
				"channel": "alarm",
				"type": "Switch",
				"refresh": true,
				"actions": [
					{
						"command": "set_properties",
						"parameterType": "ONOFFBOOL"
					}
				]
			},
			{
				"property": "volume",
				"siid": 4,
				"piid": 2,
				"friendlyName": "Alarm - Volume",
				"channel": "volume",
				"type": "Number:Dimensionless",
				"unit": "percentage",
				"stateDescription": {
					"minimum": 0,
					"maximum": 100,
					"step": 1,
					"pattern": "%.0f %unit%"
				},
				"refresh": true,
				"actions": [
					{
						"command": "set_properties",
						"parameterType": "NUMBER"
					}
				]
			},
			{
				"property": "physical-controls-locked",
				"siid": 5,
				"piid": 1,
				"friendlyName": "Physical Control Locked - Physical Control Locked",
				"channel": "physical_controls_locked",
				"type": "Switch",
				"refresh": true,
				"actions": [
					{
						"command": "set_properties",
						"parameterType": "ONOFFBOOL"
					}
				]
			},
			{
				"property": "current-physical-control-lock",
				"siid": 5,
				"piid": 2,
				"friendlyName": "Physical Control Locked - Current Physical Control Lock",
				"channel": "current_physical_control_lock",
				"type": "Switch",
				"stateDescription": {
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "brush-left-time",
				"siid": 8,
				"piid": 1,
				"friendlyName": "Brush Cleaner - Brush Left Time",
				"channel": "brush_left_time",
				"type": "Number:Time",
				"unit": "days",
				"stateDescription": {
					"minimum": 0,
					"maximum": 1000,
					"step": 1,
					"pattern": "%.0f %unit%",
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "brush-life-level",
				"siid": 8,
				"piid": 2,
				"friendlyName": "Brush Cleaner - Brush Life Level",
				"channel": "brush_life_level",
				"type": "Number:Dimensionless",
				"unit": "percentage",
				"stateDescription": {
					"minimum": 0,
					"maximum": 100,
					"step": 1,
					"pattern": "%.0f %unit%",
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "brush-left-time1",
				"siid": 9,
				"piid": 1,
				"friendlyName": "Brush Cleaner - Brush Left Time",
				"channel": "brush_left_time1",
				"type": "Number:Time",
				"unit": "days",
				"stateDescription": {
					"minimum": 0,
					"maximum": 1000,
					"step": 1,
					"pattern": "%.0f %unit%",
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "brush-life-level1",
				"siid": 9,
				"piid": 2,
				"friendlyName": "Brush Cleaner - Brush Life Level",
				"channel": "brush_life_level1",
				"type": "Number:Dimensionless",
				"unit": "percentage",
				"stateDescription": {
					"minimum": 0,
					"maximum": 100,
					"step": 1,
					"pattern": "%.0f %unit%",
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "filter-left-time",
				"siid": 10,
				"piid": 1,
				"friendlyName": "Filter - Filter Left Time",
				"channel": "filter_left_time",
				"type": "Number:Time",
				"unit": "days",
				"stateDescription": {
					"minimum": 0,
					"maximum": 1000,
					"step": 1,
					"pattern": "%.0f %unit%",
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "filter-life-level",
				"siid": 10,
				"piid": 2,
				"friendlyName": "Filter - Filter Life Level",
				"channel": "filter_life_level",
				"type": "Number:Dimensionless",
				"unit": "percentage",
				"stateDescription": {
					"minimum": 0,
					"maximum": 100,
					"step": 1,
					"pattern": "%.0f %unit%",
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "brush-left-time2",
				"siid": 11,
				"piid": 1,
				"friendlyName": "Brush Cleaner - Brush Left Time",
				"channel": "brush_left_time2",
				"type": "Number:Time",
				"unit": "days",
				"stateDescription": {
					"minimum": 0,
					"maximum": 1000,
					"step": 1,
					"pattern": "%.0f %unit%",
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "brush-life-level2",
				"siid": 11,
				"piid": 2,
				"friendlyName": "Brush Cleaner - Brush Life Level",
				"channel": "brush_life_level2",
				"type": "Number:Dimensionless",
				"unit": "percentage",
				"stateDescription": {
					"minimum": 0,
					"maximum": 100,
					"step": 1,
					"pattern": "%.0f %unit%",
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "mop-status",
				"siid": 6,
				"piid": 1,
				"friendlyName": "Vacuum Extend - Mop Status",
				"channel": "mop_status",
				"type": "Switch",
				"stateDescription": {
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "frameware-version",
				"siid": 6,
				"piid": 2,
				"friendlyName": "Vacuum Extend - Frameware Version",
				"channel": "frameware_version",
				"type": "String",
				"stateDescription": {
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "dnd-switch",
				"siid": 6,
				"piid": 3,
				"friendlyName": "Vacuum Extend - Dnd Switch",
				"channel": "dnd_switch",
				"type": "Switch",
				"refresh": true,
				"actions": [
					{
						"command": "set_properties",
						"parameterType": "ONOFFBOOL"
					}
				]
			},
			{
				"property": "dnd-time",
				"siid": 6,
				"piid": 4,
				"friendlyName": "Vacuum Extend - Dnd Time",
				"channel": "dnd_time",
				"type": "Number",
				"stateDescription": {
					"minimum": 0,
					"maximum": -1,
					"step": 1,
					"pattern": "%.0f"
				},
				"refresh": true,
				"actions": [
					{
						"command": "set_properties",
						"parameterType": "STRING"
					}
				]
			},
			{
				"property": "order-clean",
				"siid": 6,
				"piid": 5,
				"friendlyName": "Vacuum Extend - Order Clean",
				"channel": "order_clean",
				"type": "String",
				"stateDescription": {
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "carpet-boost",
				"siid": 6,
				"piid": 6,
				"friendlyName": "Vacuum Extend - Carpet Boost",
				"channel": "carpet_boost",
				"type": "Switch",
				"refresh": true,
				"actions": [
					{
						"command": "set_properties",
						"parameterType": "ONOFFBOOL"
					}
				]
			},
			{
				"property": "carpet-avoidance",
				"siid": 6,
				"piid": 7,
				"friendlyName": "Vacuum Extend - Carpet Avoidance",
				"channel": "carpet_avoidance",
				"type": "Switch",
				"stateDescription": {
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "carpet-display",
				"siid": 6,
				"piid": 8,
				"friendlyName": "Vacuum Extend - Carpet Display",
				"channel": "carpet_display",
				"type": "Switch",
				"stateDescription": {
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "status-extend",
				"siid": 6,
				"piid": 9,
				"friendlyName": "Vacuum Extend - Status Extend",
				"channel": "status_extend",
				"type": "Number",
				"stateDescription": {
					"readOnly": true,
					"options": [
						{
							"value": "0",
							"label": "Null"
						},
						{
							"value": "1",
							"label": "Sleep"
						},
						{
							"value": "2",
							"label": "Relocation"
						}
					]
				},
				"refresh": true,
				"actions": [],
				"readmeComment": "Value mapping [\"0\"\u003d\"Null\",\"1\"\u003d\"Sleep\",\"2\"\u003d\"Relocation\"]"
			},
			{
				"property": "room-info",
				"siid": 6,
				"piid": 10,
				"friendlyName": "Vacuum Extend - Room Info",
				"channel": "room_info",
				"type": "String",
				"stateDescription": {
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "sweep-break-switch",
				"siid": 6,
				"piid": 11,
				"friendlyName": "Vacuum Extend - Sweep Break Switch",
				"channel": "sweep_break_switch",
				"type": "Switch",
				"refresh": true,
				"actions": [
					{
						"command": "set_properties",
						"parameterType": "ONOFFBOOL"
					}
				]
			},
			{
				"property": "fault-index",
				"siid": 6,
				"piid": 13,
				"friendlyName": "Vacuum Extend - Fault Index",
				"channel": "fault_index",
				"type": "String",
				"stateDescription": {
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "map-obj-name",
				"siid": 7,
				"piid": 1,
				"friendlyName": "Vacuum Map - Map Obj Name",
				"channel": "map_obj_name",
				"type": "String",
				"stateDescription": {
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "trajectory-obj-name",
				"siid": 7,
				"piid": 2,
				"friendlyName": "Vacuum Map - Trajectory Obj Name",
				"channel": "trajectory_obj_name",
				"type": "String",
				"stateDescription": {
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "clean-record",
				"siid": 7,
				"piid": 3,
				"friendlyName": "Vacuum Map - Clean Record",
				"channel": "clean_record",
				"type": "String",
				"stateDescription": {
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "vacuum-position",
				"siid": 7,
				"piid": 4,
				"friendlyName": "Vacuum Map - Vacuum Position",
				"channel": "vacuum_position",
				"type": "String",
				"stateDescription": {
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "permanent-map",
				"siid": 7,
				"piid": 5,
				"friendlyName": "Vacuum Map - Permanent Map",
				"channel": "permanent_map",
				"type": "String",
				"stateDescription": {
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "permanent-map-id",
				"siid": 7,
				"piid": 6,
				"friendlyName": "Vacuum Map - Permanent Map Id",
				"channel": "permanent_map_id",
				"type": "Number",
				"stateDescription": {
					"minimum": 0,
					"maximum": 10,
					"step": 1,
					"pattern": "%.0f",
					"readOnly": true
				},
				"refresh": true,
				"actions": []
			},
			{
				"property": "map-control-switch",
				"siid": 7,
				"piid": 9,
				"friendlyName": "Vacuum Map - Map Control Switch",
				"channel": "map_control_switch",
				"type": "Switch",
				"refresh": true,
				"actions": [
					{
						"command": "set_properties",
						"parameterType": "ONOFFBOOL"
					}
				]
			}
		],
		"experimental": true
	}
}

If anyone has any idea - once the Thing has loaded and I have created an Equipment from that Thing using the UI - how to command the robot to clean a particular room, I’d be very grateful!

The below is in the Vacuum Extend - Room Info Item

{"version":2,"room_attrs":[["id","room_name","fan_level","water_level","clean_mode","clean_times","mop_mode","on"],[3,"Lounge",4,1,1,1,0,false],[4,"Kitchen",2,1,4,1,0,true],[5,"Downstairs hallway",4,1,1,1,0,false],[6,"Toilet",4,1,1,1,0,false]]} 

I can’t work out which Channel I need to send the room number to and/or how…

I think I’m getting close.

Using the vev version of the Mi Home Android app I have found the command which sends the device to a specific room. The below is in the log file:

{"params":{"did":"1140682914","siid":2,"aiid":13,"in":["{\"room\":[5]}"]}}

From https://home.miot-spec.com/spec/xiaomi.vacuum.b108gl :

  • siid:2 = Robot Cleaner
  • aiid:13 = start-vacuum-room-sweep

The robot seems to respond with

{"code":0,"message":"ok","result":{"did":"1140682914","miid":0,"siid":2,"aiid":13,"code":0,"exe_time":10,"net_cost":27,"ot_cost":19,"otlocalts":1733779576336032,"_oa_rpc_cost":62,"withLatency":0}}

Looking elsewhere on this forum I think I can use the params bit to send a command to the robot:

action{"did":"start-vacuum-room-sweep","siid":2,"aiid":13,"in":["{\"room\":[5]}"]}

But this isn’t working: the robot doesn’t respond to the command.

For completeness, I’m commanding the Execute Command Item using Blockly

Which outputs this code:

items.getItem('Unknown_Mi_IO_Device_Execute_Command').sendCommand('action{"did":"start-vacuum-room-sweep","siid":2,"aiid":13,"in":["{\\"room\\":[5]}"]}');

@marcel_verpaalen : apologies for the ping - any hints on this one? In general, I seem to be successful commanding the robot if no in is required. But as soon as a command expects parameters I just get the silent treatment from the robot.

The formatting is bit tricky, but looks to me your command needs more \ in order to send the right info to the robot.

The value in the in array are strings.
So between the square brackets each \ needs a \ and each "needs a. So I expect something like
[\"{\\\"room\\\":[5]}\"]}}

Best to enable the debug logging to validate that it exactly sends the right command

Thanks for the hint @marcel_verpaalen - sadly this didn’t work.

Here’s some logs which may or may not be helpful.

From the Android app

Below is output from vev’s version of the Mi Home app, from ~2 minutes before I commanded the robot to sweep a specific room (@21:26:17, using the app), followed by stopping the robot and getting it to return to the dock (@21:26:36, again using the app).

This log is too long to post, so here it is on pastebin

From the binding

Below is the DEBUG log from the binding. I disabled the Thing prior to setting the log to DEBUG, then re-enabled it. At roughly 22:13:00 I executed the following script from within the openHAB UI:

items.getItem('Unknown_Mi_IO_Device_Execute_Command').sendCommand('action{"did":"start-vacuum-room-sweep","siid":2,"aiid":13,"in":[\"{\\\"room\\\":[6]}\"]}');

The binding log is also too long to post, but it’s up on pastebin.

@marcel_verpaalen

Success! I had to stand up an entire Home Assistant LXC so that I could install hass-xiaomi-miot, use its available “Call action” action to successfully send the robot to a specific room, and then check the debug logs in order to find the correct call!

Below is what it looks like in the HA UI, which I copied from here:

Then in the Home Assistant logs I found:

2024-12-20 21:47:54.941 DEBUG (SyncWorker_3) [custom_components.xiaomi_miot.core.device.xiaomi.vacuum.b108gl] Call miot action {'did': 'action.2.13', 'siid': 2, 'aiid': 13, 'in': [{'piid': 13, 'value': '{"room":[5]}'}]}, result: {'out': [], 'code': 0}

Grabbing the interesting part:

{'did': 'action.2.13', 'siid': 2, 'aiid': 13, 'in': [{'piid': 13, 'value': '{"room":[5]}'}]}

And shoving that into an openHAB script:

items.getItem('Unknown_Mi_IO_Device_Execute_Command').sendCommand('action{"did": "action.2.13", "siid": 2, "aiid": 13, "in": [{\"piid\": 13, \"value\": \"{\\\"room\\\":[5]}\"}]}');

And it’s now working!

Similarly, to setup a custom clean in a specific room:

items.getItem('Unknown_Mi_IO_Device_Execute_Command').sendCommand('action{"did": "action.2.10", "siid": 2, "aiid": 10, "in": [{\"piid\": 14, \"value\": \"{\\\"room_attrs\\\":[{\\\"id\\\":4,\\\"room_name\\\":\\\"Kitchen\\\",\\\"fan_level\\\":4,\\\"water_level\\\":3,\\\"clean_mode\\\":4,\\\"clean_times\\\":1,\\\"mop_mode\\\":0,\\\"on\\\":true}]}\"}]}');
1 Like