Water Monitor — smart water sessions + leak detection

I’m excited to share my first Home Assistant custom integration: Water Monitor.

I impulse‑bought a Hydrific Droplet after seeing a Facebook ad (something I have never done (much)), and it quickly became my favorite device — zero plumbing, super easy install, and it integrates locally with Home Assistant via MQTT to stream real‑time water flow. That experience inspired me to co‑create (with Copilot/GPT‑5) a local‑first integration to understand my water usage and guard against leaks using just the flow data coming from Droplet. (I do have leak sensors around the house in various places like under sinks and appliances, and these are still important to catch leaks that occur when water isn’t flowing).

What is Water Monitor?

A Home Assistant custom component that:

  • Detects “sessions” of water use (e.g., showers, appliance runs), with smart gap handling to avoid splitting a single session.

  • Surfaces session metrics as sensors:

  • Last session volume, duration, average flow, hot water percentage

  • Current session volume (real‑time; shows intermediate volume during brief gaps)

  • Adds optional leak detection:

  • Low‑flow leak (binary sensor) with seeding, persistence, smoothing, and cooldown

  • Tank refill leak (binary sensor) to catch clustered, similar‑sized refills (classic toilet flapper symptom)

  • Monitors upstream sensor health (binary sensor) so you know if your flow/volume inputs go unknown/unavailable

  • Is fully reconfigurable in the UI (Options), supports multiple instances, and keeps clean/stable entity naming

  • It also works with electricity! (using kW and kWh as your flow and volume sensors respectively). Has a configurable NumberEntity floor (originally intended for winter scenarios where you leave an outdoor faucet on to prevent freezing) that you can use to set your electric baseload (dynamically through a statistics sensor and automation). No idea if that will be useful to anyone…

I still have a bunch of things to work on, such as documenting sample automations and tinkering with the default parameters. I’m currently working on an experimental intelligent leak detector that learns the water use in your home over many weeks and triggers if it spots an unusual pattern. No idea if it will be good enough to be useful, but I’m making good progress so far.

Links

Note: Water Monitor works with any compatible flow/volume sensors; I’m just a happy Droplet user (no affiliation).

I’d love suggestions, bug reports, and PRs. If you try it with Droplet or another flow sensor, let me know how it performs and what tuning worked for you.

7 Likes

It may be your opinion that it"s a benefit that with this, it doesn’t require someone to do any very simple and basic plumbing tasks is a benefit but, i couldn’t disagree more strongly with that.

Being able to track the presence and water flow rates that can be integrated into HA as sensors, graphs, etc and then tie in the leak sensors around the house is fine and all but, the next obvious question should be, what will you do with that information or more specifically how can you act on that information?

IDK the reason why this is the case but, i suspect it’s because for most men, myself included don’t have a problem doing “man stuff” and we don’t run away from doing the weekend house projects or make a hidden sigh of relief by avoiding a little work.

We actually use them as a good excuse to dig out our old muscle t-shirts, put a wrench in our pocket and strut around around to subtly remind the wives why they keep us around and depending on how well that can be pulled off, it’s a great way to initiate some dirty pillow wrestling ; )

The secondary reason i view it as a problem is what good are having a bunch of leak sensors and flow meters if you cant do anything about a leak when it happens unless your physically there??

Installing some components that physically integrate with the plumbing because without them the only thing you can do is track how many gallons leaked behind some cabinets or a inside a wall space so you can make a pretty graph of it in Grafana.

Intalling solenoids or ball valves for every sink, toilet, shower etc is definitely overkill but, a simple solution is to just put shut-offs on key spots where you can turn off water to sections of the house like, east side/west side or upstairs/downstairs.

Trust me buddy! You go on vacation out of town and then get a leak notification to which your wife sais, “oh good! can’t that HA you always fiddle with shut off the water and stop the leak?”

Tell her “No, I can only measure how much leaked before it got shut off” and your butt is going to be replaced by a new pet dog!

1 Like

I’m not sure how serious you’re being, but I’ll pat what I just wrote up in the readme.

