Looking for an accurate water flow meter

I bought a YF-DN40 water flow meter off ebay. I plan to use it with ESPhome’s pulse sensor to monitor water use on my irrigation system, my in-floor hydronic heat system, and my water heater. I rigged up something using a garden hose flow meter to test the accuracy of the flow meter and I am not impressed. I checked the accuracy of garden hose flow meter and it is accurate. 3 milk jug fills was exactly 3 gallons.

Here is my data table testing the YF-DN40
water flow data

As you can see, the results are all over the place. There is a 34% difference between my highest and lowest data point.

Has anyone used a flow meter that is more accurate? Or know a way to improve the accuracy of this one?

You could use the calibrate linear or calibrate polynomial filter in ESPHome to correct your sensor. Only worthwhile doing if you are getting consistent pulse rates vs flow rate readings that need correcting though.

The rate may be incorrect but it has to be consistently incorrect for each flow rate for calibration to be effective.

You just have to gather some data points for pulse/min at different flow rates and know the actual correct flow rates (like your table above).

FYI, uncalibrated, most of these sensors give +/- 10% accuracy.

I’m considering using this meter. It’s more expensive but seems more accurate. My only concern is that it only has 2 wires instead of 3 (+, -, signal). Should that concern me? Has anyone used a meter like this one?

I haven’t done anything yet to measure flow rate in my house but it’s on my mid-list of things to do. I’m looking at this nutating disc positive displacement Badger unit from Grainger. I think this would be seriously accurate if you calibrated it with ESPHome. Looking at the datasheet they spec it as between ±2% depending on flow:
image

I didn’t know what nutating was but watching the short video on their webpage made it clear. It’s like when you drop a coin on the floor and it wobbles. That’s considered a nutation. :slight_smile: The volume of water is defined by the casing and the number of disc nutations.

The unit is lead free brass so it can be used with potable water and apparently, it can handle between 0.5gpm and 25gpm. I just measured my highest flowrate and it’s ~18gpm so this is perfectly in the range for my house.

With pulse outputs you only need two pins and if it’s anything like my weather vane and wind-speed sensors the pins just get shorted together for the pulse. So, you just need a pull up on the side that goes to the GPIO and ground the other pin and watch for the ground pulse (or you can do a pull-down with VCC and watch for the positive pulse).

I just pulled the trigger and bought the badger:

It’s way heavier than I expeceted but it came with union joints which is nice.
Now I just need a long weekend to hook it up and try to get some data from it. :slight_smile:

3 Likes

Nice! Let me know how it works

I would also be very interested in seeing how you are able to integrate this!

I have a Hunter HC-075-FLOW hooked into my Hyrdrawise irrigation system. Unfortunately the waterflow sensor data is not available in the API. I’m wondering if I can repurpose this meter into HA as the Hydrawise alerting also leaves much to be desired. It also doesn’t automatically suspend watering when it detects a leak (how dumb is that).

This meter has a two lead wire three lead wire (but one is not used) and appears to function in the same fashion? Anyone have any idea if this would work with this flow meter? Would there be any way to maybe hook the meter up to both my Hydrawise controller AND Home Assistant so I could still see the flow meter data in my Hydrawise app and in Home Assistant? Pretty please? I would be so super stoked if could do this!!

I got it hooked up this weekend and I’m playing around with the software now trying to dial it in. The installation looks way jankier than I would have hoped. I didn’t really have a good way to mount the flow valve horizontally so I rested it on top of the 2x4 that I used to mount the copper piping. Then I needed some way to hold it up there so I strapped it in using one of my wife’s old belts.

I installed all the pipe and returns yesterday and spent today wiring up the electrical and proving out the pulse meter. I got a quick scope shot of the output pulse to verify that everything works like I expected it to. This is with a 1kΩ pull-up to 3.3V, the active-low pulse is ~40ms wide.

I was pretty excited to test it out and based on the specs found here it looked like the device might send 100 pulses per gallon of water (spec’ing 0.01 pulses per gallon). Now that it’s hooked up, I can tell that it really only pulses once per gallon (also see spec Output: Pulse Per 1 gallon). Other than that lack of fractional gallon resolution, it works well!

