Code Monkey home page Code Monkey logo

dorita980's Introduction

dorita980

npm version

Unofficial iRobot Roomba (i7/i7+, 980, 960, e5, 690, 675, etc) node.js library (SDK).

With this library you can send commands to your wifi enabled Roomba through the iRobot cloud API or directly from your LAN and integrate your roboot with your own Home Automation or IoT project.

See rest980 if you need a HTTP REST API interface.

Advice

If you enjoy dorita980 and it works nice for you, I recommend blocking the internet access to your robot to avoid the OTA firmware updates. New firmware changes can cause dorita980 to stop working. Blocking firmware updates can be performed using the parental control options on your router.

When a new firmware is published, you can come here to verify if dorita980 is still compatible. Once dorita980 is compatible you can temporarily enable internet access for your robot to get the firmware upgrade.

If you have firmware version 1.6.x click here to see the old documentation.

Check your robot version!

Features

  • Compatible robots: all 600, 800, 900, e5 and i7/i7+ series with HOME app and Braava m6.
  • Get your username/password easily.
  • Auto discovery robot IP (optional).
  • Local API control (from your LAN).
  • Simplified Cleaning Preferences settings.
  • Firmware 1.6.x compatible.
  • Firmware 2.x.x compatible (latest serie 900 uses firmware v2, not v3).
  • Firmware 3.2.x compatible (latest serie 800 uses firmware v3).
  • See 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

Video: Realtime cleaning map using dorita980 lib in rest980.

Supported Features by Firmware Version

1.6.x Local 1.6.x Cloud 2.x.x Local 2.x.x Cloud 3.x.x Local
Clean/Start/Stop/Pause/Dock/Resume/CleanRoom/Find yes yes yes pending yes
Get Preferences yes yes yes pending yes
Set Preferences yes yes yes pending yes
Get x,y,d Position yes yes yes pending -
Get Mission yes yes yes pending yes
Get Mission number no no yes pending yes
Get General Info yes yes yes pending yes
Get Schedule yes yes yes pending yes
Set Schedule yes yes yes pending yes
Set CarpetBoost (performance, eco, auto) yes yes yes pending -
Set Edge Clean yes yes yes pending -
Set Cleaning Passes (auto, on, two) yes yes yes pending -
set Always Finish yes yes yes pending -
MQTT Custom events - - yes pending yes
HTTP API yes yes - - -
Discovery Robot IP yes - yes - yes
Get BLID and Password yes - yes - yes
Support multiples clients at the same time yes yes no pending no

Note: some new firmwares are not reporting robot position ('pose' property) to local env.

Install

First you need node.js installed and then:

$ npm install dorita980 --save

Quick start via Local request on your LAN

You can control the robot from your local network.

Create myapp.js file with this content:

var dorita980 = require('dorita980');

var myRobotViaLocal = new dorita980.Local('MyUsernameBlid', 'MyPassword', '192.168.1.104'); // robot IP address

myRobotViaLocal.on('connect', init);

function init () {
  myRobotViaLocal.clean()
  .then(() => myRobotViaLocal.end()) // disconnect to leave free the channel for the mobile app.
  .catch(console.log);
}

Then install dorita980 using npm and run your program:

$ npm install dorita980 --save
$ node myapp.js

Examples

Pause the robot via Local request:

var dorita980 = require('dorita980');

var myRobotViaLocal = new dorita980.Local('MyUsernameBlid', 'MyPassword', '192.168.1.104'); // robot IP address 

myRobotViaLocal.on('connect', init);

function init () {
  myRobotViaLocal.pause()
  .then(() => myRobotViaLocal.end()) // disconnect to leave free the channel for the mobile app.
  .catch(console.log);
}

Get robot week schedule

var dorita980 = require('dorita980');

var myRobotViaLocal = new dorita980.Local('MyUsernameBlid', 'MyPassword', '192.168.1.104'); // robot IP address 

myRobotViaLocal.on('connect', init);

function init () {
  myRobotViaLocal.getWeek()
  .then((weekConfig) => {
    console.log(weekConfig)
    myRobotViaLocal.end()
  })
  .catch(console.log);
}

How to get your username/blid and password

