koalazak / dorita980

Unofficial iRobot Roomba and Braava (i7/i7+, 980, 960, 900, e5, 690, 675, m6, etc) node.js library (SDK) to control your robot
MIT License
932 stars 147 forks source link

Cleaning zone #125

Closed warki closed 3 years ago

warki commented 3 years ago

With the newest App Version 5.0.0 on, a new feature has been published: cleaning zone. Inside the app you can drag and drop a zone inside one or multiple rooms, which you want to be cleaned e.g. under the dining table.

In my configurration the cleaning zone have its own user_pmapv_id, therefore you can not combine a zone cleaning task with a room cleaning task.

dorita980 and rest980 are able to perform this request already.

To clean first the cleaning zone "Hallway entry" (Cleaning Zone ID 5) and afterwards the Cleaning Zone "Dining Table" (Cleaning Zone ID: 0) zone 0, you can use the following method call:

const args = {
  "ordered": 1,
  "pmap_id": "ABCDEFG123456FGKS789",
  "regions": [
    { "region_id": "5", "region_name": "Hallway entry", "region_type": "hallway", "type": "zid"},
    { "region_id": "0", "region_name": "Dining table", "region_type": "other", "type": "zid"}
  ],
  "user_pmapv_id": "190917T20125Z"
};

myRobotViaLocal.cleanRoom(args);

Happy cleaning to all

koalazak commented 3 years ago

PR merged. Thank you!