Open stradiot opened 5 years ago
The polling documentation is a bit confusing to me (a relative noob to openzwave). To wit:
openz-wave/Manager.h
* \brief Enable the polling of a device's state.
* \param _valueId The ID of the value to start polling.
* \param _intensity, number of polling for one polling interval.
* \return True if polling was enabled.
*/
bool EnablePoll( ValueID const &_valueId, uint8 const _intensity = 1 );
node-openzwave-shared/…/README-api.md
zwave.setPollIntensity({valueId}, intensity); // Set the frequency of polling (0=none, 1=every time through the list, 2-every other time, etc)
open-wave/Options.cpp "IntervalBetweenPolls": false // if false, try to execture the entire poll list within the PollInterval time frame.
My feeble suggestion is to try overriding the option default on "IntervalBetweenPolls". Ie, in your option object for the zwave constructor add the property IntervalBetweenPolls: true
. I stopped playing around with polling after I realized my devices were 'modern' and didn't need to be polled.
@guymcswain thank you for suggestion. Unfortunately passing IntervalBetweenPolls: true
doesn't seem to affect mentioned behaviour. Moreover, I found out that if I try to enable polling with intensity of 0, attribute polled in valueId object passed on value changed event is set to false, which is expected and IMHO correct behaviour, but the polling still presist and can only be stopped by caliing zwave.disablePoll()
.
@ekarak any news about this?
Hello, I am trying to set polling for specific value on my zwave device, but it seems like pollIntensity attribute in enablePoll function is being ignored. Instead, value is polled on every iteration of poll interval.
I tried to set my polling interval to 1 second (1000 ms) and polling intensity for valueId to 20. If I understand correctly, specified valueId should be polled every 20th iteration of polling interval, therefore every 20 seconds.
As you can see in the screenshot below, this is not the case, as specified valueId is polled each second.
EDIT: Also, I should add that I am using OpenZWave version 1.5.0. I don't know if it makes any difference though.