Count 10 minutes rainfall over 24 hours (aggregation node)

My rain sensor measures rainfall in a 10 minute interval. The number of millimeters is sent every 10 minutes via LoRaWan (TTN) to NodeRED in the format payload.neerslag (like 0.55 mm).

I want to display what the precipitation is per day and therefore I want to use the aggregator node to add up the rainfall of 10 minutes each over 24 hours. Unfortunately that doesn't work well, the debug output is always NaN.

Can anyone let me know how to get this working?

Aggregator node:

https://flows.nodered.org/node/node-red-contrib-aggregator

I have not used that node, but I suspect it needs the value in the payload rather than in an object in the payload, if so then insert a Change node to move the value into the payload.

Thanks Colin, is this what you mean:

No that is setting msg.payload.neerslag to contain a string "neerslag"
You want to Move msg.payload.neerslag To msg.payload
Then feed it into a debug node to check it is working.

Appreciated! Just edited my settings and now I need to wait what happens. I'll keep you informed.

After I tested the change node in all kinds of ways, it was not possible to convert the payload into a clean value (the precipitation, in the picture the value in mm 1.1176). That will most likely be due to my lack of knowledge so I hope someone has a solution.

I said how to do it

image

1 Like

English is not my native language and that is why I did not understand it immediately Colin. Now it works, thank you for your help and patience.

To enjoy the result it has to rain but nobody on this forum can help me with that :wink:

OK, it is easy to forget to make allowances. You are doing a lot better than I would do if I had to use your language.

We could suggest getting an umbrella :slight_smile:

1 Like

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