GithubHelp home page GithubHelp logo

koalazak / dorita980 Goto Github PK

View Code? Open in Web Editor NEW
933.0 65.0 148.0 110 KB

Unofficial iRobot Roomba and Braava (i7/i7+, 980, 960, 900, e5, 690, 675, m6, etc) node.js library (SDK) to control your robot

License: MIT License

JavaScript 100.00%
robot iot roomba irobot 980 api sdk dorita980 firmware cloud-api

dorita980's People

Contributors

bfirsh avatar eher avatar jtscott avatar kavod avatar koalazak avatar mindstorms6 avatar owlbertz avatar rcoletti116 avatar tonybrobston avatar warki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dorita980's Issues

Brand new 690 Firmware ( 3.2.7+26 )

Just picked up a brand new 690 and I’m having a hell of a time getting my Id and password.
Is there any chance for support for newer firmware?

Issue getting password

I have 2 980's, both with the 2.2.5-2 firmware. Attempting to get the password pulls the Robot Data, but I obtain a message: "Error getting password. Follow the instructions and try again."

I've tried multiple times on both Roombas to no avail. Is there something I can do to debug, or obtain the password via alternative means?

roomba 980 firmware 2.0.0-34 ready?

What about this new firmware update?
Does anyone here upgrade their roomba?
I heard that the new firmware no longer listens on port 443.
For now I recommend deny internet access to your roomba to keep v1.6.6 and enjoy dorita980.

Use of const in strict mode

First, nice job on this library. Looks very promising. Here's one issue I ran into that might help others exploring your work. I'm not an expert, but I think this is due to versioning difference in node.js?

hass@sob:~/roomba/dorita980$ node ./bin/getpassword.js "..."

/home/hass/roomba/dorita980/bin/getpassword.js:3
const request = require('request');
^^^^^
SyntaxError: Use of const in strict mode.
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3

Fixed by using the --harmony node.js switch:

hass@sob:~/roomba/dorita980$ node --harmony ./bin/getpassword.js "..."
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. Then wait and look here...
========>
Good job!
Password: *****************
Username/blid: *******************
Use this credentials in dorita980 lib :)

Reset X/Y positions?

Hi,

is there any way how to reset roomba position when docked? Or any API (to set initial x,y position value) ?

Thanks

I can't get the password

When I run: nodejs ./bin/getpassword.js x.x.x.x
I get the following error:
Error getting password. Follow the instructions and try again.
The blid is returned but the password return data is 0.
Do you have any tips?
I have firmware: sw: 'v2.2.5-2',
Thanks

port conflict

I have a port conflict when i get dorita started up.. how can i change the port and restart?

Complete API Support

Here is a list of commands and preferences used in the iRobot Home v2.0.0 android app:

I checked off the ones that are already implemented.

That debug preference looks interesting. 😈

Commands

  • BYE
  • CLEAN
  • DLPKG
  • DOCK
  • FBEEP
  • FIND
  • IPDONE
  • OFF
  • PATCH
  • PAUSE
  • PROVDONE
  • QUICK
  • RECHRG
  • RESET
  • RESUME
  • SLEEP
  • SPOT
  • SPRAY
  • START
  • STARTVIBRATE
  • STOP
  • STOPVIBRATE
  • WAKE
  • WIFISCAN
  • WIPE
  • WLAPOFF
  • WLAPON
  • WLLOGFLUSH
  • WLSTOFF
  • WLSTON

Preferences

  • autoEvacCount
  • autoEvacFlags
  • autoEvacModel
  • bbrun
  • binPause
  • carpetBoost
  • cleanSchedule
  • country
  • debug
  • lastSwUpdate
  • manualUpdate
  • method
  • milestones
  • mission
  • openOnly
  • postalCode
  • preventativeMaintenance
  • regDate
  • robotLanguage
  • robotName
  • robot_status
  • schedHold
  • sku
  • softwareVersion
  • status
  • swUpdateAvailable
  • twoPass
  • tzName
  • value
  • wifiDiagnostics

2 Robots (980) same network

I created a homebridge (homekit) plugin. It works fine for 1 robot at a time. The second robot returns { ok:null } but never starts . Anyone know why this would happen?

Finding username and password suggestion

Hi,
I've just came across your work on the Roomba 980 and have an idea about how to get an additional username / password added. Last night I added a second iphone to my Roomba and this may be the way in for dorita980.
On the new phone, the app finds the Roomba on the normal wifi network and there is a button in the app that says something like "add Roomba" clicking this gives a prompt to press one of the buttons on the Roomba, once this is done the app works presumably with a new username and password. Could this data interchange be emulated so the software asks for a new "app user" from the Roomba device? It would be easier than sniffing the traffic?
Cheers
Kevin

