CUL_HM: bugfix restart errors with display devices

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@12921 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2016-12-31 12:53:57 +00:00
parent e21d25cdd1
commit 01b4964dbb

View File

@ -302,6 +302,12 @@ sub CUL_HM_updateConfig($){
} }
} }
} }
elsif ($st =~ m /^(motionDetector|motionAndBtn)$/ ){
CUL_HM_UpdtReadSingle($hash,"state","-",0);
CUL_HM_UpdtReadSingle($hash,"motion","-",0);
RemoveInternalTimer($name.":motionCheck");
InternalTimer(gettimeofday()+30+2,"CUL_HM_motionCheck", $name.":motionCheck", 0);
}
elsif ($st eq "dimmer" ) {#setup virtual dimmer channels elsif ($st eq "dimmer" ) {#setup virtual dimmer channels
my $mId = CUL_HM_getMId($hash); my $mId = CUL_HM_getMId($hash);
#configure Dimmer virtual channel assotiation #configure Dimmer virtual channel assotiation
@ -5191,7 +5197,6 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
,split(",",AttrVal(CUL_HM_id2Name($dst."02"),"peerIDs","")) # peers RT/TC team ,split(",",AttrVal(CUL_HM_id2Name($dst."02"),"peerIDs","")) # peers RT/TC team
,CUL_HM_name2Id($name) # myself ,CUL_HM_name2Id($name) # myself
); );
foreach my $tId (@teamList){ foreach my $tId (@teamList){
my $teamC = CUL_HM_id2Name($tId); my $teamC = CUL_HM_id2Name($tId);
$tId = substr($tId,0,6); $tId = substr($tId,0,6);
@ -6234,13 +6239,13 @@ sub CUL_HM_calcDisWmSet($){
if ($txt eq "off") { delete $dh->{txt};} if ($txt eq "off") { delete $dh->{txt};}
elsif($txt ne "nc") { $dh->{txt} = substr($txt,0,12);} elsif($txt ne "nc") { $dh->{txt} = substr($txt,0,12);}
if($col eq "off") { delete $dh->{col};} if (!$col ||$col eq "off") { delete $dh->{col};}
elsif($col ne "nc"){ elsif($col ne "nc"){
if (!defined $disColor{$col}){ delete $dh->{col};} if (!defined $disColor{$col}){ delete $dh->{col};}
else { $dh->{col}=$col; } else { $dh->{col}=$col; }
} }
if($icon eq "noIcon"){ delete $dh->{icn};} if (!$icon ||$icon eq "noIcon"){delete $dh->{icn};}
elsif($icon ne "nc"){ elsif($icon ne "nc"){
if (!defined $disIcon {$icon}){delete $dh->{icn}} if (!defined $disIcon {$icon}){delete $dh->{icn}}
else {$dh->{icn}=$icon;} else {$dh->{icn}=$icon;}