Need a little help from a friend...
cjax123 opened this issue · 16 comments
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...)
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?
@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 Which script? ring.authenticate
isn't in the newer version of the module as it's handled under the hood for you.
@cjax123 I've added a proper example using the newer API:
https://github.com/davglass/doorbot/blob/master/examples/links.js
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?
@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.
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::FunctionCallbackInfov8::Value&)':
../socket_watcher.cpp:104:49: warning: 'v8::Localv8::Object 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
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
What os is the container running?
Well, you ask good questions, not sure I can answer... It is this package:
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)
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