marcelrv / xiaomirobotvacuumprotocol Goto Github PK
View Code? Open in Web Editor NEWAttempt to describe the Xiaomi Robot Vacuum Protocol
License: GNU General Public License v3.0
Attempt to describe the Xiaomi Robot Vacuum Protocol
License: GNU General Public License v3.0
Hi,
I checked functionality of some endpoints for roborock.vacuum.m1s with software version 3.5.4_0948:
They worked for me. Can you please add m1s to list of available devices?
I will continue to inform you about the availability of endpoints.
Thank you so much for your work!
Hi, purchased one of the new models of vacuum, I've managed to get the binding to give me a dump out of the test data.
Any way to get this little guy into Openhab?
Would it be possible currently using the api to change maps on a S5 Max and implement multi floor support before its official?
In a 3 floor house I would use something to trigger the api when the floor is changed then send the new map to the robot.
Or another simple, non-intrusive sound that isn't vocal? I tried sending the sound test command, but that just makes it say a phrase.
Hello,
I came upon the following commands on a gen2 vacuum with v001780 firmware:
set_lab_status
start_edit_map
end_edit_map
save_map
reset_map
use_new_map
use_old_map
get_persist_map_v1
mirobo raw-command set_lab_status 1
allows the robot to "remember" maps after a reboot.
The start_edit_map
, end_edit_map
, and save_map
appear to be related to the virtual walls and forbidden zones functionality. I believe a JSON is expected as parameters for the function.
I do not have the xiaomi app, and I was not able to figure out the format of these parameters.
Note that calling start_edit_map
, end_edit_map
, or save_map
without first enabling the lab_status will result in the following response: The Lab Status is disable
.
Not sure what the use_new_map
, use_old_map
, and get_persist_map
do.
Hello,
I've implemented my custom android app for sending commands to the vacuum Roborock S5 Max.
Many of the commands listed in this protocol are working, but I miss the option to switch map (to get the vacuum know that he has been moved into map 3 instead of 1). I tried also commands like:
reset_map
use_new_map
use_old_map
recover_map
get_recover_map
get_recover_maps
but I'm getting response "{'result': 'unknown_method', 'id': ...}"
My lab-status is 3
For enabling lab status (setting to 1, not sure if this should solve the issue) I'm getting: Error: {'code': -10005, 'message': 'Invalid parameters'}
Do you have any idea?
Or do you have even other solution to send the vacuum message "use map Nr. 3"?
hi, 1st. pretty good job with that node & support 4 those Vacuum cleaners.
I'm running a roborock s50 with latest firmware.
Hi,
I have Roborock S7 device.
I want try start room cleaning command.
When I inject message with this payload to command node
{"method":"app_segment_clean","params":[16,22],"id":6764}
Node return this warning
"Miio Roborock error on command 'app_segment_clean': Param is not an array"
I don't understand warning text, because "params" IS an array.
Can you help me?
Thx.
How to start cleaning in the specified zone.(area)
If I set this mode through mobile app I receive status=17. (getStatus)
Hi, I have a s5max and get your docu for distance_off. https://github.com/marcelrv/XiaomiRobotVacuumProtocol/blob/master/water_box_custom_mode.md
For the S5max you can't set the level with
method": "set_water_box_custom_mode", "params": {"water_box_mode": 207, "distance_off": 60},
the mode will set, but the level (distance_off) not.
I checked the network traffix and found out, that is done by
'method': 'set_water_box_distance_off', 'params': {'distance_off': 105}}
The calculation works as expected.
So perhaps you wan't to adapt this to your docu?
I spent time a few years back to create a custom voice pack for my Mi Robot Vacuum, but lost the original files. Is there any possibility to download the currently installed voice from the vacuum? I am afraid of loosing it if something someday goes wrong and I have to reset it...
hi Marcel,
very great job,
thank you for your interest in our robot .
please be free to contact me when you have question about xiaomiRobot(Roborock).
It is impossible to execute any commands that contain arguments. It does not matter how arguments are submitted ā with message.payload or in the node settings
All other commands are executed well.
My configuration :
node-red ver.0.18.4
node-red node: node-red-contrib-xiaomi-roborock 0.0.1
roborock commands: https://github.com/marcelrv/XiaomiRobotVacuumProtocol
roborock fw_ver: "3.3.9_001518"
roborock model: "roborock.vacuum.s5"
Could you please explain how to configure commands with arguments.
Is there any chance to get the "get_room_mapping" also available for the S5 ? The method 'app_segment_clean' does actually work for the S5 when i transmit the id of the segment. But i have to find them by try and error... There for it would be great to have the "get_room_mapping" available for the S5. That would be awesome!
Thanks for your time.
Hello,
this is not a bug report, more like a query or feature reequest.
sorry if it is my fault, but could not find out how to get the current coordinates of the vac and how to send to specific coordinates.
Is there a way already developed or this would be a feature request?
thanks in advance
In the app there's an Empty Dustbin (S7/S7MaxV here) that would be extremely useful to be able to run automation against.
Hi,
I have the S7+ (with auto-empty dock) and i'm looking for the command to start the emptying.
Could you guide me in the process of reverse engineering it (if the command is not allready known) ?
Thanks for the great work !
Hello I am trying to get some info from my Roborock with Node-Red.
I used call service node and debug node to get the return information.
When I try f. ex
{
"command": "get_status",
"params": "battery"
}
or any other command which should return information I only get back payload with random string of numbers.
I'd like to emulate the app functionality to allow multiple passes for rooms.
Could this be achieved by chaining sements ids?
{
"method": "app_segment_clean",
"params": [16, 16, 16],
"id": 6764
}
Roborock S6 and S5 Max and perhaps other models have the selective room cleaning.
Which command can I use to start cleaning a specific room?
The command app_zoned_clean is only for a square zone. Is there a command e.g. like this?
For example:
{
"id": 8338,
"method": "app_room_clean", // ????
"params":[
"Kitchen", // Room name, as they were named in the app
"Living room" // further rooms
]
}
Right now voice command is just used to clean the zones/rooms.
But i wpould like to instruct the no of cyles too (ex Roborock, Clean my bedroom twice (2 cycles) ).
Also i cannot add the cycles in app after voice command to clean a room
Is there a way to get the current coordinates ?
Hello,
is it possible to recognize the status of the dustbin? I do not mean the level, but whether the dustbin was removed or was used again ...
I've been texting several times in the openhab community but i was ignored.
I got the basic commands for the Viomi vacuum v7. It would be nice to have them in openhab to test them out
{ "deviceMapping": { "id": [ "viomi.vacuum.v7" ], "channels": [ { "property": "battary_life", "friendlyName": "Battery Level", "channel": "battery", "type": "Number", "refresh": true, "ChannelGroup": "Status", "actions": [] }, { "property": "run_state", "friendlyName": "Vacuum State", "channel": "state", "type": "Number", "refresh": true, "ChannelGroup": "Status", "actions": [] }, { "property": "box_type", "friendlyName": "Vacuum Status", "channel": "boxtype", "type": "Number", "refresh": true, "ChannelGroup": "Status", "actions": [] }, { "property": "mop_type", "friendlyName": "Vacuum Mop Type", "channel": "moptype", "type": "Number", "refresh": true, "ChannelGroup": "Status", "actions": [ { "command": "set_mop", "parameterType": "NUMBER" } ] }, { "property": "suction_grade", "friendlyName": "Vacuum Power", "channel": "suctiongrade", "type": "Number", "refresh": true, "ChannelGroup": "Status", "actions": [ { "command": "set_suction", "parameterType": "NUMBER" } ] }, { "property": "water_grade", "friendlyName": "Vacuum Mop Type", "channel": "watergrade", "type": "Number", "refresh": true, "ChannelGroup": "Status", "actions": [ { "command": "set_suction", "parameterType": "NUMBER" } ] }, { "property": "err_state", "friendlyName": "Error State", "channel": "errorstate", "type": "Number", "refresh": true, "ChannelGroup": "Status", "actions": [] }, { "property": "is_mop", "friendlyName": "Vacuum Type", "channel": "ismop", "type": "Number", "refresh": true, "ChannelGroup": "Status", "actions": [ { "command": "set_mop", "parameterType": "NUMBER" } ] }, { "property": "set_charge", "friendlyName": "Send to Dock", "channel": "setcharge", "type": "Switch", "refresh": true, "ChannelGroup": "Actions", "actions": [ { "command": "set_charge", "parameterType": "ONOFF" } ] }, { "property": "set_language", "friendlyName": "Set Language", "channel": "setlanguage", "type": "Number", "refresh": true, "ChannelGroup": "Actions", "actions": [ { "command": "set_language", "parameterType": "NUMBER" } ] }, { "property": "set_light", "friendlyName": "Set Light", "channel": "setlight", "type": "Switch", "refresh": true, "ChannelGroup": "Actions", "actions": [ { "command": "set_light", "parameterType": "ONOFF" } ] }, { "property": "set_mode_withroom", "friendlyName": "Set Mode", "channel": "setlanguage", "type": "String", "refresh": true, "ChannelGroup": "Actions", "actions": [ { "command": "set_mode_withroom", "parameterType": "STRING" } ] } ] } }
Hi,
I have just bought the Xiaomi vacuum cleaner and I noticed a state that wasn't created
state: 16, this is in respone of the "Go to" command"
Kind regards
Koen
Hi,
I have the S7 (roborock.vacuum.a15), this also shows a message in the app when the water is running low (water level low).
Is it possible to query this?
Hi,
Is room mapping supported for S6 MaxV ?
Getting empty array.
My fw_ver: "3.5.8_6246".
It may be a very stupid question, but could you please describe how I can get my hands on the current map file? I really don't want to simply screenshot my android app screen, there must be a better way. Can I get access to the map without rooting the robot itself? I have the first version of the robot and I want to use it to create a floor plan of my house.
I think you mentioned that maps are stored in robot.db inside the device itself, but that file can only be accessed once the device via rooted, correct? Is there anything on the android device or on the cloud I can use?
Is there any chance to decode new viomi.vacuum.v7 RR Map file format?
Ready to send map file for analysis.
More information - PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor#23
Hi,
i use NodeRed and i can trigger a room cleaning and so on.
I would love to use my triggers as well for "app_zoned_clean".
But im unable to guess which coordinates are mine.
Since i dont see "get_map_v1" in the NodeRed pulldown, im a bit clueless how to obtain my coordinates.
I use node-red-contrib-miio-roborock 2.3.2
I tried to Pin-and-Go in the App and hoped to get the position back, but without any luck.
Would use it for physical buttons to trigger small cleaning jobs.
At least one coordinate would be usefull, because the rest i could manage myself with try&error. But since it seems im way off with my guesses, im clueless.
Thanks
Erich
It looks like all commands are reverse engineered. Maybe this can help somehow to get the commands out of the vacuum that are still unknown or unclear.
I came across a page pointed out to me by a dev that made the integration for the mi heater. It seems like Xiaomi has hidden pages on the internet with all info per device. The challenge would be to find the right one for the job...
This page has all the commands for the za1 heater:
https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:heater:0000A01A:zhimi-za1:1
Replacing the last part A:zhimi-za1:1 with A:zhimi-zb1:1
You will get the smart heater zb1's commands
Me as a n00b have managed to successfully turn my heater on and off just using node red commands. Even Timers and stuff can be read. So I guess If you find the page for the vacuums and other devices. You can do everything and even more the Xiaomi app can do
I guess there is a page like this for every Xiaomi device out there. The challenge would be to get all pages from that website
Hello,
I bought a Dreame D9 and was hoping I can send commands like app_start by using openhab, but nothing happens. Iām not sure if this is related to the binding or because the Dreame is not listed here as compatible device. Any idea how I can try to fix it?
Bye,
Christian
Mopping mode is set in the same section as suction power (fan level) in Mi Home app. It also says that it decreases suction a lot (it warns that it will be only set for the next cleaning session and then will change to previous mode). I guess it also changes the way robot moves to mop efficiently.
I wonder how would you set it through protocol. I will update this issue once I'll get any info about mopping mode and how to set it using miio protocol.
Any tips on capturing Mi Home app traffic on non-rooted device?
Hi,
Is there a command to turn off the robot ?
Thanks
Hi,
What command should I pass to resume a zoned cleanup?
Thanks for reverse engineering xiaomi vacuum protocol!
Hi,
msg.payload.mop_mode can't be changed. How do I have to do it. I would like to change it from 300 to 301.
Best Regards
Chris
Hi!
I'm trying to control my Roborock S7 MaxV Ultra over Openhab. To only vaccum (and not mob) I use the Roborock_S7_Water_Box_Mode command (setting it to 200) (see https://github.com/marcelrv/XiaomiRobotVacuumProtocol/blob/master/water_box_custom_mode.md#modes). The Xiaomi App reflects the change.
But when I start room cleaning with Roborock_S7_Vacuum_Room, it resets to (vaccum + mob). How can I just use vaccum mode (and not mob mode)?
Hey there,
does anyone know what the difference between filter_work_time
and filter_element_work_time
is?
What is the filter element
?
Are there more than one filter? š¤·āāļø
An FYI: I have run the "get features" command on my Roborock S7 MaxV (a27 model number) and received the following:
array[15]
[0 ā¦ 9]
0: 111
1: 112
2: 113
3: 114
4: 115
5: 116
6: 117
7: 118
8: 119
9: 120
[10 ā¦ 14]
10: 121
11: 122
12: 123
13: 124
14: 125
Feel free to update documentation to express compatibility with this new device.
Hi,
the Xiaomi-App supports a setting to switch between Quiet, Normal and Turbo. This worked on Roborock S5 at least, also with a forced firmware upgrade to 5S, seems to be a standard thing. Is there an API call i can make to switch the vacuum to "Quiet" for example?
Which command can I use to move the vacuum cleaner to a certain position?
Is there a way to make it follow a specific route while cleaning?
Is it possible to get mapping from Xiaomi server?
I know my region: sg.
I send GET-request to https://sg.api.io.mi.com/app/home/getmapfileurl with obj_name parameter which is the same with result of get_map_v1 method. It doesn't work. I try to concatenate roboroommap%2FXXXXXXXX%2FX (X from digits) and URL. It doesn't work too. What Do I do in wrong way?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ššš
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ā¤ļø Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.