(Needed for Cloud and Local requests)

You need your iRobot account credentials (username and password).

** Option 1 **

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

$ npm install -g dorita980
$ get-roomba-password-cloud <iRobot Username> <iRobot Password> [Optional API-Key]

** Option 2 **

Clone the repo and then run the npm script:

$ git clone https://github.com/koalazak/dorita980.git
$ cd dorita980
$ npm install
$ npm run get-password-cloud <iRobot Username> <iRobot Password> [Optional API-Key]

** Option 3 **

Docker run command:

docker run -it node sh -c "npm install -g dorita980 && get-roomba-password-cloud <iRobot Username> <iRobot Password> [Optional API-Key]"

** Example Output **

$ npm install -g dorita980
$ get-roomba-password-cloud [email protected] myeasypassword
Found 1 robot(s)!
Robot "Dorita" (sku: R98---- SoftwareVer: v2.4.16-126):
BLID=> xxxxxxxxxxxxx
Password=> :1:1486937829:gktkDoYpWaDxCfGh <= Yes, all this string.

Use this credentials in dorita980 lib :)
Show old firmwares method (local call)

This method stop working for latest firmwares. If you have problems using this method please use the cloud method.

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.

** Local Option 1 **

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

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

** Local Option 2 **

Clone the repo and then run the npm script:

$ git clone https://github.com/koalazak/dorita980.git
$ cd dorita980
$ npm install
$ npm run getpassword <robotIP>

** Local Option 3 **

Docker run command:

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

** Example Output in local method **

$ npm install -g dorita980
$ get-roomba-password 192.168.1.103

Make sure your robot is on the Home Base and powered 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...
{ 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',
  blid: 'xxxxxxxxxxxxx' <---- username/blid
}
Password=> :1:1486937829:gktkDoYpWaDxCfGh <= Yes, all this string.
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 using local method: 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. This process takes 1-2 seconds, so if you know the IP you can just use it explicity.

You need UDP brodcast enable in your network!

var dorita980 = require('dorita980');

dorita980.getRobotIP((ierr, ip) => {
  if (ierr) return console.log('error looking for robot IP');

  var myRobotViaLocal = new dorita980.Local('MyUsernameBlid', 'MyPassword', ip);

  myRobotViaLocal.getMission()
  .then((mission) => {
    console.log(mission);
  }).catch((err) => {
    console.log(err);
  });
});

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

You need UDP brodcast enabled in your network!

var dorita980 = require('dorita980');