A water flow monitor does not replace the need for leak/moisture sensors placed in strategic locations around your home. If a leak is due to a failure of an appliance (e.g. leaky hose under the sink that only occurs when the faucet is turned on or a sudden failure of a rusty water heater, washing machine, toilet o-ring), water infiltration from outside, or a blocked sewer pipe (speaking from experience), a water flow sensor (and this integration) will not detect those events. It is best suited for wasted water scenarios (e.g. faucet left on, toilet flapper not sealing) or burst pipes (e.g. outside hoses, pipes behind walls) where you cannot practically place a leak/moisture sensor (again, experienced all of those!).

Also, having a controllable valve that enables you or an automation to remotely shut off water to the house in the event of a leak detection (from either this integration or a leak/moisture sensor) could pay for itself many times over if you ever have a leak detected but are not at home to turn the water off manually.

I never suggested that it was a replacement at all. I was saying that a comprehensive water monitoring system is kind of feckless without a way to take any actions based on your sensors/data.

Also

That is absolutely not true and any of the plumbing/fittings can have a leak and will leak without the need for a faucet being on. The plumbing/hose that feeds the faucet is charged/under pressure 24/7 and the faucet is just a valve that allows the water to go through it.

Now if the drainage part of the faucet or application is the cause of the leak then in that case you’re correct and it can only leak if water is actively circulating through the appliance but, that isnt the single possibility of a water leak and i can speak from experience too and being a union pipe fitter so, i know a couple of things.

I would mostly agree with that or at least as far as the flow meter because i dont recall what integration your referring to but, you can use the flow meter by itself to monitor for medium to significant leaks but not necessarily minor ones due to how the flow rate necessary for most of them to work correctly.

For example i have flow meters installed on my front and back yard outside spicketts to monitor how much is used for watering things and also i use an automation to monitor for how long water is actively flowing through it and if its an unusual amount of time or high amount of water volume then it’s set up to send me a notification and it also checks against some conditions like say 2am or if I am home or anyone is home during this event and depending on those it will trigger the ball valve and close off the supply of water. Now, this isnt a perfect method and i dont recommended someone to use it as a primary detection method for reasons already mentioned but, water leaks dont aleays happen where you’ve placed a leak sensor and this is a good way to just add additional layers of prevention and take action.

Uh ya… I most certainly already said the exact same thing and i was suggesting it as something you should think about incorporating into your system to make it a comprehensive both monitoring and manageable system opposed to one that is a read-only system that only allows you to see data related to water use and has no mechanism to control the water at all.

OK, so I was thinking about this some more and came to the conclusion that I needed to support water shut-off valves in the integration because the leak detectors need to be aware the valve has been turned off, and as a consequence need to stay on until the valve is turned back on (at which point if you haven’t fixed the cause of the leak, they’d turn back on shortly afterwards). If I didn’t do this, the leaks would clear when the valve was turned off, giving the false impression that everything is OK.

I’m still thinking about if and how I would support leak sensors, given the flow sensor is required (but it wouldn’t be if leak sensors are the only thing you have). This feels like it would be valuable, but would require an overhall of the config_flow (which is already over 600 lines).

I do not plan to support notifications directly via the integration (given the variety of different methods people use for notifications), but I will at some point soon create a package of automations that demonstrate how to leverage the sensors and their attributes to craft a message, which can then be used with the notification platform choice.

(GitHub - markaggar/Water-Monitor: Home Assistant Integration that leverages an existing water flow sensor for tracking water usage sessions and detecting potential leaks.)

I don’t think that all of that is necessary and turning on/off leak sensors is a good way to create unintentional accidents. Now you could turn off any alerts/notifications related to those leak sensors, that would be fine but, idk about turning off actual leak sensors personally.

mmmm no, not necessarily they won’t turn Off until the sensor and/or the area beneath and around the sensor has been dried up and whatever water had leaked was gone. A simple solution would be to add “manual reset” template switches/buttons so that it doesn’t clear untill you physically clear it and confim things are back to normal/repaired.

