Iris Smart Water Sensor: turn off a switch when water is detected?


I’ve got several of these sensors being used with the Smart Home Monitor for Leaks. Problem is I want one of them to turn off a switch when it detects water. It looks like shutting a switch off via SMH is all or nothing (if either of the sensors detects water then the device would get shut off). I obviously don’t want that. I found a SmartApp that seems to to the reverse of what I want (turns a “pump” on when water is detected by a certain water sensor).



I use this:

You can easily customize it with many, many options…once you have it installed, hop on over to the community for any help you might need…

1 Like

Not sure I want to get this involved with beta software just to get basic functionality for water sensors. Not sure how this would affect my current configuration either? There must be an easier way to do what I want.

Understood…it’s actually very easy…I was hesitant myself and now, EVERYTHING is switched over. Once you have WebCoRE, the piston can be programmed for what you need in about 2 minutes.

As far as it being beta, I will say it has been 99.99% reliable for me. Only one time I saw it go down for DST…It has been more dependable than anything else I’ve used…

This sounds like a very simple smartapp could do this

I can probably ‘knock one up’ quite quickly

Just need to know what your use case is… what are you trying to do?

When a water sensor reports ‘wet’ turn off a switch… Obviously I get that part
What happens when the sensor goes ‘dry’ - Turn it back on again?

Does it matter if the switch repeatedly turns on/off because the water sensor is bouncing between wet/dry?
Or does it need to have a delay built in?

If I’ve interpreted what you need correctly…

Try this…

The clothes washer is plugged into the switch so just leaving it off until someone can tend to the problem and manually turn the back on and restart the washer.

Ok… I just need to tweak the app so it doesn’t switch back on again
Should be easy enough - I’ll have a look in the morning (I’m in the UK and it’s midnight here)

I just tried the app works great. I think another toggle to allow the user to decide if they want the switch to cycle back on (or off depending on how the user configured it initially) would be perfect. I think that would pretty much cover it for anyone that wants to trigger a switch from a water sensor.

Thanks for the help,


Actually it was just the SMH alarm for leaks that went off the switch state didn’t change when applying and removing water from the water sensor contacts. I also tried it with a light switch. I’m using Belkin Wemo swtiches/light switches maybe that is why it did not work?

edit: doesn’t control a Zigbee switch either so it isn’t the Wemos and I tried it with the toggle on and off

The coding for this is a little more complicated than I first thought, if I want to cover all options.
It’s basically a rewrite of all the input options & actions

To cover all the options I basically have to code the following selections

On when wet - Off when dry
On when dry - Off when wet
On when dry only (No off)
On when wet only (No off)
Off when dry only (No on)
Off when wet only (No on)

This will take me a while to work out the code for the logic.
I might be able to simplify it but need to think about this for a bit

OK… rewrite done
This works in a different way and now has different options for the actions.

Uploaded to GitHub on first post.

Please let me know how you get on.

1 Like

That did the trick thanks.