dorita980.discovery((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 directly over wifi to your robot. You dont need an internet connection.

Methods

end()

Close the connection to the robot. It's important if you want to send commands via the official mobile app via Local network. There's a maximum of 1 connection at any time in local network, so if your app is connected, the official mobile app only works via cloud access.

While dorita980 is connected, you can call other methods to send commands and listen for the events to get data. Just call the .end() method if you want. While dorita980 is connected, the official mobile app will only work via the cloud to send commands to your robot.

getRobotState(Array waitForFields)

Get the robot state but wait for the waitForFields fields before return.

The state object starts empty and the robot will add data over time.

myRobotViaLocal.getRobotState(['batPct', 'bbchg3']).then((actualState) => {
  console.log(actualState);
});

Full state should contain:

{ netinfo:
   { dhcp: true,
     addr: 4294967040,
     mask: 4294967040,
     gw: 4294967040,
     dns1: 4294967040,
     dns2: 0,
     bssid: '12:12:12:12:12:12',
     sec: 4 },
  wifistat: { wifi: 1, uap: false, cloud: 4 },
  wlcfg: { sec: 7, ssid: '123123123123123123123123' },
  mac: '34:34:34:34:34:34',
  country: 'US',
  cloudEnv: 'prod',
  svcEndpoints: { svcDeplId: 'v005' },
  localtimeoffset: -180,
  utctime: 1487103319,
  pose: { theta: 61, point: { x: 171, y: -113 } },
  batPct: 100,
  dock: { known: true },
  bin: { present: true, full: false },
  audio: { active: false },
  cleanMissionStatus:
   { cycle: 'none',
     phase: 'charge',
     expireM: 0,
     rechrgM: 0,
     error: 0,
     notReady: 0,
     mssnM: 2,
     sqft: 29,
     initiator: 'manual',
     nMssn: 324 },
  language: 2,
  noAutoPasses: false,
  noPP: false,
  ecoCharge: false,
  vacHigh: false,
  binPause: false,
  carpetBoost: true,
  openOnly: false,
  twoPass: false,
  schedHold: false,
  lastCommand: { command: 'dock', time: 1487103424, initiator: 'manual' },
  langs:
   [ { 'en-US': 0 },
     { 'fr-FR': 1 },
     { 'es-ES': 2 },
     { 'de-DE': 3 },
     { 'it-IT': 4 } ],
  bbnav: { aMtrack: 45, nGoodLmrks: 15, aGain: 12, aExpo: 9 },
  bbpanic: { panics: [ 8, 8, 8, 14, 8 ] },
  bbpause: { pauses: [ 15, 0, 0, 0, 0, 0, 0, 0, 0, 17 ] },
  bbmssn:
   { nMssn: 323,
     nMssnOk: 218,
     nMssnC: 99,
     nMssnF: 1,
     aMssnM: 35,
     aCycleM: 31 },
  bbrstinfo: { nNavRst: 41, nMobRst: 0, causes: '0000' },
  cap: { pose: 1, ota: 2, multiPass: 2, carpetBoost: 1 },
  sku: 'R98----',
  batteryType: 'lith',
  soundVer: '31',
  uiSwVer: '4582',
  navSwVer: '01.09.09',
  wifiSwVer: '20902',
  mobilityVer: '5309',
  bootloaderVer: '3580',
  umiVer: '5',
  softwareVer: 'v2.0.0-34',
  tz:
   { events: [ { dt: 0, off: -180 }, { dt: 0, off: -180 }, { dt: 0, off: 0 } ],
     ver: 2 },
  timezone: 'America/Buenos_Aires',
  name: 'robotNAme',
  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 ] },
  bbchg3:
   { avgMin: 158,
     hOnDock: 6110,
     nAvail: 1280,
     estCap: 12311,
     nLithChrg: 233,
     nNimhChrg: 0,
     nDocks: 98 },
  bbchg: { nChgOk: 226, nLithF: 0, aborts: [ 4, 4, 4 ] },
  bbswitch: { nBumper: 55889, nClean: 300, nSpot: 47, nDock: 98, nDrops: 300 },
  bbrun:
   { hr: 211,
     min: 48,
     sqft: 566,
     nStuck: 17,
     nScrubs: 85,
     nPicks: 592,
     nPanics: 178,
     nCliffsF: 1532,
     nCliffsR: 2224,
     nMBStll: 0,
     nWStll: 1,
     nCBump: 0 },
  bbsys: { hr: 6522, min: 54 },
  signal: { rssi: -43, snr: 40 } }

getPreferences()

Get the full robot state but wait for the ['cleanMissionStatus', 'cleanSchedule', 'name', 'vacHigh', 'pose'] fields before returning.

Alias for getRobotState(['cleanMissionStatus', 'cleanSchedule', 'name', 'vacHigh', 'pose', 'signal'])

Waits for the 'signal' to make sure we have the full state object.

Use getRobotState(['cleanMissionStatus', 'cleanSchedule', 'name', 'vacHigh', 'signal']) without pose in models without navigation like E6 models.

setPreferences(newPreferences)

Partially overwrites the robot state to configure it.

var newPreferences = { 
 binPause: false
};

myRobotViaLocal.setPreferences(newPreferences)

Response:

{"ok":null}

getMission()

With this you can draw a map :) in models with position reporting. Use getBasicMission() in robots without position reporting feature like E5 models.

{ cleanMissionStatus:
   { cycle: 'none',
     phase: 'charge',
     expireM: 0,
     rechrgM: 0,
     error: 0,
     notReady: 0,
     mssnM: 15,
     sqft: 0,
     initiator: 'localApp',
     nMssn: 323 },
  pose: { theta: -160, point: { x: 166, y: -11 } } }

getBasicMission()

Same as getMission but don't wait for pose information