I’m not understanding why you think it would be a complete overhaul or why you have this arbitrary number of how many lines of code are excessive? 600 lines isn’t an excessive amount at all. I have many projects that use 1,500-2,000 lines without a problem.

unless you have a “water closet” or some kind of area where all the house water lines are acessable then you wouldn’t even be adding more than 1 shut off valve to this current board/project anyway. You would be putting them wherever you have access to the lines are for the specific areas of the house.

Sorry, when i said leak detectors, i mean the logical ones in the integration, not physical leak/moisture sensors.

I sure hope that your sorry for that rude comment!! Lol jk.

I didnt realize that device functioned as a “leak sensor” too. This is just my opinion but, i wouldn’t put a high level of trust in an “all-in-one” sensor that uses ultrasonic to measure flow rate and detect leaks and especially small leaks because they can be spraying out of a tiny pinhole, yet its not enough volume to be detectable on a flow meter sensor. I didnt read through the specs for your device but, it probably lists the minimum flow rate that’s detectable or at least thats how pretty much every other one works.

Obviously though, this is your home and your choice, im just adding my opinion in there.

If you are satisfied with my service now, i can get your bill for my tech support mailed out today so it can be paid sooner!! ; )

This looks very useful, thanks for the efforts. I’m going to try it out in a month or so -Currently building a new house for which I want to use HA to run water detection. It would be good to integrate with a motor driven ball valve, so you can shut off the water. Those units are $50 or so. Another option is a motorized handle-turner: This device sits on top of the pipe, and turns the lever for a ball valve that is already installed in your water line. I had a Flo by Moen device in the last house - it was not very smart, it often shut water off when people were in the shower. But my understanding was it had one feature I want to put in: At 3 am it closed the valve, and then monitored a pressure drop to detect pinhole leaks. The Hydrific would not be able to do this. Best regards, J

Depending on how particular you are, you can find 12/24v ball balves for 25$ on Amazon but, even if you pay 50$ you still shouldn’t need a whole lot as long as your using them effectively so that 1 valve can shut off a bathroom, a kitchen, a laundry room etc. You dont want to put one at every appliance or anything crazy like that. If you have a leaking toilet and can shut off the water to that bathroom then that’s all you need and is still way better that having to shut the water off at the main so the whole house loses water which is what many people currently have to do if there isnt a convenient valve upstream of the leak.

Ive never used those valve handle motors that sit over a manual valve but, as someone who works as a pipe fitter and runs water mains, storm sewer, amd sanitary for cities and commercial properties, i can tell you that those valves tend to get stiff over time and especially if they’re not manually exercised to keep them loose and that just seems like an unnecessary risk to want to accept IMO.

Personally, I would just make the 1 time investment and do it the right way from the start so that you only have to do it the one single time. You can find ball valves that use 12/24v, have a lever to manually open/close the valve if power is ever an issue and those type often come with position feedback if your interested in incorporating that feedback so that you can confirm it opened/closed and isnt flozen, obstructed, or maybe the position becomes unknown after a power loss then the feedback would quickly solve that mystery right away.

Hi @markaggar,

Just wanted to say thanks for this great integration!

I can confirm it works perfectly with the Aquaro Smart Water Monitor
Meet the Aquaro Smart Water Monitor

Great work!

OP @markaggar - this is a great idea!! For those of us who don’t have muscle shirts, or try to be builders without the skills, tools or abilities…this is a great piece of work that will assist us. Even more so for those of us who are on wells…where water doesn’t just “show up” out of a tap. We monitor our wells, our cisterns and our flow and what you’ve built seems like it can be a critical piece of that journey. I’m looking forward to seeing if I can get it to work with my Aquaro like @wibeweb !

@wibeweb, just got my 2 Aquaro units…one will go at my well pumphouse) and one in the house…that way I can separate flows that go outside for the gardens and the trees from the flows that get used in the house.

It seems like you’ve managed to get the Aquaro working with the Integration. Nothing I do seems to work so far…can you provide details?

Just saw this - I haven’t used the aquaro myself. Can you be more specific about what is not working - are you able to add the flow sensor from the aquaro to the integration config?