Issue Dorita980 getpassword

Hi,
First of all thanks for this repo.
I am having issues getting my Roomba's information.
I get the following error as per the log

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Users\esteb\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'getpassword',
1 verbose cli '10.0.0.234' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'pregetpassword', 'getpassword', 'postgetpassword' ]
5 info lifecycle [email protected]pregetpassword: [email protected]
6 info lifecycle [email protected]
getpassword: [email protected]
7 verbose lifecycle [email protected]getpassword: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
getpassword: PATH: C:\Users\esteb\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\Users\esteb\dorita980\node_modules.bin;C:\Users\esteb\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\esteb\bin;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Skype\Phone;C:\Users\esteb\AppData\Local\Microsoft\WindowsApps;C:\adb;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\PuTTY;C:\Program Files\Git\cmd;C:\Program Files\nodejs;C:\Users\esteb\AppData\Local\Microsoft\WindowsApps;C:\Users\esteb\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
9 verbose lifecycle [email protected]getpassword: CWD: C:\Users\esteb\dorita980
10 silly lifecycle [email protected]
getpassword: Args: [ '/d /s /c', 'node ./bin/getpassword.js "10.0.0.234"' ]
11 silly lifecycle [email protected]getpassword: Returned: code: 1 signal: null
12 info lifecycle [email protected]
getpassword: Failed to exec getpassword script
13 verbose stack Error: [email protected] getpassword: node ./bin/getpassword.js "10.0.0.234"
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:\Users\esteb\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:280:16)
13 verbose stack at emitTwo (events.js:106:13)
13 verbose stack at EventEmitter.emit (events.js:191:7)
13 verbose stack at ChildProcess. (C:\Users\esteb\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at emitTwo (events.js:106:13)
13 verbose stack at ChildProcess.emit (events.js:191:7)
13 verbose stack at maybeClose (internal/child_process.js:891:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
14 verbose pkgid [email protected]
15 verbose cwd C:\Users\esteb\dorita980
16 verbose Windows_NT 10.0.15063
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\esteb\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "getpassword" "10.0.0.234"
18 verbose node v6.11.2
19 verbose npm v5.4.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] getpassword: node ./bin/getpassword.js "10.0.0.234"
22 error Exit status 1
23 error Failed at the [email protected] getpassword script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Kindly let me know what I a doing wrong and how do I solve it. I am following step by step the readme.

Unable to get password on firmware 2.2.9-1

Hi,

This library is really awesome!

I would like to use it and I was using it several months ago, but now I can't get the password :(

Any suggestion?

Node version: v6.10.3
MacOSX Sierra 10.12.6
Dorita980 version: HEAD@563be001e32dd479fd9caab0462ee77504c57fa4

dorita980$ npm run getpassword 192.168.1.33

> [email protected] getpassword dorita980
> node ./bin/getpassword.js "192.168.1.33"

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.
Then press any key here...
Robot Data:
{ ver: '2',
  hostname: 'Roomba-3114491841613880',
  robotname: 'Moroco',
  ip: '192.168.1.33',
  mac: '74:C6:3B:C7:4D:27',
  sw: 'v2.2.9-1',
  sku: 'R980040',
  nc: 0,
  proto: 'mqtt',
  blid: '3114491841613880' }
Error getting password. Follow the instructions and try again.

can't get password

Hi,
It shows error on getting password, any idea ?
looks like data.length is 0
I m running on ubuntu 16.10 desktop
node -v 4.2.6

Thanks


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.
Then press any key here...
Robot Data:
{ ver: '2',
hostname: 'Roomba-xxxxxxxx',
robotname: 'Roomba980',
ip: '192.168.1.123',
mac: 'xx:xx:xx:xx:xx:xx',
sw: 'v2.0.0-34',
sku: 'R98----',
nc: 0,
proto: 'mqtt',
blid: 'xxxxxxx' }
Error getting password. Follow the instructions and try again.

V2.2.5-2 looks like they broke it again

My Roomba has had its firmware upgraded again and dorita980 seems broken. Also the app seems to only connect via the net now, running node to query it just gives an empty reply, and ports 1883 and 1883 appear closed.
Knew I should have bought a different make with an open APi!!

Port 8883 not opened?

Hi,

I will turn crazy with my update 2.0.0-34.
When I use discovery function, I correctly find my Roomba 980

~/dorita980$ node discover.js 
Looking for robots...
Robot found! with blid/username: 3115800850720780
{ ver: '2',
  hostname: 'Roomba-3115800850720780',
  robotname: 'Roomba',
  ip: '192.168.0.18',
  mac: '74:C6:3B:96:FF:91',
  sw: 'v2.0.0-34',
  sku: 'R980040',
  nc: 1,
  proto: 'mqtt' }
{ ver: '2',
  hostname: 'Roomba-3115800850720780',
  robotname: 'Roomba',
  ip: '192.168.0.18',
  mac: '74:C6:3B:96:FF:91',
  sw: 'v2.0.0-34',
  sku: 'R980040',
  nc: 1,
  proto: 'mqtt' }

But, the getpassword function return me errors even if I follow instructions (and WIFI led is blinking)

~/dorita980$ npm run getpassword 192.168.0.18

> [email protected] getpassword /home/boris/dorita980
> node ./bin/getpassword.js "192.168.0.18"

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.
Then press any key here...
events.js:154
      throw er; // Unhandled 'error' event
      ^

Error: connect ECONNREFUSED 192.168.0.18:8883
    at Object.exports._errnoException (util.js:893:11)
    at exports._exceptionWithHostPort (util.js:916:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1075:14)

npm ERR! Linux 4.4.0-64-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "getpassword" "192.168.0.18"
npm ERR! node v5.12.0
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! [email protected] getpassword: `node ./bin/getpassword.js "192.168.0.18"`
npm ERR! Exit status 1

Actually, I believe that the 8883 port is closed

~/dorita980$ netcat -n -v 192.168.0.18 8883
netcat: connect to 192.168.0.18 port 8883 (tcp) failed: Connection refused

Do I miss something obvious? Any help would be appreciate.

Thank you + Questions

Thank you so much for creating this library. I do have a few questions after getting it running:

  1. Does the getMission local function need to be called once - after the mission or more than once while the robot is cleaning?
  2. Does the getMission local function return an array of values or a single value?
  3. The library does not appear to include the code to generate the cleaning map. Is this something you would be willing to also share?

Thank you again for contributing the library. I very much appreciate it!

Error running getpassword

Let me preface this with I know absolutely nothing about npm or nodejs. I am trying to get my userid and password from my roomba. However I am getting the following error.

pi@hass2:~/code/roomba/dorita980$ npm run getpassword 192.168.2.161
npm ERR! Error: ENOENT, open '/home/pi/code/roomba/dorita980/node_modules/getpassword/package.json'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 4.4.38-v7+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "run" "getpassword" "192.168.2.161"
npm ERR! cwd /home/pi/code/roomba/dorita980
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! path /home/pi/code/roomba/dorita980/node_modules/getpassword/package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pi/code/roomba/dorita980/npm-debug.log
npm ERR! not ok code 0
pi@hass2:~/code/roomba/dorita980$ 

I think I followed the instructions from the readme, but as you can see, it's not getting me anywhere. I tlooked like it was complaiing that the package.json file was not found, so I created the directory structure (node_modules was there, but the password directory under that was not). When I created that structure and put the package.json file that was in the dorita980 directory in there, the app seemed to run, but no output at all. It just came back to the prompt. I did put the robot into what I call discovery mode by pressing the house until it beeped before each attempt. Please help.

App changes for the better and its still working

My app has recently been updated to V2.0.0 and now it has a cleaning map and push notifications. It also connects via the LAN again. Switching to another app on iOS allows Dorita980 to work again too, so the single LAN user restriction remains, although it does allow more than 1 ip address to connect.
Is it worth starting a firmware version thread so we can easily see when things are updated and if it still works? Currently I've blocked it from the internet so iRobot can't break things.
I'm on 2.2.5-2 dated 6th March 2017 with App V2.0.0 dated 14th March 2017, and all seems well

Hello

Just want to ask if somebody here has download the firmware of IROBOT ?

Cloud API firmware 2.x.x

Hi guys,
I have almost everything ready to make the Cloud API possible:

  • cloud discovery
  • cloud aws login
  • suscribe to topics in the cloud to receive state updates
  • make changes in the state to set preferences ( schedule, bust, etc)

But i dont found the correct topic and message content to send basic commands like start or stop.
Anybody sniff that data? or has that data?

My sniff data is weired and malformed, i dont know if my sslsplit is showingme the info in the correct encoding. When I send a command with my phone over the cloud I see some bytes in the comunication but no one string like topic o json message.

can anybody help?

here is the working snippet:

const AWSIoTData = require('aws-iot-device-sdk');
const AWS = require('aws-sdk');
const request = require('request-promise');
// install with: npm install aws-iot-device-sdk aws-sdk request-promise request

const ROBOT_BLID = ''; // same as local api
const ROBOT_PASSWORD = ''; // same as local api
const APP_ID = ''; // like IOS-12345678-1234-1234-1234-123456789098

function cloudDiscovery () {
  var requestOptions = {
    'method': 'GET',
    'uri': `https://disc-prod.iot.irobotapi.com/v1/robot/discover/${ROBOT_BLID}`,
    'json': true
  };
  return request(requestOptions);
}

function cloudLogin () {
  return cloudDiscovery().then(function (discoveryData) {
    var postData = {
      'associations': {
        '0': {
          'robot_id': ROBOT_BLID,
          'deleted': false,
          'password': ROBOT_PASSWORD
        }
      },
      'app_id': APP_ID
    };

    var requestOptions = {
      'method': 'POST',
      'headers': {
        'Content-Type': 'application/json',
        'User-Agent': 'aspen/1.9.1.184.1 CFNetwork/808.2.16 Darwin/16.3.0'
      },
      'uri': `${discoveryData.httpBase}/v1/login`,
      'body': postData,
      'json': true
    };

    return request(requestOptions).then((rawLoginResponse) => {
      return {login: rawLoginResponse.associations['0'], credentials: rawLoginResponse.credentials, discovery: discoveryData};
    });
  });
}

function initMQTT (amazonData) {
  var awsConfiguration = {
    poolId: amazonData.credentials.CognitoId,
    region: amazonData.discovery.awsRegion
  };

  var AWSConfiguration = awsConfiguration;

  var clientId = ROBOT_BLID + '-' + (Math.floor((Math.random() * 100000) + 1));

  AWS.config.region = AWSConfiguration.region;

  AWS.config.credentials = new AWS.CognitoIdentityCredentials({
    IdentityPoolId: AWSConfiguration.poolId
  });

  const mqttClient = AWSIoTData.device({
    region: AWS.config.region,
    clientId: clientId,
    protocol: 'wss',
    maximumReconnectTimeMs: 8000,
    debug: true,
    accessKeyId: amazonData.credentials.AccessKeyId,
    secretKey: amazonData.credentials.SecretKey,
    sessionToken: amazonData.credentials.SessionToken
  });

  mqttClient.on('connect', function (e) {
    console.log('connect!', e);

    mqttClient.subscribe('$aws/things/' + ROBOT_BLID + '/shadow/#'); // all subtopics

    // const cmd = {'state': {'desired': {'cleanSchedule': {'cycle': ['none', 'none', 'none', 'none', 'none', 'none', 'none'], 'h': [17, 10, 10, 12, 10, 13, 17], 'm': [0, 30, 30, 0, 30, 30, 0]}}}};
    // mqttClient.publish('$aws/things/' + ROBOT_BLID + '/shadow/update', JSON.stringify(cmd));
  });

  mqttClient.on('reconnect', function () {
    console.log('reconnect!');
  });

  mqttClient.on('message', function (t, m) {
    console.log('message:');
    console.log('topic:', t);
    console.log(m.toString());
  });

  mqttClient.on('delta', function (m) {
    console.log('delta:');
    console.log(m);
  });
  mqttClient.on('status', function (m) {
    console.log('status:');
    console.log(m);
  });

  mqttClient.on('data', function (m) {
    console.log('data:');
    console.log(m);
  });

  mqttClient.on('error', function (e) {
    console.log('error:');
    console.log(e);
  });

  mqttClient.on('packetreceive', function (m) {
    console.log('packetreceive:');
    console.log(m);
  });
}

cloudLogin().then((credentialData) => {
  console.log(credentialData);
  initMQTT(credentialData);
}).catch(console.log);

new firmware v2.2.5-2

getpassword works, state events and cleaning preferences too.
commands like start/stop/dock doesnt work :/
next week i will try to fix

soundVer: '31'
uiSwVer: '4582'
navSwVer: '01.09.09' >> '01.11.02'
wifiSwVer: '20902' >> '20923'
mobilityVer: '5309' >> '5420'
bootloaderVer: '3580',
umiVer: '5' >> '6'
softwareVer: 'v2.0.0-34' >> 'v2.2.5-2'
svcEndpoints.svcDeplId: 'v005' >> 'v007'

and a new creepy property in the state: mapUploadAllowed: true
disable with: myRobotViaLocal.setPreferences({mapUploadAllowed: false}) :trollface:

Error package.json

I tried today to install and test this package and got the error

npm ERR! path /home/pi/package.json

so i open the npm-debug.log as suggested

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs',
1 verbose cli '/usr/bin/npm',
1 verbose cli 'run',
1 verbose cli 'getpassword',
1 verbose cli '192.168.1.52' ]
2 info using [email protected]
3 info using [email protected]
4 verbose stack Error: ENOENT: no such file or directory, open '/home/pi/packag$
5 verbose cwd /home/pi
6 error Linux 4.4.0-1-rpi2
7 error argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "getpassword" "192.168.1.XXX"
8 error node v7.4.0
9 error npm v4.0.5
10 error path /home/pi/package.json
11 error code ENOENT
12 error errno -2
13 error syscall open
14 error enoent ENOENT: no such file or directory, open '/home/pi/package.json'

