mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +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->{DefFn} = "watchdog_Define";
|
||||||
$hash->{UndefFn} = "watchdog_Undef";
|
$hash->{UndefFn} = "watchdog_Undef";
|
||||||
$hash->{NotifyFn} = "watchdog_Notify";
|
$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$/ ||
|
if(($ln eq $n && $s eq ".") || # trigger w .
|
||||||
"$n:$s" =~ m/^$re1$/ ||
|
(($n =~ m/^$re1$/ || "$n:$s" =~ m/^$re1$/) &&
|
||||||
($ln eq $n && $s eq ".")) {
|
!AttrVal($ln, "regexp1WontReactivate", 0))) {
|
||||||
watchdog_Activate($ntfy);
|
watchdog_Activate($ntfy)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -7241,20 +7241,31 @@ href="http://www.elv.de/output/controller.aspx?cid=74&detail=10&detail2=29870">U
|
|||||||
<pre>
|
<pre>
|
||||||
# Talk to the FHT80 if we do not receive any message for 15 Minutes
|
# 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
|
define w watchdog FHT80 00:15:00 SAME set FHT80 time
|
||||||
|
|
||||||
# Shout if the HMS100-FIT is not alive
|
# Shout if the HMS100-FIT is not alive
|
||||||
define w watchdog HMS100-FIT 01:00:00 SAME "alarm-fit.sh"
|
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>
|
</pre>
|
||||||
|
|
||||||
Notes:<br>
|
Notes:<br>
|
||||||
<ul>
|
<ul>
|
||||||
<li>if <regexp1> is . (dot), then activate the watchdog at
|
<li>if <regexp1> is . (dot), then activate the watchdog at
|
||||||
definition time. Else it will be activated when the first matching event
|
definition time. Else it will be activated when the first matching
|
||||||
is received.</li>
|
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
|
<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
|
regexp, and it will be reactivated, when it is received. This is
|
||||||
the normal operation.</li>
|
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>
|
</ul>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -7268,6 +7279,10 @@ href="http://www.elv.de/output/controller.aspx?cid=74&detail=10&detail2=29870">U
|
|||||||
<b>Attributes</b>
|
<b>Attributes</b>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#disable">disable</a></li>
|
<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>
|
</ul>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user