From 5c7cad7d551bc21716c7f7c7b2dda954f59da89a Mon Sep 17 00:00:00 2001 From: wherzig <> Date: Sun, 15 Apr 2012 13:16:58 +0000 Subject: [PATCH] error on set corrected git-svn-id: https://svn.fhem.de/fhem/trunk@1453 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/46_TRX_LIGHT.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/46_TRX_LIGHT.pm b/fhem/FHEM/46_TRX_LIGHT.pm index 9c2470ac2..349c78f9d 100755 --- a/fhem/FHEM/46_TRX_LIGHT.pm +++ b/fhem/FHEM/46_TRX_LIGHT.pm @@ -175,7 +175,7 @@ TRX_LIGHT_Set($@) # lightning1 $hex_prefix = sprintf "0710"; - $hex_command = sprintf "%02x%02x%02x%02x%02x00", $device_type_num, $seqnr, $house, $unit, $cmnd; + $hex_command = sprintf "%02x%02x%02x%02x%02x00", $device_type_num & 0xff, $seqnr, $house, $unit, $cmnd; Log 1,"TRX_LIGHT_Set name=$name device_type=$device_type, deviceid=$deviceid house=$house, unit=$unit command=$command" if ($TRX_LIGHT_debug == 1); Log 1,"TRX_LIGHT_Set hexline=$hex_command" if ($TRX_LIGHT_debug == 1); } elsif ($protocol_type == 0x11) { @@ -187,7 +187,7 @@ TRX_LIGHT_Set($@) return "error set name=$name deviveid=$deviceid"; } $hex_prefix = sprintf "0711"; - $hex_command = sprintf "%02x%02x%s%02x%02x00", $device_type_num, $seqnr, $deviceid, $cmnd, $level; + $hex_command = sprintf "%02x%02x%s%02x%02x00", $device_type_num & 0xff, $seqnr, $deviceid, $cmnd, $level; if ($command eq "level") { $command .= sprintf " %d", $level; }