davglass / doorbot

Ring.com Doorbell API
Other
317 stars 55 forks source link

Need a little help from a friend... #13

Closed cjax123 closed 6 years ago

cjax123 commented 6 years ago

Hi bud,

This is JUST what I need, but I get an issue with the ring.authentication call. Any ideas? (Sooorry - yes, I'm blindly following instructions as I don't normally use node...)

bjornand1 commented 6 years ago

I am also completely new to this and have so far only installed Homebridge plugins that have required adding lines to the config.json file. It seems for doorbot, this is not how you configure the plugin?

davglass commented 6 years ago

@cjax123 Can I get an example of how you are using it?

@bjornand1 This isn't the home bridge plugin, this is a raw module to talk to a Ring doorbell. You want this project: https://github.com/homespun/homebridge-platform-ring-video-doorbell

cjax123 commented 6 years ago

Hi bud,

So, to give a little detail (any many thanks btw), I'm on win10, and have installed Node. I've also run the npm install for doorbot etc. When I open a command prompt and run the 'URL-generating' script you wrote (which I saved as list.js), I get an error saying ring.authentication isn't a function. I had put my email and password to ring in the file, where specified.

Interestingly, I can get some of your other scripts to run, such as the one that downloads the videos (although it stops after about 20).

Ideally, I'd really like the URL one to run, so I can throw the URLs into a downloader...

Also, I'm in Aus, so apologies for the sporadic timing.

Thanks, Charlie

On 20 February 2018 at 01:19, Dav Glass notifications@github.com wrote:

@cjax123 https://github.com/cjax123 Can I get an example of how you are using it?

@bjornand1 https://github.com/bjornand1 This isn't the home bridge plugin, this is a raw module to talk to a Ring doorbell. You want this project: https://github.com/homespun/homebridge-platform-ring- video-doorbell

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/davglass/doorbot/issues/13#issuecomment-366706343, or mute the thread https://github.com/notifications/unsubscribe-auth/Ai6jqhmuXac3CcFJx7nM_7SkMhyHHTmUks5tWYMAgaJpZM4SKKbv .

davglass commented 6 years ago

@cjax123 Which script? ring.authenticate isn't in the newer version of the module as it's handled under the hood for you.

cjax123 commented 6 years ago

Hi bud,

It was this one

https://github.com/davglass/doorbot/issues/4

I’m only after a list of urls, so I steered away from the new module and was hoping this would work.

Thanks

Sent from my iPad

On 21 Feb 2018, at 2:02 am, Dav Glass notifications@github.com wrote:

@cjax123 Which script? ring.authenticate isn't in the newer version of the module as it's handled under the hood for you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

davglass commented 6 years ago

@cjax123 I've added a proper example using the newer API: https://github.com/davglass/doorbot/blob/master/examples/links.js

cjax123 commented 6 years ago

You are fantastic - that’s so appreciated. Many thanks.

Sent from my iPhone

On 22 Feb 2018, at 1:04 am, Dav Glass notifications@github.com wrote:

@cjax123 I've added a proper example using the newer API: https://github.com/davglass/doorbot/blob/master/examples/links.js

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

bjornand1 commented 6 years ago

Hi, this is probably not the right place to post this, but I truly hope someone can help. I have homebridge running on my Synology NAS installed using Synology Package for Homebridge Docker. When I try to install the https://www.npmjs.com/package/homebridge-platform-ring-video-doorbell plugin, I get the node-gyp rebuild error. If I try to run a terminal in the Docker package and the recommended % apt-get install libpcap-dev command, it does not work. While I know very little about terminal commands, I assume it is because the paths or something get mixed up when running homebridge this way. Could anyone shed some light on how to install this plugin properly?

davglass commented 6 years ago

@bjornand1 I have no idea on that as I've never used it. I would need to see the actual error that is being generated, it will likely tell you what packages need to be installed inside the container to allow whatever module is breaking to compile. My gut tells me it's likely avahi-devel that needs to be installed.

