Help! Z-wave on rPi for node-red

Posted on
Fri Feb 21, 2020 6:28 pm
FlyingDiver offline
User avatar
Posts: 7213
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Help! Z-wave on rPi for node-red

I find myself with a spare Z-wave stick (z-wave.me). So I thought I'd add it to the rPi that lives in my storage building, which communicates with Indigo using MQTT.

Should be simple, but it's not. I need to install OpenZwave, which I've managed to do a couple different ways. But I also need node-openzwave-shared, which is requires for node-red. That fails miserably every time I try. First, I aways get dozens of these warnings while building the package:
Code: Select all
/home/pi/.cache/node-gyp/10.19.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’:
/home/pi/.cache/node-gyp/10.19.0/include/node/node_object_wrap.h:84:78:   required from here
/home/pi/.cache/node-gyp/10.19.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
                reinterpret_cast<Callback>(callback), type);
/home/pi/.cache/node-gyp/10.19.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’:
/home/pi/.cache/node-gyp/10.19.0/include/node/node_object_wrap.h:84:78:   required from here
/home/pi/.cache/node-gyp/10.19.0/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
                reinterpret_cast<Callback>(callback), type);

But it does seem to build. Then I get this major failure:
Code: Select all
pi@barnpi:~ $ node node_modules/openzwave-shared/test2.js
Initialising OpenZWave 1.6.1044 binary addon for Node.JS.
   OpenZWave Security API is ENABLED
   ZWave device db    : /usr/local/etc/openzwave
   User settings path : /home/pi/node_modules/openzwave-shared/build/Release/../../
   Option Overrides : --ConsoleOutput true
connecting to /dev/ttyACM0
node: symbol lookup error: /home/pi/node_modules/openzwave-shared/build/Release/openzwave_shared.node: undefined symbol: _ZN9OpenZWave7Options6CreateERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_


But it's there:
Code: Select all
pi@barnpi:~ $ ls -l /usr/local/lib
total 1924
drwxr-xr-x 3 root root     4096 Feb 21 14:11 arm-linux-gnueabihf
lrwxrwxrwx 1 root root       19 Feb 21 18:49 libopenzwave.so -> libopenzwave.so.1.6
-rwxr-xr-x 1 root root  1953668 Feb 21 18:49 libopenzwave.so.1.6
drwxr-xr-x 3 root root     4096 Jul  9  2019 pypy2.7
drwxrwsr-x 4 root staff    4096 Feb 21 17:35 python2.7
drwxrwsr-x 3 root staff    4096 Jul  9  2019 python3.7


Here's where I'm starting: https://www.npmjs.com/package/openzwave-shared

I don't think these errors have anything to do with the specific Z-wave stick. It's all about the NPM build.

Has anyone done this?

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Feb 22, 2020 3:13 am
siclark offline
Posts: 1960
Joined: Jun 13, 2017
Location: UK

Re: Help! Z-wave on rPi for node-red

Funnily enough this was just what I was thinking this morning. I am getting far too many delays with my Zwave TRVs so thinking about off loading them to a pi and running on node-red.

Not going to happen any time soon, but will follow with interest at your success!

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 7 guests