Skip to content

Commit

Permalink
return full data in discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
koalazak committed Feb 16, 2017
1 parent 6781dae commit 9548001
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,29 @@ dorita980.getRobotIP(function (ierr, ip) {
});
```

You can also use `.discovery` method to get all the robots discovery data:

```javascript
var dorita980 = require('dorita980');

dorita980.discovery(function (ierr, data) {
console.log(data);
});
```

Will print:
```
{ ver: '2',
hostname: 'Roomba-xxxxxxxxxxxxx',
robotname: 'Dorita',
ip: '192.168.1.103',
mac: '12:12:12:12:12:12',
sw: 'v2.0.0-34',
sku: 'R98----',
nc: 0,
proto: 'mqtt' }
```

# Local API

The library send commands direclty over wifi to your robot. You dont need internet connection.
Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ function local (username, password, ip, version) {
module.exports = {
Cloud: cloud,
Local: local,
getRobotIP: discovery
getRobotIP: discovery,
discovery: (cb) => discovery(cb, true)
};

0 comments on commit 9548001

Please sign in to comment.