2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

bugs with writing reg to fhem-channels, HMinfo filters

git-svn-id: https://svn.fhem.de/fhem/trunk@5240 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2014-03-16 19:03:09 +00:00
parent e074c2c7c1
commit bc6acd9507
2 changed files with 7 additions and 5 deletions

View File

@ -3012,9 +3012,8 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
||($peerChnIn)) {# and if requested by user
return "Peer not specified" if ($peerChnIn eq "");
$peerId = CUL_HM_peerChId($peerChnIn,$dst);
$peerChn = ((length($peerId) == 8)?substr($peerId,6,2):"01");
$peerId = substr($peerId,0,6);
return "Peer not valid" if (!$peerId);
($peerId,$peerChn) = unpack 'A6A2',$peerId.'01';
return "Peer not valid" if (length ($peerId) < 6);
}
elsif($list == 0){
$lChn = "00";
@ -3223,7 +3222,7 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
F=>8,x9=>9,x10=>10,x11=>11,x12=>12,x13=>13,x14=>14,x15=>15);
my @symbList = split(',',$symb);
my $symbAdd = "";
my $symbAdd = 0;
foreach my $symb (@symbList){
if (!defined($symbol{$symb})){# wrong parameter
return "'$symb ' unknown. Select one of ".join(" ",sort keys(%symbol));
@ -5031,6 +5030,8 @@ sub CUL_HM_name2Id(@) { #in: name or HMid ==>out: HMid, "" if no match
return "000000" if($name eq "broadcast"); #broadcast
return substr($idHash->{DEF},0,6).sprintf("%02X",$1)
if($idHash && ($name =~ m/self(.*)/));
return CUL_HM_IOid($idHash).sprintf("%02X",$1)
if($idHash && ($name =~ m/fhem(.*)/));
return AttrVal($name,"hmId",""); # could be IO device
}
sub CUL_HM_id2Name($) { #in: name or HMid out: name

View File

@ -739,7 +739,6 @@ sub HMinfo_GetFn($@) {#########################################################
my ($hash,$name,$cmd,@a) = @_;
my ($opt,$optEmpty,$filter) = ("",1,"");
my $ret;
if (@a && ($a[0] =~ m/^-/) && ($a[0] !~ m/^-f$/)){# options provided
$opt = $a[0];
$optEmpty = ($opt =~ m/e/)?1:0;
@ -1214,6 +1213,8 @@ sub HMinfo_SetFn($@) {#########################################################
### redirect set commands to get - thus the command also work in webCmd
elsif(HMinfo_GetFn($hash,$name,"?") =~ m/\b$cmd\b/){##----------------
unshift @a,$filter if ($filter);
unshift @a,$opt if ($opt);
$ret = HMinfo_GetFn($hash,$name,$cmd,@a);
}