Open SAABoholic opened 4 years ago
Hello, I am having the same error trying to install this. I've tried everything I can see on the linked thread. Any other suggestions?
Thanks James
The NPM plugin is currently not updated. Please install with npm install henry-spanka/node-red-contrib-hikvision#master
Thanks,
I've tried that and get these errors...
You need to install git first.
Thanks Henry,
Apologies for linux experience... I think I have now installed git but I'm now getting this...
You are in the root directory of your system with an unprivileged user. You need to run the command in the same directory where nodered is installed (as the node red user).
i installed your hik-node today on another instance of node-red, best node to grab images from hikvision cam up to today.
hope you update the little quirks in your code (and basis) and add hilook cameras. 💐 😃
but important note:
go into the node-red dir to install
npm install henry-spanka/node-red-contrib-hikvision#master
Hi,
sorry but I don't have the time right now to look into it. I don't have Hilook cameras. It's probably best to make it a separate project. My cam works just fine. I don't see any issues in my code.
your code is perfect. but seems the only actual maintained code for hikvision-cams in node-red. would be great so see minor updates to install it again over the node-red palette. at least 👍
or the missing update to overcome old libraries in the underlying code of https://github.com/henry-spanka/node-hikvision-api
would love to see this, so i am patient and wait for things to come. thanx up to now, 👍
Not to take anything away from what Henry has done, but, if your camera supports HTTP Listening (Configuration >> Network >> Advanced) then that method is fairly easy to integrate into Node-Red and much faster.
At least on my cameras there's ~5s delay using the API / SDK whereas HTTP listening is pretty much instant. (I've used the API outside Henrys node, so the delay is in the camera/api itself).
very helpful information. i will give it a try on some of my cameras. do you have a example (flow) to post here as a starting point?
Well I have released a new version which (mostly) doesn't use outdated code. It should work via the palette again.
I haven't tried the HTTP Listening yet - Well that's not entirely correct. I tried it but I did not receive any notifications/alarms so. Gave up because it's basically the same thing as the ISAPI and that already works.
glad you are active here again. (same with me about the http-listening)
may you consider only a little update on the underlying api of ryan hunt for the new models ? -> https://github.com/henry-spanka/node-red-contrib-hikvision/issues/28
i own two of the news cams, would be happy to test getting region-information... 🍰 👍
just installed clean ubuntu 20.04 lts, installed node-red with the script from the node-red site. nothing else. no error.
installaed the hikvision-node from the pallette and got this error log.
any hints to solve this?
'''
020-06-05T18:41:00.906Z installieren : node-red-contrib-hikvision 1.0.0
2020-06-05T18:41:20.397Z npm install --no-audit --no-update-notifier --save --save-prefix="~" --production node-red-contrib-hikvision@1.0.0
2020-06-05T18:41:36.940Z [out]
2020-06-05T18:41:36.940Z [out] > ref@1.3.3 install /home/olaf/.node-red/node_modules/net-keepalive/node_modules/ref
2020-06-05T18:41:36.940Z [out] > node-gyp rebuild
2020-06-05T18:41:36.940Z [out]
2020-06-05T18:41:37.844Z [err] gyp
2020-06-05T18:41:37.844Z [err] ERR! build error
2020-06-05T18:41:37.844Z [err] gyp
2020-06-05T18:41:37.844Z [err] ERR!
2020-06-05T18:41:37.844Z [err] stack Error: not found: make
2020-06-05T18:41:37.844Z [err] gyp ERR!
2020-06-05T18:41:37.844Z [err] stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
2020-06-05T18:41:37.844Z [err] gyp ERR!
2020-06-05T18:41:37.844Z [err] stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
2020-06-05T18:41:37.844Z [err] gyp ERR! stack
2020-06-05T18:41:37.844Z [err] at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
2020-06-05T18:41:37.844Z [err] gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
2020-06-05T18:41:37.844Z [err] gyp ERR!
2020-06-05T18:41:37.844Z [err] stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
2020-06-05T18:41:37.844Z [err] gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
2020-06-05T18:41:37.844Z [err] gyp ERR! stack at FSReqCallback.oncomplete (fs.js:167:21)
2020-06-05T18:41:37.844Z [err] gyp
2020-06-05T18:41:37.844Z [err] ERR! System Linux 5.4.0-33-generic
2020-06-05T18:41:37.844Z [err] gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2020-06-05T18:41:37.844Z [err] gyp ERR! cwd /home/olaf/.node-red/node_modules/net-keepalive/node_modules/ref
2020-06-05T18:41:37.844Z [err] gyp ERR! node -v v12.18.0
2020-06-05T18:41:37.845Z [err] gyp ERR! node-gyp -v v5.1.0
2020-06-05T18:41:37.845Z [err] gyp ERR! not ok
2020-06-05T18:41:38.034Z [err] npm
2020-06-05T18:41:38.034Z [err] WARN notsup Unsupported engine for net-keepalive@0.3.8: wanted: {"node":">=0.10 <=0.12||>=4 <=7"} (current: {"node":"12.18.0","npm":"6.14.5"})
2020-06-05T18:41:38.034Z [err] npm WARN notsup Not compatible with your version of node/npm: net-keepalive@0.3.8
2020-06-05T18:41:38.034Z [err] npm WARN node-red-project@0.0.1 No repository field.
2020-06-05T18:41:38.034Z [err] npm WARN node-red-project@0.0.1 No license field.
2020-06-05T18:41:38.034Z [err]
2020-06-05T18:41:38.044Z [err] npm
2020-06-05T18:41:38.044Z [err] ERR! code ELIFECYCLE
2020-06-05T18:41:38.044Z [err] npm ERR!
2020-06-05T18:41:38.044Z [err] errno 1
2020-06-05T18:41:38.044Z [err] npm
2020-06-05T18:41:38.044Z [err] ERR! ref@1.3.3 install: `node-gyp rebuild`
2020-06-05T18:41:38.044Z [err] npm
2020-06-05T18:41:38.044Z [err] ERR! Exit status 1
2020-06-05T18:41:38.044Z [err] npm
2020-06-05T18:41:38.044Z [err] ERR!
2020-06-05T18:41:38.044Z [err] npm ERR!
2020-06-05T18:41:38.044Z [err] Failed at the ref@1.3.3 install script.
2020-06-05T18:41:38.044Z [err] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-06-05T18:41:38.067Z [err]
2020-06-05T18:41:38.067Z [err] npm ERR! A complete log of this run can be found in:
2020-06-05T18:41:38.067Z [err] npm ERR! /home/olaf/.npm/_logs/2020-06-05T18_41_38_062Z-debug.log
2020-06-05T18:41:38.076Z rc=1
'''
installed the build-essentials package on my 20.04 lts server and got this errors:
'''
2020-06-05T18:45:20.329Z [err] | ^
2020-06-05T18:45:20.329Z [err] In file included from /home/olaf/.cache/node-gyp/12.18.0/include/node/v8-internal.h:14,
2020-06-05T18:45:20.329Z [err] from /home/olaf/.cache/node-gyp/12.18.0/include/node/v8.h:27,
2020-06-05T18:45:20.329Z [err] from /home/olaf/.cache/node-gyp/12.18.0/include/node/node.h:67,
2020-06-05T18:45:20.329Z [err] from ../src/binding.cc:5:
2020-06-05T18:45:20.329Z [err] /home/olaf/.cache/node-gyp/12.18.0/include/node/v8.h:3499:22: note: declared here
2020-06-05T18:45:20.329Z [err] 3499 | bool Set(Local<Value> key, Local<Value> value));
2020-06-05T18:45:20.329Z [err] | ^~~
2020-06-05T18:45:20.329Z [err] /home/olaf/.cache/node-gyp/12.18.0/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
2020-06-05T18:45:20.329Z [err] 328 | declarator __attribute__((deprecated(message)))
2020-06-05T18:45:20.329Z [err] | ^~~~~~~~~~
2020-06-05T18:45:20.331Z [err] In file included from ../src/binding.cc:5:
2020-06-05T18:45:20.331Z [err] ../src/binding.cc: At global scope:
2020-06-05T18:45:20.331Z [err] /home/olaf/.cache/node-gyp/12.18.0/include/node/node.h:608:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
2020-06-05T18:45:20.331Z [err] 608 | (node::addon_register_func) (regfunc), \
2020-06-05T18:45:20.331Z [err] | ^
2020-06-05T18:45:20.331Z [err] /home/olaf/.cache/node-gyp/12.18.0/include/node/node.h:642:3: note: in expansion of macro ‘NODE_MODULE_X’
2020-06-05T18:45:20.331Z [err] 642 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
2020-06-05T18:45:20.331Z [err] | ^~~~~~~~~~~~~
2020-06-05T18:45:20.331Z [err] ../src/binding.cc:660:1: note: in expansion of macro ‘NODE_MODULE’
2020-06-05T18:45:20.331Z [err] 660 | NODE_MODULE(binding, init);
2020-06-05T18:45:20.331Z [err] | ^~~~~~~~~~~
2020-06-05T18:45:20.373Z [err] In file included from ../../nan/nan.h:2186,
2020-06-05T18:45:20.373Z [err] from ../src/binding.cc:7:
2020-06-05T18:45:20.373Z [err] ../../nan/nan_weak.h: In instantiation of ‘Nan::WeakCallbackInfo<P>::WeakCallbackInfo(Nan::Persistent<v8::Value>*, Nan::WeakCallbackInfo<P>::Callback, void*, void*, void*) [with T = void; Nan::WeakCallbackInfo<P>::Callback = void (*)(const Nan::WeakCallbackInfo<void>&)]’:
2020-06-05T18:45:20.373Z [err] ../../nan/nan_weak.h:264:12: required from ‘void Nan::Persistent<T, M>::SetWeak(P*, typename Nan::WeakCallbackInfo<P>::Callback, Nan::WeakCallbackType) [with P = void; T = v8::Object; M = v8::NonCopyablePersistentTraits<v8::Object>; typename Nan::WeakCallbackInfo<P>::Callback = void (*)(const Nan::WeakCallbackInfo<void>&); Nan::WeakCallbackType = v8::WeakCallbackType]’
2020-06-05T18:45:20.373Z [err] ../src/binding.cc:228:77: required from here
2020-06-05T18:45:20.373Z [err] ../../nan/nan_weak.h:58:16: warning: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘class v8::Persistent<v8::Value>’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
2020-06-05T18:45:20.373Z [err] 58 | std::memcpy(&persistent_, persistent, sizeof (v8::Persistent<v8::Value>));
2020-06-05T18:45:20.373Z [err] | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2020-06-05T18:45:20.373Z [err] In file included from /home/olaf/.cache/node-gyp/12.18.0/include/node/node.h:67,
2020-06-05T18:45:20.373Z [err] from ../src/binding.cc:5:
2020-06-05T18:45:20.373Z [err] /home/olaf/.cache/node-gyp/12.18.0/include/node/v8.h:668:35: note: ‘class v8::Persistent<v8::Value>’ declared here
2020-06-05T18:45:20.373Z [err] 668 | template <class T, class M> class Persistent : public PersistentBase<T> {
2020-06-05T18:45:20.373Z [err] | ^~~~~~~~~~
2020-06-05T18:45:20.374Z [err] In file included from ../src/binding.cc:7:
2020-06-05T18:45:20.374Z [err] ../../nan/nan.h: In instantiation of ‘void Nan::imp::SetMethodAux(T, v8::Local<v8::String>, v8::Local<v8::FunctionTemplate>, ...) [with T = v8::Local<v8::Object>]’:
2020-06-05T18:45:20.374Z [err] ../../nan/nan.h:1886:20: required from ‘void Nan::SetMethod(HandleType<T>, const char*, Nan::FunctionCallback) [with T = v8::Object; HandleType = v8::Local; Nan::FunctionCallback = void (*)(const Nan::FunctionCallbackInfo<v8::Value>&)]’
2020-06-05T18:45:20.374Z [err] ../src/binding.cc:645:44: required from here
2020-06-05T18:45:20.374Z [err] ../../nan/nan.h:1870:3: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
2020-06-05T18:45:20.374Z [err] 1870 | recv->Set(name, GetFunction(tpl).ToLocalChecked());
2020-06-05T18:45:20.374Z [err] | ^~~~
2020-06-05T18:45:20.374Z [err] In file included from /home/olaf/.cache/node-gyp/12.18.0/include/node/v8-internal.h:14,
2020-06-05T18:45:20.374Z [err] from /home/olaf/.cache/node-gyp/12.18.0/include/node/v8.h:27,
2020-06-05T18:45:20.374Z [err] from /home/olaf/.cache/node-gyp/12.18.0/include/node/node.h:67,
2020-06-05T18:45:20.374Z [err] from ../src/binding.cc:5:
2020-06-05T18:45:20.374Z [err] /home/olaf/.cache/node-gyp/12.18.0/include/node/v8.h:3499:22: note: declared here
2020-06-05T18:45:20.374Z [err] 3499 | bool Set(Local<Value> key, Local<Value> value));
2020-06-05T18:45:20.374Z [err] | ^~~
2020-06-05T18:45:20.374Z [err] /home/olaf/.cache/node-gyp/12.18.0/include/node/v8config.h:328:3: note: in definition of macro ‘V8_DEPRECATED’
2020-06-05T18:45:20.374Z [err] 328 | declarator __attribute__((deprecated(message)))
2020-06-05T18:45:20.374Z [err] | ^~~~~~~~~~
2020-06-05T18:45:20.413Z [err] make: *** [binding.target.mk:111: Release/obj.target/binding/src/binding.o] Error 1
2020-06-05T18:45:20.413Z [out] make: Leaving directory '/home/olaf/.node-red/node_modules/net-keepalive/node_modules/ref/build'
2020-06-05T18:45:20.414Z [err] gyp
2020-06-05T18:45:20.414Z [err]
2020-06-05T18:45:20.414Z [err] ERR! build error
2020-06-05T18:45:20.415Z [err] gyp
2020-06-05T18:45:20.415Z [err] ERR!
2020-06-05T18:45:20.415Z [err] stack Error: `make` failed with exit code: 2
2020-06-05T18:45:20.415Z [err] gyp ERR!
2020-06-05T18:45:20.415Z [err] stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
2020-06-05T18:45:20.415Z [err] gyp
2020-06-05T18:45:20.415Z [err] ERR! stack
2020-06-05T18:45:20.415Z [err] at ChildProcess.emit (events.js:315:20)
2020-06-05T18:45:20.415Z [err] gyp ERR!
2020-06-05T18:45:20.415Z [err] stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
2020-06-05T18:45:20.415Z [err] gyp
2020-06-05T18:45:20.415Z [err] ERR! System Linux 5.4.0-33-generic
2020-06-05T18:45:20.415Z [err] gyp
2020-06-05T18:45:20.415Z [err] ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2020-06-05T18:45:20.415Z [err] gyp ERR! cwd
2020-06-05T18:45:20.415Z [err] /home/olaf/.node-red/node_modules/net-keepalive/node_modules/ref
2020-06-05T18:45:20.415Z [err] gyp ERR!
2020-06-05T18:45:20.415Z [err] node -v v12.18.0
2020-06-05T18:45:20.415Z [err] gyp
2020-06-05T18:45:20.415Z [err] ERR! node-gyp -v v5.1.0
2020-06-05T18:45:20.415Z [err] gyp ERR! not ok
2020-06-05T18:45:20.601Z [err] npm
2020-06-05T18:45:20.602Z [err] WARN notsup Unsupported engine for net-keepalive@0.3.8: wanted: {"node":">=0.10 <=0.12||>=4 <=7"} (current: {"node":"12.18.0","npm":"6.14.5"})
2020-06-05T18:45:20.602Z [err] npm WARN notsup Not compatible with your version of node/npm: net-keepalive@0.3.8
2020-06-05T18:45:20.602Z [err] npm WARN
2020-06-05T18:45:20.602Z [err] node-red-project@0.0.1 No repository field.
2020-06-05T18:45:20.602Z [err] npm
2020-06-05T18:45:20.602Z [err] WARN node-red-project@0.0.1 No license field.
2020-06-05T18:45:20.602Z [err]
2020-06-05T18:45:20.605Z [err] npm
2020-06-05T18:45:20.605Z [err] ERR!
2020-06-05T18:45:20.605Z [err] code ELIFECYCLE
2020-06-05T18:45:20.605Z [err] npm ERR!
2020-06-05T18:45:20.605Z [err] errno 1
2020-06-05T18:45:20.605Z [err] npm
2020-06-05T18:45:20.605Z [err] ERR! ref@1.3.3 install: `node-gyp rebuild`
2020-06-05T18:45:20.605Z [err] npm ERR!
2020-06-05T18:45:20.605Z [err] Exit status 1
2020-06-05T18:45:20.605Z [err] npm
2020-06-05T18:45:20.605Z [err] ERR!
2020-06-05T18:45:20.605Z [err] npm ERR!
2020-06-05T18:45:20.605Z [err] Failed at the ref@1.3.3 install script.
2020-06-05T18:45:20.605Z [err] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-06-05T18:45:20.609Z [err]
2020-06-05T18:45:20.609Z [err] npm ERR! A complete log of this run can be found in:
2020-06-05T18:45:20.609Z [err] npm ERR! /home/olaf/.npm/_logs/2020-06-05T18_45_20_607Z-debug.log
2020-06-05T18:45:20.616Z rc=1
'''
any suggestions? thanks... 😃
could still be because of depencie for "net-keepalive@0.3.8"
?? there had been patches for this in the underlying framework. maybe you have to keep that "net-keepalive@0.3.8" out of the node? --> may edit ryan hunts code? and update? -> https://github.com/henry-spanka/node-red-contrib-hikvision/issues/28
'''
276 warn notsup Unsupported engine for net-keepalive@0.3.8: wanted: {"node":">=0.10 <=0.12||>=4 <=7"} (current: {"node":"12.18.0","npm":"6.14.5"})
277 warn notsup Not compatible with your version of node/npm: net-keepalive@0.3.8
278 verbose notsup Not compatible with your version of node/npm: net-keepalive@0.3.8
278 verbose notsup Required: {"node":">=0.10 <=0.12||>=4 <=7"}
278 verbose notsup Actual: {"npm":"6.14.5","node":"12.18.0"}
279 warn node-red-project@0.0.1 No repository field.
280 warn node-red-project@0.0.1 No license field.
281 verbose stack Error: ref@1.3.3 install: `node-gyp rebuild`
281 verbose stack Exit status 1
281 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
281 verbose stack at EventEmitter.emit (events.js:315:20)
281 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
281 verbose stack at ChildProcess.emit (events.js:315:20)
281 verbose stack at maybeClose (internal/child_process.js:1021:16)
281 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
282 verbose pkgid ref@1.3.3
283 verbose cwd /home/olaf/.node-red
284 verbose Linux 5.4.0-33-generic
285 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "--no-audit" "--no-update-notifier" "--save" "--save-prefix=\"~\"" "--production" "node-red-contrib-hikvision@1.0.0"
286 verbose node v12.18.0
287 verbose npm v6.14.5
288 error code ELIFECYCLE
289 error errno 1
290 error ref@1.3.3 install: `node-gyp rebuild`
290 error Exit status 1
291 error Failed at the ref@1.3.3 install script.
291 error This is probably not a problem with npm. There is likely additional logging output above.
292 verbose exit [ 1, true ]
'''
i tried the old command-line method. seemed to work still with higher version 1.1.1
olaf@node4-face:~$ cd .node-red/
olaf@node4-face:~/.node-red$ npm install henry-spanka/node-red-contrib-hikvision#master
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.
+ node-red-contrib-hikvision@1.1.1
added 49 packages from 59 contributors, moved 1 package and audited 615 packages in 6.357s
1 package is looking for funding
run `npm fund` for details
found 100 vulnerabilities (61 low, 10 moderate, 29 high)
run `npm audit fix` to fix them, or `npm audit` for details
olaf@node4-face:~/.node-red$
Hi,
I tried to install the package to Node Red: npm install -g node-red-contrib-hikvision
But I get the following error: