mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-12 16:46:35 +00:00
watchdog attribtue
git-svn-id: https://svn.fhem.de/fhem/trunk@1105 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
0291de6ea8
commit
e2b5024839
@ -15,7 +15,7 @@ watchdog_Initialize($)
|
||||
$hash->{DefFn} = "watchdog_Define";
|
||||
$hash->{UndefFn} = "watchdog_Undef";
|
||||
$hash->{NotifyFn} = "watchdog_Notify";
|
||||
$hash->{AttrList} = "disable:0,1";
|
||||
$hash->{AttrList} = "disable:0,1 regexp1WontReactivate:0,1";
|
||||
}
|
||||
|
||||
|
||||
@ -89,12 +89,12 @@ watchdog_Notify($$)
|
||||
|
||||
}
|
||||
|
||||
if($n =~ m/^$re1$/ ||
|
||||
"$n:$s" =~ m/^$re1$/ ||
|
||||
($ln eq $n && $s eq ".")) {
|
||||
watchdog_Activate($ntfy);
|
||||
|
||||
if(($ln eq $n && $s eq ".") || # trigger w .
|
||||
(($n =~ m/^$re1$/ || "$n:$s" =~ m/^$re1$/) &&
|
||||
!AttrVal($ln, "regexp1WontReactivate", 0))) {
|
||||
watchdog_Activate($ntfy)
|
||||
}
|
||||
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
@ -7241,20 +7241,31 @@ href="http://www.elv.de/output/controller.aspx?cid=74&detail=10&detail2=29870">U
|
||||
<pre>
|
||||
# Talk to the FHT80 if we do not receive any message for 15 Minutes
|
||||
define w watchdog FHT80 00:15:00 SAME set FHT80 time
|
||||
|
||||
# Shout if the HMS100-FIT is not alive
|
||||
define w watchdog HMS100-FIT 01:00:00 SAME "alarm-fit.sh"
|
||||
|
||||
# Send mail if the window is left open
|
||||
define w watchdog contact1:open 00:15 contact1:closed "mail_me close window1"
|
||||
attr w regexp1WontReactivate
|
||||
</pre>
|
||||
|
||||
Notes:<br>
|
||||
<ul>
|
||||
<li>if <regexp1> is . (dot), then activate the watchdog at
|
||||
definition time. Else it will be activated when the first matching event
|
||||
is received.</li>
|
||||
|
||||
definition time. Else it will be activated when the first matching
|
||||
event is received.</li>
|
||||
<li><regexp1> reactivates a running watchdog, to avoid it use the
|
||||
regexp1WontReactivate attribute.
|
||||
<li>if <regexp2> is SAME, then it will be the same as the first
|
||||
regexp, and it will be reactivated, when it is received. This is probably
|
||||
the normal operation.</li>
|
||||
regexp, and it will be reactivated, when it is received. This is
|
||||
probably the normal operation.</li>
|
||||
<li>trigger <watchdogname> . will activate/reactivate the
|
||||
watchdog</li>
|
||||
<li>generic watchdogs (one watchdog responsible for more devices) is
|
||||
currently not possible.</li>
|
||||
</ul>
|
||||
|
||||
<br>
|
||||
</ul>
|
||||
|
||||
@ -7268,6 +7279,10 @@ href="http://www.elv.de/output/controller.aspx?cid=74&detail=10&detail2=29870">U
|
||||
<b>Attributes</b>
|
||||
<ul>
|
||||
<li><a href="#disable">disable</a></li>
|
||||
<li><a name="regexp1WontReactivate">regexp1WontReactivate</a><br>
|
||||
When a watchdog is active, a second event matching regexp1 will
|
||||
normally reset the timeout. Set this attribute to prevents this.
|
||||
</li>
|
||||
</ul>
|
||||
<br>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user