Will not return to prompt

Hi,
On my system the examles will stay on a loop. For example:
var myRobotViaLocal = new dorita980.Local('xxxxxxxxxxxxxx', 'yyyyyyyyyyyyyy', '192.168.168.28'); // robot IP address

myRobotViaLocal.on('connect', function () {
myRobotViaLocal.getWeek().then((weekConfig) => {
console.log(weekConfig)
myRobotViaLocal.end(); // disconnect to leave free the channel for the mobile app.
}).catch((err) => {
console.log(err);
});
});

udo@NodeJS:~/iRobot$ node getShedule.js
{ cycle: [ 'none', 'start', 'none', 'start', 'start', 'none', 'start' ],
h: [ 9, 9, 9, 9, 9, 9, 9 ],
m: [ 0, 0, 0, 0, 0, 0, 0 ] }

But I will not get my prompt. I have to press strg+c to get back to console.

Ist this normal?

Im using node v6.9.5 on "Ubuntu 16.04.2 LTS"

Regards

Get password issue...

I have successfully used your excellent utility on one of my Linux boxes several times in the last year.
I have updated nodejs to the latest, and have the latest version of your utility.

When I run the the get password command this is the output...with the BLID obfuscated.
Not sure why it won't work this time...any idea?

Robot Data:
{ ver: '2',
hostname: 'Roomba-30F7012451143700',
robotname: 'Celeste',
ip: '10.0.0.154',
mac: '28:C2:DD:8A:8C:EE',
sw: 'v2.2.11-4',
sku: 'R98----',
nc: 0,
proto: 'mqtt',
blid: 'xxxxxxxxxxxxxxxxxxx' }
Error getting password. Follow the instructions and try again.

