Xiaomi Robot Vacuum Binding

But how about first using this command to find out the map id:

Robot_Command.sendCommand(‘action{“did”:“vacuum-get-map-list”,“siid”:10,“aiid”:1,“in”:[]}’)

And then use the following command to find out the room ids:
Robot_Command.sendCommand(‘action{“did”:“vacuum-get-map-room-list”,“siid”:10,“aiid”:13,“in”:[{“piid”:2,“value”:map-id from the previous command}]}’)

Thanks to you we now use the correct syntax so this command should work.

Ok update: I tested it out my own - but it did not work for me neither. It only reported back something like Room1 Id10 although in the saved map I have got three rooms.

Yep, me to, only 1 room, with ID 10.
I finally succeeded to get log output from android Mi home app by vevs.
I got this command, when i start clean the specific room:

2023-01-09 16:43:56 -> {"params":{"aiid":3,"did":"1027817822","in":["11",0,1],"siid":7}} /miotspec/action
  • 1027817822 is my device ID
  • 11 is from 24 - clean-room-ids
  • 0 is rom 25 -clean-room-mode
  • 1 is from 26 - clean-room-oper

But now, how to implement it to acceptable format by OH.
I tried few versions:

xiaomi_robot_execute.sendCommand('{"params":{"aiid":3,"did":"1027817822","in":["11",0,1],"siid":7}} /miotspec/action')
xiaomi_robot_execute.sendCommand('{"params":{"aiid":3,"did":"1027817822","in":["11",0,1],"siid":7}}')
xiaomi_robot_execute.sendCommand('action{"aiid":3,"did":"1027817822","in":["11",0,1],"siid":7}')

none of them worked. Any ideas?

Tried this one yet:

xiaomi_robot_execute.sendCommand(‘action{“did”:“1027817822”,“siid”:7,“aiid”:3,“in”:[“11”,0,1]}’)

Your last one is the formatted the way OH miio binding needs it.
The value in did is not relevant → in the binding we set it to the command to have it recognizable so we don’t need to remember what the aiid/siid etc mean.

This is indeed what was expected from the source code.

I am curious as it seems than to accept two formats as you said "in":[{"piid":24,"value":10},{"piid":25,"value":0},{"piid":26,"value":1}]} was also working for you.

Or how about combining the two formats:

xiaomi_robot_execute.sendCommand('action{"siid":7,"aiid":3,"in":[{"piid":24,"value":"11"},{"piid":25,"value":0},{"piid":26,"value":1}]}')

Put the room id into brackets because it is formatted as a string while the parameters for mode and operation are unit8.
But I’m just guessing.

Success! The {“piid”:24,“value”:“11”} got the trick.

The command below works as well, if you want to clean more rooms.

xiaomi_robot_execute.sendCommand('action{"siid":7,"aiid":3,"in":[{"piid":24,"value":"11,12"},{"piid":25,"value":0},{"piid":26,"value":1}]}')

for rooms with ID 11 and 12

Thank you guys.

2 Likes

Thanks to you Tommi and of course thanks to you Marcel!

Mine works as well, was a bit try and error with my room ids, three rooms from 10-12 and of course id 12 it was…
But now it works!

xiaomi_robot_execute.sendCommand('action{"siid":7,"aiid":3,"in":[{"piid":24,"value":"12"},{"piid":25,"value":0},{"piid":26,"value":1}]}')

I just have one floor. Frequently my Roborock S5 is changing the map (closed doors, stuck somewhere) and then it will not enter a room or is totaly lost.
Then I need to open the Xiaomi App and load my manual saved map.

I want to accomplish this by openhab. I have tried to read the actual map.
Sendind the command “get_map” to a “miio:vacuum:1234567:actions#commands” linked item let me read the map ID.
roborockCommands.sendCommand("get_map")
The item roborockCommands will change to “retry” when not moving. While moving it will change to result":[“robomap%2F987654321%2F16”]

No I know the Map ID of a working map.

But how to tell roborock to the load the map when I see his “self changed map” is wrong?

I have tried several commands and methods, even json formated Strings. Nothing worked.

I have this channels:
miio:vacuum:1234567:actions#commands
miio:vacuum:1234567:status#map_status
miio:vacuum:1234567:info#multi_maps_list

Hey,
I’m trying t get my Xiaomi Robot Vacuum X10+ working with the binding. It is discovered with token but it is permanently offline. Thing type shows "unsupported Xiaomi Mi Device.
Any chance to get it implemented/working?
Thanks

Tim

See the readme. Override the model with a supported model. Most likely it will work.
Report back your results and we can include it.

If above does not work use the create experimental miot support switch of the unsupported device.

Hi Guys,

i want to define a rule set where the dust container is the trigger ( has been removed and deployed). Could you please help me to read out the status of the container? Is it even possible to get this information?

Thing:

UID: miio:generic:18D11F6A
label: Roborock S5 Max
thingTypeUID: miio:vacuum
configuration:
  cloudServer: de
  refreshInterval: 30
  host: 192.168.101.217
  model: roborock.vacuum.s5e
  communication: direct
  deviceId: "xxxx"
  timeout: 15000
  token: xxxx

Thanks in Advance
Simon

I have a new Roborock S7 MaxV Ultra and connot get a zoned area to run from OpenHAB 3.4.3

I have the Miio Binding installed and online. I see the log updating when I manually run the vacuum. I can send the commands to ‘vacuum’ and ‘dock’ and they seem to work fine.

I have used the Xiaomi Robot Radar Map to find the zone coordinates, but my log will just show below where it accepts the coordinates and then quickly goes back to ‘dock’:

