jhurliman / homebridge-rfxcom

Homebridge plugin for RFXtrx433(E) transceivers.
MIT License
3 stars 7 forks source link

User Issue? #8

Closed shippers1 closed 4 years ago

shippers1 commented 6 years ago

I am new to raspberry pi.

I have the rfx device plugged into USB on my pi with homebridge installed and running fine for my 'non' hue bulbs etc so have a little knowledge.

I am running from the install from the 'Configuration UI plugin for Homebridge' and I just click install I get loads of errors and it fails, can anyone help?

Do I need to create the config.json first or am I missing something?

USER: root DIR: /homebridge CMD: npm --no-update-notifier install --unsafe-perm --save homebridge-rfxcom@latest

make: Entering directory '/homebridge/node_modules/serialport/build'd592703e8eb CXX(target) Release/obj.target/serialport/src/serialport.o ../src/serialport.cpp: In function 'int getIntFromObject(v8::Local, std::cxx11::string)': ../src/serialport.cpp:90:52: warning: 'v8::Local v8::Value::ToInt32() const' is deprecated: Use maybe version [-Wdeprecated-declarations] return getValueFromObject(options, key)->ToInt32()->Int32Value(); ^ In file included from /root/.node-gyp/8.11.3/include/node/node.h:63:0, from ../../nan/nan.h:51, from ../src/./serialport.h:7, from ../src/serialport.cpp:1: /root/.node-gyp/8.11.3/include/node/v8.h:9796:14: note: declared here Local Value::ToInt32() const { ^~~~~ ../src/serialport.cpp: In function 'double getDoubleFromObject(v8::Local, std::cxx11::string)': ../src/serialport.cpp:102:53: warning: 'v8::Local v8::Value::ToNumber() const' is deprecated: Use maybe version [-Wdeprecated-declarations] return getValueFromObject(options, key)->ToNumber()->NumberValue(); ^ In file included from /root/.node-gyp/8.11.3/include/node/node.h:63:0, from ../../nan/nan.h:51, from ../src/./serialport.h:7, from ../src/serialport.cpp:1: /root/.node-gyp/8.11.3/include/node/v8.h:9760:15: note: declared here Local Value::ToNumber() const { ^~~~~ ../src/serialport.cpp: In function 'void EIO_AfterOpen(uv_work_t)': ../src/serialport.cpp:174:31: warning: 'v8::Local v8::Value::ToInt32() const' is deprecated: Use maybe version [-Wdeprecated-declarations] int fd = argv[1]->ToInt32()->Int32Value(); ^ In file included from /root/.node-gyp/8.11.3/include/node/node.h:63:0, from ../../nan/nan.h:51, from ../src/./serialport.h:7, from ../src/serialport.cpp:1: /root/.node-gyp/8.11.3/include/node/v8.h:9796:14: note: declared here Local Value::ToInt32() const { ^~~~~ ../src/serialport.cpp:180:30: warning: 'v8::Local Nan::Callback::Call(int, v8::Local) const' is deprecated [-Wdeprecated-declarations] data->callback.Call(2, argv); ^ In file included from ../src/./serialport.h:7:0, from ../src/serialport.cpp:1: ../../nan/nan.h:1618:3: note: declared here Call(int argc, v8::Local argv[]) const { ^~~~ ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Update(Nan::NAN_METHOD_ARGS_TYPE)': ../src/serialport.cpp:193:29: warning: 'v8::Local v8::Value::ToInt32() const' is deprecated: Use maybe version [-Wdeprecated-declarations] int fd = info[0]->ToInt32()->Int32Value(); ^ In file included from /root/.node-gyp/8.11.3/include/node/node.h:63:0, from ../../nan/nan.h:51, from ../src/./serialport.h:7, from ../src/serialport.cpp:1: /root/.node-gyp/8.11.3/include/node/v8.h:9796:14: note: declared here Local Value::ToInt32() const { ^~~~~ ../src/serialport.cpp:217:116: warning: 'v8::Local v8::Value::ToInt32() const' is deprecated: Use maybe version [-Wdeprecated-declarations] v8::String>("baudRate").ToLocalChecked()).ToLocalChecked()->ToInt32()->Int32Value(); ^ In file included from /root/.node-gyp/8.11.3/include/node/node.h:63:0, from ../../nan/nan.h:51, from ../src/./serialport.h:7, from ../src/serialport.cpp:1: /root/.node-gyp/8.11.3/include/node/v8.h:9796:14: note: declared here Local Value::ToInt32() const { ^~~~~ ../src/serialport.cpp: In function 'void EIO_AfterUpdate(uv_work_t)': ../src/serialport.cpp:240:30: warning: 'v8::Local Nan::Callback::Call(int, v8::Local) const' is deprecated [-Wdeprecated-declarations] data->callback.Call(1, argv); ^ In file included from ../src/./serialport.h:7:0, from ../src/serialport.cpp:1: ../../nan/nan.h:1618:3: note: declared here Call(int argc, v8::Local argv[]) const { ^~~~ ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Write(Nan::NAN_METHOD_ARGS_TYPE)': ../src/serialport.cpp:252:29: warning: 'v8::Local v8::Value::ToInt32() const' is deprecated: Use maybe version [-Wdeprecated-declarations] int fd = info[0]->ToInt32()->Int32Value(); ^ In file included from /root/.node-gyp/8.11.3/include/node/node.h:63:0, from ../../nan/nan.h:51, from ../src/./serialport.h:7, from ../src/serialport.cpp:1: /root/.node-gyp/8.11.3/include/node/v8.h:9796:14: note: declared here Local Value::ToInt32() const { ^~~~~ ../src/serialport.cpp: In function 'void EIO_AfterWrite(uv_work_t)': ../src/serialport.cpp:339:30: warning: 'v8::Local Nan::Callback::Call(int, v8::Local) const' is deprecated [-Wdeprecated-declarations] data->callback.Call(1, argv); ^ In file included from ../src/./serialport.h:7:0, from ../src/serialport.cpp:1: ../../nan/nan.h:1618:3: note: declared here Call(int argc, v8::Local argv[]) const { ^~~~ ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Close(Nan::NAN_METHOD_ARGS_TYPE)': ../src/serialport.cpp:369:32: warning: 'v8::Local v8::Value::ToInt32() const' is deprecated: Use maybe version [-Wdeprecated-declarations] baton->fd = info[0]->ToInt32()->Int32Value(); ^ In file included from /root/.node-gyp/8.11.3/include/node/node.h:63:0, from ../../nan/nan.h:51, from ../src/./serialport.h:7, from ../src/serialport.cpp:1: /root/.node-gyp/8.11.3/include/node/v8.h:9796:14: note: declared here Local Value::ToInt32() const { ^~~~~ ../src/serialport.cpp: In function 'void EIO_AfterClose(uv_work_t)': ../src/serialport.cpp:403:30: warning: 'v8::Local Nan::Callback::Call(int, v8::Local) const' is deprecated [-Wdeprecated-declarations] data->callback.Call(1, argv); ^ In file included from ../src/./serialport.h:7:0, from ../src/serialport.cpp:1: ../../nan/nan.h:1618:3: note: declared here Call(int argc, v8::Local argv[]) const { ^~~~ ../src/serialport.cpp: In function 'void EIO_AfterList(uv_work_t)': ../src/serialport.cpp:465:30: warning: 'v8::Local Nan::Callback::Call(int, v8::Local) const' is deprecated [-Wdeprecated-declarations] data->callback.Call(2, argv); ^ In file included from ../src/./serialport.h:7:0, from ../src/serialport.cpp:1: ../../nan/nan.h:1618:3: note: declared here Call(int argc, v8::Local argv[]) const { ^~~~ ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Flush(Nan::NAN_METHOD_ARGS_TYPE)': ../src/serialport.cpp:480:29: warning: 'v8::Local v8::Value::ToInt32() const' is deprecated: Use maybe version [-Wdeprecated-declarations] int fd = info[0]->ToInt32()->Int32Value(); ^ In file included from /root/.node-gyp/8.11.3/include/node/node.h:63:0, from ../../nan/nan.h:51, from ../src/./serialport.h:7, from ../src/serialport.cpp:1: /root/.node-gyp/8.11.3/include/node/v8.h:9796:14: note: declared here Local Value::ToInt32() const { ^~~~~ ../src/serialport.cpp: In function 'void EIO_AfterFlush(uv_work_t)': ../src/serialport.cpp:516:30: warning: 'v8::Local Nan::Callback::Call(int, v8::Local) const' is deprecated [-Wdeprecated-declarations] data->callback.Call(2, argv); ^ In file included from ../src/./serialport.h:7:0, from ../src/serialport.cpp:1: ../../nan/nan.h:1618:3: note: declared here Call(int argc, v8::Local argv[]) const { ^~~~ ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Set(Nan::NAN_METHOD_ARGS_TYPE)': ../src/serialport.cpp:528:29: warning: 'v8::Local v8::Value::ToInt32() const' is deprecated: Use maybe version [-Wdeprecated-declarations] int fd = info[0]->ToInt32()->Int32Value(); ^ In file included from /root/.node-gyp/8.11.3/include/node/node.h:63:0, from ../../nan/nan.h:51, from ../src/./serialport.h:7, from ../src/serialport.cpp:1: /root/.node-gyp/8.11.3/include/node/v8.h:9796:14: note: declared here Local Value::ToInt32() const { ^~~~~ ../src/serialport.cpp: In function 'void EIO_AfterSet(uv_work_t)': ../src/serialport.cpp:573:30: warning: 'v8::Local Nan::Callback::Call(int, v8::Local) const' is deprecated [-Wdeprecated-declarations] data->callback.Call(1, argv); ^ In file included from ../src/./serialport.h:7:0, from ../src/serialport.cpp:1: ../../nan/nan.h:1618:3: note: declared here Call(int argc, v8::Local argv[]) const { ^~~~ ../src/serialport.cpp: In function 'Nan::NAN_METHOD_RETURN_TYPE Drain(Nan::NAN_METHOD_ARGS_TYPE)': ../src/serialport.cpp:585:29: warning: 'v8::Local v8::Value::ToInt32() const' is deprecated: Use maybe version [-Wdeprecated-declarations] int fd = info[0]->ToInt32()->Int32Value(); ^ In file included from /root/.node-gyp/8.11.3/include/node/node.h:63:0, from ../../nan/nan.h:51, from ../src/./serialport.h:7, from ../src/serialport.cpp:1: /root/.node-gyp/8.11.3/include/node/v8.h:9796:14: note: declared here Local Value::ToInt32() const { ^~~~~ ../src/serialport.cpp: In function 'void EIO_AfterDrain(uv_work_t)': ../src/serialport.cpp:617:30: warning: 'v8::Local Nan::Callback::Call(int, v8::Local) const' is deprecated [-Wdeprecated-declarations] data->callback.Call(1, argv); ^ In file included from ../src/./serialport.h:7:0, from ../src/serialport.cpp:1: ../../nan/nan.h:1618:3: note: declared here Call(int argc, v8::Local argv[]) const { ^~~~ CXX(target) Release/obj.target/serialport/src/serialport_unix.ommediate@3.0.6 ../src/serialport_unix.cpp:32:26: fatal error: linux/serial.h: No such file or directory

                      ^

compilation terminated. make: *** [serialport.target.mk:95: Release/obj.target/serialport/src/serialport_unix.o] Error 1 make: Leaving directory '/homebridge/node_modules/serialport/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 4.9.80-v7+ gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/homebridge/node_modules/serialport/build/Release/serialport.node" "--module_name=serialport" "--module_path=/homebridge/node_modules/serialport/build/Release" gyp ERR! cwd /homebridge/node_modules/serialport gyp ERR! node -v v8.11.3 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/homebridge/node_modules/serialport/build/Release/serialport.node --module_name=serialport --module_path=/homebridge/node_modules/serialport/build/Release' (1) node-pre-gyp ERR! stack at ChildProcess. (/homebridge/node_modules/serialport/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at emitTwo (events.js:126:13) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:925:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) node-pre-gyp ERR! System Linux 4.9.80-v7+ node-pre-gyp ERR! command "/usr/local/bin/node" "/homebridge/node_modules/serialport/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd /homebridge/node_modules/serialport node-pre-gyp ERR! node -v v8.11.3 node-pre-gyp ERR! node-pre-gyp -v v0.6.32 node-pre-gyp ERR! not ok Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/homebridge/node_modules/serialport/build/Release/serialport.node --module_name=serialport --module_path=/homebridge/node_modules/serialport/build/Release' (1) npm WARN checkPermissions Missing write access to /homebridge/node_modules/homebridge-rfxcom npm WARN homebridge No description npmnpm WARN homebridge No description npm WARN homebridge No repository field. npm WARN homebridge No license field.

WARN homebridge No repository field. npm WARN homebridge No license field.

npm ERR! path /homebridge/node_modules/homebridge-rfxcom npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall access npm ERR! enoent ENOENT: no such file or directory, access '/homebridge/node_modules/homebridge-rfxcom' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! serialport@4.0.7 install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the serialport@4.0.7 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-08-09T17_22_03_652Z-debug.log

Command failed. Please review log for details

jhurliman commented 6 years ago
../src/serialport_unix.cpp:32:26: fatal error: linux/serial.h: No such file or directory

This seems like the root of the problem. This header file comes from the Linux kernel headers. Try this:

sudo apt-get install raspberrypi-kernel-headers