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

36_JeeLink.pm: fixed adress calculation for all-in-one to LaCreosse conversion

see forum: http://forum.fhem.de/index.php/topic,28232.msg211615.html#msg211615
           http://forum.fhem.de/index.php/topic,17697.msg212137.html#msg212137


git-svn-id: https://svn.fhem.de/fhem/trunk@6882 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2014-11-04 15:26:37 +00:00
parent e283125ff5
commit 7d8184dc13

View File

@ -759,8 +759,8 @@ JeeLink_Parse($$$$)
my( $addr, $type, $channel, $temperature, $humidity, $batInserted ) = 0.0; my( $addr, $type, $channel, $temperature, $humidity, $batInserted ) = 0.0;
$addr = sprintf( "%02X", ((hex(substr($dmsg,3,2)) & 0x0F) << 2) | ((hex(substr($dmsg,5,2)) & 0xC0) >> 6) ); $addr = (hex(substr($dmsg,3,2)) & 0x0F) << 2) | ((hex(substr($dmsg,5,2)) & 0xC0) >> 6);
$type = ((hex(substr($dmsg,5,2)) & 0xF0) >> 4); # not needed by LaCrosse Module $type = (hex(substr($dmsg,5,2)) & 0xF0) >> 4; # not needed by LaCrosse Module
#$channel = 1; ## $channel = (hex(substr($dmsg,5,2)) & 0x0F); #$channel = 1; ## $channel = (hex(substr($dmsg,5,2)) & 0x0F);
$temperature = ( ( ((hex(substr($dmsg,5,2)) & 0x0F) * 100) + (((hex(substr($dmsg,7,2)) & 0xF0) >> 4) * 10) + (hex(substr($dmsg,7,2)) & 0x0F) ) / 10) - 40; $temperature = ( ( ((hex(substr($dmsg,5,2)) & 0x0F) * 100) + (((hex(substr($dmsg,7,2)) & 0xF0) >> 4) * 10) + (hex(substr($dmsg,7,2)) & 0x0F) ) / 10) - 40;