Open krkeegan opened 10 years ago
Hi Kevin,
On Wed, Jul 16, 2014 at 05:30:41PM -0700, Kevin Robert Keegan wrote:
I know some users are already using leak sensors, I imagine you have the programmed as simple triggerlincs or something similar.
In my email inbox, I have some notes about the leak sensors being finicky. My recollection is that they have a wet and dry group and the sensors only sends on commands to each group, but never off commands. My notes suggest that the sensor doesn't always send these messages accurately?? Did anyone ever get this resolved? Are people still manually changing the state of the leak sensors inside MH?
I have two INSTEON leak sensor that I currently have defined as follows:
INSTEON_TRIGGERLINC, 25.b0.fe:01, crawlspace_leak_dry, Leak_Sensors INSTEON_TRIGGERLINC, 25.b0.fe:02, crawlspace_leak_wet, Leak_Sensors INSTEON_TRIGGERLINC, 25.b0.fe:04, crawlspace_leak_heartbeat, Leak_Sensors
It's been a while since the last time I looked at the messages sent by these devices but what I recall is that the behavior for sending dry and wet messages was very very strange. I don't remember the details mainly because the behavior seemed so messed up and I could not understand or see the pattern. I don't remember if I ever saw "dry" messages that were generated automatically. In short, I think your notes are accurate.
In the end, I just gave up and just set things up in MisterHouse to be notified whenever a "dry" or "wet" message was received. I figured that in this case I would know if something required manual inspection.
The heartbeat does come periodically once a day.
Howard was the other person I know was looking into the leak sensors. He might have additional comments to share. Cc'ing him.
Cheers,
Eloy Paris.-
I have one and will also try to do some testing this weekend to see if I can figure out exactly what messages it sends out and when.
I agree that when I first installed it, it's behavior seemed somewhat strange and counterintuitive. If I remember correctly, what it does is once it senses water, it constantly sends out messages on the 'wet' group every 10 seconds or so until the alarm is acknowledged. I don't believe it ever automatically sends out messages to the 'dry' group. Once it is triggered and is sending out 'wet' group messages, you are supposed to acknowledge the message by pressing the set button on it once which sends out an ON to the dry group to tell the software to 'rearm' it.
I do see the daily heartbeat in my logs which appear to be pretty reliable, but seem to drift by about 10 minutes per day.
Kitchen Leak Sensor Heartbeat states
07/16/2014 12:58:12 on set_by=$Kitchen_Leak_Sensor_Heartbeat
07/15/2014 13:07:46 on set_by=$Kitchen_Leak_Sensor_Heartbeat
07/14/2014 13:17:19 on set_by=$Kitchen_Leak_Sensor_Heartbeat
07/13/2014 13:26:53 on set_by=$Kitchen_Leak_Sensor_Heartbeat
07/12/2014 13:36:26 on set_by=$Kitchen_Leak_Sensor_Heartbeat
07/11/2014 13:46:00 on set_by=$Kitchen_Leak_Sensor_Heartbeat
07/10/2014 13:55:34 on set_by=$Kitchen_Leak_Sensor_Heartbeat
07/09/2014 14:05:07 on set_by=$Kitchen_Leak_Sensor_Heartbeat
07/08/2014 14:14:41 on set_by=$Kitchen_Leak_Sensor_Heartbeat
07/07/2014 14:24:15 on set_by=$Kitchen_Leak_Sensor_Heartbeat
07/06/2014 14:33:49 on set_by=$Kitchen_Leak_Sensor_Heartbeat
07/05/2014 14:43:23 on set_by=$Kitchen_Leak_Sensor_Heartbeat
07/04/2014 14:52:56 on set_by=$Kitchen_Leak_Sensor_Heartbeat
07/03/2014 15:02:29 on set_by=$Kitchen_Leak_Sensor_Heartbeat
07/02/2014 15:12:02 on set_by=$Kitchen_Leak_Sensor_Heartbeat
07/01/2014 15:21:36 on set_by=$Kitchen_Leak_Sensor_Heartbeat
06/30/2014 15:31:09 on set_by=$Kitchen_Leak_Sensor_Heartbeat
06/29/2014 15:40:43 on set_by=$Kitchen_Leak_Sensor_Heartbeat
06/28/2014 15:50:16 on set_by=$Kitchen_Leak_Sensor_Heartbeat
06/27/2014 15:59:50 on set_by=$Kitchen_Leak_Sensor_Heartbeat
06/26/2014 16:09:23 on set_by=$Kitchen_Leak_Sensor_Heartbeat
06/25/2014 16:18:56 on set_by=$Kitchen_Leak_Sensor_Heartbeat
06/24/2014 16:28:29 on set_by=$Kitchen_Leak_Sensor_Heartbeat
06/23/2014 16:38:02 on set_by=$Kitchen_Leak_Sensor_Heartbeat
06/22/2014 16:47:35 on set_by=$Kitchen_Leak_Sensor_Heartbeat
Jared you might have hit on it there. The "Dry" group may just be badly named, leading us to expect it to do something else. It might be more properly called "All Clear" or "Inspected".
If you are correct it seems the data we can derive is:
I did the same as Eloy, if any message is received assume a problem. I’ve ‘front ended’ the leak sensor with a generic item so it’s a little more manageable. Seems to work OK — haven’t had any water leaks to test yet!
MHT file: INSTEON_TRIGGERLINC, 25.AB.F9:01, sensor_basement_water, Sensors #2213 REV2.0 INSTEON_TRIGGERLINC, 25.AB.F9:02, sensor_basement_water_wet, Sensors #2213 REV2.0 INSTEON_TRIGGERLINC, 25.AB.F9:04, sensor_basement_water_hb, Sensors #2213 REV2.0
Code: $basement_water1 = new Generic_Item; $basement_water1 -> set_states('wet','dry’);
if (state_now $sensor_basement_water ) { print_log "water sensor is now $sensor_basement_water->{state}";
if ( state $sensor_basement_water eq 'on' ) {
set $basement_water1 'wet';
print_log "water sensor ON";
speak (rooms=> "all", mode=> "unmuted", text=>"Water detected on basement water sensor");
respond target => 'email', to => ‘email@email.com', text => 'Water detected at leak sensor';
} else {
print_log "water sensor OFF";
set $basement_water1 'dry';
}
}
On Jul 16, 2014, at 11:47 PM, Eloy Paris peloy@chapus.net wrote:
Hi Kevin,
On Wed, Jul 16, 2014 at 05:30:41PM -0700, Kevin Robert Keegan wrote:
I know some users are already using leak sensors, I imagine you have the programmed as simple triggerlincs or something similar.
In my email inbox, I have some notes about the leak sensors being finicky. My recollection is that they have a wet and dry group and the sensors only sends on commands to each group, but never off commands. My notes suggest that the sensor doesn't always send these messages accurately?? Did anyone ever get this resolved? Are people still manually changing the state of the leak sensors inside MH?
I have two INSTEON leak sensor that I currently have defined as follows:
INSTEON_TRIGGERLINC, 25.b0.fe:01, crawlspace_leak_dry, Leak_Sensors INSTEON_TRIGGERLINC, 25.b0.fe:02, crawlspace_leak_wet, Leak_Sensors INSTEON_TRIGGERLINC, 25.b0.fe:04, crawlspace_leak_heartbeat, Leak_Sensors
It's been a while since the last time I looked at the messages sent by these devices but what I recall is that the behavior for sending dry and wet messages was very very strange. I don't remember the details mainly because the behavior seemed so messed up and I could not understand or see the pattern. I don't remember if I ever saw "dry" messages that were generated automatically. In short, I think your notes are accurate.
In the end, I just gave up and just set things up in MisterHouse to be notified whenever a "dry" or "wet" message was received. I figured that in this case I would know if something required manual inspection.
The heartbeat does come periodically once a day.
Howard was the other person I know was looking into the leak sensors. He might have additional comments to share. Cc'ing him.
Cheers,
Eloy Paris.-
I just ran some tests with mine and found the following behavior:
In all cases, as with most Insteon wireless devices, several duplicate messages are sent each time. From testing, it appears that it sends 3 messages for each transmission.
Supposedly, a low battery will trigger an ON to Group 3, but I haven't seen one of these yet.
If a poor connection is made between the contacts (for example, putting the sensor on a wet paper towel instead of in a puddle), the sensor floods out Group 2 ON messages without any rate limiting.
Here is the info for the device I tested with:
I tried running an extended info test on it to see what it would return, but get an error about receiving corrupt data.
07/20/2014 01:49:27 Running: Get extended info.
07/20/2014 01:49:27 [Insteon::RemoteLinc] Extended Set/Get ACK Received for $Kitchen_Leak_Sensor_Dry
07/20/2014 01:49:28 [Insteon::BaseInterface] DEBUG: PLM command:insteon_ext_received; Device command:extended_set_get; type:direct; group:
07/20/2014 01:49:28 [Insteon::RemoteLinc] WARN: Corrupt Extended Set/Get Data Received for $Kitchen_Leak_Sensor_Dry
07/20/2014 01:49:30 [Insteon::BaseMessage] WARN: now resending obj=$Kitchen_Leak_Sensor_Dry; command=extended_set_get; extra=000100000000000000000000000000 after 1 attempts.
@JaredF thanks Jared, that clears up a lot of things.
So the device will send a DRY command.
And the set button seems to work like other devices in that it alternates between the states.
@krkeegan, indeed. I couldn't remember from my previous testing, but it does sent Group 1 messages when the connection between the contacts is broken. In this way, it is very similar to a TriggerLinc with the jumper set.
Hi, I'm considering a water leak sensor for my dishwasher. Is there any progress on implementing a mh object that makes it easy to work with this sensor? Thanks, Greg
Hi Greg,
On Wed, Feb 18, 2015 at 11:55:19PM -0800, GregGTH wrote:
Hi, I'm considering a water leak sensor for my dishwasher. Is there any progress on implementing a mh object that makes it easy to work with this sensor?
I am using the INSTEON leak sensor like this:
items.mht:
INSTEON_TRIGGERLINC, 32.c2.b3:01, dishwasher_leak_dry, Leak_Sensors # 2213 v2.0 INSTEON_TRIGGERLINC, 32.c2.b3:02, dishwasher_leak_wet, Leak_Sensors # 2213 v2.0 INSTEON_TRIGGERLINC, 32.c2.b3:04, dishwasher_leak_heartbeat, Leak_Sensors # 2213 v2.0
User code:
if ($state = state_now $dishwasher_leak_dry) {
print_log "dishwasher_leak_dry: $state";
net_mail_send to => 'xyz@example.com', subject => "dishwasher_leak_dry: $state
if ($state = state_now $dishwasher_leak_wet) {
print_log "dishwasher_leak_wet: $state";
net_mail_send to => 'xyz@example.com', subject => "dishwasher_leak_wet: $state
It's not ideal and far from perfect but it's a start. The other day I got a flood of email messages because the code will send an email every time there is a state change and for some reason it seems like the sensor kept sending messages when it got wet.
I am not currently doing anything with the heartbeat messages. I see them in the log file (once a day) and I should generate an alert (like an email) when I do not receive a heartbeat message in one day. I'll code that up at some point.
To summarize, there currently is no "INSTEON_LEAKSENSOR" device that you can put in your items.mht file. I am not even sure it's necessary given that the INSTEON_TRIGGERLINC device seems to get the job done, though.
Cheers,
Eloy Paris.-
Thanks, Eloy. I think that will work well enough!
I know this thread is really old but I wrote a sub that I think will work for all the leak sensors. What I've seen with my testing was that the ones I have never send a dry (group 1) on unless you push the button. When mine detects water, it sends 1 wet (group 2) on, then when it drys, it starts sending a wet on every 10 seconds. So I think that depending on the version, they do something a little different.
With the code below, if you want an alert for missing heartbeats, in the MH web, enable developer mode with the gear in the upper right, go to the "m_dishwasher_sensor_hb" object, click on it and click the + next to "Schedule Control" and set the time and days you want to check for a heartbeat for that day (1 per day) and select the "on". This way you will only get an alert for the time you selected instead of 25 hours from the last heartbeat which could be at any time. I have my scheduled for sun-sat at 5pm which is a good time for me to get an alert if a sensor is not responding.
I use the m_dishwasher_sensor_alerting object so I have something in the MH web to easily disable the water/dry alerts with. There is nothing worse than having something go wrong and kill my phone with alerts that I can't stop easily.
I use Pushover "$push->notify" for alerting, but you can change that to your method of alerting (email, etc).
In my .mht for each sensor:
GROUP, Leak_Sensors
INSTEON_TRIGGERLINC, 40.xx.xx:01, dishwasher_sensor_dry, Leak_Sensors # 2852 v2.6
INSTEON_TRIGGERLINC, 40.xx.xx:02, dishwasher_sensor_wet, Leak_Sensors # 2852 v2.6
INSTEON_TRIGGERLINC, 40.xx.xx:04, dishwasher_sensor_heartbeat, Leak_Sensors # 2852 v2.6
In my user code for each leak sensor:
#noloop=start
$Leak_Sensor_Monitor = new Group(); # group for monitor objects (only needed 1 time for all sensors)
$m_dishwasher_sensor = new Generic_Item; # object used to track the state without getting duplicate state changes IE: the group 1 on every 10 sec.
$m_dishwasher_sensor_hb = new Generic_Item; # Object used to schedule daily HB checks/alerts in the MH web
$m_dishwasher_sensor_alerting = new Generic_Item; # Object used to disable alerting from the MH web
$Leak_Sensor_Monitor->add($m_dishwasher_sensor);
$Leak_Sensor_Monitor->add($m_dishwasher_sensor_hb);
$Leak_Sensor_Monitor->add($m_dishwasher_sensor_alerting);
#noloop=stop
&leaksensor('dish washer',$m_dishwasher_sensor,$m_dishwasher_sensor_hb,$m_dishwasher_sensor_alerting,$dishwasher_sensor_wet,$dishwasher_sensor_dry,$dishwasher_sensor_heartbeat);
Add this sub to your user code and it can be used for all of your sensors:
sub leaksensor {
#<long name for alerting message>,<Generic object for status tracking>,<Generic object for heartbeat tracking/alert schedule>,
#<Generic object to disable/enable alerting in MH web>,<Insteon wet object/group 2>,<Insteon dry object/group 1>,<Insteon heartbeat object/group 4>
my ($longname,$monitor_object,$monitor_object_hb,$monitor_object_alerting,$wet_object,$dry_object,$hb_object) = @_;
if ($Startup or $Reload) {
$monitor_object_hb -> set_states('on','off');
$monitor_object_alerting -> set_states('on','off');
}
if ( state_now $wet_object eq 'on' ) {
print_log "$longname water sensor sent wet on";
set $monitor_object 'wet' unless state $monitor_object eq 'wet';
} elsif ( state_now $dry_object eq 'on' ) {
print_log "$longname water sensor sent dry on";
set $monitor_object 'dry' unless state $monitor_object eq 'dry'; # It only seems to send a dry on when the button is pushed when its dry.
}
if ( state_now $monitor_object_hb eq 'on' ) {
$monitor_object_hb->set('off');
if ( $hb_object->time_idle('25 hours') ) {
print_log "$longname water sensor sent no heartbeats in the last 25 hours";
$push->notify( "$longname water sensor sent no heartbeats in the last 25 hours", { title => 'Moisture Sensor HB Failure', priority => 1 });
}
}
if ( ( new_minute(5) ) and ( $wet_object->time_idle('4 minutes') ) and ( $dry_object->time_idle('4 minutes') ) ) {
set $monitor_object 'off' unless ( state $monitor_object eq 'off' ); # Reset monitor object when no messages from the sensor, this is a fail safe
}
if ( state_now $monitor_object eq 'wet' ) {
print_log "$longname water sensor detected water!!";
$push->notify( "$longname water sensor detected water!!", { title => 'Water Detected!!', priority => 2 }) unless ( state $monitor_object_alerting eq 'off' );
} elsif ( state_now $monitor_object eq 'dry' ) {
print_log "$longname water sensor is now DRY.";
$push->notify( "$longname water sensor is now DRY.", { title => 'Water Sensor Dry', priority => 2 }) unless ( state $monitor_object_alerting eq 'off' );
}
}
Hi Wayne, I was just going through old lists and saw your reply! I never did get my leak sensor to do much of anything. I concluded that it was faulty, but never pursued it further. I've since moved, but the next time I have a need for a leak sensor, I will try out this great-sounding module!
-Greg
On Wed, Nov 8, 2017 at 7:21 PM Wayne Gatlin notifications@github.com wrote:
I know this thread is really old but I wrote a sub that I think will work for all the leak sensors. What I've seen with my testing was that the ones I have never send a dry (group 1) on unless you push the button. When mine detects water, it sends 1 wet (group 2) on, then when it drys, it starts sending a wet on every 10 seconds. So I think that depending on the version, they do something a little different.
With the code below, if you want an alert for missing heartbeats, in the MH web, enable developer mode with the gear in the upper right, go to the "m_dishwasher_sensor_hb" object, click on it and click the + next to "Schedule Control" and set the time and days you want to check for a heartbeat for that day (1 per day) and select the "on". This way you will only get an alert for the time you selected instead of 25 hours from the last heartbeat which could be at any time. I have my scheduled for sun-sat at 5pm which is a good time for me to get an alert if a sensor is not responding.
I use the m_dishwasher_sensor_alerting object so I have something in the MH web to easily disable the water/dry alerts with. There is nothing worse than having something go wrong and kill my phone with alerts that I can't stop easily.
I use Pushover "$push->notify" for alerting, but you can change that to your method of alerting (email, etc).
In my .mht for each sensor:
GROUP, Leak_Sensors INSTEON_TRIGGERLINC, 40.xx.xx:01, dishwasher_sensor_dry, Leak_Sensors # 2852 v2.6 INSTEON_TRIGGERLINC, 40.xx.xx:02, dishwasher_sensor_wet, Leak_Sensors # 2852 v2.6 INSTEON_TRIGGERLINC, 40.xx.xx:04, dishwasher_sensor_heartbeat, Leak_Sensors # 2852 v2.6
In my user code for each leak sensor:
noloop=start
$Leak_Sensor_Monitor = new Group(); # group for monitor objects (only needed 1 time for all sensors) $m_dishwasher_sensor = new Generic_Item; # object used to track the state without getting duplicate state changes IE: the group 1 on every 10 sec. $m_dishwasher_sensor_hb = new Generic_Item; # Object used to schedule daily HB checks/alerts in the MH web $m_dishwasher_sensor_alerting = new Generic_Item; # Object used to disable alerting from the MH web $Leak_Sensor_Monitor->add($m_dishwasher_sensor); $Leak_Sensor_Monitor->add($m_dishwasher_sensor_hb); $Leak_Sensor_Monitor->add($m_dishwasher_sensor_alerting);
noloop=stop
&leaksensor('dish washer',$m_dishwasher_sensor,$m_dishwasher_sensor_hb,$m_dishwasher_sensor_alerting,$dishwasher_sensor_wet,$dishwasher_sensor_dry,$dishwasher_sensor_heartbeat);
Add this sub to your user code and it can be used for all of your sensors:
sub leaksensor {
, ,<Generic object for heartbeat tracking/alert schedule>, <Generic object to disable/enable alerting in MH web>,<Insteon wet object/group 2>,<Insteon dry object/group 1>,<Insteon heartbeat object/group 4>
my ($longname,$monitor_object,$monitor_object_hb,$monitor_object_alerting,$wet_object,$dry_object,$hbobject) = @;
if ($Startup or $Reload) { $monitor_object_hb -> set_states('on','off'); $monitor_object_alerting -> set_states('on','off'); }
if ( state_now $wet_object eq 'on' ) { print_log "$longname water sensor sent wet on"; set $monitor_object 'wet' unless state $monitor_object eq 'wet'; } elsif ( state_now $dry_object eq 'on' ) { print_log "$longname water sensor sent dry on"; set $monitor_object 'dry' unless state $monitor_object eq 'dry'; # It only seems to send a dry on when the button is pushed when its dry. }
if ( state_now $monitor_object_hb eq 'on' ) { $monitor_object_hb->set('off'); if ( $hb_object->time_idle('25 hours') ) { print_log "$longname water sensor sent no heartbeats in the last 25 hours"; $push->notify( "$longname water sensor sent no heartbeats in the last 25 hours", { title => 'Moisture Sensor HB Failure', priority => 1 }); } }
if ( ( new_minute(5) ) and ( $wet_object->time_idle('4 minutes') ) and ( $dry_object->time_idle('4 minutes') ) ) { set $monitor_object 'off' unless ( state $monitor_object eq 'off' ); # Reset monitor object when no messages from the sensor, this is a fail safe }
if ( state_now $monitor_object eq 'wet' ) { print_log "$longname water sensor detected water!!"; $push->notify( "$longname water sensor detected water!!", { title => 'Water Detected!!', priority => 2 }) unless ( state $monitor_object_alerting eq 'off' ); } elsif ( state_now $monitor_object eq 'dry' ) { print_log "$longname water sensor is now DRY."; $push->notify( "$longname water sensor is now DRY.", { title => 'Water Sensor Dry', priority => 2 }) unless ( state $monitor_object_alerting eq 'off' ); }
}
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hollie/misterhouse/issues/437#issuecomment-343035865, or mute the thread https://github.com/notifications/unsubscribe-auth/AGD64YLY5nFaY7NdtKcA5Ew_61HmjJTGks5s0m-mgaJpZM4CN-XD .
The leak sensor is for sure very odd, but I've been using my code for a while now ( even got a real leak alert from my hot water heater ) and it seems to work very well. The only thing that does not work as I would like is when the sensor gets wet, you get alerted but until you push the button on the device, you will get a heartbeat failure every 24 hours because the sensor sends the heartbeats to a different group than when its dry. I guess its not that a big deal because it reminds you to go push the button to clear the wet alarm, but if you don't know why its happening it seems like something is wrong with it. I decided not to try and fix the heartbeat issue described above because it requires some guess work and I would rather get more alerts than miss something when it comes to a leak.
_Wayne
On Tue, Mar 13, 2018 at 11:14 AM, GregGTH notifications@github.com wrote:
Hi Wayne, I was just going through old lists and saw your reply! I never did get my leak sensor to do much of anything. I concluded that it was faulty, but never pursued it further. I've since moved, but the next time I have a need for a leak sensor, I will try out this great-sounding module!
-Greg
On Wed, Nov 8, 2017 at 7:21 PM Wayne Gatlin notifications@github.com wrote:
I know this thread is really old but I wrote a sub that I think will work for all the leak sensors. What I've seen with my testing was that the ones I have never send a dry (group 1) on unless you push the button. When mine detects water, it sends 1 wet (group 2) on, then when it drys, it starts sending a wet on every 10 seconds. So I think that depending on the version, they do something a little different.
With the code below, if you want an alert for missing heartbeats, in the MH web, enable developer mode with the gear in the upper right, go to the "m_dishwasher_sensor_hb" object, click on it and click the + next to "Schedule Control" and set the time and days you want to check for a heartbeat for that day (1 per day) and select the "on". This way you will only get an alert for the time you selected instead of 25 hours from the last heartbeat which could be at any time. I have my scheduled for sun-sat at 5pm which is a good time for me to get an alert if a sensor is not responding.
I use the m_dishwasher_sensor_alerting object so I have something in the MH web to easily disable the water/dry alerts with. There is nothing worse than having something go wrong and kill my phone with alerts that I can't stop easily.
I use Pushover "$push->notify" for alerting, but you can change that to your method of alerting (email, etc).
In my .mht for each sensor:
GROUP, Leak_Sensors INSTEON_TRIGGERLINC, 40.xx.xx:01, dishwasher_sensor_dry, Leak_Sensors # 2852 v2.6 INSTEON_TRIGGERLINC, 40.xx.xx:02, dishwasher_sensor_wet, Leak_Sensors # 2852 v2.6 INSTEON_TRIGGERLINC, 40.xx.xx:04, dishwasher_sensor_heartbeat, Leak_Sensors # 2852 v2.6
In my user code for each leak sensor:
noloop=start
$Leak_Sensor_Monitor = new Group(); # group for monitor objects (only needed 1 time for all sensors) $m_dishwasher_sensor = new Generic_Item; # object used to track the state without getting duplicate state changes IE: the group 1 on every 10 sec. $m_dishwasher_sensor_hb = new Generic_Item; # Object used to schedule daily HB checks/alerts in the MH web $m_dishwasher_sensor_alerting = new Generic_Item; # Object used to disable alerting from the MH web $Leak_Sensor_Monitor->add($m_dishwasher_sensor); $Leak_Sensor_Monitor->add($m_dishwasher_sensor_hb); $Leak_Sensor_Monitor->add($m_dishwasher_sensor_alerting);
noloop=stop
&leaksensor('dish washer',$m_dishwasher_sensor,$ m_dishwasher_sensor_hb,$m_dishwasher_sensor_alerting,$ dishwasher_sensor_wet,$dishwasher_sensor_dry,$ dishwasher_sensor_heartbeat);
Add this sub to your user code and it can be used for all of your sensors:
sub leaksensor {
,<Generic object for status tracking>,<Generic object for heartbeat tracking/alert schedule>,
<Generic object to disable/enable alerting in MH web>,<Insteon wet
object/group 2>,<Insteon dry object/group 1>,<Insteon heartbeat object/group 4>
my ($longname,$monitor_object,$monitor_objecthb,$monitor object_alerting,$wet_object,$dry_object,$hbobject) = @;
if ($Startup or $Reload) { $monitor_object_hb -> set_states('on','off'); $monitor_object_alerting -> set_states('on','off'); }
if ( state_now $wet_object eq 'on' ) { print_log "$longname water sensor sent wet on"; set $monitor_object 'wet' unless state $monitor_object eq 'wet'; } elsif ( state_now $dry_object eq 'on' ) { print_log "$longname water sensor sent dry on"; set $monitor_object 'dry' unless state $monitor_object eq 'dry'; # It only seems to send a dry on when the button is pushed when its dry. }
if ( state_now $monitor_object_hb eq 'on' ) { $monitor_object_hb->set('off'); if ( $hb_object->time_idle('25 hours') ) { print_log "$longname water sensor sent no heartbeats in the last 25 hours"; $push->notify( "$longname water sensor sent no heartbeats in the last 25 hours", { title => 'Moisture Sensor HB Failure', priority => 1 }); } }
if ( ( new_minute(5) ) and ( $wet_object->time_idle('4 minutes') ) and ( $dry_object->time_idle('4 minutes') ) ) { set $monitor_object 'off' unless ( state $monitor_object eq 'off' ); # Reset monitor object when no messages from the sensor, this is a fail safe }
if ( state_now $monitor_object eq 'wet' ) { print_log "$longname water sensor detected water!!"; $push->notify( "$longname water sensor detected water!!", { title => 'Water Detected!!', priority => 2 }) unless ( state $monitor_object_alerting eq 'off' ); } elsif ( state_now $monitor_object eq 'dry' ) { print_log "$longname water sensor is now DRY."; $push->notify( "$longname water sensor is now DRY.", { title => 'Water Sensor Dry', priority => 2 }) unless ( state $monitor_object_alerting eq 'off' ); }
}
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <https://github.com/hollie/misterhouse/issues/437#issuecomment-343035865 , or mute the thread https://github.com/notifications/unsubscribe- auth/AGD64YLY5nFaY7NdtKcA5Ew_61HmjJTGks5s0m-mgaJpZM4CN-XD .
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hollie/misterhouse/issues/437#issuecomment-372723482, or mute the thread https://github.com/notifications/unsubscribe-auth/AFZ3eUUX7AXZoY__o5FMzPQ22KyZ7nCCks5td_BogaJpZM4CN-XD .
I know some users are already using leak sensors, I imagine you have the programmed as simple triggerlincs or something similar.
In my email inbox, I have some notes about the leak sensors being finicky. My recollection is that they have a wet and dry group and the sensors only sends on commands to each group, but never off commands. My notes suggest that the sensor doesn't always send these messages accurately?? Did anyone ever get this resolved? Are people still manually changing the state of the leak sensors inside MH?