{ cleanMissionStatus:
   { cycle: 'none',
     phase: 'charge',
     expireM: 0,
     rechrgM: 0,
     error: 0,
     notReady: 0,
     mssnM: 15,
     sqft: 0,
     initiator: 'localApp',
     nMssn: 323 }}

getWirelessStatus()

{ wifistat: { wifi: 1, uap: false, cloud: 4 },
  netinfo:
   { dhcp: true,
     addr: 3232235880,
     mask: 4294967040,
     gw: 3232235777,
     dns1: 3232235777,
     dns2: 0,
     bssid: 'c0:56:27:70:3b:fe',
     sec: 4 } }

getTime()

1487100141

getBbrun()

 { hr: 211,
   min: 48,
   sqft: 566,
   nStuck: 17,
   nScrubs: 85,
   nPicks: 592,
   nPanics: 178,
   nCliffsF: 1532,
   nCliffsR: 2224,
   nMBStll: 0,
   nWStll: 1,
   nCBump: 0 }

getLangs()

 [ { 'en-US': 0 },
   { 'fr-FR': 1 },
   { 'es-ES': 2 },
   { 'de-DE': 3 },
   { 'it-IT': 4 } ]

getSys()

{ bbrstinfo: { nNavRst: 41, nMobRst: 0, causes: '0000' },
  cap: { pose: 1, ota: 2, multiPass: 2, carpetBoost: 1 },
  sku: 'R98----',
  batteryType: 'lith',
  soundVer: '31',
  uiSwVer: '4582',
  navSwVer: '01.09.09',
  wifiSwVer: '20902',
  mobilityVer: '5309',
  bootloaderVer: '3580',
  umiVer: '5',
  softwareVer: 'v2.0.0-34',
  audio: { active: false },
  bin: { present: true, full: false } }

getWirelessLastStatus()

{ wifi: 1, uap: false, cloud: 4 },
  wlcfg: { sec: 7, ssid: '1234567890796857336364' }

getWeek()

Disable Monday and start every day at 10:30am

{ cycle: [ 'none', 'none', 'none', 'none', 'none', 'none', 'none' ],
  h: [ 17, 10, 10, 12, 10, 13, 17 ],
  m: [ 0, 30, 30, 0, 30, 30, 0 ] }

setWeek(newWeek)

Disable Sunday and start every day at 10:30am

var newWeek = {"cycle":["none","start","start","start","start","start","start"],"h":[10,10,10,10,10,10,10],"m":[30,30,30,30,30,30,30]}
myRobotViaLocal.setWeek(newWeek)

Response:

{"ok":null}

getCloudConfig()

prod

start()

{"ok":null}

clean()

{"ok":null}

cleanRoom(args)

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

const args = {
  "pmap_id": "ABCDEFG123456FGKS789",
  "regions": [
    { "region_id": "5", "region_name": "Hallway", "region_type": "hallway", "type": "rid"}
  ],
  "user_pmapv_id": "190917T20125Z"
};

myRobotViaLocal.cleanRoom(args);
{"ok":null}

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.

cleanRoom(args) for multiple rooms

By adding more regions to the regions array, a set of rooms will be cleaned. At least from firmware Version 3.8.3 you can set the desired order, when cleaning multiple rooms by adding ordered = 1:

const args = {
  "ordered": 1,
  "pmap_id": "ABCDEFG123456FGKS789",
  "regions": [
    { "region_id": "5", "region_name": "Hallway", "region_type": "hallway", "type": "rid"},
    { "region_id": "0", "region_name": "living room", "region_type": "familiy room", "type": "rid"},
    { "region_id": "1", "region_name": "kitchen", "region_type": "kitchen", "type": "rid"}
  ],
  "user_pmapv_id": "190917T20125Z"
};

myRobotViaLocal.cleanRoom(args);
{"ok":null}

pause()

{"ok":null}

stop()

{"ok":null}

resume()

{"ok":null}

dock()

Note: before dock you need to pause() or stop() your robot.

{"ok":null}

find()

Note: sends locate request. If the robot is on dock nothing will happen, otherwise it will beep.

{"ok":null}

Simplifications to set Cleaning Preferences:

This methods use setPreferences() with the correct flags for each setting.

setCarpetBoostAuto()

