shnhrrsn / homebridge-openzwave

OpenZWave platform for Homebridge.
MIT License
18 stars 4 forks source link

node-gyp / binding.gyp error while installing #2

Closed stannie closed 4 years ago

stannie commented 4 years ago

Ran into the following while installing homebridge-openzwave on Raspberry Pi using the homebridge web UI :

> openzwave-shared@1.6.2 install /usr/local/lib/node_modules/homebridge-openzwave/node_modules/openzwave-shared
> node-gyp rebuild

grep: /usr/*/include/value_classes: No such file or directory
gyp: Call to 'grep -r GetTypeNameFromEnum /usr/*/include/value_classes | wc -l' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:311:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 4.14.98-v7+
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 /usr/local/lib/node_modules/homebridge-openzwave/node_modules/openzwave-shared
gyp ERR! node -v v12.16.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! openzwave-shared@1.6.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the openzwave-shared@1.6.2 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!     /home/homebridge/.npm/_logs/2020-04-04T21_38_51_874Z-debug.log

Command failed. Please review log for details.
xarbit commented 4 years ago

you need to install the development packages so the module can compile.. Since Raspbian is debian it should be this:

libopenzwave-1.5-dev

sudo apt install libopenzwave-1.5-dev

stannie commented 4 years ago

Thanks, that helped!

with one dash less btw:

$ sudo apt install libopenzwave1.5-dev

Seems to work with the Z-wave.me USB Stick alright:

[4/18/2020, 17:15:59] [OpenZWave] Node Available: ZME_UZB1 USB Stick
[4/18/2020, 17:16:07] [OpenZWave] Finished Scanning

Will dig into the docs more on how to configure additional nodes after it identifies one (just plugged in a NEO Coolcam Power plug):

[4/18/2020, 17:23:21] [OpenZWave] Node Available: 2 - Unknown: type=0200, id=1027 (0x1027)
stannie commented 4 years ago

The power plug works just fine. Would it be possible to expose the power usage to HomeKit?

https://szneo.com/en/products/show.php?id=189

I tried to add the NeoCam door/window sensor too but after “add node” and initiate pairing on the sensor it did not show up.

https://szneo.com/en/products/index.php?id=42

Any ideas? Happy to experiment more.

shnhrrsn commented 4 years ago

Can you open a new issue for power usage? I definitely want to support this!

For the contact sensor, its battery powered which is sadly unsupported right now. The master branch technically implements it, but there were other regressions that made the plugin too unstable and I haven’t had a chance to debug yet.

shnhrrsn commented 4 years ago

Tracking battery issue in #3

stannie commented 4 years ago

Power usage support tracked in issue #7

paulinaacostac commented 2 years ago

now its $ sudo apt install libopenzwave1.6-dev