homebridge-plugins / homebridge-roomba2

Homebridge plugin to connect iRobot Roomba devices with Homebridge/HomeKit.
MIT License
146 stars 17 forks source link

Error when trying to get Roomba PW #8

Closed nikdata closed 3 years ago

nikdata commented 4 years ago

I ran the following command on my raspberry pi (Ubuntu powered):

sudo npm run getrobotpwd 192.168.x.xxx

I get to the part where the instructions tell me to hold the "home" button until I hear a tone and the WiFi lights turn on.

When I hit key, that's when the following error occurs:

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

Error: getaddrinfo EAI_AGAIN 192.168.x.xxx
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:66:26)
Emitted 'error' event on TLSSocket instance at:
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: 'EAI_AGAIN',
  code: 'EAI_AGAIN',
  syscall: 'getaddrinfo',
  hostname: '192.168.x.xxx'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! homebridge-roomba2@1.1.0 getrobotpwd: `cd node_modules/dorita980 && npm install && node ./bin/getpassword.js "192.168.x.xxx"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the homebridge-roomba2@1.1.0 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/2020-10-31T16_13_54_944Z-debug.log

Apologies in advance if this is a known error.

Side Note 1: Location of my plugin folder

My plug-in folder was located here: /usr/lib/node_modules/homebridge-roomba2

nikdata commented 4 years ago

So I got this to work with a "work around".

First, I cloned this repo: Nick Waterton - Roomba980

In that repo, there is a file called "getpassword.py".

Once cloned, I navigated (using my Mac's Terminal) to the cloned folder, then to another folder called "roomba" and typed in the following command:

python getpassword.py

The output was similar to the one below:

paho mqtt client not found
CV or numpy module not found, falling back to PIL
PIL module not found, maps are disabled
waiting on port: 5678 for data
supplied address 255.255.255.255 does not match discovered address 192.168.1.9, using discovered address...
found 1 Roomba(s)
Make sure your robot (Roomba) at IP 192.168.1.9 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...
Received: {
  "ver": "3",
  "hostname": "<HOSTNAME>",
  "robotname": "Roomba",
  "ip": "192.168.X.X",
  "mac": "<MAC ADDRESS>",
  "sw": "v2.4.6-3",
  "sku": "R960020",
  "nc": 0,
  "proto": "mqtt",
  "cap": {
    "pose": 1,
    "ota": 2,
    "multiPass": 2,
    "pp": 1,
    "binFullDetect": 1,
    "langOta": 1,
    "maps": 1,
    "edge": 1,
    "eco": 1,
    "svcConf": 1
  }
}
Roomba (Roomba) IP address is: 192.168.X.X
blid is: <BLID>
Password=> <PASSWORD> <= Yes, all this string.
Use these credentials in roomba.py

I removed the BLID & Password from the output above for privacy. Replace the strings (starting with < and ending with >) with your respective output. Also, I've edited the IP address by removing the last 2 numbers (note the X.X) - replace with your correct output. The rest of the text is what I had on my terminal output.

iRayanKhan commented 4 years ago

Thank you for the work around! I will post an updated guide soon.

camrun91 commented 3 years ago

This workaround worked for me as well.

Chibale11 commented 3 years ago

Just wanted to note location for those running on Mac mini rather than Pi : /usr/local/lib/node_modules/homebridge-roomba2

chaz-clark commented 3 years ago

i have a R890 version and had to use a similar method to @nikdata but with this repo: https://github.com/koalazak/dorita980

however after getting my info the plugin made Homebridge Crash

iRayanKhan commented 3 years ago

I was testing this out while I still had a Roomba, and it seems like the library needs to be updated. I no longer own a Roomba, so I am currently going to transfer this plugin to the homebridge org so they may find someone to maintain this repo.

cloudhoster commented 3 years ago

Hi, I had the same problem - shutting down the iRobot app on the iOS device and deactivating the Roomba2 plugin temporarily (restart homebridge afte) solved the issue. There must be no other device connected to the Roomba, then getpassword normally works fine. BR, C

karlvr commented 3 years ago

I'm going to close this issue as I think it's either the Roomba was busy connected to another client, or the IP address was entered incorrect due to the instructions not being clear.