mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-21 14:04:15 +00:00
# TCM120: eliminates errors when receiving ORG 05/06 telegrams
# sub TCM_Parse310: incorrect output fixed git-svn-id: https://svn.fhem.de/fhem/trunk@3323 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
45dda7ddae
commit
f5cd8ff3b7
@ -253,7 +253,10 @@ TCM_Read($)
|
|||||||
} else {
|
} else {
|
||||||
Log 1, "TCM120: unknown ORG mapping for $org";
|
Log 1, "TCM120: unknown ORG mapping for $org";
|
||||||
}
|
}
|
||||||
|
if ($org ne "A5") {
|
||||||
|
# extract db_0
|
||||||
|
$d1 = substr($d1, 0, 2);
|
||||||
|
}
|
||||||
if ($blockSenderID eq "own" && (hex $id) >= $baseID && (hex $id) <= $lastID) {
|
if ($blockSenderID eq "own" && (hex $id) >= $baseID && (hex $id) <= $lastID) {
|
||||||
Log $ll5, "TCM: $name Telegram from $id blocked.";
|
Log $ll5, "TCM: $name Telegram from $id blocked.";
|
||||||
} else {
|
} else {
|
||||||
@ -446,16 +449,13 @@ TCM_Parse310($$$)
|
|||||||
my $name = $hash->{NAME};
|
my $name = $hash->{NAME};
|
||||||
my $ll5 = GetLogLevel($name,5);
|
my $ll5 = GetLogLevel($name,5);
|
||||||
my $ll2 = GetLogLevel($name,2);
|
my $ll2 = GetLogLevel($name,2);
|
||||||
|
|
||||||
Log $ll5, "TCM: Parse $rawmsg";
|
Log $ll5, "TCM: Parse $rawmsg";
|
||||||
|
|
||||||
my $rc = substr($rawmsg, 0, 2);
|
my $rc = substr($rawmsg, 0, 2);
|
||||||
my $msg;
|
my $msg = "";
|
||||||
|
|
||||||
if($rc ne "00") {
|
if($rc ne "00") {
|
||||||
my $msg = $rc310{$rc};
|
$msg = $rc310{$rc};
|
||||||
$msg = "Unknown return code $rc" if(!$msg);
|
$msg = "Unknown return code $rc" if(!$msg);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
my @ans;
|
my @ans;
|
||||||
foreach my $k (sort keys %{$ptr}) {
|
foreach my $k (sort keys %{$ptr}) {
|
||||||
@ -565,6 +565,7 @@ TCM_RemovePair($)
|
|||||||
{
|
{
|
||||||
my $hash = shift;
|
my $hash = shift;
|
||||||
delete($hash->{pair});
|
delete($hash->{pair});
|
||||||
|
CommandDeleteReading(undef, "$hash->{NAME} pair");
|
||||||
}
|
}
|
||||||
|
|
||||||
my %sets120 = ( # Name, Data to send to the CUL, Regexp for the answer
|
my %sets120 = ( # Name, Data to send to the CUL, Regexp for the answer
|
||||||
@ -616,6 +617,7 @@ TCM_Set($@)
|
|||||||
|
|
||||||
if($cmd eq "pairForSec") {
|
if($cmd eq "pairForSec") {
|
||||||
$hash->{pair} = 1;
|
$hash->{pair} = 1;
|
||||||
|
readingsSingleUpdate($hash, "pair", 1, 1);
|
||||||
InternalTimer(gettimeofday()+$arg, "TCM_RemovePair", $hash, 1);
|
InternalTimer(gettimeofday()+$arg, "TCM_RemovePair", $hash, 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user