At the moment i’am running ESPHome on a WeMos D1 , with a connected NPN inductive sensor .
This sensor read’s the pulse on the Elster water meter .
I think al few others ( Dutch guys) running the same config , coud you help me sharing you’re sensor’s / config ?
I would be nice to read out this : current L used , L(iters) used today, and probably L/hour (flow).
At the moment i only get this last sensor running, using this in de yaml:
So the first part : pulse counter returns with some nice real team L/min used ( counted pulses)
The 2nd part: is just a total count from the pulses from part 1 .
The 3rd part is the test a did to return a better total count of pulses ( L a day) used , instead of the 25 multiplier . But this part isn’t working and gives a “nan” in the log files .
What did i want to know: the total L/min (part 1), total day usage , total weer usage, total usage overall
I think I see what you are trying to do in the third part, but I am not sure your logic is correct. Simply adding up your rate of usage is not going to work.
- alias: Water Consumption at start of the day
trigger:
platform: time
at: 00:00:00
action:
service: input_number.set_value
data_template:
entity_id: input_number.midnight_water_consumption
value: '{{ states.sensor.waterverbruik.state }}'
Did you figure out the code?
I have a lt/min sensor and a total daily liters sensor that resets every night at 12, set up at an ESP and getting the values in HA.
I’m trying to set up an integration and a utility meter sensor, but im having some trouble understanding how they work.
i’m having troubles as well. I have a gallons/min sensor that i’m trying to track with a Utility Meter sensor, but the Utility Meter is not incrementing every minute by the state value of the gpm sensor… it’s also not linear, so i’m really confused on what it’s summing up.
I can’t specify what flow rate the Utility Meter is observing… perhaps it thinks my sensor is hourly?
hmmm… so 222 gallons after 7 hours today is a rate of 30 gallons per hour (approximately)… i think the hourly might be right? Would love to hear anyone that has worked with the utility meter more closely weigh in…
otherwise i might create a template sensor that converts my Gallons/Minute to Gallons/Hour and have the utility meter track the latter
Created the per hours sensor and tracked it via the utility meter for a day. While the summed quantity in the Utility Meter looks closer to what i’d expect, it still seems like mostly a linear slope for the whole day, but from my sensor, it should have changed between 30 gpm, 20 gpm, and ~5 gpm depending on time of day…
I’ve re-read the documentation a few times and I’m assuming the utility meter should be taking the integral of the sensor I configured… but the docs dont’ explicitly state how it works. Anyone familiar with would be great to get some advice
On the tail end of my sensors, you can see the slope changing a bit… i’m going to watch it for another day or so and I can check back in (apologies for commandeering this thread if i’m off topic)… I’m also considering using a combination of the Integration sensor for finding the integral and a history stats sensor to compile what i thought Utility Meter was supposed to be doing for me (less tarrifs which i don’t need).
Yeh - that makes sense and i was suspecting i was doing that wrong more and more. Thanks nickrout… I’ve created and integral sensor and am tracking new metrics for a day and will post back my conclusion – seems like this new setup is working properly.
Here’s where I ended up… I hope this helps others.
I have a sensor that detects the rate of water flow (out of a pump for my pool) in gallons per minute. Here’s what its past 24 hours looked like changing rates throughout the day:
I then needed to create an “integration sensor” to sum up the integral (the area under the GPM line) which will give me the quantity of gallons pumped:
That number seemingly never resets (maybe on restarts?), so i needed a sensor that summed up the difference from midnight to now. Possibly could have done this with a combination of Statistics sensors and template sensors … but the Utility Meter did exactly what i needed:
The last thing I added was a “turn overs today” sensor which is just a simple template sensor with some algebra, but it’s based on top of all of these other sensors… so i thought i’d include it here: