mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +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:
parent
e074c2c7c1
commit
bc6acd9507
@ -3012,9 +3012,8 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
|
|||||||
||($peerChnIn)) {# and if requested by user
|
||($peerChnIn)) {# and if requested by user
|
||||||
return "Peer not specified" if ($peerChnIn eq "");
|
return "Peer not specified" if ($peerChnIn eq "");
|
||||||
$peerId = CUL_HM_peerChId($peerChnIn,$dst);
|
$peerId = CUL_HM_peerChId($peerChnIn,$dst);
|
||||||
$peerChn = ((length($peerId) == 8)?substr($peerId,6,2):"01");
|
($peerId,$peerChn) = unpack 'A6A2',$peerId.'01';
|
||||||
$peerId = substr($peerId,0,6);
|
return "Peer not valid" if (length ($peerId) < 6);
|
||||||
return "Peer not valid" if (!$peerId);
|
|
||||||
}
|
}
|
||||||
elsif($list == 0){
|
elsif($list == 0){
|
||||||
$lChn = "00";
|
$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);
|
F=>8,x9=>9,x10=>10,x11=>11,x12=>12,x13=>13,x14=>14,x15=>15);
|
||||||
|
|
||||||
my @symbList = split(',',$symb);
|
my @symbList = split(',',$symb);
|
||||||
my $symbAdd = "";
|
my $symbAdd = 0;
|
||||||
foreach my $symb (@symbList){
|
foreach my $symb (@symbList){
|
||||||
if (!defined($symbol{$symb})){# wrong parameter
|
if (!defined($symbol{$symb})){# wrong parameter
|
||||||
return "'$symb ' unknown. Select one of ".join(" ",sort keys(%symbol));
|
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 "000000" if($name eq "broadcast"); #broadcast
|
||||||
return substr($idHash->{DEF},0,6).sprintf("%02X",$1)
|
return substr($idHash->{DEF},0,6).sprintf("%02X",$1)
|
||||||
if($idHash && ($name =~ m/self(.*)/));
|
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
|
return AttrVal($name,"hmId",""); # could be IO device
|
||||||
}
|
}
|
||||||
sub CUL_HM_id2Name($) { #in: name or HMid out: name
|
sub CUL_HM_id2Name($) { #in: name or HMid out: name
|
||||||
|
@ -739,7 +739,6 @@ sub HMinfo_GetFn($@) {#########################################################
|
|||||||
my ($hash,$name,$cmd,@a) = @_;
|
my ($hash,$name,$cmd,@a) = @_;
|
||||||
my ($opt,$optEmpty,$filter) = ("",1,"");
|
my ($opt,$optEmpty,$filter) = ("",1,"");
|
||||||
my $ret;
|
my $ret;
|
||||||
|
|
||||||
if (@a && ($a[0] =~ m/^-/) && ($a[0] !~ m/^-f$/)){# options provided
|
if (@a && ($a[0] =~ m/^-/) && ($a[0] !~ m/^-f$/)){# options provided
|
||||||
$opt = $a[0];
|
$opt = $a[0];
|
||||||
$optEmpty = ($opt =~ m/e/)?1: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
|
### redirect set commands to get - thus the command also work in webCmd
|
||||||
elsif(HMinfo_GetFn($hash,$name,"?") =~ m/\b$cmd\b/){##----------------
|
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);
|
$ret = HMinfo_GetFn($hash,$name,$cmd,@a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user