Average function in node red

So basically I have a mqtt in and I want to do a chart with the average values of the mqtt in ( temperature sensor) and I need help creating that.
Do I need a function node between the mqtt in and the chart? And what is the code that I should do?
Thanks

Start simple.

Install node-red-node-smooth (node) - Node-RED & get the average working.

Then figure out how to send that to a chart.

Or start with a different simple, and get the chart going without smoothing, and then insert the Smooth node.

Note: the smooth node works over a fixed number of readings so if you continuously get data you can work out many samples equals the time period you want to smooth over. If they arrive randomly then you can’t :slight_smile:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.