bjornand1 commented 6 years ago

Thanks for offering to help, davglass! Here is the messages that appear when trying to install:

USER: root DIR: /homebridge CMD: npm install --unsafe-perm --save homebridge-platform-ring-video-doorbell@latest

socketwatcher@0.3.0 install /homebridge/node_modules/socketwatcher node-gyp rebuild

make: Entering directory '/homebridge/node_modules/socketwatcher/build' CXX(target) Release/obj.target/socketwatcher/socket_watcher.o ../socket_watcher.cpp: In static member function 'static void SocketWatcher::New(const Nan::FunctionCallbackInfo&)': ../socket_watcher.cpp:104:49: warning: 'v8::Local v8::Function::NewInstance() const' is deprecated: Use maybe version [-Wdeprecated-declarations] info.GetReturnValue().Set(cons->NewInstance()); ^ In file included from /root/.node-gyp/8.9.4/include/node/v8.h:26:0, from /root/.node-gyp/8.9.4/include/node/node.h:63, from ../../nan/nan.h:51, from ../socket_watcher.hpp:8, from ../socket_watcher.cpp:5: /root/.node-gyp/8.9.4/include/node/v8.h:3836:52: note: declared here V8_DEPRECATED("Use maybe version", Local NewInstance() const); ^ /root/.node-gyp/8.9.4/include/node/v8config.h:318:3: note: in definition of macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^~~~~~ SOLINK_MODULE(target) Release/obj.target/socketwatcher.node COPY Release/socketwatcher.node make: Leaving directory '/homebridge/node_modules/socketwatcher/build'

pcap2@3.0.4 install /homebridge/node_modules/pcap2 node-gyp rebuild

make: Entering directory '/homebridge/node_modules/pcap2/build' CXX(target) Release/obj.target/pcap_binding/src/pcap_binding.o ../src/pcap_binding.cc:2:23: fatal error: pcap/pcap.h: No such file or directory

include <pcap/pcap.h>

                   ^

compilation terminated. make: *** [pcap_binding.target.mk:96: Release/obj.target/pcap_binding/src/pcap_binding.o] Error 1 make: Leaving directory '/homebridge/node_modules/pcap2/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Linux 3.10.102 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /homebridge/node_modules/pcap2 gyp ERR! node -v v8.9.4 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok npm WARN homebridge No description npm WARN homebridge No repository field. npm WARN homebridge No license field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! pcap2@3.0.4 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the pcap2@3.0.4 install 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/2018-03-04T06_09_07_369Z-debug.log

Command failed. Please review log for details

davglass commented 6 years ago

Looks like libpcap it's there:

../src/pcap_binding.cc:2:23: fatal error: pcap/pcap.h: No such file or directory
#include <pcap/pcap.h>
^
compilation terminated.

Try adding this to your container: yum install libpcap-devel

bjornand1 commented 6 years ago

Thanks for looking into this! Like I said, terminal commands are not my expertise, but I tried this in the container, but without any luck:

screen shot 2018-03-05 at 17 33 40

Am I running the command in the right place?

davglass commented 6 years ago

What os is the container running?

bjornand1 commented 6 years ago

Well, you ask good questions, not sure I can answer... It is this package:

https://github.com/oznu/homebridge-syno-spk#how-to-install

davglass commented 6 years ago

Looks like it's running Alpine Linux: https://hub.docker.com/r/oznu/homebridge/

This should work then: apk add --no-cache libpcap-devel (I've never used Apline, so I'm guessing here)

CLARENNE-Q commented 6 years ago

It's not working:

/homebridge # apk add --no-cache libpcap-devel
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
libpcap-devel (missing):
required by: world[libpcap-devel]
/

EDIT found:

/homebridge # apk add libpcap-dev
(1/2) Installing libpcap (1.8.1-r1)
(2/2) Installing libpcap-dev (1.8.1-r1)
Executing busybox-1.28.4-r1.trigger
OK: 307 MiB in 93 packages