homebridge-roomba2 icon indicating copy to clipboard operation
homebridge-roomba2 copied to clipboard

Unable to get BLID and password on j7

Open mpreissner opened this issue 3 years ago • 35 comments

Following all instructions, get the following when using the getrobotpwd:

events.js:352 throw er; // Unhandled 'error' event ^

Error: Client network socket disconnected before secure TLS connection was established at connResetException (internal/errors.js:628:14) at TLSSocket.onConnectEnd (_tls_wrap.js:1561:19) at TLSSocket.emit (events.js:387:35) at endReadableNT (internal/streams/readable.js:1317:12) at processTicksAndRejections (internal/process/task_queues.js:82:21) Emitted 'error' event on TLSSocket instance at: at emitErrorNT (internal/streams/destroy.js:106:8) at emitErrorCloseNT (internal/streams/destroy.js:74:3) at processTicksAndRejections (internal/process/task_queues.js:82:21) { code: 'ECONNRESET', path: undefined, host: '10.100.10.17', port: 8883, localAddress: undefined } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] getrobotpwd: cd node_modules/dorita980 && npm install && node ./bin/getpassword.js "10.100.10.17" npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] getrobotpwd script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-10-14T16_10_01_846Z-debug.log

I tried using the workaround described in https://github.com/karlvr/homebridge-roomba2/issues/8, but that didn't work either. I've confirmed that none of my mobile devices are logged into the iRobot app, disabled the roomba2 plugin in hombridge, rebooted the roomba, still can't get it to work.

Using the workaround with the produces the following:

root@homebridge:~/Roomba980-Python/roomba# python3 getpassword.py 2021-10-14 09:21:14 INFO [Roomba.Password] Using Password version 2.0a 2021-10-14 09:21:14 INFO [Roomba.Password] reading/writing info from config file ./config.ini 2021-10-14 09:21:14 INFO [Roomba.Password] waiting on port: 5678 for data 2021-10-14 09:21:14 INFO [Roomba.Password] Robot at IP: 10.100.10.17 Data: { "ver": "4", "hostname": "iRobot-1151264EEC834223B9F20FED66463386", "robotname": "Roomba", "robotid": "1151264EEC834223B9F20FED66463386", "ip": "10.100.10.17", "mac": "50:14:79:B1:E4:55", "sw": "sapphire+1.0.17+Firmware-Production+52", "sku": "j755020", "nc": 0, "proto": "mqtt", "cap": { "binFullDetect": 2, "dockComm": 1, "edge": 0, "maps": 3, "pmaps": 5, "tLine": 2, "area": 1, "eco": 1, "multiPass": 2, "pose": 1, "team": 1, "pp": 0, "lang": 2, "5ghz": 1, "prov": 3, "sched": 1, "svcConf": 1, "ota": 2, "log": 2, "langOta": 0, "expectingUserConf": 1 }, "cloudConnState": 10 } 2021-10-14 09:21:25 INFO [Roomba.Password] 0 robot(s) already defined in file./config.ini, found 1 robot(s) on network 2021-10-14 09:21:25 INFO [Roomba.Password] To add/update Your robot details,make sure your robot (Roomba) at IP 10.100.10.17 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. Press <Enter> to continue... s<Enter> to skip configuring this robot: 2021-10-14 09:21:31 INFO [Roomba.Password] Roomba (Roomba) IP address is: 10.100.10.17 2021-10-14 09:21:31 DEBUG [Roomba.Password] Connection Successful 2021-10-14 09:21:31 DEBUG [Roomba.Password] Waiting for data 2021-10-14 09:21:41 ERROR [Roomba.Password] Connection Timeout Error (for 10.100.10.17): The read operation timed out 2021-10-14 09:21:41 ERROR [Roomba.Password] Unable to get password from roomba 2021-10-14 09:21:41 ERROR [Roomba.Password] Error getting password for robot Roomba at ip10.100.10.17, received 7 bytes. Follow the instructions and try again.

mpreissner avatar Oct 14 '21 16:10 mpreissner

@mpreissner I was having the same issue with an i4 I just purchased, but finally after playing with it for a few hours I finally got it.

  1. Reboot the Roomba through the app.
  2. Go to Account Setting in the iRobot app and Log out of all devices.
  3. Open terminal in Homebridge, Follow the Command Line steps to switch to the proper directory
  4. In the roomba2 dir run command "npm fund"
  5. Run the get password command
  6. At The prompt to press the button, Don't press any button on the Roomba, instead just press a button to continue.
  7. At this point all of the info will generate, except you will get an error for the password.
  8. Repeat the get password command
  9. At the prompt to press a button, press and hold ONLY the HOME button for a few seconds and hit a button on the keyboard.

If done correctly you should get a prompt from the Roomba that it was setup successfully, and the terminal window will have all of the info and the password.

the1maximus avatar Oct 15 '21 00:10 the1maximus

Unfortunately, that didn't do the trick. First, as I understand it, npm fund only lists packages where the developers are seeking funding to support their work. This has nothing to do with dependency installation. In any case, npm fund gives me this:

`root@homebridge:/usr/local/lib/node_modules/homebridge-roomba2# npm fund [email protected] ├─┬ https://github.com/sponsors/isaacs │ └── [email protected] ├─┬ https://github.com/sponsors/epoberezkin │ └── [email protected] ├─┬ https://github.com/sponsors/ljharb │ └── [email protected] ├─┬ https://github.com/sponsors/feross │ └── [email protected], [email protected] ├─┬ https://www.patreon.com/feross │ └── [email protected], [email protected] └─┬ https://feross.org/support └── [email protected], [email protected]

╭───────────────────────────────────────────────────────────────╮ │ │ │ New major version of npm available! 6.14.13 → 8.1.0 │ │ Changelog: https://github.com/npm/cli/releases/tag/v8.1.0 │ │ Run npm install -g npm to update! │ │ │ ╰───────────────────────────────────────────────────────────────╯

` and both times I run the getrobotpwd command, I get this (same output the first with no button press and second with button press):

`root@homebridge:/usr/local/lib/node_modules/homebridge-roomba2# npm run getrobotpwd 10.100.10.17

[email protected] getrobotpwd /usr/local/lib/node_modules/homebridge-roomba2 cd node_modules/dorita980 && npm install && node ./bin/getpassword.js "10.100.10.17"

npm WARN [email protected] requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself. npm WARN [email protected] requires a peer of eslint@^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.

audited 357 packages in 5.728s

5 packages are looking for funding run npm fund for details

found 9 vulnerabilities (1 low, 5 moderate, 2 high, 1 critical) run npm audit fix to fix them, or npm audit for details Make sure your robot is on the Home Base and powered on (green lights on). Then press and hold the HOME button (or DOCK+SPOT on some models) on your robot until it plays a series of tones (about 2 seconds). Release the button and your robot will flash WIFI light. Then press any key here... events.js:352 throw er; // Unhandled 'error' event ^

Error: Client network socket disconnected before secure TLS connection was established at connResetException (internal/errors.js:628:14) at TLSSocket.onConnectEnd (_tls_wrap.js:1561:19) at TLSSocket.emit (events.js:387:35) at endReadableNT (internal/streams/readable.js:1317:12) at processTicksAndRejections (internal/process/task_queues.js:82:21) Emitted 'error' event on TLSSocket instance at: at emitErrorNT (internal/streams/destroy.js:106:8) at emitErrorCloseNT (internal/streams/destroy.js:74:3) at processTicksAndRejections (internal/process/task_queues.js:82:21) { code: 'ECONNRESET', path: undefined, host: '10.100.10.17', port: 8883, localAddress: undefined } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] getrobotpwd: cd node_modules/dorita980 && npm install && node ./bin/getpassword.js "10.100.10.17" npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] getrobotpwd script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-10-15T12_25_59_941Z-debug.log`

