Skip to content

Commit

Permalink
Add Troubleshoot section. Set timeout to get password
Browse files Browse the repository at this point in the history
  • Loading branch information
koalazak committed Sep 13, 2021
1 parent a1cae00 commit f420377
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
28 changes: 25 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ If you have firmware version 1.6.x [click here](https://github.com/koalazak/dori
- Firmware 3.2.x compatible (latest serie 800 uses firmware v3).
- See [rest980](https://github.com/koalazak/rest980) if you need a HTTP REST API interface to use dorita980 through it.

Latest firmware tested and working: `v2.4.16-126`

[![iRobot Roomba 980 cleaning map using dorita980 lib](https://img.youtube.com/vi/XILvHFEX7TM/0.jpg)](https://www.youtube.com/watch?v=XILvHFEX7TM)

Video: Realtime cleaning map using dorita980 lib in [rest980](https://github.com/koalazak/rest980).
Expand Down Expand Up @@ -137,14 +139,18 @@ function init () {

You need to know your robot IP address (look in your router or scan your LAN network with nmap to find it). Or use the `dorita980.getRobotIP()` method.

** Option 1 **

Install `dorita980` globally and then run the `get-roomba-password` command:

```bash
$ npm install -g dorita980
$ get-roomba-password <robotIP>
```

or clone the repo and then run the npm script:
** Option 2 **

Clone the repo and then run the npm script:

```bash
$ git clone https://github.com/koalazak/dorita980.git
Expand All @@ -153,13 +159,15 @@ $ npm install
$ npm run getpassword <robotIP>
```

or docker run command:
** Option 3 **

Docker run command:

```
docker run -it node sh -c "npm install -g dorita980 && get-roomba-password <robotIP>"
```

Example Output:
** Example Output **

```
$ npm install -g dorita980
Expand All @@ -183,6 +191,20 @@ Use this credentials in dorita980 lib :)
```

### Troubleshoot - Getting the password

Most common issues getting your password are related with:

- Mobile application is open: You must close iRobot mobile application on your phone. The robot only support ONE connection at time. You will get a connection error if this is the case.
- Other applications are using your robot: Close all your applications or scripts using the robot. Same as frist bullet.
- Network connectivity issues: Make sure your computer can reach your robot: `nc -zv <robot_ip> 8883` if this command fails check your network.
- Slow networks: On some slow networks you need to run the `get-roomba-password` a couple of times until you get it. This is because UDP packages may be lost.
- node.js version: Mostly tested on v10 but also works on v12, v14 and v16. Try using v10.
- Wrong button: It is really common people touching CLEAN button on 980 robots instead of HOME button when prompted. Make sure you are pressing the correct button. Some model (like 675) do not have HOME button and you need to press DOCK+SPOT.
- Make sure your robot is docked on the Home Base and powered on (short press Clean button once to turn it on. But do not start a cleaning session!)
- Robot not configured: Did you configure the Robot for first time with the mobile app? If not, you need to do that first. This process set the actual password.
- Sometimes the robot hangs: Reset the robot pressing Clean for 10 seconds aprox. Wait for restart and try again.

# Auto discover IP address for local request:

If you don't known which IP address to use in `dorita980.Local()` you can use `dorita980.getRobotIP()` to find it.
Expand Down
4 changes: 2 additions & 2 deletions bin/getpassword.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function checkV2 () {
console.log(robotData);
});
const packet = 'f005efcc3b2900';
var client = tls.connect(8883, host, {rejectUnauthorized: false, ciphers: process.env.ROBOT_CIPHERS || 'AES128-SHA256'}, function () {
var client = tls.connect(8883, host, {timeout: 10000, rejectUnauthorized: false, ciphers: process.env.ROBOT_CIPHERS || 'AES128-SHA256'}, function () {
client.write(new Buffer(packet, 'hex'));
});

Expand All @@ -110,7 +110,7 @@ function checkV2 () {
client.setEncoding('utf-8');
}

console.log('Make sure your robot is on the Home Base and powered on (green lights on). Then press and hold the HOME button on your robot until it plays a series of tones (about 2 seconds). Release the button and your robot will flash WIFI light.');
console.log('Make sure your robot is on the Home Base and powered on (green lights on). Then press and hold the HOME button (or DOCK+SPOT on some models) on your robot until it plays a series of tones (about 2 seconds). Release the button and your robot will flash WIFI light.');

if (fversion === '1') {
console.log('Then wait and look here...');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dorita980",
"version": "3.1.8",
"version": "3.1.9",
"description": "Unofficial iRobot Roomba 980 and wifi other enabled series library sdk",
"main": "./index.js",
"directories": {
Expand Down

0 comments on commit f420377

Please sign in to comment.