Page 1 of 1
zway_cc_switch_multilevel_get sends two requests per call?
Posted: 12 Feb 2017 03:43
by novalis
The first time that I call zway_cc_switch_multilevel_get(), one request is sent to the device as expected. Subsequent calls, however, seem to send two requests back to back, approximately one second apart. Is there some way to prevent this inappropriate behavior?
Re: zway_cc_switch_multilevel_get sends two requests per cal
Posted: 13 Feb 2017 15:00
by PoltoS
This is made to track smooth changes of dimmer values. If two subsequent values are equal, we stop polling.
This is done because some dimmers on Set() + Get() reports some intermediate value and do not report at the end of dimming. Also this is good for blinds, since you can see the shades moving in the UI
Re: zway_cc_switch_multilevel_get sends two requests per cal
Posted: 19 Feb 2017 05:05
by novalis
So there's no way to get the driver to only do what I tell it to do? Is it possible to get the source code for the driver to compile a version that only does what it's told to do?
Re: zway_cc_switch_multilevel_get sends two requests per cal
Posted: 27 Feb 2017 23:17
by PoltoS
no, you can not disable it in current versions. May be we should add such a flag.
Why does it harm you?
Re: zway_cc_switch_multilevel_get sends two requests per cal
Posted: 04 Mar 2017 23:31
by novalis
Well, in my case I'm monitoring the level of a multilevel switch. The particular switches I'm monitoring send a nodeinfo packet every time they are toggled, and will not respond to queries for one second after they have sent a nodeinfo packet, so in order to provide timely information to the GUI, I toggle the state of the switch whenever I receive a nodeinfo packet, and then I send a get request to the switch to make sure I'm still in sync with it. When it responds I know not to toggle the internal state again because I know it's responding to the request I sent, but then the zway driver sends another request which I do not know about since I did not tell it to do that. It's very annoying for a low level driver to decide to do things it was not told to do by the application layer

Re: zway_cc_switch_multilevel_get sends two requests per cal
Posted: 04 Mar 2017 23:32
by novalis
By which I mean to say, a flag to tell it to only send one request would be fantastic!

Re: zway_cc_switch_multilevel_get sends two requests per cal
Posted: 05 Mar 2017 13:48
by PoltoS
We can completelly disable it (via Defaults.xml file).
Re: zway_cc_switch_multilevel_get sends two requests per cal
Posted: 19 Mar 2017 22:53
by novalis
Fantastic, how do I do that? Also, similarly I've just noticed that when I issue a *_set() command, the driver inserts an unrequested _get() command every time as well (I haven't checked all CCs, but I've seen this for switch_multivlevel_set() and switch_binary_set()). Can this behavior also be disabled in the Defaults.xml file?
Re: zway_cc_switch_multilevel_get sends two requests per cal
Posted: 20 Mar 2017 00:00
by PoltoS
This is not done yet. We will include it in our list of todo, but not sure it will come soon.
As for Get after Set, it is done in all CCs to understand if the command was applied or not.