So I guess the problem here is really that certain dependencies are unmet, specifically ajv@^5.0.0 and esline@^2.0.0 ro @^3.0.0. I would consider this to be a flaw in the programming of the getrobotpwd command or a flaw in the plugin itself. If these packages are required for the the password command to function, they should be installed as dependencies of the plugin, or as part of the runtime when executing the command. Also, for informational purposes, the new j7 robot only has one button. Based on the instructions of holding the home button until some tones are played, I expect that the j7 button operates the same as the home button on other models, as it does play tones when held for a few seconds, but it's important to note distinctions like this when supporting different models.

I'm going to try and resolve this dependency issue and will hopefully get it working today.

mpreissner avatar Oct 15 '21 12:10 mpreissner

@mpreissner I’m sorry to hear you still didn’t have any success. As for the steps I followed, I was trying anything, that I came across. When I did the npm fund and then the getrobotpwd commands after one another I was able to generate all of the info except the password. I kept following that same structure, until I came across the idea of just holding the home button instead of home and spot, and sure enough that did the trick. I don’t know if it was a matter of timing, or just pure luck, but It’s working 100% now.

I will say though that my Log files kept throwing errors for the contact sensor features, so I just removed them. Thankfully the iRobot notifications are fairly quick.

the1maximus avatar Oct 15 '21 13:10 the1maximus

So I tried installing the dependencies (ajv and eslint), but I still kept getting unmet dependency errors. Pasting my log from the latest run (I uninstalled/reinstalled the roomba2 plugin). This one is without a button press...

0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli '/usr/local/bin/node', 1 verbose cli '/usr/local/bin/npm', 1 verbose cli 'run', 1 verbose cli 'getrobotpwd', 1 verbose cli '10.100.10.17' 1 verbose cli ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'pregetrobotpwd', 'getrobotpwd', 'postgetrobotpwd' ] 5 info lifecycle [email protected]~pregetrobotpwd: [email protected] 6 info lifecycle [email protected]~getrobotpwd: [email protected] 7 verbose lifecycle [email protected]~getrobotpwd: unsafe-perm in lifecycle true 8 verbose lifecycle [email protected]~getrobotpwd: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/local/lib/node_modules/homebridge-roomba2/node_modules/.bin:/usr/local/lib/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 verbose lifecycle [email protected]~getrobotpwd: CWD: /usr/local/lib/node_modules/homebridge-roomba2 10 silly lifecycle [email protected]~getrobotpwd: Args: [ 10 silly lifecycle '-c', 10 silly lifecycle 'cd node_modules/dorita980 && npm install && node ./bin/getpassword.js "10.100.10.17"' 10 silly lifecycle ] 11 silly lifecycle [email protected]~getrobotpwd: Returned: code: 1 signal: null 12 info lifecycle [email protected]~getrobotpwd: Failed to exec getrobotpwd script 13 verbose stack Error: [email protected] getrobotpwd:cd node_modules/dorita980 && npm install && node ./bin/getpassword.js "10.100.10.17"13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:375:28) 13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:375:28) 13 verbose stack at maybeClose (internal/child_process.js:1055:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) 14 verbose pkgid [email protected] 15 verbose cwd /usr/local/lib/node_modules/homebridge-roomba2 16 verbose Linux 5.10.63-v7l+ 17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "getrobotpwd" "10.100.10.17" 18 verbose node v14.17.3 19 verbose npm v6.14.13 20 error code ELIFECYCLE 21 error errno 1 22 error [email protected] getrobotpwd:cd node_modules/dorita980 && npm install && node ./bin/getpassword.js "10.100.10.17"22 error Exit status 1 23 error Failed at the [email protected] getrobotpwd script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

And this one is with a button press...

0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli '/usr/local/bin/node', 1 verbose cli '/usr/local/bin/npm', 1 verbose cli 'run', 1 verbose cli 'getrobotpwd', 1 verbose cli '10.100.10.17' 1 verbose cli ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'pregetrobotpwd', 'getrobotpwd', 'postgetrobotpwd' ] 5 info lifecycle [email protected]~pregetrobotpwd: [email protected] 6 info lifecycle [email protected]~getrobotpwd: [email protected] 7 verbose lifecycle [email protected]~getrobotpwd: unsafe-perm in lifecycle true 8 verbose lifecycle [email protected]~getrobotpwd: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/local/lib/node_modules/homebridge-roomba2/node_modules/.bin:/usr/local/lib/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin 9 verbose lifecycle [email protected]~getrobotpwd: CWD: /usr/local/lib/node_modules/homebridge-roomba2 10 silly lifecycle [email protected]~getrobotpwd: Args: [ 10 silly lifecycle '-c', 10 silly lifecycle 'cd node_modules/dorita980 && npm install && node ./bin/getpassword.js "10.100.10.17"' 10 silly lifecycle ] 11 silly lifecycle [email protected]~getrobotpwd: Returned: code: 1 signal: null 12 info lifecycle [email protected]~getrobotpwd: Failed to exec getrobotpwd script 13 verbose stack Error: [email protected] getrobotpwd:cd node_modules/dorita980 && npm install && node ./bin/getpassword.js "10.100.10.17"13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:375:28) 13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:375:28) 13 verbose stack at maybeClose (internal/child_process.js:1055:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) 14 verbose pkgid [email protected] 15 verbose cwd /usr/local/lib/node_modules/homebridge-roomba2 16 verbose Linux 5.10.63-v7l+ 17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "getrobotpwd" "10.100.10.17" 18 verbose node v14.17.3 19 verbose npm v6.14.13 20 error code ELIFECYCLE 21 error errno 1 22 error [email protected] getrobotpwd:cd node_modules/dorita980 && npm install && node ./bin/getpassword.js "10.100.10.17"22 error Exit status 1 23 error Failed at the [email protected] getrobotpwd script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

mpreissner avatar Oct 15 '21 13:10 mpreissner

Device compatibility is based on the underlying library dorita980. It seems the J7 has some issues, but you might check out this issue over there as some users have returned their password by inspecting the app traffic.

rcoletti116 avatar Oct 16 '21 00:10 rcoletti116

Thanks. Yeah, I managed to get the BLID (which appears to be identical to the RobotID) and the password using Charles Proxy. Unfortunately, when putting the values into the plugin config in Homebridge, the various Roomba "Devices" are added, but constantly timeout on response...effectively, I can't do anything with them. If the ongoing function of the roomba2 plugin relies on dorita980 (not just the BLID/password discovery), then this won't get fixed until dorita980 is fixed.

mpreissner avatar Oct 18 '21 18:10 mpreissner

Update: There's some progress on the Dorita980 side. Using the dorita code and passing it the environment variable ROBOT_CIPHERS=TLS_AES_256_GCM_SHA384 for ROBOT_CIPHERS or editing the getpassword.js file to use that value results in successful BLID retrieval, but still no password.

Regardless, I've noticed that although I see "No Response" from the roomba devices created by the plugin in Homekit, my homebridge itself does seem to update. Unfortunately, it takes a really long time, and causes all of my homebridge-linked accessories to take a while to update. I keep seeing this in my homebridge logs (and yes, roomba2 is running on a child bridge - I don't have any plugins running on the main bridge):

