Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

poll intensity setting ignored #273

Open
stradiot opened this issue Mar 3, 2019 · 3 comments
Open

poll intensity setting ignored #273

stradiot opened this issue Mar 3, 2019 · 3 comments

Comments

@stradiot
Copy link

stradiot commented Mar 3, 2019

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.

zwave-bug-01

zwave-bug

@guymcswain
Copy link

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.

@stradiot
Copy link
Author

stradiot commented Mar 4, 2019

@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().

@robertsLando
Copy link
Member

@ekarak any news about this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants