mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-18 05:56:03 +00:00
rapair some bugs, RSSI and others
git-svn-id: https://svn.fhem.de/fhem/trunk@2050 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f93ec49690
commit
106f386f24
@ -302,11 +302,11 @@ HMLAN_Parse($$)
|
|||||||
$dmsg .= "NACK" if($mFld[1] !~ m/00(01|02|21)/ && $letter eq 'R');
|
$dmsg .= "NACK" if($mFld[1] !~ m/00(01|02|21)/ && $letter eq 'R');
|
||||||
|
|
||||||
$hash->{uptime} = HMLAN_uptime($mFld[2]);
|
$hash->{uptime} = HMLAN_uptime($mFld[2]);
|
||||||
$hash->{RSSI} = hex($mFld[4]);
|
$hash->{RSSI} = hex($mFld[4])-65536;
|
||||||
$hash->{RAWMSG} = $rmsg;
|
$hash->{RAWMSG} = $rmsg;
|
||||||
$hash->{"${name}_MSGCNT"}++;
|
$hash->{"${name}_MSGCNT"}++;
|
||||||
$hash->{"${name}_TIME"} = TimeNow();
|
$hash->{"${name}_TIME"} = TimeNow();
|
||||||
my %addvals = (RAWMSG => $rmsg, RSSI => hex($mFld[4]));
|
my %addvals = (RAWMSG => $rmsg, RSSI => hex($mFld[4])-65536);
|
||||||
Dispatch($hash, $dmsg, \%addvals);
|
Dispatch($hash, $dmsg, \%addvals);
|
||||||
}
|
}
|
||||||
elsif($mFld[0] eq 'HHM-LAN-IF'){#@mFld=(undef,$vers,$serno,$d1,$owner,$msec,$d2)
|
elsif($mFld[0] eq 'HHM-LAN-IF'){#@mFld=(undef,$vers,$serno,$d1,$owner,$msec,$d2)
|
||||||
|
@ -1421,7 +1421,8 @@ my %culHmSubTypeSets = (
|
|||||||
pushButton =>
|
pushButton =>
|
||||||
{ devicepair => "<btnNumber> device ... [single|dual] [set|unset] [actor|remote|both]",},
|
{ devicepair => "<btnNumber> device ... [single|dual] [set|unset] [actor|remote|both]",},
|
||||||
virtual =>
|
virtual =>
|
||||||
{ devicepair => "<btnNumber> device ... [single|dual] [set|unset] [actor|remote|both]",
|
{ raw => "data ...",
|
||||||
|
devicepair => "<btnNumber> device ... [single|dual] [set|unset] [actor|remote|both]",
|
||||||
press => "[long|short]...",
|
press => "[long|short]...",
|
||||||
virtual =>"<noButtons>",}, #redef necessary for virtual
|
virtual =>"<noButtons>",}, #redef necessary for virtual
|
||||||
smokeDetector =>
|
smokeDetector =>
|
||||||
@ -1714,7 +1715,7 @@ CUL_HM_Set($@)
|
|||||||
my $reg = $culHmRegDefine{$regName};
|
my $reg = $culHmRegDefine{$regName};
|
||||||
return $st." - ".$regName # give some help
|
return $st." - ".$regName # give some help
|
||||||
." range:". $reg->{min}." to ".$reg->{max}.$reg->{u}
|
." range:". $reg->{min}." to ".$reg->{max}.$reg->{u}
|
||||||
.($reg->{l} == 3)?" peer required":""." : ".$reg->{t}."\n"
|
.(($reg->{l} == 3)?" peer required":"")." : ".$reg->{t}."\n"
|
||||||
if ($data eq "?");
|
if ($data eq "?");
|
||||||
return "value:".$data." out of range for Reg \"".$regName."\""
|
return "value:".$data." out of range for Reg \"".$regName."\""
|
||||||
if ($data < $reg->{min} ||$data > $reg->{max});
|
if ($data < $reg->{min} ||$data > $reg->{max});
|
||||||
@ -1828,7 +1829,7 @@ CUL_HM_Set($@)
|
|||||||
}
|
}
|
||||||
elsif($cmd eq "pct") { ######################################################
|
elsif($cmd eq "pct") { ######################################################
|
||||||
$a[1] = 100 if ($a[1] > 100);
|
$a[1] = 100 if ($a[1] > 100);
|
||||||
$tval = CUL_HM_encodeTime16((@a > 2)?$a[2]:85825945);# onTime 0.0..85825945.6, 0=forever
|
$tval = CUL_HM_encodeTime16(((@a > 2)&&$a[2]!=0)?$a[2]:85825945);# onTime 0.0..85825945.6, 0=forever
|
||||||
$rval = CUL_HM_encodeTime16((@a > 3)?$a[3]:2.5); # rampTime 0.0..85825945.6, 0=immediate
|
$rval = CUL_HM_encodeTime16((@a > 3)?$a[3]:2.5); # rampTime 0.0..85825945.6, 0=immediate
|
||||||
CUL_HM_PushCmdStack($hash,
|
CUL_HM_PushCmdStack($hash,
|
||||||
sprintf("++%s11%s%s02%s%02X%s%s",$flag,$id,$dst,$chn,$a[1]*2,$rval,$tval));
|
sprintf("++%s11%s%s02%s%02X%s%s",$flag,$id,$dst,$chn,$a[1]*2,$rval,$tval));
|
||||||
@ -2400,7 +2401,6 @@ CUL_HM_responseSetup($$$)
|
|||||||
|
|
||||||
# define timeout - holdup cmdStack until response complete or timeout
|
# define timeout - holdup cmdStack until response complete or timeout
|
||||||
InternalTimer(gettimeofday()+$rTo, "CUL_HM_respPendTout", "respPend:$dst", 0);
|
InternalTimer(gettimeofday()+$rTo, "CUL_HM_respPendTout", "respPend:$dst", 0);
|
||||||
|
|
||||||
#--- remove readings in channel
|
#--- remove readings in channel
|
||||||
my $chnhash = $modules{CUL_HM}{defptr}{"$dst$chn"};
|
my $chnhash = $modules{CUL_HM}{defptr}{"$dst$chn"};
|
||||||
$chnhash = $hash if (!$chnhash);
|
$chnhash = $hash if (!$chnhash);
|
||||||
@ -2503,7 +2503,8 @@ sub
|
|||||||
CUL_HM_respPendToutProlong($)
|
CUL_HM_respPendToutProlong($)
|
||||||
{#used when device sends part responses
|
{#used when device sends part responses
|
||||||
my ($hash) = @_;
|
my ($hash) = @_;
|
||||||
RemoveInternalTimer("respPend:$hash->{DEF}");# remove responsePending timer?
|
|
||||||
|
#RemoveInternalTimer("respPend:$hash->{DEF}");# remove responsePending timer?
|
||||||
InternalTimer(gettimeofday()+1, "CUL_HM_respPendTout", "respPend:$hash->{DEF}", 0);
|
InternalTimer(gettimeofday()+1, "CUL_HM_respPendTout", "respPend:$hash->{DEF}", 0);
|
||||||
}
|
}
|
||||||
###################################
|
###################################
|
||||||
@ -3301,7 +3302,7 @@ CUL_HM_ActCheck()
|
|||||||
my $actName = $actHash->{NAME};
|
my $actName = $actHash->{NAME};
|
||||||
delete ($actHash->{READINGS}); #cleansweep
|
delete ($actHash->{READINGS}); #cleansweep
|
||||||
CUL_HM_setRd($actHash,"status","check performed",$tn);
|
CUL_HM_setRd($actHash,"status","check performed",$tn);
|
||||||
foreach my $devId (split(",",$attr{$actName}{peerList})){
|
foreach my $devId (split(",",AttrVal($actName,"peerList","none"))){
|
||||||
my $devName = CUL_HM_id2Name($devId);
|
my $devName = CUL_HM_id2Name($devId);
|
||||||
if(!$devName || !defined($attr{$devName}{actCycle})){
|
if(!$devName || !defined($attr{$devName}{actCycle})){
|
||||||
CUL_HM_ActDel($devId);
|
CUL_HM_ActDel($devId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user