{"ok":null}

setCarpetBoostPerformance()

setCarpetBoostEco()

setEdgeCleanOn()

setEdgeCleanOff()

setCleaningPassesAuto()

setCleaningPassesOne()

setCleaningPassesTwo()

setAlwaysFinishOn()

setAlwaysFinishOff()

publish(topic, rawJsonMessageAsString, callback)

Just to experiment with raw commands using the MQTT client. Known topics are cmd and delta. But Experiment with other topics and message formats!

The delta commands tipicaly have the following json format:

{'state': newState}

The cmd commands tipicaly have the following json format:

{'command': command, time: Date.now() / 1000 | 0, initiator: 'localApp'};

For example to send a clean command:

let myCommand = {command: 'clean', time: Date.now() / 1000 | 0, initiator: 'localApp'};

myRobotViaLocal.publish('cmd', JSON.stringify(myCommand), function(e) {
  if(e) console.log('error', e);
});

Dont forget stringify the json message with JSON.stringify(rawJsonMessageAsString).

You can see undocument commands and preferences in this thread

Events

connect event

Emitted on successful Connection.

function () {}

Put your code inside this callback.

close event

Emitted after a disconnection.

offline event

Emitted when the client goes offline.

update event

Emitted every time the Robot publishes a new message to the mqtt bus.

function (data) {}

  • data Data published by the Robot
myRobotViaLocal.on('update', function (data) {
 console.log(data);
});

Will print:

{ state:
   { reported:
      { soundVer: '31',
        uiSwVer: '4582',
        navSwVer: '01.09.09',
        wifiSwVer: '20902',
        mobilityVer: '5309',
        bootloaderVer: '3580',
        umiVer: '5',
        softwareVer: 'v2.0.0-34' } } }

mission event

Emitted every emitIntervalTime milliseconds with the mission data. (util for mapping in models with position reporting)

function (data) {}

  • data Mission data with cleanMissionStatus and pose state properties.
var cleanMissionStatus = 300; // default is 800ms
var myRobotViaLocal = new dorita980.Local('MyUsernameBlid', 'MyPassword', '192.168.1.104', 2, cleanMissionStatus); // Note Firmware version.

myRobotViaLocal.on('mission', function (data) {
  console.log(data);
});

Will print each 300ms:

{ cleanMissionStatus:
   { cycle: 'none',
     phase: 'charge',
     expireM: 0,
     rechrgM: 0,
     error: 0,
     notReady: 0,
     mssnM: 15,
     sqft: 0,
     initiator: 'localApp',
     nMssn: 323 },
  pose: { theta: -160, point: { x: 166, y: -11 } } }

state event

Emitted every time the Robot publish a new message to the mqtt bus.

function (data) {}

  • data Full robot state object
myRobotViaLocal.on('state', function (data) {
 console.log(data);
});

Will print the Full robot state!

Note for node.js v0.10 users

dorita980 is compatible with node.js > 4.0 But you can use the getpassword feature in node.js < 4.0 using --harmony flag like that:

$ node --harmony ./bin/getpassword.js "192.168.1.104"

Custom tls cipher

You can set ROBOT_CIPHERS environment variable to overwrite the cipher suit used in tls connection to the robot. Default is AES128-SHA256

$ ROBOT_CIPHERS=AES128-SHA node myscript.js

Cloud API

Not implemented yet in Firmware 2.0.0. Help wanted!

Donations

If you'd like to help dorita980 stay updated and support new robots and firmwares please consider making a donation to help me purchase the latest robots.

Method Wallet
Bitcoin bc1qepwdmdk25yxa39g9kerzw9m5y7nxztwkmcu3aa
Etherum 0x7EcE75b4fc6A2109850a106b58Dcf750C6B0CdE3
OpenColective opencollective
Paypal [email protected]
Others Ask me

Thank you very much for your support!

Author

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

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.

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.

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.

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.

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.

port conflict

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

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 )

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?

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?

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 ]

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?

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!

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

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...

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?

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!!

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

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?

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

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);

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'

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.

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.

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.

Hello

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

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

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>

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

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?

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 ]

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.

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?

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

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 :)

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

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

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:

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.