2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

improve peercheck in HMInfo

git-svn-id: https://svn.fhem.de/fhem/trunk@4647 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2014-01-14 19:05:28 +00:00
parent 47a87449d3
commit 76f35333e9
2 changed files with 27 additions and 8 deletions

View File

@ -164,6 +164,7 @@ sub HMinfo_peerCheck(@) { #####################################################
my @entities = @_;
my @peerIDsFail;
my @peerIDsEmpty;
my @peerIDnotDef;
my @peerIDsNoPeer;
foreach my $eName (@entities){
next if (!$defs{$eName}{helper}{role}{chn});#device has no channels
@ -174,7 +175,7 @@ sub HMinfo_peerCheck(@) { #####################################################
my $st = AttrVal(CUL_HM_id2Name($devId),"subType","");# from Master
my $md = AttrVal(CUL_HM_id2Name($devId),"model","");
my $peerIDs = AttrVal($eName,"peerIDs",undef);
if (!$peerIDs){ # no peers - is this correct?
push @peerIDsEmpty,"empty: ".$eName;
}
@ -190,17 +191,25 @@ sub HMinfo_peerCheck(@) { #####################################################
$_ =~ s/04$/05/; # have to compare with clima_team, not clima
$cId =~ s/05$/04/;# will find 04 in peerlist, not 05
}
my $pName = CUL_HM_id2Name($_);
$pName =~s/_chn:01//; #channel 01 could be covered by device
my $pPlist = AttrVal($pName,"peerIDs","");
push @peerIDsNoPeer,$eName." p:".$pName if ($pPlist !~ m/$cId/);
my $pDiD = substr($_,0,6) if (substr($_,6,2) eq "01");
if (!$modules{CUL_HM}{defptr}{$_} &&
($pDiD && !$modules{CUL_HM}{defptr}{$pDiD})){
push @peerIDnotDef,$eName." id:".$_;
}
else{
my $pName = CUL_HM_id2Name($_);
$pName =~s/_chn:01//; #channel 01 could be covered by device
my $pPlist = AttrVal($pName,"peerIDs","");
push @peerIDsNoPeer,$eName." p:".$pName if (!$pPlist || $pPlist !~ m/$cId/);
}
}
}
}
my $ret = "";
$ret .="\n\n peer list not read" ."\n ".(join "\n ",sort @peerIDsEmpty) if(@peerIDsEmpty);
$ret .="\n\n peer list incomplete"."\n ".(join "\n ",sort @peerIDsFail) if(@peerIDsEmpty);
$ret .="\n\n peer not verified " ."\n ".(join "\n ",sort @peerIDsNoPeer)if(@peerIDsEmpty);
$ret .="\n\n peer not defined" ."\n ".(join "\n ",sort @peerIDnotDef) if(@peerIDnotDef);
$ret .="\n\n peer not verified" ."\n ".(join "\n ",sort @peerIDsNoPeer)if(@peerIDsEmpty);
return $ret;
}
sub HMinfo_burstCheck(@) { ####################################################

View File

@ -1412,15 +1412,25 @@ $culHmChanSets{"ROTO_ZEL-STG-RM-FWT02"} = $culHmChanSets{"HM-CC-TC02"};
"11;p02=8100" => { txt => "LEDall" , params => {
Led1To16 => '04,8,$val= join(":",sprintf("%b",hex($val))=~ /(.{2})/g)',
} },
"11;p01=81" => { txt => "LEVEL" , params => {
"11;p01=81" => { txt => "LEVEL" , params => {#ALARM_COUNT/HANDLE_LOCK/LEVEL_SET/MANU_MODE_SET/SET_ALL_CHANNELS
CHANNEL => "02,2",
TIME => '04,2,$val=hex($val)',
SPEED => '06,2,$val=hex($val)',
} },
"11;p01=82" => { txt => "Sleepmode" , params => {#only LED16?
"11;p01=82" => { txt => "Sleepmode" , params => {#SET_WINTER_MODE/SET_LED_SLEEP_MODE/SERVICE_COUNT/PARTY_MODE_SET
CHANNEL => "02,2",
MODE => '04,2,$val=hex($val)',
} },
"11;p01=83" => { txt => "EnterBootLoader" },#BOOST_MODE_SET/SET_HANDLE_LED_MODE
# "11;p01=84" => { txt => "" },#SET_SHEV_POS/COMFORT_MODE_SET
# "11;p01=85" => { txt => "" },#LOWERING_MODE_SET/SET_RELEASE_TURN
"11;p01=86" => { txt => "SetTemp" , params => {
B1 => "02,2",
B2 => '04,2',
} },
"11;p01=87" => { txt => "AdaptionDriveSet" },
"11;p01=CA" => { txt => "EnterBootLoader" },#download? at the end?
"12" => { txt => "HAVE_DATA"},
"3E" => { txt => "SWITCH" , params => {
DST => "00,6",