Hi,
I'm sending all data from NodeRED to the InfluxDB cloud. Because of costs, I need to reduce the update interval to 30 secs. Is there any way to configure it? (config file which survives Venus OS update)
Thx
This site is now in read-only archive mode. Please move all discussion, and create a new account at the new Victron Community site.
Hi,
I'm sending all data from NodeRED to the InfluxDB cloud. Because of costs, I need to reduce the update interval to 30 secs. Is there any way to configure it? (config file which survives Venus OS update)
Thx
This is not useful because messages are received randomly. Some every xy seconds, some when values are changed. If I limit to for example 100 messages per 30 seconds, first 5 seconds, some fields will be updated several times and some never, and another 25 seconds will be silent. I need a batch time-based function (as implemented in nodered), but with averaging every field in meantime.
In that case I would store the irregular updating value to a context. E.g. flow.myvalue.
And have an inject node running every 30 seconds that reads flow.myvalue into msg.payload and passes that to the influxdb node. Something like:
Not sure what you mean by averaging every field in the mean time though. You might want to take a look at https://flows.nodered.org/node/node-red-contrib-rate-avg for that.
See https://gist.github.com/dirkjanfaber/188d5abb4dc134b6d31987783739bae3 for the flow of the above example.
I would have to configure the change node for each field separately. In addition, Victron only sends payload and the field name is in msg.topic. I solved this using node-red-contrib-calculate
Instead of using a change node, you can also use a simple function doing something like:
global.set(msg.topic.replace(' - ', '').replace(/\//g, '.'), msg.payload);
Webinar Part 1 - Intro to Node-Red
Webinar Part 2- Basic Palettes
Webinar Part 3 - Advanced example
Victron Node-RED for dummies guide by Fideri
Node Red Community Space (normally hidden)
Venus OS Large (Node-RED) manual
Victron Node-RED github readme
Victron Node-RED custom nodes docs
Experiments, Modifications and Adaptions. Mods (Modifications) can be made to Victron Software by the Community. Please use the modifications space for enthusiasts who want to push what is possible, without official Victron Support.
38 People are following this question.