Because of the lack of gallon/time resolution, I’m trying to figure out how to calculate high-flow pressure drop in a way that is past-looking so it’s more accurate. I want to be able to determine “high-flow” state, and if it maintains for a whole minute, I can trust the data more and calculate a delta. There are still some blind spots since the trigger only happens once in 60 seconds…

1 Like

@jazzyisj any luck with this? I am in the same situation and keen to hear from your experience.

I wish I had some good news for you. I never got any further with this than the wishful thinking phase. If it’s possible, we’re going to need someone much smarter than me to figure it out :grin:

Additionally, all the third party smart water meter/shutoffs I looked at were prohibitively expensive - eg Flo by Moen is $700 here in Canada.

@jazzyisj @bphillips921

I’m currently working with fellows at z-wave js to get my ADC SWM-150 working in HA.

It unsupported at the moment BUT, including it into my Z-wave system in HA with Z-wave js, it does have some basic functionality out of the box, like showing sensors and turn the valve on/off.

For example, here’s my flow rate over the last couple of days, and you can see consumption usage. You can see I started water my grass at around 4 pm.

At the moment, it does not allow me set thresholds for temperature and flow rate to sound the local buzzer), but I can set automations based on the flow rate (and temperature based on the sensors) for certain times to let me know if there is an active leak (without leak detectors).

I’m not sure what is involved in getting a device added to the z-wave js repository, but they seem really keen in figuring it out also.

That looks like what I need.

I saw this on there webpage.

“ IMPORTANT: Use of the ADC-SWM150 is dependent on a Commercial or Residential Interactive plan, WITH automation enabled, from Alarm.com. ”

Is that true?

@PeteRage

I don’t think that is true anymore!

I factory reset my ADC-SWM150, and I still get those basic features from the device when adding it to Z-Wave JS as shown above.

At the moment, you can do everything that it would do in the alarm.com environment except:

  1. setup the audible local buzzer
  2. Low flow alarm threshold (i.e. leaks under 3L/min)

Once they at Z-Wave JS implement the parameters/drivers (I just gave them a driver dump), this should be 100% good to go.

1 Like

@PeteRage

Here’s an example the device in action. This device doesn’t really like when we water the grass. My wife was watering the grass, and if the flow is more than 232 L/h for a certain amount of time (I think 40 minutes), it goes into alarm mode (i.e medium flow alarm). As you can see here.

Also, when my wife moved the sprinkler head, she kinked the hose, and you can see that drop in water flow where the arrow is.

Again, all this information is out of the box, officially unsupported via Z-wave JS. Once they tweak the parameters of this device, it will be even more awesome!

with the above sensor information, I can create an automation to turn off the valve and send notifications/alerts.

Also the fact that I can see the flow rate live (something not available when using the alarmdotcom platform), I can also set automations based on that number.

For example, if the flow rate is more 180 L/h, for more than 10 minutes, create an actionable script to warn us and give options to shut the valve off or turn it off automatically.

1 Like

Very cool. Looks like what I need. How often is the real-time flow data sent?

It seems to be the moment there is a change. For example, from zero flow, I turn on a faucet or run something and within 2 - 3 seconds, the value is updated to reflect the flow.

1 Like

To anyone still interested in this topic, this is what I did:

I got myself a positive displacement flow meter. Those are affordable (at around $150 depending the quality) and very accurate/reliable.

Unfortunately, the ones that I could find, all had a Pulse Rate of 1 Pulse/Gallon. This means that their “responsiveness” is not great. Reason being, at their Min Flow Rate which is usually 0.125GPM, it may take up to 8 minutes to get the first pulse (after a period of no flow) and similarly, 8 minutes to detect “no flow”.

The 8 minutes come from 1 pulse / gallon and 0.125GPM. That is 1 / 0.125 = 8 minutes per pulse, at 0.125GPM.

With that in mind, it is obvious that “detecting” start of flow and stop of flow with a delay of 8 minutes, is just too long.

