OpenZWave / node-openzwave-shared

OpenZWave addon for Node.js (all versions) including management and security functions
Other
199 stars 113 forks source link

Compilation problem with Node 0.12.4 #2

Closed VirTERM closed 9 years ago

VirTERM commented 9 years ago

Can not install it on CentOS 7 with Node 0.12.4:

make: Entering directory `/usr/local/lib/node_modules/openzwave-shared/build' CXX(target) Release/obj.target/openzwave_shared/src/openzwave.o In file included from /usr/local/include/openzwave/aes/aescpp.h:26:0, from /usr/local/include/openzwave/Driver.h:41, from /usr/local/include/openzwave/Manager.h:39, from ../src/openzwave.hpp:29, from ../src/openzwave.cc:18: /usr/local/include/openzwave/aes/aes.h:75:0: warning: ignoring #pragma warning [-Wunknown-pragmas]

pragma warning( disable : 4324 )

^ /usr/local/include/openzwave/aes/aes.h:93:0: warning: ignoring #pragma warning [-Wunknown-pragmas]

pragma warning( default : 4324 )

^ In file included from ../src/openzwave.cc:18:0: ../src/openzwave.hpp:96:26: error: expected class-name before ‘{’ token struct OZW : ObjectWrap { ^ ../src/openzwave.hpp:97:38: error: ‘Arguments’ does not name a type static Handlev8::Value New(const Arguments& args); ^ ../src/openzwave.hpp:97:49: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] static Handlev8::Value New(const Arguments& args); ^ ../src/openzwave.hpp:99:49: error: ‘Arguments’ does not name a type static Handlev8::Value SetConfigParam(const Arguments& args); ^ ../src/openzwave.hpp:99:60: error: ISO C++ forbids declaration of ‘args’ with no type [-fpermissive] static Handlev8::Value SetConfigParam(const Arguments& args); .......

ekarak commented 9 years ago

Sorry, node 0.12 not supported yet, it gave me serious headache. I've tried to port over simon-jentzsch's patch but it simply wasn't working due to the different way 0.12 copies function prototypes (basically: it doesn't!!!) I'll find my notes about this issue then resolve this call.

ekarak commented 9 years ago

Better get my #ifdef-fu ready for action: There are quite a few API-breaking changes in Node 0.12 - and this is not going to be easy.

ekarak commented 9 years ago

Could also try to use NaN - (think it stands for Node (is) a Nightmare)

ekarak commented 9 years ago

Hi Wojciech, I've just committed a 'nan' branch where all the Node.JS API is wrapped in NaN (Node.JS is A Nightmare) - please check out a copy of the code and give it a try. I haven't tried compiling it against 0.12, (might try this on a VM later today though). In case you get a TypeError: Illegal invocation while trying to invoke (eg 'zwave.setValue) then try calling it via the 'addon' object, for examplezwave.addon.setValue(....)`

VirTERM commented 9 years ago

Hi Elias, Much better results, but still failing:

make: Entering directory /usr/local/lib/node_modules/openzwave-shared/build' CXX(target) Release/obj.target/openzwave_shared/src/openzwave.o In file included from /usr/local/include/openzwave/aes/aescpp.h:26, from /usr/local/include/openzwave/Driver.h:41, from /usr/local/include/openzwave/Manager.h:39, from ../src/openzwave.hpp:30, from ../src/openzwave.cc:18: /usr/local/include/openzwave/aes/aes.h:75: warning: ignoring #pragma warning /usr/local/include/openzwave/aes/aes.h:93: warning: ignoring #pragma warning ../src/openzwave.cc: In static member function ‘static void OZW::OZW::New(const v8::FunctionCallbackInfo<v8::Value>&)’: ../src/openzwave.cc:57: error: ‘New’ is not a member of ‘v8::String’ ../src/openzwave.cc:64: error: ‘New’ is not a member of ‘v8::String’ ../src/openzwave.cc:65: error: ‘New’ is not a member of ‘v8::String’ ../src/openzwave.cc:66: error: ‘New’ is not a member of ‘v8::String’ ../src/openzwave.cc:67: error: ‘New’ is not a member of ‘v8::String’ ../src/openzwave.cc:68: error: ‘New’ is not a member of ‘v8::String’ ../src/openzwave.cc:70: error: ‘New’ is not a member of ‘v8::String’ ../src/openzwave.cc: In function ‘void OZW::init(v8::Handle<v8::Object>)’: ../src/openzwave.cc:142: error: ‘NewSymbol’ is not a member of ‘v8::String’ make: *** [Release/obj.target/openzwave_shared/src/openzwave.o] Error 1 make: Leaving directory/usr/local/lib/node_modules/openzwave-shared/build’

On Jun 7, 2015, at 6:17 AM, Elias Karakoulakis notifications@github.com wrote:

Hi Wojciech, I've just committed a 'nan' branch where all the Node.JS API is wrapped in NaN (Node.JS is A Nightmare) - please check out a copy of the code https://github.com/OpenZWave/node-openzwave-shared/tree/nan and give it a try. I haven't tried compiling it against 0.12, (might try this on a VM later today though)

— Reply to this email directly or view it on GitHub https://github.com/OpenZWave/node-openzwave-shared/issues/2#issuecomment-109732703.

ekarak commented 9 years ago

Can you please give it another shot? I've replaced all String::New with NanNew<String>.

VirTERM commented 9 years ago

Elias, Initially, it was still complaining about line 142 in openzwace.cc, I made the same change as you did in other places.

Now, this is what I see:

/usr/local/include/openzwave/aes/aes.h:75: warning: ignoring #pragma warning /usr/local/include/openzwave/aes/aes.h:93: warning: ignoring #pragma warning ../src/openzwave-driver.cc: In function ‘void OZW::Connect(const v8::FunctionCallbackInfov8::Value&)’: ../src/openzwave-driver.cc:33: error: invalid conversion from ‘void (_)(uv_asynct, int)’ to ‘void (_)(uv_asynct)’ ../src/openzwave-driver.cc:33: error: initializing argument 3 of ‘int uv_async_init(uv_loopt, uv_asynct, void (_)(uv_asynct))’ ../src/openzwave-driver.cc:35: error: no matching function for call to ‘v8::PersistentBasev8::Object::New(v8::Localv8::Object)’ /usr/local/lib/nodemodules/openzwave-shared/.node-gyp/0.12.4/deps/v8/include/v8.h:572: note: candidates are: static T* v8::PersistentBase::New(v8::Isolate, T_) [with T = v8::Object] ../src/openzwave-driver.cc:42: error: no matching function for call to ‘MakeCallback(v8::Persistent<v8::Object, v8::NonCopyablePersistentTraits >&, const char [5], int, v8::Handlev8::Value [1])’ /usr/local/lib/nodemodules/openzwave-shared/.node-gyp/0.12.4/src/node.h:119: note: candidates are: v8::Handlev8::Value node::MakeCallback(v8::Isolate, v8::Handlev8::Object, const char, int, v8::Handlev8::Value) /usr/local/lib/nodemodules/openzwave-shared/.node-gyp/0.12.4/src/node.h:125: note: v8::Handlev8::Value node::MakeCallback(v8::Isolate, v8::Handlev8::Object, v8::Handlev8::String, int, v8::Handlev8::Value_) /usr/local/lib/nodemodules/openzwave-shared/.node-gyp/0.12.4/src/node.h:131: note: v8::Handlev8::Value node::MakeCallback(v8::Isolate, v8::Handlev8::Object, v8::Handlev8::Function, int, v8::Handlev8::Value) ../src/openzwave-driver.cc: In function ‘void OZW::BeginControllerCommand(const v8::FunctionCallbackInfov8::Value&)’: ../src/openzwave-driver.cc:130: warning: ‘bool OpenZWave::Manager::BeginControllerCommand(uint32, OpenZWave::Driver::ControllerCommand, void ()(OpenZWave::Driver::ControllerState, OpenZWave::Driver::ControllerError, void), void, bool, uint8, uint8)’ is deprecated (declared at /usr/local/include/openzwave/Manager.h:1640) ../src/openzwave-driver.cc: In function ‘void OZW::GetControllerNodeId(const v8::FunctionCallbackInfov8::Value&)’: ../src/openzwave-driver.cc:150: error: no matching function for call to ‘v8::Integer::New(uint8&)’ /usr/local/lib/nodemodules/openzwave-shared/.node-gyp/0.12.4/deps/v8/include/v8.h:2012: note: candidates are: static v8::Localv8::Integer v8::Integer::New(v8::Isolate, int32_t) ../src/openzwave-driver.cc:150: error: return-statement with a value, in function returning 'void' ../src/openzwave-driver.cc: In function ‘void OZW::GetSUCNodeId(const v8::FunctionCallbackInfov8::Value&)’: ../src/openzwave-driver.cc:159: error: no matching function for call to ‘v8::Integer::New(uint8&)’ /usr/local/lib/nodemodules/openzwave-shared/.node-gyp/0.12.4/deps/v8/include/v8.h:2012: note: candidates are: static v8::Localv8::Integer v8::Integer::New(v8::Isolate, int32_t) ../src/openzwave-driver.cc:159: error: return-statement with a value, in function returning 'void' ../src/openzwave-driver.cc: In function ‘void OZW::IsPrimaryController(const v8::FunctionCallbackInfov8::Value&)’: ../src/openzwave-driver.cc:173: error: no matching function for call to ‘v8::Boolean::New(bool&)’ /usr/local/lib/nodemodules/openzwave-shared/.node-gyp/0.12.4/deps/v8/include/v8.h:6183: note: candidates are: static v8::Handlev8::Boolean v8::Boolean::New(v8::Isolate, bool) ../src/openzwave-driver.cc:173: error: return-statement with a value, in function returning 'void' ../src/openzwave-driver.cc: In function ‘void OZW::IsStaticUpdateController(const v8::FunctionCallbackInfov8::Value&)’: ../src/openzwave-driver.cc:187: error: no matching function for call to ‘v8::Boolean::New(bool&)’ /usr/local/lib/nodemodules/openzwave-shared/.node-gyp/0.12.4/deps/v8/include/v8.h:6183: note: candidates are: static v8::Handlev8::Boolean v8::Boolean::New(v8::Isolate, bool) ../src/openzwave-driver.cc:187: error: return-statement with a value, in function returning 'void' ../src/openzwave-driver.cc: In function ‘void OZW::IsBridgeController(const v8::FunctionCallbackInfov8::Value&)’: ../src/openzwave-driver.cc:200: error: no matching function for call to ‘v8::Boolean::New(bool&)’ /usr/local/lib/nodemodules/openzwave-shared/.node-gyp/0.12.4/deps/v8/include/v8.h:6183: note: candidates are: static v8::Handlev8::Boolean v8::Boolean::New(v8::Isolate, bool) ../src/openzwave-driver.cc:200: error: return-statement with a value, in function returning 'void' ../src/openzwave-driver.cc: In function ‘void OZW::GetSendQueueCount(const v8::FunctionCallbackInfov8::Value&)’: ../src/openzwave-driver.cc:244: error: no matching function for call to ‘v8::Integer::New(uint32&)’ /usr/local/lib/nodemodules/openzwave-shared/.node-gyp/0.12.4/deps/v8/include/v8.h:2012: note: candidates are: static v8::Localv8::Integer v8::Integer::New(v8::Isolate, int32_t) ../src/openzwave-driver.cc:244: error: return-statement with a value, in function returning 'void' make: *\ [Release/obj.target/openzwave_shared/src/openzwave-driver.o] Error 1

On Jun 7, 2015, at 2:54 PM, Elias Karakoulakis notifications@github.com wrote:

Can you please give it another shot? I've replaced all String::New with NanNew.

— Reply to this email directly or view it on GitHub https://github.com/OpenZWave/node-openzwave-shared/issues/2#issuecomment-109788317.

ekarak commented 9 years ago