[20/10/2021, 09:38:58] [homebridge-roomba2] This plugin slows down Homebridge. The read handler for the characteristic 'On' was slow to respond! See https://git.io/JtMGR for more info. [20/10/2021, 09:38:58] [homebridge-roomba2] This plugin slows down Homebridge. The read handler for the characteristic 'Status Low Battery' was slow to respond! See https://git.io/JtMGR for more info. [20/10/2021, 09:38:58] [homebridge-roomba2] This plugin slows down Homebridge. The read handler for the characteristic 'Battery Level' was slow to respond! See https://git.io/JtMGR for more info. [20/10/2021, 09:38:58] [homebridge-roomba2] This plugin slows down Homebridge. The read handler for the characteristic 'Charging State' was slow to respond! See https://git.io/JtMGR for more info. [20/10/2021, 09:38:58] [homebridge-roomba2] This plugin slows down Homebridge. The read handler for the characteristic 'Filter Change Indication' was slow to respond! See https://git.io/JtMGR for more info. [20/10/2021, 09:38:58] [homebridge-roomba2] This plugin slows down Homebridge. The read handler for the characteristic 'Contact Sensor State' was slow to respond! See https://git.io/JtMGR for more info. [20/10/2021, 09:38:58] [homebridge-roomba2] This plugin slows down Homebridge. The read handler for the characteristic 'Contact Sensor State' was slow to respond! See https://git.io/JtMGR for more info. [20/10/2021, 09:38:58] [homebridge-roomba2] This plugin slows down Homebridge. The read handler for the characteristic 'Contact Sensor State' was slow to respond! See https://git.io/JtMGR for more info.

mpreissner avatar Oct 20 '21 13:10 mpreissner

@mpreissner could you please try installing the beta of the plugin? In Homebridge UI, go to the Plugins tab, click the spanner / wrench on the homebridge-roomba2 plugin, then click Install Previous Version. I'm interested in whether it at least resolves the "plugin slows down Homebridge" issue, if not actually resolving your issue.

Your issue does seem like something that Dorita980 will need to resolve, and once it does, we'll need to upgrade the dependency for this plugin.

karlvr avatar Oct 20 '21 21:10 karlvr

Updated to the beta. Log output below:

[20/10/2021, 18:43:57] [Roomba] Restarting Process... Initializing HAP-NodeJS v0.9.6... [20/10/2021, 18:43:58] [Roomba] Launched child bridge with PID 31589 [20/10/2021, 18:43:59] Registering accessory 'homebridge-roomba2.Roomba2' [20/10/2021, 18:43:59] [Roomba] Loaded homebridge-roomba2 v1.3.0-beta.7 child bridge successfully [20/10/2021, 18:43:59] Loaded 0 cached accessories from cachedAccessories.0E7F387A4456. [20/10/2021, 18:43:59] [Roomba] Refreshing Roomba's status (repeating in 60m) [20/10/2021, 18:43:59] [Roomba] DEBUG: Connecting to Roomba (0 others waiting)... Preparing Advertiser for 'Roomba 8CC4' using ciao backend! Starting to advertise 'Roomba 8CC4' using ciao backend! [20/10/2021, 18:43:59] Homebridge v1.3.5 (Roomba) is running on port 56152. [20/10/2021, 18:43:59] [Roomba] DEBUG: Connection close received [20/10/2021, 18:44:01] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:01] [Roomba] Running status: Returning no value due to timeout [20/10/2021, 18:44:01] [Roomba] Low Battery status: Returning no value due to timeout [20/10/2021, 18:44:01] [Roomba] Battery level: Returning no value due to timeout [20/10/2021, 18:44:01] [Roomba] Charging status: Returning no value due to timeout [20/10/2021, 18:44:01] [Roomba] Bin status: Returning no value due to timeout [20/10/2021, 18:44:01] [Roomba] Dock status: Returning no value due to timeout [20/10/2021, 18:44:01] [Roomba] Running status: Returning no value due to timeout [20/10/2021, 18:44:01] [Roomba] Bin status: Returning no value due to timeout [20/10/2021, 18:44:02] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:03] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:04] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:05] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:07] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:10] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:12] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:16] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:17] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:19] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:21] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:25] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:27] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:29] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:30] [Roomba] DEBUG: Watching Roomba's status (repeating in 30s, idle timeout in 570s) [20/10/2021, 18:44:30] [Roomba] DEBUG: Connecting to Roomba (0 others waiting)... [20/10/2021, 18:44:31] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:34] [Roomba] DEBUG: Connection close received [20/10/2021, 18:44:36] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:38] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:42] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:43] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:45] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:48] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:52] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:53] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:55] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:57] [Roomba] DEBUG: Connection close received from old connection [20/10/2021, 18:44:59] [Roomba] Timed out after 60001ms trying to connect to Roomba [20/10/2021, 18:44:59] [Roomba] Failed to connect to Roomba to refresh state: Connect timed out

It still appears fine from the Homebridge Accessories page (no "No Response" errors there), but from the Homekit app, still seeing no response. I am no longer seeing the "plugin slows down Homebridge" message, so that appears to be fixed.

mpreissner avatar Oct 20 '21 22:10 mpreissner

@mpreissner I was having the same issue with an i4 I just purchased, but finally after playing with it for a few hours I finally got it.

  1. Reboot the Roomba through the app.
  2. Go to Account Setting in the iRobot app and Log out of all devices.
  3. Open terminal in Homebridge, Follow the Command Line steps to switch to the proper directory
  4. In the roomba2 dir run command "npm fund"
  5. Run the get password command
  6. At The prompt to press the button, Don't press any button on the Roomba, instead just press a button to continue.
  7. At this point all of the info will generate, except you will get an error for the password.
  8. Repeat the get password command
  9. At the prompt to press a button, press and hold ONLY the HOME button for a few seconds and hit a button on the keyboard.

If done correctly you should get a prompt from the Roomba that it was setup successfully, and the terminal window will have all of the info and the password.

npm WARN [email protected] requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself. npm WARN [email protected] requires a peer of eslint@^2.0.0 || ^3.0.0 but none is installed. You must install peer dependencies yourself.

audited 357 packages in 1.467s

5 packages are looking for funding run npm fund for details

found 9 vulnerabilities (1 low, 5 moderate, 2 high, 1 critical) run npm audit fix to fix them, or npm audit for details Make sure your robot is on the Home Base and powered on (green lights on). Then press and hold the HOME button (or DOCK+SPOT on some models) on your robot until it plays a series of tones (about 2 seconds). Release the button and your robot will flash WIFI light. Then press any key here... Robot Data: undefined

wonghc1 avatar Oct 22 '21 06:10 wonghc1

I can confirm that sniffing the password works with this THOR app. You have to accept a cert and profile and then with a MitM attack you can fish out the password.

However, the robot is not responding:

[23/10/2021, 17:39:36] [homebridge-roomba2] This plugin slows down Homebridge. The read handler for the characteristic 'On' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.

I can also confirm that installing the BETA will help to remove this warning.

Nevertheless no response from the robot so far...

myzinsky avatar Oct 23 '21 16:10 myzinsky

@karlvr if it would help, I’d be willing to give you access to my homebridge server to debug and work directly with the j7. All I’d need is your public IP address and an SSH key and I can punch a hole in my firewall for you. Let me know. Thanks!

mpreissner avatar Oct 23 '21 17:10 mpreissner

