I've considered something like this, but our water has an incredibly high calcium content. I'm afraid a solenoid valve would gunk up and stick without constant use.May I suggest something?
My old boss came back to the office after a weekend at home and discovered the place was flooded by a faulty toilet hose.
We squeegeed water for three days and had umpteen fans blowing. He called me into the office and asked me to come up with something to shut off the water if it ever happens again. I researched a bit and found there was a low voltage power water shut off valve we could purchase and install that would take an input of 12 to 24 volts and shut off the main.
I added Water Bugs to the burglar alarm on a zone expander and water sensing devices, under each toilet, sink and refrigerator with ice maker. I programmed the alarm to trip a relay controlling the power supply relay to shut off the main water inlet pipe. It worked great.
View attachment 220016
Now they have wireless units.
EcoNet Controls EVC200-HCSML The Bulldog Valve Robot, Z-Wave Water Valve, Smart Home Controller Required, Easy to Install and No Plumbing Required, Valves up to 1.5" - - Amazon.com
EcoNet Controls EVC200-HCSML The Bulldog Valve Robot, Z-Wave Water Valve, Smart Home Controller Required, Easy to Install and No Plumbing Required, Valves up to 1.5" - - Amazon.comwww.amazon.com
This one is Z Wave