Jump to content

Leak Sensors - Another (Suggested) Complete Program Package


rabbit1543

Recommended Posts

Posted (edited)

DISCLAIMER: BUG discovered in the ISY startup program. If you have this program already please disable it for now while i look into a fix. If you have it you can easily disable it. Disabling this program will allow all other programs to run normally as expected. What you will lose is the detection/notifcation if you have a leak or missed hearbeat condition during an isy boot up. Please also feel free to take a look at the original program from Belias which is what i used as a framework for this package

 

Link to original program by Belias

http://forum.universal-devices.com/topic/11566-leak-sensors-a-suggested-complete-program-package/page-1

 

UPDATE: Bug fix is in please see post 41 for details

http://forum.universal-devices.com/topic/15170-leak-sensors-another-suggested-complete-program-package/?p=203477

 

Firstly I would like to thank Belias for sharing his wonderful leak detection programming. In light of a new discovery about the latest firmware leak sensors I have taken many queues from Belias and heavily modified his programming to suit my needs. It turns out that Smarthome has changed the behavior of the leak sensors where they must be reset manually once a leak has been detected to return the sensor back to a dry status. 

 

Be advised that this programming is not designed for early sensors nor has it been tested with them. The programming I have come up with should cover most scenarios including ISY reboots during normal operation or during leaks and missed heartbeats. I have done a fair amount of testing feel that I have covered most scenario but you never know.

 

I have designed this to continually send notifications during leaks as well as when heartbeats are missed. I have configured 2 levels of alerts depending on how long a leak or missed heartbeat has gone unaddressed. How often these notifications are sent should be easily changed depending on your preferences. If you prefer to only have one level of notifications you can choose to omit portions of the program.

 

OK here goes. This is my first guide so please bear with me. This guide assumes your sensors have already been added to you ISY.

 

I have organized my sensors into the following folders and put the respective nodes into the folder accordingly

 

Prep Work:

 

1.    Organize your Sensor Nodes (optional)

a.     Under the Main Tab create folders as below and put populate with your sensor nodes accordingly

 

