what is the code of get "level" about CC 38 of Instance 0 of

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

what is the code of get "level" about CC 38 of Instance 0 of

Post by laweee »

you say : If you are using C, you need to use zway_cc_switch_multilevel_set() and access dataholder "level" on CC 38 of Instance 0 of device 2.

then, if I using zway_cc_switch_multilevel_get() method, can i get the value "level" ?? the method return ZWError ...
or
what is the code of get "level" about CC 38 of Instance 0 of device 2?
or
where can i see the method or thread about getting "level" value which is come from other device??
pofs
Posts: 688
Joined: 25 Mar 2011 19:03

Re: what is the code of get "level" about CC 38 of Instance

Post by pofs »

zway_cc_switch_multilevel_get() only queues "get value" request to device. First of all, it is not necessarily sent out immediately, because device may be sleeping (so it will postpone sending until device is awake). Second, device might answer that request with delay, or not reply at all. That's why

But if/when device decides to report its state to controller, it will send "report value" packet, which will update data holders in z-way. And you may poll their value or subscribe to change notifications.

There's a code sample to display data holder value in z-way-test. For your particular device, it would be

Code: Select all

zdata_acquire_lock(ZDataRoot(zway));
dump_data(zway, zway_find_device_instance_cc_data(zway, 2, 0, 38, "level"));
zdata_release_lock(ZDataRoot(zway));
Post Reply