# Count 10 minutes rainfall over 24 hours (aggregation node)

**URL:** <https://discourse.nodered.org/t/count-10-minutes-rainfall-over-24-hours-aggregation-node/40317>\
**Category:** General\
**Created:** [3 February 2021 14:56 UTC](https://discourse.nodered.org/t/count-10-minutes-rainfall-over-24-hours-aggregation-node/40317 "2021-02-03T14:56:14Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![HaVi](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@HaVi](https://discourse.nodered.org/u/HaVi)\
**Post date:** [3 February 2021 14:56 UTC](https://discourse.nodered.org/t/count-10-minutes-rainfall-over-24-hours-aggregation-node/40317/1 "2021-02-03T14:56:14Z")

</div>

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](https://flows.nodered.org/node/node-red-contrib-aggregator)

 ![NR](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/6/262f0863dd9d17fef330768e1a5e08a25a85a6f0.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [3 February 2021 15:18 UTC](https://discourse.nodered.org/t/count-10-minutes-rainfall-over-24-hours-aggregation-node/40317/2 "2021-02-03T15:18:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![HaVi](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@HaVi](https://discourse.nodered.org/u/HaVi)\
**Post date:** [3 February 2021 15:29 UTC](https://discourse.nodered.org/t/count-10-minutes-rainfall-over-24-hours-aggregation-node/40317/3 "2021-02-03T15:29:28Z")

</div>

Thanks Colin, is this what you mean:

 ![Screenshot](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/0/6091fe38974e6e28b02027cbeb81e3cd59c4f719.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [3 February 2021 16:03 UTC](https://discourse.nodered.org/t/count-10-minutes-rainfall-over-24-hours-aggregation-node/40317/4 "2021-02-03T16:03:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![HaVi](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@HaVi](https://discourse.nodered.org/u/HaVi)\
**Post date:** [3 February 2021 16:27 UTC](https://discourse.nodered.org/t/count-10-minutes-rainfall-over-24-hours-aggregation-node/40317/5 "2021-02-03T16:27:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![HaVi](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@HaVi](https://discourse.nodered.org/u/HaVi)\
**Post date:** [4 February 2021 11:13 UTC](https://discourse.nodered.org/t/count-10-minutes-rainfall-over-24-hours-aggregation-node/40317/6 "2021-02-04T11:13:43Z")

</div>

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.

 ![NR](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/d/5d5aa3c58cc5cc241c586a726c7e3f05f89f5815.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [4 February 2021 11:41 UTC](https://discourse.nodered.org/t/count-10-minutes-rainfall-over-24-hours-aggregation-node/40317/7 "2021-02-04T11:41:25Z")

</div>

I said how to do it

> [@Colin](#):
>
> Move msg.payload.neerslag To msg.payload

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/d/bd9d6b93b937a42f96ee3c216f7af1ceb57679a6.png)

---

<div class="post-metadata">

**Author:** ![HaVi](https://avatars.discourse-cdn.com/v4/letter/h/b3f665/32.png) [@HaVi](https://discourse.nodered.org/u/HaVi)\
**Post date:** [4 February 2021 11:55 UTC](https://discourse.nodered.org/t/count-10-minutes-rainfall-over-24-hours-aggregation-node/40317/8 "2021-02-04T11:55:43Z")

</div>

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 😉

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [4 February 2021 12:02 UTC](https://discourse.nodered.org/t/count-10-minutes-rainfall-over-24-hours-aggregation-node/40317/9 "2021-02-04T12:02:31Z")

</div>

> [@HaVi](#):
>
> English is not my native language and that is why I did not understand it immediately

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.

> [@HaVi](#):
>
> To enjoy the result it has to rain but nobody on this forum can help me with that

We could suggest getting an umbrella 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [18 February 2021 12:02 UTC](https://discourse.nodered.org/t/count-10-minutes-rainfall-over-24-hours-aggregation-node/40317/10 "2021-02-18T12:02:36Z")

</div>

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