mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-07 12:58:13 +00:00
47_OBIS: Corrected Attribute "pollingMode"
git-svn-id: https://svn.fhem.de/fhem/trunk@10986 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
13dc06c226
commit
66ec7954a9
@ -149,7 +149,7 @@ sub OBIS_Read($)
|
||||
my $name = $hash->{NAME};
|
||||
|
||||
my $buf = DevIo_SimpleRead($hash);
|
||||
if ($hash->{helper}{EoM}!=1 && $hash->{helper}{DEVICES}[1]>0) {OBIS_Parse($hash,$buf);}
|
||||
if ($hash->{helper}{EoM}!=1) {OBIS_Parse($hash,$buf);}
|
||||
return(undef);
|
||||
}
|
||||
|
||||
@ -296,12 +296,14 @@ sub OBIS_Attr(@)
|
||||
if ($aName eq "pollingMode")
|
||||
{
|
||||
if ($aVal eq "on") {
|
||||
delete $hash->{FD};
|
||||
delete($selectlist{"$name.$dev"});
|
||||
$readyfnlist{"$name.$dev"} = $hash;
|
||||
} elsif ($aVal eq "off") {
|
||||
delete($readyfnlist{"$name.$dev"});
|
||||
$selectlist{"$name.$dev"} = $hash;
|
||||
DevIo_OpenDev($hash, 1, "OBIS_Init");
|
||||
DevIo_CloseDev($hash);
|
||||
DevIo_OpenDev($hash, 0, "OBIS_Init");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user