homebridge-plugins / homebridge-roomba2

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

There seems to be a fair bit of assumptions of knowledge in the documentation and I'm getting an error. #51

Closed Leopere closed 1 year ago

Leopere commented 3 years ago
/homebridge # npm run getrobotpwd 192.168.0.12
npm ERR! missing script: getrobotpwd

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-06-07T18_51_20_005Z-debug.log
/homebridge # tail -n 100 /root/.npm/_logs/2021-06-07T18_51_20_005Z-debug.log
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   '192.168.0.12'
1 verbose cli ]
2 info using npm@6.14.13
3 info using node@v14.17.0
4 verbose stack Error: missing script: getrobotpwd
4 verbose stack     at run (/usr/local/lib/node_modules/npm/lib/run-script.js:155:19)
4 verbose stack     at /usr/local/lib/node_modules/npm/lib/run-script.js:63:5
4 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:116:5
4 verbose stack     at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:436:5
4 verbose stack     at checkBinReferences_ (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:391:45)
4 verbose stack     at final (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:434:3)
4 verbose stack     at then (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:161:5)
4 verbose stack     at ReadFileContext.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:350:20)
4 verbose stack     at ReadFileContext.callback (/usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:123:16)
4 verbose stack     at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:282:13)
5 verbose cwd /homebridge
6 verbose Linux 5.4.0-1035-raspi
7 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "getrobotpwd" "192.168.0.12"
8 verbose node v14.17.0
9 verbose npm  v6.14.13
10 error missing script: getrobotpwd
11 verbose exit [ 1, true ]

How do I get the robot in the right mood to get this password? What does this series of logs mean and how do I remedy it? I'm running this from the Dockerized homebridge is that causing the issue? I have it in relatively default conditions why is this not working?

Leopere commented 3 years ago

I do really appreciate the plugin but it just seems to be missing a lot of information. I'm really looking forward to degoogling my way completely and moving to an IOT option that doesn't necessarily require google servers all over my network.

Ant-V commented 2 years ago

You do not seem to be in the node_modules folder, and thus you cannot run the getrobotpwd command.

To find your actual node modules dir run: npm root -g in my case the result is: /opt/homebrew/lib/node_modules so I have to: cd /opt/homebrew/lib/node_modules/homebridge-roomba2 to run getrobotpwd

All that is implied by the simple line:

CD into where your plugins are installed. On a Pi it is: /usr/local/lib/node_modules/homebridge-roomba2

Yes, the documentation requires more than a bit of assumptions, but still, it's the best homebridge plugin for Roombas AFAIK...

matharris7 commented 2 years ago

I'm having this issue to. When ever I CD into /usr/local/lib/node_modules/homebridge-roomba2 or /usr/lib/node_modules/homebridge-roomba2, I get an error saying so such directory exists.
I'm running a HOOBS system Version 4.0.100 Node 14.17.6 Homebridge Version 1.3.4

Is the homebridge-roomba2 in a different location?

karlvr commented 2 years ago

@matharris7 I've just updated the README on the way to improving these instructions. I wonder if cd $(npm root -g)/homebridge-roomba2 would work for you. I'm not sure what the usual directory is on HOOBS. Let's see if that works. If not, we'll work out another way to find out where it lives! The plugin is definitely installed right? As a next step, please post a listing of the contents of /usr/lib/node_modules and /usr/local/lib/node_modules.

matharris7 commented 2 years ago

Yes I have it installed.

I am getting a "No such directory error" when I put in cd $(npm root -g)/homebridge-roomba2

Here is what I have listed under the 2 areas you requested:

hoobs@hoobs: /usr/lib/node_modules $ ls -l total 4 drwxr-xr-x 9 root 4096 Sep 3 12:17 npm

hoobs@hoobs: /usr/local/lib/node_modules $ ls -l total 4 drwxr-xr-x 3 root root 4096 Jul 8 14:35 @hoobs

Hope this helps

karlvr commented 2 years ago

@matharris7 OK, I've done a quick search and I think perhaps the plugins are installed in ~/.hoobs/node_modules/... could you please show us the result of:

ls -l ~/.hoobs/node_modules/
matharris7 commented 2 years ago

Here is what get listed with ls -l ~/.hoobs/node_modules/

