-
Notifications
You must be signed in to change notification settings - Fork 18
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
Bugfix: stop polling every five seconds #147
Comments
It appears that this can also be seen as a feature, so disabling this might disappoint some users. Perhaps the better alternative is to start using the config node and making it configurable. And consider sending a cached answer instead of poling again. |
@dirkjanfaber I certainly use this as a feature, for example I use it for smoothing, to create daily totals and for limit checking. There are easy workarounds but it could make a lot of extra work and testing for some users with established systems. Caching would be sensible and invisible to users. |
Hi, What is the node-red common practice for this? For those flows that need repeat values, a node will exist already to take care of that I’d think? |
@mpvader I have used the combination of saving in You are welcome to look at my code if you want - remote access is enabled and Site name is NB Corinna. But note:
|
So if I get only changes how do I tell everything is working? If I want to get notified about potential error condition of missing data how do I do that? Afaik there is no canonical way to do this in NR, depends on how the data is produced. A switch closes and triggers an update via interrupt vs a temperature sensor is read periodically. I’d make polling interval configurable and maybe add an option to send only changes, not change the default behavior. Nor would i classify this as a bugfix. |
With the status node, one can check if the node still is connected, which indicates that everything is still working. That being said, I understand the concerns and benefits about getting data every x seconds. Fetching the answer from the cache instead of from the dbus will decrease the bus load, which should be the default. Basically re-sending the last answer periodically. Getting it in a configuration pane is what I aim for. Perhaps even with the non-default choice of making it possible to enable fetching fresh data every x seconds from the dbus instead of from the cache. |
Hey Dirk-Jan, if everybody prefers it the way it is now, resending every five seconds, with added benefit that 100% there is nothing going wrong thats related to a cache (and caches often cause issues...), simply by not having a cache: then for me its also fine to just leave it all as is now. The bit of extra D-Bus load is acceptable to me. |
I vote for keeping the 5s poll or, if making it configurable, keep it as the default. |
This makes an input node only send out changes if the 'onlyChanges' checkbox is checked. As it acts on the dbus ItemsChanged property, an initial value will not be send.
Closing this issue (merged with master) |
Currently the nodes poll every five seconds for information. Even when the information remains the same, it is pushed through the flow again. This should be changed by pushing it only once on startup and on change.
The text was updated successfully, but these errors were encountered: