Comments (20)
3.3.9_001633
Lab mode ON:
req: {'from': '4', 'id': ##MESSAGE_ID##, 'method': 'set_lab_status', 'params': [1]}
res: {'id': ##MESSAGE_ID##, 'result': ['ok']}
Lab mode OFF:
req: {'from': '4', 'id': ##MESSAGE_ID##, 'method': 'set_lab_status', 'params': [0]}
res: {'id': ##MESSAGE_ID##, 'result': ['ok']}
Software barrier:
req: {'from': '4', 'id': 666, 'method': 'save_map', 'params': [[1, 33800, 27850, 34900, 28700]]}
res: {'id': ##MESSAGE_ID##, 'result': ['ok']}
No-go zone:
req: {'from': '4', 'id': ##MESSAGE_ID##, 'method': 'save_map', 'params': [[0, 27000, 32000, 30750, 32000, 30750, 30250, 27000, 30250]]}
res: {'id': ##MESSAGE_ID##, 'result': ['ok']}
from xiaomirobotvacuumprotocol.
You are probably right. So we can set coords as follows counting from bottom left corner and where the dock is at [25500, 25500]:
[id, barrier_start_x, barrier_start_y, barrier_end_x, barrier_end_y]
or
[id, zone_top_left_x, zone_top_left_y, zone_top_right_x, zone_top_right_y, zone_bottom_right_x, zone_bottom_right_y, zone_bottom_left_x, zone_bottom_left_y]
or even barrier and no-go zone in one command:
[[id, barrier_start_x, barrier_start_y, barrier_end_x, barrier_end_y], [id, zone_top_left_x, zone_top_left_y, zone_top_right_x, zone_top_right_y, zone_bottom_right_x, zone_bottom_right_y, zone_bottom_left_x, zone_bottom_left_y]]
from xiaomirobotvacuumprotocol.
Seems the first argument of the array is not an id, but rather a type: 0 = zone, 1 = barrier.
I can create multiple zones with 0, one zone 0, next zone 1 didn't work. Tested with FW 1633.
from xiaomirobotvacuumprotocol.
I'm also seeing:
get_fresh_map_v2
get_fresh_map
get_persist_map_v2
get_persist_map
It is also possible that persistent maps are stored in the mii cloud and downloaded if requested.
from xiaomirobotvacuumprotocol.
Thanks for sharing these, @FeatureExpert!!
The params of software barrier and no-go zones seem like coordinates?
Software barrier takes a vector of [id, x1,y1,x2,y2]
And no-go zone takes [id, x1,y1,x2,y2,x3,y3,x4,y4], which are the corners of the zone rectangle?
Edit: see @JensBuchta's comment. The first parameter appears to be a type: 0 = zone, 1 = barrier
from xiaomirobotvacuumprotocol.
It looks like these features are yet to be ported to the Gen 1 Firmware. But given the similarities I would hope to see it soon
from xiaomirobotvacuumprotocol.
I'm not sure these numbers. Some kind of coordinates for sure, but I do not know yet how to calculate them correctly. My image with the map is 900x767, so the coordinates does not match the size. But maybe I generate map incorrectly...
from xiaomirobotvacuumprotocol.
Hi,
This may be a stupid question but how can you get the list of the commands ?
I did not find any explanation of the robot API.
Thanks
from xiaomirobotvacuumprotocol.
@FeatureExpert I guess they would be like the zoned_cleanup
coordinate system, where the dock is at (2500,2500) or something like that
from xiaomirobotvacuumprotocol.
@JensBuchta nice find!
from xiaomirobotvacuumprotocol.
You are probably right. So we can set coords as follows counting from bottom left corner and where the dock is at [25500, 25500]:
[id, barrier_start_x, barrier_start_y, barrier_end_x, barrier_end_y]
or
[id, zone_top_left_x, zone_top_left_y, zone_top_right_x, zone_top_right_y, zone_bottom_right_x, zone_bottom_right_y, zone_bottom_left_x, zone_bottom_left_y]
or even barrier and no-go zone in one command:
[[id, barrier_start_x, barrier_start_y, barrier_end_x, barrier_end_y], [id, zone_top_left_x, zone_top_left_y, zone_top_right_x, zone_top_right_y, zone_bottom_right_x, zone_bottom_right_y, zone_bottom_left_x, zone_bottom_left_y]]
sorry for my stupid question : how are no-go zones and barriers removed or how can i see these zones or barriers ?
from xiaomirobotvacuumprotocol.
Calling get_persistent_map_v1
triggers a map upload. However I'm not sure what the param does. With the new Valetudo which supports map uploading, I've added a log message and it uploads a map each time I call it.
from xiaomirobotvacuumprotocol.
It looks like it is a slot, it seems you can switch between 0 and 1.
asn (e) venv ~ workspace rockrobo miio mirobo raw-command get_persist_map_v1 1
Sending cmd get_persist_map_v1 with params 1
['retry']
asn (e) venv ~ workspace rockrobo miio mirobo raw-command get_persist_map_v1 0
Sending cmd get_persist_map_v1 with params 0
['map_upload_handler']
asn (e) venv ~ workspace rockrobo miio mirobo raw-command get_persist_map_v1 0
Sending cmd get_persist_map_v1 with params 0
['retry']
asn (e) venv ~ workspace rockrobo miio mirobo raw-command get_persist_map_v1 1
Sending cmd get_persist_map_v1 with params 1
['map_upload_handler']
from xiaomirobotvacuumprotocol.
get_persist_map_v1
only works after save_map
. If you do a reset_map
it doesn't work anmyore.
from xiaomirobotvacuumprotocol.
So how do you remove virtual walls and no-go zones?
from xiaomirobotvacuumprotocol.
Any news on this, did someone figure out how to delete virtual walls or no-go zones,
or how to reset all virtual walls + all no go-zones with some kind of reset (without loosing the peristant map)?
Maybe the original app doesn't delete single entities, but resets all and re-builds the other ones.
from xiaomirobotvacuumprotocol.
If you want to remove all walls and zones:
{'from': '4', 'id': 666, 'method': 'save_map', 'params': []}
from xiaomirobotvacuumprotocol.
If you want to remove one part, you parse the current map file, remove the part you don't want and call save_map with the params you want.
from xiaomirobotvacuumprotocol.
Can we somehow edit map background in a user friendly way?
What I mean is... e,g, when robot scans near a mirror - there are beams drawn on a map that go outside the room\house
(the screen taken from Valetudo, but it shouldn't matter).
I'd like to clean up the map for it to look nicer.
I have map json file downloaded, but it's 700kb of text\numbers, so really hard to track each point's coordinates. Thus some app/UI would be nice.
from xiaomirobotvacuumprotocol.
This is nothing you can simply set in the request, nor is there an obvious way to avoid it.
The Xiaomi cloud offers a basic bitmap with the colors including the reflections you see.
Besides that it offers the location of the various objects & tracks etc.
You might be able to create a client that does some smart things to the bitmap, to determine if it is part of a larger(largest) cloud of pixels or something, but that would be totally client dependent.
from xiaomirobotvacuumprotocol.
Related Issues (20)
- Xiaomi 1T (STYTJ02ZHM) Vacuum HOT 6
- Unable to change map HOT 3
- S7 - water level Low HOT 3
- How to use voice command to instruct no of cycles
- Set cleaning "strength"? HOT 1
- Reverse engineering HOT 2
- How can i find coordinates to use in "app_goto_target" and "app_zoned_clean" HOT 3
- Roborock S7 - Command to auto-empty in Dock HOT 6
- Question: Send command to Dreame D9 HOT 3
- How can control the mop_mode HOT 1
- Roborock S7 MaxV Firmware Features HOT 1
- get current coordinates and send to coordinates HOT 2
- Question: Can I make the S5E vacuum say a "ping" sound? HOT 1
- Ability to Empty dustbin. HOT 2
- S6 MaxV - get_room_mapping empty HOT 2
- Unable to get info using vacuum.send_command HOT 4
- S5 max - distance_off not worked as in docu described HOT 1
- Question: Retrieve installed sound pack?
- PROBLEM: Start room cleaning HOT 5
- Not able to clean without water (Roborock S7 MaxV Ultra) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xiaomirobotvacuumprotocol.