yup, the same applies to Integer::New (should be NanNew<Integer>) However, there's a problem, Nan does not cast automatically from floats to the v8::Integer type, so the following line is more than probable to be your next error: // valobj->Set(NanNew<String>("value"), NanNew<Float>(val)); left it as it was: valobj->Set(NanNew<String>("value"), Integer::New(val)); there's no native Float in Javascript (go figure!) so I left it as it was. I need to contact the Nan people about this.

ekarak commented 9 years ago

OK, I've tried using OZW's getValueAsString to get the float values back as strings. It should compile now. Do you have any temperature sensors (or any zwave device that reports floating point values?)

VirTERM commented 9 years ago

Yes, i do but i Will be ale to test it tomorrow afternoon EST... Thanks Wojtek Pa. I Will confirm shortly if it compiles

On Jun 7, 2015, at 16:21, Elias Karakoulakis notifications@github.com wrote:

OK, I've tried using OZW's getValueAsString to get the float values back as strings. It should compile now. Do you have any temperature sensors (or any zwave device that reports floating point values?)

— Reply to this email directly or view it on GitHub.

VirTERM commented 9 years ago

This is what we have now:

../src/openzwave-driver.cc: In function ‘void OZW::Connect(const v8::FunctionCallbackInfov8::Value&)’: ../src/openzwave-driver.cc:33: error: invalid conversion from ‘void (_)(uv_asynct, int)’ to ‘void (_)(uv_asynct)’ ../src/openzwave-driver.cc:33: error: initializing argument 3 of ‘int uv_async_init(uv_loopt, uv_asynct, void (_)(uv_asynct))’ ../src/openzwave-driver.cc:35: error: no matching function for call to ‘v8::PersistentBasev8::Object::New(v8::Localv8::Object)’ /usr/local/lib/nodemodules/openzwave-shared/.node-gyp/0.12.4/deps/v8/include/v8.h:572: note: candidates are: static T* v8::PersistentBase::New(v8::Isolate, T_) [with T = v8::Object] ../src/openzwave-driver.cc:42: error: no matching function for call to ‘MakeCallback(v8::Persistent<v8::Object, v8::NonCopyablePersistentTraits >&, const char [5], int, v8::Handlev8::Value [1])’ /usr/local/lib/nodemodules/openzwave-shared/.node-gyp/0.12.4/src/node.h:119: note: candidates are: v8::Handlev8::Value node::MakeCallback(v8::Isolate, v8::Handlev8::Object, const char, int, v8::Handlev8::Value) /usr/local/lib/nodemodules/openzwave-shared/.node-gyp/0.12.4/src/node.h:125: note: v8::Handlev8::Value node::MakeCallback(v8::Isolate, v8::Handlev8::Object, v8::Handlev8::String, int, v8::Handlev8::Value_) /usr/local/lib/nodemodules/openzwave-shared/.node-gyp/0.12.4/src/node.h:131: note: v8::Handlev8::Value node::MakeCallback(v8::Isolate, v8::Handlev8::Object, v8::Handlev8::Function, int, v8::Handlev8::Value) ../src/openzwave-driver.cc: In function ‘void OZW::BeginControllerCommand(const v8::FunctionCallbackInfov8::Value&)’: ../src/openzwave-driver.cc:130: warning: ‘bool OpenZWave::Manager::BeginControllerCommand(uint32, OpenZWave::Driver::ControllerCommand, void ()(OpenZWave::Driver::ControllerState, OpenZWave::Driver::ControllerError, void), void, bool, uint8, uint8)’ is deprecated (declared at /usr/local/include/openzwave/Manager.h:1640) make: *\ [Release/obj.target/openzwave_shared/src/openzwave-driver.o] Error 1

On Jun 7, 2015, at 6:01 PM, WMT virterm@gmail.com wrote:

Yes, i do but i Will be ale to test it tomorrow afternoon EST... Thanks Wojtek Pa. I Will confirm shortly if it compiles

On Jun 7, 2015, at 16:21, Elias Karakoulakis <notifications@github.com mailto:notifications@github.com> wrote:

OK, I've tried using OZW's getValueAsString to get the float values back as strings. It should compile now. Do you have any temperature sensors (or any zwave device that reports floating point values?)

— Reply to this email directly or view it on GitHub https://github.com/OpenZWave/node-openzwave-shared/issues/2#issuecomment-109797068.

ekarak commented 9 years ago

Oh no, its the callback API.... it has changed too (has ANYTHING remained the same between 0.10 and 0.12???) I would understand breaking the API between major versions, but Node.js's versioning scheme is... outright ridiculous!

ekarak commented 9 years ago

uh-oh, all calls to MakeCallback have to be changed!

ekarak commented 9 years ago

ok I've managed to set up a 0.12.4 working environment, and get all necessary changes to get the full NaN goodness baked in and the source now successfully compiles against both 0.12.4 AND 0.10.25. Could you please give it a shot? - but have a fire extinguisher at close range :)

VirTERM commented 9 years ago

No need for fire extinguisher ;); compiled just fine, thank You

I will do some testing over the weekend

On Jun 12, 2015, at 3:08 PM, Elias Karakoulakis notifications@github.com wrote:

ok I've managed to set up a 0.12.4 working environment, and get all necessary changes to get the full NaN goodness baked in and the source now successfully compiles against both 0.12.4 AND 0.10.25. Could you please give it a shot? - but have a fire extinguisher at close range :)

— Reply to this email directly or view it on GitHub https://github.com/OpenZWave/node-openzwave-shared/issues/2#issuecomment-111591130.

VirTERM commented 9 years ago

I just tried adding it to node-red, so I installed node-red-control-openzwave with dependency disabled, however on startup I get: [warn] [zwave] Error: /usr/local/lib/node_modules/openzwave-shared/build/Release/openzwave_shared.node: undefined symbol: _ZN3OZW3OZW10EnablePollERKN2v820FunctionCallbackInfoINS1_5ValueEEE

On Jun 12, 2015, at 3:08 PM, Elias Karakoulakis notifications@github.com wrote:

