ZWave + node-red --> node-red-contrib-openzwave installation issues

1,619 views
Skip to first unread message

Pedro Mendes

unread,
Oct 7, 2015, 8:45:48 PM10/7/15
to Node-RED
I have followed the following procedure and managed to install node-red-contrib-openzwave on my RPi2 successfully, however I can't see the corresponding nodes on the node-red pallette upon restart...

Here are the steps i've followed:

1 Install libudev

sudo apt-fet update
sudo apt-get install libudev-dev -y

2 Build/Install open-zwave

cd ~
cd open-zwave/
make
sudo make install

3 Install openzwave-shared node-red-contrib-openzwave

cd ~/.node-red
npm cache clear
npm install openzwave-shared
npm install node-red-contrib-openzwave

4 Restart node-red

sudo /etc/init.d/nodered restart 

Has anybody got experience with this node? Any idea why this might be happening? 

If not could you suggest any alternatives for you might have implemented for communicating with a Aeon Labs ZStick S2 or Razberry?

Your input would be much appreciated!


Gilson Oguime

unread,
Oct 8, 2015, 9:28:46 AM10/8/15
to Node-RED
Hi Pedro,

I installed openzwave-shared as global using:

sudo npm install -g openzwave-shared

and node-red-contrib-openzwave where node-red modules are, in my case:

cd /usr/lib/node_modules/node-red
npm install node-red-contrib-openzwave

The other steps seem the same and I use an Aeon Z-Stick S2.

Regards,
Gilson

Pedro Mendes