drwxr-xr-x 5 hoobs hoobs 4096 Jun 6 13:31 ajv drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 asn1 drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 assert-plus drwxr-xr-x 4 hoobs hoobs 4096 Jun 6 13:46 async drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 asynckit drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 aws4 drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 aws-sign2 drwxr-xr-x 4 hoobs hoobs 4096 Jun 6 13:46 axios drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 bcrypt-pbkdf drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:46 bluebird drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:34 boolbase drwxr-xr-x 4 hoobs hoobs 4096 Jun 19 16:00 bufferutil drwxr-xr-x 4 hoobs hoobs 4096 Jun 6 13:52 call-bind drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 caseless drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:34 cheerio drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:34 cheerio-select drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 chownr drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 combined-stream drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:52 component-emitter drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:52 cookiejar drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 core-util-is drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:34 css-select drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:34 css-what drwxr-xr-x 4 hoobs hoobs 4096 Jun 6 13:31 dashdash drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 debug drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 decompress-response drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 delayed-stream drwxr-xr-x 4 hoobs hoobs 4096 Jun 6 13:31 detect-libc drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:34 domelementtype drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:34 domhandler drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:34 dom-serializer drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:34 domutils drwxr-xr-x 4 hoobs hoobs 4096 Jun 6 13:31 dotenv drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 ecc-jsbn drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:34 entities drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:46 eventemitter3 drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 extend drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 extsprintf drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 fast-deep-equal drwxr-xr-x 6 hoobs hoobs 4096 Jun 6 13:31 fast-json-stable-stringify drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:52 fast-safe-stringify drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 ffmpeg-for-homebridge drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:46 follow-redirects drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 forever-agent drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 form-data drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:52 formidable drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 fs-minipass drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:52 function-bind drwxr-xr-x 4 hoobs hoobs 4096 Jun 6 13:52 get-intrinsic drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 getpass lrwxrwxrwx 1 hoobs hoobs 64 Jul 8 14:42 hap-nodejs -> /usr/local/lib/node_modules/@hoobs/hoobs/node_modules/hap-nodejs drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 har-schema drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 har-validator drwxr-xr-x 4 hoobs hoobs 4096 Jun 6 13:52 has drwxr-xr-x 4 hoobs hoobs 4096 Jun 6 13:52 has-symbols drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:46 @homebridge drwxr-xr-x 4 hoobs hoobs 4096 Jun 6 13:31 homebridge-arlo drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:34 homebridge-gogogate2 drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:52 homebridge-ifttt drwxr-xr-x 4 hoobs hoobs 4096 Jul 8 14:30 homebridge-lg-thinq drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:48 homebridge-messenger drwxr-xr-x 3 hoobs hoobs 4096 Jul 8 14:31 homebridge-platform-wemo drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:34 htmlparser2 drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 http-signature drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:48 ifttt-webhooks-channel drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:52 inherits drwxr-xr-x 4 hoobs hoobs 4096 Jun 6 13:31 ip drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:48 is-absolute drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:48 is-relative drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 isstream drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 is-typedarray drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:48 is-unc-path drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:48 is-windows drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 jsbn drwxr-xr-x 9 hoobs hoobs 4096 Jun 6 13:31 json-schema drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 json-schema-traverse drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 json-stringify-safe drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 jsprim drwxr-xr-x 3 hoobs hoobs 20480 Jun 6 13:46 lodash drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:52 lru-cache drwxr-xr-x 4 hoobs hoobs 4096 Jun 22 18:02 luxon drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:52 methods drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:52 mime drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 mime-db drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 mime-types drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 mimic-response drwxr-xr-x 4 hoobs hoobs 4096 Jun 6 13:48 minimist drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 minipass drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 minizlib drwxr-xr-x 4 hoobs hoobs 4096 Jun 6 13:31 mkdirp drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 ms drwxr-xr-x 4 hoobs hoobs 4096 Jun 6 13:31 node-arlo drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:48 node-fetch drwxr-xr-x 2 hoobs hoobs 4096 Jun 19 16:00 node-gyp-build drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:48 nodemailer drwxr-xr-x 6 hoobs hoobs 4096 Jun 6 13:48 node-persist drwxr-xr-x 9 hoobs hoobs 4096 Jun 6 13:46 node-ssdp drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:34 nth-check drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 oauth-sign drwxr-xr-x 5 hoobs hoobs 4096 Jun 6 13:52 object-inspect drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 once drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:34 parse5 drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:34 parse5-htmlparser2-tree-adapter drwxr-xr-x 5 hoobs hoobs 4096 Jun 6 13:31 performance-now drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:46 p-finally drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:46 p-queue drwxr-xr-x 4 hoobs hoobs 4096 Jun 6 13:31 psl drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:46 p-timeout drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 punycode drwxr-xr-x 5 hoobs hoobs 4096 Jun 6 13:48 pushover-notifications drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:48 q drwxr-xr-x 5 hoobs hoobs 4096 Jun 6 13:31 qs drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:52 readable-stream drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 request drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 safe-buffer drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 safer-buffer drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:46 sax drwxr-xr-x 7 hoobs hoobs 4096 Jun 6 13:52 semver drwxr-xr-x 4 hoobs hoobs 4096 Jun 6 13:52 side-channel drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 simple-concat drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 simple-get drwxr-xr-x 5 hoobs hoobs 4096 Jun 6 13:31 sshpk drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:52 string_decoder drwxr-xr-x 7 hoobs hoobs 4096 Jun 6 13:52 superagent drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 tar drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 tough-cookie drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:34 tslib drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 tunnel-agent drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 tweetnacl drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:48 unc-path-regex drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 uri-js drwxr-xr-x 4 hoobs hoobs 4096 Jun 19 16:00 utf-8-validate drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:52 util-deprecate drwxr-xr-x 4 hoobs hoobs 4096 Jun 6 13:31 uuid drwxr-xr-x 3 hoobs hoobs 4096 Jun 6 13:31 verror drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 wrappy drwxr-xr-x 4 hoobs hoobs 4096 Jun 6 13:46 xml2js drwxr-xr-x 6 hoobs hoobs 4096 Jun 6 13:46 xmlbuilder drwxr-xr-x 2 hoobs hoobs 4096 Jun 6 13:31 yallist