ok I've managed to set up a 0.12.4 working environment, and get all necessary changes to get the full NaN goodness baked in and the source now successfully compiles against both 0.12.4 AND 0.10.25. Could you please give it a shot? - but have a fire extinguisher at close range :)

— Reply to this email directly or view it on GitHub https://github.com/OpenZWave/node-openzwave-shared/issues/2#issuecomment-111591130.

ekarak commented 9 years ago

It was a silly namespace issue. Module now boots up correctly:

$ node test.js loading up RELEASE addon: /home/ekarak/src/node-openzwave-shared/lib/../build/Release/openzwave_shared.node Could Not Open OZW Log File. 2015-06-13 00:20:18.648 Error, Cannot find a path to the configuration files at /home/ekarak/src/node-openzwave-shared/lib/../deps/open-zwave/config/, Using /usr/local/etc/openzwave/ instead... 2015-06-13 00:20:18.648 Info, Reading /usr/local/etc/openzwave/options.xml for Options 2015-06-13 00:20:18.649 Warning, Failed to Parse options.xml: Failed to open file 2015-06-13 00:20:18.649 Always, OpenZwave Version 1.3.938 Starting Up 2015-06-13 00:20:18.649 Info, mgr, Added driver for controller /dev/ttyUSB0 2015-06-13 00:20:18.649 Info, Opening controller /dev/ttyUSB0

Although I havent even addressed the missing prototype copied methods issue, you should be able to invoke the addon directly (eg "zwave.addon.")

Can you git pull and retry?

VirTERM commented 9 years ago

I loads properly 12 Jun 17:28:03 - [info] Node-RED version: v0.10.6 12 Jun 17:28:03 - [info] Node.js version: v0.12.4 12 Jun 17:28:03 - [info] Loading palette nodes booting up node-red-contrib-openzwave loading up RELEASE addon: /usr/local/lib/node_modules/openzwave-shared/lib/../build/Release/openzwave_shared.node

Thank You

On Jun 12, 2015, at 5:23 PM, Elias Karakoulakis notifications@github.com wrote:

It was a silly namespace issue. Module now boots up correctly:

$ node test.js loading up RELEASE addon: /home/ekarak/src/node-openzwave-shared/lib/../build/Release/openzwave_shared.node Could Not Open OZW Log File. 2015-06-13 00:20:18.648 Error, Cannot find a path to the configuration files at /home/ekarak/src/node-openzwave-shared/lib/../deps/open-zwave/config/, Using /usr/local/etc/openzwave/ instead... 2015-06-13 00:20:18.648 Info, Reading /usr/local/etc/openzwave/options.xml for Options 2015-06-13 00:20:18.649 Warning, Failed to Parse options.xml: Failed to open file 2015-06-13 00:20:18.649 Always, OpenZwave Version 1.3.938 Starting Up 2015-06-13 00:20:18.649 Info, mgr, Added driver for controller /dev/ttyUSB0 2015-06-13 00:20:18.649 Info, Opening controller /dev/ttyUSB0

Although I havent even addressed the missing prototype copied methods issue, you should be able to invoke the addon directly (eg "zwave.addon.")

Can you git pull and retry?

— Reply to this email directly or view it on GitHub https://github.com/OpenZWave/node-openzwave-shared/issues/2#issuecomment-111621974.

ekarak commented 9 years ago

...but its not working. MakeCallback() signature has changed and its clearly passing something other than a function..: ``node: ../src/node.cc:1104: v8::Handle<v8::Value> node::MakeCallback(node::Environment*, v8::Handle<v8::Object>, v8::Handle<v8::String>, int, v8::Handle<v8::Value>*): Assertioncb_v->IsFunction()' failed. Ακυρώθηκε (core dumped)

VirTERM commented 9 years ago

oh, did not get that far, so I will wait for u now

On Jun 13, 2015, at 10:36 AM, Elias Karakoulakis notifications@github.com wrote:

...but its not working. MakeCallback() signature has changed and its clearly passing something other than a function..: ``node: ../src/node.cc:1104: v8::Handlev8::Value node::MakeCallback(node::Environment, v8::Handlev8::Object, v8::Handlev8::String, int, v8::Handlev8::Value): Assertioncb_v->IsFunction()' failed. Ακυρώθηκε (core dumped)

— Reply to this email directly or view it on GitHub https://github.com/OpenZWave/node-openzwave-shared/issues/2#issuecomment-111714355.

ekarak commented 9 years ago

I'm afraid I'll have to rewrite everything so as to use NanAsyncWorker. NanMakeCallback is failing because the context object (bound in OZW::Connect) is getting GC'ed.

ekarak commented 9 years ago

Hey, Wojciech good news!. After spending some time on the issue, I've managed to get this baby working, at least for running the basic test.js under 0.12.x. Give it a try, and tell me your results.

VirTERM commented 9 years ago

Eccellent news I am not at Home but i Will play with it tomorrow morning

On Jun 14, 2015, at 17:15, Elias Karakoulakis notifications@github.com wrote:

Hey, Wojciech good news!. After spending some time on the issue, I've managed to get this baby working, at least for running the basic test.js under 0.12.x. Give it a try, and tell me your results.

— Reply to this email directly or view it on GitHub.

VirTERM commented 9 years ago

Here we go:

All seems to be fine, I just need to test with actual devices…

Welcome to Node-RED

