mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-22 14:16:42 +00:00
00_TCM: minor changes
git-svn-id: https://svn.fhem.de/fhem/trunk@11626 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
2daa8cc089
commit
3f14747e47
@ -1,6 +1,6 @@
|
|||||||
##############################################
|
##############################################
|
||||||
# $Id$
|
# $Id$
|
||||||
# 2016-04-12
|
# 2016-05-21
|
||||||
|
|
||||||
# by r.koenig at koeniglich.de
|
# by r.koenig at koeniglich.de
|
||||||
#
|
#
|
||||||
@ -254,7 +254,7 @@ TCM_Read($)
|
|||||||
if($orgmap{$org}) {
|
if($orgmap{$org}) {
|
||||||
$org = $orgmap{$org};
|
$org = $orgmap{$org};
|
||||||
} else {
|
} else {
|
||||||
Log3 undef, 2, "TCM unknown ORG mapping for $org";
|
Log3 $name, 2, "TCM $name unknown ORG mapping for $org";
|
||||||
}
|
}
|
||||||
if ($org ne "A5") {
|
if ($org ne "A5") {
|
||||||
# extract db_0
|
# extract db_0
|
||||||
@ -268,16 +268,16 @@ TCM_Read($)
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
# Receive Message Telegram (RMT)
|
# Receive Message Telegram (RMT)
|
||||||
my $msg=TCM_Parse120($hash, $net, 1);
|
my $msg = TCM_Parse120($hash, $net, 1);
|
||||||
if (($msg eq 'OK') && ($net =~ m/^8B(..)(........)(........)(..)/)){
|
if (($msg eq 'OK') && ($net =~ m/^8B(..)(........)(........)(..)/)){
|
||||||
my ($org, $d1,$id,$status) = ($1, $2, $3, $4);
|
my ($org, $d1,$id,$status) = ($1, $2, $3, $4);
|
||||||
my $packetType = 1;
|
my $packetType = 1;
|
||||||
# Re-translate the ORG to RadioORG / TCM310 equivalent
|
# Re-translate the ORG to RadioORG / TCM310 equivalent
|
||||||
my %orgmap = ("05"=>"F6", "06"=>"D5", "07"=>"A5", );
|
my %orgmap = ("05" => "F6", "06" => "D5", "07" => "A5");
|
||||||
if($orgmap{$org}) {
|
if($orgmap{$org}) {
|
||||||
$org = $orgmap{$org};
|
$org = $orgmap{$org};
|
||||||
} else {
|
} else {
|
||||||
Log3 undef, 2, "TCM unknown ORG mapping for $org";
|
Log3 $name, 2, "TCM $name unknown ORG mapping for $org";
|
||||||
}
|
}
|
||||||
if ($org ne "A5") {
|
if ($org ne "A5") {
|
||||||
# extract db_0
|
# extract db_0
|
||||||
@ -373,9 +373,9 @@ TCM_Read($)
|
|||||||
);
|
);
|
||||||
my $rcTxt = $codes{$rc} if($codes{$rc});
|
my $rcTxt = $codes{$rc} if($codes{$rc});
|
||||||
Log3 $name, $rc eq "00" ? 5 : 2, "TCM $name RESPONSE: $rcTxt";
|
Log3 $name, $rc eq "00" ? 5 : 2, "TCM $name RESPONSE: $rcTxt";
|
||||||
$packetType = sprintf "%01X", $packetType;
|
#$packetType = sprintf "%01X", $packetType;
|
||||||
#EnOcean:PacketType:ResposeCode:MessageData:OptionalData
|
#EnOcean:PacketType:ResposeCode:MessageData:OptionalData
|
||||||
Dispatch($hash, "EnOcean:$packetType:$1:$2:$odata", undef);
|
#Dispatch($hash, "EnOcean:$packetType:$1:$2:$odata", undef);
|
||||||
|
|
||||||
} elsif($packetType == 3) {
|
} elsif($packetType == 3) {
|
||||||
# packet type RADIO_SUB_TEL
|
# packet type RADIO_SUB_TEL
|
||||||
@ -383,7 +383,6 @@ TCM_Read($)
|
|||||||
|
|
||||||
} elsif($packetType == 4) {
|
} elsif($packetType == 4) {
|
||||||
# packet type EVENT
|
# packet type EVENT
|
||||||
#Log3 $name, 2, "TCM $name packet type EVENT not supported: $data";
|
|
||||||
$mdata =~ m/^(..)(.*)$/;
|
$mdata =~ m/^(..)(.*)$/;
|
||||||
$packetType = sprintf "%01X", $packetType;
|
$packetType = sprintf "%01X", $packetType;
|
||||||
#EnOcean:PacketType:eventCode:MessageData
|
#EnOcean:PacketType:eventCode:MessageData
|
||||||
@ -395,7 +394,6 @@ TCM_Read($)
|
|||||||
|
|
||||||
} elsif($packetType == 6) {
|
} elsif($packetType == 6) {
|
||||||
# packet type SMART_ACK_COMMAND
|
# packet type SMART_ACK_COMMAND
|
||||||
#Log3 $name, 2, "TCM $name packet type SMART_ACK_COMMAND not supported: $data";
|
|
||||||
$mdata =~ m/^(..)(.*)$/;
|
$mdata =~ m/^(..)(.*)$/;
|
||||||
$packetType = sprintf "%01X", $packetType;
|
$packetType = sprintf "%01X", $packetType;
|
||||||
#EnOcean:PacketType:smartAckCode:MessageData
|
#EnOcean:PacketType:smartAckCode:MessageData
|
||||||
@ -434,7 +432,7 @@ TCM_Read($)
|
|||||||
|
|
||||||
} elsif($packetType == 10) {
|
} elsif($packetType == 10) {
|
||||||
# packet type RADIO_ADVANCED
|
# packet type RADIO_ADVANCED
|
||||||
Log3 $name, 2, "TCM: $name packet type RADIO_ADVANCED not supported: $data";
|
Log3 $name, 2, "TCM $name packet type RADIO_ADVANCED not supported: $data";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Log3 $name, 2, "TCM $name unknown packet type $packetType: $data";
|
Log3 $name, 2, "TCM $name unknown packet type $packetType: $data";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user