Documentation "How to get your username/blid and password" does not match with actual output

When using the getpassword js in order to detect the blid/username and password for my roomba 966, i only get the password.

When taking a look into the code of getpassword.js it only logs the password
function checkV2 () { ... console.log('Password=> ' + new Buffer(data).slice(sliceFrom).toString() + ' <= Yes, all this string.'); console.log('Use this credentials in dorita980 lib :)'); ... }

Since my robot hat the software version 2.0.0-34 i'm trying to use dorita v2.
The v2 local.js file requires me to provide a user aka robot id and the password:

function localV2 (user, password, host, emitIntervalTime) {

Am i missing something important?

Wake from local API?

Is anything available to enable the local API again after the robot has not been used for some time and is presumably sleeping? Wake from cloud API does not seem to work. The official app is able to do it, resulting in the lights turning on and a sound playing.

Upgrade dorita980/robot firmware

I upgraded dorita980 to the latest version, but I don't seem to be able to communicate with the robot anymore. I can find the robot using the discovery method, but when I create a local API instance, the connect event will not fire. However, the offline event will eventually fired, followed by close events that will fire approx once a minute or so.

I thought I may have to update the password due to the firmware upgrade, but when I run the getpassword script and follow it's instructions I only get a "Robot Data: undefined" output and eventually a timeout error.

My Robot is on the firmware v2.0.0-34. Am I doing something wrong?

Problem with 2.0.0-34 firmware version

Hello,
Thank you for a great software for ROOMBA 980. Unfortunately, I have a Roomba sw ver. 2.0.0-34.
Script getpassword don´t work. Can You help me?
Thank You.
Peter
0 info it worked if it ends with ok 1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', 1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', 1 verbose cli 'run', 1 verbose cli 'getpassword', 1 verbose cli '10.0.1.55' ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'pregetpassword', 'getpassword', 'postgetpassword' ] 5 info lifecycle [email protected]~pregetpassword: [email protected] 6 silly lifecycle [email protected]~pregetpassword: no script for pregetpassword, continuing 7 info lifecycle [email protected]~getpassword: [email protected] 8 verbose lifecycle [email protected]~getpassword: unsafe-perm in lifecycle true 9 verbose lifecycle [email protected]~getpassword: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\kolarikp\Dokumenty\dorita980-master\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64;C:\ProgramData\Lenovo\ReadyApps;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\CA\SC\Csam\SockAdapter\bin;C:\WINDOWS\system32\config\systemprofile\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\nodejs\;C:\Users\kolarikp\AppData\Roaming\npm 10 verbose lifecycle [email protected]~getpassword: CWD: C:\Users\kolarikp\Dokumenty\dorita980-master 11 silly lifecycle [email protected]~getpassword: Args: [ '/d /s /c', 'node ./bin/getpassword.js "10.0.1.55"' ] 12 silly lifecycle [email protected]~getpassword: Returned: code: 1 signal: null 13 info lifecycle [email protected]~getpassword: Failed to exec getpassword script 14 verbose stack Error: [email protected] getpassword: node ./bin/getpassword.js "10.0.1.55"14 verbose stack Exit status 1 14 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:279:16) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at EventEmitter.emit (events.js:191:7) 14 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14) 14 verbose stack at emitTwo (events.js:106:13) 14 verbose stack at ChildProcess.emit (events.js:191:7) 14 verbose stack at maybeClose (internal/child_process.js:885:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) 15 verbose pkgid [email protected] 16 verbose cwd C:\Users\kolarikp\Dokumenty\dorita980-master 17 error Windows_NT 6.3.9600 18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "getpassword" "10.0.1.55" 19 error node v7.4.0 20 error npm v4.0.5 21 error code ELIFECYCLE 22 error [email protected] getpassword:node ./bin/getpassword.js "10.0.1.55"22 error Exit status 1 23 error Failed at the [email protected] getpassword script 'node ./bin/getpassword.js "10.0.1.55"'. 23 error Make sure you have the latest version of node.js and npm installed. 23 error If you do, this is most likely a problem with the dorita980 package, 23 error not with npm itself. 23 error Tell the author that this fails on your system: 23 error node ./bin/getpassword.js "10.0.1.55" 23 error You can get information on how to open an issue for this project with: 23 error npm bugs dorita980 23 error Or if that isn't available, you can get their info via: 23 error npm owner ls dorita980 23 error There is likely additional logging output above. 24 verbose exit [ 1, true ]

