OpenHAB-HomeKit-Bridge icon indicating copy to clipboard operation
OpenHAB-HomeKit-Bridge copied to clipboard

instructions for getting it to run on raspberry 2

Open snizzleorg opened this issue 8 years ago • 13 comments

Has anyone gotten this to work on the rasberrypi2? I fail to get the nam install command to work. with the apt-get supplied node and npm

anyone has it running successfully?

snizzleorg avatar Nov 29 '15 13:11 snizzleorg

Please provide more information: node version, npm version, stack trace.

htreu avatar Nov 29 '15 13:11 htreu

Hi, I have it running on RPi2 but I am using Gentoo Linux. No issues for the "running" part. (except for #25) node is 0.12.7

velaar avatar Dec 02 '15 01:12 velaar

steffen@automator ~ $ node -v
v4.2.1
steffen@automator ~ $ npm -v
2.14.7
steffen@automator ~/OpenHAB-HomeKit-Bridge $ npm install
npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^3.0.0.

> [email protected] install /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/ws/node_modules/utf-8-validate
> node-gyp rebuild

Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
 ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.7-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 /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/ws/node_modules/utf-8-validate
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 

> [email protected] install /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild

Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.7-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 /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/ws/node_modules/bufferutil
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm WARN optional dep failed, continuing [email protected]
npm WARN optional dep failed, continuing [email protected]
\
> [email protected] install /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/curve25519
> node-gyp rebuild

Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.7-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 /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/curve25519
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 

> [email protected] install /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/srp/node_modules/bignum
> node-gyp configure build

Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.7-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/srp/node_modules/bignum
gyp ERR! node -v v4.2.1

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.7-v7+
command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/ed25519
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 

> [email protected] install /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/mdns
> node-gyp rebuild

Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.7-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 /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/mdns
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm ERR! Linux 4.1.7-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v4.2.1
npm ERR! npm  v2.14.7
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the curve25519 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls curve25519
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/steffen/OpenHAB-HomeKit-Bridge/npm-debug.log

snizzleorg avatar Dec 03 '15 16:12 snizzleorg

@snizzleorg apt-get node version will not work. You need to install 0.12.x

add node official apt sources to /etc/apt/sources.list.d/nodesource.list

deb https://deb.nodesource.com/node_0.12 wily main
deb-src https://deb.nodesource.com/node_0.12 wily main

Do not forget to change wily to your distribution.

yozik04 avatar Dec 04 '15 10:12 yozik04

thats what I did now . maybe it helps others:

curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
echo 'deb https://deb.nodesource.com/node_0.12 jessie main' > /etc/apt/sources.list.d/nodesource.list
echo 'deb-src https://deb.nodesource.com/node_0.12 jessie main' >> /etc/apt/sources.list.d/nodesource.list

sudo apt-get update
sudo apt-get install nodejs

npm -v
2.14.9
node -v
v0.12.8

git clone https://github.com/htreu/OpenHAB-HomeKit-Bridge.git
cd OpenHAB-HomeKit-Bridge
npm cache clean
npm install

and thats what I get:

npm install
-
> [email protected] install /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/curve25519
> node-gyp rebuild

Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1075:12)
gyp ERR! System Linux 4.1.7-v7+
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/curve25519
gyp ERR! node -v v0.12.8
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 

> [email protected] install /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/srp/node_modules/bignum
> node-gyp configure build

Usage: gyp_main.py [options ...] [build_file ...]
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1075:12)
gyp ERR! System Linux 4.1.7-v7+
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/srp/node_modules/bignum
gyp ERR! node -v v0.12.8
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 

> [email protected] install /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/ed25519
> node-gyp rebuild

Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1075:12)
gyp ERR! System Linux 4.1.7-v7+
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/ed25519
gyp ERR! node -v v0.12.8
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 

> [email protected] install /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/mdns
> node-gyp rebuild

Usage: gyp_main.py [options ...] [build_file ...]

gyp_main.py: error: no such option: --no-parallel
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:355:16)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1075:12)
gyp ERR! System Linux 4.1.7-v7+
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/steffen/OpenHAB-HomeKit-Bridge/node_modules/hap-nodejs/node_modules/mdns
gyp ERR! node -v v0.12.8
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok 
npm ERR! Linux 4.1.7-v7+
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v0.12.8
npm ERR! npm  v2.14.9
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the curve25519 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls curve25519
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/steffen/OpenHAB-HomeKit-Bridge/npm-debug.log

snizzleorg avatar Dec 04 '15 11:12 snizzleorg

strange thing is that in the error messages it shows:

node-gyp -v v3.0.3

while when I run it:

