Batch node and how to access the content

How do i access the values in a batch node ? i have set it up so 10 readings from my sensor gets added to the batch file and it then sends it to the cloud. but i would rather have the average number of these ten readings. batch = msg.complete, payload = msg.payload

send the output to a join node and from there you could use a function node to compute the average or possible some contrib node

If you look at the info panel for the join node - you can see it has a "reduce" mode - with an example that does indeed calculate the average of the values for you.

I thought you were already using a Join node, as you indicated in your original thread

Sorry about that, it worked but not as intended. i am experimenting with different types of approaches. for different functions. i am not very familiar with node red as i am to python, java and js. currently thinking to just use the function nodes all the way ^^

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