Okay, once you have sniffed the password with a man in the middle attach, the solution is to replace all AES128-SHA256 with TLS_AES_256_GCM_SHA3 in

/usr/lib/node_modules/homebridge-roomba2/node_modules/dorita980/

Then the robot can be used with home bridge

myzinsky avatar Oct 26 '21 06:10 myzinsky

Okay, once you have sniffed the password with a man in the middle attach, the solution is to replace all AES128-SHA256 with TLS_AES_256_GCM_SHA3 in

/usr/lib/node_modules/homebridge-roomba2/node_modules/dorita980/

Then the robot can be used with home bridge

So, I just did this, and I'm still not getting a response in Homekit. I am getting different errors, however.

[26/10/2021, 07:27:08] [Roomba] Running status: Returning no value due to timeout [26/10/2021, 07:27:08] [Roomba] Bin status: Returning no value due to timeout [26/10/2021, 07:27:08] [Roomba] Running status: Returning no value due to timeout [26/10/2021, 07:27:08] [Roomba] Dock status: Returning no value due to timeout [26/10/2021, 07:27:08] [Roomba] Low Battery status: Returning no value due to timeout [26/10/2021, 07:27:13] [Roomba] DEBUG: Watching Roomba's status (repeating in 30s, idle timeout in 594s) [26/10/2021, 07:27:17] [Roomba] Running status: Returning no value due to timeout [26/10/2021, 07:27:17] [Roomba] Running status: Returning no value due to timeout [26/10/2021, 07:27:17] [Roomba] Bin status: Returning no value due to timeout [26/10/2021, 07:27:17] [Roomba] Dock status: Returning no value due to timeout [26/10/2021, 07:27:17] [Roomba] Low Battery status: Returning no value due to timeout [26/10/2021, 07:27:43] [Roomba] DEBUG: Watching Roomba's status (repeating in 30s, idle timeout in 573s) (node:14745) UnhandledPromiseRejectionWarning: Error: error:1426E0B9:SSL routines:ciphersuite_cb:no cipher match at Object.createSecureContext (_tls_common.js:216:13) at Object.connect (_tls_wrap.js:1597:48) at Object.buildBuilder (/usr/local/lib/node_modules/homebridge-roomba2/node_modules/mqtt/lib/connect/tls.js:13:20) at MqttClient.wrapper [as streamBuilder] (/usr/local/lib/node_modules/homebridge-roomba2/node_modules/mqtt/lib/connect/index.js:140:36) at MqttClient._setupStream (/usr/local/lib/node_modules/homebridge-roomba2/node_modules/mqtt/lib/client.js:277:22) at new MqttClient (/usr/local/lib/node_modules/homebridge-roomba2/node_modules/mqtt/lib/client.js:258:8) at Object.connect (/usr/local/lib/node_modules/homebridge-roomba2/node_modules/mqtt/lib/connect/index.js:143:10) at localV2 (/usr/local/lib/node_modules/homebridge-roomba2/node_modules/dorita980/lib/v2/local.js:30:23) at new local (/usr/local/lib/node_modules/homebridge-roomba2/node_modules/dorita980/index.js:17:10) at getRoomba (/usr/local/lib/node_modules/homebridge-roomba2/dist/accessory.js:253:28) at RoombaAccessory.connect (/usr/local/lib/node_modules/homebridge-roomba2/dist/accessory.js:300:24) at RoombaAccessory.refreshState (/usr/local/lib/node_modules/homebridge-roomba2/dist/accessory.js:209:14) at Timeout.checkStatus [as _onTimeout] (/usr/local/lib/node_modules/homebridge-roomba2/dist/accessory.js:606:18) at listOnTimeout (internal/timers.js:557:17) at processTimers (internal/timers.js:500:7) (node:14745) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4) [26/10/2021, 07:28:13] [Roomba] DEBUG: Watching Roomba's status (repeating in 30s, idle timeout in 543s) (node:14745) UnhandledPromiseRejectionWarning: Error: error:1426E0B9:SSL routines:ciphersuite_cb:no cipher match at Object.createSecureContext (_tls_common.js:216:13) at Object.connect (_tls_wrap.js:1597:48) at Object.buildBuilder (/usr/local/lib/node_modules/homebridge-roomba2/node_modules/mqtt/lib/connect/tls.js:13:20) at MqttClient.wrapper [as streamBuilder] (/usr/local/lib/node_modules/homebridge-roomba2/node_modules/mqtt/lib/connect/index.js:140:36) at MqttClient._setupStream (/usr/local/lib/node_modules/homebridge-roomba2/node_modules/mqtt/lib/client.js:277:22) at new MqttClient (/usr/local/lib/node_modules/homebridge-roomba2/node_modules/mqtt/lib/client.js:258:8) at Object.connect (/usr/local/lib/node_modules/homebridge-roomba2/node_modules/mqtt/lib/connect/index.js:143:10) at localV2 (/usr/local/lib/node_modules/homebridge-roomba2/node_modules/dorita980/lib/v2/local.js:30:23) at new local (/usr/local/lib/node_modules/homebridge-roomba2/node_modules/dorita980/index.js:17:10) at getRoomba (/usr/local/lib/node_modules/homebridge-roomba2/dist/accessory.js:253:28) at RoombaAccessory.connect (/usr/local/lib/node_modules/homebridge-roomba2/dist/accessory.js:300:24) at RoombaAccessory.refreshState (/usr/local/lib/node_modules/homebridge-roomba2/dist/accessory.js:209:14) at Timeout.checkStatus [as _onTimeout] (/usr/local/lib/node_modules/homebridge-roomba2/dist/accessory.js:606:18) at listOnTimeout (internal/timers.js:557:17) at processTimers (internal/timers.js:500:7)

This is after hardcoding the new robot ciphers in the getpassword.js and local.js files in the dorita980 stuff (only two occurrences I found).

mpreissner avatar Oct 26 '21 11:10 mpreissner

I'm trying this on my J7+ with the latest HomeBridge Roomba2 plugin and seeing this response:

Make sure your robot is on the Home Base and powered on (green lights on). Then press and hold the HOME button (or DOCK+SPOT on some models) on your robot until it plays a series of tones (about 2 seconds). Release the button and your robot will flash WIFI light.
Then press any key here...
events.js:377
      throw er; // Unhandled 'error' event
      ^

Error: Client network socket disconnected before secure TLS connection was established
    at connResetException (internal/errors.js:628:14)
    at TLSSocket.onConnectEnd (_tls_wrap.js:1561:19)
    at TLSSocket.emit (events.js:412:35)
    at endReadableNT (internal/streams/readable.js:1317:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
Emitted 'error' event on TLSSocket instance at:
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:82:21) {
  code: 'ECONNRESET',
  path: undefined,
  host: '192.168.1.9',
  port: 8883,
  localAddress: undefined
}

adammodlin avatar Nov 27 '21 23:11 adammodlin

This should be fixed now: https://github.com/koalazak/dorita980/issues/142

jessfraz avatar Dec 05 '21 21:12 jessfraz

@jessfraz thanks for the heads-up. I am publishing a new beta. Let's see if this is resolved in the new beta? And then I think it's time for a release.

karlvr avatar Dec 05 '21 22:12 karlvr

@adammodlin please upgrade to beta 11 of this plugin and let us know how you go with this process.

karlvr avatar Dec 05 '21 22:12 karlvr

Will do. I’m traveling for work right now but I’ll do it once I’m back later this week.


