mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
HMInfo peering, other bugs
git-svn-id: https://svn.fhem.de/fhem/trunk@5212 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
984b8fbfdd
commit
43108144f0
@ -4875,7 +4875,7 @@ sub CUL_HM_ID2PeerList ($$$) {
|
||||
}
|
||||
}
|
||||
}
|
||||
sub CUL_HM_peerChId($$) {# in:<IDorName> <deviceID> <ioID>, out:channelID
|
||||
sub CUL_HM_peerChId($$) {# in:<IDorName> <deviceID>, out:channelID
|
||||
my($pId,$dId)=@_;
|
||||
my $iId = CUL_HM_id2IoId($dId);
|
||||
my ($pSc,$pScNo) = unpack 'A4A*',$pId; #helper for shortcut spread
|
||||
@ -4886,7 +4886,7 @@ sub CUL_HM_peerChId($$) {# in:<IDorName> <deviceID> <ioID>, out:channelID
|
||||
return "" if (length($p)<8);
|
||||
return substr(CUL_HM_name2Id($pId).'01',0,8);# default chan is 01
|
||||
}
|
||||
sub CUL_HM_peerChName($$) {#in:<IDorName> <deviceID> <ioID>, out:name
|
||||
sub CUL_HM_peerChName($$) {#in:<IDorName> <deviceID>, out:name
|
||||
my($pId,$dId)=@_;
|
||||
my $iId = CUL_HM_id2IoId($dId);
|
||||
my($pDev,$pChn) = unpack'A6A2',$pId;
|
||||
|
@ -203,16 +203,18 @@ 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 $pDiD = substr($_,0,6) if (substr($_,6,2) eq "01");
|
||||
my $pDid = substr($_,0,6);
|
||||
if (!$modules{CUL_HM}{defptr}{$_} &&
|
||||
($pDiD && !$modules{CUL_HM}{defptr}{$pDiD})){
|
||||
(!$pDid || !$modules{CUL_HM}{defptr}{$pDid})){
|
||||
next if($pDid && CUL_HM_id2IoId($id) eq $pDid);
|
||||
push @peerIDnotDef,$eName." id:".$_;
|
||||
}
|
||||
else{
|
||||
my $pName = CUL_HM_id2Name($_);
|
||||
$pName =~s/_chn:01//; #channel 01 could be covered by device
|
||||
$pName =~s/_chn:01//; #chan 01 could be covered by device
|
||||
my $pPlist = AttrVal($pName,"peerIDs","");
|
||||
push @peerIDsNoPeer,$eName." p:".$pName if (!$pPlist || $pPlist !~ m/$cId/);
|
||||
push @peerIDsNoPeer,$eName." p:".$pName
|
||||
if (!$pPlist || $pPlist !~ m/$cId/);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -760,14 +762,23 @@ sub HMinfo_GetFn($@) {#########################################################
|
||||
my @peerPairs;
|
||||
foreach my $dName (HMinfo_getEntities($opt,$filter)){
|
||||
my $peerIDs = AttrVal($dName,"peerIDs",undef);
|
||||
my $dId = unpack 'A6',CUL_HM_name2Id($dName);
|
||||
my @pl = ();
|
||||
my @fheml = ();
|
||||
foreach (split",",$peerIDs){
|
||||
next if ($_ eq "00000000");
|
||||
my $pName = CUL_HM_id2Name($_);
|
||||
my $pPlist = AttrVal($pName,"peerIDs","");
|
||||
$pName =~ s/$dName\_chn:/self/;
|
||||
push @peerPairs,$dName." =>".$pName;
|
||||
my $pn = CUL_HM_peerChName($_,$dId);
|
||||
push @pl,$pn;
|
||||
push @fheml,$pn.";".$dName if ($pn =~ m/^fhem/);
|
||||
}
|
||||
}
|
||||
push @peerPairs,$dName." => ".join(", ",(sort @pl)) if (@pl);
|
||||
my %fChn;
|
||||
foreach (sort @fheml){
|
||||
my ($fhemCh,undef,$p)= unpack 'A6A1A*',$_;
|
||||
$fChn{$fhemCh} => ($fChn{$fhemCh}?$fChn{$fhemCh}.", ":"").$p;
|
||||
}
|
||||
push @peerPairs,map {"$_ => $fChn{$_}"}sort keys %fChn;
|
||||
}
|
||||
$ret = $cmd." done:" ."\n x-ref list" ."\n ".(join "\n ",sort @peerPairs)
|
||||
;
|
||||
}
|
||||
@ -906,7 +917,6 @@ sub HMinfo_GetFn($@) {#########################################################
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
sub HMinfo_SetFn($@) {#########################################################
|
||||
my ($hash,$name,$cmd,@a) = @_;
|
||||
my @in = @a;
|
||||
@ -1027,6 +1037,7 @@ sub HMinfo_SetFn($@) {#########################################################
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
sub HMInfo_help(){
|
||||
return " Unknown argument choose one of "
|
||||
."\n ---checks---"
|
||||
|
@ -885,6 +885,7 @@ $culHmRegModel{"KS550"} = $culHmRegModel{"HM-WDS100-C6-O"};
|
||||
$culHmRegModel{"KS550TECH"} = $culHmRegModel{"HM-WDS100-C6-O"};
|
||||
$culHmRegModel{"KS550LC"} = $culHmRegModel{"HM-WDS100-C6-O"};
|
||||
$culHmRegModel{"KS888"} = $culHmRegModel{"HM-WDS100-C6-O"};
|
||||
$culHmRegModel{"HM-SEC-SC-2"} = $culHmRegModel{"HM-SEC-SC"};
|
||||
|
||||
$culHmRegModel{"HM-LC-Dim1L-Pl-2"} = $culHmRegModel{"HM-LC-Dim1L-Pl"};#rf_d
|
||||
$culHmRegModel{"HM-LC-Dim1L-CV"} = $culHmRegModel{"HM-LC-Dim1L-Pl"};
|
||||
|
Loading…
x
Reference in New Issue
Block a user