dorita980/rest980 worked sometimes and now all seems broken

Hi folks,
I bought a 960 yesterday. It is on v2.2.5-2 and yesterday I was able to get my blid/pass via [email protected] without any problems. When using the rest API i realized that even the browser ALWAYS said "OK" the robot only started in about 50% of the cases. But it DID start sometimes.
In the evening I updated node from v6.1.0 to v.6.10.1. Later that day I realized that commands to the Roomba were not working anymore. When sending a command I always got the response that "Safari can't open the page 192.168.xxx.yyy:3000/api/local/action/start because it can't connect to server 192.168.xxx.yyy" even the server definitely is running.

Today I also realized, that the 960 isn't showing the cleaning map on the original Roomba App after cleaning although it did perfectly yesterday on its first attempt.

Today I tried dority980 again to tell me my password and now I get an error that "Failed at the [email protected] getpassword script 'node ./bin/getpassword.js "192.168.xxx.yyy"'."

Is it possible that iRobot again changed something yesterday evening or is it maybe related to my node/npm update? I actually have node 6.10.1 and npm 3.10.10 installed. I also tried to "downgrade to node 6.1.0 again but this did NOT solve any problem ...

I am really confused because presently I do not know where to start searching for the cause ...

Thanks for your support
Mandy

Trying to understand how getpassword works