From: Karl von Randow @.> Sent: Sunday, December 5, 2021 5:23:37 PM To: karlvr/homebridge-roomba2 @.> Cc: Adam Modlin @.>; Mention @.> Subject: Re: [karlvr/homebridge-roomba2] Unable to get BLID and password on j7 (#81)

@adammodlinhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fadammodlin&data=04%7C01%7Cadam.modlin%40microsoft.com%7Cf5cccedfbab94037219808d9b83de278%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637743398274109890%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=ihWPBeBuHMPlEqc5hBSVpN7%2BCccFvxXnYN2XXsFhgJ0%3D&reserved=0 please upgrade to beta 11 of this plugin and let us know how you go with this process.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkarlvr%2Fhomebridge-roomba2%2Fissues%2F81%23issuecomment-986311502&data=04%7C01%7Cadam.modlin%40microsoft.com%7Cf5cccedfbab94037219808d9b83de278%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637743398274109890%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=LxVXxcqMF8LY5pb4dTTrjW3UspBv7miPQy7iMLzluy0%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABUGXTO4QGB23XBPBKS3MF3UPPQ6TANCNFSM5GABSD7Q&data=04%7C01%7Cadam.modlin%40microsoft.com%7Cf5cccedfbab94037219808d9b83de278%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637743398274109890%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=V%2BD4NJ9VouuB7PEsM8OUNZqaZHR5JHNEHagAg9cZ%2BtQ%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Cadam.modlin%40microsoft.com%7Cf5cccedfbab94037219808d9b83de278%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637743398274160360%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=ByWVF%2Bo9yQdqA6IWgUJpTFtmBqfFZpPlGpG0heanxVc%3D&reserved=0 or Androidhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Cadam.modlin%40microsoft.com%7Cf5cccedfbab94037219808d9b83de278%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637743398274160360%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=xc9GnK0K2EiHjE2R9N0jAdKblS%2FlmemzMEkub%2BDVG%2Fo%3D&reserved=0.

adammodlin avatar Dec 05 '21 22:12 adammodlin

@karlvr I've updated to the latest beta. Using the new dorita980, I was able to get BLID and PW using their cloud-retrieval method. However, I'm still getting timeouts in homebridge:

[06/12/2021, 13:33:38] [Roomba] DEBUG: Watching Roomba's status (repeating in 5s, idle timeout in 313s) [06/12/2021, 13:33:43] [Roomba] Timed out after 60000ms trying to connect to Roomba [06/12/2021, 13:33:43] [Roomba] Releasing an unexpected Roomba instance [06/12/2021, 13:33:43] [Roomba] Failed to connect to Roomba to refresh state: Connect timed out [06/12/2021, 13:33:43] [Roomba] DEBUG: Watching Roomba's status (repeating in 5s, idle timeout in 308s) [06/12/2021, 13:33:43] [Roomba] DEBUG: Connecting to Roomba (0 others waiting)... [06/12/2021, 13:33:46] [Roomba] DEBUG: Connection close received [06/12/2021, 13:33:48] [Roomba] DEBUG: Watching Roomba's status (repeating in 5s, idle timeout in 303s) [06/12/2021, 13:33:51] [Roomba] Refreshing Roomba's status (repeating in 1m) [06/12/2021, 13:33:53] [Roomba] Timed out after 60000ms trying to connect to Roomba [06/12/2021, 13:33:53] [Roomba] Releasing an unexpected Roomba instance [06/12/2021, 13:33:53] [Roomba] Failed to connect to Roomba to refresh state: Connect timed out [06/12/2021, 13:33:53] [Roomba] DEBUG: Watching Roomba's status (repeating in 5s, idle timeout in 298s) [06/12/2021, 13:33:53] [Roomba] DEBUG: Connecting to Roomba (0 others waiting)... [06/12/2021, 13:33:58] [Roomba] DEBUG: Watching Roomba's status (repeating in 5s, idle timeout in 293s) [06/12/2021, 13:34:03] [Roomba] Timed out after 60001ms trying to connect to Roomba [06/12/2021, 13:34:03] [Roomba] Releasing an unexpected Roomba instance [06/12/2021, 13:34:03] [Roomba] Failed to connect to Roomba to refresh state: Connect timed out [06/12/2021, 13:34:03] [Roomba] DEBUG: Watching Roomba's status (repeating in 5s, idle timeout in 288s) [06/12/2021, 13:34:03] [Roomba] DEBUG: Connecting to Roomba (1 others waiting)... [06/12/2021, 13:34:08] [Roomba] DEBUG: Watching Roomba's status (repeating in 5s, idle timeout in 283s) [06/12/2021, 13:34:13] [Roomba] Timed out after 60002ms trying to connect to Roomba [06/12/2021, 13:34:13] [Roomba] Releasing an unexpected Roomba instance [06/12/2021, 13:34:13] [Roomba] Failed to connect to Roomba to refresh state: Connect timed out [06/12/2021, 13:34:13] [Roomba] DEBUG: Watching Roomba's status (repeating in 5s, idle timeout in 278s) [06/12/2021, 13:34:13] [Roomba] DEBUG: Connecting to Roomba (2 others waiting)... [06/12/2021, 13:34:18] [Roomba] DEBUG: Watching Roomba's status (repeating in 5s, idle timeout in 273s) [06/12/2021, 13:34:19] [Roomba] Running status: Returning no value due to timeout [06/12/2021, 13:34:19] [Roomba] Running status: Returning no value due to timeout [06/12/2021, 13:34:19] [Roomba] Bin status: Returning no value due to timeout [06/12/2021, 13:34:19] [Roomba] Dock status: Returning no value due to timeout [06/12/2021, 13:34:19] [Roomba] Low Battery status: Returning no value due to timeout [06/12/2021, 13:34:20] [Roomba] Running status: Returning no value due to timeout [06/12/2021, 13:34:20] [Roomba] Running status: Returning no value due to timeout [06/12/2021, 13:34:20] [Roomba] Bin status: Returning no value due to timeout [06/12/2021, 13:34:20] [Roomba] Dock status: Returning no value due to timeout [06/12/2021, 13:34:20] [Roomba] Low Battery status: Returning no value due to timeout [06/12/2021, 13:34:23] [Roomba] Timed out after 60001ms trying to connect to Roomba [06/12/2021, 13:34:23] [Roomba] Releasing an unexpected Roomba instance [06/12/2021, 13:34:23] [Roomba] Failed to connect to Roomba to refresh state: Connect timed out [06/12/2021, 13:34:23] [Roomba] DEBUG: Connection close received [06/12/2021, 13:34:23] [Roomba] DEBUG: Watching Roomba's status (repeating in 5s, idle timeout in 596s) [06/12/2021, 13:34:23] [Roomba] DEBUG: Connecting to Roomba (0 others waiting)... [06/12/2021, 13:34:28] [Roomba] DEBUG: Watching Roomba's status (repeating in 5s, idle timeout in 591s) [06/12/2021, 13:34:29] [Roomba] Running status: Returning no value due to timeout [06/12/2021, 13:34:29] [Roomba] Running status: Returning no value due to timeout [06/12/2021, 13:34:29] [Roomba] Bin status: Returning no value due to timeout [06/12/2021, 13:34:29] [Roomba] Dock status: Returning no value due to timeout [06/12/2021, 13:34:29] [Roomba] Low Battery status: Returning no value due to timeout [06/12/2021, 13:34:30] [Roomba] DEBUG: Connection close received [06/12/2021, 13:34:33] [Roomba] Timed out after 60001ms trying to connect to Roomba [06/12/2021, 13:34:33] [Roomba] Releasing an unexpected Roomba instance [06/12/2021, 13:34:33] [Roomba] Failed to connect to Roomba to refresh state: Connect timed out [06/12/2021, 13:34:33] [Roomba] DEBUG: Watching Roomba's status (repeating in 5s, idle timeout in 595s) [06/12/2021, 13:34:33] [Roomba] DEBUG: Connecting to Roomba (0 others waiting)... [06/12/2021, 13:34:38] [Roomba] DEBUG: Watching Roomba's status (repeating in 5s, idle timeout in 590s)

I've logged out of both instances of the irobot app (iphone and ipad), and rebooted the roomba.

mpreissner avatar Dec 06 '21 18:12 mpreissner

@mpreissner might be the same issue as #91 ... we'll see after they reboot their Roomba. The key error, I think, is the "Connect timed out"... that suggests that we're actually failing to connect to the Roomba... So I think we need to check that you've entered the right IP address for your Roomba, and that it's still on that IP. Try pinging it etc, and look on your router / dhcp server.

karlvr avatar Dec 06 '21 18:12 karlvr

@karlvr I'm definitely hitting the right IP address. I'm running some port scans now against it after a fresh reboot. Ping replies fine.

Edit: so far, only found one open port - tcp/8883. My homebridge and the roomba are currently on the same VLAN (eventually plan to move the roomba to my IoT VLAN once everything works properly). Will attempt to tcpdump traffic between homebridge and the roomba to see what's going on in more detail.

mpreissner avatar Dec 06 '21 19:12 mpreissner

@karlvr I think I may know (part of) the issue. One of the things found during debugging with the dorita980 package was that the j7 model needed to use TLS_AES_256_GCM_SHA384 for encrypted MQTT connections. Looking at the packet capture I did that caught the communication when enabling the roomba2 plugin and restarting homebridge, I see my homebridge only advertising TLS_RSA_WITH_AES_128_CBC_SHA256. Maybe Roomba2 needs to use the newer cipher suite? Grasping at straws because all my attempts to MITM the MQTT traffic fail. Can only look at the encrypted pcap.

mpreissner avatar Dec 06 '21 19:12 mpreissner

@mpreissner say no more. It is a pleasure to discuss ciphers and packet capture. Very interesting. They mentioned that cipher suite in https://github.com/koalazak/dorita980/issues/142 which is the issue that lead to the dorita980 upgrade that lead to the beta 11 release. I wonder if it fixed the getting of the password but not the connection to the Roomba itself!

I see in https://github.com/koalazak/dorita980/blob/3eef6fda59b5a98bfe5c36b30d640fec390e2910/lib/v2/local.js that unless there is a ROBOT_CIPHERS environment variable, then we end up with AES128-SHA256.

What do you think about editing the dorita980 source code in your local node_modules and restarting homebridge to see if that resolves the issue? On my homebridge setup that file is at /usr/lib/node_modules/homebridge-roomba2/node_modules/dorita980/lib/v2/local.js.

karlvr avatar Dec 07 '21 03:12 karlvr

I am working on the same issue. What exacvtly do I change the AES128-SHA256 to in the file...TLS_AES_256_GCM_SHA3???

var options = { port: 8883, clientId: user, rejectUnauthorized: false, protocolId: 'MQTT', protocolVersion: 4, ciphers: process.env.ROBOT_CIPHERS || 'AES128-SHA256', clean: false, username: user, password: password

farberm avatar Dec 08 '21 02:12 farberm

I changed the v2 file and now I get this error...

[12/7/2021, 10:43:48 PM] [Roomba] DEBUG: Watching Roomba's status (repeating in 5s, idle timeout in 339s) (node:14143) UnhandledPromiseRejectionWarning: Error: error:1426E0B9:SSL routines:ciphersuite_cb:no cipher match at Object.createSecureContext (_tls_common.js:216:13) at Object.connect (_tls_wrap.js:1606:48) at Object.buildBuilder (/usr/lib/node_modules/homebridge-roomba2/node_modules/mqtt/lib/connect/tls.js:13:20) at MqttClient.wrapper [as streamBuilder] (/usr/lib/node_modules/homebridge-roomba2/node_modules/mqtt/lib/connect/index.js:140:36) at MqttClient._setupStream (/usr/lib/node_modules/homebridge-roomba2/node_modules/mqtt/lib/client.js:277:22) at new MqttClient (/usr/lib/node_modules/homebridge-roomba2/node_modules/mqtt/lib/client.js:258:8) at Object.connect (/usr/lib/node_modules/homebridge-roomba2/node_modules/mqtt/lib/connect/index.js:143:10) at localV2 (/usr/lib/node_modules/homebridge-roomba2/node_modules/dorita980/lib/v2/local.js:30:23) at new local (/usr/lib/node_modules/homebridge-roomba2/node_modules/dorita980/index.js:17:10) at getRoomba (/usr/lib/node_modules/homebridge-roomba2/dist/accessory.js:275:28) at RoombaAccessory.connect (/usr/lib/node_modules/homebridge-roomba2/dist/accessory.js:318:24) at RoombaAccessory.refreshState (/usr/lib/node_modules/homebridge-roomba2/dist/accessory.js:223:14) at Timeout.checkStatus [as _onTimeout] (/usr/lib/node_modules/homebridge-roomba2/dist/accessory.js:637:18) at listOnTimeout (internal/timers.js:557:17) at processTimers (internal/timers.js:500:7) (node:14143) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 28)

farberm avatar Dec 08 '21 03:12 farberm

After updating the local.js file to explicitly use TLS_AES_256_GCM_SHA384, I now seem to be getting a good connection. However, even though the devices no longer show "No Response" in Homebridge/Homekit, I'm not able to control them in any way - all I get is status on the various sensors.

[09/12/2021, 10:06:10] [Roomba] DEBUG: Refreshed Roomba's state in 907ms: {"batPct":100,"batteryType":"F12433011","batInfo":{"mDate":"2021-5-27","mName":"PanasonicEnergy","mDaySerial":2708,"mData":"303030333035303100000000000000000000000000","mLife":"0C1D0B78103B0BF848E9000A045EF5D600B8FE8F2614FFFF0304020C00000000","cCount":20,"afCount":0},"batAuthEnable":true,"bbchg":{"nChatters":0,"nKnockoffs":0,"nLithF":0,"nChgOk":32,"aborts":[0,0,0],"chgErr":[0,0,0,0,0],"smberr":0,"nChgErr":0},"bbchg3":{"estCap":2586,"nAvail":293,"hOnDock":1289,"avgMin":71},"bbmssn":{"aCycleM":53,"nMssnF":2,"nMssnC":1,"nMssnOk":33,"aMssnM":67,"nMssn":36},"bbnav":{"aMtrack":0,"nGoodLmrks":0,"aGain":0,"aExpo":0},"bbpause":{"pauses":[2,46,0,0,0,0,0,0,0,0]},"bbrstinfo":{"nNavRst":23,"nMapLoadRst":0,"nMobRst":23,"nSafRst":0,"safCauses":[0,0,0,0,0,0,0,0,0,0]},"bbrun":{"nOvertemps":0,"nEvacs":36,"nMBStll":1548,"nPanics":21,"nPicks":23,"nOpticalDD":3,"nWStll":0,"nPiezoDD":0,"nCBump":0,"nScrubs":3,"nStuck":2,"sqft":154,"min":44,"hr":30,"nCliffsF":1538,"nCliffsR":0},"bbswitch":{"nBumper":33702,"nDrops":239,"nDock":0,"nSpot":0,"nClean":33},"bbsys":{"min":22,"hr":1357},"behaviorFwk":true,"bin":{"present":true,"full":false},"binPause":true,"cap":{"binFullDetect":2,"oMode":2,"odoa":2,"dockComm":1,"edge":0,"maps":3,"pmaps":5,"tLine":2,"area":1,"eco":1,"multiPass":2,"team":1,"pp":0,"lang":2,"5ghz":1,"prov":3,"sched":1,"svcConf":1,"ota":2,"log":2,"langOta":0,"expectingUserConf":1},"carpetBoost":false,"cleanMissionStatus":{"cycle":"none","phase":"charge","expireM":0,"rechrgM":0,"error":0,"notReady":0,"mssnM":0,"expireTm":0,"rechrgTm":0,"mssnStrtTm":0,"operatingMode":0,"initiator":"none","nMssn":36,"missionId":"01FP80ARV0Q1A5PF0R15ZXXVA2"},"cleanSchedule2":[],"cloudEnv":"prod","connected":true,"country":"US","deploymentState":0,"dock":{"known":true,"pn":"unknown","state":301,"id":"1615092191193177115142236202482311299622212","fwVer":"4.2.5","hwRev":255,"varID":0},"evacAllowed":true,"ecoCharge":false,"featureFlags":{"ros2SptLvl":true,"clearHaz":true,"hibLed":0,"quietNav":true},"hwPartsRev":{"csscID":0,"mobBrd":14,"mobBlid":"547933EE426B30C865EE5F17A116A9B0","imuPartNo":"LSM6DSR","navSerialNo":"SSD1702FM","wlan0HwAddr":"50:14:79:b1:e4:55","NavBrd":0},"hwDbgr":null,"imgUpload":1,"langs2":{"sVer":"1.0","dLangs":{"ver":"0.27","langs":["ar-SA","cs-CZ","da-DK","de-DE","en-GB","en-US","es-ES","es-XL","fi-FI","fr-CA","fr-FR","he-IL","it-IT","ja-JP","ko-KR","nb-NO","nl-NL","pl-PL","pt-BR","pt-PT","ru-RU","sv-SE","tr-TR","zh-CN","zh-HK","zh-TW"]},"sLang":"en-US","aSlots":0},"lastCommand":{},"lastDisconnect":0,"mapUploadAllowed":true,"missionTelemetry":{"aux_comms":1,"bat_stats":1,"behaviors_report":1,"camera_settings":1,"coverage_report":1,"hardknock_report":1,"map_hypotheses":1,"map_load":1,"map_save":1,"pmap_navigability":1,"sensor_stats":1,"tumor_classifier_report":1,"vital_stats":1,"vslam_report":1},"name":"Roomba","noAutoPasses":true,"noPP":false,"odoaMode":0,"odoaFeats":{},"openOnly":false,"pmapLearningAllowed":true,"pmaps":[{"YEXFbwDcQBGEo405NAJoRQ":"211206T145314"}],"pmapCL":true,"pmapShare":{"copy":[1,4]},"rankOverlap":15,"reflexSettings":{"rlWheelDrop":{"enabled":0}},"sceneRecog":1,"schedHold":false,"sku":"j755020","softwareVer":"sapphire+1.2.10+Firmware-Production+55","subModSwVer":{"nav":"sapphire-nav+1.2.10+ubuntu-HEAD-dee078e15ac+0","mob":"1.2.10+ubuntu-HEAD-dee078e15ac+0","pwr":"0.2.6+ubuntu-HEAD-dee078e15ac+0","sft":"1.3.1+ubuntu-HEAD-5dc7afa7447+21","mobBtl":"4.1","cam":"0.2.31","linux":"linux+sextant-5.18.4_release+Firmware-Production+55","con":"4.7.1-tags/release-4.7.1@bb784e52/","parcels":{"machine-learning-parcel":"none"}},"svcEndpoints":{"svcDeplId":"v011"},"timezone":"America/New_York","tls":{"tzbChk":1,"privKType":2,"lcCiphers":[0,0,0,0,0,0,0,0,50380848,50336514]},"twoPass":false,"tz":{"events":[{"dt":1633089600,"off":-240},{"dt":1636264801,"off":-300},{"dt":1647154801,"off":-240}],"ver":12},"vacHigh":false} [09/12/2021, 10:06:10] [Roomba] DEBUG: Releasing Roomba instance [09/12/2021, 10:06:10] [Roomba] DEBUG: Merged updated state {"timestamp":1639062370793,"batteryLevel":100,"binFull":false,"running":false,"charging":true,"docking":false} => {"timestamp":1639062370793,"batteryLevel":100,"binFull":false,"running":false,"charging":true,"docking":false} [09/12/2021, 10:06:14] [Roomba] DEBUG: Watching Roomba's status (repeating in 5s, idle timeout in 388s) [09/12/2021, 10:06:17] [Roomba] Running status: Returning 0 (6831ms old) [09/12/2021, 10:06:17] [Roomba] Low Battery status: Returning 0 (6833ms old) [09/12/2021, 10:06:17] [Roomba] Battery level: Returning 100 (6834ms old) [09/12/2021, 10:06:17] [Roomba] Charging status: Returning 1 (6836ms old) [09/12/2021, 10:06:17] [Roomba] Bin status: Returning 0 (6838ms old) [09/12/2021, 10:06:17] [Roomba] Dock status: Returning 0 (6840ms old) [09/12/2021, 10:06:17] [Roomba] Running status: Returning 0 (6842ms old) [09/12/2021, 10:06:17] [Roomba] Bin status: Returning 0 (6843ms old) [09/12/2021, 10:06:19] [Roomba] DEBUG: Watching Roomba's status (repeating in 5s, idle timeout in 597s) [09/12/2021, 10:06:19] [Roomba] DEBUG: Connecting to Roomba (0 others waiting)... [09/12/2021, 10:06:20] [Roomba] DEBUG: Connected to Roomba in 666ms [09/12/2021, 10:06:20] [Roomba] DEBUG: Merged updated state {"timestamp":1639062380778,"batteryLevel":100,"binFull":false,"running":false,"charging":true,"docking":false} => {"timestamp":1639062380778,"batteryLevel":100,"binFull":false,"running":false,"charging":true,"docking":false} [09/12/2021, 10:06:20] [Roomba] DEBUG: Refreshed Roomba's state in 891ms: {"batPct":100,"batteryType":"F12433011","batInfo":{"mDate":"2021-5-27","mName":"PanasonicEnergy","mDaySerial":2708,"mData":"303030333035303100000000000000000000000000","mLife":"0C1D0B78103B0BF848E9000A045EF5D600B8FE8F2614FFFF0304020C00000000","cCount":20,"afCount":0},"batAuthEnable":true,"bbchg":{"nChatters":0,"nKnockoffs":0,"nLithF":0,"nChgOk":32,"aborts":[0,0,0],"chgErr":[0,0,0,0,0],"smberr":0,"nChgErr":0},"bbchg3":{"estCap":2586,"nAvail":293,"hOnDock":1289,"avgMin":71},"bbmssn":{"aCycleM":53,"nMssnF":2,"nMssnC":1,"nMssnOk":33,"aMssnM":67,"nMssn":36},"bbnav":{"aMtrack":0,"nGoodLmrks":0,"aGain":0,"aExpo":0},"bbpause":{"pauses":[2,46,0,0,0,0,0,0,0,0]},"bbrstinfo":{"nNavRst":23,"nMapLoadRst":0,"nMobRst":23,"nSafRst":0,"safCauses":[0,0,0,0,0,0,0,0,0,0]},"bbrun":{"nOvertemps":0,"nEvacs":36,"nMBStll":1548,"nPanics":21,"nPicks":23,"nOpticalDD":3,"nWStll":0,"nPiezoDD":0,"nCBump":0,"nScrubs":3,"nStuck":2,"sqft":154,"min":44,"hr":30,"nCliffsF":1538,"nCliffsR":0},"bbswitch":{"nBumper":33702,"nDrops":239,"nDock":0,"nSpot":0,"nClean":33},"bbsys":{"min":22,"hr":1357},"behaviorFwk":true,"bin":{"present":true,"full":false},"binPause":true,"cap":{"binFullDetect":2,"oMode":2,"odoa":2,"dockComm":1,"edge":0,"maps":3,"pmaps":5,"tLine":2,"area":1,"eco":1,"multiPass":2,"team":1,"pp":0,"lang":2,"5ghz":1,"prov":3,"sched":1,"svcConf":1,"ota":2,"log":2,"langOta":0,"expectingUserConf":1},"carpetBoost":false,"cleanMissionStatus":{"cycle":"none","phase":"charge","expireM":0,"rechrgM":0,"error":0,"notReady":0,"mssnM":0,"expireTm":0,"rechrgTm":0,"mssnStrtTm":0,"operatingMode":0,"initiator":"none","nMssn":36,"missionId":"01FP80ARV0Q1A5PF0R15ZXXVA2"},"cleanSchedule2":[],"cloudEnv":"prod","connected":true,"country":"US","deploymentState":0,"dock":{"known":true,"pn":"unknown","state":301,"id":"1615092191193177115142236202482311299622212","fwVer":"4.2.5","hwRev":255,"varID":0},"evacAllowed":true,"ecoCharge":false,"featureFlags":{"ros2SptLvl":true,"clearHaz":true,"hibLed":0,"quietNav":true},"hwPartsRev":{"csscID":0,"mobBrd":14,"mobBlid":"547933EE426B30C865EE5F17A116A9B0","imuPartNo":"LSM6DSR","navSerialNo":"SSD1702FM","wlan0HwAddr":"50:14:79:b1:e4:55","NavBrd":0},"hwDbgr":null,"imgUpload":1,"langs2":{"sVer":"1.0","dLangs":{"ver":"0.27","langs":["ar-SA","cs-CZ","da-DK","de-DE","en-GB","en-US","es-ES","es-XL","fi-FI","fr-CA","fr-FR","he-IL","it-IT","ja-JP","ko-KR","nb-NO","nl-NL","pl-PL","pt-BR","pt-PT","ru-RU","sv-SE","tr-TR","zh-CN","zh-HK","zh-TW"]},"sLang":"en-US","aSlots":0},"lastCommand":{},"lastDisconnect":0,"mapUploadAllowed":true,"missionTelemetry":{"aux_comms":1,"bat_stats":1,"behaviors_report":1,"camera_settings":1,"coverage_report":1,"hardknock_report":1,"map_hypotheses":1,"map_load":1,"map_save":1,"pmap_navigability":1,"sensor_stats":1,"tumor_classifier_report":1,"vital_stats":1,"vslam_report":1},"name":"Roomba","noAutoPasses":true,"noPP":false,"odoaMode":0,"odoaFeats":{},"openOnly":false,"pmapLearningAllowed":true,"pmaps":[{"YEXFbwDcQBGEo405NAJoRQ":"211206T145314"}],"pmapCL":true,"pmapShare":{"copy":[1,4]},"rankOverlap":15,"reflexSettings":{"rlWheelDrop":{"enabled":0}},"sceneRecog":1,"schedHold":false,"sku":"j755020","softwareVer":"sapphire+1.2.10+Firmware-Production+55","subModSwVer":{"nav":"sapphire-nav+1.2.10+ubuntu-HEAD-dee078e15ac+0","mob":"1.2.10+ubuntu-HEAD-dee078e15ac+0","pwr":"0.2.6+ubuntu-HEAD-dee078e15ac+0","sft":"1.3.1+ubuntu-HEAD-5dc7afa7447+21","mobBtl":"4.1","cam":"0.2.31","linux":"linux+sextant-5.18.4_release+Firmware-Production+55","con":"4.7.1-tags/release-4.7.1@bb784e52/","parcels":{"machine-learning-parcel":"none"}},"svcEndpoints":{"svcDeplId":"v011"},"timezone":"America/New_York","tls":{"tzbChk":1,"privKType":2,"lcCiphers":[0,0,0,0,0,0,0,0,50380848,50336514]},"twoPass":false,"tz":{"events":[{"dt":1633089600,"off":-240},{"dt":1636264801,"off":-300},{"dt":1647154801,"off":-240}],"ver":12},"vacHigh":false} [09/12/2021, 10:06:20] [Roomba] DEBUG: Releasing Roomba instance [09/12/2021, 10:06:20] [Roomba] DEBUG: Merged updated state {"timestamp":1639062380782,"batteryLevel":100,"binFull":false,"running":false,"charging":true,"docking":false} => {"timestamp":1639062380782,"batteryLevel":100,"binFull":false,"running":false,"charging":true,"docking":false} [09/12/2021, 10:06:24] [Roomba] DEBUG: Watching Roomba's status (repeating in 5s, idle timeout in 592s)

mpreissner avatar Dec 09 '21 15:12 mpreissner

@mpreissner ....did you do this thru the home bridge terminal (top right) using the sudo nano local.js command (from the correct directory) or some other way. I only saw one line that needed to be edited is that correct?

I tried to edit the file and could not get a connection?

farberm avatar Dec 09 '21 19:12 farberm

@farberm I was SSH'd into my homebridge server. Only the one line needs to be edited.

Update - I AM able to start/stop my j7 using Siri (voice command), but I can't toggle it on/off through the Home app even though it appears as a switch. Out of curiosity, are "Turn Roomba On" and "Turn Roomba Off" the only voice commands that are really supported with this integration? I know the Alexa skill allows you to say things like "Alexa, tell roomba to clean the office" once you've defined the various rooms on the map. Is there any way to support this functionality through Siri?

mpreissner avatar Dec 10 '21 13:12 mpreissner

This is what I did. I can turn on/off with the app. There are 8 accessories list in the homebridge app. However I can see only 4 contact sensors (Bin Full, Dock CLosed, Docking open.closed and Running) on my Homkit app. I have not tried to clean a specific room, but can turn on/off and return to home

  1. Install Homebridge- Roomba2. Then install version 1.3.0 beta 11 by clicking wrench
  2. ssh pi@, then cd to /usr/lib/node_modules/homebridge-roomba2/node_modules/dorita980cd dorita980
  3. This retrieves my blid and password
  4. Insert blid and password and IP address of Roomba into plugin settings
  5. ssh pi@.
  6. cd /usr/lib/nide_modeles/homebridge-roomba2/node_modules/dorita980/lib/v2
  7. sudo nano local.js
  8. change AES_128-SHA256 to TLS_AES_256_GCM_SHA384
  9. exit and save, restart homebridge

Screen Shot 2021-12-11 at 3 56 19 PM Screen Shot 2021-12-11 at 3 55 01 PM (3)

farberm avatar Dec 11 '21 20:12 farberm