And just double assuring that I have the plugin installe

Screen Shot 2021-09-21 at 5 48 42 PM

d

karlvr commented 2 years ago

@matharris7 thanks for that. OK, that looked promising but no homebridge-roomba2 in there... I'm sorry I don't use hoobs, so I think you're going to need to do a bit of a search!

Here are a few more things to try and paste the output of:

pwd
whoami

And then, this will find it but might take a while:

find / -name homebridge-roomba2
matharris7 commented 2 years ago

Ok. hoobs@hoobs:~ $ pwd whoami /home/hoobs

when I run the find / -name homebridge-roomba2, I get a tonne of stuff like this saying Permission denied (this is just a bit of all the errors that show up) find: ‘/proc/18656/fd’: Permission denied find: ‘/proc/18656/map_files’: Permission denied find: ‘/proc/18656/fdinfo’: Permission denied find: ‘/proc/18656/ns’: Permission denied find: ‘/proc/32709/task/32709/fd’: Permission denied find: ‘/proc/32709/task/32709/fdinfo’: Permission denied find: ‘/proc/32709/task/32709/ns’: Permission denied find: ‘/proc/32709/fd’: Permission denied find: ‘/proc/32709/map_files’: Permission denied find: ‘/proc/32709/fdinfo’: Permission denied find: ‘/proc/32709/ns’: Permission denied

Thanks for your help. I'll just keep searching

karlvr commented 2 years ago

@matharris7 Ah yeah, there will be errors... let it keep running and it will find it if it's there

Sakujakira commented 2 years ago

@matharris7 Ah yeah, there will be errors... let it keep running and it will find it if it's there

Hey, i think i`ve got the same error. Maybe my Infos can be of use. Pretty default Hoobs installation:

hoobs@hoobs:~ $ npm root -g
/usr/lib/node_modules

And:

hoobs@hoobs:~ $ find / -type d -name homebridge-roomba2 2>/dev/null
/usr/local/share/.cache/yarn/v6/npm-homebridge-roomba2-1.2.2-20d857384cc8aa25a649f19a66046cc2f25bc718-integrity/node_modules/homebridge-roomba2
/var/lib/hoobs/roomba2bridge/node_modules/homebridge-roomba2
karlvr commented 2 years ago

@Sakujakira thank you! That last line is where the plugin is installed. You can cd to that directory and then continue the setup steps.

Do you know what roomba2bridge means? Did you create a separate bridge device to contain the plugin? Or is that something Hoobs automatically does?

matharris7 commented 2 years ago

Ok so the last line from @Sakujakira helped but mine is: /var/lib/hoobs/hoobs/node_modules/dorita980/bin

but the command in there isn't "getrobotpwd" it is "getpassword".

When I run the command: sudo npm run getpassword I get the instructions to initiate the setup procedure but then get error

dorita980@3.1.9 getpassword /var/lib/hoobs/hoobs/node_modules/dorita980 node ./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 (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: connect EHOSTUNREACH :8883 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1148:16) 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) { errno: -113, code: 'EHOSTUNREACH', syscall: 'connect', address: '', port: 8883 } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! dorita980@3.1.9 getpassword: node ./bin/getpassword.js "<IP ADDRESS>" npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the dorita980@3.1.9 getpassword 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-09-22T22_37_49_023Z-debug.log

I probably should have asked this earlier but does this plugin work for all Roombas? I have an i7 and not sure if it matters

karlvr commented 2 years ago

@matharris7 OK, progress! Once we resolve this we'll update the instructions. EHOSTUNREACH suggests to me that the IP address you've entered isn't valid. From the log it looks like you didn't replace <IP ADDRESS> with the IP address of your Roomba? If that's the case please re-read the Setup instructions carefully.

There are also some instructions for troubleshooting this process on https://github.com/koalazak/dorita980#how-to-get-your-usernameblid-and-password

matharris7 commented 2 years ago

I did input my IP address in those spots. I just replaced them in my response.

Sakujakira commented 2 years ago

@Sakujakira thank you! That last line is where the plugin is installed. You can cd to that directory and then continue the setup steps.

Do you know what roomba2bridge means? Did you create a separate bridge device to contain the plugin? Or is that something Hoobs automatically does?

It`s the automatically genereated bridge name if you choose to isolate plugins in different bridges.

karlvr commented 2 years ago

@Sakujakira okay. So it's going to be a little challenging to locate in every case, but I'll write a command that might do it.