Hi, I've been using your excellent library, and have ported it to python. I'm now trying to figure out getpassword. Perhaps you could explain how it works (I'm just working on the fw V2 version).

I can get the blid, no problem.
This is the crucial part of the code:

const packet = 'f005efcc3b2900';
  var client = tls.connect(8883, host, {rejectUnauthorized: false}, function () {
    client.write(new Buffer(packet, 'hex'));
  });

  client.on('data', function (data) {
    if (data.length === 2) {
      sliceFrom = 9;
      return;
    }
    if (data.length <= 7) {
      console.log('Error getting password. Follow the instructions and try again.');
    } else {
      console.log('Password=> ' + new Buffer(data).slice(sliceFrom).toString() + ' <= Yes, all this string.');
      console.log('Use this credentials in dorita980 lib :)');
    }

So what I would like to know is where 'f005efcc3b2900' comes from? I'm sending it as hex, and I get back two bytes 'f023' - what are you supposed to get back? is this an error code?

The other mystifying bit is:

if (data.length === 2) {
      sliceFrom = 9;

How can you slice from 9 if the data length is 2? Anyway, I'm assuming I should get more back than this, maybe I'm sending the "magic packet' incorrectly, and I'm getting an error code back.

Any tips or suggestions would be welcomed.

Error with getpassword

Hi,

This week I've been having issue connecting to my Roomba through Homebridge. In the Home app, it says "No Response".

When I tried to run getpassword to get information from Roomba, I got the following error - I could get all information except the password. This was working before with the same Roomba with the same firmware. Any idea anybody???

Error log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'getpassword',
1 verbose cli '192.168.1.4' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'pregetpassword', 'getpassword', 'postgetpassword' ]
5 info pregetpassword [email protected]
6 info getpassword [email protected]
7 verbose unsafe-perm in lifecycle true
8 info [email protected] Failed to exec getpassword script
9 verbose stack Error: [email protected] getpassword: node ./bin/getpassword.js "192.168.1.4"
9 verbose stack Exit status 1
9 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:217:16)
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at EventEmitter.emit (events.js:172:7)
9 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
9 verbose stack at emitTwo (events.js:87:13)
9 verbose stack at ChildProcess.emit (events.js:172:7)
9 verbose stack at maybeClose (internal/child_process.js:827:16)
9 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
10 verbose pkgid [email protected]
11 verbose cwd /Users/Fong/Desktop/dorita980
12 error Darwin 16.6.0
13 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "getpassword" "192.168.1.4"
14 error node v4.4.7
15 error npm v2.15.8
16 error code ELIFECYCLE
17 error [email protected] getpassword: node ./bin/getpassword.js "192.168.1.4"
17 error Exit status 1
18 error Failed at the [email protected] getpassword script 'node ./bin/getpassword.js "192.168.1.4"'.
18 error This is most likely a problem with the dorita980 package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error node ./bin/getpassword.js "192.168.1.4"
18 error You can get information on how to open an issue for this project with:
18 error npm bugs dorita980
18 error Or if that isn't available, you can get their info via:
18 error
18 error npm owner ls dorita980
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

Error: connect ECONNREFUSED

I am running the getpassword script and getting the following error. See below for version numbers and complete script output. As you can see from the script output, some information has been gathered from the Roomba, while it encountered an error before it was able to read the password. I have Roomba 980.

Error: connect ECONNREFUSED 192.168.1.241:8883
at Object.exports._errnoException (util.js:1022:11)
at exports._exceptionWithHostPort (util.js:1045:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14)

Here are the version numbers:

C:\temp\dorita980-master>node -v
v6.9.5

C:\temp\dorita980-master>npm -v
3.10.10

Here's the output of the script:

C:\temp\dorita980-master>npm run getpassword 192.168.1.241

[email protected] getpassword C:\temp\dorita980-master
node ./bin/getpassword.js "192.168.1.241"

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.
Then press any key here...
Looking for robots...
Robot found! with blid/username: 3117050062127620
{ ver: '2',
hostname: 'Roomba-3117050062127620',
robotname: 'Roomba 1',
ip: '192.168.1.241',
mac: 'F0:03:8C:1E:32:AF',
sw: 'v1.6.4',
sku: 'R980020',
nc: 0,
proto: 'http' }
events.js:160
throw er; // Unhandled 'error' event
^

Error: connect ECONNREFUSED 192.168.1.241:8883
at Object.exports._errnoException (util.js:1022:11)
at exports._exceptionWithHostPort (util.js:1045:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14)

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "getpassword" "192.168.1.241"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] getpassword: node ./bin/getpassword.js "192.168.1.241"
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] getpassword script 'node ./bin/getpassword.js "192.168.1.241"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the dorita980 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./bin/getpassword.js "192.168.1.241"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs dorita980
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls dorita980
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\temp\dorita980-master\npm-debug.log