The cheapest workaround that I found and implemented with great success (meaning, no false positives or false negatives after some basic noise reduction and de-bouncing algorithm), was to use an IR transmitter/receiver led pair, to aim at the spinning disc that indicates flow (the black one). That actually works pretty well because that disc spins “relatively fast” at even the lowest flow rates and it is black on a white background, which works very well with infrared bounce/reflect/detection.

In any way, this worked for me and it was perhaps the most affordable setup that can give flow rate GPM and flow on/off detection.

2 Likes

anyone managed to get the hunter flow sensor onto a pi or esp? seems hunter is the only affordable option where I am

Hi @Anto79-ops,

I read this post a few months ago, and I ordered and just finally finished a full installation of the SWM150.
I know you’ve been using it for a year.
Any movement with ZWave JS team to have it fully integrated, so I can pull the sensor readings into my Energy Dashboard?
If not, have you made any further advancements on it?

Hi, @Keith3

There has been progress made, and I’ve been using the device with HA for a few months now and cancelled my water plan with ADC.

The device is working in ZwaveJS and I’m pulling the data to my Energy dashboard.

There are a couple of things to note:

  1. It seems the device does not measure consumption, only flow. So, you have a to create a consumption sensor:
#Water Consumption SWM
- platform: integration
  unique_id: [redacted]
  source: sensor.smart_water_valve_meter_water_flow
  name: water_consumption_swm
  round: 2
  method: left

from this, you will get total consumption which can then be incorporated into the Energy Dashboard. I also have my city water meter integration into HA (this only updates for every 100 L of water usage, its not as a granular as the SWM-150) and they both compare very well, within 5% so it works very well, and you get instant consumption. I suspect that this was done using the ADC cloud, hence you’ll noticed the consumption in your app only updates like every gallon or so, and its not instantaneous.

  1. There is something weird with the ZwaveJS calibration of the meter. Not sure if the driver needs to be updated for this but the calibration command for the meter does not work for me. But, this is not often needed to calibrate is unless you have a slow leak in your home and then you would need to calibrate it so it becomes part of the baseline.

other than that, it works well and I can adjust the low, medium and high thresholds/timer in the configuration.

Try it it out. Exclude it from your security system, and include it in ZwaveJS and play with it for a bit. You can easily switch back to your security ecosystem.

For a while, I had both but eventually I just cancelled my water package plus with them and now im completely, local.

I can now make automations that I could not do before, for example, here’s an automation that tells me that water flow has been detected nobody is home (unless the dishwasher and/or the clothes washer is on).

alias: Water flow detected
description: Notify that water flow has been detected and nobody is home.
trigger:
  - platform: numeric_state
    entity_id: sensor.smart_water_valve_meter_water_flow
    for:
      hours: 0
      minutes: 0
      seconds: 15
    above: 0
condition:
  - condition: state
    entity_id: group.somebody_home
    state: not_home
  - condition: state
    entity_id: alarm_control_panel.partition1
    state: armed_away
  - condition: numeric_state
    entity_id: sensor.washing_machine_electric_consumption_w
    below: 2.8
  - condition: numeric_state
    entity_id: sensor.aeotec_nano_switch_electric_consumption_w
    below: 1
action:
  - service: notify.mobile_app_samsung_a54
    data:
      message: Warning! Water flow has been detected but nobody is home.
      title: Water flow detected
  - service: notify.mobile_app_samsung_a54
    data:
      message: TTS
      data:
        tts_text: Warning! Water flow has been detected but nobody is home.
        media_stream: alarm_stream_max
  - service: notify.mobile_app_s21
    data:
      message: Warning! Water flow has been detected but nobody is home.
      title: Water flow detected
  - service: notify.mobile_app_e_s21
    data:
      message: TTS
      data:
        tts_text: Warning! Water flow has been detected but nobody is home.
        media_stream: alarm_stream_max
mode: single

There are other automations I’ve made, that I could not do when it was part the the ADC system, so overall, its been working well.

Let me know how it works for you.

cheers