Skip to content

Commit

Permalink
simplified args in example
Browse files Browse the repository at this point in the history
other fields are not required
  • Loading branch information
koalazak authored Dec 20, 2019
1 parent bb4611b commit abab256
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -581,21 +581,19 @@ prod

`cleanRoom` is an alias for `start` - but with arguments. To clean a room - you need a structure similar to:

```json
{
"command": "start",
"initiator": "rmtApp",
"time": 1569197045,
"ordered": 0,
```javascript
const args = {
"pmap_id": "ABCDEFG123456FGKS789",
"regions": [
{ "region_id": "5", "region_name": "Hallway", "region_type": "hallway"}
],
"user_pmapv_id": "190917T20125Z"
}
};

myRobotViaLocal.cleanRoom(args);
```

The easiest way to find this information is to start a clean using the iRobot app and then call the `getRobotState` method and copy the `lastCommand` values from it. Using this you can derive the `pmap_id`, `user_pmapv_id` and `regions` data.
The easiest way to find this information is to start a clean using the iRobot app and then call the `getRobotState` method and copy the `lastCommand` values from it. Using this you can derive the `pmap_id`, `user_pmapv_id` and `regions` data. Or looking into `pmaps` property in the state.


```javascript
Expand Down

0 comments on commit abab256

Please sign in to comment.