Looking for an accurate water flow meter

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

Hi @Anto79-ops ,

Thank you so much for the detailed reply. So just one clarification.
I never integrated this with my ADC account at all. I’m actually in an area without constant internet, this is why I needed a water meter, which can work without Cloud at all, and didn’t buy Moen FLO, as that requires cloud, and not local HTTP access.

So I’ll build that consumption sensor, you are right I noticed the consumption pulses are 0.0.
Further questions for you:

  1. Can you help me with this, so it records it in Gallons per Min VS Liters per min? (I’m not very good at scripting yet).
  2. Yes, I haven’t yet tried the calibration in config, as it seems to be doing OK. (I just have 12 hours of data so far).
  3. And if you want me to be another guinnea pig test person with Zwave JS, happy to be available.

Here are my screenshots.

Great!

This valve would be perfect for you, @Keith3

The good news is, it works all locally, regardless if HA is up or down.

At the very least, I would recommend that you enable some of the options. At the moment, its not protecting you because the options are off.

you can also automate these buttons/settings for when you leave the house, for example. And if there is a leak, the entity “water leak detected” will show up as “wet”. You may want to make an automation ion on that. If you set all the parameters to close the valve on low-medium-high flow rates, it will just do it automatically, but you won’t know if you don’t create that notification automation. Also, if you you have water leak sensors, you can automate that part also, to close the valve if a water sensor is detected as wet.

As for the templating of the sensor, yes you can easily convert the units to Gallons per Min, but I’m not an expert either. Reading the integration Riemann sum integral, it does not look like you can create a value_template for this, so you may have to create a second template sensor that uses the above sensor as input and then do that math for the conversion.

Sorry, this does not sound easy but may I recommend that you ask the question in the HA Discord channel in the template channel? They would definitely be able to help you with this. Discord

as for contributing more, that would be great. Here’s the original discussion

feel free to add there what you’ve experienced etc. AlCalzone was the one who helped me use a Zniffer to get the commands.

Let me know when you get your template sensor up and running!

1 Like

Thanks @Anto79-ops ,

Yes, I had to toggle those automations off, since at the same time my plumber was installing a new Water heater and while filling that, this triggered an alarm :slight_smile:

Ok, I’ll ask at the Discord Channel. I also started a thread here just specifically for SWM-150

For the template sensor: Once I get that sorted, I’m assuming that’s the one then I’ll use in the Consumption Sensor?

no problem. @Keith3

Ok, I went into my templating, and here’s exactly what I did to get the consumption sensor working with the ADC-SWM-150 flow meter.

  1. Create integration sensor as shown here:
#Water Consumption SWM
- platform: integration
  unique_id: [redacted]
  source: sensor.smart_water_valve_meter_water_flow
  name: water_consumption_swm
  round: 2
  method: left
  1. use the customize.yaml to add the extra information so that the energy dashboard can pick up the consumption sensor. The file you have to add this information is located in /config/customize.yaml`
# Add an entry for each entity that you want to overwrite.
sensor.water_consumption_swm:
  device_class: water
  state_class: total_increasing
  unit_of_measurement: L

what #2 does, is add/overide anything that the original sensor is reporting. For example, the sensor created in step 1, does not have a device class, state class, etc. ,but step 2 now adds that to the sensor so sensor.water_consumption_swm is now a valid sensor for the energy dashboard.

Maybe you can add a value_template to the customize,yaml for the sensor? I’m not sure. Its definitely easier for me because its already in the native units, but with a little bit of work, you can get what you want.

1 Like