Can I add contact sensor to leak detection?

Hi, is it possible to include a contact sensor to the leak detection in hsm?

I've just added a contact sensor which is triggered by a NO/NC type contact on my backup sump pump. Can I include this with the other leak sensor alerts in hsm instead of creating a separate rule?
Thanks.

There is a Virtual Leak Detection device that would allow you to do this very cleanly.

I had a similar situation with my smoke detectors - I added a Kidde relay to the smoke alarm circuit and then put an Ecolink contact sensor on the relay (the Ecolink has the convenient screw terminals). I made a Virtual Smoke Detector device triggered by the Contact sensor and added the Virtual device to HSM.

3 Likes

I don't think so.

However, I have a suggestion that will let you achieve what you want in HSM, if you do the following:

  1. Create a virtual device using a "Virtual Water Sensor with switch driver" (see attached code).
  2. Setup a rule in Rule Machine to set the virtual water sensor as wet if your contact sensor is open and dry if it is closed (see below).
  3. Use your new virtual water sensor with your other leak sensors in HSM.

Here's the link to the "virtual water sensor with switch" driver.

Here's what your rule should look like:

Trigger:

Real Contact Sensor *changed*

Actions:

IF (Real Contact Sensor open) THEN
    On: Virtual water sensor with switch
ELSE
   Off: Virtual water sensor with switch
END-IF

Good luck and welcome to Hubitat!

1 Like

@richard4

@Eric.C.Miller is correct. There is a built-in driver for this; you don't need to use the driver that I linked to. The built-in driver is called "Virtual Omnisensor".

2 Likes

There is also a Virtual Moisture Sensor. I assumed this would function for a leak detector but I haven't tried it.

3 Likes

Not sure what type of contact sensor are you using but maybe worth a try by changing the driver to a leak/moisture sensor and test if it's working. I modified a Zigbee Visonic contact sensor into a leak detector it's working great in HSM.

Thanks for the help everyone.
After reading recommendations on here I've also got the Ecolink sensor.
I've added a virtual moisture sensor and set a rule to change it from dry to wet on open and close and it seems to be working well.
I had also wondered about changing device type or some sort of custom driver but wouldn't have a clue how to do that. (Yet)!