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??
what is the code of get "level" about CC 38 of Instance 0 of
Re: what is the code of get "level" about CC 38 of Instance
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
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));