communicate with two razberry in C api ??

Discussions about RaZberry - Z-Wave board for Raspberry computer
Post Reply
laweee
Posts: 4
Joined: 05 Oct 2015 15:58

communicate with two razberry in C api ??

Post 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
User avatar
PoltoS
Posts: 7649
Joined: 26 Jan 2011 19:36

Re: communicate with two razberry in C api ??

Post 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.
User avatar
PoltoS
Posts: 7649
Joined: 26 Jan 2011 19:36

Re: communicate with two razberry in C api ??

Post by PoltoS »

And yes, you can use callbacks on the server side:
zway.devices[1].commandClass[38].data.level.bind(...)
Post Reply