b.    Root folder = Leak Sensors (contains only subfolders)

                                          i.    Sub Folder1 = Wet (contains Wet nodes)

                                         ii.    Sub Folder2 = Dry (contains Dry nodes

                                        iii.    Sub Folder3 = Heartbeat (contains Heartbeat nodes)

 

 

2.    Create Empty Programs

a.     Under the Programs - Details Tab create a new folder called “Leak Detection”

b.    This folder will contain 1 program for Startup detection and 4 programs for each sensor.

c.     Name them as follows replacing “Sensorname” with a descriptive name of your sensor

                                          i.    Startup program = Leak Startup Alert (enable this to run at startup)

                                         ii.    Program 1 = Sensorname – Heartbeat Missed

                                        iii.    Program 2 = Sensorname – Heartbeat Repaired

                                        iv.    Program 3 = Sensorname – Leak Detected

                                         v.    Program 4 = Sensorname – Leak Repaired

 

3.    Create Variables

a.     Under the Programs – Variables Tab create 2 STATE variables for each sensor

One variable is used for leak while the other is for heartbeat

                                          i.    Variable 1 = sLeakSensorname

                                         ii.    Variable 2 = sLeakSensornameHB

b.    Under the Programs – Variables Tab create 1 INTEGER variable

                                          i.    Variable = iStartup

 

4.    Create Empty Custom Email Notifications

a.     Under Configuration – Emails/Notifications – Customizations create 7 customizations for 2 Levels of alerts or 5 customizations for 1 Level of alerts

                                          i.    Name = Leak Sensor Water Alert - Level 1

                                         ii.    Name = Leak Sensor Water Alert - Level 2 (optional)

                                        iii.    Name = Leak Sensor Water Leak Repaired

                                        iv.    Name = Leak Sensor Heartbeat Alert - Level 1

                                         v.    Name = Leak Sensor Heartbeat Alert - Level 2 (optional)

                                        vi.    Name = Leak Sensor Heartbeat Repaired

                                       vii.    Name = Leak Sensor Startup Alert

 

5.    Programming:

a.     Edit the program named “Sensorname” – Heartbeat Missed as follows

If
        Control 'Leak Sensors / Heartbeat / Dishwasher-Heartbeat' is switched On
     Or Control 'Leak Sensors / Heartbeat / Dishwasher-Heartbeat' is switched Off
 
Then
        $sLeakDishwasherHB  = 1
        $sLeakDishwasherHB Init To $sLeakDishwasherHB
        Wait  25 hours 
        $sLeakDishwasherHB  = 0
        $sLeakDishwasherHB Init To $sLeakDishwasherHB
        Send Notification to 'Default' content 'Leak Sensor Heartbeat Alert - Level 1'
        Wait  12 hours 
        Repeat Every  12 hours 
           Send Notification to 'Default' content 'Leak Sensor Heartbeat Alert - Level 2'
 
Else
   - No Actions - (To add one, press 'Action')
 
If a missed heartbeat is detected two types of alerts will be sent (Level 1 and Level 2)
The first wait will detect a missed hearbeat, leave this at 25 hours
The second wait is the interval between the Level 1 and Level 2 alerts
The repeat will continually send Level 2 alerts at the time specified
 

b.    Edit the program named “Sensorname” – Heartbeat Repaired as follows

If
        $sLeakDishwasherHB is 1
    And $iStartup is 1
 
Then
        Send Notification to 'Default' content 'Leak Sensor Heartbeat Repaired'
 
Else
   - No Actions - (To add one, press 'Action')
 
 

c.     Edit the program named “Sensorname” – Leak Detected as follows

If
        Status  'Leak Sensors / Wet / Dishwasher-Wet' is On
 
Then
        $sLeakDishwasher  = 1
        $sLeakDishwasher Init To $sLeakDishwasher
        Repeat 6 times
           Send Notification to 'Default' content 'Leak Sensor Water Alert - Level 1'
           Wait  5 minutes 
        Repeat 1 times
           Wait  25 minutes 
        Repeat Every  30 minutes 
           Send Notification to 'Default' content 'Leak Sensor Water Alert - Level2'
 
Else
        $sLeakDishwasher  = 0
        $sLeakDishwasher Init To $sLeakDishwasher
 
If a leak is detected there will be two types of alerts sent (Level 1 and Level 2)
The first repeat should be the amount of Level 1 alerts you would like to receive
The first wait is the interval of time that should pass between Level 1 alerts
The second repeat is to add an interveal between the last Level 1 alert and the first Level 2 alert
The second wait is the interval of time between the last Level 1 alert and the first Level 2 alert
				*****NOTE*****
First wait + Second wait = interval between last Level 1 alert and first Level 2 alert
The third repeat will continually send Level 2 alerts at the time specified
 

d.    Edit the program named “Sensorname” – Leak Repaired as follows

If
        $sLeakDishwasher is 0
 
Then
        Send Notification to 'Default' content 'Leak Sensor Water Leak Repaired'
 
Else
   - No Actions - (To add one, press 'Action')
 
 

e.    Edit the program named Leak Startup Alert

If
        $iStartup is 0
    And (
             $sLeakHotWaterTank is 1
          Or $sLeakDishwasher is 1
          Or $sLeakMasterBathSink is 1
          Or $sLeakWashingMachine is 1
          Or $sLeakHotWaterTankHB is 0
          Or $sLeakMasterBathSinkHB is 0
          Or $sLeakDishwasherHB is 0
          Or $sLeakWashingMachineHB is 0
        )
 
Then
        Send Notification to 'Default' content 'Leak Sensor Startup Alert'
        Wait  10 seconds
        Run Program 'HotWaterTank - Heartbeat Missed' (Then Path)
        Run Program 'Dishwasher - Heartbeat missed' (Then Path)
        Run Program 'MasterBathSink - Heartbeat Missed' (Then Path)
        Run Program 'WashingMachine - Heartbeat Missed' (Then Path)
        Wait  30 seconds
        $iStartup  = 1
 
Else
        Run Program 'HotWaterTank - Heartbeat Missed' (Then Path)
        Run Program 'Dishwasher - Heartbeat missed' (Then Path)
        Run Program 'MasterBathSink - Heartbeat Missed' (Then Path)
        Run Program 'WashingMachine - Heartbeat Missed' (Then Path)
        Wait  30 seconds
        $iStartup  = 1
 
Enable this to run at startup.
If a leak or missed heartbeat is detected at startup an alert will be sent
It will then run the missed heartbeat detection
Which will reset the missed heartbeat variables to normal and restart missed heartbeat detection

f.     Repeat 1-4 for each sensor

 

6.    Customizing the Email alerts:

a.     Under Configuration – Emails/Notifications – Customizations modify the empty email notifications created in step 4

                                          i.    Modify Leak Sensor Water Alert – Level 1

Subject = Level 1 water leak detected at ${sys.node.#.name}

Body =
This is a Level 1 alert: An initial water leak has been detected
A water leak has been detected at the location(s) below with a status value of "On":

Leak Status				
Washing Machine:   ${sys.node.2E F 25 2.ST}
Hot Water Tank:	   ${sys.node.2E 11 9B 2.ST}		
Master Bath Sink:  ${sys.node.2E 16 B 2.ST}		
Dishwasher:	   ${sys.node.2E 17 EB 2.ST}

Heartbeat Status
Washing Machine:   ${var.2.22}
Hot Water Tank:	   ${var.2.23}
Master Bath Sink:  ${var.2.24}
Dishwasher:	   ${var.2.25}

---Leak Status Key---
Off = No Leak detected (normal status)
On = Leak detected
No Status = ISY has recently rebooted. Manualy reset sensor or wait for heartbeat

---Heartbeat Status Key---
1 = Heartbeat detected (normal status)
0 = Heartbeat missed (check battery/communications) 

                                         ii.    Modify Leak Sensor Water Alert – Level 2 (optional)

Subject = Level 2 water leak detected at ${sys.node.#.name}

Body = 
This is a Level 2 alert: An unrepaired water leak has been detected
A water leak has been detected at the location(s) below with a status value of "On":

Leak Status				
Washing Machine:   ${sys.node.2E F 25 2.ST}
Hot Water Tank:	   ${sys.node.2E 11 9B 2.ST}		
Master Bath Sink:  ${sys.node.2E 16 B 2.ST}		
Dishwasher:	   ${sys.node.2E 17 EB 2.ST}

Heartbeat Status
Washing Machine:   ${var.2.22}
Hot Water Tank:	   ${var.2.23}
Master Bath Sink:  ${var.2.24}
Dishwasher:	   ${var.2.25}

---Leak Status Key---
Off = No Leak detected (normal status)
On = Leak detected
No Status = ISY has recently rebooted. Manualy reset sensor or wait for heartbeat

---Heartbeat Status Key---
1 = Heartbeat detected (normal status)
0 = Heartbeat missed (check battery/communications) 

                                        iii.    Modify Leak Sensor Water Leak Repaired

Subject = ${sys.program.#.name}

Body =
A water leak has been repaired

Leak Status				
Washing Machine:   ${sys.node.2E F 25 2.ST}
Hot Water Tank:	   ${sys.node.2E 11 9B 2.ST}		
Master Bath Sink:  ${sys.node.2E 16 B 2.ST}		
Dishwasher:	   ${sys.node.2E 17 EB 2.ST}

Heartbeat Status
Washing Machine:   ${var.2.22}
Hot Water Tank:	   ${var.2.23}
Master Bath Sink:  ${var.2.24}
Dishwasher:	   ${var.2.25}

---Leak Status Key---
Off = No Leak detected (normal status)
On = Leak detected
No Status = ISY has recently rebooted. Manually reset sensor or wait for heartbeat

---Heartbeat Status Key---
1 = Heartbeat detected (normal status)
0 = Heartbeat missed (check battery/communications) 

                                        iv.    Modify Leak Sensor Heartbeat Alert – Level 1

Subject = Level 1 leak sensor missed heartbeat detected at ${sys.node.#.name}

Body=
This is a Level 1 alert: An initial leak sensor missed heartbeat has been detected.
A leak sensor missed heartbeat has been detected at the location(s) below with a status value of "0"
 
Leak Status
Washing Machine:   ${sys.node.2E F 25 2.ST}
Hot Water Tank:   ${sys.node.2E 11 9B 2.ST}
Master Bath Sink:  ${sys.node.2E 16 B 2.ST}
Dishwasher:   ${sys.node.2E 17 EB 2.ST}
 
Heartbeat Status
Washing Machine:   ${var.2.22}
Hot Water Tank:   ${var.2.23}
Master Bath Sink:  ${var.2.24}
Dishwasher:   ${var.2.25}
 
---Leak Status Key---
Off = No Leak detected (normal status)
On = Leak detected
No Status = ISY has recently rebooted. Manualy reset sensor or wait for heartbeat
 
---Heartbeat Status Key---
1 = Heartbeat detected (normal status)
0 = Heartbeat missed (check battery/communications)

 

 

 

                                         v.    Modify Leak Sensor Heartbeat Alert – Level 2 (optional)

Subject = Level 2 leak sensor missed heartbeat detected at ${sys.node.#.name}

Body=
This is a Level 2 alert. An unrepaired leak sensor missed heartbeat has been detected
A missed leak sensor heartbeat has been detected at the location(s) below with a status value of "0":
 
Leak Status
Washing Machine:   ${sys.node.2E F 25 2.ST}
Hot Water Tank:   ${sys.node.2E 11 9B 2.ST}
Master Bath Sink:  ${sys.node.2E 16 B 2.ST}
Dishwasher:   ${sys.node.2E 17 EB 2.ST}
 
Heartbeat Status
Washing Machine:   ${var.2.22}
Hot Water Tank:   ${var.2.23}
Master Bath Sink:  ${var.2.24}
Dishwasher:   ${var.2.25}
 
---Leak Status Key---
Off = No Leak detected (normal status)
On = Leak detected
No Status = ISY has recently rebooted. Manualy reset sensor or wait for heartbeat
 
---Heartbeat Status Key---
1 = Heartbeat detected (normal status)
0 = Heartbeat missed (check battery/communications)

 

 

 

                                        vi.    Modify Leak Sensor Heartbeat Repaired

Subject = ${sys.program.#.name}

Body =
A leak sensor missed heartbeat has been repaired

Leak Status				
Washing Machine:   ${sys.node.2E F 25 2.ST}
Hot Water Tank:	   ${sys.node.2E 11 9B 2.ST}		
Master Bath Sink:  ${sys.node.2E 16 B 2.ST}		
Dishwasher:	   ${sys.node.2E 17 EB 2.ST}

Heartbeat Status
Washing Machine:   ${var.2.22}
Hot Water Tank:	   ${var.2.23}
Master Bath Sink:  ${var.2.24}
Dishwasher:	   ${var.2.25}

---Leak Status Key---
Off = No Leak detected (normal status)
On = Leak detected
No Status = ISY has recently rebooted. Manualy reset sensor or wait for heartbeat

---Heartbeat Status Key---
1 = Heartbeat detected (normal status)
0 = Heartbeat missed (check battery/communications) 

                                       vii.    Modify Leak Sensor Startup Alert

Subject = A leak sensor problem detected at ISY boot

Body = 
A leak sensor problem detected at ISY boot. 
Please check the affected sensor and reset if no leaks are present
 
Leak Status
Washing Machine:   ${var.2.18}
Hot Water Tank:   ${var.2.19}
Master Bath Sink:  ${var.2.20}
Dishwasher:   ${var.2.21}
 
Heartbeat Status
Washing Machine:   ${var.2.22}
Hot Water Tank:   ${var.2.23}
Master Bath Sink:  ${var.2.24}
Dishwasher:   ${var.2.25}
 
---Leak Status Key---
0 = No Leak detected (normal status)
1 = Leak detected
 
---Heartbeat Status Key---
1 = Heartbeat detected (normal status)
0 = Heartbeat missed (check battery/communications)
 
Adding Additional sensors
 
1. Create the 4 programs for the sensor.
2. Add the new sensor to the customized emails
3. Add the new sensor programs to the startup email
Edited by rabbit1543
  • Like 5
  • 1 month later...
Posted

Rabbit/Belias,

 

Thanks for doing all the heavy lifting for me!  I just got 4 of these sensors and this programming worked perfectly!  Saved me much trial and error... :)

 

Matt

  • 2 months later...
Posted

Great write up.  It really helped with my LS automation.

 

Any thoughts or insight with Smoke Bridge.  I want to either intergrate into exisitng program or create another set of programs to work with smoke bridge.  

 

I have noticed smoke bridge has Smoke, CO2, Clear, Low Battery, Malfunction, Test, and Unknown message.  I assume I should work that into the program to I get notified of status.   

 

If you don't mind it would be great if you can help some.

 

Thanks in advance.

Posted

Thanks, glad you found this useful. Unfortunately I don't have any experience with the smoke bridge so I can't really help on that front. I would think that you would want a new set of programs dedicated for the smoke bridge. Maybe you can use this guide as a framework. It took me quite a bit of time to work this programming out even using belias as a reference. I ran many tests before publishing this. Whatever you do please test all sorts of possible situations considering that the purpose is to protect you home and family. Simulating a leak was rather easy, I don't even know how you would be able to simulate co2 and smoke detection.

  • 1 year later...
Posted

I've read there are different versions of leak sensors along with different behavior (one requires a reset on wet, others do not). How do I know which type of leak sensor I have?  My leak sensors are (2852-222) Leak Sensor v.41

Posted

Place the sensor on a wet paper towel to simulate a leak. Take the sensor off the wet paper towel and then, possibly, dry it. Observe the result.

  • 2 months later...
Posted

This is great! Thanks for all the hard work! This is my first program using variables etc. but not very familiar with it. I did have one question related to the last step of "customized emails" I basically copied everything into the areas, but not sure with the "Heartbeat and leak status"  system nodes? Basically what do I between the {       }  for the status.

 

For example:

 

Subject = ${sys.program.#.name}

Body =
A leak sensor missed heartbeat has been repaired

Leak Status                
Washing Machine: ${sys.node.2E F 25 2.ST}
Hot Water Tank:     ${sys.node.2E 11 9B 2.ST}        
Master Bath Sink: ${sys.node.2E 16 B 2.ST}        
Dishwasher:     ${sys.node.2E 17 EB 2.ST}

Heartbeat Status
Washing Machine: ${var.2.22}
Hot Water Tank:     ${var.2.23}
Master Bath Sink: ${var.2.24}
Dishwasher:     ${var.2.25}

---Leak Status Key---
Off = No Leak detected (normal status)
On = Leak detected
No Status = ISY has recently rebooted. Manualy reset sensor or wait for heartbeat

---Heartbeat Status Key---
1 = Heartbeat detected (normal status)
0 = Heartbeat missed (check battery/communications) 
Posted

Click on the label Alert, scroll to Variables, select the variable you want inserted at that point.

Posted

Click on the label Alert, scroll to Variables, select the variable you want inserted at that point.

 

OK got that figured out for the "Heartbeat Status", (Alert-Variables-sLeakMasterBath-Add Variable-${var.2.10} )

 

But what about the "Leak Status", It does not looks like your example- ${sys.node.2E 11 9B 2.ST} If I go (Alert-Node Address-Add Variable I get ${sys.node.#.addr} Do I manually enter my LS address (36.BA.69), or am I way of base? 

 

Thanks

  • 3 weeks later...
Posted (edited)

Rabbit and Belias - thank you very much!!!  This was a great way to get started.  In fact, I spent a little time understanding what you have done and I used the version in this thread mostly as-is. Been testing for a bit, and it seems to work as intended.  A couple things I almost missed ... setting the "Leak Startup Program" to auto run at startup; and the fact that you run the Heartbeat Missed programs during startup - BUT DIRECT TO THE "THEN" track.  

 

Anyway - Well Done!  Thanks again for this.  I can see this framework being re-used for other types of alert sensors.  This was one of the first "environmental" sensors I have put in - and now I will be adding a hot tub temperature and leak sensor, and probably automation enabled/alarm integrated fire/CO sensors.  

 

Thanks again!   8)

Edited by mangler
Posted (edited)

Another big thanks from me...

 

I have a couple of issues...

Not understanding this in the customization email:

 

Leak Status
WET1:Basement Entrance:   ${sys.node.25 AD EC 2.ST}
WET2:Laundry:   ${sys.node.25 B0 49 2.ST}
WET3:Sump Room:  ${sys.node.27 9F C7 2.ST}
WET4:Basement Office:   ${sys.node.2D D0 9B 2.ST}

 

This is the lines in the code above:

Leak Status                
Washing Machine: ${sys.node.2E F 25 2.ST}
Hot Water Tank:     ${sys.node.2E 11 9B 2.ST}        
Master Bath Sink: ${sys.node.2E 16 B 2.ST}        
Dishwasher:     ${sys.node.2E 17 EB 2.ST}

 

I'm only getting status for 2 of the 4 above (the 2nd and 4th report as "on")

 

Q1>what does the "2" in 2.ST mean?  If i change to 1, status changes to "off" instead

  (i couldn't see this looking at the link in above post...)

 

Q2>why are only #2 & #4 reporting (other 2 are BLANK)

  (yes, i have confirmed correct addresses!)

 

Thx

Edited by johnstonf
Posted (edited)

I think i answered my own Q2 (Remove 0's in the addresses... will test!)

Nope, my bad... i actually BROKE the lines reporting ok by removing 0's in my lines 2 & 4.

So they are back to original, with 0's, and lines 1&3 still not reporting...

Edited by johnstonf
Posted

Was combination of bad battery in one unit, and i had to activate the other, and then the status came alive.

Will monitor, to see if it keeps working ok.

 

Still curious on the Q1 question:

Q1>what does the "2" in 2.ST mean?  If i change to 1, status changes to "off" instead

  (i couldn't see this looking at the link in above post...)

Posted (edited)

It has been a long while but off the top of my head i think the 2 is for the node wet vs dry or vice versa. Should be interchangeable depending on the node you want to query and how the email is worded. If they are reporting blank it is likely that they have not updated their status yet. Check the console. You could see this after an isy restart and the heartbeat hasn't been sent yet. You can trigger an update by pressing the button on the sensor.

 

Sent from my SM-G920V using Tapatalk

Edited by rabbit1543
Posted (edited)

This is great thank you. Setting up and testing now

 

I have 4314rev2.3 sensors and a v72 serial PLM.

The sensors have to be setup manually and report as

(2852-222) Leak Sensor v.00

through console. Is this a problem or will I still get full functionality?

Wet and dry testing works well, I am presently waiting for a heartbeat and will test for heartbeat missed.

Edited by mango
Posted

This is great thank you. Setting up and testing now

 

I have 4314rev2.3 sensors and a v72 serial PLM.

The sensors have to be setup manually and report as

(2852-222) Leak Sensor v.00

through console. Is this a problem or will I still get full functionality?

Wet and dry testing works well, I am presently waiting for a heartbeat and will test for heartbeat missed.

 

In the past a v.00 was normal because the older ISY Series Controller firmware didn't support firmware ID's. This didn't impact the devices from operating correctly though. Fast forward 2017 the sensor(s) should indicate the firmware version in use. In rare cases the device may not properly represent the nodes or features it offers.

 

Best effort should be to delete the sensor, hard reset it, then add it back using the auto configure option.

Posted

Hmm, tried that and they all re-register as v.00.

 

Latest ISY non-beta firmware.

 

Some time ago I had bumped into a thread here discussing a similar issue and a PLM replacement fixed the problem. I can't seem to locate it....

Posted

Hmm, tried that and they all re-register as v.00.

 

Latest ISY non-beta firmware.

 

Some time ago I had bumped into a thread here discussing a similar issue and a PLM replacement fixed the problem. I can't seem to locate it....

 

What is the ISY Firmware and UI displayed under the Help tab?

Posted

Just to clarify have you used both options to add the leak sensor? One is with the auto the other is using the two whirling arrows and you press on the set button of the device.

 

If you haven't tried the other please do so and also reboot the ISY before you add, delete, etc.

Posted

Yes tried both ways. Auto does not work. Nothing is discovered.

This is why I think it's the PLM(?)

 

 

How old is the PLM and what does the white sticker say on the back along with the firmware? Have you completed a PLM table compare to see how many links you have? Do you have a large insteon network with lots of scenes?

Posted

I appreciate your help.

I've taken this thread off topic I hope a moderator can split it, my apologies.

 

Can't get to PLM until tonight.

My setup is tiny, have not looked at table.

The sensors appear to be doing everything they should if setup manually....

Guest
This topic is now closed to further replies.

×
×
  • Create New...