C:\temp\dorita980-master>

OK, I have update my json to 3.0.0 and then NPM update but no go

I created a myapp.js and filled it with: what it shows on your main page in github.
when I run ./myapp.json it complains about the first line where it include the dorita980 library?

Where do I put the myapp.js?
I did put my BLID and password which worked in my pre-2.0 firmware with you previous versions?

No blid/username output!?

In the README.dm it stats that running
$ npm run getpassword <robotIP>
one gets that blid/username:

Looking for robots...
Robot found! with blid/username: xxxxxxxxxxxxx

However in the output I've got the blid/username line is missing:

Maresia:dorita980 rmnm$ npm run getpassword 192.168.1.66

[email protected] getpassword /Users/someUser/dorita980
node ./bin/getpassword.js "192.168.1.66"

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.
Then press any key here...
Robot Data:
{ ver: '2',
hostname: 'Roomba-6943C91C12422640',
robotname: 'Raft',
ip: '192.168.1.66',
mac: '80:A5:89:60:D8:48',
sw: 'v2.0.0-34',
sku: 'R98----',
nc: 0,
proto: 'mqtt',
blid: '6943C91C12422640' }
Password=> **************** <= Yes, all this string.
Use this credentials in dorita980 lib :)

Looking to dorita980.getRobotIP() maybe I can get hold of the blid/username, is that right?

