# Water sensor with node RED

**URL:** <https://discourse.nodered.org/t/water-sensor-with-node-red/51197>\
**Category:** General\
**Created:** [18 September 2021 09:43 UTC](https://discourse.nodered.org/t/water-sensor-with-node-red/51197 "2021-09-18T09:43:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![maury77](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/maury77/32/48205_2.png) [@maury77](https://discourse.nodered.org/u/maury77)\
**Post date:** [18 September 2021 09:43 UTC](https://discourse.nodered.org/t/water-sensor-with-node-red/51197/1 "2021-09-18T09:43:22Z")

</div>

Hello I have a wemos D1 mini to count the pulses of the water sensor  
the wemos resets the value of the pulses at every power off.

Is it possible with node red to create a sensor that can keep the total count of liters even after the reset of the tasmota?

thanks

---

<div class="post-metadata">

**Author:** ![Gunner](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gunner/32/43582_2.png) [@Gunner](https://discourse.nodered.org/u/Gunner)\
**Post date:** [18 September 2021 09:49 UTC](https://discourse.nodered.org/t/water-sensor-with-node-red/51197/2 "2021-09-18T09:49:12Z")

</div>

Hello and welcome to the forum.

Short answer... Yes 😉

Long answer may depend on how you want to store and/or display the data and what have you tried so far.

---

<div class="post-metadata">

**Author:** ![maury77](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/maury77/32/48205_2.png) [@maury77](https://discourse.nodered.org/u/maury77)\
**Post date:** [18 September 2021 14:49 UTC](https://discourse.nodered.org/t/water-sensor-with-node-red/51197/3 "2021-09-18T14:49:41Z")

</div>

I have senor on tasmota with the pulse

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

I have a sensor on HA with 3 metere (daily , montly and yearly) but I want a totalizer of all consume but with th reset of tasmota I can view total liter of house of all year

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/f/cf4c1b3687a8f78f62845a2f2eece8ff1f9f7585.png)

thanks

---

<div class="post-metadata">

**Author:** ![maury77](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/maury77/32/48205_2.png) [@maury77](https://discourse.nodered.org/u/maury77)\
**Post date:** [18 September 2021 14:53 UTC](https://discourse.nodered.org/t/water-sensor-with-node-red/51197/4 "2021-09-18T14:53:37Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/d/1d4c71ada6762b78f6c3be01f6ffe38c2b93a4e6.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:** [18 September 2021 15:21 UTC](https://discourse.nodered.org/t/water-sensor-with-node-red/51197/5 "2021-09-18T15:21:25Z")

</div>

If you want to store data over a period of months or years then I recommend using Influxdb to store the data. You can extract it to display simple stats in node red or you can use Grafana to give you more sophisticated views.

How often does the water meter send a pulse?

---

<div class="post-metadata">

**Author:** ![maury77](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/maury77/32/48205_2.png) [@maury77](https://discourse.nodered.org/u/maury77)\
**Post date:** [18 September 2021 18:07 UTC](https://discourse.nodered.org/t/water-sensor-with-node-red/51197/6 "2021-09-18T18:07:45Z")

</div>

I want not ad all history but only total counter.

I use this schema with 94 pulse every liter

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/2/82fc39dcbd867bb6c6a416fd24d242b74e6a4961.jpeg)

---

<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:** [18 September 2021 19:58 UTC](https://discourse.nodered.org/t/water-sensor-with-node-red/51197/7 "2021-09-18T19:58:36Z")

</div>

> [@maury77](#):
>
> I want not ad all history but only total counter.

In that case you can keep the total in persistent context. Check the node red docs for using context.

---

<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:** [17 November 2021 19:58 UTC](https://discourse.nodered.org/t/water-sensor-with-node-red/51197/8 "2021-11-17T19:58:50Z")

</div>

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