From 8a1407c849f21033dc03bcdb640142937874266c Mon Sep 17 00:00:00 2001 From: wherzig <> Date: Wed, 4 Apr 2012 18:43:07 +0000 Subject: [PATCH] handling of X10 ms14a sensor corrected git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@1411 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/46_TRX_LIGHT.pm | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/FHEM/46_TRX_LIGHT.pm b/FHEM/46_TRX_LIGHT.pm index 04292840d..5d682581c 100755 --- a/FHEM/46_TRX_LIGHT.pm +++ b/FHEM/46_TRX_LIGHT.pm @@ -189,13 +189,20 @@ TRX_LIGHT_Define($$) $type = uc($type); - my $device_name = "TRX".$DOT.$type.$DOT.$deviceid; - if ($type ne "X10" && $type ne "ARC" && $type ne "MS14A" && $type ne "AB400D" && $type ne "WAVEMAN" && $type ne "EMW200" && $type ne "IMPULS") { - Log 1,"RFX10SEC define: wrong type: $type"; - return "RFX10SEC: wrong type: $type"; + Log 1,"TRX_LIGHT define: wrong type: $type"; + return "TRX_LIGHT: wrong type: $type"; } + my $my_type; + if ($type eq "MS14A") { + $my_type = "X10"; # device will be received as X10 + } else { + $my_type = $type; + } + + my $device_name = "TRX".$DOT.$my_type.$DOT.$deviceid; + $hash->{TRX_LIGHT_deviceid} = $deviceid; $hash->{TRX_LIGHT_devicelog} = $devicelog; $hash->{TRX_LIGHT_type} = $type;