Unable to get the password

I have read the similar issues listed here. but I don't understand how to fix this issue. I have followed the steps exactly (cloned the repo, cd to dorita980, npm install, npm run getpasswd 192.168.100.181).

I get the same output as issue #19 (which doe not give a solution by the way). Nodejs version is 0.10.25. Roomba version is 2.2.5-2. Output is:

`nick@proliant:~/Scripts/roomba/dorita980$ npm run getpasswd 192.168.100.181
npm ERR! Error: ENOENT, open '/home/nick/Scripts/roomba/dorita980/node_modules/getpasswd/package.json'
npm ERR! If you need help, you may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! [email protected]

npm ERR! System Linux 4.4.0-72-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "run" "getpasswd" "192.168.100.181"
npm ERR! cwd /home/nick/Scripts/roomba/dorita980
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.3.10
npm ERR! path /home/nick/Scripts/roomba/dorita980/node_modules/getpasswd/package.json
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/nick/Scripts/roomba/dorita980/npm-debug.log
npm ERR! not ok code 0
`
What am I doing wrong? it must be something simple for those nodejs experts out there, but I'm a python/c person, so I don't know what I'm missing.

Thanks for any help...

Wrong Battery Type detected

Hi All,
First of all sorry post this as an issue, but I don`t know who can help me.
I have some troubles with my battery charge. Some times take more than 20 hours to do a full charge.

Using Dorita980 api, I discovered that the Roomba detecteded my battery type as a "nimh" not "lith" as expected.

Anyone know how to correct this?
And if this wrong battery type detection may be causing this long charge time issue?

At google I do not find anything, and I bought my Roomba 980 in USA and brought to Brazil, witch according manual, avoids warranty. So I don`t know what to do.

roomba

Including the Express framework to make a REST interface

Hello,

(first of all, sorry if this is not the way to communicate but I couldn't find a way to create feature request or stat a dicussion)

Dorita980 is great! but it is hard to integrate for a lot of domotic frameworks, why? Because you MUST have the node.js environment available on your domotic platform and able to control it (execute the functions).

It would be much easier and better when this had a REST interface. In that case you can even run it 'as a server' on your Synology, which has node.js implemented as a package.

If it's a rest interface, you can easily call something like: "http://my-synology:3000/dorita980?action=do_start"

Via the express framework it's easy to create the route's (all the functions).
A static download path for the image: "http://my-synology:3000/dorita980/image.gif or svg" is perfect for domotics, you can then show the actual image on your visualisation/touchscreens. (almost every domotica solution has a way to update/reload an image every x seconds).

Can we start a discussion on how to implement this, what is the best way...etc.?

(for people not familiar with the Express framework, check this: http://blog.modulus.io/nodejs-and-express-create-rest-api )

getPassword problems

I'm having problems getting the password.

When I followed the instructions (using nodejs 7.4 - there are runtime errors using 7.5) I get...


$ npm run getpassword 10.0.0.210

> [email protected] getpassword C:\dorita980
> node ./bin/getpassword.js "10.0.0.210"

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.
Then press any key here...

Looking for robots...
Robot found! with blid/username: XXXXXXXXXX
{ ver: '2',
  hostname: 'Roomba-XXXXXXXXXX',
  robotname: 'Bob',
  ip: '10.0.0.210',
  mac: '11:22:33:44:55:66',
  sw: 'v2.0.0-34',
  sku: 'R980000',
  nc: 0,
  proto: 'mqtt' }
data=> 00000000: efbf bd05                                o?=.
 <=
Error getting password. Follow the instructions and try again.

I added the "data=>" bit - it's hexy dumping the packet that came back.

Any ideas?

Control movement?

Hi!
Is it possible to control the movement of the Roomba? Turn left, move forward, etc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.