Page 1 of 1

communicate with two razberry in C api ??

Posted: 15 Oct 2015 13:06
by laweee
I have two razberry+raspberry pi and, two monitor etc..

so I use this code in the web ZWaveAPI/Run/devices[2].instances[0].commandClasses[38].Set(130)
in that code, first device send data(like level,in this case 130) to the second raspberry.
and
I check that second device can catch this data(130) at the log
but I can not find the code which can receive the data(130)

I use z-way-test from your site.( I didn't change any code)
I can find sending code but can not find receiving code.

I want to use that data(130)
how can i use the data in C code??

i found ZWEXPORT ZWError zdata_get_integer(const ZDataHolder data, int *value); from ZData.h
if I use the code "ZWaveAPI/Run/devices[2].instances[0].commandClasses[38].Set(130)" in first rasp,
what values do I insert in zdata_get_integer(here) at second rasp for using data(130)?? and, that function(zdata_get_integer) returns ZWError, how can i use data(130)??

It's long question but thank you for your help!!!!! I appreciate!!!:D

Re: communicate with two razberry in C api ??

Posted: 02 Nov 2015 02:52
by PoltoS
You should see in the log the correct value to catch (re-check the log).

Should look like:
zway.devices[1].commandClass[38].data.level.value
Also check
zway.devices[1].commandClass[38].data.srcNode.value
to check who is the sender.

Re: communicate with two razberry in C api ??

Posted: 02 Nov 2015 02:53
by PoltoS
And yes, you can use callbacks on the server side:
zway.devices[1].commandClass[38].data.level.bind(...)