node-gyp -v v3.2.0

snizzleorg avatar Dec 04 '15 11:12 snizzleorg

as a side note I got it installing under ubuntu trusty on x64 without any problem. But it still crashes when run:

steffen@snizzlenas:~/src/OpenHAB-HomeKit-Bridge$ npm start -- --pincode 031-45-154 --server 192.168.178.94:8080 --sitemap default

> [email protected] start /home/steffen/src/OpenHAB-HomeKit-Bridge
> node index.js start "--pincode" "031-45-154" "--server" "192.168.178.94:8080" "--sitemap" "default"

*** WARNING *** The program 'nodejs' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs>
*** WARNING *** The program 'nodejs' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libdns_sd&e=nodejs&f=DNSServiceRegister>
Missing "name" argument.
Try "--help" for more information.

npm ERR! Linux 3.13.0-71-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start" "--" "--pincode" "031-45-154" "--server" "192.168.178.94:8080" "--sitemap" "default"
npm ERR! node v0.12.8
npm ERR! npm  v2.14.9
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `node index.js start "--pincode" "031-45-154" "--server" "192.168.178.94:8080" "--sitemap" "default"`
npm ERR! Exit status 255
npm ERR! 
npm ERR! Failed at the [email protected] start script 'node index.js start "--pincode" "031-45-154" "--server" "192.168.178.94:8080" "--sitemap" "default"'.
npm ERR! This is most likely a problem with the openHAB-HomeKit-Bridge package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node index.js start "--pincode" "031-45-154" "--server" "192.168.178.94:8080" "--sitemap" "default"
npm ERR! You can get their info via:
npm ERR!     npm owner ls openHAB-HomeKit-Bridge
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/steffen/src/OpenHAB-HomeKit-Bridge/npm-debug.log

snizzleorg avatar Dec 04 '15 11:12 snizzleorg

my miskatek, forgot to specify the name. it runs on ubuntu, but still no luck on the raspy

snizzleorg avatar Dec 04 '15 12:12 snizzleorg

Did you found the problem. I encountered the same on my raps

markus7017 avatar Apr 03 '16 01:04 markus7017

@markus7017 I finally used the docker image.

snizzleorg avatar May 01 '16 09:05 snizzleorg

can somebody elaborate a step list to get it working on the pi? I have a raspbian jessie

glmnet avatar Jun 14 '16 23:06 glmnet

I've got a long way, but it still dies at runtime - If you have a pi2, with an armv7, you can use the node builds from nodesource, but if you have a earlier pi that's armv6, it's a little more tricky, but there are various precompiled builds of node around - I grabbed one from:

wget https://nodejs.org/dist/v4.0.0/node-v4.0.0-linux-armv6l.tar.gz

I installed all the various dependencies, but I get:

raspberrypi:ken 306> npm start -- --name "myOpenHAB-Bridge" --server 127.0.0.1:8080 --sitemap demo

[email protected] start /home/ken/openhab/OpenHAB-HomeKit-Bridge-master node index.js start "--name" "myOpenHAB-Bridge" "--server" "127.0.0.1:8080" "--sitemap" "demo"

/home/ken/openhab/OpenHAB-HomeKit-Bridge-master/node_modules/babel-core/node_modules/babel-traverse/lib/scope/index.js:59 function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key i

SyntaxError: Unexpected identifier at exports.runInThisContext (vm.js:53:16) at Module._compile (module.js:413:25) at Object.Module._extensions..js (module.js:452:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (module.js:384:17) at Object. (/home/ken/openhab/OpenHAB-HomeKit-Bridge-master/node_modules/babel-core/node_modules/babel-traverse/lib/path/index.js:33:14) at Module._compile (module.js:434:26) at Object.Module._extensions..js (module.js:452:10)

npm ERR! Linux 4.1.17+ npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" "--" "--name" "myOpenHAB-Bridge" "--server" "127.0.0.1:8080" "--sitemap" "demo" npm ERR! node v4.0.0 npm ERR! npm v2.14.2 npm ERR! code ELIFECYCLE npm ERR! [email protected] start: node index.js start "--name" "myOpenHAB-Bridge" "--server" "127.0.0.1:8080" "--sitemap" "demo" npm ERR! Exit status 1

anyone have any thoughts? I'm a long way from a JS/node expert!

I might try grabbing https://nodejs.org/dist/v4.1.2/node-v4.1.2-linux-armv6l.tar.gz and see if that works better - shrug

ozobken avatar Jul 10 '16 04:07 ozobken

Nope - 4.1.2 doesn't help - I'll open this as a separate ticket

ozobken avatar Jul 10 '16 05:07 ozobken