14 Jun 20:13:57 - [info] Node-RED version: v0.10.6 14 Jun 20:13:57 - [info] Node.js version: v0.12.4 14 Jun 20:13:57 - [info] Loading palette nodes booting up node-red-contrib-openzwave loading up RELEASE addon: /usr/local/lib/node_modules/openzwave-shared/lib/../build/Release/openzwave_shared.node ==> inherits(target: function (path, options) { options = options || {}; options.modpath = options.modpath || _options.modpath; options.consoleoutput = options.consoleoutput || _options.consoleoutput; options.logging = options.logging || _options.logging; options.saveconfig = options.saveconfig || _options.saveconfig; options.driverattempts = options.driverattempts || _options.driverattempts; options.pollinterval = options.pollinterval || _options.pollinterval; options.suppressrefresh = options.suppressrefresh || _options.suppressrefresh; this.path = path; this.addon = new addon(options); this.addon.emit = this.emit.bind(this); } source: function EventEmitter() { EventEmitter.init.call(this); } ====> domain ====> _events ====> _maxListeners ====> setMaxListeners ====> emit ====> addListener ====> on ====> once ====> removeListener ====> removeAllListeners ====> listeners ==> inherits(target: function (path, options) { options = options || {}; options.modpath = options.modpath || _options.modpath; options.consoleoutput = options.consoleoutput || _options.consoleoutput; options.logging = options.logging || _options.logging; options.saveconfig = options.saveconfig || _options.saveconfig; options.driverattempts = options.driverattempts || _options.driverattempts; options.pollinterval = options.pollinterval || _options.pollinterval; options.suppressrefresh = options.suppressrefresh || _options.suppressrefresh; this.path = path; this.addon = new addon(options); this.addon.emit = this.emit.bind(this); } source: function OZW() { [native code] } ====> setConfigParam ====> requestConfigParam ====> requestAllConfigParams ====> hardReset ====> softReset ====> beginControllerCommand ====> cancelControllerCommand ====> getControllerNodeId ====> getSUCNodeId ====> isPrimaryController ====> isStaticUpdateController ====> isBridgeController ====> getLibraryVersion ====> getLibraryTypeName ====> getSendQueueCount ====> connect ====> disconnect ====> getNumGroups ====> getAssociations ====> getMaxAssociations ====> getGroupLabel ====> addAssociation ====> removeAssociation ====> testNetworkNode ====> testNetwork ====> healNetworkNode ====> healNetwork ====> setLocation ====> setName ====> switchAllOn ====> switchAllOff ====> getNodeNeighbors ====> refreshNodeInfo ====> setValue ====> enablePoll ====> disablePoll ====> isPolled ====> getPollInterval ====> setPollInterval ====> getPollIntensity ====> setPollIntensity ====> createScene ====> removeScene ====> getScenes ====> addSceneValue ====> removeSceneValue ====> sceneGetValues ====> activateScene Cannot load StringPrep-0.1.0 bindings. You may need to npm install node-stringprep Cannot load StringPrep-0.2.3 bindings (using fallback). You may need to npm install node-stringprep 14 Jun 20:14:10 - [info] User Directory : /home/wojtek/.node-red 14 Jun 20:14:10 - [info] Flows file : /home/wojtek/.node-red/flows_voipman.org.json 14 Jun 20:14:10 - [info] Server now running at http://127.0.0.1:1880/ 14 Jun 20:14:10 - [info] Starting flows 14 Jun 20:14:10 - [info] [mqtt-broker:a1e6a9c6.5e1958] Using compatibility mode for non-MQTT v3.1.1 brokers 14 Jun 20:14:10 - [info] [mqtt-broker:a88c156.f5773e8] Using compatibility mode for non-MQTT v3.1.1 brokers initializing new OpenZWave Controller: {"id":"970687f5.68f978","type":"zwave-controller","port":"/dev/ttyUSB0","driverattempts":"3","pollinterval":"500"} 2015-06-14 20:14:10.592 Error, Cannot find a path to the configuration files at /usr/local/lib/node_modules/openzwave-shared/lib/../deps/open-zwave/config/, Using /etc/openzwave/ instead... 2015-06-14 20:14:10.593 Info, Reading /etc/openzwave/options.xml for Options 2015-06-14 20:14:10.593 Info, Reading options.xml for Options Could Not Open OZW Log File. 2015-06-14 20:14:10.595 Always, OpenZwave Version 1.3.293 Starting Up 2015-06-14 20:14:10.595 Info, Setting Up Provided Network Key for Secure Communications 2015-06-14 20:14:10.595 Warning, Failed - Network Key Not Set 2015-06-14 20:14:10.596 Info, mgr, Added driver for controller /dev/ttyUSB0 2015-06-14 20:14:10.596 Info, Opening controller /dev/ttyUSB0 2015-06-14 20:14:10.596 Info, Trying to open serial port /dev/ttyUSB0 (attempt 1) ZWave Driver on /dev/ttyUSB0 is active! 14 Jun 20:14:10 - [info] [udp out:MiLight UDP send] udp ready : 255.255.255.255:8899 2015-06-14 20:14:10.607 Info, Serial port /dev/ttyUSB0 opened (attempt 1) 2015-06-14 20:14:10.609 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_VERSION: 0x01, 0x03, 0x00, 0x15, 0xe9 2015-06-14 20:14:10.609 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_MEMORY_GET_ID: 0x01, 0x03, 0x00, 0x20, 0xdc 2015-06-14 20:14:10.609 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES: 0x01, 0x03, 0x00, 0x05, 0xf9 2015-06-14 20:14:10.609 Detail, contrlr, Queuing (Command) FUNC_ID_SERIAL_API_GET_CAPABILITIES: 0x01, 0x03, 0x00, 0x07, 0xfb 2015-06-14 20:14:10.609 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_SUC_NODE_ID: 0x01, 0x03, 0x00, 0x56, 0xaa 2015-06-14 20:14:10.609 Detail, 2015-06-14 20:14:10.609 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x15) - FUNC_ID_ZW_GET_VERSION: 0x01, 0x03, 0x00, 0x15, 0xe9 2015-06-14 20:14:10.614 Detail, contrlr, Received: 0x01, 0x10, 0x01, 0x15, 0x5a, 0x2d, 0x57, 0x61, 0x76, 0x65, 0x20, 0x32, 0x2e, 0x37, 0x38, 0x00, 0x01, 0x9b 2015-06-14 20:14:10.614 Detail, 2015-06-14 20:14:10.614 Info, contrlr, Received reply to FUNC_ID_ZW_GET_VERSION: 2015-06-14 20:14:10.614 Info, contrlr, Static Controller library, version Z-Wave 2.78 2015-06-14 20:14:10.614 Detail, Node045, Expected reply was received 2015-06-14 20:14:10.614 Detail, Node045, Message transaction complete 2015-06-14 20:14:10.614 Detail, 2015-06-14 20:14:10.614 Detail, contrlr, Removing current message 2015-06-14 20:14:10.614 Detail, 2015-06-14 20:14:10.614 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x20) - FUNC_ID_ZW_MEMORY_GET_ID: 0x01, 0x03, 0x00, 0x20, 0xdc 2015-06-14 20:14:10.618 Detail, contrlr, Received: 0x01, 0x08, 0x01, 0x20, 0x01, 0x6a, 0x22, 0x67, 0x01, 0xf9 2015-06-14 20:14:10.618 Detail, 2015-06-14 20:14:10.618 Info, contrlr, Received reply to FUNC_ID_ZW_MEMORY_GET_ID. Home ID = 0x016a2267. Our node ID = 1 2015-06-14 20:14:10.618 Detail, Node106, Expected reply was received 2015-06-14 20:14:10.618 Detail, Node106, Message transaction complete 2015-06-14 20:14:10.618 Detail, 2015-06-14 20:14:10.618 Detail, contrlr, Removing current message 2015-06-14 20:14:10.618 Detail, 2015-06-14 20:14:10.618 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x05) - FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES: 0x01, 0x03, 0x00, 0x05, 0xf9 2015-06-14 20:14:10.622 Detail, contrlr, Received: 0x01, 0x04, 0x01, 0x05, 0x1c, 0xe3 2015-06-14 20:14:10.622 Detail, 2015-06-14 20:14:10.622 Info, contrlr, Received reply to FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES: 2015-06-14 20:14:10.622 Info, contrlr, There is a SUC ID Server (SIS) in this network. 2015-06-14 20:14:10.622 Info, contrlr, The PC controller is an inclusion static update controller (SUC) and was the original primary before the SIS was added. 2015-06-14 20:14:10.622 Detail, Node227, Expected reply was received 2015-06-14 20:14:10.622 Detail, Node227, Message transaction complete 2015-06-14 20:14:10.622 Detail, 2015-06-14 20:14:10.622 Detail, contrlr, Removing current message 2015-06-14 20:14:10.622 Detail, 2015-06-14 20:14:10.622 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x07) - FUNC_ID_SERIAL_API_GET_CAPABILITIES: 0x01, 0x03, 0x00, 0x07, 0xfb 2015-06-14 20:14:10.629 Detail, contrlr, Received: 0x01, 0x2b, 0x01, 0x07, 0x03, 0x07, 0x00, 0x86, 0x00, 0x02, 0x00, 0x01, 0xfe, 0x80, 0xfe, 0x88, 0x0f, 0x00, 0x00, 0x00, 0xfb, 0x97, 0x7f, 0x82, 0x07, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2 2015-06-14 20:14:10.629 Detail, 2015-06-14 20:14:10.629 Info, contrlr, Received reply to FUNC_ID_SERIAL_API_GET_CAPABILITIES 2015-06-14 20:14:10.629 Info, contrlr, Serial API Version: 3.7 2015-06-14 20:14:10.629 Info, contrlr, Manufacturer ID: 0x0086 2015-06-14 20:14:10.629 Info, contrlr, Product Type: 0x0002 2015-06-14 20:14:10.629 Info, contrlr, Product ID: 0x0001 2015-06-14 20:14:10.629 Detail, contrlr, Queuing (Command) FUNC_ID_ZW_GET_RANDOM: 0x01, 0x04, 0x00, 0x1c, 0x20, 0xc7 2015-06-14 20:14:10.629 Detail, contrlr, Queuing (Command) FUNC_ID_SERIAL_API_GET_INIT_DATA: 0x01, 0x03, 0x00, 0x02, 0xfe 2015-06-14 20:14:10.629 Detail, contrlr, Queuing (Command) FUNC_ID_SERIAL_API_SET_TIMEOUTS: 0x01, 0x05, 0x00, 0x06, 0x64, 0x0f, 0x97 2015-06-14 20:14:10.630 Detail, contrlr, Queuing (Command) FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION: 0x01, 0x07, 0x00, 0x03, 0x01, 0x02, 0x01, 0x00, 0xf9 2015-06-14 20:14:10.630 Detail, Node007, Expected reply was received 2015-06-14 20:14:10.630 Detail, Node007, Message transaction complete 2015-06-14 20:14:10.630 Detail, 2015-06-14 20:14:10.630 Detail, contrlr, Removing current message 2015-06-14 20:14:10.630 Detail, 2015-06-14 20:14:10.630 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x56) - FUNC_ID_ZW_GET_SUC_NODE_ID: 0x01, 0x03, 0x00, 0x56, 0xaa 2015-06-14 20:14:10.633 Detail, contrlr, Received: 0x01, 0x04, 0x01, 0x56, 0x01, 0xad 2015-06-14 20:14:10.633 Detail, 2015-06-14 20:14:10.633 Info, contrlr, Received reply to GET_SUC_NODE_ID. Node ID = 1 2015-06-14 20:14:10.633 Detail, Node173, Expected reply was received 2015-06-14 20:14:10.633 Detail, Node173, Message transaction complete 2015-06-14 20:14:10.633 Detail, 2015-06-14 20:14:10.633 Detail, contrlr, Removing current message 2015-06-14 20:14:10.633 Detail, 2015-06-14 20:14:10.633 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x1c) - FUNC_ID_ZW_GET_RANDOM: 0x01, 0x04, 0x00, 0x1c, 0x20, 0xc7 14 Jun 20:14:10 - [info] Started flows 14 Jun 20:14:10 - [info] [udp out:MiLight UDP send] udp broadcast ready : 8899 -> 255.255.255.255:8899 2015-06-14 20:14:10.688 Detail, contrlr, Received: 0x01, 0x25, 0x01, 0x1c, 0x01, 0x20, 0xdb, 0x42, 0x3a, 0x52, 0xf1, 0x08, 0x38, 0xf2, 0x65, 0x86, 0x19, 0x6a, 0xa3, 0x93, 0xa1, 0x42, 0x7f, 0x4f, 0xab, 0xaa, 0x41, 0x8f, 0x94, 0x6d, 0x73, 0xd6, 0x7c, 0x4e, 0x54, 0x42, 0x8b, 0x1e, 0x75 2015-06-14 20:14:10.688 Detail, 2015-06-14 20:14:10.688 Info, contrlr, Received reply to FUNC_ID_ZW_GET_RANDOM: true 2015-06-14 20:14:10.688 Detail, Node032, Expected reply was received 2015-06-14 20:14:10.688 Detail, Node032, Message transaction complete 2015-06-14 20:14:10.688 Detail, 2015-06-14 20:14:10.688 Detail, contrlr, Removing current message 2015-06-14 20:14:10.688 Detail, 2015-06-14 20:14:10.688 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x02) - FUNC_ID_SERIAL_API_GET_INIT_DATA: 0x01, 0x03, 0x00, 0x02, 0xfe 14 Jun 20:14:10 - [info] [mqtt-broker:a1e6a9c6.5e1958] Connected to broker: node-red-777@mqtt://localhost:1883 2015-06-14 20:14:10.739 Detail, contrlr, Received: 0x01, 0x25, 0x01, 0x02, 0x05, 0x08, 0x1d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0xca 2015-06-14 20:14:10.739 Detail, 2015-06-14 20:14:10.739 Info, mgr, Driver with Home ID of 0x016a2267 is now ready. 2015-06-14 20:14:10.739 Info, 2015-06-14 20:14:10.739 Info, contrlr, Received reply to FUNC_ID_SERIAL_API_GET_INIT_DATA: 2015-06-14 20:14:10.739 Info, contrlr, Node 001 - New 2015-06-14 20:14:10.739 Detail, Node001, AdvanceQueries queryPending=0 queryRetries=0 queryStage=None live=1 2015-06-14 20:14:10.739 Detail, Node001, QueryStage_ProtocolInfo 2015-06-14 20:14:10.739 Detail, Node001, Queuing (Query) Get Node Protocol Info (Node=1): 0x01, 0x04, 0x00, 0x41, 0x01, 0xbb 2015-06-14 20:14:10.739 Detail, Node001, Queuing (Query) Query Stage Complete (ProtocolInfo) 2015-06-14 20:14:10.739 Info, Node001, Initilizing Node. New Node: false (false) 2015-06-14 20:14:10.739 Detail, Node008, Expected reply was received 2015-06-14 20:14:10.739 Detail, Node008, Message transaction complete 2015-06-14 20:14:10.739 Detail, 2015-06-14 20:14:10.739 Detail, contrlr, Removing current message 2015-06-14 20:14:10.740 Detail, Node001, Notification: DriverReady 2015-06-14 20:14:10.740 Detail, Node001, Notification: NodeNew zwcallback(event: driver ready, args: {"id":"1cebcb82.e31434","type":"zwave-controller","_closeCallbacks":[null],"wires":[],"_wireCount":0,"name":"0x16a2267","port":"/dev/ttyUSB0","driverattempts":"3","pollinterval":"500","homeid":23732839}) 2015-06-14 20:14:10.741 Detail, Node001, Notification: NodeAdded 2015-06-14 20:14:10.741 Detail, 2015-06-14 20:14:10.741 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x06) - FUNC_ID_SERIAL_API_SET_TIMEOUTS: 0x01, 0x05, 0x00, 0x06, 0x64, 0x0f, 0x97 zwcallback(event: node added, args: {"nodeid":1}) 2015-06-14 20:14:10.745 Detail, contrlr, Received: 0x01, 0x05, 0x01, 0x06, 0x96, 0x0f, 0x64 2015-06-14 20:14:10.745 Detail, 2015-06-14 20:14:10.745 Info, contrlr, Received reply to FUNC_ID_SERIAL_API_SET_TIMEOUTS 2015-06-14 20:14:10.745 Detail, Node015, Expected reply was received 2015-06-14 20:14:10.745 Detail, Node015, Message transaction complete 2015-06-14 20:14:10.745 Detail, 2015-06-14 20:14:10.745 Detail, contrlr, Removing current message 2015-06-14 20:14:10.745 Detail, 2015-06-14 20:14:10.745 Info, contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x00) - FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION: 0x01, 0x07, 0x00, 0x03, 0x01, 0x02, 0x01, 0x00, 0xf9 2015-06-14 20:14:10.747 Detail, contrlr, Removing current message 2015-06-14 20:14:10.747 Detail, 2015-06-14 20:14:10.748 Info, Node001, Sending (Query) message (Callback ID=0x00, Expected Reply=0x41) - Get Node Protocol Info (Node=1): 0x01, 0x04, 0x00, 0x41, 0x01, 0xbb 2015-06-14 20:14:10.753 Detail, Node001, Received: 0x01, 0x09, 0x01, 0x41, 0x92, 0x16, 0x00, 0x02, 0x02, 0x01, 0x33 2015-06-14 20:14:10.754 Detail, 2015-06-14 20:14:10.754 Info, Node001, Received reply to FUNC_ID_ZW_GET_NODE_PROTOCOL_INFO 2015-06-14 20:14:10.754 Info, Node001, Protocol Info for Node 1: 2015-06-14 20:14:10.754 Info, Node001, Listening = true 2015-06-14 20:14:10.754 Info, Node001, Beaming = true 2015-06-14 20:14:10.754 Info, Node001, Routing = false 2015-06-14 20:14:10.754 Info, Node001, Max Baud Rate = 40000 2015-06-14 20:14:10.754 Info, Node001, Version = 3 2015-06-14 20:14:10.754 Info, Node001, Security = false 2015-06-14 20:14:10.758 Info, Node001, Basic device class (0x02) - Static Controller 2015-06-14 20:14:10.759 Info, Node001, Generic device Class (0x02) - Static Controller 2015-06-14 20:14:10.759 Info, Node001, Specific device class (0x01) - Static PC Controller 2015-06-14 20:14:10.759 Info, Node001, COMMAND_CLASS_BASIC is not mapped 2015-06-14 20:14:10.759 Info, Node001, Mandatory Command Classes for Node 1: 2015-06-14 20:14:10.759 Info, Node001, None 2015-06-14 20:14:10.759 Info, Node001, Mandatory Command Classes controlled by Node 1: 2015-06-14 20:14:10.759 Info, Node001, COMMAND_CLASS_BASIC 2015-06-14 20:14:10.759 Detail, Node022, Expected reply was received 2015-06-14 20:14:10.759 Detail, Node022, Message transaction complete 2015-06-14 20:14:10.759 Detail, 2015-06-14 20:14:10.759 Detail, Node001, Removing current message 2015-06-14 20:14:10.759 Detail, Node001, Notification: NodeProtocolInfo 2015-06-14 20:14:10.759 Detail, Node001, Notification: ValueAdded 2015-06-14 20:14:10.759 Detail, Node001, Query Stage Complete (ProtocolInfo) 2015-06-14 20:14:10.759 Detail, Node001, AdvanceQueries queryPending=0 queryRetries=0 queryStage=Probe live=1 2015-06-14 20:14:10.759 Detail, Node001, QueryStage_Probe 2015-06-14 20:14:10.760 Detail, Node001, QueryStage_WakeUp 2015-06-14 20:14:10.760 Detail, Node001, QueryStage_ManufacturerSpecific1 2015-06-14 20:14:10.760 Detail, Node001, Load Controller Manufacturer Specific Config zwcallback(event: value added, args: {"nodeid":1,"cmdclass":32,"instance":1,"cmdidx":0,"currState":0}) 2015-06-14 20:14:10.773 Detail, Node001, QueryStage_SecurityReport 2015-06-14 20:14:10.773 Detail, Node001, QueryStage_ManufacturerSpecific2 2015-06-14 20:14:10.773 Detail, Node001, QueryStage_Versions 2015-06-14 20:14:10.773 Detail, Node001, QueryStage_Instances 2015-06-14 20:14:10.773 Info, Node001, Essential node queries are complete 2015-06-14 20:14:10.773 Detail, Node001, QueryStage_Static 2015-06-14 20:14:10.773 Detail, Node001, QueryStage_Associations 2015-06-14 20:14:10.773 Detail, Node001, QueryStage_Neighbors 2015-06-14 20:14:10.773 Detail, Requesting routing info (neighbor list) for Node 1 2015-06-14 20:14:10.773 Detail, Node001, Queuing (Command) Get Routing Info (Node=1): 0x01, 0x07, 0x00, 0x80, 0x01, 0x00, 0x00, 0x03, 0x7a 2015-06-14 20:14:10.773 Detail, Node001, Queuing (Query) Query Stage Complete (Neighbors) 2015-06-14 20:14:10.773 Detail, Node001, Notification: EssentialNodeQueriesComplete 2015-06-14 20:14:10.774 Detail, 2015-06-14 20:14:10.774 Info, Node001, Sending (Command) message (Callback ID=0x00, Expected Reply=0x80) - Get Routing Info (Node=1): 0x01, 0x07, 0x00, 0x80, 0x01, 0x00, 0x00, 0x03, 0x7a 2015-06-14 20:14:10.780 Detail, Node001, Received: 0x01, 0x20, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e 2015-06-14 20:14:10.780 Detail, 2015-06-14 20:14:10.780 Info, Node001, Received reply to FUNC_ID_ZW_GET_ROUTING_INFO 2015-06-14 20:14:10.780 Info, Node001, Neighbors of this node are: 2015-06-14 20:14:10.780 Info, Node001, (none reported) 2015-06-14 20:14:10.780 Detail, Expected reply was received 2015-06-14 20:14:10.780 Detail, Message transaction complete 2015-06-14 20:14:10.780 Detail, 2015-06-14 20:14:10.780 Detail, Node001, Removing current message 2015-06-14 20:14:10.780 Detail, Node001, Query Stage Complete (Neighbors) 2015-06-14 20:14:10.780 Detail, Node001, AdvanceQueries queryPending=0 queryRetries=0 queryStage=Session live=1 2015-06-14 20:14:10.780 Detail, Node001, QueryStage_Session 2015-06-14 20:14:10.780 Detail, Node001, QueryStage_Dynamic 2015-06-14 20:14:10.780 Detail, Node001, QueryStage_Configuration 2015-06-14 20:14:10.780 Detail, Node001, QueryStage_Complete 2015-06-14 20:14:10.780 Warning, CheckCompletedNodeQueries m_allNodesQueried=0 m_awakeNodesQueried=0 2015-06-14 20:14:10.780 Warning, CheckCompletedNodeQueries all=1, deadFound=0 sleepingOnly=1 2015-06-14 20:14:10.780 Info, Node query processing complete. 2015-06-14 20:14:10.780 Detail, Node001, Notification: NodeQueriesComplete 2015-06-14 20:14:10.780 Detail, contrlr, Notification: AllNodesQueried zwcallback(event: node ready, args: {"nodeid":1,"nodeinfo":{"manufacturer":"Aeon Labs","manufacturerid":"0086","product":"Z-Stick S2","producttype":"0002","productid":"0001","type":"Static PC Controller","name":"","loc":""}}) ZWave network scan complete. zwcallback(event: scan complete, args: {})

On Jun 14, 2015, at 5:15 PM, Elias Karakoulakis notifications@github.com wrote:

Hey, Wojciech good news!. After spending some time on the issue, I've managed to get this baby working, at least for running the basic test.js under 0.12.x. Give it a try, and tell me your results.

— Reply to this email directly or view it on GitHub https://github.com/OpenZWave/node-openzwave-shared/issues/2#issuecomment-111876517.

ekarak commented 9 years ago

ok then I think we can consider this issue closed.