2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-01 01:09:47 +00:00

55_PIFACE: set commands are not executed if attr disable or disableForInterval is true

git-svn-id: https://svn.fhem.de/fhem/trunk@5251 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
klaus-schauer 2014-03-18 04:35:17 +00:00
parent c55a5c5639
commit a39cfe9b4d

View File

@ -56,6 +56,7 @@ sub PIFACE_Initialize($){
$hash->{AttrFn} = "PIFACE_Attr"; $hash->{AttrFn} = "PIFACE_Attr";
$hash->{AttrList} = $readingFnAttributes . $hash->{AttrList} = $readingFnAttributes .
" defaultState:0,1,last,off pollInterval:1,2,3,4,5,6,7,8,9,10,off" . " defaultState:0,1,last,off pollInterval:1,2,3,4,5,6,7,8,9,10,off" .
" disable:0,1 disabledForIntervals" .
" portMode0:tri,up" . " portMode0:tri,up" .
" portMode1:tri,up" . " portMode1:tri,up" .
" portMode2:tri,up" . " portMode2:tri,up" .
@ -85,6 +86,10 @@ sub PIFACE_Undefine($$){
sub PIFACE_Set($@) { sub PIFACE_Set($@) {
my ($hash, @a) = @_; my ($hash, @a) = @_;
my $name = $hash->{NAME}; my $name = $hash->{NAME};
if (IsDisabled($name)) {
Log3 $name, 4, "PIFACE $name set commands disabled.";
return;
}
my $port = $a[1]; my $port = $a[1];
my $val = $a[2]; my $val = $a[2];
my ($adr, $cmd, $i, $j, $k); my ($adr, $cmd, $i, $j, $k);
@ -504,6 +509,18 @@ PIFACE_Watchdog($) {
[defaultState] = off is default.<br> [defaultState] = off is default.<br>
Restoration of the status of the output port after a Fhem reboot. Restoration of the status of the output port after a Fhem reboot.
</li> </li>
<li><a href="#PIFACE_disable">disable</a> 0|1<br>
If applied set commands will not be executed.
</li>
<li><a href="#PIFACE_disabledForIntervals">disabledForIntervals</a> HH:MM-HH:MM HH:MM-HH-MM...<br>
Space separated list of HH:MM tupels. If the current time is between
the two time specifications, set commands will not be executed. Instead of
HH:MM you can also specify HH or HH:MM:SS. To specify an interval
spawning midnight, you have to specify two intervals, e.g.:
<ul>
23:00-24:00 00:00-01:00
</ul>
</li>
<li><a name="PIFACE_pollInterval">pollInterval</a> off|1,2,...,9,10, <li><a name="PIFACE_pollInterval">pollInterval</a> off|1,2,...,9,10,
[pollInterval] = off is default.<br> [pollInterval] = off is default.<br>
Define the polling interval of the input ports in seconds. Define the polling interval of the input ports in seconds.