Hi,
One of the objectives I had when I started looking into home automation and iOT was to add some elements of 'security'. For instance remotely monitor my spa water temperature (used in the winter a lot where it can drop to -20 ) to prevent any freezing in case of a component failure. That was my first project.
I am presenting here my second project: protect my house against potential water damage.
So I built a few simple moisture detectors with a Moteino for data transmission (see picture 1).
These detector nodes will send a "CLOSE" command to the Node controlling the valve, which will close and shut off the water supply to the entire house.
I have them installed at every possible point of failure: bathroom, kitchen, washroom, basement,etc.
I installed a electric water valve (5 volt,low current) that I can control manually (open/ close) with the pushbuttons (see picture 3) .
I also included a Moteino that will automatically close the valve if it receives an alert from one of the detectors
The Moteino runs on a hacked Switchmote, Mighty Boost and Lipo backup battery: the valve will close if an alarm gets detected in a power-out situation. (see picture 2)
I shot a short video showing the system in action:
Nothing fancy, but I have wanted to do something like this for a while now.
Codewise, I am into a few revisions of lowering power consumption: nothing extreme but I now figure I will do well over one year with the 1,000ma Lipo.
Included Wireless Programming for all the nodes (wake up via the ACK return message), along with ATC.
The code for the detectors and valve controller is built around state machines. I find this is the best structure for this kind of control system, allowing clear(er) programming and ease of modification that minimizes breaking existing code.
Todo on this project: close the valve when I arm the alarm panel, send the alarm to the Gateway for further processing (email/SMS, etc). Right now I am sending the moisture status of every node to the Gateway, which in turn posts it to my internal EmonCMS server.
Hopefully this will protect me from substantial damage in the event of a water leak...
François.