2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

correct TS34C id

git-svn-id: https://svn.fhem.de/fhem/trunk@3649 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
wherzig 2013-08-09 17:51:06 +00:00
parent 98bd7dd6b6
commit 58c2e2155d

View File

@ -74,6 +74,8 @@
# but WITHOUT ANY WARRANTY; without even the implied warranty of # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# #
# Due to RFXCOM SDK requirements this code may only be used with a RFXCOM device.
#
# Some code was derived and modified from xpl-perl # Some code was derived and modified from xpl-perl
# from the following two files: # from the following two files:
# xpl-perl/lib/xPL/Utils.pm: # xpl-perl/lib/xPL/Utils.pm:
@ -565,8 +567,28 @@ sub TRX_WEATHER_common_temphydro {
my $dev_str = $dev_type; my $dev_str = $dev_type;
if (TRX_WEATHER_use_longid($longids,$dev_type)) { if (TRX_WEATHER_use_longid($longids,$dev_type)) {
$dev_str .= $DOT.sprintf("%02x", $bytes->[3]); $dev_str .= $DOT.sprintf("%02x", $bytes->[3]);
} } elsif ($dev_type eq "TFATS34C") {
if ($bytes->[4] > 0) { Log 1,"TRX_WEATHER: TFA";
if ($bytes->[3] > 0x20 && $bytes->[3] <= 0x3F) {
Log 1,"TRX_WEATHER: TFA 1";
$dev_str .= $DOT."1";
} elsif ($bytes->[3] >= 0x40 && $bytes->[3] <= 0x5F) {
Log 1,"TRX_WEATHER: TFA 2";
$dev_str .= $DOT."2";
} elsif ($bytes->[3] >= 0x60 && $bytes->[3] <= 0x7F) {
Log 1,"TRX_WEATHER: TFA 3";
$dev_str .= $DOT."3";
} elsif ($bytes->[3] >= 0xA0 && $bytes->[3] <= 0xBF) {
Log 1,"TRX_WEATHER: TFA 4";
$dev_str .= $DOT."4";
} elsif ($bytes->[3] >= 0xC0 && $bytes->[3] <= 0xDF) {
Log 1,"TRX_WEATHER: TFA 5";
$dev_str .= $DOT."5";
} else {
Log 1,"TRX_WEATHER: TFA 9";
$dev_str .= $DOT."9";
}
} elsif ($bytes->[4] > 0) {
$dev_str .= $DOT.sprintf("%d", $bytes->[4]); $dev_str .= $DOT.sprintf("%d", $bytes->[4]);
} }