unread,
Oct 8, 2015, 9:49:51 AM10/8/15
to Node-RED
Thanks for the quick reply Gilson! Did you install + compile the OpenZWave source at all (https://github.com/OpenZWave/open-zwave.git) before openzwave-shared?

Cheers,
Pedro.

Gilson Oguime

unread,
Oct 8, 2015, 10:32:35 AM10/8/15
to Node-RED
Yes, I did:

cd ~

sudo apt-get install libudev-dev

sudo git clone https://github.com/OpenZWave/open-zwave open-zwave

cd open-zwave

sudo git fetch

sudo make -j 4

sudo make install

cd ~

Pedro Mendes

unread,
Oct 8, 2015, 11:54:58 AM10/8/15
to Node-RED
Hi again and thanks for your help, i traced down the problem to a missing environment variable. I found the instructions on a README-raspbian.md file that is on the root of openzwave-shared...

The procedure is very simple:

export LD_LIBRARY_PATH=/usr/local/lib
sudo sed -i '$a LD_LIBRARY_PATH=/usr/local/lib' /etc/environment

So in the end the complete procedure for me (borrowing some of your tips) is:

Install libudev

sudo apt-get update
sudo apt-get install libudev-dev -y

Install open-zwave

cd ~
cd open-zwave/
sudo git fetch
sudo make -j 4
sudo make install

Check that ozw is installed correctly by running example program

cd open-zwave
./MinOZW

Update the Environment Variable and add to /etc/environment

export LD_LIBRARY_PATH=/usr/local/lib
sudo sed -i '$a LD_LIBRARY_PATH=/usr/local/lib' /etc/environment

Install openzwave-shared & node-red-contrib-openzwave

npm cache clear
sudo npm install -g openzwave-shared
cd ~/.node-red
npm install node-red-contrib-openzwave

Shem Jamieson

unread,
Oct 8, 2015, 7:03:21 PM10/8/15
to Node-RED
Thanks Pedro for documenting the install process, made it so much easier for me and worked first go.

Svein Alexander Frotjold

unread,
Jan 12, 2017, 10:20:59 PM1/12/17
to Node-RED
I'm having some difficulty installing openzwave-shared 

i have followed the guide at 

im at point 3 where it says 

Go to your project directory

cd /<project directory>

where is my project directory?
when i run sudo 
npm install openzwave-shared

I get this output:

sudo npm install -g openzwave-shared



/

> openzwave-shared@1.2.7 preinstall /usr/local/lib/node_modules/openzwave-shared

> node lib/install-ozw.js




|

> openzwave-shared@1.2.7 install /usr/local/lib/node_modules/openzwave-shared

> node-gyp rebuild




find
: `/usr/local/include/openzwave/': No such file or directory

gyp: Call to 'find /usr/local/include/openzwave/ -name ZWSecurity.h | wc -l' returned exit status 0. 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/share/node-gyp/lib/configure.js:344:16)

gyp ERR! stack     at ChildProcess.emit (events.js:98:17)

gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:809:12)

gyp ERR! System Linux 4.4.38-v7+

gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"

gyp ERR! cwd /usr/local/lib/node_modules/openzwave-shared

gyp ERR! node -v v0.10.29

gyp ERR! node-gyp -v v0.12.2

gyp ERR! not ok

npm WARN This failure might be due to the use of legacy binary "node"

npm WARN For further explanations, please read

/usr/share/doc/nodejs/README.Debian




npm ERR! openzwav...@1.2.7 install: `
node-gyp rebuild`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the openzwav...@1.2.7 install script.

npm ERR! This is most likely a problem with the openzwave-shared 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 openzwave-shared

npm ERR! There is likely additional logging output above.




npm ERR! System Linux 4.4.38-v7+

npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "openzwave-shared"

npm ERR! cwd /home/pi

npm ERR! node -v v0.10.29

npm ERR! npm -v 1.4.21

npm ERR! code ELIFECYCLE

npm ERR!

npm ERR! Additional logging details can be found in:

npm ERR!     /home/pi/npm-debug.log

npm ERR! not ok code 0


Anybody have a clue of what is wrong?

in running razbian Jessie on raspberry pi 2

Sebastian Barwe

unread,
Jan 16, 2017, 3:39:00 AM1/16/17
to Node-RED
Hi Svein,

are you trying to install node-red-contrib-openzwave ?

Is "MinOZW" from step 2 executing?

With node 0.10 and npm 1.4 you should consider to update at least to node 4 and npm 2

br
seb

Folgore

unread,
Aug 16, 2017, 9:19:26 AM8/16/17
to Node-RED
Hi, I have follow the open zwave installation but I have great problems with node-red 0.17.5

1. my project path is in home/pi/.node-red
2. node-red installation is in usr/lib/node_modules

My result is this:

16 Aug 13:08:00 - [info] Node-RED version: v0.17.5
16 Aug 13:08:00 - [info] Node.js  version: v6.11.2
16 Aug 13:08:00 - [info] Linux 4.9.35-v7+ arm LE
16 Aug 13:08:03 - [info] Loading palette nodes
16 Aug 13:08:07 - [info] node-red-contrib-openzwave: 1.2.1
16 Aug 13:08:07 - [info] openzwave-shared: 1.4.0
initialising OpenZWave addon (/home/pi/.node-red/node_modules/openzwave-shared/lib/../build/Release/openzwave_shared.node)
16 Aug 13:08:10 - [warn] ------------------------------------------------------
16 Aug 13:08:10 - [warn] [zwave] Error: libopenzwave.so.1.4: cannot open shared object file: No such file or directory
16 Aug 13:08:10 - [warn] ------------------------------------------------------
16 Aug 13:08:10 - [info] Settings file  : /home/pi/.node-red/settings.js
16 Aug 13:08:10 - [info] User directory : /home/pi/.node-red
16 Aug 13:08:10 - [info] Flows file     : /home/pi/.node-red/flows_raspberrypi.json
16 Aug 13:08:11 - [info] Server now running at http://127.0.0.1:1880/
16 Aug 13:08:11 - [info] Starting flows
16 Aug 13:08:11 - [info] Started flows

Any idea? 

I have tested with ./MinOZW, bu t is fail because the device is /ttyACM0 and not /ttyUSB0

Thank's

fluri...@gmail.com

unread,
Aug 16, 2017, 11:05:52 AM8/16/17
to Node-RED
Check whether libopenzwave.so.1.4 exists, it should be inside the folder /usr/local/lib.

fluri...@gmail.com

unread,
Aug 16, 2017, 11:17:50 AM8/16/17
to Node-RED
 tested with ./MinOZW, bu t is fail because the device is /ttyACM0 and not /ttyUSB0

try ./MinOZW /dev/ttyACM0 

Ron Gerrans

unread,
Aug 17, 2017, 9:06:26 AM8/17/17
to Node-RED
Update the environment variable
export LD_LIBRARY_PATH=/usr/local/lib

make it permanent by adding it to /etc/environment

Reply all
Reply to author
Forward
0 new messages