2023-04-30 14:43:30.646 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'Carson_Vacuum_Control_Vacuum' received command app_zoned_clean[[28850,32500,31750,33400,1]]
2023-04-30 14:43:30.648 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Carson_Vacuum_Control_Vacuum' predicted to become app_zoned_clean[[28850,32500,31750,33400,1]]
2023-04-30 14:43:30.658 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Carson_Vacuum_Control_Vacuum' changed from dock to app_zoned_clean[[28850,32500,31750,33400,1]]
2023-04-30 14:43:33.773 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Carson_Vacuum_Control_Vacuum' changed from app_zoned_clean[[28850,32500,31750,33400,1]] to dock

Items:

String CarsonActionsCommands 	"Execute Command"   (gVac)    {channel="miio:generic:1FF3DF84:actions#control" }

Rule:

rule "Testing"
when
	Item vTesting changed to ON

then
	logInfo("Testing", "Testing set to ON")	
	CarsonActionsCommands.sendCommand('app_zoned_clean[[28850,32500,31750,33400,1]]')
end

Any ideas on why the zone is not working or is there a better way to have it just vacuum a specific zone?

Thanks in advance!

Hi all,
Hope it’s the right place to report the issue. Recently I found map function stops working in both Mi Home app as well as via MIIO binding. I contacted Xiaomi and they said I should disable MIIO binding without giving me a explanation. So looks to me that Xiaomi/Roborock starts to block map functionality without their app. My question is: how can I make sure MIIO doesn’t talk to Xiaomi Cloud? Is it enough just not to configure the map item? Many thanks in advance!

I’m not sure what weight you need to give to that advice… sounds like horse sh*t to get easy rid of your question.

that beside: You can remove the cloud userId/password.
After that it will communicate only via the local interface to the robot, so no cloud involved.
You may have some issues when you need to refresh the secret tokens, but you could in that case shortly enable the cloud again to pull the latest ones and disable it again.

I’m not 100% certain, but you could also try simply to remove the country from the vacuum thing configuration… that may do the trick as well.

1 Like

Thank you for the reply!
I contacted support and didn’t mention I have OpenHAB or similar. They asked me if I were using MIIO via HomeAssistant, and they suggest me to turn off the map function. What I did yesterday was to remove the image map item, so far the map works reliably in Xiaomi Home app.
Does the map function requires cloud connection or how do they know I’m using MIIO? I ask because I already have local mode turned on.

Yes, the map data is only stored in the cloud and can’t be pulled from the vacuum locally.
So yes, the map feature requires the cloud connection. The robot gives the relevant mapId via the local connection and the binding than retreives the map data for that mapId from the cloud.

The way it request it is copied from the way the phone apps pulls the data, so I don’t think Xiaomi can directly see a difference in communication between the binding and the regular phone app.
(maybe it also struggles if 2 phones pull the map at the same time, who knows)

1 Like

Ok that sounds strange - does it poll image from the cloud periodically? I’m not using the map very often but indeed after I removed the image item it works better in Mi Home app. I use iOS btw not sure if it makes a difference

It is requesting the map when it is not docked.
When docked it does not poll for the map anymore.
If I recall right it checks every 30 sec. The regular app every 5 or 10sec

Hello,
I’m using Roborock S8 ultra and using stable openhab version 3.4.2, and in the logs, I see those errors:

2023-05-28 10:39:11.761 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 30 (pls report to author)
2023-05-28 10:39:11.762 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 29 (pls report to author)
2023-05-28 10:39:41.643 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 31 (pls report to author)
2023-05-28 10:39:41.643 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 33 (pls report to author)
2023-05-28 10:39:41.644 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 32 (pls report to author)
2023-05-28 10:39:41.644 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 28 (pls report to author)
2023-05-28 10:39:41.645 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 30 (pls report to author)
2023-05-28 10:39:41.645 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 29 (pls report to author)
2023-05-28 10:40:11.691 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 31 (pls report to author)
2023-05-28 10:40:11.691 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 33 (pls report to author)
2023-05-28 10:40:11.692 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 32 (pls report to author)
2023-05-28 10:40:11.692 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 28 (pls report to author)
2023-05-28 10:40:11.692 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 30 (pls report to author)
2023-05-28 10:40:11.693 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 29 (pls report to author)
2023-05-28 10:40:41.621 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 31 (pls report to author)
2023-05-28 10:40:41.621 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 33 (pls report to author)
2023-05-28 10:40:41.621 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 32 (pls report to author)
2023-05-28 10:40:41.622 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 28 (pls report to author)
2023-05-28 10:40:41.622 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 30 (pls report to author)
2023-05-28 10:40:41.623 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 29 (pls report to author)
2023-05-28 10:41:11.662 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 31 (pls report to author)
2023-05-28 10:41:11.662 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 33 (pls report to author)
2023-05-28 10:41:11.663 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 32 (pls report to author)
2023-05-28 10:41:11.663 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 28 (pls report to author)
2023-05-28 10:41:11.664 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 30 (pls report to author)
2023-05-28 10:41:11.664 [INFO ] [.miio.internal.robot.RRMapFileParser] - Unknown blocktype 29 (pls report to author)

Any idea what should we do with it?

Xiaomi / Roborock seems to extended the maps again with new features.
Would you mind making a github issue for it.

I’ll try to address them. If you have an example rrmap file that would be nice as I can see if I can extend the map decoding for these bew blocktypes

In the mean time, to avoid flooding your log, you can do the following:
log:set warn org.openhab.binding.miio.internal.robot.RRMapFileParser
or
log:set warn org.openhab.binding.miio.internal.robot

1 Like