victronenergy / node-red-contrib-victron

MIT License
94 stars 18 forks source link

Make dbus poll interval configurable #143

Closed dirkjanfaber closed 2 years ago

dirkjanfaber commented 2 years ago

Currently hardcoded at 5 seconds: https://github.com/victronenergy/node-red-contrib-victron/blob/ce911ff119180ed4caa66483b5fc5a737f410c22/src/services/dbus-listener.js#L33

A configurable setting would be the best solution (e.g. dropdown for 1, 3, 5 or 10 seconds).

See also https://community.victronenergy.com/questions/152885/update-interval-of-victron-input-node-in-node-red.html

dirkjanfaber commented 2 years ago

Note that this 5 seconds is only valid for polling to see if there are new services available.

When monitored values change, they are send directly to the flow. Checking this can easily be done by debugging the Generator / Runtime in seconds input node and looking at the debugging. Almost every second of runtime can be seen as well as some double values.

dirkjanfaber commented 2 years ago

When testing this on the digital input (by setting a pulse on the input), the updates are not immediately send. This located a bug in parsing the incoming ItemsChanged.

Closing this issue and created a new one for this bug (#145).